Page 1 of 1
GTKWidget Structure defined differently?
Posted: Sun Feb 28, 2016 8:00 pm
by Justin
Why is the GTKWidget structure defined diferently in gtkwidget.h than in PB?
Code: Select all
struct _GtkWidget
{
GInitiallyUnowned parent_instance;
GtkWidgetPrivate *priv;
};
In PB is different you can see it in the structure viewer.
Re: GTKWidget Structure defined differently?
Posted: Mon Feb 29, 2016 8:13 am
by Fred
PB has GTK/GTK2 structures i think. We should update to GTK3 but it's a lot of work.
Re: GTKWidget Structure defined differently?
Posted: Mon Feb 29, 2016 2:58 pm
by Justin
Ok, so the GTK3 one would be the one i posted?
I am asking this because i am porting some gtk stuff to windows, another thing i noticed is that some structures are padded, like:
Code: Select all
Structure GObject
g_type_instance.GTypeInstance
ref_count.l
PB_Alignement.b[4]
*qdata.GData
EndStructure
How do i know when i have to use padding?, or can i just use align #PB_Structure_AlignC in all of them?
Btw, the ref_count field is defined as:
volatile guint ref_count;
and guint is: typedef unsigned int guint;
so it should be .i, no?
Re: GTKWidget Structure defined differently?
Posted: Mon Feb 29, 2016 3:07 pm
by Fred
Yes, #PB_Structure_AlignC should be enough. The padding info were added before PB got this feature.