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:09:17 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-07-04 10:09:17 +0200
commitf5981c4dcaace86fbaf1bab341036400fc9e9e00 (patch)
tree87b9d003cf9bd8893d24cee73902b8a42219faf0 /src
parent6f183aa1ccf1a5c5c815fb23ac99c2edfea8c59a (diff)
downloadbox64-f5981c4dcaace86fbaf1bab341036400fc9e9e00.tar.gz
box64-f5981c4dcaace86fbaf1bab341036400fc9e9e00.zip
Added wrapped libxcb-shape (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.c2
-rw-r--r--src/wrapped/generated/wrapper.h1
-rwxr-xr-xsrc/wrapped/wrappedlibxcbshape.c23
-rwxr-xr-xsrc/wrapped/wrappedlibxcbshape_private.h39
6 files changed, 67 insertions, 1 deletions
diff --git a/src/library_list.h b/src/library_list.h
index 7a9b6e3c..cd093994 100755
--- a/src/library_list.h
+++ b/src/library_list.h
@@ -53,7 +53,7 @@ GO("libXdmcp.so.6", libxdmcp)
 GO("libX11-xcb.so.1", libx11xcb)
 GO("libxcb.so.1", libxcb)
 GO("libxcb-xfixes.so.0", libxcbxfixes)
-//GO("libxcb-shape.so.0", libxcbshape)
+GO("libxcb-shape.so.0", libxcbshape)
 //GO("libxcb-shm.so.0", libxcbshm)
 //GO("libxcb-randr.so.0", libxcbrandr)
 //GO("libxcb-image.so.0", libxcbimage)
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index 8066b666..912a3a43 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -1093,6 +1093,7 @@
 #() pFpCuWCCC
 #() pFpCuuwwp
 #() pFpCuuuuu
+#() pFpuuuwwu
 #() pFppiiCCC
 #() pFppuuppp
 #() pFpppuupp
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c
index 0e3c7f6d..0e68ec66 100644
--- a/src/wrapped/generated/wrapper.c
+++ b/src/wrapped/generated/wrapper.c
@@ -1127,6 +1127,7 @@ typedef void* (*pFpCuwwWW_t)(void*, uint8_t, uint64_t, int16_t, int16_t, uint16_
 typedef void* (*pFpCuWCCC_t)(void*, uint8_t, uint64_t, uint16_t, uint8_t, uint8_t, uint8_t);
 typedef void* (*pFpCuuwwp_t)(void*, uint8_t, uint64_t, uint64_t, int16_t, int16_t, void*);
 typedef void* (*pFpCuuuuu_t)(void*, uint8_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t);
+typedef void* (*pFpuuuwwu_t)(void*, uint64_t, uint64_t, uint64_t, int16_t, int16_t, uint64_t);
 typedef void* (*pFppiiCCC_t)(void*, void*, int64_t, int64_t, uint8_t, uint8_t, uint8_t);
 typedef void* (*pFppuuppp_t)(void*, void*, uint64_t, uint64_t, void*, void*, void*);
 typedef void* (*pFpppuupp_t)(void*, void*, void*, uint64_t, uint64_t, void*, void*);
@@ -2435,6 +2436,7 @@ void pFpCuwwWW(x64emu_t *emu, uintptr_t fcn) { pFpCuwwWW_t fn = (pFpCuwwWW_t)fcn
 void pFpCuWCCC(x64emu_t *emu, uintptr_t fcn) { pFpCuWCCC_t fn = (pFpCuWCCC_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint64_t)R_RDX, (uint16_t)R_RCX, (uint8_t)R_R8, (uint8_t)R_R9, *(uint8_t*)(R_RSP + 8)); }
 void pFpCuuwwp(x64emu_t *emu, uintptr_t fcn) { pFpCuuwwp_t fn = (pFpCuuwwp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (int16_t)R_R8, (int16_t)R_R9, *(void**)(R_RSP + 8)); }
 void pFpCuuuuu(x64emu_t *emu, uintptr_t fcn) { pFpCuuuuu_t fn = (pFpCuuuuu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint8_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (uint64_t)R_R9, *(uint64_t*)(R_RSP + 8)); }
+void pFpuuuwwu(x64emu_t *emu, uintptr_t fcn) { pFpuuuwwu_t fn = (pFpuuuwwu_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uint64_t)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (int16_t)R_R8, (int16_t)R_R9, *(uint64_t*)(R_RSP + 8)); }
 void pFppiiCCC(x64emu_t *emu, uintptr_t fcn) { pFppiiCCC_t fn = (pFppiiCCC_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (int64_t)R_RDX, (int64_t)R_RCX, (uint8_t)R_R8, (uint8_t)R_R9, *(uint8_t*)(R_RSP + 8)); }
 void pFppuuppp(x64emu_t *emu, uintptr_t fcn) { pFppuuppp_t fn = (pFppuuppp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (uint64_t)R_RDX, (uint64_t)R_RCX, (void*)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
 void pFpppuupp(x64emu_t *emu, uintptr_t fcn) { pFpppuupp_t fn = (pFpppuupp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (uint64_t)R_R8, (void*)R_R9, *(void**)(R_RSP + 8)); }
diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h
index 5556ac9d..2f4dafa0 100644
--- a/src/wrapped/generated/wrapper.h
+++ b/src/wrapped/generated/wrapper.h
@@ -1123,6 +1123,7 @@ void pFpCuwwWW(x64emu_t *emu, uintptr_t fnc);
 void pFpCuWCCC(x64emu_t *emu, uintptr_t fnc);
 void pFpCuuwwp(x64emu_t *emu, uintptr_t fnc);
 void pFpCuuuuu(x64emu_t *emu, uintptr_t fnc);
+void pFpuuuwwu(x64emu_t *emu, uintptr_t fnc);
 void pFppiiCCC(x64emu_t *emu, uintptr_t fnc);
 void pFppuuppp(x64emu_t *emu, uintptr_t fnc);
 void pFpppuupp(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped/wrappedlibxcbshape.c b/src/wrapped/wrappedlibxcbshape.c
new file mode 100755
index 00000000..3dc9c692
--- /dev/null
+++ b/src/wrapped/wrappedlibxcbshape.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* libxcbshapeName = "libxcb-shape.so.0";
+#define LIBNAME libxcbshape
+
+#include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbshape_private.h b/src/wrapped/wrappedlibxcbshape_private.h
new file mode 100755
index 00000000..78346d83
--- /dev/null
+++ b/src/wrapped/wrappedlibxcbshape_private.h
@@ -0,0 +1,39 @@
+#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
+#error meh!
+#endif
+
+//GO(xcb_shape_combine, 
+//GO(xcb_shape_combine_checked, 
+//GO(xcb_shape_get_rectangles, 
+//GO(xcb_shape_get_rectangles_rectangles, 
+//GO(xcb_shape_get_rectangles_rectangles_iterator, 
+//GO(xcb_shape_get_rectangles_rectangles_length, 
+//GO(xcb_shape_get_rectangles_reply, 
+//GO(xcb_shape_get_rectangles_sizeof, 
+//GO(xcb_shape_get_rectangles_unchecked, 
+DATA(xcb_shape_id, 8)
+//GO(xcb_shape_input_selected, 
+//GO(xcb_shape_input_selected_reply, 
+//GO(xcb_shape_input_selected_unchecked, 
+//GO(xcb_shape_kind_end, 
+//GO(xcb_shape_kind_next, 
+GO(xcb_shape_mask, pFpuuuwwu)
+GO(xcb_shape_mask_checked, pFpuuuwwu)
+//GO(xcb_shape_offset, 
+//GO(xcb_shape_offset_checked, 
+//GO(xcb_shape_op_end, 
+//GO(xcb_shape_op_next, 
+//GO(xcb_shape_query_extents, 
+//GO(xcb_shape_query_extents_reply, 
+//GO(xcb_shape_query_extents_unchecked, 
+//GO(xcb_shape_query_version, 
+//GO(xcb_shape_query_version_reply, 
+//GO(xcb_shape_query_version_unchecked, 
+//GO(xcb_shape_rectangles, 
+//GO(xcb_shape_rectangles_checked, 
+//GO(xcb_shape_rectangles_rectangles, 
+//GO(xcb_shape_rectangles_rectangles_iterator, 
+//GO(xcb_shape_rectangles_rectangles_length, 
+//GO(xcb_shape_rectangles_sizeof, 
+//GO(xcb_shape_select_input, 
+//GO(xcb_shape_select_input_checked,