Path: blob/master/platform/linuxbsd/wayland/dynwrappers/wayland-cursor-so_wrap.c
10279 views
// This file is generated. Do not edit!1// see https://github.com/hpvb/dynload-wrapper for details2// generated by ../dynload-wrapper/generate-wrapper.py 0.3 on 2023-01-25 17:46:123// flags: ../dynload-wrapper/generate-wrapper.py --include ./thirdparty/linuxbsd_headers/wayland/wayland-cursor.h --sys-include "./thirdparty/linuxbsd_headers/wayland/wayland-cursor.h" --soname libwayland-cursor.so.0 --init-name wayland_cursor --output-header platform/linuxbsd/wayland/dynwrappers/wayland-cursor-so_wrap.h --output-implementation platform/linuxbsd/wayland/dynwrappers/wayland-cursor-so_wrap.c4//5#include <stdint.h>67#define wl_cursor_theme_load wl_cursor_theme_load_dylibloader_orig_wayland_cursor8#define wl_cursor_theme_destroy wl_cursor_theme_destroy_dylibloader_orig_wayland_cursor9#define wl_cursor_theme_get_cursor wl_cursor_theme_get_cursor_dylibloader_orig_wayland_cursor10#define wl_cursor_image_get_buffer wl_cursor_image_get_buffer_dylibloader_orig_wayland_cursor11#define wl_cursor_frame wl_cursor_frame_dylibloader_orig_wayland_cursor12#define wl_cursor_frame_and_duration wl_cursor_frame_and_duration_dylibloader_orig_wayland_cursor13#include "./thirdparty/linuxbsd_headers/wayland/wayland-cursor.h"14#undef wl_cursor_theme_load15#undef wl_cursor_theme_destroy16#undef wl_cursor_theme_get_cursor17#undef wl_cursor_image_get_buffer18#undef wl_cursor_frame19#undef wl_cursor_frame_and_duration20#include <dlfcn.h>21#include <stdio.h>22struct wl_cursor_theme* (*wl_cursor_theme_load_dylibloader_wrapper_wayland_cursor)(const char*, int,struct wl_shm*);23void (*wl_cursor_theme_destroy_dylibloader_wrapper_wayland_cursor)(struct wl_cursor_theme*);24struct wl_cursor* (*wl_cursor_theme_get_cursor_dylibloader_wrapper_wayland_cursor)(struct wl_cursor_theme*,const char*);25struct wl_buffer* (*wl_cursor_image_get_buffer_dylibloader_wrapper_wayland_cursor)(struct wl_cursor_image*);26int (*wl_cursor_frame_dylibloader_wrapper_wayland_cursor)(struct wl_cursor*, uint32_t);27int (*wl_cursor_frame_and_duration_dylibloader_wrapper_wayland_cursor)(struct wl_cursor*, uint32_t, uint32_t*);28int initialize_wayland_cursor(int verbose) {29void *handle;30char *error;31handle = dlopen("libwayland-cursor.so.0", RTLD_LAZY);32if (!handle) {33if (verbose) {34fprintf(stderr, "%s\n", dlerror());35}36return(1);37}38dlerror();39// wl_cursor_theme_load40*(void **) (&wl_cursor_theme_load_dylibloader_wrapper_wayland_cursor) = dlsym(handle, "wl_cursor_theme_load");41if (verbose) {42error = dlerror();43if (error != NULL) {44fprintf(stderr, "%s\n", error);45}46}47// wl_cursor_theme_destroy48*(void **) (&wl_cursor_theme_destroy_dylibloader_wrapper_wayland_cursor) = dlsym(handle, "wl_cursor_theme_destroy");49if (verbose) {50error = dlerror();51if (error != NULL) {52fprintf(stderr, "%s\n", error);53}54}55// wl_cursor_theme_get_cursor56*(void **) (&wl_cursor_theme_get_cursor_dylibloader_wrapper_wayland_cursor) = dlsym(handle, "wl_cursor_theme_get_cursor");57if (verbose) {58error = dlerror();59if (error != NULL) {60fprintf(stderr, "%s\n", error);61}62}63// wl_cursor_image_get_buffer64*(void **) (&wl_cursor_image_get_buffer_dylibloader_wrapper_wayland_cursor) = dlsym(handle, "wl_cursor_image_get_buffer");65if (verbose) {66error = dlerror();67if (error != NULL) {68fprintf(stderr, "%s\n", error);69}70}71// wl_cursor_frame72*(void **) (&wl_cursor_frame_dylibloader_wrapper_wayland_cursor) = dlsym(handle, "wl_cursor_frame");73if (verbose) {74error = dlerror();75if (error != NULL) {76fprintf(stderr, "%s\n", error);77}78}79// wl_cursor_frame_and_duration80*(void **) (&wl_cursor_frame_and_duration_dylibloader_wrapper_wayland_cursor) = dlsym(handle, "wl_cursor_frame_and_duration");81if (verbose) {82error = dlerror();83if (error != NULL) {84fprintf(stderr, "%s\n", error);85}86}87return 0;88}899091