Commit 6c49cd0e authored by Ryan Lortie's avatar Ryan Lortie Committed by Jasper St. Pierre

action stuff: stop abusing GLib's namespace

Rename our internal GActionMuxer, GActionObserver and GActionObservable
classes and interfaces to have names in our own namespace.

These classes were originally intended for GIO but turned out to be too
special-purpose to be useful there, so we never made them public API but
have just been copying them around (without bothering to properly rename
them).  Now that other people will be copying them out of Gtk, it's even
more important to prevent this namespace abuse from spreading further.
parent 58481ffa
......@@ -21,9 +21,9 @@ CFILE_GLOB=$(top_srcdir)/gtk/*.c
# Header files to ignore when scanning
IGNORE_HFILES= \
fnmatch.h \
gactionmuxer.h \
gactionobserver.h \
gactionobservable.h \
gtkactionmuxer.h \
gtkactionobserver.h \
gtkactionobservable.h \
gtk9slice.h \
gtkanimationdescription.h \
gtkdebug.h \
......
......@@ -402,9 +402,9 @@ gtk_private_type_h_sources = \
# GTK+ header files that don't get installed
gtk_private_h_sources = \
gactionmuxer.h \
gactionobserver.h \
gactionobservable.h \
gtkactionmuxer.h \
gtkactionobserver.h \
gtkactionobservable.h \
gtkapplicationprivate.h \
gtkaccelgroupprivate.h \
gtkaccelmapprivate.h \
......@@ -584,9 +584,9 @@ deprecated_c_sources = \
gtk_base_c_sources = \
$(deprecated_c_sources) \
gactionmuxer.c \
gactionobserver.c \
gactionobservable.c \
gtkactionmuxer.c \
gtkactionobserver.c \
gtkactionobservable.c \
gtkactionable.c \
gtkquery.c \
gtksearchentry.c \
......
......@@ -18,7 +18,7 @@
*/
#include "gtkactionhelper.h"
#include "gactionobservable.h"
#include "gtkactionobservable.h"
#include "gtkwidget.h"
#include "gtkwidgetprivate.h"
......@@ -57,7 +57,7 @@ struct _GtkActionHelper
GtkActionHelperGroup *group;
GActionMuxer *action_context;
GtkActionMuxer *action_context;
gchar *action_name;
GVariant *target;
......@@ -81,10 +81,10 @@ enum
static GParamSpec *gtk_action_helper_pspecs[N_PROPS];
static void gtk_action_helper_observer_iface_init (GActionObserverInterface *iface);
static void gtk_action_helper_observer_iface_init (GtkActionObserverInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkActionHelper, gtk_action_helper, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (G_TYPE_ACTION_OBSERVER, gtk_action_helper_observer_iface_init))
G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTION_OBSERVER, gtk_action_helper_observer_iface_init))
static void
gtk_action_helper_report_change (GtkActionHelper *helper,
......@@ -288,38 +288,38 @@ gtk_action_helper_finalize (GObject *object)
}
static void
gtk_action_helper_observer_action_added (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name,
const GVariantType *parameter_type,
gboolean enabled,
GVariant *state)
gtk_action_helper_observer_action_added (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name,
const GVariantType *parameter_type,
gboolean enabled,
GVariant *state)
{
gtk_action_helper_action_added (GTK_ACTION_HELPER (observer), enabled, parameter_type, state, TRUE);
}
static void
gtk_action_helper_observer_action_enabled_changed (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name,
gboolean enabled)
gtk_action_helper_observer_action_enabled_changed (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name,
gboolean enabled)
{
gtk_action_helper_action_enabled_changed (GTK_ACTION_HELPER (observer), enabled);
}
static void
gtk_action_helper_observer_action_state_changed (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name,
GVariant *state)
gtk_action_helper_observer_action_state_changed (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name,
GVariant *state)
{
gtk_action_helper_action_state_changed (GTK_ACTION_HELPER (observer), state);
}
static void
gtk_action_helper_observer_action_removed (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name)
gtk_action_helper_observer_action_removed (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name)
{
gtk_action_helper_action_removed (GTK_ACTION_HELPER (observer));
}
......@@ -345,7 +345,7 @@ gtk_action_helper_class_init (GtkActionHelperClass *class)
}
static void
gtk_action_helper_observer_iface_init (GActionObserverInterface *iface)
gtk_action_helper_observer_iface_init (GtkActionObserverInterface *iface)
{
iface->action_added = gtk_action_helper_observer_action_added;
iface->action_enabled_changed = gtk_action_helper_observer_action_enabled_changed;
......@@ -401,7 +401,7 @@ gtk_action_helper_active_window_changed (GObject *object,
gpointer user_data)
{
GtkActionHelper *helper = user_data;
GActionMuxer *parent;
GtkActionMuxer *parent;
if (helper->widget)
g_object_unref (helper->widget);
......@@ -415,11 +415,11 @@ gtk_action_helper_active_window_changed (GObject *object,
}
else
{
parent = g_action_muxer_new ();
g_action_muxer_insert (parent, "app", G_ACTION_GROUP (helper->application));
parent = gtk_action_muxer_new ();
gtk_action_muxer_insert (parent, "app", G_ACTION_GROUP (helper->application));
}
g_action_muxer_set_parent (helper->action_context, parent);
gtk_action_muxer_set_parent (helper->action_context, parent);
g_object_unref (parent);
}
......@@ -433,7 +433,7 @@ gtk_action_helper_new_with_application (GtkApplication *application)
helper = g_object_new (GTK_TYPE_ACTION_HELPER, NULL);
helper->application = g_object_ref (application);
helper->action_context = g_action_muxer_new ();
helper->action_context = gtk_action_muxer_new ();
g_signal_connect (application, "notify::active-window", G_CALLBACK (gtk_action_helper_active_window_changed), helper);
gtk_action_helper_active_window_changed (NULL, NULL, helper);
......@@ -455,17 +455,17 @@ gtk_action_helper_set_action_name (GtkActionHelper *helper,
if (helper->action_name)
{
g_action_observable_unregister_observer (G_ACTION_OBSERVABLE (helper->action_context),
helper->action_name,
G_ACTION_OBSERVER (helper));
gtk_action_observable_unregister_observer (GTK_ACTION_OBSERVABLE (helper->action_context),
helper->action_name,
GTK_ACTION_OBSERVER (helper));
g_free (helper->action_name);
}
helper->action_name = g_strdup (action_name);
g_action_observable_register_observer (G_ACTION_OBSERVABLE (helper->action_context),
helper->action_name,
G_ACTION_OBSERVER (helper));
gtk_action_observable_register_observer (GTK_ACTION_OBSERVABLE (helper->action_context),
helper->action_name,
GTK_ACTION_OBSERVER (helper));
/* Start by recording the current state of our properties so we know
* what notify signals we will need to send.
......
This diff is collapsed.
......@@ -17,42 +17,42 @@
* Author: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_ACTION_MUXER_H__
#define __G_ACTION_MUXER_H__
#ifndef __GTK_ACTION_MUXER_H__
#define __GTK_ACTION_MUXER_H__
#include <gio/gio.h>
G_BEGIN_DECLS
#define G_TYPE_ACTION_MUXER (g_action_muxer_get_type ())
#define G_ACTION_MUXER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_ACTION_MUXER, GActionMuxer))
#define G_IS_ACTION_MUXER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
G_TYPE_ACTION_MUXER))
#define GTK_TYPE_ACTION_MUXER (gtk_action_muxer_get_type ())
#define GTK_ACTION_MUXER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
GTK_TYPE_ACTION_MUXER, GtkActionMuxer))
#define GTK_IS_ACTION_MUXER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
GTK_TYPE_ACTION_MUXER))
typedef struct _GActionMuxer GActionMuxer;
typedef struct _GtkActionMuxer GtkActionMuxer;
G_GNUC_INTERNAL
GType g_action_muxer_get_type (void);
GType gtk_action_muxer_get_type (void);
G_GNUC_INTERNAL
GActionMuxer * g_action_muxer_new (void);
GtkActionMuxer * gtk_action_muxer_new (void);
G_GNUC_INTERNAL
void g_action_muxer_insert (GActionMuxer *muxer,
const gchar *prefix,
GActionGroup *group);
void gtk_action_muxer_insert (GtkActionMuxer *muxer,
const gchar *prefix,
GActionGroup *group);
G_GNUC_INTERNAL
void g_action_muxer_remove (GActionMuxer *muxer,
const gchar *prefix);
void gtk_action_muxer_remove (GtkActionMuxer *muxer,
const gchar *prefix);
G_GNUC_INTERNAL
GActionMuxer * g_action_muxer_get_parent (GActionMuxer *muxer);
GtkActionMuxer * gtk_action_muxer_get_parent (GtkActionMuxer *muxer);
G_GNUC_INTERNAL
void g_action_muxer_set_parent (GActionMuxer *muxer,
GActionMuxer *parent);
void gtk_action_muxer_set_parent (GtkActionMuxer *muxer,
GtkActionMuxer *parent);
G_END_DECLS
#endif /* __G_ACTION_MUXER_H__ */
#endif /* __GTK_ACTION_MUXER_H__ */
......@@ -19,46 +19,46 @@
#include "config.h"
#include "gactionobservable.h"
#include "gtkactionobservable.h"
G_DEFINE_INTERFACE (GActionObservable, g_action_observable, G_TYPE_OBJECT)
G_DEFINE_INTERFACE (GtkActionObservable, gtk_action_observable, G_TYPE_OBJECT)
/*
* SECTION:gactionobserable
* SECTION:gtkactionobserable
* @short_description: an interface implemented by objects that report
* changes to actions
*/
void
g_action_observable_default_init (GActionObservableInterface *iface)
gtk_action_observable_default_init (GtkActionObservableInterface *iface)
{
}
/*
* g_action_observable_register_observer:
* @observable: a #GActionObservable
* gtk_action_observable_register_observer:
* @observable: a #GtkActionObservable
* @action_name: the name of the action
* @observer: the #GActionObserver to which the events will be reported
* @observer: the #GtkActionObserver to which the events will be reported
*
* Registers @observer as being interested in changes to @action_name on
* @observable.
*/
void
g_action_observable_register_observer (GActionObservable *observable,
const gchar *action_name,
GActionObserver *observer)
gtk_action_observable_register_observer (GtkActionObservable *observable,
const gchar *action_name,
GtkActionObserver *observer)
{
g_return_if_fail (G_IS_ACTION_OBSERVABLE (observable));
g_return_if_fail (GTK_IS_ACTION_OBSERVABLE (observable));
G_ACTION_OBSERVABLE_GET_IFACE (observable)
GTK_ACTION_OBSERVABLE_GET_IFACE (observable)
->register_observer (observable, action_name, observer);
}
/*
* g_action_observable_unregister_observer:
* @observable: a #GActionObservable
* gtk_action_observable_unregister_observer:
* @observable: a #GtkActionObservable
* @action_name: the name of the action
* @observer: the #GActionObserver to which the events will be reported
* @observer: the #GtkActionObserver to which the events will be reported
*
* Removes the registration of @observer as being interested in changes
* to @action_name on @observable.
......@@ -67,12 +67,12 @@ g_action_observable_register_observer (GActionObservable *observable,
* unregistered an equal number of times.
*/
void
g_action_observable_unregister_observer (GActionObservable *observable,
const gchar *action_name,
GActionObserver *observer)
gtk_action_observable_unregister_observer (GtkActionObservable *observable,
const gchar *action_name,
GtkActionObserver *observer)
{
g_return_if_fail (G_IS_ACTION_OBSERVABLE (observable));
g_return_if_fail (GTK_IS_ACTION_OBSERVABLE (observable));
G_ACTION_OBSERVABLE_GET_IFACE (observable)
GTK_ACTION_OBSERVABLE_GET_IFACE (observable)
->unregister_observer (observable, action_name, observer);
}
......@@ -17,46 +17,47 @@
* Authors: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_ACTION_OBSERVABLE_H__
#define __G_ACTION_OBSERVABLE_H__
#ifndef __GTK_ACTION_OBSERVABLE_H__
#define __GTK_ACTION_OBSERVABLE_H__
#include <gtk/gactionobserver.h>
#include <gtk/gtkactionobserver.h>
G_BEGIN_DECLS
#define G_TYPE_ACTION_OBSERVABLE (g_action_observable_get_type ())
#define G_ACTION_OBSERVABLE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_ACTION_OBSERVABLE, GActionObservable))
#define G_IS_ACTION_OBSERVABLE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
G_TYPE_ACTION_OBSERVABLE))
#define G_ACTION_OBSERVABLE_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
G_TYPE_ACTION_OBSERVABLE, GActionObservableInterface))
#define GTK_TYPE_ACTION_OBSERVABLE (gtk_action_observable_get_type ())
#define GTK_ACTION_OBSERVABLE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
GTK_TYPE_ACTION_OBSERVABLE, GtkActionObservable))
#define GTK_IS_ACTION_OBSERVABLE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
GTK_TYPE_ACTION_OBSERVABLE))
#define GTK_ACTION_OBSERVABLE_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
GTK_TYPE_ACTION_OBSERVABLE, \
GtkActionObservableInterface))
typedef struct _GActionObservableInterface GActionObservableInterface;
typedef struct _GtkActionObservableInterface GtkActionObservableInterface;
struct _GActionObservableInterface
struct _GtkActionObservableInterface
{
GTypeInterface g_iface;
void (* register_observer) (GActionObservable *observable,
const gchar *action_name,
GActionObserver *observer);
void (* unregister_observer) (GActionObservable *observable,
const gchar *action_name,
GActionObserver *observer);
void (* register_observer) (GtkActionObservable *observable,
const gchar *action_name,
GtkActionObserver *observer);
void (* unregister_observer) (GtkActionObservable *observable,
const gchar *action_name,
GtkActionObserver *observer);
};
G_GNUC_INTERNAL
GType g_action_observable_get_type (void);
GType gtk_action_observable_get_type (void);
G_GNUC_INTERNAL
void g_action_observable_register_observer (GActionObservable *observable,
const gchar *action_name,
GActionObserver *observer);
void gtk_action_observable_register_observer (GtkActionObservable *observable,
const gchar *action_name,
GtkActionObserver *observer);
G_GNUC_INTERNAL
void g_action_observable_unregister_observer (GActionObservable *observable,
const gchar *action_name,
GActionObserver *observer);
void gtk_action_observable_unregister_observer (GtkActionObservable *observable,
const gchar *action_name,
GtkActionObserver *observer);
G_END_DECLS
#endif /* __G_ACTION_OBSERVABLE_H__ */
#endif /* __GTK_ACTION_OBSERVABLE_H__ */
......@@ -19,16 +19,16 @@
#include "config.h"
#include "gactionobserver.h"
#include "gtkactionobserver.h"
G_DEFINE_INTERFACE (GActionObserver, g_action_observer, G_TYPE_OBJECT)
G_DEFINE_INTERFACE (GtkActionObserver, gtk_action_observer, G_TYPE_OBJECT)
/**
* SECTION:gactionobserver
* SECTION:gtkactionobserver
* @short_description: an interface implemented by objects that are
* interested in monitoring actions for changes
*
* GActionObserver is a simple interface allowing objects that wish to
* GtkActionObserver is a simple interface allowing objects that wish to
* be notified of changes to actions to be notified of those changes.
*
* It is also possible to monitor changes to action groups using
......@@ -50,13 +50,13 @@ G_DEFINE_INTERFACE (GActionObserver, g_action_observer, G_TYPE_OBJECT)
*/
void
g_action_observer_default_init (GActionObserverInterface *class)
gtk_action_observer_default_init (GtkActionObserverInterface *class)
{
}
/*
* g_action_observer_action_added:
* @observer: a #GActionObserver
* gtk_action_observer_action_added:
* @observer: a #GtkActionObserver
* @observable: the source of the event
* @action_name: the name of the action
* @enabled: %TRUE if the action is now enabled
......@@ -72,22 +72,22 @@ g_action_observer_default_init (GActionObserverInterface *class)
* observer has explicitly registered itself to receive events.
*/
void
g_action_observer_action_added (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name,
const GVariantType *parameter_type,
gboolean enabled,
GVariant *state)
gtk_action_observer_action_added (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name,
const GVariantType *parameter_type,
gboolean enabled,
GVariant *state)
{
g_return_if_fail (G_IS_ACTION_OBSERVER (observer));
g_return_if_fail (GTK_IS_ACTION_OBSERVER (observer));
G_ACTION_OBSERVER_GET_IFACE (observer)
GTK_ACTION_OBSERVER_GET_IFACE (observer)
->action_added (observer, observable, action_name, parameter_type, enabled, state);
}
/*
* g_action_observer_action_enabled_changed:
* @observer: a #GActionObserver
* gtk_action_observer_action_enabled_changed:
* @observer: a #GtkActionObserver
* @observable: the source of the event
* @action_name: the name of the action
* @enabled: %TRUE if the action is now enabled
......@@ -99,20 +99,20 @@ g_action_observer_action_added (GActionObserver *observer,
* observer has explicitly registered itself to receive events.
*/
void
g_action_observer_action_enabled_changed (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name,
gboolean enabled)
gtk_action_observer_action_enabled_changed (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name,
gboolean enabled)
{
g_return_if_fail (G_IS_ACTION_OBSERVER (observer));
g_return_if_fail (GTK_IS_ACTION_OBSERVER (observer));
G_ACTION_OBSERVER_GET_IFACE (observer)
GTK_ACTION_OBSERVER_GET_IFACE (observer)
->action_enabled_changed (observer, observable, action_name, enabled);
}
/*
* g_action_observer_action_state_changed:
* @observer: a #GActionObserver
* gtk_action_observer_action_state_changed:
* @observer: a #GtkActionObserver
* @observable: the source of the event
* @action_name: the name of the action
* @state: the new state of the action
......@@ -124,20 +124,20 @@ g_action_observer_action_enabled_changed (GActionObserver *observer,
* observer has explicitly registered itself to receive events.
*/
void
g_action_observer_action_state_changed (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name,
GVariant *state)
gtk_action_observer_action_state_changed (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name,
GVariant *state)
{
g_return_if_fail (G_IS_ACTION_OBSERVER (observer));
g_return_if_fail (GTK_IS_ACTION_OBSERVER (observer));
G_ACTION_OBSERVER_GET_IFACE (observer)
GTK_ACTION_OBSERVER_GET_IFACE (observer)
->action_state_changed (observer, observable, action_name, state);
}
/*
* g_action_observer_action_removed:
* @observer: a #GActionObserver
* gtk_action_observer_action_removed:
* @observer: a #GtkActionObserver
* @observable: the source of the event
* @action_name: the name of the action
*
......@@ -148,12 +148,12 @@ g_action_observer_action_state_changed (GActionObserver *observer,
* observer has explicitly registered itself to receive events.
*/
void
g_action_observer_action_removed (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name)
gtk_action_observer_action_removed (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name)
{
g_return_if_fail (G_IS_ACTION_OBSERVER (observer));
g_return_if_fail (GTK_IS_ACTION_OBSERVER (observer));
G_ACTION_OBSERVER_GET_IFACE (observer)
GTK_ACTION_OBSERVER_GET_IFACE (observer)
->action_removed (observer, observable, action_name);
}
......@@ -17,72 +17,72 @@
* Authors: Ryan Lortie <desrt@desrt.ca>
*/
#ifndef __G_ACTION_OBSERVER_H__
#define __G_ACTION_OBSERVER_H__
#ifndef __GTK_ACTION_OBSERVER_H__
#define __GTK_ACTION_OBSERVER_H__
#include <gio/gio.h>
G_BEGIN_DECLS
#define G_TYPE_ACTION_OBSERVER (g_action_observer_get_type ())
#define G_ACTION_OBSERVER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_ACTION_OBSERVER, GActionObserver))
#define G_IS_ACTION_OBSERVER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
G_TYPE_ACTION_OBSERVER))
#define G_ACTION_OBSERVER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
G_TYPE_ACTION_OBSERVER, GActionObserverInterface))
#define GTK_TYPE_ACTION_OBSERVER (gtk_action_observer_get_type ())
#define GTK_ACTION_OBSERVER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
GTK_TYPE_ACTION_OBSERVER, GtkActionObserver))
#define GTK_IS_ACTION_OBSERVER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
GTK_TYPE_ACTION_OBSERVER))
#define GTK_ACTION_OBSERVER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
GTK_TYPE_ACTION_OBSERVER, GtkActionObserverInterface))
typedef struct _GActionObserverInterface GActionObserverInterface;
typedef struct _GActionObservable GActionObservable;
typedef struct _GActionObserver GActionObserver;
typedef struct _GtkActionObserverInterface GtkActionObserverInterface;
typedef struct _GtkActionObservable GtkActionObservable;
typedef struct _GtkActionObserver GtkActionObserver;
struct _GActionObserverInterface
struct _GtkActionObserverInterface
{
GTypeInterface g_iface;
void (* action_added) (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name,
const GVariantType *parameter_type,
gboolean enabled,
GVariant *state);
void (* action_enabled_changed) (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name,
gboolean enabled);
void (* action_state_changed) (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name,
GVariant *state);
void (* action_removed) (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name);
void (* action_added) (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name,
const GVariantType *parameter_type,
gboolean enabled,
GVariant *state);
void (* action_enabled_changed) (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name,
gboolean enabled);
void (* action_state_changed) (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name,
GVariant *state);
void (* action_removed) (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name);
};
G_GNUC_INTERNAL
GType g_action_observer_get_type (void);
GType gtk_action_observer_get_type (void);
G_GNUC_INTERNAL
void g_action_observer_action_added (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name,
const GVariantType *parameter_type,
gboolean enabled,
GVariant *state);
void gtk_action_observer_action_added (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name,
const GVariantType *parameter_type,
gboolean enabled,
GVariant *state);
G_GNUC_INTERNAL
void g_action_observer_action_enabled_changed (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name,
gboolean enabled);
void gtk_action_observer_action_enabled_changed (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name,
gboolean enabled);
G_GNUC_INTERNAL
void g_action_observer_action_state_changed (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name,
GVariant *state);
void gtk_action_observer_action_state_changed (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name,
GVariant *state);
G_GNUC_INTERNAL
void g_action_observer_action_removed (GActionObserver *observer,
GActionObservable *observable,
const gchar *action_name);
void gtk_action_observer_action_removed (GtkActionObserver *observer,
GtkActionObservable *observable,
const gchar *action_name);
G_END_DECLS
#endif /* __G_ACTION_OBSERVER_H__ */
#endif /* __GTK_ACTION_OBSERVER_H__ */
......@@ -505,7 +505,7 @@ struct _GtkWidgetPrivate
SizeRequestCache requests;
/* actions attached to this or any parent widget */
GActionMuxer *muxer;
GtkActionMuxer *muxer;
/* The widget's window or its parent window if it does
* not have a window. (Which will be indicated by the
......@@ -15351,7 +15351,7 @@ void
_gtk_widget_update_parent_muxer (GtkWidget *widget)
{
GtkWidget *parent;
GActionMuxer *parent_muxer;
GtkActionMuxer *parent_muxer;
if (widget->priv->muxer == NULL)
return;
......@@ -15363,15 +15363,15 @@ _gtk_widget_update_parent_muxer (GtkWidget *widget)
parent_muxer = parent ? _gtk_widget_get_action_muxer (parent) : NULL;
g_action_muxer_set_parent (widget->priv->muxer, parent_muxer);
gtk_action_muxer_set_parent (widget->priv->muxer, parent_muxer);
}
GActionMuxer *
GtkActionMuxer *
_gtk_widget_get_action_muxer (GtkWidget *widget)
{
if (widget->priv->muxer == NULL)
{
widget->priv->muxer = g_action_muxer_new ();
widget->priv->muxer = gtk_action_muxer_new ();
_gtk_widget_update_parent_muxer (widget);
}
......@@ -15396,7 +15396,7 @@ gtk_widget_insert_action_group (GtkWidget *widget,
const gchar *name,
GActionGroup *group)
{
GActionMuxer *muxer;
GtkActionMuxer *muxer;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (name != NULL);
......@@ -15404,9 +15404,9 @@ gtk_widget_insert_action_group (GtkWidget *widget,
muxer = _gtk_widget_get_action_muxer (widget);