1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
/* libxklavier.vapi generated by vapigen, do not modify. */
[CCode (cprefix = "Xkl", lower_case_cprefix = "xkl_")]
namespace Xkl {
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public class ConfigItem : GLib.Object {
[CCode (array_length = false)]
public weak char[] description;
[CCode (array_length = false)]
public weak char[] name;
[CCode (array_length = false)]
public weak char[] short_description;
[CCode (has_construct_function = false)]
public ConfigItem ();
}
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public class ConfigRec : GLib.Object {
[CCode (array_length = false, array_null_terminated = true)]
public string[] layouts;
public weak string model;
[CCode (array_length = false, array_null_terminated = true)]
public string[] options;
[CCode (array_length = false, array_null_terminated = true)]
public string[] variants;
[CCode (has_construct_function = false)]
public ConfigRec ();
public bool activate (Xkl.Engine engine);
public bool equals (Xkl.ConfigRec data2);
public bool get_from_backup (Xkl.Engine engine);
public bool get_from_root_window_property (X.Atom rules_atom_name, string rules_file_out, Xkl.Engine engine);
public bool get_from_server (Xkl.Engine engine);
public void reset ();
public bool set_to_root_window_property (X.Atom rules_atom_name, string rules_file, Xkl.Engine engine);
public static bool write_to_file (Xkl.Engine engine, string file_name, Xkl.ConfigRec data, bool binary);
}
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public class ConfigRegistry : GLib.Object {
[CCode (has_construct_function = false)]
protected ConfigRegistry ();
public bool find_layout (Xkl.ConfigItem item);
public bool find_model (Xkl.ConfigItem item);
public bool find_option (string option_group_name, Xkl.ConfigItem item);
public bool find_option_group (Xkl.ConfigItem item);
public bool find_variant (string layout_name, Xkl.ConfigItem item);
public void foreach_country (Xkl.ConfigItemProcessFunc func, void* data);
public void foreach_country_variant (string country_code, Xkl.TwoConfigItemsProcessFunc func, void* data);
public void foreach_language (Xkl.ConfigItemProcessFunc func, void* data);
public void foreach_language_variant (string language_code, Xkl.TwoConfigItemsProcessFunc func, void* data);
public void foreach_layout (Xkl.ConfigItemProcessFunc func, void* data);
public void foreach_layout_variant (string layout_name, Xkl.ConfigItemProcessFunc func, void* data);
public void foreach_model (Xkl.ConfigItemProcessFunc func, void* data);
public void foreach_option (string option_group_name, Xkl.ConfigItemProcessFunc func, void* data);
public void foreach_option_group (Xkl.ConfigItemProcessFunc func, void* data);
public static unowned Xkl.ConfigRegistry get_instance (Xkl.Engine engine);
public bool load (bool if_extras_needed);
public void search_by_pattern (string pattern, Xkl.TwoConfigItemsProcessFunc func, void* data);
[NoAccessorMethod]
public Xkl.Engine engine { owned get; construct; }
}
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public class Engine : GLib.Object {
[CCode (has_construct_function = false)]
protected Engine ();
public static void INT__LONG_LONG (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
public static void VOID__FLAGS_INT_BOOLEAN (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
public void allow_one_switch_to_secondary_group ();
public bool backup_names_prop ();
[NoWrapper]
public virtual void config_notify ();
public void delete_state (X.Window win);
public int filter_events (X.Event* evt);
public unowned string get_backend_name ();
public unowned Xkl.State get_current_state ();
public X.Window get_current_window ();
public int get_current_window_group ();
public int get_default_group ();
public uint get_features ();
public unowned string get_groups_names ();
public bool get_indicators_handling ();
public unowned string get_indicators_names ();
public static unowned Xkl.Engine get_instance (X.Display display);
public uint get_max_num_groups ();
public int get_next_group ();
public uint get_num_groups ();
public int get_prev_group ();
public uint get_secondary_groups_mask ();
public bool get_state (X.Window win, Xkl.State state_out);
public unowned string get_window_title (X.Window win);
public bool grab_key (int keycode, uint modifiers);
public bool is_group_per_toplevel_window ();
public bool is_window_from_same_toplevel_window (X.Window win1, X.Window win2);
public bool is_window_transparent (X.Window win);
public void lock_group (int group);
public int pause_listen ();
public int resume_listen ();
public void save_state (X.Window win, Xkl.State state);
public void set_default_group (int group);
public void set_group_per_toplevel_window (bool is_global);
public void set_indicators_handling (bool whether_handle);
public void set_secondary_groups_mask (uint mask);
public void set_window_transparent (X.Window win, bool transparent);
public int start_listen (uint flags);
[NoWrapper]
public virtual void state_notify (Xkl.EngineStateChange change_type, int group, bool restore);
public int stop_listen (uint flags);
public bool ungrab_key (int keycode, uint modifiers);
[NoAccessorMethod]
public string backendName { owned get; }
public uint default_group { get; }
[NoAccessorMethod]
public void* display { get; construct; }
public Xkl.EngineFeatures features { get; }
public bool indicators_handling { get; }
public uint max_num_groups { get; }
public uint num_groups { get; }
public uint secondary_groups_mask { get; }
public virtual signal void X_config_changed ();
public virtual signal void X_new_device ();
public virtual signal void X_state_changed (int p0, int p1, bool p2);
public virtual signal int new_toplevel_window (long p0, long p1);
}
[Compact]
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public class State {
public int32 group;
public uint32 indicators;
}
[CCode (cprefix = "XKLF_", cheader_filename = "libxklavier/xklavier.h")]
[Flags]
public enum EngineFeatures {
CAN_TOGGLE_INDICATORS,
CAN_OUTPUT_CONFIG_AS_ASCII,
CAN_OUTPUT_CONFIG_AS_BINARY,
MULTIPLE_LAYOUTS_SUPPORTED,
REQUIRES_MANUAL_LAYOUT_MANAGEMENT,
DEVICE_DISCOVERY
}
[CCode (cprefix = "XKLL_", cheader_filename = "libxklavier/xklavier.h")]
public enum EngineListenModes {
MANAGE_WINDOW_STATES,
TRACK_KEYBOARD_STATE,
MANAGE_LAYOUTS
}
[CCode (cprefix = "", cheader_filename = "libxklavier/xklavier.h")]
public enum EngineStateChange {
GROUP_CHANGED,
INDICATORS_CHANGED
}
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public delegate void ConfigItemProcessFunc (Xkl.ConfigRegistry config, Xkl.ConfigItem item);
[CCode (cheader_filename = "libxklavier/xklavier.h", has_target = false)]
public delegate void LogAppender (char[] file, char[] function, int level, char[] format, void* args);
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public delegate void TwoConfigItemsProcessFunc (Xkl.ConfigRegistry config, Xkl.ConfigItem item, Xkl.ConfigItem subitem);
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public const int MAX_CI_DESC_LENGTH;
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public const int MAX_CI_NAME_LENGTH;
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public const int MAX_CI_SHORT_DESC_LENGTH;
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public const string XCI_PROP_ALLOW_MULTIPLE_SELECTION;
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public const string XCI_PROP_COUNTRY_LIST;
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public const string XCI_PROP_EXTRA_ITEM;
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public const string XCI_PROP_LANGUAGE_LIST;
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public const string XCI_PROP_VENDOR;
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public static void default_log_appender (char[] file, char[] function, int level, char[] format, void* args);
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public static unowned string get_country_name (string code);
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public static unowned string get_language_name (string code);
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public static unowned string get_last_error ();
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public static bool restore_names_prop (Xkl.Engine engine);
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public static void set_debug_level (int level);
[CCode (cheader_filename = "libxklavier/xklavier.h")]
public static void set_log_appender (Xkl.LogAppender fun);
}
|