guint property_id,
GValue *value,
GParamSpec *pspec);
-static GtkType gtk_box_child_type (GtkContainer *container);
+static GType gtk_box_child_type (GtkContainer *container);
static GtkContainerClass *parent_class = NULL;
-GtkType
+GType
gtk_box_get_type (void)
{
- static GtkType box_type = 0;
+ static GType box_type = 0;
if (!box_type)
{
- static const GtkTypeInfo box_info =
+ static const GTypeInfo box_info =
{
- "GtkBox",
- sizeof (GtkBox),
sizeof (GtkBoxClass),
- (GtkClassInitFunc) gtk_box_class_init,
- (GtkObjectInitFunc) gtk_box_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) gtk_box_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (GtkBox),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) gtk_box_init,
+ NULL, /* value_table */
};
- box_type = gtk_type_unique (GTK_TYPE_CONTAINER, &box_info);
+ box_type = g_type_register_static (GTK_TYPE_CONTAINER, "GtkBox",
+ &box_info, G_TYPE_FLAG_ABSTRACT);
}
return box_type;
g_object_class_install_property (gobject_class,
PROP_SPACING,
g_param_spec_int ("spacing",
- _("Spacing"),
- _("The amount of space between children."),
+ P_("Spacing"),
+ P_("The amount of space between children"),
0,
G_MAXINT,
0,
g_object_class_install_property (gobject_class,
PROP_HOMOGENEOUS,
g_param_spec_boolean ("homogeneous",
- _("Homogeneous"),
- _("Whether the children should all be the same size."),
+ P_("Homogeneous"),
+ P_("Whether the children should all be the same size"),
FALSE,
G_PARAM_READABLE | G_PARAM_WRITABLE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_EXPAND,
g_param_spec_boolean ("expand",
- _("Expand"),
- _("Whether the child should receive extra space when the parent grows"),
+ P_("Expand"),
+ P_("Whether the child should receive extra space when the parent grows"),
TRUE,
G_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_FILL,
g_param_spec_boolean ("fill",
- _("Fill"),
- _("Whether extra space given to the child should be allocated to the child or used as padding"),
+ P_("Fill"),
+ P_("Whether extra space given to the child should be allocated to the child or used as padding"),
TRUE,
G_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_PADDING,
g_param_spec_uint ("padding",
- _("Padding"),
- _("Extra space to put between the child and its neighbors, in pixels"),
+ P_("Padding"),
+ P_("Extra space to put between the child and its neighbors, in pixels"),
0, G_MAXINT, 0,
G_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_PACK_TYPE,
g_param_spec_enum ("pack_type",
- _("Pack type"),
- _("A GtkPackType indicating whether the child is packed with reference to the start or end of the parent"),
+ P_("Pack type"),
+ P_("A GtkPackType indicating whether the child is packed with reference to the start or end of the parent"),
GTK_TYPE_PACK_TYPE, GTK_PACK_START,
G_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_POSITION,
g_param_spec_int ("position",
- _("Position"),
- _("The index of the child in the parent"),
+ P_("Position"),
+ P_("The index of the child in the parent"),
-1, G_MAXINT, 0,
G_PARAM_READWRITE));
}
}
}
-static GtkType
-gtk_box_child_type (GtkContainer *container)
+static GType
+gtk_box_child_type (GtkContainer *container)
{
return GTK_TYPE_WIDGET;
}