R: [Mono-list] Mono NCurses bindings

Florian Hester florian at nedlinux.nl
Mon Jun 19 09:21:37 EDT 2006


Hello Andrea,

I will be sure to send you an email too if i need testers .

:-)

Florian Hester

> Wow :) I need it too! Good word I wait for new implementation, like
> Stephan,
> if you need help or some testing can we stay in contact!
>
> GOOOOod work :D
>
> -----Messaggio originale-----
> Da: mono-list-bounces at lists.ximian.com
> [mailto:mono-list-bounces at lists.ximian.com] Per conto di Florian Hester
> Inviato: lunedì 19 giugno 2006 0.14
> A: mono-list at lists.ximian.com
> Oggetto: [Mono-list] Mono NCurses bindings
>
> Hello,
>
> I am trying to make NCurses bindings for Mono. I needed NCurses for my
> project and AFAIK there arent any NCurses bindings for Mono. So i thought
> why not make them myself.
>
> I am using a simple C library i wrote myself. In which i wrap some of the
> functions if needed. I then use the functions in C# using DllImport.
>
> Its working great, i have some simple functions implemented, and i was
> able to get a version of this example in C# working:
> http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/scanw.html#GETSTREX
>
> In C#:
>
> class TestNC
> {
> 	public static void Main (string[] args)
> 	{
> 		NCurses cur = new NCurses();
> 		string msg = "Enter a string: ";
> 		string str = "";
> 		int row,col;
>
> 		cur.InitScreen();
> 		row = cur.GetMaxY();
> 		col = cur.GetMaxX();
> 		cur.MVPrintW(row/2, (col-msg.Length)/2, msg);
> 		str = cur.GetStr();
> 		cur.MVPrintW(cur.GetLINES() - 2, 0, "You Entered: " + str);
> 		cur.GetCh();
> 		cur.EndWin();
> 	}
> }
>
> I dont know if i will be using classes. I will maybe stick to functions so
> existing tutorials for NCurses in C are easy to use for C#.
>
> You can download the example and bindings here:
> http://home.nedlinux.nl/~florian/downloads/NCursesSharp.tar.gz
>
> Florian Hester
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
>




More information about the Mono-list mailing list