Wrap box assimilation
Some coding style cleanups, rename Priv to Private, add docs
This commit is contained in:
parent
7670b13d19
commit
15ea566813
@ -6361,3 +6361,40 @@ GTK_APPLICATION_GET_CLASS
|
|||||||
gtk_application_get_type
|
gtk_application_get_type
|
||||||
GtkApplicationPrivate
|
GtkApplicationPrivate
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
|
<SECTION>
|
||||||
|
<FILE>gtkwrapbox</FILE>
|
||||||
|
<TITLE>GtkWrapBox</TITLE>
|
||||||
|
GtkWrapBox
|
||||||
|
|
||||||
|
gtk_wrap_box_new
|
||||||
|
gtk_wrap_box_insert_child
|
||||||
|
gtk_wrap_box_reorder_child
|
||||||
|
GtkWrapAllocationMode
|
||||||
|
gtk_wrap_box_set_allocation_mode
|
||||||
|
gtk_wrap_box_get_allocation_mode
|
||||||
|
GtkWrapBoxSpreading
|
||||||
|
gtk_wrap_box_set_spreading
|
||||||
|
gtk_Wrap_box_get_spreading
|
||||||
|
gtk_wrap_box_set_vertical_spacing
|
||||||
|
gtk_wrap_box_get_vertical_spacing
|
||||||
|
gtk_wrap_box_set_horizontal_spacing
|
||||||
|
gtk_wrap_box_get_horizontal_spacing
|
||||||
|
gtk_wrap_box_set_minimum_line_children
|
||||||
|
gtk_wrap_box_get_minimum_line_children
|
||||||
|
gtk_wrap_box_set_natural_line_children
|
||||||
|
gtk_wrap_box_get_natural_line_children
|
||||||
|
|
||||||
|
<SUBSECTION Standard>
|
||||||
|
GtkWrapBoxClass
|
||||||
|
GTK_TYPE_WRAP_BOX
|
||||||
|
GTK_WRAP_BOX
|
||||||
|
GTK_WRAP_BOX_CLASS
|
||||||
|
GTK_IS_WRAP_BOX
|
||||||
|
GTK_IS_WRAP_BOX_CLASS
|
||||||
|
GTK_WRAP_BOX_GET_CLASS
|
||||||
|
|
||||||
|
<SUBSECTION Private>
|
||||||
|
gtk_wrap_box_get_type
|
||||||
|
GtkWrapBoxPrivate
|
||||||
|
</SECTION>
|
||||||
|
@ -179,3 +179,4 @@ gtk_vseparator_get_type
|
|||||||
gtk_widget_get_type
|
gtk_widget_get_type
|
||||||
gtk_window_get_type
|
gtk_window_get_type
|
||||||
gtk_window_group_get_type
|
gtk_window_group_get_type
|
||||||
|
gtk_wrap_box_get_type
|
||||||
|
@ -4491,6 +4491,7 @@ gtk_window_unstick
|
|||||||
|
|
||||||
#if IN_HEADER(__GTK_WRAP_BOX_H__)
|
#if IN_HEADER(__GTK_WRAP_BOX_H__)
|
||||||
#if IN_FILE(__GTK_WRAP_BOX_C__)
|
#if IN_FILE(__GTK_WRAP_BOX_C__)
|
||||||
|
gtk_wrap_allocation_mode_get_type
|
||||||
gtk_wrap_box_get_allocation_mode
|
gtk_wrap_box_get_allocation_mode
|
||||||
gtk_wrap_box_get_horizontal_spacing
|
gtk_wrap_box_get_horizontal_spacing
|
||||||
gtk_wrap_box_get_minimum_line_children
|
gtk_wrap_box_get_minimum_line_children
|
||||||
@ -4507,6 +4508,7 @@ gtk_wrap_box_set_minimum_line_children
|
|||||||
gtk_wrap_box_set_natural_line_children
|
gtk_wrap_box_set_natural_line_children
|
||||||
gtk_wrap_box_set_spreading
|
gtk_wrap_box_set_spreading
|
||||||
gtk_wrap_box_set_vertical_spacing
|
gtk_wrap_box_set_vertical_spacing
|
||||||
|
gtk_wrap_box_spreading_get_type
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "gtksizerequest.h"
|
#include "gtksizerequest.h"
|
||||||
#include "gtkorientable.h"
|
#include "gtkorientable.h"
|
||||||
#include "gtkwrapbox.h"
|
#include "gtkwrapbox.h"
|
||||||
|
#include "gtkprivate.h"
|
||||||
#include "gtkintl.h"
|
#include "gtkintl.h"
|
||||||
|
|
||||||
|
|
||||||
@ -51,7 +52,8 @@ enum {
|
|||||||
PROP_NATURAL_LINE_CHILDREN
|
PROP_NATURAL_LINE_CHILDREN
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
CHILD_PROP_0,
|
CHILD_PROP_0,
|
||||||
CHILD_PROP_X_EXPAND,
|
CHILD_PROP_X_EXPAND,
|
||||||
CHILD_PROP_X_FILL,
|
CHILD_PROP_X_FILL,
|
||||||
@ -61,7 +63,8 @@ enum {
|
|||||||
CHILD_PROP_Y_PADDING
|
CHILD_PROP_Y_PADDING
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GtkWrapBoxPriv {
|
struct _GtkWrapBoxPrivate
|
||||||
|
{
|
||||||
GtkOrientation orientation;
|
GtkOrientation orientation;
|
||||||
GtkWrapAllocationMode mode;
|
GtkWrapAllocationMode mode;
|
||||||
GtkWrapBoxSpreading spreading;
|
GtkWrapBoxSpreading spreading;
|
||||||
@ -75,7 +78,8 @@ struct _GtkWrapBoxPriv {
|
|||||||
GList *children;
|
GList *children;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GtkWrapBoxChild {
|
struct _GtkWrapBoxChild
|
||||||
|
{
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
|
|
||||||
guint16 xpadding;
|
guint16 xpadding;
|
||||||
@ -182,7 +186,7 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
P_("The allocation mode to use"),
|
P_("The allocation mode to use"),
|
||||||
GTK_TYPE_WRAP_ALLOCATION_MODE,
|
GTK_TYPE_WRAP_ALLOCATION_MODE,
|
||||||
GTK_WRAP_ALLOCATE_FREE,
|
GTK_WRAP_ALLOCATE_FREE,
|
||||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkWrapBox:spreading:
|
* GtkWrapBox:spreading:
|
||||||
@ -197,7 +201,7 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
P_("The spreading mode to use"),
|
P_("The spreading mode to use"),
|
||||||
GTK_TYPE_WRAP_BOX_SPREADING,
|
GTK_TYPE_WRAP_BOX_SPREADING,
|
||||||
GTK_WRAP_BOX_SPREAD_BEGIN,
|
GTK_WRAP_BOX_SPREAD_BEGIN,
|
||||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -219,8 +223,7 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
0,
|
0,
|
||||||
65535,
|
65535,
|
||||||
0,
|
0,
|
||||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkWrapBox:natural-line-children:
|
* GtkWrapBox:natural-line-children:
|
||||||
@ -237,7 +240,7 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
0,
|
0,
|
||||||
65535,
|
65535,
|
||||||
0,
|
0,
|
||||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkWrapBox:vertical-spacing:
|
* GtkWrapBox:vertical-spacing:
|
||||||
@ -253,7 +256,7 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
0,
|
0,
|
||||||
65535,
|
65535,
|
||||||
0,
|
0,
|
||||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkWrapBox:horizontal-spacing:
|
* GtkWrapBox:horizontal-spacing:
|
||||||
@ -269,7 +272,7 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
0,
|
0,
|
||||||
65535,
|
65535,
|
||||||
0,
|
0,
|
||||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
/* GtkContainerClass child properties */
|
/* GtkContainerClass child properties */
|
||||||
|
|
||||||
@ -286,7 +289,7 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
P_("Horizontally expand"),
|
P_("Horizontally expand"),
|
||||||
P_("Whether the child expands horizontally."),
|
P_("Whether the child expands horizontally."),
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkWrapBox:x-fill:
|
* GtkWrapBox:x-fill:
|
||||||
@ -301,7 +304,7 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
P_("Horizontally fills"),
|
P_("Horizontally fills"),
|
||||||
P_("Whether the child fills its allocated horizontal space."),
|
P_("Whether the child fills its allocated horizontal space."),
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkWrapBox:y-expand:
|
* GtkWrapBox:y-expand:
|
||||||
@ -316,7 +319,7 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
P_("Vertically expand"),
|
P_("Vertically expand"),
|
||||||
P_("Whether the child expands vertically."),
|
P_("Whether the child expands vertically."),
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkWrapBox:y-fill:
|
* GtkWrapBox:y-fill:
|
||||||
@ -331,7 +334,7 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
P_("Vertically fills"),
|
P_("Vertically fills"),
|
||||||
P_("Whether the child fills its allocated vertical space."),
|
P_("Whether the child fills its allocated vertical space."),
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkWrapBox:x-padding:
|
* GtkWrapBox:x-padding:
|
||||||
@ -347,7 +350,7 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
P_("Extra space to put between the child and "
|
P_("Extra space to put between the child and "
|
||||||
"its left and right neighbors, in pixels"),
|
"its left and right neighbors, in pixels"),
|
||||||
0, 65535, 0,
|
0, 65535, 0,
|
||||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -364,18 +367,18 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
|
|||||||
P_("Extra space to put between the child and "
|
P_("Extra space to put between the child and "
|
||||||
"its upper and lower neighbors, in pixels"),
|
"its upper and lower neighbors, in pixels"),
|
||||||
0, 65535, 0,
|
0, 65535, 0,
|
||||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
GTK_PARAM_READWRITE));
|
||||||
|
|
||||||
g_type_class_add_private (class, sizeof (GtkWrapBoxPriv));
|
g_type_class_add_private (class, sizeof (GtkWrapBoxPrivate));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_wrap_box_init (GtkWrapBox *box)
|
gtk_wrap_box_init (GtkWrapBox *box)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv;
|
GtkWrapBoxPrivate *priv;
|
||||||
|
|
||||||
box->priv = priv =
|
box->priv = priv =
|
||||||
G_TYPE_INSTANCE_GET_PRIVATE (box, GTK_TYPE_WRAP_BOX, GtkWrapBoxPriv);
|
G_TYPE_INSTANCE_GET_PRIVATE (box, GTK_TYPE_WRAP_BOX, GtkWrapBoxPrivate);
|
||||||
|
|
||||||
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||||
priv->mode = GTK_WRAP_ALLOCATE_FREE;
|
priv->mode = GTK_WRAP_ALLOCATE_FREE;
|
||||||
@ -397,7 +400,7 @@ gtk_wrap_box_get_property (GObject *object,
|
|||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GtkWrapBox *box = GTK_WRAP_BOX (object);
|
GtkWrapBox *box = GTK_WRAP_BOX (object);
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
@ -435,7 +438,7 @@ gtk_wrap_box_set_property (GObject *object,
|
|||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GtkWrapBox *box = GTK_WRAP_BOX (object);
|
GtkWrapBox *box = GTK_WRAP_BOX (object);
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
@ -476,7 +479,7 @@ gtk_wrap_box_set_property (GObject *object,
|
|||||||
static gint
|
static gint
|
||||||
get_visible_children (GtkWrapBox *box)
|
get_visible_children (GtkWrapBox *box)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
GList *list;
|
GList *list;
|
||||||
gint i = 0;
|
gint i = 0;
|
||||||
|
|
||||||
@ -528,7 +531,7 @@ get_average_item_size (GtkWrapBox *box,
|
|||||||
gint *min_size,
|
gint *min_size,
|
||||||
gint *nat_size)
|
gint *nat_size)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
GList *list;
|
GList *list;
|
||||||
gint max_min_size = 0;
|
gint max_min_size = 0;
|
||||||
gint max_nat_size = 0;
|
gint max_nat_size = 0;
|
||||||
@ -578,7 +581,7 @@ get_largest_size_for_opposing_orientation (GtkWrapBox *box,
|
|||||||
gint *min_item_size,
|
gint *min_item_size,
|
||||||
gint *nat_item_size)
|
gint *nat_item_size)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
GList *list;
|
GList *list;
|
||||||
gint max_min_size = 0;
|
gint max_min_size = 0;
|
||||||
gint max_nat_size = 0;
|
gint max_nat_size = 0;
|
||||||
@ -623,7 +626,7 @@ get_largest_size_for_opposing_orientation (GtkWrapBox *box,
|
|||||||
/* Gets the largest minimum/natural size on a single line for a given size
|
/* Gets the largest minimum/natural size on a single line for a given size
|
||||||
* (used to get the largest line heights for a fixed item width and the opposite
|
* (used to get the largest line heights for a fixed item width and the opposite
|
||||||
* while itterating over a list of children, note the new index is returned) */
|
* while itterating over a list of children, note the new index is returned) */
|
||||||
GList *
|
static GList *
|
||||||
get_largest_size_for_line_in_opposing_orientation (GtkWrapBox *box,
|
get_largest_size_for_line_in_opposing_orientation (GtkWrapBox *box,
|
||||||
GtkOrientation orientation,
|
GtkOrientation orientation,
|
||||||
GList *cursor,
|
GList *cursor,
|
||||||
@ -633,7 +636,7 @@ get_largest_size_for_line_in_opposing_orientation (GtkWrapBox *box,
|
|||||||
gint *min_item_size,
|
gint *min_item_size,
|
||||||
gint *nat_item_size)
|
gint *nat_item_size)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
GList *list;
|
GList *list;
|
||||||
gint max_min_size = 0;
|
gint max_min_size = 0;
|
||||||
gint max_nat_size = 0;
|
gint max_nat_size = 0;
|
||||||
@ -694,7 +697,7 @@ get_largest_size_for_line_in_opposing_orientation (GtkWrapBox *box,
|
|||||||
/* Gets the largest minimum/natural size on a single line for a given allocated line size
|
/* Gets the largest minimum/natural size on a single line for a given allocated line size
|
||||||
* (used to get the largest line heights for a width in pixels and the opposite
|
* (used to get the largest line heights for a width in pixels and the opposite
|
||||||
* while itterating over a list of children, note the new index is returned) */
|
* while itterating over a list of children, note the new index is returned) */
|
||||||
GList *
|
static GList *
|
||||||
get_largest_size_for_free_line_in_opposing_orientation (GtkWrapBox *box,
|
get_largest_size_for_free_line_in_opposing_orientation (GtkWrapBox *box,
|
||||||
GtkOrientation orientation,
|
GtkOrientation orientation,
|
||||||
GList *cursor,
|
GList *cursor,
|
||||||
@ -705,7 +708,7 @@ get_largest_size_for_free_line_in_opposing_orientation (GtkWrapBox *box,
|
|||||||
gint *extra_pixels,
|
gint *extra_pixels,
|
||||||
GArray **ret_array)
|
GArray **ret_array)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
GtkRequestedSize *sizes;
|
GtkRequestedSize *sizes;
|
||||||
GList *list;
|
GList *list;
|
||||||
GArray *array;
|
GArray *array;
|
||||||
@ -893,7 +896,7 @@ allocate_child (GtkWrapBox *box,
|
|||||||
gint item_size,
|
gint item_size,
|
||||||
gint line_size)
|
gint line_size)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
GtkAllocation widget_allocation;
|
GtkAllocation widget_allocation;
|
||||||
GtkAllocation child_allocation;
|
GtkAllocation child_allocation;
|
||||||
GtkSizeRequestMode request_mode;
|
GtkSizeRequestMode request_mode;
|
||||||
@ -970,7 +973,7 @@ gtk_wrap_box_size_allocate (GtkWidget *widget,
|
|||||||
GtkAllocation *allocation)
|
GtkAllocation *allocation)
|
||||||
{
|
{
|
||||||
GtkWrapBox *box = GTK_WRAP_BOX (widget);
|
GtkWrapBox *box = GTK_WRAP_BOX (widget);
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
GtkRequestedSize *sizes = NULL;
|
GtkRequestedSize *sizes = NULL;
|
||||||
GArray *array;
|
GArray *array;
|
||||||
guint border_width;
|
guint border_width;
|
||||||
@ -1293,7 +1296,7 @@ gtk_wrap_box_remove (GtkContainer *container,
|
|||||||
GtkWidget *widget)
|
GtkWidget *widget)
|
||||||
{
|
{
|
||||||
GtkWrapBox *box = GTK_WRAP_BOX (container);
|
GtkWrapBox *box = GTK_WRAP_BOX (container);
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
list = g_list_find_custom (priv->children, widget,
|
list = g_list_find_custom (priv->children, widget,
|
||||||
@ -1321,7 +1324,7 @@ gtk_wrap_box_forall (GtkContainer *container,
|
|||||||
gpointer callback_data)
|
gpointer callback_data)
|
||||||
{
|
{
|
||||||
GtkWrapBox *box = GTK_WRAP_BOX (container);
|
GtkWrapBox *box = GTK_WRAP_BOX (container);
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
GtkWrapBoxChild *child;
|
GtkWrapBoxChild *child;
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
@ -1347,7 +1350,7 @@ gtk_wrap_box_set_child_property (GtkContainer *container,
|
|||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GtkWrapBox *box = GTK_WRAP_BOX (container);
|
GtkWrapBox *box = GTK_WRAP_BOX (container);
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
GtkWrapBoxChild *child;
|
GtkWrapBoxChild *child;
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
@ -1395,7 +1398,7 @@ gtk_wrap_box_get_child_property (GtkContainer *container,
|
|||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GtkWrapBox *box = GTK_WRAP_BOX (container);
|
GtkWrapBox *box = GTK_WRAP_BOX (container);
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
GtkWrapBoxChild *child;
|
GtkWrapBoxChild *child;
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
@ -1449,7 +1452,7 @@ static GtkSizeRequestMode
|
|||||||
gtk_wrap_box_get_request_mode (GtkSizeRequest *widget)
|
gtk_wrap_box_get_request_mode (GtkSizeRequest *widget)
|
||||||
{
|
{
|
||||||
GtkWrapBox *box = GTK_WRAP_BOX (widget);
|
GtkWrapBox *box = GTK_WRAP_BOX (widget);
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
|
|
||||||
return (priv->orientation == GTK_ORIENTATION_HORIZONTAL) ?
|
return (priv->orientation == GTK_ORIENTATION_HORIZONTAL) ?
|
||||||
GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH : GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT;
|
GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH : GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT;
|
||||||
@ -1464,7 +1467,7 @@ get_largest_line_length (GtkWrapBox *box,
|
|||||||
gint *min_size,
|
gint *min_size,
|
||||||
gint *nat_size)
|
gint *nat_size)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
GList *list;
|
GList *list;
|
||||||
gint max_min_size = 0;
|
gint max_min_size = 0;
|
||||||
gint max_nat_size = 0;
|
gint max_nat_size = 0;
|
||||||
@ -1539,7 +1542,7 @@ gtk_wrap_box_get_width (GtkSizeRequest *widget,
|
|||||||
gint *natural_size)
|
gint *natural_size)
|
||||||
{
|
{
|
||||||
GtkWrapBox *box = GTK_WRAP_BOX (widget);
|
GtkWrapBox *box = GTK_WRAP_BOX (widget);
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
guint border_width;
|
guint border_width;
|
||||||
gint min_item_width, nat_item_width;
|
gint min_item_width, nat_item_width;
|
||||||
gint min_items, nat_items;
|
gint min_items, nat_items;
|
||||||
@ -1614,7 +1617,7 @@ gtk_wrap_box_get_height (GtkSizeRequest *widget,
|
|||||||
gint *natural_size)
|
gint *natural_size)
|
||||||
{
|
{
|
||||||
GtkWrapBox *box = GTK_WRAP_BOX (widget);
|
GtkWrapBox *box = GTK_WRAP_BOX (widget);
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
guint border_width;
|
guint border_width;
|
||||||
gint min_item_height, nat_item_height;
|
gint min_item_height, nat_item_height;
|
||||||
gint min_items, nat_items;
|
gint min_items, nat_items;
|
||||||
@ -1689,7 +1692,7 @@ gtk_wrap_box_get_height_for_width (GtkSizeRequest *widget,
|
|||||||
gint *natural_height)
|
gint *natural_height)
|
||||||
{
|
{
|
||||||
GtkWrapBox *box = GTK_WRAP_BOX (widget);
|
GtkWrapBox *box = GTK_WRAP_BOX (widget);
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
guint border_width;
|
guint border_width;
|
||||||
gint min_item_width, nat_item_width;
|
gint min_item_width, nat_item_width;
|
||||||
gint min_items;
|
gint min_items;
|
||||||
@ -1857,7 +1860,7 @@ gtk_wrap_box_get_width_for_height (GtkSizeRequest *widget,
|
|||||||
gint *natural_width)
|
gint *natural_width)
|
||||||
{
|
{
|
||||||
GtkWrapBox *box = GTK_WRAP_BOX (widget);
|
GtkWrapBox *box = GTK_WRAP_BOX (widget);
|
||||||
GtkWrapBoxPriv *priv = box->priv;
|
GtkWrapBoxPrivate *priv = box->priv;
|
||||||
guint border_width;
|
guint border_width;
|
||||||
gint min_item_height, nat_item_height;
|
gint min_item_height, nat_item_height;
|
||||||
gint min_items;
|
gint min_items;
|
||||||
@ -2057,7 +2060,7 @@ void
|
|||||||
gtk_wrap_box_set_allocation_mode (GtkWrapBox *box,
|
gtk_wrap_box_set_allocation_mode (GtkWrapBox *box,
|
||||||
GtkWrapAllocationMode mode)
|
GtkWrapAllocationMode mode)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv;
|
GtkWrapBoxPrivate *priv;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WRAP_BOX (box));
|
g_return_if_fail (GTK_IS_WRAP_BOX (box));
|
||||||
|
|
||||||
@ -2101,7 +2104,7 @@ void
|
|||||||
gtk_wrap_box_set_spreading (GtkWrapBox *box,
|
gtk_wrap_box_set_spreading (GtkWrapBox *box,
|
||||||
GtkWrapBoxSpreading spreading)
|
GtkWrapBoxSpreading spreading)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv;
|
GtkWrapBoxPrivate *priv;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WRAP_BOX (box));
|
g_return_if_fail (GTK_IS_WRAP_BOX (box));
|
||||||
|
|
||||||
@ -2145,7 +2148,7 @@ void
|
|||||||
gtk_wrap_box_set_vertical_spacing (GtkWrapBox *box,
|
gtk_wrap_box_set_vertical_spacing (GtkWrapBox *box,
|
||||||
guint spacing)
|
guint spacing)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv;
|
GtkWrapBoxPrivate *priv;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WRAP_BOX (box));
|
g_return_if_fail (GTK_IS_WRAP_BOX (box));
|
||||||
|
|
||||||
@ -2188,7 +2191,7 @@ void
|
|||||||
gtk_wrap_box_set_horizontal_spacing (GtkWrapBox *box,
|
gtk_wrap_box_set_horizontal_spacing (GtkWrapBox *box,
|
||||||
guint spacing)
|
guint spacing)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv;
|
GtkWrapBoxPrivate *priv;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WRAP_BOX (box));
|
g_return_if_fail (GTK_IS_WRAP_BOX (box));
|
||||||
|
|
||||||
@ -2232,7 +2235,7 @@ void
|
|||||||
gtk_wrap_box_set_minimum_line_children (GtkWrapBox *box,
|
gtk_wrap_box_set_minimum_line_children (GtkWrapBox *box,
|
||||||
guint n_children)
|
guint n_children)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv;
|
GtkWrapBoxPrivate *priv;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WRAP_BOX (box));
|
g_return_if_fail (GTK_IS_WRAP_BOX (box));
|
||||||
|
|
||||||
@ -2280,7 +2283,7 @@ void
|
|||||||
gtk_wrap_box_set_natural_line_children (GtkWrapBox *box,
|
gtk_wrap_box_set_natural_line_children (GtkWrapBox *box,
|
||||||
guint n_children)
|
guint n_children)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv;
|
GtkWrapBoxPrivate *priv;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_WRAP_BOX (box));
|
g_return_if_fail (GTK_IS_WRAP_BOX (box));
|
||||||
|
|
||||||
@ -2339,7 +2342,7 @@ gtk_wrap_box_insert_child (GtkWrapBox *box,
|
|||||||
gboolean xfill,
|
gboolean xfill,
|
||||||
gboolean yfill)
|
gboolean yfill)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv;
|
GtkWrapBoxPrivate *priv;
|
||||||
GtkWrapBoxChild *child;
|
GtkWrapBoxChild *child;
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
@ -2379,7 +2382,7 @@ gtk_wrap_box_reorder_child (GtkWrapBox *box,
|
|||||||
GtkWidget *widget,
|
GtkWidget *widget,
|
||||||
guint index)
|
guint index)
|
||||||
{
|
{
|
||||||
GtkWrapBoxPriv *priv;
|
GtkWrapBoxPrivate *priv;
|
||||||
GtkWrapBoxChild *child;
|
GtkWrapBoxChild *child;
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ G_BEGIN_DECLS
|
|||||||
#define GTK_WRAP_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_WRAP_BOX, GtkWrapBoxClass))
|
#define GTK_WRAP_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_WRAP_BOX, GtkWrapBoxClass))
|
||||||
|
|
||||||
typedef struct _GtkWrapBox GtkWrapBox;
|
typedef struct _GtkWrapBox GtkWrapBox;
|
||||||
typedef struct _GtkWrapBoxPriv GtkWrapBoxPriv;
|
typedef struct _GtkWrapBoxPrivate GtkWrapBoxPrivate;
|
||||||
typedef struct _GtkWrapBoxClass GtkWrapBoxClass;
|
typedef struct _GtkWrapBoxClass GtkWrapBoxClass;
|
||||||
|
|
||||||
struct _GtkWrapBox
|
struct _GtkWrapBox
|
||||||
@ -44,7 +44,7 @@ struct _GtkWrapBox
|
|||||||
GtkContainer container;
|
GtkContainer container;
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GtkWrapBoxPriv *priv;
|
GtkWrapBoxPrivate *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GtkWrapBoxClass
|
struct _GtkWrapBoxClass
|
||||||
|
Loading…
Reference in New Issue
Block a user