[Gtk-sharp-list] GLib MainLoop/MainContext/IOChannel/Source

Miguel de Icaza miguel at microsoft.com
Thu Jun 29 13:37:35 UTC 2017


Hello,

Modality is a concept that is implemented by the toolkit.

If you are implementing your own toolkit, you will have to create your own concept of modality and treat it that way.

Usually what this means is that the events are sent to the modal window, and no other window receives events.

Miguel.

From: Gtk-sharp-list <gtk-sharp-list-bounces at lists.dot.net> on behalf of Wolfgang Mauer <wolfgang.mauer at kabelmail.de>
Date: Saturday, June 17, 2017 at 6:00 AM
To: "gtk-sharp-list at lists.xamarin.com" <gtk-sharp-list at lists.xamarin.com>
Subject: [Gtk-sharp-list] GLib MainLoop/MainContext/IOChannel/Source

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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/gtk-sharp-list/attachments/20170629/5fb19b36/attachment.html>


More information about the Gtk-sharp-list mailing list