Code

Patch to fix build on Natty by Alex Valavanis
[inkscape.git] / src / ink-action.h
1 #ifndef SEEN_INK_ACTION
2 #define SEEN_INK_ACTION
5 #include <glib.h>
6 #include <gtk/gtkaction.h>
7 #include <gtk/gtktoggleaction.h>
8 #include <gtk/gtkradioaction.h>
9 #include <glib-object.h>
10 #include "icon-size.h"
11 #include "attributes.h"
13 /* Equivalent to GTK Actions of the same type, but can support Inkscape SVG icons */
15 G_BEGIN_DECLS
17 #define INK_ACTION_TYPE                ( ink_action_get_type() )
18 #define INK_ACTION( obj )              ( G_TYPE_CHECK_INSTANCE_CAST( (obj), INK_ACTION_TYPE, InkAction) )
19 #define INK_ACTION_CLASS( klass )      ( G_TYPE_CHECK_CLASS_CAST( (klass), INK_ACTION_TYPE, InkActionClass) )
20 #define IS_INK_ACTION( obj )           ( G_TYPE_CHECK_INSTANCE_TYPE( (obj), INK_ACTION_TYPE) )
21 #define IS_INK_ACTION_CLASS( klass )   ( G_TYPE_CHECK_CLASS_TYPE( (klass), INK_ACTION_TYPE) )
22 #define INK_ACTION_GET_CLASS( obj )    ( G_TYPE_INSTANCE_GET_CLASS( (obj), INK_ACTION_TYPE, InkActionClass) )
24 typedef struct _InkAction      InkAction;
25 typedef struct _InkActionClass InkActionClass;
26 typedef struct _InkActionPrivate InkActionPrivate;
28 struct _InkAction
29 {
30     GtkAction action;
31     InkActionPrivate *private_data;
32 };
34 struct _InkActionClass
35 {
36     GtkActionClass parent_class;
37 };
39 GType ink_action_get_type( void );
41 InkAction* ink_action_new( const gchar *name,
42                            const gchar *label,
43                            const gchar *tooltip,
44                            const gchar *inkId,
45                            Inkscape::IconSize size );
48 /* --------------------------------------------------------------- */
49 /* --------------------------------------------------------------- */
50 /* --------------------------------------------------------------- */
51 /* --------------------------------------------------------------- */
54 #define INK_TOGGLE_ACTION_TYPE                ( ink_toggle_action_get_type() )
55 #define INK_TOGGLE_ACTION( obj )              ( G_TYPE_CHECK_INSTANCE_CAST( (obj), INK_TOGGLE_ACTION_TYPE, InkToggleAction) )
56 #define INK_TOGGLE_ACTION_CLASS( klass )      ( G_TYPE_CHECK_CLASS_CAST( (klass), INK_TOGGLE_ACTION_TYPE, InkToggleActionClass) )
57 #define IS_INK_TOGGLE_ACTION( obj )           ( G_TYPE_CHECK_INSTANCE_TYPE( (obj), INK_TOGGLE_ACTION_TYPE) )
58 #define IS_INK_TOGGLE_ACTION_CLASS( klass )   ( G_TYPE_CHECK_CLASS_TYPE( (klass), INK_TOGGLE_ACTION_TYPE) )
59 #define INK_TOGGLE_ACTION_GET_CLASS( obj )    ( G_TYPE_INSTANCE_GET_CLASS( (obj), INK_TOGGLE_ACTION_TYPE, InkToggleActionClass) )
61 typedef struct _InkToggleAction      InkToggleAction;
62 typedef struct _InkToggleActionClass InkToggleActionClass;
63 typedef struct _InkToggleActionPrivate InkToggleActionPrivate;
65 struct _InkToggleAction
66 {
67     GtkToggleAction action;
68     InkToggleActionPrivate *private_data;
69 };
71 struct _InkToggleActionClass
72 {
73     GtkToggleActionClass parent_class;
74 };
76 GType ink_toggle_action_get_type( void );
78 InkToggleAction* ink_toggle_action_new( const gchar *name,
79                                         const gchar *label,
80                                         const gchar *tooltip,
81                                         const gchar *inkId,
82                                         Inkscape::IconSize size,
83                                         SPAttributeEnum attr = SP_ATTR_INVALID);
86 /* --------------------------------------------------------------- */
87 /* --------------------------------------------------------------- */
88 /* --------------------------------------------------------------- */
89 /* --------------------------------------------------------------- */
92 #define INK_RADIO_ACTION_TYPE                ( ink_radio_action_get_type() )
93 #define INK_RADIO_ACTION( obj )              ( G_TYPE_CHECK_INSTANCE_CAST( (obj), INK_RADIO_ACTION_TYPE, InkRadioAction) )
94 #define INK_RADIO_ACTION_CLASS( klass )      ( G_TYPE_CHECK_CLASS_CAST( (klass), INK_RADIO_ACTION_TYPE, InkRadioActionClass) )
95 #define IS_INK_RADIO_ACTION( obj )           ( G_TYPE_CHECK_INSTANCE_TYPE( (obj), INK_RADIO_ACTION_TYPE) )
96 #define IS_INK_RADIO_ACTION_CLASS( klass )   ( G_TYPE_CHECK_CLASS_TYPE( (klass), INK_RADIO_ACTION_TYPE) )
97 #define INK_RADIO_ACTION_GET_CLASS( obj )    ( G_TYPE_INSTANCE_GET_CLASS( (obj), INK_RADIO_ACTION_TYPE, InkRadioActionClass) )
99 typedef struct _InkRadioAction      InkRadioAction;
100 typedef struct _InkRadioActionClass InkRadioActionClass;
101 typedef struct _InkRadioActionPrivate InkRadioActionPrivate;
103 struct _InkRadioAction
105     GtkRadioAction action;
106     InkRadioActionPrivate *private_data;
107 };
109 struct _InkRadioActionClass
111     GtkRadioActionClass parent_class;
112 };
114 GType ink_radio_action_get_type( void );
116 InkRadioAction* ink_radio_action_new( const gchar *name,
117                                       const gchar *label,
118                                       const gchar *tooltip,
119                                       const gchar *inkId,
120                                       Inkscape::IconSize size );
124 G_END_DECLS
126 #endif /* SEEN_INK_ACTION */