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:29
4// flags: generate-wrapper.py --sys-include "thirdparty/linuxbsd_headers/X11/extensions/Xext.h" --include ./thirdparty/linuxbsd_headers/X11/extensions/shape.h --sys-include "thirdparty/linuxbsd_headers/X11/extensions/shape.h" --soname libXext.so.6 --init-name xext --output-header ./platform/linuxbsd/x11/dynwrappers/xext-so_wrap.h --output-implementation ./platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c
5//
6// NOTE: Generated from Xext 1.3.5.
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 libXext.so.6, were removed and an include needed for
10// proper parsing was added (this had also to be temporarily added to the
11// original header, as dynload-wrapper would complain otherwise)
12#include <stdint.h>
13
14// HANDPATCH: Needed for a successful compilation.
15#include "thirdparty/linuxbsd_headers/X11/Xlib.h"
16
17#define XShapeQueryExtension XShapeQueryExtension_dylibloader_orig_xext
18#define XShapeQueryVersion XShapeQueryVersion_dylibloader_orig_xext
19#define XShapeCombineRegion XShapeCombineRegion_dylibloader_orig_xext
20#define XShapeCombineRectangles XShapeCombineRectangles_dylibloader_orig_xext
21#define XShapeCombineMask XShapeCombineMask_dylibloader_orig_xext
22#define XShapeCombineShape XShapeCombineShape_dylibloader_orig_xext
23#define XShapeOffsetShape XShapeOffsetShape_dylibloader_orig_xext
24#define XShapeQueryExtents XShapeQueryExtents_dylibloader_orig_xext
25#define XShapeSelectInput XShapeSelectInput_dylibloader_orig_xext
26#define XShapeInputSelected XShapeInputSelected_dylibloader_orig_xext
27#define XShapeGetRectangles XShapeGetRectangles_dylibloader_orig_xext
28#include "thirdparty/linuxbsd_headers/X11/extensions/Xext.h"
29#include "thirdparty/linuxbsd_headers/X11/extensions/shape.h"
30#undef XShapeQueryExtension
31#undef XShapeQueryVersion
32#undef XShapeCombineRegion
33#undef XShapeCombineRectangles
34#undef XShapeCombineMask
35#undef XShapeCombineShape
36#undef XShapeOffsetShape
37#undef XShapeQueryExtents
38#undef XShapeSelectInput
39#undef XShapeInputSelected
40#undef XShapeGetRectangles
41#include <dlfcn.h>
42#include <stdio.h>
43int (*XShapeQueryExtension_dylibloader_wrapper_xext)( Display*, int*, int*);
44int (*XShapeQueryVersion_dylibloader_wrapper_xext)( Display*, int*, int*);
45void (*XShapeCombineRegion_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Region, int);
46void (*XShapeCombineRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int, int, XRectangle*, int, int, int);
47void (*XShapeCombineMask_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Pixmap, int);
48void (*XShapeCombineShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int, Window, int, int);
49void (*XShapeOffsetShape_dylibloader_wrapper_xext)( Display*, Window, int, int, int);
50int (*XShapeQueryExtents_dylibloader_wrapper_xext)( Display*, Window, int*, int*, int*, unsigned int*, unsigned int*, int*, int*, int*, unsigned int*, unsigned int*);
51void (*XShapeSelectInput_dylibloader_wrapper_xext)( Display*, Window, unsigned long);
52unsigned long (*XShapeInputSelected_dylibloader_wrapper_xext)( Display*, Window);
53XRectangle* (*XShapeGetRectangles_dylibloader_wrapper_xext)( Display*, Window, int, int*, int*);
54int initialize_xext(int verbose) {
55 void *handle;
56 char *error;
57 handle = dlopen("libXext.so.6", RTLD_LAZY);
58 if (!handle) {
59 if (verbose) {
60 fprintf(stderr, "%s\n", dlerror());
61 }
62 return(1);
63 }
64 dlerror();
65// XShapeQueryExtension
66 *(void **) (&XShapeQueryExtension_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryExtension");
67 if (verbose) {
68 error = dlerror();
69 if (error != NULL) {
70 fprintf(stderr, "%s\n", error);
71 }
72 }
73// XShapeQueryVersion
74 *(void **) (&XShapeQueryVersion_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryVersion");
75 if (verbose) {
76 error = dlerror();
77 if (error != NULL) {
78 fprintf(stderr, "%s\n", error);
79 }
80 }
81// XShapeCombineRegion
82 *(void **) (&XShapeCombineRegion_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineRegion");
83 if (verbose) {
84 error = dlerror();
85 if (error != NULL) {
86 fprintf(stderr, "%s\n", error);
87 }
88 }
89// XShapeCombineRectangles
90 *(void **) (&XShapeCombineRectangles_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineRectangles");
91 if (verbose) {
92 error = dlerror();
93 if (error != NULL) {
94 fprintf(stderr, "%s\n", error);
95 }
96 }
97// XShapeCombineMask
98 *(void **) (&XShapeCombineMask_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineMask");
99 if (verbose) {
100 error = dlerror();
101 if (error != NULL) {
102 fprintf(stderr, "%s\n", error);
103 }
104 }
105// XShapeCombineShape
106 *(void **) (&XShapeCombineShape_dylibloader_wrapper_xext) = dlsym(handle, "XShapeCombineShape");
107 if (verbose) {
108 error = dlerror();
109 if (error != NULL) {
110 fprintf(stderr, "%s\n", error);
111 }
112 }
113// XShapeOffsetShape
114 *(void **) (&XShapeOffsetShape_dylibloader_wrapper_xext) = dlsym(handle, "XShapeOffsetShape");
115 if (verbose) {
116 error = dlerror();
117 if (error != NULL) {
118 fprintf(stderr, "%s\n", error);
119 }
120 }
121// XShapeQueryExtents
122 *(void **) (&XShapeQueryExtents_dylibloader_wrapper_xext) = dlsym(handle, "XShapeQueryExtents");
123 if (verbose) {
124 error = dlerror();
125 if (error != NULL) {
126 fprintf(stderr, "%s\n", error);
127 }
128 }
129// XShapeSelectInput
130 *(void **) (&XShapeSelectInput_dylibloader_wrapper_xext) = dlsym(handle, "XShapeSelectInput");
131 if (verbose) {
132 error = dlerror();
133 if (error != NULL) {
134 fprintf(stderr, "%s\n", error);
135 }
136 }
137// XShapeInputSelected
138 *(void **) (&XShapeInputSelected_dylibloader_wrapper_xext) = dlsym(handle, "XShapeInputSelected");
139 if (verbose) {
140 error = dlerror();
141 if (error != NULL) {
142 fprintf(stderr, "%s\n", error);
143 }
144 }
145// XShapeGetRectangles
146 *(void **) (&XShapeGetRectangles_dylibloader_wrapper_xext) = dlsym(handle, "XShapeGetRectangles");
147 if (verbose) {
148 error = dlerror();
149 if (error != NULL) {
150 fprintf(stderr, "%s\n", error);
151 }
152 }
153return 0;
154}
155