1 /* Copyright (C) 2000 Free Software Foundation
3 This file is part of libgcj.
5 This software is copyrighted work licensed under the terms of the
6 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
10 #include <X11/Xutil.h>
13 #include <gnu/gcj/RawData.h>
15 #include <java/lang/OutOfMemoryError.h>
17 #include <gnu/gcj/xlib/Display.h>
18 #include <gnu/gcj/xlib/Screen.h>
19 #include <gnu/gcj/xlib/Visual.h>
20 #include <gnu/gcj/xlib/Drawable.h>
21 #include <gnu/gcj/xlib/XImage.h>
22 #include <gnu/gcj/xlib/Pixmap.h>
24 jint
gnu::gcj::xlib::Pixmap::createXID(Drawable
* drawable
,
25 jint width
, jint height
,
28 Display
* display
= drawable
->getDisplay();
29 ::Display
* dpy
= (::Display
*) (display
->display
);
30 jint xid
= drawable
->getXID();
32 return XCreatePixmap(dpy
, xid
, width
, height
, depth
);
35 void gnu::gcj::xlib::Pixmap::finalize()
37 ::Display
* dpy
= (::Display
*) (getDisplay()->display
);
38 XFreePixmap(dpy
, getXID());