From 9d85d642b2c21d8c0491fd0a9712aff76aa7dc08 Mon Sep 17 00:00:00 2001 From: Yuedong Du Date: Tue, 28 Oct 2003 05:41:05 +0000 Subject: add new file for toggle cell a11y object. new a11y object toggle cell 2003-10-26 Yuedong Du * gal/a11y/e-table/Makefile.am: add new file for toggle cell a11y object. * gal/a11y/e-table/gal-a11y-e-cell-toggle.c: new a11y object toggle cell (gal_a11y_e_cell_toggle_get_type), (gal_a11y_e_cell_toggle_class_init), (toggle_cell_action), the implementation of toggle cell action. (gal_a11y_e_cell_toggle_new): * gal/a11y/e-table/gal-a11y-e-cell-toggle.h: ditto * gal/a11y/e-table/gal-a11y-e-cell.c: (_gal_a11y_e_cell_get_action_info), (_gal_a11y_e_cell_destroy_action_info), (gal_a11y_e_cell_add_action), (gal_a11y_e_cell_remove_action), (gal_a11y_e_cell_remove_action_by_name), (gal_a11y_e_cell_action_get_n_actions), (gal_a11y_e_cell_action_get_name), (gal_a11y_e_cell_action_get_description), (gal_a11y_e_cell_action_set_description), (gal_a11y_e_cell_action_get_keybinding), (idle_do_action), (gal_a11y_e_cell_action_do_action), (gal_a11y_e_cell_atk_action_interface_init), (gal_a11y_e_cell_type_add_action_interface), (gal_a11y_e_cell_add_state): helper functions for add a action, stealed from gailcell.c * gal/a11y/e-table/gal-a11y-e-cell.h: * gal/e-table/e-cell-toggle.c: (e_cell_toggle_class_init): register toggle's a11y object. svn path=/trunk/; revision=23095 --- a11y/e-table/gal-a11y-e-cell.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'a11y/e-table/gal-a11y-e-cell.h') diff --git a/a11y/e-table/gal-a11y-e-cell.h b/a11y/e-table/gal-a11y-e-cell.h index ff9e5162d8..81f5f147ca 100644 --- a/a11y/e-table/gal-a11y-e-cell.h +++ b/a11y/e-table/gal-a11y-e-cell.h @@ -22,6 +22,9 @@ typedef struct _GalA11yECell GalA11yECell; typedef struct _GalA11yECellClass GalA11yECellClass; typedef struct _GalA11yECellPrivate GalA11yECellPrivate; +typedef struct _ActionInfo ActionInfo; +typedef void (*ACTION_FUNC) (GalA11yECell *cell); + /* This struct should actually be larger as this isn't what we derive from. * The GalA11yECellPrivate comes right after the parent class structure. @@ -35,12 +38,24 @@ struct _GalA11yECell { int model_col; int view_col; int row; + AtkStateSet *state_set; + GList *action_list; + gint action_idle_handler; + ACTION_FUNC action_func; }; struct _GalA11yECellClass { AtkObjectClass parent_class; }; +struct _ActionInfo { + gchar *name; + gchar *description; + gchar *keybinding; + ACTION_FUNC do_action_func; +}; + + /* Standard Glib function */ GType gal_a11y_e_cell_get_type (void); @@ -58,4 +73,19 @@ void gal_a11y_e_cell_construct (AtkObject *object, int view_col, int row); +void gal_a11y_e_cell_type_add_action_interface (GType type); + +gboolean gal_a11y_e_cell_add_action (GalA11yECell *cell, + const gchar *action_name, + const gchar *action_description, + const gchar *action_keybinding, + ACTION_FUNC action_func); + +gboolean gal_a11y_e_cell_remove_action (GalA11yECell *cell, + gint action_id); + +gboolean gal_a11y_e_cell_remove_action_by_name (GalA11yECell *cell, + const gchar *action_name); + + #endif /* ! __GAL_A11Y_E_CELL_H__ */ -- cgit v1.2.3