1 #ifndef __SCIM_KEY_SELECTION_H__
2 #define __SCIM_KEY_SELECTION_H__
9 #define SCIM_TYPE_KEY_SELECTION (scim_key_selection_get_type ())
10 #define SCIM_KEY_SELECTION(obj) (GTK_CHECK_CAST ((obj), SCIM_TYPE_KEY_SELECTION, ScimKeySelection))
11 #define SCIM_KEY_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), SCIM_TYPE_KEY_SELECTION, ScimKeySelectionClass))
12 #define SCIM_IS_KEY_SELECTION(obj) (GTK_CHECK_TYPE ((obj), SCIM_TYPE_KEY_SELECTION))
13 #define SCIM_IS_KEY_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SCIM_TYPE_KEY_SELECTION))
14 #define SCIM_KEY_SELECTION_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), SCIM_TYPE_KEY_SELECTION, ScimKeySelectionClass))
16 #define SCIM_TYPE_KEY_SELECTION_DIALOG (scim_key_selection_dialog_get_type ())
17 #define SCIM_KEY_SELECTION_DIALOG(obj) (GTK_CHECK_CAST ((obj), SCIM_TYPE_KEY_SELECTION_DIALOG, ScimKeySelectionDialog))
18 #define SCIM_KEY_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), SCIM_TYPE_KEY_SELECTION_DIALOG, ScimKeySelectionDialogClass))
19 #define SCIM_IS_KEY_SELECTION_DIALOG(obj) (GTK_CHECK_TYPE ((obj), SCIM_TYPE_KEY_SELECTION_DIALOG))
20 #define SCIM_IS_KEY_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SCIM_TYPE_KEY_SELECTION_DIALOG))
21 #define SCIM_KEY_SELECTION_DIALOG_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), SCIM_TYPE_KEY_SELECTION_DIALOG, ScimKeySelectionDialogClass))
23 typedef struct _ScimKeySelection ScimKeySelection;
24 typedef struct _ScimKeySelectionClass ScimKeySelectionClass;
26 typedef struct _ScimKeySelectionDialog ScimKeySelectionDialog;
27 typedef struct _ScimKeySelectionDialogClass ScimKeySelectionDialogClass;
29 struct _ScimKeySelection
33 GtkWidget *toggle_ctrl;
34 GtkWidget *toggle_alt;
35 GtkWidget *toggle_shift;
36 GtkWidget *toggle_meta;
37 GtkWidget *toggle_super;
38 GtkWidget *toggle_hyper;
39 GtkWidget *toggle_release;
43 GtkTreeSelection *list_selection;
44 GtkListStore *list_model;
49 struct _ScimKeySelectionClass
51 GtkVBoxClass parent_class;
53 void (*changed) (ScimKeySelection *keyselection);
56 struct _ScimKeySelectionDialog
58 GtkDialog parent_instance;
63 GtkWidget *action_area;
66 GtkWidget *cancel_button;
69 struct _ScimKeySelectionDialogClass
71 GtkDialogClass parent_class;
73 /* Padding for future expansion */
74 void (*_gtk_reserved1) (void);
75 void (*_gtk_reserved2) (void);
76 void (*_gtk_reserved3) (void);
77 void (*_gtk_reserved4) (void);
80 GType scim_key_selection_get_type (void) G_GNUC_CONST;
82 GtkWidget* scim_key_selection_new (void);
84 void scim_key_selection_set_keys (ScimKeySelection *keyselection,
87 void scim_key_selection_append_keys (ScimKeySelection *keyselection,
91 G_CONST_RETURN gchar* scim_key_selection_get_keys (ScimKeySelection *keyselection);
94 GType scim_key_selection_dialog_get_type (void) G_GNUC_CONST;
95 GtkWidget* scim_key_selection_dialog_new (const gchar *title);
96 void scim_key_selection_dialog_set_keys (ScimKeySelectionDialog *ksd,
98 G_CONST_RETURN gchar* scim_key_selection_dialog_get_keys (ScimKeySelectionDialog *ksd);
102 #endif /* __GTK_KEY_SELECTION_H__ */
105 vi:ts=4:nowrap:ai:expandtab