about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-07-04 10:30:17 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-07-04 10:30:17 +0200
commit796e6d3a875210051760d5a894c898231a13a268 (patch)
tree607973b9748deb24c0c69507aea2bd915df3c469 /src
parent6112505757deb33847d5e57aca7b9d15d148d0db (diff)
downloadbox64-796e6d3a875210051760d5a894c898231a13a268.tar.gz
box64-796e6d3a875210051760d5a894c898231a13a268.zip
Added wrapped libxcb-keysyms (for #17)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/library_list.h2
-rw-r--r--src/wrapped/generated/functions_list.txt1
-rw-r--r--src/wrapped/generated/wrapper.c3
-rw-r--r--src/wrapped/generated/wrapper.h1
-rwxr-xr-xsrc/wrapped/wrappedlibxcbkeysyms.c23
-rwxr-xr-xsrc/wrapped/wrappedlibxcbkeysyms_private.h18
6 files changed, 47 insertions, 1 deletions
diff --git a/src/library_list.h b/src/library_list.h
index 6dedf4b6..93767946 100755
--- a/src/library_list.h
+++ b/src/library_list.h
@@ -57,7 +57,7 @@ GO("libxcb-shape.so.0", libxcbshape)
 GO("libxcb-shm.so.0", libxcbshm)
 GO("libxcb-randr.so.0", libxcbrandr)
 GO("libxcb-image.so.0", libxcbimage)
-//GO("libxcb-keysyms.so.1", libxcbkeysyms)
+GO("libxcb-keysyms.so.1", libxcbkeysyms)
 //GO("libxcb-xtest.so.0", libxcbxtest)
 //GO("libxcb-dri2.so.0", libxcbdri2)
 //GO("libxcb-dri3.so.0", libxcbdri3)
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index 4910ca05..a4afd1e1 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -328,6 +328,7 @@
 #() uFupu
 #() uFupp
 #() uFpip
+#() uFpCi
 #() uFpuu
 #() uFpLp
 #() uFppi
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c
index ffb4b9d4..55d03bda 100644
--- a/src/wrapped/generated/wrapper.c
+++ b/src/wrapped/generated/wrapper.c
@@ -362,6 +362,7 @@ typedef uint64_t (*uFuup_t)(uint64_t, uint64_t, void*);
 typedef uint64_t (*uFupu_t)(uint64_t, void*, uint64_t);
 typedef uint64_t (*uFupp_t)(uint64_t, void*, void*);
 typedef uint64_t (*uFpip_t)(void*, int64_t, void*);
+typedef uint64_t (*uFpCi_t)(void*, uint8_t, int64_t);
 typedef uint64_t (*uFpuu_t)(void*, uint64_t, uint64_t);
 typedef uint64_t (*uFpLp_t)(void*, uintptr_t, void*);
 typedef uint64_t (*uFppi_t)(void*, void*, int64_t);
@@ -1685,6 +1686,7 @@ void uFuup(x64emu_t *emu, uintptr_t fcn) { uFuup_t fn = (uFuup_t)fcn; R_RAX=(uin
 void uFupu(x64emu_t *emu, uintptr_t fcn) { uFupu_t fn = (uFupu_t)fcn; R_RAX=(uint64_t)fn((uint64_t)R_RDI, (void*)R_RSI, (uint64_t)R_RDX); }
 void uFupp(x64emu_t *emu, uintptr_t fcn) { uFupp_t fn = (uFupp_t)fcn; R_RAX=(uint64_t)fn((uint64_t)R_RDI, (void*)R_RSI, (void*)R_RDX); }
 void uFpip(x64emu_t *emu, uintptr_t fcn) { uFpip_t fn = (uFpip_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (int64_t)R_RSI, (void*)R_RDX); }
+void uFpCi(x64emu_t *emu, uintptr_t fcn) { uFpCi_t fn = (uFpCi_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (uint8_t)R_RSI, (int64_t)R_RDX); }
 void uFpuu(x64emu_t *emu, uintptr_t fcn) { uFpuu_t fn = (uFpuu_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX); }
 void uFpLp(x64emu_t *emu, uintptr_t fcn) { uFpLp_t fn = (uFpLp_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (uintptr_t)R_RSI, (void*)R_RDX); }
 void uFppi(x64emu_t *emu, uintptr_t fcn) { uFppi_t fn = (uFppi_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX); }
@@ -2970,6 +2972,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &uFupu) return 1;
 	if (fun == &uFupp) return 1;
 	if (fun == &uFpip) return 1;
+	if (fun == &uFpCi) return 1;
 	if (fun == &uFpuu) return 1;
 	if (fun == &uFpLp) return 1;
 	if (fun == &uFppi) return 1;
diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h
index be7b2d48..a1ca9cb2 100644
--- a/src/wrapped/generated/wrapper.h
+++ b/src/wrapped/generated/wrapper.h
@@ -358,6 +358,7 @@ void uFuup(x64emu_t *emu, uintptr_t fnc);
 void uFupu(x64emu_t *emu, uintptr_t fnc);
 void uFupp(x64emu_t *emu, uintptr_t fnc);
 void uFpip(x64emu_t *emu, uintptr_t fnc);
+void uFpCi(x64emu_t *emu, uintptr_t fnc);
 void uFpuu(x64emu_t *emu, uintptr_t fnc);
 void uFpLp(x64emu_t *emu, uintptr_t fnc);
 void uFppi(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped/wrappedlibxcbkeysyms.c b/src/wrapped/wrappedlibxcbkeysyms.c
new file mode 100755
index 00000000..909c9045
--- /dev/null
+++ b/src/wrapped/wrappedlibxcbkeysyms.c
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define _GNU_SOURCE         /* See feature_test_macros(7) */
+#include <dlfcn.h>
+
+#include "wrappedlibs.h"
+
+#include "debug.h"
+#include "wrapper.h"
+#include "bridge.h"
+#include "librarian/library_private.h"
+#include "x64emu.h"
+#include "emu/x64emu_private.h"
+#include "callback.h"
+#include "librarian.h"
+#include "box64context.h"
+#include "emu/x64emu_private.h"
+
+const char* libxcbkeysymsName = "libxcb-keysyms.so.1";
+#define LIBNAME libxcbkeysyms
+
+#include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbkeysyms_private.h b/src/wrapped/wrappedlibxcbkeysyms_private.h
new file mode 100755
index 00000000..0a1b0a5a
--- /dev/null
+++ b/src/wrapped/wrappedlibxcbkeysyms_private.h
@@ -0,0 +1,18 @@
+#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
+#error meh!
+#endif
+
+GO(xcb_is_cursor_key, iFu)
+GO(xcb_is_function_key, iFu)
+GO(xcb_is_keypad_key, iFu)
+GO(xcb_is_misc_function_key, iFu)
+GO(xcb_is_modifier_key, iFu)
+GO(xcb_is_pf_key, iFu)
+GO(xcb_is_private_keypad_key, iFu)
+GO(xcb_key_press_lookup_keysym, uFppi)
+GO(xcb_key_release_lookup_keysym, uFppi)
+GO(xcb_key_symbols_alloc, pFp)
+GO(xcb_key_symbols_free, vFp)
+GO(xcb_key_symbols_get_keycode, pFpu)
+GO(xcb_key_symbols_get_keysym, uFpCi)
+GO(xcb_refresh_keyboard_mapping, iFpp)
\ No newline at end of file