Package com.sun.jna.examples.unix.X11

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


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


                if (System.getProperty("java.version").matches("^1\\.4\\..*"))
                    alphaWindow.setVisible(true);
                win = new X11.Window((int)Native.getWindowID(alphaWindow));
                XSetWindowAttributes xswa = new XSetWindowAttributes();
                xswa.background_pixel = new NativeLong(0x0);
                Visual visual = x11.XDefaultVisual(dpy, x11.XDefaultScreen(dpy));
                xswa.colormap = x11.XCreateColormap(dpy, win, visual, X11.AllocNone);
                x11.XChangeWindowAttributes(dpy, win, new NativeLong(X11.CWBackPixel|X11.CWColormap), xswa);
                Window parent = alphaWindow.getOwner();
                Point where = parent.getLocationOnScreen();
                where.translate(parent.getWidth(), 0);
View Full Code Here

            if (!alphaWindow.isDisplayable()) {
                alphaWindow.pack();
                if (System.getProperty("java.version").matches("^1\\.4\\..*"))
                    alphaWindow.setVisible(true);
                win = new X11.Window((int)Native.getWindowID(alphaWindow));
                XSetWindowAttributes xswa = new XSetWindowAttributes();
                xswa.background_pixel = new NativeLong(0x0);
                Visual visual = x11.XDefaultVisual(dpy, x11.XDefaultScreen(dpy));
                xswa.colormap = x11.XCreateColormap(dpy, win, visual, X11.AllocNone);
                x11.XChangeWindowAttributes(dpy, win, new NativeLong(X11.CWBackPixel|X11.CWColormap), xswa);
                Window parent = alphaWindow.getOwner();
View Full Code Here

        private int[] getAlphaVisuals() {
            X11 x11 = X11.INSTANCE;
            Display dpy = x11.XOpenDisplay(null);
            if (dpy == null)
                return new int[0];
            XVisualInfo info = null;
            try {
                int screen = x11.XDefaultScreen(dpy);
                XVisualInfo template = new XVisualInfo();
                template.screen = screen;
                template.depth = 32;
                template.c_class = X11.TrueColor;
                NativeLong mask = new NativeLong(X11.VisualScreenMask
                                                 | X11.VisualDepthMask
View Full Code Here

            didCheck = true;
            X11 x11 = X11.INSTANCE;
            Display dpy = x11.XOpenDisplay(null);
            if (dpy == null)
                return alphaVisualIDs;
            XVisualInfo info = null;
            try {
                int screen = x11.XDefaultScreen(dpy);
                XVisualInfo template = new XVisualInfo();
                template.screen = screen;
                template.depth = 32;
                template.c_class = X11.TrueColor;
                NativeLong mask = new NativeLong(X11.VisualScreenMask
                                                 | X11.VisualDepthMask
View Full Code Here

            X11 x11 = X11.INSTANCE;
            Display dpy = x11.XOpenDisplay(null);
            if (dpy == null) {
        return alphaVisualIDs;
      }
            XVisualInfo info = null;
            try {
                int screen = x11.XDefaultScreen(dpy);
                XVisualInfo template = new XVisualInfo();
                template.screen = screen;
                template.depth = 32;
                template.c_class = X11.TrueColor;
                NativeLong mask = new NativeLong(X11.VisualScreenMask
                                                 | X11.VisualDepthMask
View Full Code Here

        public void setWindowMask(final Window w, final Raster raster) {
            Runnable action = new Runnable() {
                public void run() {
                    X11 x11 = X11.INSTANCE;
                    Xext ext = Xext.INSTANCE;
                    Display dpy = x11.XOpenDisplay(null);
                    if (dpy == null)
                        return;
                    Pixmap pm = null;
                    try {
                        X11.Window win = getDrawable(w);
                        if (raster == null
                            || ((pm = createBitmap(dpy, win, w, raster)) == null)) {
                            ext.XShapeCombineMask(dpy, win,
                                                  X11.Xext.ShapeBounding,
                                                  0, 0, Pixmap.None,
                                                  X11.Xext.ShapeSet);
                        }
                        else {
                            ext.XShapeCombineMask(dpy, win,
                                                  X11.Xext.ShapeBounding, 0, 0,
                                                  pm, X11.Xext.ShapeSet);
                        }
                    }
                    finally {
View Full Code Here

                    }
                    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,
                                              0, 0, pm == null ? Pixmap.None : pm,
                                              X11.Xext.ShapeSet);
                    }
                    finally {
                        if (pm != null) {
View Full Code Here

                    }
                    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,
                                              0, 0, pm == null ? Pixmap.None : pm,
                                              X11.Xext.ShapeSet);
                    }
                    finally {
                        if (pm != null) {
View Full Code Here

    @Override
    protected void setMask(final Component w, final Rectangle[] rectangles) {
      Runnable action = new Runnable() {
        public void run() {
          X11 x11 = X11.INSTANCE;
          Xext ext = Xext.INSTANCE;
          Display dpy = x11.XOpenDisplay(null);
          if (dpy == null) {
            return;
          }
          Pixmap pm = null;
          try {
            X11.Window win = getDrawable(w);
            if (rectangles == null
                || ((pm = createBitmap(dpy, win, rectangles)) == null)) {
              ext.XShapeCombineMask(dpy, win,
                  X11.Xext.ShapeBounding, 0, 0, Pixmap.None,
                  X11.Xext.ShapeSet);
            } else {
              ext.XShapeCombineMask(dpy, win,
                  X11.Xext.ShapeBounding, 0, 0, pm,
                  X11.Xext.ShapeSet);
            }
          } finally {
            if (pm != null) {
View Full Code Here

TOP

Related Classes of com.sun.jna.examples.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.