[gnome-builder/wip/slaf/colorpicker] gstyle-palette-widget: add dnd-lock property
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/slaf/colorpicker] gstyle-palette-widget: add dnd-lock property
- Date: Thu, 14 Jul 2016 13:39:08 +0000 (UTC)
commit 1d4d6871ac896511c718e9a1c0c22887e6ab7284
Author: Sebastien Lafargue <slafargue gnome org>
Date: Thu Jul 14 15:30:53 2016 +0200
gstyle-palette-widget: add dnd-lock property
The dnd-lock property allow to restrict drag and/or drop
operations on the palette widget:
GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_NONE: no restrictions
GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DRAG: drag restriction
GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DROP: drop restriction
GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_ALL: drag and drop restrictions
Corresponding getter/setter:
gstyle_palette_widget_set_dnd_lock
gstyle_palette_widget_get_dnd_lock
contrib/gstyle/gstyle-color-widget.c | 119 ++++++++++++++++++--------
contrib/gstyle/gstyle-palette-widget.c | 147 ++++++++++++++++++++++++-------
contrib/gstyle/gstyle-palette-widget.h | 73 ++++++++++------
3 files changed, 242 insertions(+), 97 deletions(-)
---
diff --git a/contrib/gstyle/gstyle-color-widget.c b/contrib/gstyle/gstyle-color-widget.c
index 1cca1a8..2d530f8 100644
--- a/contrib/gstyle/gstyle-color-widget.c
+++ b/contrib/gstyle/gstyle-color-widget.c
@@ -49,6 +49,7 @@ struct _GstyleColorWidget
gboolean is_on_drag;
GtkGesture *drag_gesture;
+ GtkGesture *multipress_gesture;
GstylePaletteWidgetViewMode container_view_mode;
GstyleColorWidgetDndLockFlags dnd_lock : 4;
@@ -113,6 +114,70 @@ is_in_drop_zone (GstyleColorWidget *self,
return (start_limit < dest_ref && dest_ref < stop_limit);
}
+static GstylePaletteWidgetDndLockFlags
+get_palette_widget_dnd_lock (GstyleColorWidget *self)
+{
+ GtkWidget *palette_widget;
+
+ g_assert (GSTYLE_IS_COLOR_WIDGET (self));
+
+ palette_widget = gtk_widget_get_ancestor (GTK_WIDGET (self), GSTYLE_TYPE_PALETTE_WIDGET);
+ if (palette_widget != NULL)
+ return gstyle_palette_widget_get_dnd_lock (GSTYLE_PALETTE_WIDGET (palette_widget));
+ else
+ return GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_NONE;
+}
+
+static void
+gstyle_color_widget_drag_gesture_update (GtkGestureDrag *gesture,
+ gdouble offset_x,
+ gdouble offset_y,
+ GstyleColorWidget *self)
+{
+ GdkDragContext *context;
+ GdkEventSequence *sequence;
+ const GdkEvent *event;
+ gdouble start_x, start_y;
+ GtkAllocation allocation;
+ GstylePaletteWidgetDndLockFlags dnd_lock;
+ gint button;
+
+ g_assert (GTK_IS_GESTURE (gesture));
+ g_assert (GSTYLE_IS_COLOR_WIDGET (self));
+
+ dnd_lock = get_palette_widget_dnd_lock (self);
+ if ((dnd_lock & GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DRAG) != 0)
+ return;
+
+ button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
+ if (!gtk_drag_check_threshold (GTK_WIDGET (self), 0, 0, offset_x, offset_y) ||
+ button != GDK_BUTTON_PRIMARY)
+ return;
+
+ gtk_widget_get_allocation (GTK_WIDGET (self), &allocation);
+ self->dnd_color_widget = gstyle_color_widget_copy (self);
+ self->dnd_window = gtk_window_new (GTK_WINDOW_POPUP);
+
+ gtk_widget_set_size_request (self->dnd_window, allocation.width, allocation.height);
+ gtk_window_set_screen (GTK_WINDOW (self->dnd_window), gtk_widget_get_screen (GTK_WIDGET (self)));
+
+ gtk_container_add (GTK_CONTAINER (self->dnd_window), GTK_WIDGET (self->dnd_color_widget));
+ gtk_widget_show_all (self->dnd_window);
+ gtk_widget_set_opacity (self->dnd_window, GSTYLE_COLOR_WIDGET_DRAG_ICON_OPACITY);
+
+ sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
+ gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture), &start_x, &start_y);
+ event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
+ context = gtk_drag_begin_with_coordinates (GTK_WIDGET (self),
+ self->target_list,
+ GDK_ACTION_COPY,
+ button,
+ (GdkEvent*)event,
+ start_x, start_y);
+
+ gtk_drag_set_icon_widget (context, self->dnd_window, 0, 0);
+}
+
static gboolean
gstyle_color_widget_on_drag_motion (GtkWidget *widget,
GdkDragContext *context,
@@ -121,16 +186,24 @@ gstyle_color_widget_on_drag_motion (GtkWidget *widget,
guint time)
{
GstyleColorWidget *self = (GstyleColorWidget *)widget;
+ GstylePaletteWidgetDndLockFlags dnd_lock;
GdkAtom target;
g_assert (GSTYLE_IS_COLOR_WIDGET (self));
g_assert (GDK_IS_DRAG_CONTEXT (context));
target = gtk_drag_dest_find_target (widget, context, NULL);
+ dnd_lock = get_palette_widget_dnd_lock (self);
+ if ((dnd_lock & GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DRAG) != 0)
+ {
+ gdk_drag_status (context, 0, time);
+ return FALSE;
+ }
if ((target == gdk_atom_intern_static_string ("GSTYLE_COLOR_WIDGET") ||
target == gdk_atom_intern_static_string ("application/x-color") ||
gtk_targets_include_text (&target, 1)) &&
+ (dnd_lock & GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DROP) == 0 &&
is_in_drop_zone (self, x, y))
{
gtk_drag_highlight (widget);
@@ -291,30 +364,6 @@ failed:
gtk_drag_finish (context, FALSE, FALSE, time);
}
-static void
-gstyle_color_widget_on_drag_begin (GtkWidget *widget,
- GdkDragContext *context)
-{
- GstyleColorWidget *self = (GstyleColorWidget *)widget;
- GtkAllocation allocation;
-
- g_assert (GSTYLE_IS_COLOR_WIDGET (self));
- g_assert (GDK_IS_DRAG_CONTEXT (context));
-
- gtk_widget_get_allocation (GTK_WIDGET (widget), &allocation);
- self->dnd_color_widget = gstyle_color_widget_copy (GSTYLE_COLOR_WIDGET (widget));
- self->dnd_window = gtk_window_new (GTK_WINDOW_POPUP);
-
- gtk_widget_set_size_request (self->dnd_window, allocation.width, allocation.height);
- gtk_window_set_screen (GTK_WINDOW (self->dnd_window), gtk_widget_get_screen (widget));
-
- gtk_container_add (GTK_CONTAINER (self->dnd_window), GTK_WIDGET (self->dnd_color_widget));
- gtk_widget_show_all (self->dnd_window);
- gtk_widget_set_opacity (self->dnd_window, GSTYLE_COLOR_WIDGET_DRAG_ICON_OPACITY);
-
- gtk_drag_set_icon_widget (context, self->dnd_window, 0, 0);
-}
-
/* The multi-press gesture used by the flowbox to select a child
* forbid us to use dnd so we need to catch it here and select yourself
* the child
@@ -330,7 +379,6 @@ gstyle_color_widget_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
GtkWidget *child;
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
-
child = gtk_widget_get_parent (GTK_WIDGET (self));
if (child != NULL)
{
@@ -1019,6 +1067,9 @@ gstyle_color_widget_finalize (GObject *object)
if (self->color)
gstyle_color_widget_disconnect_color (self);
+ g_clear_object (&self->multipress_gesture);
+ g_clear_object (&self->drag_gesture);
+
g_clear_object (&self->dnd_window);
g_clear_object (&self->color);
g_clear_object (&self->default_provider);
@@ -1116,7 +1167,6 @@ gstyle_color_widget_class_init (GstyleColorWidgetClass *klass)
widget_class->hierarchy_changed = gstyle_color_widget_hierarchy_changed;
widget_class->draw = gstyle_color_widget_draw;
- widget_class->drag_begin = gstyle_color_widget_on_drag_begin;
widget_class->drag_end = gstyle_color_widget_on_drag_end;
widget_class->drag_failed = gstyle_color_widget_on_drag_failed;
widget_class->drag_data_get = gstyle_color_widget_on_drag_data_get;
@@ -1207,23 +1257,22 @@ gstyle_color_widget_init (GstyleColorWidget *self)
self->target_list = gtk_target_list_new (dnd_targets, G_N_ELEMENTS (dnd_targets));
gtk_target_list_add_text_targets (self->target_list, 0);
- gtk_drag_source_set (widget, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
- gtk_drag_source_set_target_list (widget, self->target_list);
-
gtk_drag_dest_set (widget, 0, NULL, 0, GDK_ACTION_COPY);
gtk_drag_dest_set_target_list (widget, self->target_list);
gtk_drag_dest_set_track_motion (GTK_WIDGET (self), TRUE);
update_container_parent_informations (self);
- self->drag_gesture = gtk_gesture_multi_press_new (widget);
- gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (self->drag_gesture),
- GDK_BUTTON_PRIMARY);
- gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (self->drag_gesture),
+ self->multipress_gesture = gtk_gesture_multi_press_new (widget);
+ gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (self->multipress_gesture), GDK_BUTTON_PRIMARY);
+ gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (self->multipress_gesture),
GTK_PHASE_BUBBLE);
-
- g_signal_connect (self->drag_gesture, "pressed",
+ g_signal_connect (self->multipress_gesture, "pressed",
G_CALLBACK (gstyle_color_widget_multipress_gesture_pressed), widget);
+
+ self->drag_gesture = gtk_gesture_drag_new (GTK_WIDGET (self));
+ g_signal_connect (self->drag_gesture, "drag-update",
+ G_CALLBACK (gstyle_color_widget_drag_gesture_update), self);
}
GType
diff --git a/contrib/gstyle/gstyle-palette-widget.c b/contrib/gstyle/gstyle-palette-widget.c
index 4f621f2..8f7742a 100644
--- a/contrib/gstyle/gstyle-palette-widget.c
+++ b/contrib/gstyle/gstyle-palette-widget.c
@@ -38,33 +38,34 @@
struct _GstylePaletteWidget
{
- GtkBin parent_instance;
-
- GstyleCssProvider *default_provider;
- GListStore *palettes;
- GstylePalette *selected_palette;
-
- GtkWidget *placeholder_box;
- GtkWidget *placeholder;
- GtkStack *view_stack;
- GtkWidget *listbox;
- GtkWidget *flowbox;
-
- GstyleColor *dnd_color;
- gint dnd_child_index;
- GdkPoint dnd_last_pos;
- guint dnd_last_time;
- gdouble dnd_speed;
- gboolean is_on_drag;
-
- GstylePaletteWidgetViewMode view_mode;
- GstylePaletteWidgetSortMode sort_mode;
-
- guint current_has_load : 1;
- guint current_has_save : 1;
-
- guint dnd_draw_highlight : 1;
- guint is_dnd_at_end : 1;
+ GtkBin parent_instance;
+
+ GstyleCssProvider *default_provider;
+ GListStore *palettes;
+ GstylePalette *selected_palette;
+
+ GtkWidget *placeholder_box;
+ GtkWidget *placeholder;
+ GtkStack *view_stack;
+ GtkWidget *listbox;
+ GtkWidget *flowbox;
+
+ GstyleColor *dnd_color;
+ gint dnd_child_index;
+ GdkPoint dnd_last_pos;
+ guint dnd_last_time;
+ gdouble dnd_speed;
+ gboolean is_on_drag;
+
+ GstylePaletteWidgetViewMode view_mode;
+ GstylePaletteWidgetSortMode sort_mode;
+
+ GstylePaletteWidgetDndLockFlags dnd_lock : 2;
+ guint current_has_load : 1;
+ guint current_has_save : 1;
+
+ guint dnd_draw_highlight : 1;
+ guint is_dnd_at_end : 1;
};
G_DEFINE_TYPE (GstylePaletteWidget, gstyle_palette_widget, GTK_TYPE_BIN)
@@ -76,6 +77,7 @@ static guint unsaved_palette_count = 0;
enum {
PROP_0,
+ PROP_DND_LOCK,
PROP_PLACEHOLDER,
PROP_SELECTED_PALETTE_ID,
PROP_VIEW_MODE,
@@ -340,7 +342,8 @@ gstyle_palette_widget_on_drag_motion (GtkWidget *widget,
g_assert (GDK_IS_DRAG_CONTEXT (context));
target = gtk_drag_dest_find_target (widget, context, NULL);
- if (target != gdk_atom_intern_static_string ("GSTYLE_COLOR_WIDGET"))
+ if (target != gdk_atom_intern_static_string ("GSTYLE_COLOR_WIDGET") ||
+ (self->dnd_lock & GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DROP) != 0)
{
dnd_highlight_set_from_cursor (self, -1, -1);
gdk_drag_status (context, 0, time);
@@ -385,14 +388,15 @@ gstyle_palette_widget_on_drag_drop (GtkWidget *widget,
g_assert (GDK_IS_DRAG_CONTEXT (context));
target = gtk_drag_dest_find_target (widget, context, NULL);
- if (target == gdk_atom_intern_static_string ("GSTYLE_COLOR_WIDGET"))
+ if (target != gdk_atom_intern_static_string ("GSTYLE_COLOR_WIDGET") ||
+ (self->dnd_lock & GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DROP) != 0)
{
- gtk_drag_get_data (widget, context, target, time);
- return TRUE;
+ dnd_highlight_set_from_cursor (self, -1, -1);
+ return FALSE;
}
- dnd_highlight_set_from_cursor (self, -1, -1);
- return FALSE;
+ gtk_drag_get_data (widget, context, target, time);
+ return TRUE;
}
static void
@@ -1042,6 +1046,44 @@ gstyle_palette_widget_get_view_mode (GstylePaletteWidget *self)
}
/**
+ * gstyle_palette_widget_set_dnd_lock:
+ * @self: A #GstylePaletteWidget
+ * @flags: One or more #GstylePaletteWidgetDndLockFlags
+ *
+ * Sets the dnd lock flags of the palette widget.
+ *
+ */
+void
+gstyle_palette_widget_set_dnd_lock (GstylePaletteWidget *self,
+ GstylePaletteWidgetDndLockFlags flags)
+{
+ g_return_if_fail (GSTYLE_IS_PALETTE_WIDGET (self));
+
+ if (self->dnd_lock != flags)
+ {
+ self->dnd_lock = flags;
+ g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_DND_LOCK]);
+ }
+}
+
+/**
+ * gstyle_palette_widget_get_dnd_lock:
+ * @self: A #GstylePaletteWidget
+ *
+ * Get the dnd lock flags of the palette widget.
+ *
+ * Returns: The #GstylePaletteWidgetDndLockFlags.
+ *
+ */
+GstylePaletteWidgetDndLockFlags
+gstyle_palette_widget_get_dnd_lock (GstylePaletteWidget *self)
+{
+ g_return_val_if_fail (GSTYLE_IS_PALETTE_WIDGET (self), GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_NONE);
+
+ return self->dnd_lock;
+}
+
+/**
* gstyle_palette_widget_set_sort_mode:
* @self: A #GstylePaletteWidget
* @mode: A #GstylePaletteWidgetViewMode
@@ -1200,6 +1242,10 @@ gstyle_palette_widget_get_property (GObject *object,
switch (prop_id)
{
+ case PROP_DND_LOCK:
+ g_value_set_flags (value, gstyle_palette_widget_get_dnd_lock(self));
+ break;
+
case PROP_PLACEHOLDER:
g_value_set_object (value, gstyle_palette_widget_get_placeholder (self));
break;
@@ -1231,6 +1277,10 @@ gstyle_palette_widget_set_property (GObject *object,
switch (prop_id)
{
+ case PROP_DND_LOCK:
+ gstyle_palette_widget_set_dnd_lock (self, g_value_get_flags (value));
+ break;
+
case PROP_PLACEHOLDER:
gstyle_palette_widget_set_placeholder (self, g_value_get_object (value));
break;
@@ -1274,6 +1324,14 @@ gstyle_palette_widget_class_init (GstylePaletteWidgetClass *klass)
gtk_widget_class_bind_template_child (widget_class, GstylePaletteWidget, listbox);
gtk_widget_class_bind_template_child (widget_class, GstylePaletteWidget, flowbox);
+ properties [PROP_DND_LOCK] =
+ g_param_spec_flags ("dnd-lock",
+ "dnd-lock",
+ "Dnd lockability",
+ GSTYLE_TYPE_PALETTE_WIDGET_DND_LOCK_FLAGS,
+ GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_NONE,
+ (G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
properties [PROP_PLACEHOLDER] =
g_param_spec_object ("placeholder",
"placeholder",
@@ -1452,3 +1510,26 @@ gstyle_palette_widget_sort_mode_get_type (void)
return sort_mode_type_id;
}
+
+GType
+gstyle_palette_widget_dnd_lock_flags_get_type (void)
+{
+ static GType type_id;
+ static const GFlagsValue values[] = {
+ { GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_NONE, "GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_NONE", "none" },
+ { GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DRAG, "GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DRAG", "drag" },
+ { GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DROP, "GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DROP", "drop" },
+ { GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_ALL, "GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_ALL", "all" },
+ { 0 }
+ };
+
+ if (g_once_init_enter (&type_id))
+ {
+ GType _type_id;
+
+ _type_id = g_flags_register_static ("GstylePaletteWidgetDndLockFlags", values);
+ g_once_init_leave (&type_id, _type_id);
+ }
+
+ return type_id;
+}
diff --git a/contrib/gstyle/gstyle-palette-widget.h b/contrib/gstyle/gstyle-palette-widget.h
index 177880b..f27a7b7 100644
--- a/contrib/gstyle/gstyle-palette-widget.h
+++ b/contrib/gstyle/gstyle-palette-widget.h
@@ -28,6 +28,7 @@
G_BEGIN_DECLS
#define GSTYLE_TYPE_PALETTE_WIDGET (gstyle_palette_widget_get_type())
+#define GSTYLE_TYPE_PALETTE_WIDGET_DND_LOCK_FLAGS (gstyle_palette_widget_dnd_lock_flags_get_type ())
#define GSTYLE_TYPE_PALETTE_WIDGET_VIEW_MODE (gstyle_palette_widget_view_mode_get_type())
#define GSTYLE_TYPE_PALETTE_WIDGET_SORT_MODE (gstyle_palette_widget_sort_mode_get_type())
@@ -35,6 +36,16 @@ G_DECLARE_FINAL_TYPE (GstylePaletteWidget, gstyle_palette_widget, GSTYLE, PALETT
typedef enum
{
+ GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_NONE = 0,
+ GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DRAG = 1 << 0,
+ GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DROP = 2 << 0,
+ GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_ALL =
+ (GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DRAG |
+ GSTYLE_PALETTE_WIDGET_DND_LOCK_FLAGS_DROP)
+} GstylePaletteWidgetDndLockFlags;
+
+typedef enum
+{
GSTYLE_PALETTE_WIDGET_VIEW_MODE_LIST,
GSTYLE_PALETTE_WIDGET_VIEW_MODE_SWATCHS
} GstylePaletteWidgetViewMode;
@@ -46,36 +57,40 @@ typedef enum
GSTYLE_PALETTE_WIDGET_SORT_MODE_APPROCHING
} GstylePaletteWidgetSortMode;
-GType gstyle_palette_widget_view_mode_get_type (void);
-GType gstyle_palette_widget_sort_mode_get_type (void);
+GType gstyle_palette_widget_dnd_lock_flags_get_type (void);
+GType gstyle_palette_widget_view_mode_get_type (void);
+GType gstyle_palette_widget_sort_mode_get_type (void);
-gboolean gstyle_palette_widget_add (GstylePaletteWidget
*self,
- GstylePalette
*palette);
-GList *gstyle_palette_widget_get_list (GstylePaletteWidget
*self);
-gint gstyle_palette_widget_get_n_palettes (GstylePaletteWidget
*self);
-GstylePalette *gstyle_palette_widget_get_palette_at_index (GstylePaletteWidget
*self,
- guint
index);
-GstylePalette *gstyle_palette_widget_get_palette_by_id (GstylePaletteWidget
*self,
- const gchar
*id);
-GtkWidget *gstyle_palette_widget_get_placeholder (GstylePaletteWidget
*self);
-GstylePalette *gstyle_palette_widget_get_selected_palette (GstylePaletteWidget
*self);
-GstylePaletteWidgetSortMode gstyle_palette_widget_get_sort_mode (GstylePaletteWidget
*self);
-GListStore *gstyle_palette_widget_get_store (GstylePaletteWidget
*self);
-GstylePaletteWidgetViewMode gstyle_palette_widget_get_view_mode (GstylePaletteWidget
*self);
-gboolean gstyle_palette_widget_remove (GstylePaletteWidget
*self,
- GstylePalette
*palette);
-void gstyle_palette_widget_remove_all (GstylePaletteWidget
*self);
-gboolean gstyle_palette_widget_remove_by_id (GstylePaletteWidget
*self,
- const gchar
*id);
-void gstyle_palette_widget_set_placeholder (GstylePaletteWidget
*self,
- GtkWidget
*placeholder);
-void gstyle_palette_widget_set_sort_mode (GstylePaletteWidget
*self,
- GstylePaletteWidgetSortMode
mode);
-void gstyle_palette_widget_set_view_mode (GstylePaletteWidget
*self,
- GstylePaletteWidgetViewMode
mode);
-gboolean gstyle_palette_widget_show_palette (GstylePaletteWidget
*self,
- GstylePalette
*palette);
-GstylePaletteWidget *gstyle_palette_widget_new (void);
+gboolean gstyle_palette_widget_add (GstylePaletteWidget
*self,
+ GstylePalette
*palette);
+GstylePaletteWidgetDndLockFlags gstyle_palette_widget_get_dnd_lock (GstylePaletteWidget
*self);
+GList *gstyle_palette_widget_get_list (GstylePaletteWidget
*self);
+gint gstyle_palette_widget_get_n_palettes (GstylePaletteWidget
*self);
+GstylePalette *gstyle_palette_widget_get_palette_at_index (GstylePaletteWidget
*self,
+ guint
index);
+GstylePalette *gstyle_palette_widget_get_palette_by_id (GstylePaletteWidget
*self,
+ const gchar
*id);
+GtkWidget *gstyle_palette_widget_get_placeholder (GstylePaletteWidget
*self);
+GstylePalette *gstyle_palette_widget_get_selected_palette (GstylePaletteWidget
*self);
+GstylePaletteWidgetSortMode gstyle_palette_widget_get_sort_mode (GstylePaletteWidget
*self);
+GListStore *gstyle_palette_widget_get_store (GstylePaletteWidget
*self);
+GstylePaletteWidgetViewMode gstyle_palette_widget_get_view_mode (GstylePaletteWidget
*self);
+gboolean gstyle_palette_widget_remove (GstylePaletteWidget
*self,
+ GstylePalette
*palette);
+void gstyle_palette_widget_remove_all (GstylePaletteWidget
*self);
+gboolean gstyle_palette_widget_remove_by_id (GstylePaletteWidget
*self,
+ const gchar
*id);
+void gstyle_palette_widget_set_dnd_lock (GstylePaletteWidget
*self,
+
GstylePaletteWidgetDndLockFlags flags);
+void gstyle_palette_widget_set_placeholder (GstylePaletteWidget
*self,
+ GtkWidget
*placeholder);
+void gstyle_palette_widget_set_sort_mode (GstylePaletteWidget
*self,
+
GstylePaletteWidgetSortMode mode);
+void gstyle_palette_widget_set_view_mode (GstylePaletteWidget
*self,
+
GstylePaletteWidgetViewMode mode);
+gboolean gstyle_palette_widget_show_palette (GstylePaletteWidget
*self,
+ GstylePalette
*palette);
+GstylePaletteWidget *gstyle_palette_widget_new (void);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]