diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-05-20 07:50:38 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-05-20 09:54:01 -0400 |
commit | 04192d04a2b74ef90a7dba2104f239b55fc6ac47 (patch) | |
tree | 6241b58f45cc1eb2f8286647c282590f27f991b1 /gtk/gtkbindings.c | |
parent | e5a1734ce99a51b7317fde7a3b56bb92b2fa997f (diff) | |
download | gtk+-04192d04a2b74ef90a7dba2104f239b55fc6ac47.tar.gz |
docs: enum cleanup
Move types that are only used in binding parsing to
gtkrc, together with the deprecated api.
Diffstat (limited to 'gtk/gtkbindings.c')
-rw-r--r-- | gtk/gtkbindings.c | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c index 11ce5d3813..f2f9c01578 100644 --- a/gtk/gtkbindings.c +++ b/gtk/gtkbindings.c @@ -143,13 +143,6 @@ GType gtk_identifier_get_type (void) G_GNUC_CONST; /* --- structures --- */ -typedef struct { - GtkPathType type; - GPatternSpec *pspec; - gpointer user_data; - guint seq_id; -} PatternSpec; - typedef enum { GTK_BINDING_TOKEN_BIND, GTK_BINDING_TOKEN_UNBIND @@ -178,14 +171,6 @@ gtk_identifier_get_type (void) return our_type; } -static void -pattern_spec_free (PatternSpec *pspec) -{ - if (pspec->pspec) - g_pattern_spec_free (pspec->pspec); - g_free (pspec); -} - static GtkBindingSignal* binding_signal_new (const gchar *signal_name, guint n_args) @@ -1401,92 +1386,6 @@ gtk_binding_entry_add_signal_from_string (GtkBindingSet *binding_set, return ret; } -/** - * gtk_binding_set_add_path: - * @binding_set: a #GtkBindingSet to add a path to - * @path_type: path type the pattern applies to - * @path_pattern: the actual match pattern - * @priority: binding priority - * - * This function was used internally by the GtkRC parsing mechanism - * to assign match patterns to #GtkBindingSet structures. - * - * In GTK+ 3, these match patterns are unused. - * - * Deprecated: 3.0 - */ -void -gtk_binding_set_add_path (GtkBindingSet *binding_set, - GtkPathType path_type, - const gchar *path_pattern, - GtkPathPriorityType priority) -{ - PatternSpec *pspec; - GSList **slist_p, *slist; - static guint seq_id = 0; - - g_return_if_fail (binding_set != NULL); - g_return_if_fail (path_pattern != NULL); - g_return_if_fail (priority <= GTK_PATH_PRIO_MASK); - - priority &= GTK_PATH_PRIO_MASK; - - switch (path_type) - { - case GTK_PATH_WIDGET: - slist_p = &binding_set->widget_path_pspecs; - break; - case GTK_PATH_WIDGET_CLASS: - slist_p = &binding_set->widget_class_pspecs; - break; - case GTK_PATH_CLASS: - slist_p = &binding_set->class_branch_pspecs; - break; - default: - g_assert_not_reached (); - slist_p = NULL; - break; - } - - pspec = g_new (PatternSpec, 1); - pspec->type = path_type; - if (path_type == GTK_PATH_WIDGET_CLASS) - pspec->pspec = NULL; - else - pspec->pspec = g_pattern_spec_new (path_pattern); - - pspec->seq_id = priority << 28; - pspec->user_data = binding_set; - - slist = *slist_p; - while (slist) - { - PatternSpec *tmp_pspec; - - tmp_pspec = slist->data; - slist = slist->next; - - if (g_pattern_spec_equal (tmp_pspec->pspec, pspec->pspec)) - { - GtkPathPriorityType lprio = tmp_pspec->seq_id >> 28; - - pattern_spec_free (pspec); - pspec = NULL; - if (lprio < priority) - { - tmp_pspec->seq_id &= 0x0fffffff; - tmp_pspec->seq_id |= priority << 28; - } - break; - } - } - if (pspec) - { - pspec->seq_id |= seq_id++ & 0x0fffffff; - *slist_p = g_slist_prepend (*slist_p, pspec); - } -} - static gint find_entry_with_binding (GtkBindingEntry *entry, GtkBindingSet *binding_set) |