Back to index

indicator-appmenu  12.10.0
Functions
gactionobserver.c File Reference
#include "config.h"
#include "gactionobserver.h"

Go to the source code of this file.

Functions

void g_action_observer_default_init (GActionObserverInterface *class)
 SECTION:gactionobserver : an interface implemented by objects that are interested in monitoring actions for changes.
void g_action_observer_action_added (GActionObserver *observer, GActionObservable *observable, const gchar *action_name, const GVariantType *parameter_type, gboolean enabled, GVariant *state)
void g_action_observer_action_enabled_changed (GActionObserver *observer, GActionObservable *observable, const gchar *action_name, gboolean enabled)
void g_action_observer_action_state_changed (GActionObserver *observer, GActionObservable *observable, const gchar *action_name, GVariant *state)
void g_action_observer_action_removed (GActionObserver *observer, GActionObservable *observable, const gchar *action_name)

Function Documentation

void g_action_observer_action_added ( GActionObserver *  observer,
GActionObservable *  observable,
const gchar *  action_name,
const GVariantType *  parameter_type,
gboolean  enabled,
GVariant *  state 
)

Definition at line 75 of file gactionobserver.c.

{
  g_return_if_fail (G_IS_ACTION_OBSERVER (observer));

  G_ACTION_OBSERVER_GET_IFACE (observer)
    ->action_added (observer, observable, action_name, parameter_type, enabled, state);
}

Here is the caller graph for this function:

void g_action_observer_action_enabled_changed ( GActionObserver *  observer,
GActionObservable *  observable,
const gchar *  action_name,
gboolean  enabled 
)

Definition at line 102 of file gactionobserver.c.

{
  g_return_if_fail (G_IS_ACTION_OBSERVER (observer));

  G_ACTION_OBSERVER_GET_IFACE (observer)
    ->action_enabled_changed (observer, observable, action_name, enabled);
}

Here is the caller graph for this function:

void g_action_observer_action_removed ( GActionObserver *  observer,
GActionObservable *  observable,
const gchar *  action_name 
)

Definition at line 151 of file gactionobserver.c.

{
  g_return_if_fail (G_IS_ACTION_OBSERVER (observer));

  G_ACTION_OBSERVER_GET_IFACE (observer)
    ->action_removed (observer, observable, action_name);
}

Here is the caller graph for this function:

void g_action_observer_action_state_changed ( GActionObserver *  observer,
GActionObservable *  observable,
const gchar *  action_name,
GVariant *  state 
)

Definition at line 127 of file gactionobserver.c.

{
  g_return_if_fail (G_IS_ACTION_OBSERVER (observer));

  G_ACTION_OBSERVER_GET_IFACE (observer)
    ->action_state_changed (observer, observable, action_name, state);
}

Here is the caller graph for this function:

void g_action_observer_default_init ( GActionObserverInterface *  class)

SECTION:gactionobserver : an interface implemented by objects that are interested in monitoring actions for changes.

GActionObserver 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

GObject signals, but there are a number of reasons that this

approach could become problematic:

  • there are four separate signals that must be manually connected and disconnected
  • when a large number of different observers wish to monitor a (usually disjoint) set of actions within the same action group, there is only one way to avoid having all notifications delivered to all observers: signal detail. In order to use signal detail, each action name must be quarked, which is not always practical.
  • even if quarking is acceptable, #GObject signal details are implemented by scanning a linked list, so there is no real decrease in complexity

Definition at line 53 of file gactionobserver.c.

{
}