[Mono-list] Mono NCurses bindings

Florian Hester florian at nedlinux.nl
Mon Jun 19 18:19:15 EDT 2006


Hello,

I have implemented support for attron and attrof functions and support for
windows :-) . They are working great and with no problem i have been able
to succesfully get this example in C for C# working:
http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/windows.html#LETBEWINDOW

You can download the updated library with the example from here:

http://home.nedlinux.nl/~florian/downloads/NCursesSharp.tar.gz

I was actually expecting alot of problems with windows and the attr*
functions. But no, they worked great on the first run.

Stephan and Andrea can start testing with this library.

And if others find problems, then please Email me :-).

Florian Hester

> -----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