1
/* Generated by GOB (v2.0.15) (do not edit directly) */
6
* Copyright © 2009 Red Hat, Inc. All rights reserved.
7
* Copyright © 2009 Ding-Yi Chen <dchen at redhat.com>
9
* This file is part of the ibus-chewing Project.
11
* This program is free software; you can redistribute it and/or
12
* modify it under the terms of the GNU General Public License
13
* as published by the Free Software Foundation; either version 2
14
* of the License, or (at your option) any later version.
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
21
* You should have received a copy of the GNU General Public License
22
* along with this program; if not, write to the Free Software
23
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
31
#define GETTEXT_PACKAGE "gtk20"
32
#include <glib/gi18n.h>
34
#include <X11/extensions/XTest.h>
39
#include <glib-object.h>
40
#ifndef __IBUS_CHEWING_ENGINE_H__
41
#define __IBUS_CHEWING_ENGINE_H__
45
#endif /* __cplusplus */
49
CHEWING_KBTYPE_INVALID = -1,
50
CHEWING_KBTYPE_DEFAULT,
53
CHEWING_KBTYPE_GIN_YIEH,
55
CHEWING_KBTYPE_ETEN26,
56
CHEWING_KBTYPE_DVORAK,
57
CHEWING_KBTYPE_DVORAK_HSU,
58
CHEWING_KBTYPE_DACHEN_CP26,
61
#define CHEWING_TYPE_KBTYPE chewing_kbtype_get_type()
62
GType chewing_kbtype_get_type (void);
66
CHEWING_MODIFIER_SYNC_DISABLE,
67
CHEWING_MODIFIER_SYNC_FROM_KEYBOARD,
68
CHEWING_MODIFIER_SYNC_FROM_IM
69
} ChewingModifierSync;
70
#define CHEWING_TYPE_MODIFIER_SYNC chewing_modifier_sync_get_type()
71
GType chewing_modifier_sync_get_type (void);
75
CHEWING_INPUT_MODE_BYPASS,
76
CHEWING_INPUT_MODE_EDITING,
77
CHEWING_INPUT_MODE_SELECTING,
78
CHEWING_INPUT_MODE_SELECTING_DONE
80
#define CHEWING_TYPE_INPUT_MODE chewing_input_mode_get_type()
81
GType chewing_input_mode_get_type (void);
85
#include "maker-dialog.h"
86
#define GCONF_KEY_PREFIX "/desktop/ibus/engine/Chewing/"
87
#define EASY_SYMBOL_INPUT_WORK_AROUND
88
#define CHOICE_FROM_REARWARD_WORK_AROUND
89
#define CURSOR_LAST_SIZE 2
91
extern PropertySpec propSpecs[];
92
extern const gchar *page_labels[];
93
extern const gchar *button_labels[];
94
extern GtkResponseType button_responses[];
95
#define ZHUYIN_BUFFER_SIZE 12
97
#define ENGINE_STATUS_INITIALIZED 1
98
#define ENGINE_STATUS_ENABLED 2
99
#define ENGINE_STATUS_FOCUS_IN 4
103
* Dummy data structure for ibus 1.1 and early.
105
typedef void IBusKeymap;
106
IBusKeymap *ibus_keymap_new(gchar *keymap_name);
107
#endif /* IBUS_1_1 */
111
* Type checking and casting macros
113
#define IBUS_TYPE_CHEWING_ENGINE (ibus_chewing_engine_get_type())
114
#define IBUS_CHEWING_ENGINE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), ibus_chewing_engine_get_type(), IBusChewingEngine)
115
#define IBUS_CHEWING_ENGINE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), ibus_chewing_engine_get_type(), IBusChewingEngine const)
116
#define IBUS_CHEWING_ENGINE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), ibus_chewing_engine_get_type(), IBusChewingEngineClass)
117
#define IBUS_IS_CHEWING_ENGINE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), ibus_chewing_engine_get_type ())
119
#define IBUS_CHEWING_ENGINE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), ibus_chewing_engine_get_type(), IBusChewingEngineClass)
121
/* Private structure type */
122
typedef struct _IBusChewingEnginePrivate IBusChewingEnginePrivate;
125
* Main object structure
127
#ifndef __TYPEDEF_IBUS_CHEWING_ENGINE__
128
#define __TYPEDEF_IBUS_CHEWING_ENGINE__
129
typedef struct _IBusChewingEngine IBusChewingEngine;
131
struct _IBusChewingEngine {
132
IBusEngine __parent__;
134
ChewingContext * context;
135
ChewingModifierSync syncCapsLock_local;
136
GtkWidget * setting_dialog;
137
IBusProperty * chieng_prop;
138
IBusProperty * alnumSize_prop;
139
IBusProperty * settings_prop;
140
IBusPropList * prop_list;
143
gint selKeys[MAX_SELKEY]; /* protected */
144
gboolean plainZhuyin; /* protected */
145
ChewingInputMode inputMode; /* protected */
146
gboolean forceLowercaseEnglish; /* protected */
147
gboolean numpadAlwaysNumber; /* protected */
148
IBusLookupTable * table; /* protected */
149
IBusKeymap * keymap_us; /* protected */
150
IBusChewingEnginePrivate *_priv;
156
typedef struct _IBusChewingEngineClass IBusChewingEngineClass;
157
struct _IBusChewingEngineClass {
158
IBusEngineClass __parent__;
159
IBusText * chieng_prop_label_chi;
160
IBusText * chieng_prop_label_eng;
161
IBusText * alnumSize_prop_label_full;
162
IBusText * alnumSize_prop_label_half;
163
IBusText * settings_prop_label;
170
GType ibus_chewing_engine_get_type (void);
171
void ibus_chewing_engine_refresh_property_list (IBusChewingEngine * self);
172
void ibus_chewing_engine_hide_property_list (IBusChewingEngine * self);
173
gboolean ibus_chewing_engine_save_config (IBusChewingEngine * self,
174
const gchar * key_suffix);
175
gboolean ibus_chewing_engine_save_config_all (IBusChewingEngine * self);
179
#endif /* __cplusplus */