Re: GtkAllocation accessor

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

 



On Wed, Jun 02, 2010 at 01:31:30PM +0100, Emmanuele Bassi wrote:
> On Wed, 2010-06-02 at 12:17 +0100, Patrick Welche wrote:
> > OK, I shouldn't have mentioned memory. Trying again.
> > 
> > Why was
> > 
> >   void gtk_widget_get_allocation(GtkWidget *widget, GtkAllocation *allocation)
> > 
> > chosen, rather than
> > 
> >   GtkAllocation *gtk_widget_get_allocation(GtkWidget *widget)
> > 
> > ?
> 
> because you always want a copy of the allocation, to avoid third party
> code messing up with internal state of the widget.
> 
> and because it matches other accessors for structures in GLib and GTK+.

No it doesn't, which is why GtkAllocation is causing the problem with
GSEAL_ENABLE, viz:

  GdkWindow *gtk_widget_get_window(GtkWidget *widget);

not

  void gtk_widget_get_window(GtkWidget *widget, GdkWindow *window);

and not the other accessor functions.


Cheers,

Patrick
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux