diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2020-08-25 16:34:04 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2020-08-25 16:36:08 +0100 |
commit | d58136e23d71236d332eac07986922c96139c744 (patch) | |
tree | 4a9381a8aa7676ff872baae3394a69fff132a961 | |
parent | 256c9c9873b1e12ca76b24d35361b87f61558724 (diff) | |
download | gtk+-d58136e23d71236d332eac07986922c96139c744.tar.gz |
a11y: Simplify the ATContext::state-change signal
We cannot pass all the data we pass to the virtual function, because the
types are private, but the class and the signal are public API.
The signal is just a notification, so we can decouple the virtual
function (which stays the same, for internal types that implement the
ATContext API contract) from the signal.
-rw-r--r-- | gtk/gtkatcontext.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/gtk/gtkatcontext.c b/gtk/gtkatcontext.c index e1e2edd599..6686e3f9a9 100644 --- a/gtk/gtkatcontext.c +++ b/gtk/gtkatcontext.c @@ -175,12 +175,6 @@ gtk_at_context_class_init (GtkATContextClass *klass) /** * GtkATContext::state-change: * @self: the #GtkATContext - * @changed_states: flags for the changed states - * @changed_properties: flags for the changed properties - * @changed_relations: flags for the changed relations - * @states: the new states - * @properties: the new properties - * @relations: the new relations * * Emitted when the attributes of the accessible for the * #GtkATContext instance change. @@ -189,12 +183,10 @@ gtk_at_context_class_init (GtkATContextClass *klass) g_signal_new ("state-change", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (GtkATContextClass, state_change), + 0, NULL, NULL, NULL, - G_TYPE_NONE, 6, - G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, - G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_POINTER); + G_TYPE_NONE, 0); g_object_class_install_properties (gobject_class, N_PROPS, obj_props); } @@ -438,9 +430,10 @@ gtk_at_context_update (GtkATContext *self) GtkAccessibleRelationChange changed_relations = gtk_accessible_attribute_set_get_changed (self->relations); - g_signal_emit (self, obj_signals[STATE_CHANGE], 0, - changed_states, changed_properties, changed_relations, - self->states, self->properties, self->relations); + GTK_AT_CONTEXT_GET_CLASS (self)->state_change (self, + changed_states, changed_properties, changed_relations, + self->states, self->properties, self->relations); + g_signal_emit (self, obj_signals[STATE_CHANGE], 0); self->updated_properties = 0; self->updated_relations = 0; |