libdecor-so_wrap.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  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 2022-12-12 10:55:19
  4. // flags: ./generate-wrapper.py --include /usr/include/libdecor-0/libdecor.h --sys-include <libdecor-0/libdecor.h> --soname libdecor-0.so.0 --init-name libdecor --output-header libdecor-so_wrap.h --output-implementation libdecor-so_wrap.c --omit-prefix wl_
  5. //
  6. // EDIT: This has been handpatched to properly report the pointer type of the window_state argument of libdecor_configuration_get_window_state.
  7. #include <stdint.h>
  8. #define libdecor_unref libdecor_unref_dylibloader_orig_libdecor
  9. #define libdecor_new libdecor_new_dylibloader_orig_libdecor
  10. #define libdecor_get_fd libdecor_get_fd_dylibloader_orig_libdecor
  11. #define libdecor_dispatch libdecor_dispatch_dylibloader_orig_libdecor
  12. #define libdecor_decorate libdecor_decorate_dylibloader_orig_libdecor
  13. #define libdecor_frame_ref libdecor_frame_ref_dylibloader_orig_libdecor
  14. #define libdecor_frame_unref libdecor_frame_unref_dylibloader_orig_libdecor
  15. #define libdecor_frame_set_visibility libdecor_frame_set_visibility_dylibloader_orig_libdecor
  16. #define libdecor_frame_is_visible libdecor_frame_is_visible_dylibloader_orig_libdecor
  17. #define libdecor_frame_set_parent libdecor_frame_set_parent_dylibloader_orig_libdecor
  18. #define libdecor_frame_set_title libdecor_frame_set_title_dylibloader_orig_libdecor
  19. #define libdecor_frame_get_title libdecor_frame_get_title_dylibloader_orig_libdecor
  20. #define libdecor_frame_set_app_id libdecor_frame_set_app_id_dylibloader_orig_libdecor
  21. #define libdecor_frame_set_capabilities libdecor_frame_set_capabilities_dylibloader_orig_libdecor
  22. #define libdecor_frame_unset_capabilities libdecor_frame_unset_capabilities_dylibloader_orig_libdecor
  23. #define libdecor_frame_has_capability libdecor_frame_has_capability_dylibloader_orig_libdecor
  24. #define libdecor_frame_show_window_menu libdecor_frame_show_window_menu_dylibloader_orig_libdecor
  25. #define libdecor_frame_popup_grab libdecor_frame_popup_grab_dylibloader_orig_libdecor
  26. #define libdecor_frame_popup_ungrab libdecor_frame_popup_ungrab_dylibloader_orig_libdecor
  27. #define libdecor_frame_translate_coordinate libdecor_frame_translate_coordinate_dylibloader_orig_libdecor
  28. #define libdecor_frame_set_min_content_size libdecor_frame_set_min_content_size_dylibloader_orig_libdecor
  29. #define libdecor_frame_set_max_content_size libdecor_frame_set_max_content_size_dylibloader_orig_libdecor
  30. #define libdecor_frame_resize libdecor_frame_resize_dylibloader_orig_libdecor
  31. #define libdecor_frame_move libdecor_frame_move_dylibloader_orig_libdecor
  32. #define libdecor_frame_commit libdecor_frame_commit_dylibloader_orig_libdecor
  33. #define libdecor_frame_set_minimized libdecor_frame_set_minimized_dylibloader_orig_libdecor
  34. #define libdecor_frame_set_maximized libdecor_frame_set_maximized_dylibloader_orig_libdecor
  35. #define libdecor_frame_unset_maximized libdecor_frame_unset_maximized_dylibloader_orig_libdecor
  36. #define libdecor_frame_set_fullscreen libdecor_frame_set_fullscreen_dylibloader_orig_libdecor
  37. #define libdecor_frame_unset_fullscreen libdecor_frame_unset_fullscreen_dylibloader_orig_libdecor
  38. #define libdecor_frame_is_floating libdecor_frame_is_floating_dylibloader_orig_libdecor
  39. #define libdecor_frame_close libdecor_frame_close_dylibloader_orig_libdecor
  40. #define libdecor_frame_map libdecor_frame_map_dylibloader_orig_libdecor
  41. #define libdecor_frame_get_xdg_surface libdecor_frame_get_xdg_surface_dylibloader_orig_libdecor
  42. #define libdecor_frame_get_xdg_toplevel libdecor_frame_get_xdg_toplevel_dylibloader_orig_libdecor
  43. #define libdecor_state_new libdecor_state_new_dylibloader_orig_libdecor
  44. #define libdecor_state_free libdecor_state_free_dylibloader_orig_libdecor
  45. #define libdecor_configuration_get_content_size libdecor_configuration_get_content_size_dylibloader_orig_libdecor
  46. #define libdecor_configuration_get_window_state libdecor_configuration_get_window_state_dylibloader_orig_libdecor
  47. #include <libdecor-0/libdecor.h>
  48. #undef libdecor_unref
  49. #undef libdecor_new
  50. #undef libdecor_get_fd
  51. #undef libdecor_dispatch
  52. #undef libdecor_decorate
  53. #undef libdecor_frame_ref
  54. #undef libdecor_frame_unref
  55. #undef libdecor_frame_set_visibility
  56. #undef libdecor_frame_is_visible
  57. #undef libdecor_frame_set_parent
  58. #undef libdecor_frame_set_title
  59. #undef libdecor_frame_get_title
  60. #undef libdecor_frame_set_app_id
  61. #undef libdecor_frame_set_capabilities
  62. #undef libdecor_frame_unset_capabilities
  63. #undef libdecor_frame_has_capability
  64. #undef libdecor_frame_show_window_menu
  65. #undef libdecor_frame_popup_grab
  66. #undef libdecor_frame_popup_ungrab
  67. #undef libdecor_frame_translate_coordinate
  68. #undef libdecor_frame_set_min_content_size
  69. #undef libdecor_frame_set_max_content_size
  70. #undef libdecor_frame_resize
  71. #undef libdecor_frame_move
  72. #undef libdecor_frame_commit
  73. #undef libdecor_frame_set_minimized
  74. #undef libdecor_frame_set_maximized
  75. #undef libdecor_frame_unset_maximized
  76. #undef libdecor_frame_set_fullscreen
  77. #undef libdecor_frame_unset_fullscreen
  78. #undef libdecor_frame_is_floating
  79. #undef libdecor_frame_close
  80. #undef libdecor_frame_map
  81. #undef libdecor_frame_get_xdg_surface
  82. #undef libdecor_frame_get_xdg_toplevel
  83. #undef libdecor_state_new
  84. #undef libdecor_state_free
  85. #undef libdecor_configuration_get_content_size
  86. #undef libdecor_configuration_get_window_state
  87. #include <dlfcn.h>
  88. #include <stdio.h>
  89. void (*libdecor_unref_dylibloader_wrapper_libdecor)(struct libdecor*);
  90. struct libdecor* (*libdecor_new_dylibloader_wrapper_libdecor)(struct wl_display*,struct libdecor_interface*);
  91. int (*libdecor_get_fd_dylibloader_wrapper_libdecor)(struct libdecor*);
  92. int (*libdecor_dispatch_dylibloader_wrapper_libdecor)(struct libdecor*, int);
  93. struct libdecor_frame* (*libdecor_decorate_dylibloader_wrapper_libdecor)(struct libdecor*,struct wl_surface*,struct libdecor_frame_interface*, void*);
  94. void (*libdecor_frame_ref_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  95. void (*libdecor_frame_unref_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  96. void (*libdecor_frame_set_visibility_dylibloader_wrapper_libdecor)(struct libdecor_frame*, bool);
  97. bool (*libdecor_frame_is_visible_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  98. void (*libdecor_frame_set_parent_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct libdecor_frame*);
  99. void (*libdecor_frame_set_title_dylibloader_wrapper_libdecor)(struct libdecor_frame*,const char*);
  100. const char* (*libdecor_frame_get_title_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  101. void (*libdecor_frame_set_app_id_dylibloader_wrapper_libdecor)(struct libdecor_frame*,const char*);
  102. void (*libdecor_frame_set_capabilities_dylibloader_wrapper_libdecor)(struct libdecor_frame*,enum libdecor_capabilities);
  103. void (*libdecor_frame_unset_capabilities_dylibloader_wrapper_libdecor)(struct libdecor_frame*,enum libdecor_capabilities);
  104. bool (*libdecor_frame_has_capability_dylibloader_wrapper_libdecor)(struct libdecor_frame*,enum libdecor_capabilities);
  105. void (*libdecor_frame_show_window_menu_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct wl_seat*, uint32_t, int, int);
  106. void (*libdecor_frame_popup_grab_dylibloader_wrapper_libdecor)(struct libdecor_frame*,const char*);
  107. void (*libdecor_frame_popup_ungrab_dylibloader_wrapper_libdecor)(struct libdecor_frame*,const char*);
  108. void (*libdecor_frame_translate_coordinate_dylibloader_wrapper_libdecor)(struct libdecor_frame*, int, int, int*, int*);
  109. void (*libdecor_frame_set_min_content_size_dylibloader_wrapper_libdecor)(struct libdecor_frame*, int, int);
  110. void (*libdecor_frame_set_max_content_size_dylibloader_wrapper_libdecor)(struct libdecor_frame*, int, int);
  111. void (*libdecor_frame_resize_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct wl_seat*, uint32_t,enum libdecor_resize_edge);
  112. void (*libdecor_frame_move_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct wl_seat*, uint32_t);
  113. void (*libdecor_frame_commit_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct libdecor_state*,struct libdecor_configuration*);
  114. void (*libdecor_frame_set_minimized_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  115. void (*libdecor_frame_set_maximized_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  116. void (*libdecor_frame_unset_maximized_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  117. void (*libdecor_frame_set_fullscreen_dylibloader_wrapper_libdecor)(struct libdecor_frame*,struct wl_output*);
  118. void (*libdecor_frame_unset_fullscreen_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  119. bool (*libdecor_frame_is_floating_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  120. void (*libdecor_frame_close_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  121. void (*libdecor_frame_map_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  122. struct xdg_surface* (*libdecor_frame_get_xdg_surface_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  123. struct xdg_toplevel* (*libdecor_frame_get_xdg_toplevel_dylibloader_wrapper_libdecor)(struct libdecor_frame*);
  124. struct libdecor_state* (*libdecor_state_new_dylibloader_wrapper_libdecor)( int, int);
  125. void (*libdecor_state_free_dylibloader_wrapper_libdecor)(struct libdecor_state*);
  126. bool (*libdecor_configuration_get_content_size_dylibloader_wrapper_libdecor)(struct libdecor_configuration*,struct libdecor_frame*, int*, int*);
  127. bool (*libdecor_configuration_get_window_state_dylibloader_wrapper_libdecor)(struct libdecor_configuration*,enum libdecor_window_state*);
  128. int initialize_libdecor(int verbose) {
  129. void *handle;
  130. char *error;
  131. handle = dlopen("libdecor-0.so.0", RTLD_LAZY);
  132. if (!handle) {
  133. if (verbose) {
  134. fprintf(stderr, "%s\n", dlerror());
  135. }
  136. return(1);
  137. }
  138. dlerror();
  139. // libdecor_unref
  140. *(void **) (&libdecor_unref_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_unref");
  141. if (verbose) {
  142. error = dlerror();
  143. if (error != NULL) {
  144. fprintf(stderr, "%s\n", error);
  145. }
  146. }
  147. // libdecor_new
  148. *(void **) (&libdecor_new_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_new");
  149. if (verbose) {
  150. error = dlerror();
  151. if (error != NULL) {
  152. fprintf(stderr, "%s\n", error);
  153. }
  154. }
  155. // libdecor_get_fd
  156. *(void **) (&libdecor_get_fd_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_get_fd");
  157. if (verbose) {
  158. error = dlerror();
  159. if (error != NULL) {
  160. fprintf(stderr, "%s\n", error);
  161. }
  162. }
  163. // libdecor_dispatch
  164. *(void **) (&libdecor_dispatch_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_dispatch");
  165. if (verbose) {
  166. error = dlerror();
  167. if (error != NULL) {
  168. fprintf(stderr, "%s\n", error);
  169. }
  170. }
  171. // libdecor_decorate
  172. *(void **) (&libdecor_decorate_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_decorate");
  173. if (verbose) {
  174. error = dlerror();
  175. if (error != NULL) {
  176. fprintf(stderr, "%s\n", error);
  177. }
  178. }
  179. // libdecor_frame_ref
  180. *(void **) (&libdecor_frame_ref_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_ref");
  181. if (verbose) {
  182. error = dlerror();
  183. if (error != NULL) {
  184. fprintf(stderr, "%s\n", error);
  185. }
  186. }
  187. // libdecor_frame_unref
  188. *(void **) (&libdecor_frame_unref_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_unref");
  189. if (verbose) {
  190. error = dlerror();
  191. if (error != NULL) {
  192. fprintf(stderr, "%s\n", error);
  193. }
  194. }
  195. // libdecor_frame_set_visibility
  196. *(void **) (&libdecor_frame_set_visibility_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_visibility");
  197. if (verbose) {
  198. error = dlerror();
  199. if (error != NULL) {
  200. fprintf(stderr, "%s\n", error);
  201. }
  202. }
  203. // libdecor_frame_is_visible
  204. *(void **) (&libdecor_frame_is_visible_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_is_visible");
  205. if (verbose) {
  206. error = dlerror();
  207. if (error != NULL) {
  208. fprintf(stderr, "%s\n", error);
  209. }
  210. }
  211. // libdecor_frame_set_parent
  212. *(void **) (&libdecor_frame_set_parent_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_parent");
  213. if (verbose) {
  214. error = dlerror();
  215. if (error != NULL) {
  216. fprintf(stderr, "%s\n", error);
  217. }
  218. }
  219. // libdecor_frame_set_title
  220. *(void **) (&libdecor_frame_set_title_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_title");
  221. if (verbose) {
  222. error = dlerror();
  223. if (error != NULL) {
  224. fprintf(stderr, "%s\n", error);
  225. }
  226. }
  227. // libdecor_frame_get_title
  228. *(void **) (&libdecor_frame_get_title_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_get_title");
  229. if (verbose) {
  230. error = dlerror();
  231. if (error != NULL) {
  232. fprintf(stderr, "%s\n", error);
  233. }
  234. }
  235. // libdecor_frame_set_app_id
  236. *(void **) (&libdecor_frame_set_app_id_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_app_id");
  237. if (verbose) {
  238. error = dlerror();
  239. if (error != NULL) {
  240. fprintf(stderr, "%s\n", error);
  241. }
  242. }
  243. // libdecor_frame_set_capabilities
  244. *(void **) (&libdecor_frame_set_capabilities_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_capabilities");
  245. if (verbose) {
  246. error = dlerror();
  247. if (error != NULL) {
  248. fprintf(stderr, "%s\n", error);
  249. }
  250. }
  251. // libdecor_frame_unset_capabilities
  252. *(void **) (&libdecor_frame_unset_capabilities_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_unset_capabilities");
  253. if (verbose) {
  254. error = dlerror();
  255. if (error != NULL) {
  256. fprintf(stderr, "%s\n", error);
  257. }
  258. }
  259. // libdecor_frame_has_capability
  260. *(void **) (&libdecor_frame_has_capability_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_has_capability");
  261. if (verbose) {
  262. error = dlerror();
  263. if (error != NULL) {
  264. fprintf(stderr, "%s\n", error);
  265. }
  266. }
  267. // libdecor_frame_show_window_menu
  268. *(void **) (&libdecor_frame_show_window_menu_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_show_window_menu");
  269. if (verbose) {
  270. error = dlerror();
  271. if (error != NULL) {
  272. fprintf(stderr, "%s\n", error);
  273. }
  274. }
  275. // libdecor_frame_popup_grab
  276. *(void **) (&libdecor_frame_popup_grab_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_popup_grab");
  277. if (verbose) {
  278. error = dlerror();
  279. if (error != NULL) {
  280. fprintf(stderr, "%s\n", error);
  281. }
  282. }
  283. // libdecor_frame_popup_ungrab
  284. *(void **) (&libdecor_frame_popup_ungrab_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_popup_ungrab");
  285. if (verbose) {
  286. error = dlerror();
  287. if (error != NULL) {
  288. fprintf(stderr, "%s\n", error);
  289. }
  290. }
  291. // libdecor_frame_translate_coordinate
  292. *(void **) (&libdecor_frame_translate_coordinate_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_translate_coordinate");
  293. if (verbose) {
  294. error = dlerror();
  295. if (error != NULL) {
  296. fprintf(stderr, "%s\n", error);
  297. }
  298. }
  299. // libdecor_frame_set_min_content_size
  300. *(void **) (&libdecor_frame_set_min_content_size_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_min_content_size");
  301. if (verbose) {
  302. error = dlerror();
  303. if (error != NULL) {
  304. fprintf(stderr, "%s\n", error);
  305. }
  306. }
  307. // libdecor_frame_set_max_content_size
  308. *(void **) (&libdecor_frame_set_max_content_size_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_max_content_size");
  309. if (verbose) {
  310. error = dlerror();
  311. if (error != NULL) {
  312. fprintf(stderr, "%s\n", error);
  313. }
  314. }
  315. // libdecor_frame_resize
  316. *(void **) (&libdecor_frame_resize_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_resize");
  317. if (verbose) {
  318. error = dlerror();
  319. if (error != NULL) {
  320. fprintf(stderr, "%s\n", error);
  321. }
  322. }
  323. // libdecor_frame_move
  324. *(void **) (&libdecor_frame_move_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_move");
  325. if (verbose) {
  326. error = dlerror();
  327. if (error != NULL) {
  328. fprintf(stderr, "%s\n", error);
  329. }
  330. }
  331. // libdecor_frame_commit
  332. *(void **) (&libdecor_frame_commit_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_commit");
  333. if (verbose) {
  334. error = dlerror();
  335. if (error != NULL) {
  336. fprintf(stderr, "%s\n", error);
  337. }
  338. }
  339. // libdecor_frame_set_minimized
  340. *(void **) (&libdecor_frame_set_minimized_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_minimized");
  341. if (verbose) {
  342. error = dlerror();
  343. if (error != NULL) {
  344. fprintf(stderr, "%s\n", error);
  345. }
  346. }
  347. // libdecor_frame_set_maximized
  348. *(void **) (&libdecor_frame_set_maximized_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_maximized");
  349. if (verbose) {
  350. error = dlerror();
  351. if (error != NULL) {
  352. fprintf(stderr, "%s\n", error);
  353. }
  354. }
  355. // libdecor_frame_unset_maximized
  356. *(void **) (&libdecor_frame_unset_maximized_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_unset_maximized");
  357. if (verbose) {
  358. error = dlerror();
  359. if (error != NULL) {
  360. fprintf(stderr, "%s\n", error);
  361. }
  362. }
  363. // libdecor_frame_set_fullscreen
  364. *(void **) (&libdecor_frame_set_fullscreen_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_set_fullscreen");
  365. if (verbose) {
  366. error = dlerror();
  367. if (error != NULL) {
  368. fprintf(stderr, "%s\n", error);
  369. }
  370. }
  371. // libdecor_frame_unset_fullscreen
  372. *(void **) (&libdecor_frame_unset_fullscreen_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_unset_fullscreen");
  373. if (verbose) {
  374. error = dlerror();
  375. if (error != NULL) {
  376. fprintf(stderr, "%s\n", error);
  377. }
  378. }
  379. // libdecor_frame_is_floating
  380. *(void **) (&libdecor_frame_is_floating_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_is_floating");
  381. if (verbose) {
  382. error = dlerror();
  383. if (error != NULL) {
  384. fprintf(stderr, "%s\n", error);
  385. }
  386. }
  387. // libdecor_frame_close
  388. *(void **) (&libdecor_frame_close_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_close");
  389. if (verbose) {
  390. error = dlerror();
  391. if (error != NULL) {
  392. fprintf(stderr, "%s\n", error);
  393. }
  394. }
  395. // libdecor_frame_map
  396. *(void **) (&libdecor_frame_map_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_map");
  397. if (verbose) {
  398. error = dlerror();
  399. if (error != NULL) {
  400. fprintf(stderr, "%s\n", error);
  401. }
  402. }
  403. // libdecor_frame_get_xdg_surface
  404. *(void **) (&libdecor_frame_get_xdg_surface_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_get_xdg_surface");
  405. if (verbose) {
  406. error = dlerror();
  407. if (error != NULL) {
  408. fprintf(stderr, "%s\n", error);
  409. }
  410. }
  411. // libdecor_frame_get_xdg_toplevel
  412. *(void **) (&libdecor_frame_get_xdg_toplevel_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_frame_get_xdg_toplevel");
  413. if (verbose) {
  414. error = dlerror();
  415. if (error != NULL) {
  416. fprintf(stderr, "%s\n", error);
  417. }
  418. }
  419. // libdecor_state_new
  420. *(void **) (&libdecor_state_new_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_state_new");
  421. if (verbose) {
  422. error = dlerror();
  423. if (error != NULL) {
  424. fprintf(stderr, "%s\n", error);
  425. }
  426. }
  427. // libdecor_state_free
  428. *(void **) (&libdecor_state_free_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_state_free");
  429. if (verbose) {
  430. error = dlerror();
  431. if (error != NULL) {
  432. fprintf(stderr, "%s\n", error);
  433. }
  434. }
  435. // libdecor_configuration_get_content_size
  436. *(void **) (&libdecor_configuration_get_content_size_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_configuration_get_content_size");
  437. if (verbose) {
  438. error = dlerror();
  439. if (error != NULL) {
  440. fprintf(stderr, "%s\n", error);
  441. }
  442. }
  443. // libdecor_configuration_get_window_state
  444. *(void **) (&libdecor_configuration_get_window_state_dylibloader_wrapper_libdecor) = dlsym(handle, "libdecor_configuration_get_window_state");
  445. if (verbose) {
  446. error = dlerror();
  447. if (error != NULL) {
  448. fprintf(stderr, "%s\n", error);
  449. }
  450. }
  451. return 0;
  452. }