1 #ifndef _IBUS_CHEWING_PROPERTIES_H_
2 #define _IBUS_CHEWING_PROPERTIES_H_
3 #include <glib.h>
4 #include <ibus.h>
5 #include "MakerDialogProperty.h"
6 #include "MakerDialogBackend.h"
7 
8 typedef struct {
9     MkdgProperties *properties;
10     GHashTable *confObjTable;
11 } IBusChewingProperties;
12 
13 /* GConf/dconf section under PROJECT_SCHEMA_BASE */
14 #define IBUS_CHEWING_PROPERTIES_SUBSECTION QUOTE_ME(PROJECT_SCHEMA_SECTION)
15 
16 IBusChewingProperties *ibus_chewing_properties_new(MkdgBackend * backend,
17 						   gpointer parent,
18 						   gpointer auxData);
19 
20 GValue *ibus_chewing_properties_read_general(IBusChewingProperties * self,
21 					     GValue * value,
22 					     const gchar * section,
23 					     const gchar * key,
24 					     gpointer userData);
25 
26 gboolean ibus_chewing_properties_read_boolean_general(IBusChewingProperties
27 						      * self,
28 						      const gchar *
29 						      section,
30 						      const gchar * key,
31 						      gpointer userData);
32 
33 gint ibus_chewing_properties_read_int_general(IBusChewingProperties * self,
34 					      const gchar * section,
35 					      const gchar * key,
36 					      gpointer userData);
37 
38 /*============================================
39  * Callback functions
40  */
41 gboolean KBType_apply_callback(PropertyContext * ctx, gpointer userData);
42 
43 gboolean selKeys_apply_callback(PropertyContext * ctx, gpointer userData);
44 
45 gboolean showSystray_apply_callback(PropertyContext * ctx,
46 				    gpointer userData);
47 
48 gboolean autoShiftCur_apply_callback(PropertyContext * ctx,
49 				     gpointer userData);
50 
51 gboolean addPhraseDirection_apply_callback(PropertyContext * ctx,
52 					   gpointer userData);
53 
54 gboolean cleanBufferFocusOut_apply_callback(PropertyContext * ctx,
55 					    gpointer userData);
56 
57 gboolean easySymbolInput_apply_callback(PropertyContext * ctx,
58 					gpointer userData);
59 
60 gboolean escCleanAllBuf_apply_callback(PropertyContext * ctx,
61 				       gpointer userData);
62 
63 gboolean maxChiSymbolLen_apply_callback(PropertyContext * ctx,
64 					gpointer userData);
65 
66 gboolean forceLowercaseEnglish_apply_callback(PropertyContext * ctx,
67 					      gpointer userData);
68 
69 gboolean syncCapsLock_apply_callback(PropertyContext * ctx,
70 				     gpointer userData);
71 
72 gboolean shiftToggleChinese_apply_callback(PropertyContext * ctx,
73                                            gpointer userData);
74 
75 gboolean candPerPage_apply_callback(PropertyContext * ctx,
76 				    gpointer userData);
77 
78 gboolean capslockToggleChinese_apply_callback(PropertyContext * ctx,
79 					      gpointer userData);
80 
81 gboolean phraseChoiceRearward_apply_callback(PropertyContext * ctx,
82 					     gpointer userData);
83 
84 gboolean spaceAsSelection_apply_callback(PropertyContext * ctx,
85 					 gpointer userData);
86 
87 gboolean defaultEnglishLetterCase_apply_callback(PropertyContext * ctx,
88 						  gpointer userData);
89 
90 gboolean plainZhuyin_apply_callback(PropertyContext * ctx,
91 				    gpointer userData);
92 
93 extern MkdgPropertySpec propSpecs[];
94 
95 extern const gchar *kbType_ids[];
96 
97 extern const gchar *selKeys_array[];
98 
99 extern const gchar *syncCapsLock_strs[];
100 
101 extern const gchar *outputCharsets[];
102 
103 #endif				/* _IBUS_CHEWING_PROPERTIES_H_ */
104