Created
May 3, 2012 04:09
-
-
Save sidorares/2583100 to your computer and use it in GitHub Desktop.
create 32 bit pixmap test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <X11/Xlib.h> | |
#include <X11/Xutil.h> | |
#include <stdio.h> | |
int ApplicationErrorHandler(Display *display, XErrorEvent *theEvent) | |
{ | |
(void) fprintf(stderr, | |
"Ignoring Xlib error: error code %d request code %d\n", | |
theEvent->error_code, | |
theEvent->request_code) ; | |
return 0 ; | |
} | |
int main(int argc, char **argv) | |
{ | |
Display *dpy; | |
dpy = XOpenDisplay(NULL); | |
XSetErrorHandler(ApplicationErrorHandler); | |
Pixmap p; | |
p = XCreatePixmap(dpy, XDefaultRootWindow(dpy), 100, 100, 32); | |
XSync(dpy, True); | |
printf("%i", (int)p); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment