Seal GtkHandleBox
svn path=/trunk/; revision=20601
This commit is contained in:
@@ -1584,6 +1584,7 @@ gtk_gc_release
|
||||
gtk_handle_box_get_handle_position
|
||||
gtk_handle_box_get_shadow_type
|
||||
gtk_handle_box_get_snap_edge
|
||||
gtk_handle_box_get_child_detached
|
||||
gtk_handle_box_get_type G_GNUC_CONST
|
||||
gtk_handle_box_new
|
||||
gtk_handle_box_set_handle_position
|
||||
|
||||
@@ -50,7 +50,8 @@ enum {
|
||||
PROP_SHADOW_TYPE,
|
||||
PROP_HANDLE_POSITION,
|
||||
PROP_SNAP_EDGE,
|
||||
PROP_SNAP_EDGE_SET
|
||||
PROP_SNAP_EDGE_SET,
|
||||
PROP_CHILD_DETACHED
|
||||
};
|
||||
|
||||
#define DRAG_HANDLE_SIZE 10
|
||||
@@ -205,6 +206,14 @@ gtk_handle_box_class_init (GtkHandleBoxClass *class)
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_CHILD_DETACHED,
|
||||
g_param_spec_boolean ("child-detached",
|
||||
P_("Child Detached"),
|
||||
P_("A boolean value indicating whether the handlebox's child is attached or detached."),
|
||||
FALSE,
|
||||
GTK_PARAM_READABLE));
|
||||
|
||||
object_class->destroy = gtk_handle_box_destroy;
|
||||
|
||||
widget_class->map = gtk_handle_box_map;
|
||||
@@ -323,6 +332,9 @@ gtk_handle_box_get_property (GObject *object,
|
||||
case PROP_SNAP_EDGE_SET:
|
||||
g_value_set_boolean (value, handle_box->snap_edge != -1);
|
||||
break;
|
||||
case PROP_CHILD_DETACHED:
|
||||
g_value_set_boolean (value, handle_box->child_detached);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@@ -850,6 +862,24 @@ gtk_handle_box_get_snap_edge (GtkHandleBox *handle_box)
|
||||
return handle_box->snap_edge;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_handle_box_get_child_detached:
|
||||
* @handle_box: a #GtkHandleBox
|
||||
*
|
||||
* Whether the handlebox's child is currently detached.
|
||||
*
|
||||
* Return value: %TRUE if the child is currently detached, otherwise %FALSE
|
||||
*
|
||||
* Since: GSEAL-branch
|
||||
**/
|
||||
gboolean
|
||||
gtk_handle_box_get_child_detached (GtkHandleBox *handle_box)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_HANDLE_BOX (handle_box), FALSE);
|
||||
|
||||
return handle_box->child_detached;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_handle_box_paint (GtkWidget *widget,
|
||||
|
||||
|
||||
@@ -58,23 +58,23 @@ struct _GtkHandleBox
|
||||
{
|
||||
GtkBin bin;
|
||||
|
||||
GdkWindow *bin_window; /* parent window for children */
|
||||
GdkWindow *float_window;
|
||||
GtkShadowType shadow_type;
|
||||
guint handle_position : 2;
|
||||
guint float_window_mapped : 1;
|
||||
guint child_detached : 1;
|
||||
guint in_drag : 1;
|
||||
guint shrink_on_detach : 1;
|
||||
GdkWindow *GSEAL (bin_window); /* parent window for children */
|
||||
GdkWindow *GSEAL (float_window);
|
||||
GtkShadowType GSEAL (shadow_type);
|
||||
guint GSEAL (handle_position : 2);
|
||||
guint GSEAL (float_window_mapped : 1);
|
||||
guint GSEAL (child_detached : 1);
|
||||
guint GSEAL (in_drag : 1);
|
||||
guint GSEAL (shrink_on_detach : 1);
|
||||
|
||||
signed int snap_edge : 3; /* -1 == unset */
|
||||
signed int GSEAL (snap_edge : 3); /* -1 == unset */
|
||||
|
||||
/* Variables used during a drag
|
||||
*/
|
||||
gint deskoff_x, deskoff_y; /* Offset between root relative coordinates
|
||||
gint GSEAL (deskoff_x), GSEAL (deskoff_y); /* Offset between root relative coordinates
|
||||
* and deskrelative coordinates */
|
||||
GtkAllocation attach_allocation;
|
||||
GtkAllocation float_allocation;
|
||||
GtkAllocation GSEAL (attach_allocation);
|
||||
GtkAllocation GSEAL (float_allocation);
|
||||
};
|
||||
|
||||
struct _GtkHandleBoxClass
|
||||
@@ -105,6 +105,7 @@ GtkPositionType gtk_handle_box_get_handle_position(GtkHandleBox *handle_box);
|
||||
void gtk_handle_box_set_snap_edge (GtkHandleBox *handle_box,
|
||||
GtkPositionType edge);
|
||||
GtkPositionType gtk_handle_box_get_snap_edge (GtkHandleBox *handle_box);
|
||||
gboolean gtk_handle_box_get_child_detached (GtkHandleBox *handle_box);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user