1 /* 2 A library to communicate a menu object set accross DBus and 3 track updates and maintain consistency. 4 5 Copyright 2011 Canonical Ltd. 6 7 Authors: 8 Ted Gould <ted@canonical.com> 9 10 This program is free software: you can redistribute it and/or modify it 11 under the terms of either or both of the following licenses: 12 13 1) the GNU Lesser General Public License version 3, as published by the 14 Free Software Foundation; and/or 15 2) the GNU Lesser General Public License version 2.1, as published by 16 the Free Software Foundation. 17 18 This program is distributed in the hope that it will be useful, but 19 WITHOUT ANY WARRANTY; without even the implied warranties of 20 MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR 21 PURPOSE. See the applicable version of the GNU Lesser General Public 22 License for more details. 23 24 You should have received a copy of both the GNU Lesser General Public 25 License version 3 and version 2.1 along with this program. If not, see 26 <http://www.gnu.org/licenses/> 27 */ 28 29 #ifndef __DBUSMENU_DEFAULTS_H__ 30 #define __DBUSMENU_DEFAULTS_H__ 31 32 #include <glib.h> 33 #include <glib-object.h> 34 35 G_BEGIN_DECLS 36 37 #define DBUSMENU_TYPE_DEFAULTS (dbusmenu_defaults_get_type ()) 38 #define DBUSMENU_DEFAULTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DBUSMENU_TYPE_DEFAULTS, DbusmenuDefaults)) 39 #define DBUSMENU_DEFAULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUSMENU_TYPE_DEFAULTS, DbusmenuDefaultsClass)) 40 #define DBUSMENU_IS_DEFAULTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DBUSMENU_TYPE_DEFAULTS)) 41 #define DBUSMENU_IS_DEFAULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_TYPE_DEFAULTS)) 42 #define DBUSMENU_DEFAULTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_TYPE_DEFAULTS, DbusmenuDefaultsClass)) 43 44 typedef struct _DbusmenuDefaults DbusmenuDefaults; 45 typedef struct _DbusmenuDefaultsClass DbusmenuDefaultsClass; 46 typedef struct _DbusmenuDefaultsPrivate DbusmenuDefaultsPrivate; 47 48 /* 49 * DbusmenuDefaultsClass: 50 * 51 * All of the signals and functions for #DbusmenuDefaults 52 */ 53 struct _DbusmenuDefaultsClass { 54 GObjectClass parent_class; 55 }; 56 57 /* 58 * DbusmenuDefaults: 59 * 60 * A singleton to hold all of the defaults for the menuitems 61 * so they can use those easily. 62 */ 63 struct _DbusmenuDefaults { 64 GObject parent; 65 66 /*< Private >*/ 67 DbusmenuDefaultsPrivate * priv; 68 }; 69 70 GType dbusmenu_defaults_get_type (void); 71 DbusmenuDefaults * dbusmenu_defaults_ref_default (void); 72 void dbusmenu_defaults_default_set (DbusmenuDefaults * defaults, 73 const gchar * type, 74 const gchar * property, 75 const GVariantType * prop_type, 76 GVariant * value); 77 GVariant * dbusmenu_defaults_default_get (DbusmenuDefaults * defaults, 78 const gchar * type, 79 const gchar * property); 80 GVariantType * dbusmenu_defaults_default_get_type (DbusmenuDefaults * defaults, 81 const gchar * type, 82 const gchar * property); 83 84 G_END_DECLS 85 86 #endif 87