Package com.sun.jna.platform.unix.X11

Examples of com.sun.jna.platform.unix.X11.Display


        private void setWindowShape(final Window w, final PixmapSource src) {
            Runnable action = new Runnable() {
                public void run() {
                    X11 x11 = X11.INSTANCE;
                    Display dpy = x11.XOpenDisplay(null);
                    if (dpy == null) {
                        return;
                    }
                    Pixmap pm = null;
                    try {
View Full Code Here


            final X11 x11 = X11.INSTANCE;
            Rectangle bounds = raster.getBounds();
            int width = bounds.x + bounds.width;
            int height = bounds.y + bounds.height;
            final Pixmap pm = x11.XCreatePixmap(dpy, win, width, height, 1);
            final GC gc = x11.XCreateGC(dpy, pm, new NativeLong(0), null);
            if (gc == null) {
                return null;
            }
            x11.XSetForeground(dpy, gc, new NativeLong(0));
            x11.XFillRectangle(dpy, pm, gc, 0, 0, width, height);
View Full Code Here

                Graphics g = buf.getGraphics();
                g.drawImage(image, 0, 0, w, h, null);
               
                long start = System.currentTimeMillis();
                long blitTime, putImageTime, write;
                GC gc = x11.XCreateGC(dpy, win, new NativeLong(0), null);
                long gcTime = System.currentTimeMillis();
                try {
                    Raster raster = buf.getData();
                    int[] pixel = new int[4];
                    for (int y=0;y < h;y++) {
View Full Code Here

            final X11 x11 = X11.INSTANCE;
            Rectangle bounds = raster.getBounds();
            int width = bounds.x + bounds.width;
            int height = bounds.y + bounds.height;
            final Pixmap pm = x11.XCreatePixmap(dpy, win, width, height, 1);
            final GC gc = x11.XCreateGC(dpy, pm, new NativeLong(0), null);
            if (gc == null) {
                return null;
            }
            x11.XSetForeground(dpy, gc, new NativeLong(0));
            x11.XFillRectangle(dpy, pm, gc, 0, 0, width, height);
View Full Code Here

                                           Raster raster) {
            final X11 x11 = X11.INSTANCE;
            Rectangle bounds = raster.getBounds();
            int width = bounds.x + bounds.width;
            int height = bounds.y + bounds.height;
            final Pixmap pm = x11.XCreatePixmap(dpy, win, width, height, 1);
            final GC gc = x11.XCreateGC(dpy, pm, new NativeLong(0), null);
            if (gc == null) {
                return null;
            }
            x11.XSetForeground(dpy, gc, new NativeLong(0));
View Full Code Here

                    X11 x11 = X11.INSTANCE;
                    Display dpy = x11.XOpenDisplay(null);
                    if (dpy == null) {
                        return;
                    }
                    Pixmap pm = null;
                    try {
                        X11.Window win = getDrawable(w);
                        pm = src.getPixmap(dpy, win);
                        Xext ext = Xext.INSTANCE;
                        ext.XShapeCombineMask(dpy, win, X11.Xext.ShapeBounding,
View Full Code Here

                                           Raster raster) {
            final X11 x11 = X11.INSTANCE;
            Rectangle bounds = raster.getBounds();
            int width = bounds.x + bounds.width;
            int height = bounds.y + bounds.height;
            final Pixmap pm = x11.XCreatePixmap(dpy, win, width, height, 1);
            final GC gc = x11.XCreateGC(dpy, pm, new NativeLong(0), null);
            if (gc == null) {
                return null;
            }
            x11.XSetForeground(dpy, gc, new NativeLong(0));
View Full Code Here

                    X11 x11 = X11.INSTANCE;
                    Display dpy = x11.XOpenDisplay(null);
                    if (dpy == null) {
                        return;
                    }
                    Pixmap pm = null;
                    try {
                        X11.Window win = getDrawable(w);
                        pm = src.getPixmap(dpy, win);
                        Xext ext = Xext.INSTANCE;
                        ext.XShapeCombineMask(dpy, win, X11.Xext.ShapeBounding,
View Full Code Here

        @Override
        public void run() {
          try {
            final X11 x11 = X11.INSTANCE;
            final Display display = x11.XOpenDisplay(null);
            Window window = new Window(nativeHandle);
            x11.XSelectInput(display, window,
                new NativeLong(X11.ExposureMask |
                    X11.VisibilityChangeMask |
                    X11.StructureNotifyMask |
                    X11.FocusChangeMask |
View Full Code Here

                throw new X11Exception("Cannot send " + msg + " event.");
            }
        }

        public Window[] getSubwindows() throws X11Exception {
            WindowByReference root = new WindowByReference();
            WindowByReference parent = new WindowByReference();
            PointerByReference children = new PointerByReference();
            IntByReference childCount = new IntByReference();

            if (x11.XQueryTree(display.x11Display, x11Window, root, parent, children, childCount) == 0){
                throw new X11Exception("Can't query subwindows");
View Full Code Here

TOP

Related Classes of com.sun.jna.platform.unix.X11.Display

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.