Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / libjava / gnu / gcj / xlib / natPixmap.cc
blob459f5bf3b286a9b9570e05eae3d241ef71131f1a
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
7 details. */
9 #include <X11/Xlib.h>
10 #include <X11/Xutil.h>
12 #include <gcj/cni.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,
26 jint depth)
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());