No use as yet, but might as well ...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* @{
*/
+enum xkb_map_compile_flags {
+ /** Apparently you can't have empty enums. What a drag. */
+ XKB_MAP_COMPILE_PLACEHOLDER = 0,
+};
+
/**
* The primary keymap entry point: creates a new XKB keymap from a set of
* RMLVO (Rules + Model + Layout + Variant + Option) names.
*/
struct xkb_keymap *
xkb_map_new_from_names(struct xkb_context *context,
- const struct xkb_rule_names *names);
+ const struct xkb_rule_names *names,
+ enum xkb_map_compile_flags flags);
/**
* Deprecated entrypoint for legacy users who need to be able to compile
*/
struct xkb_keymap *
xkb_map_new_from_kccgst(struct xkb_context *context,
- const struct xkb_component_names *kccgst);
+ const struct xkb_component_names *kccgst,
+ enum xkb_map_compile_flags flags);
enum xkb_keymap_format {
/** The current/classic XKB text format, as generated by xkbcomp -xkb. */
*/
struct xkb_keymap *
xkb_map_new_from_fd(struct xkb_context *context,
- int fd, enum xkb_keymap_format format);
+ int fd, enum xkb_keymap_format format,
+ enum xkb_map_compile_flags flags);
/**
* Creates an XKB keymap from a full text XKB keymap serialised into one
struct xkb_keymap *
xkb_map_new_from_string(struct xkb_context *context,
const char *string,
- enum xkb_keymap_format format);
+ enum xkb_keymap_format format,
+ enum xkb_map_compile_flags flags);
/**
* Takes a new reference on a keymap.
_X_EXPORT struct xkb_keymap *
xkb_map_new_from_names(struct xkb_context *context,
- const struct xkb_rule_names *rmlvo)
+ const struct xkb_rule_names *rmlvo,
+ enum xkb_map_compile_flags flags)
{
XkbRF_VarDefsRec defs;
struct xkb_component_names *names;
return NULL;
}
- xkb = xkb_map_new_from_kccgst(context, names);
+ xkb = xkb_map_new_from_kccgst(context, names, 0);
free(names->keymap);
free(names->keycodes);
_X_EXPORT struct xkb_keymap *
xkb_map_new_from_kccgst(struct xkb_context *context,
- const struct xkb_component_names *kccgst)
+ const struct xkb_component_names *kccgst,
+ enum xkb_map_compile_flags flags)
{
XkbFile *file;
_X_EXPORT struct xkb_keymap *
xkb_map_new_from_string(struct xkb_context *context,
const char *string,
- enum xkb_keymap_format format)
+ enum xkb_keymap_format format,
+ enum xkb_map_compile_flags flags)
{
XkbFile *file;
_X_EXPORT struct xkb_keymap *
xkb_map_new_from_fd(struct xkb_context *context,
int fd,
- enum xkb_keymap_format format)
+ enum xkb_keymap_format format,
+ enum xkb_map_compile_flags flags)
{
XkbFile *file;
FILE *fptr;
fprintf(stderr, "\nCompiling path: %s\n", path);
- xkb = xkb_map_new_from_fd(context, fd, XKB_KEYMAP_FORMAT_TEXT_V1);
+ xkb = xkb_map_new_from_fd(context, fd, XKB_KEYMAP_FORMAT_TEXT_V1, 0);
close(fd);
if (!xkb) {
fprintf(stderr, "\nCompiling string\n");
- xkb = xkb_map_new_from_string(context, string, XKB_KEYMAP_FORMAT_TEXT_V1);
+ xkb = xkb_map_new_from_string(context, string, XKB_KEYMAP_FORMAT_TEXT_V1, 0);
if (!xkb) {
xkb_context_unref(context);
return 0;
fprintf(stderr, "\nCompiling %s %s %s %s\n", kccgst.keycodes, kccgst.types,
kccgst.compat, kccgst.symbols);
- xkb = xkb_map_new_from_kccgst(context, &kccgst);
+ xkb = xkb_map_new_from_kccgst(context, &kccgst, 0);
if (!xkb) {
ret = 0;
goto err_ctx;
fprintf(stderr, "\nCompiling %s %s %s %s %s\n", rmlvo.rules, rmlvo.model,
rmlvo.layout, rmlvo.variant, rmlvo.options);
- xkb = xkb_map_new_from_names(context, &rmlvo);
+ xkb = xkb_map_new_from_names(context, &rmlvo, 0);
if (!xkb) {
xkb_context_unref(context);
return 0;
context = xkb_context_new();
assert(context);
- xkb = xkb_map_new_from_names(context, &rmlvo);
+ xkb = xkb_map_new_from_names(context, &rmlvo, 0);
assert(xkb);
test_update_key(xkb);