commit 47820235dd71537ade58c1d596d3a2efabec3ec4
parent dcdbc1646482832bf164361eb8ea87e520fe57e6
Author: Michael Forney <mforney@mforney.org>
Date: Thu, 31 Jul 2014 19:07:52 -0700
xkb: Drop swc_ prefix for non-public structures/functions
Diffstat:
5 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/libswc/bindings.c b/libswc/bindings.c
@@ -80,7 +80,7 @@ static struct binding * find_binding(struct wl_array * bindings,
static struct binding * find_key_binding(uint32_t modifiers, uint32_t key)
{
struct binding * binding;
- struct swc_xkb * xkb = &swc.seat->keyboard->xkb;
+ struct xkb * xkb = &swc.seat->keyboard->xkb;
xkb_keysym_t keysym;
/* First try the keysym the keymap generates in it's current state. */
diff --git a/libswc/keyboard.c b/libswc/keyboard.c
@@ -113,7 +113,7 @@ static bool client_handle_modifiers
bool keyboard_initialize(struct keyboard * keyboard)
{
- if (!swc_xkb_initialize(&keyboard->xkb))
+ if (!xkb_initialize(&keyboard->xkb))
{
ERROR("Could not initialize XKB\n");
goto error0;
@@ -136,7 +136,7 @@ bool keyboard_initialize(struct keyboard * keyboard)
return true;
error1:
- swc_xkb_finalize(&keyboard->xkb);
+ xkb_finalize(&keyboard->xkb);
error0:
return false;
}
@@ -146,7 +146,7 @@ void keyboard_finalize(struct keyboard * keyboard)
wl_array_release(&keyboard->client_keys);
wl_array_release(&keyboard->keys);
input_focus_finalize(&keyboard->focus);
- swc_xkb_finalize(&keyboard->xkb);
+ xkb_finalize(&keyboard->xkb);
}
/**
@@ -198,7 +198,7 @@ void keyboard_handle_key(struct keyboard * keyboard, uint32_t time,
struct key * key;
struct keyboard_modifier_state modifier_state;
enum xkb_key_direction direction;
- struct swc_xkb * xkb = &keyboard->xkb;
+ struct xkb * xkb = &keyboard->xkb;
struct keyboard_handler * handler;
uint32_t serial;
diff --git a/libswc/keyboard.h b/libswc/keyboard.h
@@ -61,7 +61,7 @@ struct keyboard
{
struct input_focus focus;
struct input_focus_handler focus_handler;
- struct swc_xkb xkb;
+ struct xkb xkb;
struct wl_array keys;
struct wl_list handlers;
diff --git a/libswc/xkb.c b/libswc/xkb.c
@@ -36,7 +36,7 @@ const struct xkb_rule_names rule_names = {
static const char keymap_file_template[] = "swc-xkb-keymap-XXXXXX";
-bool swc_xkb_initialize(struct swc_xkb * xkb)
+bool xkb_initialize(struct xkb * xkb)
{
xkb->context = xkb_context_new(0);
@@ -62,7 +62,7 @@ bool swc_xkb_initialize(struct swc_xkb * xkb)
goto error2;
}
- if (!swc_xkb_update_keymap(xkb))
+ if (!xkb_update_keymap(xkb))
{
ERROR("Could not update XKB keymap\n");
goto error3;
@@ -80,7 +80,7 @@ bool swc_xkb_initialize(struct swc_xkb * xkb)
return false;
}
-void swc_xkb_finalize(struct swc_xkb * xkb)
+void xkb_finalize(struct xkb * xkb)
{
munmap(xkb->keymap.area, xkb->keymap.size);
close(xkb->keymap.fd);
@@ -89,7 +89,7 @@ void swc_xkb_finalize(struct swc_xkb * xkb)
xkb_context_unref(xkb->context);
}
-bool swc_xkb_update_keymap(struct swc_xkb * xkb)
+bool xkb_update_keymap(struct xkb * xkb)
{
const char * keymap_directory = getenv("XDG_RUNTIME_DIR") ?: "/tmp";
char * keymap_string;
@@ -158,7 +158,7 @@ bool swc_xkb_update_keymap(struct swc_xkb * xkb)
return false;
}
-void swc_xkb_update_key_indices(struct swc_xkb * xkb)
+void xkb_update_key_indices(struct xkb * xkb)
{
}
diff --git a/libswc/xkb.h b/libswc/xkb.h
@@ -30,7 +30,7 @@
/* Keycodes are offset by 8 in XKB. */
#define XKB_KEY(key) ((key) + 8)
-struct swc_xkb
+struct xkb
{
struct xkb_context * context;
struct xkb_state * state;
@@ -49,10 +49,10 @@ struct swc_xkb
} indices;
};
-bool swc_xkb_initialize(struct swc_xkb * xkb);
-void swc_xkb_finalize(struct swc_xkb * xkb);
+bool xkb_initialize(struct xkb * xkb);
+void xkb_finalize(struct xkb * xkb);
-bool swc_xkb_update_keymap(struct swc_xkb * xkb);
+bool xkb_update_keymap(struct xkb * xkb);
#endif