Discussion:
[Gtk-sharp-list] GLib MainLoop/MainContext/IOChannel/Source
Wolfgang Mauer
2017-06-17 10:00:14 UTC
Permalink
Hi Guys,

I need help to the above topics.



I have an embedded system with no graphical interface like X11 etc.
I need to implement something similar to a WindowManager using GLES2 as
Surface(Cairo).
No GTK/GDK are avail. Only Mono/Glib/Cairo.
As input device i have a RemoteControl using ("/dev/input/event1")..

I tried something like this, what basically works..
Windows are painted/rendered with cairo.


ModalLoop = new MainLoop ();

_fd = Syscall.open ("/dev/input/event1", OpenFlags.O_RDWR |
OpenFlags.O_NONBLOCK);

_io = new GLib.IOChannel (_fd);

_io.Encoding = null;

_io.AddWatch (0, GLib.IOCondition.In, OnRemotePressed);



GLib.Idle.Add (OnStartMain);

ModalLoop.Run ();

But now I need a kind of "modal Window" with own MainLoop and Input and I do
not know how to continue.
Any Help?

PS. Multithreading means a lot of work with OpenGL so I have not tried this
yet.

Loading...