diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-06-03 08:33:31 +0200 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-06-03 08:33:31 +0200 |
commit | 6872c840672049695904d61c1a3baba22c6d9627 (patch) | |
tree | d2393b4131adc1508f14c3977ef0d854ca36a25f /src/gactionmuxer.h | |
parent | a6d889c175d136cfb1d63a9c04bb2156f210a09e (diff) | |
download | ayatana-indicator-messages-6872c840672049695904d61c1a3baba22c6d9627.tar.gz ayatana-indicator-messages-6872c840672049695904d61c1a3baba22c6d9627.tar.bz2 ayatana-indicator-messages-6872c840672049695904d61c1a3baba22c6d9627.zip |
Add GActionMuxer
This is a new implementation of an action muxer with the same interface as the
one in the gtk tree. Its implementation is considerably simpler, mostly
because it doesn't need to implement GActionObservable.
In addition to muxing different action groups with the <prefix>.<action_name>
scheme, it has the notion of global, prefix-less actions. Indicator-messages
needs those for the status and clear actions.
Diffstat (limited to 'src/gactionmuxer.h')
-rw-r--r-- | src/gactionmuxer.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/gactionmuxer.h b/src/gactionmuxer.h new file mode 100644 index 0000000..5c5e839 --- /dev/null +++ b/src/gactionmuxer.h @@ -0,0 +1,44 @@ +/* + * Copyright 2012 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + * + * Authors: + * Lars Uebernickel <lars.uebernickel@canonical.com> + * Ryan Lortie <desrt@desrt.ca> + */ + +#ifndef __G_ACTION_MUXER_H__ +#define __G_ACTION_MUXER_H__ + +#include <gio/gio.h> + +#define G_TYPE_ACTION_MUXER (g_action_muxer_get_type ()) +#define G_ACTION_MUXER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_ACTION_MUXER, GActionMuxer)) +#define G_IS_ACTION_MUXER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_ACTION_MUXER)) + +typedef struct _GActionMuxer GActionMuxer; + +GType g_action_muxer_get_type (void) G_GNUC_CONST; + +GActionMuxer * g_action_muxer_new (void); + +void g_action_muxer_insert (GActionMuxer *muxer, + const gchar *prefix, + GActionGroup *group); + +void g_action_muxer_remove (GActionMuxer *muxer, + const gchar *prefix); + +#endif + |