1 #ifndef __dasher_action_h__
2 #define __dasher_action_h__
4 // TODO: This should be an interface rather than an instantiable class - look for macros etc in GTK code which do this
6 typedef struct _DasherEditorInternal DasherEditorInternal
;
9 #include <glib-object.h>
12 #define TYPE_DASHER_ACTION (dasher_action_get_type())
13 #define DASHER_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_DASHER_ACTION, DasherAction ))
14 #define DASHER_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DASHER_ACTION, DasherActionClass ))
15 #define IS_DASHER_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_DASHER_ACTION))
16 #define IS_DASHER_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DASHER_ACTION))
17 #define DASHER_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DASHER_ACTION, DasherActionClass))
19 typedef struct _DasherAction DasherAction
;
20 typedef struct _DasherActionClass DasherActionClass
;
22 struct _DasherAction
{
24 gpointer private_data
;
27 struct _DasherActionClass
{
28 GObjectClass parent_class
;
30 gboolean (*execute
)(DasherAction
*pSelf
, DasherEditorInternal
*pEditor
, int iIdx
);
31 gboolean (*preview
)(DasherAction
*pSelf
, DasherEditorInternal
*pEditor
);
32 const gchar
*(*get_name
)(DasherAction
*pSelf
);
33 int (*get_sub_count
)(DasherAction
*pSelf
);
34 const gchar
*(*get_sub_name
)(DasherAction
*pSelf
, int iIdx
);
35 gboolean (*activate
)(DasherAction
*pSelf
);
36 gboolean (*deactivate
)(DasherAction
*pSelf
);
39 DasherAction
*dasher_action_new();
40 GType
dasher_action_get_type();
42 gboolean
dasher_action_execute(DasherAction
*pSelf
, DasherEditorInternal
*pEditor
, gint iIdx
);
43 gboolean
dasher_action_preview(DasherAction
*pSelf
, DasherEditorInternal
*pEditor
);
44 const gchar
*dasher_action_get_name(DasherAction
*pSelf
);
45 int dasher_action_get_sub_count(DasherAction
*pSelf
);
46 const gchar
*dasher_action_get_sub_name(DasherAction
*pSelf
, int iIdx
);
47 gboolean
dasher_action_activate(DasherAction
*pSelf
);
48 gboolean
dasher_action_deactivate(DasherAction
*pSelf
);
49 gboolean
dasher_action_get_active(DasherAction
*pSelf
);