Re: GTK window winthout main iterator



Forgive me for second guessing you, but are you definite that that your loop is better/easier to maintain than a Gtk main loop?

So far, if I was tempted to implement my own main loop, it wasn't because the Gtk main loop was inferior, but because I was looking at it the wrong way. Definitely check out glib_idle_add(), glib_timeout_add() and family.

I would love to be proved wrong, though.

Yours,
Reuben



On 09/04/2018 06:09 PM, Juan Ignacio Donoso via gtk-app-devel-list wrote:
I'm trying to create a GUI using gtk.... I already have a loop that runs my
logic. I was using cairo to draw to a png and flush to /dev/fb0 but now I
want to instantiate a Gtk::Window to draw on it.

I don't want to run Gtk::Main because just want to trigger new drawings
when my logic trigger it..
The app is real only there aren't going to be any interactions from the app
ui, only from the internal logic I want to draw.

Any idea where to look to implement that approach. I was thinking on using
Gtk::main_iteration_do with Gtk::Queue_draw. But I'm not getting it work.

Do I need to ask for a cairo context on every on_draw signal call?
Do I need to "draw" on the "draw" signal?

thanks
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]