wayland-client-core-so_wrap.c 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. // This file is generated. Do not edit!
  2. // see https://github.com/hpvb/dynload-wrapper for details
  3. // generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-25 17:36:12
  4. // flags: ../dynload-wrapper/generate-wrapper.py --include ./thirdparty/linuxbsd_headers/wayland/wayland-client-core.h --sys-include "./thirdparty/linuxbsd_headers/wayland/wayland-client-core.h" --soname libwayland-client.so.0 --init-name wayland_client --output-header platform/linuxbsd/wayland/dynwrappers/wayland-client-core-so_wrap.h --output-implementation platform/linuxbsd/wayland/dynwrappers/wayland-client-core-so_wrap.c
  5. //
  6. // NOTE: This has been hand-patched to workaround some issues.
  7. #include <stdint.h>
  8. #define wl_list_init wl_list_init_dylibloader_orig_wayland_client
  9. #define wl_list_insert wl_list_insert_dylibloader_orig_wayland_client
  10. #define wl_list_remove wl_list_remove_dylibloader_orig_wayland_client
  11. #define wl_list_length wl_list_length_dylibloader_orig_wayland_client
  12. #define wl_list_empty wl_list_empty_dylibloader_orig_wayland_client
  13. #define wl_list_insert_list wl_list_insert_list_dylibloader_orig_wayland_client
  14. #define wl_array_init wl_array_init_dylibloader_orig_wayland_client
  15. #define wl_array_release wl_array_release_dylibloader_orig_wayland_client
  16. #define wl_array_add wl_array_add_dylibloader_orig_wayland_client
  17. #define wl_array_copy wl_array_copy_dylibloader_orig_wayland_client
  18. #define wl_event_queue_destroy wl_event_queue_destroy_dylibloader_orig_wayland_client
  19. #define wl_proxy_marshal_flags wl_proxy_marshal_flags_dylibloader_orig_wayland_client
  20. #define wl_proxy_marshal_array_flags wl_proxy_marshal_array_flags_dylibloader_orig_wayland_client
  21. #define wl_proxy_marshal wl_proxy_marshal_dylibloader_orig_wayland_client
  22. #define wl_proxy_marshal_array wl_proxy_marshal_array_dylibloader_orig_wayland_client
  23. #define wl_proxy_create wl_proxy_create_dylibloader_orig_wayland_client
  24. #define wl_proxy_create_wrapper wl_proxy_create_wrapper_dylibloader_orig_wayland_client
  25. #define wl_proxy_wrapper_destroy wl_proxy_wrapper_destroy_dylibloader_orig_wayland_client
  26. #define wl_proxy_marshal_constructor wl_proxy_marshal_constructor_dylibloader_orig_wayland_client
  27. #define wl_proxy_marshal_constructor_versioned wl_proxy_marshal_constructor_versioned_dylibloader_orig_wayland_client
  28. #define wl_proxy_marshal_array_constructor wl_proxy_marshal_array_constructor_dylibloader_orig_wayland_client
  29. #define wl_proxy_marshal_array_constructor_versioned wl_proxy_marshal_array_constructor_versioned_dylibloader_orig_wayland_client
  30. #define wl_proxy_destroy wl_proxy_destroy_dylibloader_orig_wayland_client
  31. #define wl_proxy_add_listener wl_proxy_add_listener_dylibloader_orig_wayland_client
  32. #define wl_proxy_get_listener wl_proxy_get_listener_dylibloader_orig_wayland_client
  33. #define wl_proxy_add_dispatcher wl_proxy_add_dispatcher_dylibloader_orig_wayland_client
  34. #define wl_proxy_set_user_data wl_proxy_set_user_data_dylibloader_orig_wayland_client
  35. #define wl_proxy_get_user_data wl_proxy_get_user_data_dylibloader_orig_wayland_client
  36. #define wl_proxy_get_version wl_proxy_get_version_dylibloader_orig_wayland_client
  37. #define wl_proxy_get_id wl_proxy_get_id_dylibloader_orig_wayland_client
  38. #define wl_proxy_set_tag wl_proxy_set_tag_dylibloader_orig_wayland_client
  39. #define wl_proxy_get_tag wl_proxy_get_tag_dylibloader_orig_wayland_client
  40. #define wl_proxy_get_class wl_proxy_get_class_dylibloader_orig_wayland_client
  41. #define wl_proxy_set_queue wl_proxy_set_queue_dylibloader_orig_wayland_client
  42. #define wl_display_connect wl_display_connect_dylibloader_orig_wayland_client
  43. #define wl_display_connect_to_fd wl_display_connect_to_fd_dylibloader_orig_wayland_client
  44. #define wl_display_disconnect wl_display_disconnect_dylibloader_orig_wayland_client
  45. #define wl_display_get_fd wl_display_get_fd_dylibloader_orig_wayland_client
  46. #define wl_display_dispatch wl_display_dispatch_dylibloader_orig_wayland_client
  47. #define wl_display_dispatch_queue wl_display_dispatch_queue_dylibloader_orig_wayland_client
  48. #define wl_display_dispatch_queue_pending wl_display_dispatch_queue_pending_dylibloader_orig_wayland_client
  49. #define wl_display_dispatch_pending wl_display_dispatch_pending_dylibloader_orig_wayland_client
  50. #define wl_display_get_error wl_display_get_error_dylibloader_orig_wayland_client
  51. #define wl_display_get_protocol_error wl_display_get_protocol_error_dylibloader_orig_wayland_client
  52. #define wl_display_flush wl_display_flush_dylibloader_orig_wayland_client
  53. #define wl_display_roundtrip_queue wl_display_roundtrip_queue_dylibloader_orig_wayland_client
  54. #define wl_display_roundtrip wl_display_roundtrip_dylibloader_orig_wayland_client
  55. #define wl_display_create_queue wl_display_create_queue_dylibloader_orig_wayland_client
  56. #define wl_display_prepare_read_queue wl_display_prepare_read_queue_dylibloader_orig_wayland_client
  57. #define wl_display_prepare_read wl_display_prepare_read_dylibloader_orig_wayland_client
  58. #define wl_display_cancel_read wl_display_cancel_read_dylibloader_orig_wayland_client
  59. #define wl_display_read_events wl_display_read_events_dylibloader_orig_wayland_client
  60. #define wl_log_set_handler_client wl_log_set_handler_client_dylibloader_orig_wayland_client
  61. #include "./thirdparty/linuxbsd_headers/wayland/wayland-client-core.h"
  62. #undef wl_list_init
  63. #undef wl_list_insert
  64. #undef wl_list_remove
  65. #undef wl_list_length
  66. #undef wl_list_empty
  67. #undef wl_list_insert_list
  68. #undef wl_array_init
  69. #undef wl_array_release
  70. #undef wl_array_add
  71. #undef wl_array_copy
  72. #undef wl_event_queue_destroy
  73. #undef wl_proxy_marshal_flags
  74. #undef wl_proxy_marshal_array_flags
  75. #undef wl_proxy_marshal
  76. #undef wl_proxy_marshal_array
  77. #undef wl_proxy_create
  78. #undef wl_proxy_create_wrapper
  79. #undef wl_proxy_wrapper_destroy
  80. #undef wl_proxy_marshal_constructor
  81. #undef wl_proxy_marshal_constructor_versioned
  82. #undef wl_proxy_marshal_array_constructor
  83. #undef wl_proxy_marshal_array_constructor_versioned
  84. #undef wl_proxy_destroy
  85. #undef wl_proxy_add_listener
  86. #undef wl_proxy_get_listener
  87. #undef wl_proxy_add_dispatcher
  88. #undef wl_proxy_set_user_data
  89. #undef wl_proxy_get_user_data
  90. #undef wl_proxy_get_version
  91. #undef wl_proxy_get_id
  92. #undef wl_proxy_set_tag
  93. #undef wl_proxy_get_tag
  94. #undef wl_proxy_get_class
  95. #undef wl_proxy_set_queue
  96. #undef wl_display_connect
  97. #undef wl_display_connect_to_fd
  98. #undef wl_display_disconnect
  99. #undef wl_display_get_fd
  100. #undef wl_display_dispatch
  101. #undef wl_display_dispatch_queue
  102. #undef wl_display_dispatch_queue_pending
  103. #undef wl_display_dispatch_pending
  104. #undef wl_display_get_error
  105. #undef wl_display_get_protocol_error
  106. #undef wl_display_flush
  107. #undef wl_display_roundtrip_queue
  108. #undef wl_display_roundtrip
  109. #undef wl_display_create_queue
  110. #undef wl_display_prepare_read_queue
  111. #undef wl_display_prepare_read
  112. #undef wl_display_cancel_read
  113. #undef wl_display_read_events
  114. #undef wl_log_set_handler_client
  115. #include <dlfcn.h>
  116. #include <stdio.h>
  117. void (*wl_list_init_dylibloader_wrapper_wayland_client)(struct wl_list*);
  118. void (*wl_list_insert_dylibloader_wrapper_wayland_client)(struct wl_list*,struct wl_list*);
  119. void (*wl_list_remove_dylibloader_wrapper_wayland_client)(struct wl_list*);
  120. int (*wl_list_length_dylibloader_wrapper_wayland_client)(struct wl_list*);
  121. int (*wl_list_empty_dylibloader_wrapper_wayland_client)(struct wl_list*);
  122. void (*wl_list_insert_list_dylibloader_wrapper_wayland_client)(struct wl_list*,struct wl_list*);
  123. void (*wl_array_init_dylibloader_wrapper_wayland_client)(struct wl_array*);
  124. void (*wl_array_release_dylibloader_wrapper_wayland_client)(struct wl_array*);
  125. void* (*wl_array_add_dylibloader_wrapper_wayland_client)(struct wl_array*, size_t);
  126. int (*wl_array_copy_dylibloader_wrapper_wayland_client)(struct wl_array*,struct wl_array*);
  127. void (*wl_event_queue_destroy_dylibloader_wrapper_wayland_client)(struct wl_event_queue*);
  128. struct wl_proxy* (*wl_proxy_marshal_flags_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,const struct wl_interface*, uint32_t, uint32_t,...);
  129. struct wl_proxy* (*wl_proxy_marshal_array_flags_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,const struct wl_interface*, uint32_t, uint32_t,union wl_argument);
  130. void (*wl_proxy_marshal_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,...);
  131. void (*wl_proxy_marshal_array_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,union wl_argument);
  132. struct wl_proxy* (*wl_proxy_create_dylibloader_wrapper_wayland_client)(struct wl_proxy*,const struct wl_interface*);
  133. void* (*wl_proxy_create_wrapper_dylibloader_wrapper_wayland_client)( void*);
  134. void (*wl_proxy_wrapper_destroy_dylibloader_wrapper_wayland_client)( void*);
  135. struct wl_proxy* (*wl_proxy_marshal_constructor_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,const struct wl_interface*,...);
  136. struct wl_proxy* (*wl_proxy_marshal_constructor_versioned_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,const struct wl_interface*, uint32_t,...);
  137. struct wl_proxy* (*wl_proxy_marshal_array_constructor_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,union wl_argument,const struct wl_interface*);
  138. struct wl_proxy* (*wl_proxy_marshal_array_constructor_versioned_dylibloader_wrapper_wayland_client)(struct wl_proxy*, uint32_t,union wl_argument,const struct wl_interface*, uint32_t);
  139. void (*wl_proxy_destroy_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
  140. int (*wl_proxy_add_listener_dylibloader_wrapper_wayland_client)(struct wl_proxy*, void(**)(void), void*);
  141. const void* (*wl_proxy_get_listener_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
  142. int (*wl_proxy_add_dispatcher_dylibloader_wrapper_wayland_client)(struct wl_proxy*, wl_dispatcher_func_t,const void*, void*);
  143. void (*wl_proxy_set_user_data_dylibloader_wrapper_wayland_client)(struct wl_proxy*, void*);
  144. void* (*wl_proxy_get_user_data_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
  145. uint32_t (*wl_proxy_get_version_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
  146. uint32_t (*wl_proxy_get_id_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
  147. void (*wl_proxy_set_tag_dylibloader_wrapper_wayland_client)(struct wl_proxy*,const char**);
  148. const char** (*wl_proxy_get_tag_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
  149. const char* (*wl_proxy_get_class_dylibloader_wrapper_wayland_client)(struct wl_proxy*);
  150. void (*wl_proxy_set_queue_dylibloader_wrapper_wayland_client)(struct wl_proxy*,struct wl_event_queue*);
  151. struct wl_display* (*wl_display_connect_dylibloader_wrapper_wayland_client)(const char*);
  152. struct wl_display* (*wl_display_connect_to_fd_dylibloader_wrapper_wayland_client)( int);
  153. void (*wl_display_disconnect_dylibloader_wrapper_wayland_client)(struct wl_display*);
  154. int (*wl_display_get_fd_dylibloader_wrapper_wayland_client)(struct wl_display*);
  155. int (*wl_display_dispatch_dylibloader_wrapper_wayland_client)(struct wl_display*);
  156. int (*wl_display_dispatch_queue_dylibloader_wrapper_wayland_client)(struct wl_display*,struct wl_event_queue*);
  157. int (*wl_display_dispatch_queue_pending_dylibloader_wrapper_wayland_client)(struct wl_display*,struct wl_event_queue*);
  158. int (*wl_display_dispatch_pending_dylibloader_wrapper_wayland_client)(struct wl_display*);
  159. int (*wl_display_get_error_dylibloader_wrapper_wayland_client)(struct wl_display*);
  160. uint32_t (*wl_display_get_protocol_error_dylibloader_wrapper_wayland_client)(struct wl_display*,const struct wl_interface**, uint32_t*);
  161. int (*wl_display_flush_dylibloader_wrapper_wayland_client)(struct wl_display*);
  162. int (*wl_display_roundtrip_queue_dylibloader_wrapper_wayland_client)(struct wl_display*,struct wl_event_queue*);
  163. int (*wl_display_roundtrip_dylibloader_wrapper_wayland_client)(struct wl_display*);
  164. struct wl_event_queue* (*wl_display_create_queue_dylibloader_wrapper_wayland_client)(struct wl_display*);
  165. int (*wl_display_prepare_read_queue_dylibloader_wrapper_wayland_client)(struct wl_display*,struct wl_event_queue*);
  166. int (*wl_display_prepare_read_dylibloader_wrapper_wayland_client)(struct wl_display*);
  167. void (*wl_display_cancel_read_dylibloader_wrapper_wayland_client)(struct wl_display*);
  168. int (*wl_display_read_events_dylibloader_wrapper_wayland_client)(struct wl_display*);
  169. void (*wl_log_set_handler_client_dylibloader_wrapper_wayland_client)( wl_log_func_t);
  170. int initialize_wayland_client(int verbose) {
  171. void *handle;
  172. char *error;
  173. handle = dlopen("libwayland-client.so.0", RTLD_LAZY);
  174. if (!handle) {
  175. if (verbose) {
  176. fprintf(stderr, "%s\n", dlerror());
  177. }
  178. return(1);
  179. }
  180. dlerror();
  181. // wl_list_init
  182. *(void **) (&wl_list_init_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_list_init");
  183. if (verbose) {
  184. error = dlerror();
  185. if (error != NULL) {
  186. fprintf(stderr, "%s\n", error);
  187. }
  188. }
  189. // wl_list_insert
  190. *(void **) (&wl_list_insert_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_list_insert");
  191. if (verbose) {
  192. error = dlerror();
  193. if (error != NULL) {
  194. fprintf(stderr, "%s\n", error);
  195. }
  196. }
  197. // wl_list_remove
  198. *(void **) (&wl_list_remove_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_list_remove");
  199. if (verbose) {
  200. error = dlerror();
  201. if (error != NULL) {
  202. fprintf(stderr, "%s\n", error);
  203. }
  204. }
  205. // wl_list_length
  206. *(void **) (&wl_list_length_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_list_length");
  207. if (verbose) {
  208. error = dlerror();
  209. if (error != NULL) {
  210. fprintf(stderr, "%s\n", error);
  211. }
  212. }
  213. // wl_list_empty
  214. *(void **) (&wl_list_empty_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_list_empty");
  215. if (verbose) {
  216. error = dlerror();
  217. if (error != NULL) {
  218. fprintf(stderr, "%s\n", error);
  219. }
  220. }
  221. // wl_list_insert_list
  222. *(void **) (&wl_list_insert_list_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_list_insert_list");
  223. if (verbose) {
  224. error = dlerror();
  225. if (error != NULL) {
  226. fprintf(stderr, "%s\n", error);
  227. }
  228. }
  229. // wl_array_init
  230. *(void **) (&wl_array_init_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_array_init");
  231. if (verbose) {
  232. error = dlerror();
  233. if (error != NULL) {
  234. fprintf(stderr, "%s\n", error);
  235. }
  236. }
  237. // wl_array_release
  238. *(void **) (&wl_array_release_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_array_release");
  239. if (verbose) {
  240. error = dlerror();
  241. if (error != NULL) {
  242. fprintf(stderr, "%s\n", error);
  243. }
  244. }
  245. // wl_array_add
  246. *(void **) (&wl_array_add_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_array_add");
  247. if (verbose) {
  248. error = dlerror();
  249. if (error != NULL) {
  250. fprintf(stderr, "%s\n", error);
  251. }
  252. }
  253. // wl_array_copy
  254. *(void **) (&wl_array_copy_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_array_copy");
  255. if (verbose) {
  256. error = dlerror();
  257. if (error != NULL) {
  258. fprintf(stderr, "%s\n", error);
  259. }
  260. }
  261. // wl_event_queue_destroy
  262. *(void **) (&wl_event_queue_destroy_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_event_queue_destroy");
  263. if (verbose) {
  264. error = dlerror();
  265. if (error != NULL) {
  266. fprintf(stderr, "%s\n", error);
  267. }
  268. }
  269. // wl_proxy_marshal_flags
  270. *(void **) (&wl_proxy_marshal_flags_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_flags");
  271. if (verbose) {
  272. error = dlerror();
  273. if (error != NULL) {
  274. fprintf(stderr, "%s\n", error);
  275. }
  276. }
  277. // wl_proxy_marshal_array_flags
  278. *(void **) (&wl_proxy_marshal_array_flags_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_array_flags");
  279. if (verbose) {
  280. error = dlerror();
  281. if (error != NULL) {
  282. fprintf(stderr, "%s\n", error);
  283. }
  284. }
  285. // wl_proxy_marshal
  286. *(void **) (&wl_proxy_marshal_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal");
  287. if (verbose) {
  288. error = dlerror();
  289. if (error != NULL) {
  290. fprintf(stderr, "%s\n", error);
  291. }
  292. }
  293. // wl_proxy_marshal_array
  294. *(void **) (&wl_proxy_marshal_array_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_array");
  295. if (verbose) {
  296. error = dlerror();
  297. if (error != NULL) {
  298. fprintf(stderr, "%s\n", error);
  299. }
  300. }
  301. // wl_proxy_create
  302. *(void **) (&wl_proxy_create_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_create");
  303. if (verbose) {
  304. error = dlerror();
  305. if (error != NULL) {
  306. fprintf(stderr, "%s\n", error);
  307. }
  308. }
  309. // wl_proxy_create_wrapper
  310. *(void **) (&wl_proxy_create_wrapper_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_create_wrapper");
  311. if (verbose) {
  312. error = dlerror();
  313. if (error != NULL) {
  314. fprintf(stderr, "%s\n", error);
  315. }
  316. }
  317. // wl_proxy_wrapper_destroy
  318. *(void **) (&wl_proxy_wrapper_destroy_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_wrapper_destroy");
  319. if (verbose) {
  320. error = dlerror();
  321. if (error != NULL) {
  322. fprintf(stderr, "%s\n", error);
  323. }
  324. }
  325. // wl_proxy_marshal_constructor
  326. *(void **) (&wl_proxy_marshal_constructor_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_constructor");
  327. if (verbose) {
  328. error = dlerror();
  329. if (error != NULL) {
  330. fprintf(stderr, "%s\n", error);
  331. }
  332. }
  333. // wl_proxy_marshal_constructor_versioned
  334. *(void **) (&wl_proxy_marshal_constructor_versioned_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_constructor_versioned");
  335. if (verbose) {
  336. error = dlerror();
  337. if (error != NULL) {
  338. fprintf(stderr, "%s\n", error);
  339. }
  340. }
  341. // wl_proxy_marshal_array_constructor
  342. *(void **) (&wl_proxy_marshal_array_constructor_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_array_constructor");
  343. if (verbose) {
  344. error = dlerror();
  345. if (error != NULL) {
  346. fprintf(stderr, "%s\n", error);
  347. }
  348. }
  349. // wl_proxy_marshal_array_constructor_versioned
  350. *(void **) (&wl_proxy_marshal_array_constructor_versioned_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_marshal_array_constructor_versioned");
  351. if (verbose) {
  352. error = dlerror();
  353. if (error != NULL) {
  354. fprintf(stderr, "%s\n", error);
  355. }
  356. }
  357. // wl_proxy_destroy
  358. *(void **) (&wl_proxy_destroy_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_destroy");
  359. if (verbose) {
  360. error = dlerror();
  361. if (error != NULL) {
  362. fprintf(stderr, "%s\n", error);
  363. }
  364. }
  365. // wl_proxy_add_listener
  366. *(void **) (&wl_proxy_add_listener_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_add_listener");
  367. if (verbose) {
  368. error = dlerror();
  369. if (error != NULL) {
  370. fprintf(stderr, "%s\n", error);
  371. }
  372. }
  373. // wl_proxy_get_listener
  374. *(void **) (&wl_proxy_get_listener_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_get_listener");
  375. if (verbose) {
  376. error = dlerror();
  377. if (error != NULL) {
  378. fprintf(stderr, "%s\n", error);
  379. }
  380. }
  381. // wl_proxy_add_dispatcher
  382. *(void **) (&wl_proxy_add_dispatcher_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_add_dispatcher");
  383. if (verbose) {
  384. error = dlerror();
  385. if (error != NULL) {
  386. fprintf(stderr, "%s\n", error);
  387. }
  388. }
  389. // wl_proxy_set_user_data
  390. *(void **) (&wl_proxy_set_user_data_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_set_user_data");
  391. if (verbose) {
  392. error = dlerror();
  393. if (error != NULL) {
  394. fprintf(stderr, "%s\n", error);
  395. }
  396. }
  397. // wl_proxy_get_user_data
  398. *(void **) (&wl_proxy_get_user_data_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_get_user_data");
  399. if (verbose) {
  400. error = dlerror();
  401. if (error != NULL) {
  402. fprintf(stderr, "%s\n", error);
  403. }
  404. }
  405. // wl_proxy_get_version
  406. *(void **) (&wl_proxy_get_version_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_get_version");
  407. if (verbose) {
  408. error = dlerror();
  409. if (error != NULL) {
  410. fprintf(stderr, "%s\n", error);
  411. }
  412. }
  413. // wl_proxy_get_id
  414. *(void **) (&wl_proxy_get_id_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_get_id");
  415. if (verbose) {
  416. error = dlerror();
  417. if (error != NULL) {
  418. fprintf(stderr, "%s\n", error);
  419. }
  420. }
  421. // wl_proxy_set_tag
  422. *(void **) (&wl_proxy_set_tag_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_set_tag");
  423. if (verbose) {
  424. error = dlerror();
  425. if (error != NULL) {
  426. fprintf(stderr, "%s\n", error);
  427. }
  428. }
  429. // wl_proxy_get_tag
  430. *(void **) (&wl_proxy_get_tag_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_get_tag");
  431. if (verbose) {
  432. error = dlerror();
  433. if (error != NULL) {
  434. fprintf(stderr, "%s\n", error);
  435. }
  436. }
  437. // wl_proxy_get_class
  438. *(void **) (&wl_proxy_get_class_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_get_class");
  439. if (verbose) {
  440. error = dlerror();
  441. if (error != NULL) {
  442. fprintf(stderr, "%s\n", error);
  443. }
  444. }
  445. // wl_proxy_set_queue
  446. *(void **) (&wl_proxy_set_queue_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_proxy_set_queue");
  447. if (verbose) {
  448. error = dlerror();
  449. if (error != NULL) {
  450. fprintf(stderr, "%s\n", error);
  451. }
  452. }
  453. // wl_display_connect
  454. *(void **) (&wl_display_connect_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_connect");
  455. if (verbose) {
  456. error = dlerror();
  457. if (error != NULL) {
  458. fprintf(stderr, "%s\n", error);
  459. }
  460. }
  461. // wl_display_connect_to_fd
  462. *(void **) (&wl_display_connect_to_fd_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_connect_to_fd");
  463. if (verbose) {
  464. error = dlerror();
  465. if (error != NULL) {
  466. fprintf(stderr, "%s\n", error);
  467. }
  468. }
  469. // wl_display_disconnect
  470. *(void **) (&wl_display_disconnect_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_disconnect");
  471. if (verbose) {
  472. error = dlerror();
  473. if (error != NULL) {
  474. fprintf(stderr, "%s\n", error);
  475. }
  476. }
  477. // wl_display_get_fd
  478. *(void **) (&wl_display_get_fd_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_get_fd");
  479. if (verbose) {
  480. error = dlerror();
  481. if (error != NULL) {
  482. fprintf(stderr, "%s\n", error);
  483. }
  484. }
  485. // wl_display_dispatch
  486. *(void **) (&wl_display_dispatch_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_dispatch");
  487. if (verbose) {
  488. error = dlerror();
  489. if (error != NULL) {
  490. fprintf(stderr, "%s\n", error);
  491. }
  492. }
  493. // wl_display_dispatch_queue
  494. *(void **) (&wl_display_dispatch_queue_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_dispatch_queue");
  495. if (verbose) {
  496. error = dlerror();
  497. if (error != NULL) {
  498. fprintf(stderr, "%s\n", error);
  499. }
  500. }
  501. // wl_display_dispatch_queue_pending
  502. *(void **) (&wl_display_dispatch_queue_pending_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_dispatch_queue_pending");
  503. if (verbose) {
  504. error = dlerror();
  505. if (error != NULL) {
  506. fprintf(stderr, "%s\n", error);
  507. }
  508. }
  509. // wl_display_dispatch_pending
  510. *(void **) (&wl_display_dispatch_pending_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_dispatch_pending");
  511. if (verbose) {
  512. error = dlerror();
  513. if (error != NULL) {
  514. fprintf(stderr, "%s\n", error);
  515. }
  516. }
  517. // wl_display_get_error
  518. *(void **) (&wl_display_get_error_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_get_error");
  519. if (verbose) {
  520. error = dlerror();
  521. if (error != NULL) {
  522. fprintf(stderr, "%s\n", error);
  523. }
  524. }
  525. // wl_display_get_protocol_error
  526. *(void **) (&wl_display_get_protocol_error_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_get_protocol_error");
  527. if (verbose) {
  528. error = dlerror();
  529. if (error != NULL) {
  530. fprintf(stderr, "%s\n", error);
  531. }
  532. }
  533. // wl_display_flush
  534. *(void **) (&wl_display_flush_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_flush");
  535. if (verbose) {
  536. error = dlerror();
  537. if (error != NULL) {
  538. fprintf(stderr, "%s\n", error);
  539. }
  540. }
  541. // wl_display_roundtrip_queue
  542. *(void **) (&wl_display_roundtrip_queue_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_roundtrip_queue");
  543. if (verbose) {
  544. error = dlerror();
  545. if (error != NULL) {
  546. fprintf(stderr, "%s\n", error);
  547. }
  548. }
  549. // wl_display_roundtrip
  550. *(void **) (&wl_display_roundtrip_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_roundtrip");
  551. if (verbose) {
  552. error = dlerror();
  553. if (error != NULL) {
  554. fprintf(stderr, "%s\n", error);
  555. }
  556. }
  557. // wl_display_create_queue
  558. *(void **) (&wl_display_create_queue_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_create_queue");
  559. if (verbose) {
  560. error = dlerror();
  561. if (error != NULL) {
  562. fprintf(stderr, "%s\n", error);
  563. }
  564. }
  565. // wl_display_prepare_read_queue
  566. *(void **) (&wl_display_prepare_read_queue_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_prepare_read_queue");
  567. if (verbose) {
  568. error = dlerror();
  569. if (error != NULL) {
  570. fprintf(stderr, "%s\n", error);
  571. }
  572. }
  573. // wl_display_prepare_read
  574. *(void **) (&wl_display_prepare_read_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_prepare_read");
  575. if (verbose) {
  576. error = dlerror();
  577. if (error != NULL) {
  578. fprintf(stderr, "%s\n", error);
  579. }
  580. }
  581. // wl_display_cancel_read
  582. *(void **) (&wl_display_cancel_read_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_cancel_read");
  583. if (verbose) {
  584. error = dlerror();
  585. if (error != NULL) {
  586. fprintf(stderr, "%s\n", error);
  587. }
  588. }
  589. // wl_display_read_events
  590. *(void **) (&wl_display_read_events_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_display_read_events");
  591. if (verbose) {
  592. error = dlerror();
  593. if (error != NULL) {
  594. fprintf(stderr, "%s\n", error);
  595. }
  596. }
  597. // wl_log_set_handler_client
  598. *(void **) (&wl_log_set_handler_client_dylibloader_wrapper_wayland_client) = dlsym(handle, "wl_log_set_handler_client");
  599. if (verbose) {
  600. error = dlerror();
  601. if (error != NULL) {
  602. fprintf(stderr, "%s\n", error);
  603. }
  604. }
  605. return 0;
  606. }