about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedlibxcb.c
blob: 8fedfa418507580786ba9e77d18ee903543f6969 (plain) (blame)
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
#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 "callback.h"
#include "librarian.h"
#include "box64context.h"
#include "emu/x64emu_private.h"
#include "myalign.h"

const char* libxcbName = "libxcb.so.1";
#define ALTNAME "libxcb.so"

#define LIBNAME libxcb

#define ADDED_FUNCTIONS()       \

#include "generated/wrappedlibxcbtypes.h"

#include "wrappercallback.h"

EXPORT void* my_xcb_connect(x64emu_t* emu, void* dispname, void* screen)
{
	return add_xcb_connection(my->xcb_connect(dispname, screen));
}

EXPORT void* my_xcb_connect_to_display_with_auth_info(x64emu_t* emu, void* dispname, void* auth, void* screen)
{
	return add_xcb_connection(my->xcb_connect_to_display_with_auth_info(dispname, auth, screen));
}

EXPORT void* my_xcb_connect_to_fd(x64emu_t* emu, int fd, void* auth)
{
	return add_xcb_connection(my->xcb_connect_to_fd(fd, auth));
}

EXPORT void my_xcb_disconnect(x64emu_t* emu, void* conn)
{
	my->xcb_disconnect(align_xcb_connection(conn));
	del_xcb_connection(conn);
}

#define NEEDED_LIBS "libXau.so.6", "libXdmcp.so.6"

#include "wrappedlib_init.h"