Hello Mr. Jacobi What I personally like to see is doing events. It makes your OOP extensible. And is the usual way how things are done in GUI programming.
But it is not limited to GUI. For instance this event is handled by a GUI callback to toggle a button. http://git.savannah.nongnu.org/cgit/gsequencer.git/tree/ags/audio/ags_audio.c#n781 Bests, Joël On Mon, Mar 20, 2017 at 6:37 PM, Joël Krähemann <jkraehem...@gmail.com> wrote: > Hi > > You don't have to use myWidget->parent since you dereference the pointer. > A pointer to a struct always points to the first field of the topmost > nesting level. > > so it would be: > > gtk_widget_set_name(myWidget); > > > Bests, > Joël > > > > On Mon, Mar 20, 2017 at 6:29 PM, S. Jacobi <sjac...@mailueberfall.de> wrote: >> On Mon, 20 Mar 2017 18:10:16 +0100 >> Joël Krähemann <jkraehem...@gmail.com> wrote: >> >>> Hi >>> >>> As Tristan told you. The struct contains the other struct as not using >>> a pointer. >>> >>> struct MyCompositeWidget >>> { >>> GtkAlignment alignment; >>> >>> GtkBox *box; >>> }; >>> >> The parent-is-a-pointer mistake was just me not thinking when I wrote >> the mail. If have seen it being done correctly everywhere. This makes >> gtk_widget_set_name (myWidget->parent, "myWidget"); syntactically wrong >> however. >> _______________________________________________ >> gtk-app-devel-list mailing list >> gtk-app-devel-list@gnome.org >> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list