Re: GtkAllocation accessor
- From: Patrick Welche <prlw1 cam ac uk>
- To: Emmanuele Bassi <ebassi gmail com>
- Cc: gtk-list gnome org
- Subject: Re: GtkAllocation accessor
- Date: Wed, 2 Jun 2010 13:42:18 +0100
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]