1// This file is generated. Do not edit!
2// see https://github.com/hpvb/dynload-wrapper for details
3// generated by generate-wrapper.py 0.3 on 2023-01-23 15:11:35
4// flags: generate-wrapper.py --include ./thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h --sys-include "thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h" --soname libXinerama.so.1 --init-name xinerama --output-header ./platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c
5//
6// NOTE: Generated from Xinerama 1.1.4.
7// This has been handpatched to workaround some issues with the generator that
8// will be eventually fixed. In this case, non-existent symbols inherited from
9// libX11, but absent in libXinerama.so.1, were removed.
10#include <stdint.h>
11
12#define XineramaQueryExtension XineramaQueryExtension_dylibloader_orig_xinerama
13#define XineramaQueryVersion XineramaQueryVersion_dylibloader_orig_xinerama
14#define XineramaIsActive XineramaIsActive_dylibloader_orig_xinerama
15#define XineramaQueryScreens XineramaQueryScreens_dylibloader_orig_xinerama
16#include "thirdparty/linuxbsd_headers/X11/extensions/Xinerama.h"
17#undef XineramaQueryExtension
18#undef XineramaQueryVersion
19#undef XineramaIsActive
20#undef XineramaQueryScreens
21#include <dlfcn.h>
22#include <stdio.h>
23int (*XineramaQueryExtension_dylibloader_wrapper_xinerama)( Display*, int*, int*);
24int (*XineramaQueryVersion_dylibloader_wrapper_xinerama)( Display*, int*, int*);
25int (*XineramaIsActive_dylibloader_wrapper_xinerama)( Display*);
26XineramaScreenInfo* (*XineramaQueryScreens_dylibloader_wrapper_xinerama)( Display*, int*);
27int initialize_xinerama(int verbose) {
28 void *handle;
29 char *error;
30 handle = dlopen("libXinerama.so.1", RTLD_LAZY);
31 if (!handle) {
32 if (verbose) {
33 fprintf(stderr, "%s\n", dlerror());
34 }
35 return(1);
36 }
37 dlerror();
38// XineramaQueryExtension
39 *(void **) (&XineramaQueryExtension_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryExtension");
40 if (verbose) {
41 error = dlerror();
42 if (error != NULL) {
43 fprintf(stderr, "%s\n", error);
44 }
45 }
46// XineramaQueryVersion
47 *(void **) (&XineramaQueryVersion_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryVersion");
48 if (verbose) {
49 error = dlerror();
50 if (error != NULL) {
51 fprintf(stderr, "%s\n", error);
52 }
53 }
54// XineramaIsActive
55 *(void **) (&XineramaIsActive_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaIsActive");
56 if (verbose) {
57 error = dlerror();
58 if (error != NULL) {
59 fprintf(stderr, "%s\n", error);
60 }
61 }
62// XineramaQueryScreens
63 *(void **) (&XineramaQueryScreens_dylibloader_wrapper_xinerama) = dlsym(handle, "XineramaQueryScreens");
64 if (verbose) {
65 error = dlerror();
66 if (error != NULL) {
67 fprintf(stderr, "%s\n", error);
68 }
69 }
70return 0;
71}
72