10 typedef Pixmap (* PFN_XCREATEPIXMAP)(Display * dpy, Drawable d, unsigned int width, unsigned int height, unsigned int depth);
11 static PFN_XCREATEPIXMAP _XCreatePixmap_ptr = NULL;
13 static inline Pixmap _XCreatePixmap(Display * dpy, Drawable d, unsigned int width, unsigned int height, unsigned int depth) {
14 const char *_name = "XCreatePixmap";
15 if (!_XCreatePixmap_ptr) {
16 _XCreatePixmap_ptr = (PFN_XCREATEPIXMAP)_getPublicProcAddress(_name);
17 if (!_XCreatePixmap_ptr) {
18 os::log("error: unavailable function %s\n", _name);
22 return _XCreatePixmap_ptr(dpy, d, width, height, depth);
25 typedef int (* PFN_XFREEPIXMAP)(Display * dpy, Drawable pixmap);
26 static PFN_XFREEPIXMAP _XFreePixmap_ptr = NULL;
28 static inline int _XFreePixmap(Display * dpy, Drawable pixmap) {
29 const char *_name = "XFreePixmap";
30 if (!_XFreePixmap_ptr) {
31 _XFreePixmap_ptr = (PFN_XFREEPIXMAP)_getPrivateProcAddress(_name);
32 if (!_XFreePixmap_ptr) {
33 os::log("error: unavailable function %s\n", _name);
37 return _XFreePixmap_ptr(dpy, pixmap);
41 #define XCreatePixmap _XCreatePixmap
42 #define XFreePixmap _XFreePixmap