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 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
|
using X;
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "X11/XKBlib.h")]
namespace Xkb {
[CCode (cname = "XkbGetKeyboard")]
public Desc get_keyboard (X.Display dpy, uint which, uint device_spec);
[CCode (cname = "XkbGetControls")]
public X.Status get_controls (X.Display dpy, uint which, Desc xkb);
[CCode (cname = "XkbSetControls")]
public void set_controls (X.Display dpy, uint which, Desc xkb);
[CCode (cname = "XkbGetMap")]
public Desc get_map (X.Display dpy, uint which, uint device_spec);
[CCode (cname = "XkbSetMap")]
public void set_map (X.Display dpy, uint which, Desc xkb);
[CCode (cname = "XkbChangeMap")]
public bool change_map (X.Display dpy, Desc xkb, MapChanges changes);
[CCode (cname = "XkbFreeKeyboard")]
public void free_keyboard (Desc xkb, uint which, bool free_all);
[CCode (cname = "XkbGetState")]
public void get_state (X.Display dpy, uint device_spec, out State state);
[CCode (cname = "XkbSelectEvents")]
public void select_events (X.Display dpy, uint device_spec, ulong bits_to_change,
ulong values_for_bits);
[CCode (cname = "XkbLatchModifiers")]
public void latch_modifiers (X.Display dpy, uint device_spec, uint affect,
uint values);
[CCode (cname = "XkbLockModifiers")]
public void lock_modifiers (X.Display dpy, uint device_spec, uint affect,
uint values);
[Compact]
[CCode (cname = "XkbAnyEvent", free_function = "")]
public struct AnyEvent {
int xkb_type;
}
[Compact]
[CCode (cname = "XkbStateNotifyEvent", free_function = "")]
public struct StateNotifyEvent {
uint changed;
int locked_group;
uint mods;
}
[Compact]
[CCode (cname = "XkbEvent", free_function = "")]
public struct Event {
int type;
AnyEvent any;
StateNotifyEvent state;
}
[Compact]
[CCode (cname = "XkbStateRec", free_function = "")]
public struct State {
uchar group;
uchar locked_group;
ushort base_group;
ushort latched_group;
uchar mods;
uchar base_mods;
uchar latched_mods;
uchar locked_mods;
uchar compat_state;
uchar grab_mods;
uchar compat_grab_mods;
uchar lookup_mods;
uchar compat_lookup_mods;
ushort ptr_buttons;
}
[Compact]
[CCode (cname = "XkbDescRec", free_function = "")]
public class Desc {
public X.Display dpy;
public ushort flags;
public ushort device_spec;
public uchar min_key_code;
public uchar max_key_code;
public Controls ctrls;
public ServerMap server;
public ClientMap map;
public Indicator indicators;
public Names names;
public CompatMap compat;
public Geometry geom;
}
[Compact]
[CCode (cname = "XkbControlsRec", free_function = "")]
public class Controls {
public uint enabled_ctrls;
}
[Compact]
[CCode (cname = "XkbServerMapRec", free_function = "")]
public class ServerMap {
}
[Compact]
[CCode (cname = "XkbKeyTypeRec", free_function = "")]
public struct KeyType {
}
[CCode (cname = "XkbSymMapRec", free_function = "")]
public struct SymMap {
uchar kt_index[4];
uchar group_info;
uchar width;
ushort offset;
}
[CCode (cname = "XkbMapChangesRec", free_function = "")]
public struct MapChanges {
ushort changed;
char min_key_code;
char max_key_code;
uchar first_type;
uchar num_types;
char first_key_sym;
uchar num_key_syms;
char first_key_act;
uchar num_key_acts;
char first_key_behavior;
uchar num_key_behaviors;
char first_key_explicit;
uchar num_key_explicit;
char first_modmap_key;
uchar num_modmap_keys;
char first_vmodmap_key;
uchar num_vmodmap_keys;
uchar pad;
ushort vmods;
}
[Compact]
[CCode (cname = "XkbClientMapRec", free_function = "")]
public class ClientMap {
public uchar size_types;
public uchar num_types;
public KeyType[] types;
public ushort size_syms;
public ushort num_syms;
[CCode (array_length = false, array_null_terminated = true)]
public ulong[] syms;
[CCode (array_length = false, array_null_terminated = true)]
public SymMap[] key_sym_map;
[CCode (array_length = false, array_null_terminated = true)]
public uchar[] modmap;
}
[Compact]
[CCode (cname = "XkbIndicatorRec", free_function = "")]
public class Indicator {
}
[Compact]
[CCode (cname = "XkbNamesRec", free_function = "")]
public class Names {
}
[Compact]
[CCode (cname = "XkbCompatMapRec", free_function = "")]
public class CompatMap {
}
[Compact]
[CCode (cname = "XkbGeometryRec", free_function = "")]
public class Geometry {
}
[CCode (cname = "XkbUseCoreKbd")]
public int UseCoreKbd;
[CCode (cname = "XkbUseCorePtr")]
public int UseCorePtr;
[CCode (cname = "XkbDfltXIClass")]
public int DfltXIClass;
[CCode (cname = "XkbDfltXIId")]
public int DfltXIId;
[CCode (cname = "XkbAllXIClasses")]
public int AllXIClasses;
[CCode (cname = "XkbAllXIIds")]
public int AllXIIds;
[CCode (cname = "XkbXINone")]
public int XINone;
[CCode (cname = "XkbGBN_TypesMask")]
public int GBN_TypesMask;
[CCode (cname = "XkbGBN_CompatMapMask")]
public int GBN_CompatMapMask;
[CCode (cname = "XkbGBN_ClientSymbolsMask")]
public int GBN_ClientSymbolsMask;
[CCode (cname = "XkbGBN_ServerSymbolsMask")]
public int GBN_ServerSymbolsMask;
[CCode (cname = "XkbGBN_SymbolsMask")]
public int GBN_SymbolsMask;
[CCode (cname = "XkbGBN_IndicatorMapMask")]
public int GBN_IndicatorMapMask;
[CCode (cname = "XkbGBN_KeyNamesMask")]
public int GBN_KeyNamesMask;
[CCode (cname = "XkbGBN_GeometryMask")]
public int GBN_GeometryMask;
[CCode (cname = "XkbGBN_OtherNamesMask")]
public int GBN_OtherNamesMask;
[CCode (cname = "XkbGBN_AllComponentsMask")]
public int GBN_AllComponentsMask;
[CCode (cname = "XkbOneLevelIndex")]
public int OneLevelIndex;
[CCode (cname = "XkbNewKeyboardNotifyMask")]
public int NewKeyboardNotifyMask;
[CCode (cname = "XkbMapNotifyMask")]
public int MapNotifyMask;
[CCode (cname = "XkbStateNotifyMask")]
public int StateNotifyMask;
[CCode (cname = "XkbControlsNotifyMask")]
public int ControlsNotifyMask;
[CCode (cname = "XkbIndicatorStateNotifyMask")]
public int IndicatorStateNotifyMask;
[CCode (cname = "XkbIndicatorMapNotifyMask")]
public int IndicatorMapNotifyMask;
[CCode (cname = "XkbNamesNotifyMask")]
public int NamesNotifyMask;
[CCode (cname = "XkbCompatMapNotifyMask")]
public int CompatMapNotifyMask;
[CCode (cname = "XkbBellNotifyMask")]
public int BellNotifyMask;
[CCode (cname = "XkbActionMessageMask")]
public int ActionMessageMask;
[CCode (cname = "XkbAccessXNotifyMask")]
public int AccessXNotifyMask;
[CCode (cname = "XkbExtensionDeviceNotifyMask")]
public int ExtensionDeviceNotifyMask;
[CCode (cname = "XkbAllEventsMask")]
public int AllEventsMask;
[CCode (cname = "XkbAllControlsMask")]
public int AllControlsMask;
[CCode (cname = "XkbStateNotify")]
public int StateNotify;
[CCode (cname = "XkbGroupStateMask")]
public int GroupStateMask;
[CCode (cname = "XkbModifierStateMask")]
public int ModifierStateMask;
[CCode (cname = "XkbAllMapComponentsMask")]
public int AllMapComponentsMask;
[CCode (cname = "XkbKeySymsMask")]
public int KeySymsMask;
[CCode (cname = "XkbKeyTypesMask")]
public int KeyTypesMask;
[CCode (cname = "XkbSlowKeysMask")]
public int SlowKeysMask;
[CCode (cname = "XkbControlsEnabledMask")]
public int ControlsEnabledMask;
}
|