1 /* vi:set et ai sw=2 sts=2 ts=2: */
2 /*-
3  * Copyright (c) 2006-2009 Jannis Pohlmann <jannis@xfce.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General
16  * Public License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #if !defined (GARCON_INSIDE_GARCON_H) && !defined (GARCON_COMPILATION)
22 #error "Only <garcon/garcon.h> can be included directly. This file may disappear or change contents."
23 #endif
24 
25 #ifndef __GARCON_MENU_ELEMENT_H__
26 #define __GARCON_MENU_ELEMENT_H__
27 
28 #include <glib-object.h>
29 
30 G_BEGIN_DECLS
31 
32 #define GARCON_TYPE_MENU_ELEMENT           (garcon_menu_element_get_type ())
33 #define GARCON_MENU_ELEMENT(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), GARCON_TYPE_MENU_ELEMENT, GarconMenuElement))
34 #define GARCON_IS_MENU_ELEMENT(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GARCON_TYPE_MENU_ELEMENT))
35 #define GARCON_MENU_ELEMENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GARCON_TYPE_MENU_ELEMENT, GarconMenuElementIface))
36 
37 typedef struct _GarconMenuElement      GarconMenuElement;
38 typedef struct _GarconMenuElementIface GarconMenuElementIface;
39 
40 struct _GarconMenuElementIface
41 {
42   GTypeInterface __parent__;
43 
44   /* Virtual methods */
45   const gchar *(*get_name)                (GarconMenuElement *element);
46   const gchar *(*get_comment)             (GarconMenuElement *element);
47   const gchar *(*get_icon_name)           (GarconMenuElement *element);
48   gboolean     (*get_visible)             (GarconMenuElement *element);
49   gboolean     (*get_show_in_environment) (GarconMenuElement *element);
50   gboolean     (*get_no_display)          (GarconMenuElement *element);
51   gboolean     (*equal)                   (GarconMenuElement *element,
52                                            GarconMenuElement *other);
53 };
54 
55 GType        garcon_menu_element_get_type                (void) G_GNUC_CONST;
56 
57 const gchar *garcon_menu_element_get_name                (GarconMenuElement *element);
58 const gchar *garcon_menu_element_get_comment             (GarconMenuElement *element);
59 const gchar *garcon_menu_element_get_icon_name           (GarconMenuElement *element);
60 gboolean     garcon_menu_element_get_visible             (GarconMenuElement *element);
61 gboolean     garcon_menu_element_get_show_in_environment (GarconMenuElement *element);
62 gboolean     garcon_menu_element_get_no_display          (GarconMenuElement *element);
63 gboolean     garcon_menu_element_equal                   (GarconMenuElement *a,
64                                                           GarconMenuElement *b);
65 
66 G_END_DECLS
67 
68 #endif /* !__GARCON_MENU_ELEMENT_H__ */
69