1 /* 2 An object to ferry over properties and signals between two different 3 dbusmenu instances. Useful for services. 4 5 Copyright 2010 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_MENUITEM_PROXY_H__ 30 #define __DBUSMENU_MENUITEM_PROXY_H__ 31 32 #include <glib.h> 33 #include <glib-object.h> 34 #include "menuitem.h" 35 36 G_BEGIN_DECLS 37 38 #define DBUSMENU_TYPE_MENUITEM_PROXY (dbusmenu_menuitem_proxy_get_type ()) 39 #define DBUSMENU_MENUITEM_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DBUSMENU_TYPE_MENUITEM_PROXY, DbusmenuMenuitemProxy)) 40 #define DBUSMENU_MENUITEM_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUSMENU_TYPE_MENUITEM_PROXY, DbusmenuMenuitemProxyClass)) 41 #define DBUSMENU_IS_MENUITEM_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DBUSMENU_TYPE_MENUITEM_PROXY)) 42 #define DBUSMENU_IS_MENUITEM_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_TYPE_MENUITEM_PROXY)) 43 #define DBUSMENU_MENUITEM_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_TYPE_MENUITEM_PROXY, DbusmenuMenuitemProxyClass)) 44 45 typedef struct _DbusmenuMenuitemProxy DbusmenuMenuitemProxy; 46 typedef struct _DbusmenuMenuitemProxyClass DbusmenuMenuitemProxyClass; 47 typedef struct _DbusmenuMenuitemProxyPrivate DbusmenuMenuitemProxyPrivate; 48 49 /** 50 DbusmenuMenuitemProxyClass: 51 @parent_class: The Class of #DbusmeneMenuitem 52 @reserved1: Reserved for future use. 53 @reserved2: Reserved for future use. 54 @reserved3: Reserved for future use. 55 @reserved4: Reserved for future use. 56 57 Functions and signal slots for #DbusmenuMenuitemProxy. 58 */ 59 struct _DbusmenuMenuitemProxyClass { 60 DbusmenuMenuitemClass parent_class; 61 62 /*< Private >*/ 63 void (*reserved1) (void); 64 void (*reserved2) (void); 65 void (*reserved3) (void); 66 void (*reserved4) (void); 67 }; 68 69 /** 70 DbusmenuMenuitemProxy: 71 72 Public instance data for a #DbusmenuMenuitemProxy. 73 */ 74 struct _DbusmenuMenuitemProxy { 75 /*< private >*/ 76 DbusmenuMenuitem parent; 77 78 /*< Private >*/ 79 DbusmenuMenuitemProxyPrivate * priv; 80 }; 81 82 GType dbusmenu_menuitem_proxy_get_type (void); 83 DbusmenuMenuitemProxy * dbusmenu_menuitem_proxy_new (DbusmenuMenuitem * mi); 84 DbusmenuMenuitem * dbusmenu_menuitem_proxy_get_wrapped (DbusmenuMenuitemProxy * pmi); 85 86 /** 87 * SECTION:menuitem-proxy 88 * @short_description: A menuitem that proxies from another menuitem 89 * @stability: Unstable 90 * @include: libdbusmenu-glib/menuitem-proxy.h 91 * 92 * This small object allows for proxying all the properties from a remote 93 * menuitem to a new object that can be moved around appropriately within 94 * the new menu structure. 95 */ 96 97 G_END_DECLS 98 99 #endif 100