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

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


              if (watcherRunning && !isDisposed()) {
                getDisplay().asyncExec(new Runnable() {
                  public void run() {
                    if (watcherRunning && !isDisposed()) {
                      final Event swtEvent = new Event();
                      XCrossingEvent ce;
                      switch (xEvent.type) {
//                        case X11.MotionNotify:
//                          XMotionEvent e = (XMotionEvent)xEvent.readField("xmotion");
//                          swtEvent.x = e.x;
//                          swtEvent.y = e.y;
View Full Code Here


                    X11.FocusChangeMask |
                    //X11.PointerMotionMask |
                    X11.EnterWindowMask |
                    X11.LeaveWindowMask));
            while (watcherRunning) {
              final XEvent xEvent = new XEvent();
              x11.XNextEvent(display, xEvent);
              if (watcherRunning && !isDisposed()) {
                getDisplay().asyncExec(new Runnable() {
                  public void run() {
                    if (watcherRunning && !isDisposed()) {
                      final Event swtEvent = new Event();
                      XCrossingEvent ce;
                      switch (xEvent.type) {
//                        case X11.MotionNotify:
//                          XMotionEvent e = (XMotionEvent)xEvent.readField("xmotion");
//                          swtEvent.x = e.x;
//                          swtEvent.y = e.y;
//                          notifyListeners(SWT.MouseMove, swtEvent);
//                          break;
                        case X11.EnterNotify:
                          ce = (XCrossingEvent)xEvent.readField("xcrossing");
                          swtEvent.x = ce.x;
                          swtEvent.y = ce.y;
                          notifyListeners(SWT.MouseEnter, swtEvent);
                          break;
                        case X11.LeaveNotify:
                          ce = (XCrossingEvent)xEvent.readField("xcrossing");
                          swtEvent.x = ce.x;
                          swtEvent.y = ce.y;
                          notifyListeners(SWT.MouseExit, swtEvent);
                          break;
                        default:
View Full Code Here

     */
    private static int sendClientMessage(Display display, long wid, String msg, NativeLong data0, NativeLong data1) {
        // Use the JNA platform X11 binding
        X11 x = X11.INSTANCE;
        // Create and populate a client-event structure
        XEvent event = new XEvent();
        event.type = X11.ClientMessage;
        // Select the proper union structure for the event type and populate it
        event.setType(XClientMessageEvent.class);
        event.xclient.type = X11.ClientMessage;
        event.xclient.serial = new NativeLong(0L);
        event.xclient.send_event = TRUE;
        event.xclient.message_type = x.XInternAtom(display, msg, false);
        event.xclient.window = new com.sun.jna.platform.unix.X11.Window(wid);
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

            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

                    }
                    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

                if (info != null) {
                    List<X11.VisualID> list = new ArrayList<X11.VisualID>();
                    XVisualInfo[] infos =
                        (XVisualInfo[])info.toArray(pcount.getValue());
                    for (int i = 0; i < infos.length; i++) {
                        XRenderPictFormat format =
                            X11.Xrender.INSTANCE.XRenderFindVisualFormat(dpy,
                                                                         infos[i].visual);
                        if (format.type == X11.Xrender.PictTypeDirect
                            && format.direct.alphaMask != 0) {
                            list.add(infos[i].visualid);
View Full Code Here

                if (info != null) {
                    List<X11.VisualID> list = new ArrayList<X11.VisualID>();
                    XVisualInfo[] infos =
                        (XVisualInfo[])info.toArray(pcount.getValue());
                    for (int i = 0; i < infos.length; i++) {
                        XRenderPictFormat format =
                            X11.Xrender.INSTANCE.XRenderFindVisualFormat(dpy,
                                                                         infos[i].visual);
                        if (format.type == X11.Xrender.PictTypeDirect
                            && format.direct.alphaMask != 0) {
                            list.add(infos[i].visualid);
View Full Code Here

  public void testSequence() {
    ProcessDefinition processDefinition = ProcessFactory.build("sequence")
        .compositeNode("sequence").initial().behaviour(new Sequence())
          .needsPrevious()
          .node("one").behaviour(new Display("one"))
          .node("2").behaviour(new WaitState())
          .node("two").behaviour(new Display("two"))
        .compositeEnd()
    .done();

    Execution execution = processDefinition.startExecution();
    execution.signal();
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.