Examples of NativeLong


Examples of com.sun.jna.NativeLong

        public void putLong(long offset, long value) {
            ptr.setLong(offset, value);
        }

        public void putNativeLong(long offset, long value) {
            ptr.setNativeLong(offset, new NativeLong(value));
        }
View Full Code Here

Examples of com.sun.jna.NativeLong

        Display display = null;
        try {
            // Open the display
            display = x.XOpenDisplay(null);
            // Send the message
            int result = sendClientMessage(display, Native.getWindowID(w), "_NET_WM_STATE", new NativeLong(fullScreen ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE), x.XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", false));
            return result != 0;
        }
        finally {
            if(display != null) {
                // Close the display
View Full Code Here

Examples of com.sun.jna.NativeLong

        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);
        event.xclient.format = 32;
        // Select the proper union structure for the event data and populate it
        event.xclient.data.setType(NativeLong[].class);
        event.xclient.data.l[0] = data0;
        event.xclient.data.l[1] = data1;
        event.xclient.data.l[2] = new NativeLong(0L);
        event.xclient.data.l[3] = new NativeLong(0L);
        event.xclient.data.l[4] = new NativeLong(0L);
        // Send the event
        NativeLong mask = new NativeLong(X11.SubstructureRedirectMask | X11.SubstructureNotifyMask);
        int result = x.XSendEvent(display, x.XDefaultRootWindow(display), 0, mask, event);
        // Flush, since we're not processing an X event loop
        x.XFlush(display);
        // Finally, return the result of sending the event
        return result;
View Full Code Here

Examples of com.sun.jna.NativeLong

    return m_Clib.cfgetospeed(new Linux_C_lib.termios(termios)).intValue();
  }

  public int cfsetispeed(Termios termios, int speed) {
    Linux_C_lib.termios t = new Linux_C_lib.termios(termios);
    int ret = m_Clib.cfsetispeed(t, new NativeLong(speed));
    t.update(termios);
    return ret;
  }
View Full Code Here

Examples of com.sun.jna.NativeLong

    return ret;
  }

  public int cfsetospeed(Termios termios, int speed) {
    Linux_C_lib.termios t = new Linux_C_lib.termios(termios);
    int ret = m_Clib.cfsetospeed(t, new NativeLong(speed));
    t.update(termios);
    return ret;
  }
View Full Code Here

Examples of com.sun.jna.NativeLong

            "tv_usec"//
        );
      }

      public timeval(jtermios.TimeVal timeout) {
        tv_sec = new NativeLong(timeout.tv_sec);
        tv_usec = new NativeLong(timeout.tv_usec);
      }
View Full Code Here

Examples of com.sun.jna.NativeLong

    if (fd == -1)
      m_Clib.perror("open ");

    System.out.printf("open %d\n", fd);

    NativeLong[] x = new NativeLong[] { new NativeLong(0) };
    long[] x2 = { 0 };
    if (m_Clib.ioctl(fd, new NativeLong(TIOCMGET), x) == -1)
      m_Clib.perror("TIOCMGET ");
    if (m_Clib.ioctl(fd, new NativeLong(TIOCMSET), x) == -1)
      m_Clib.perror("TIOCMSET ");
    m_Clib.close(fd);
    System.out.println("OK "+TIOCMSET);
  }
View Full Code Here

Examples of com.sun.jna.NativeLong

    return m_Clib.cfgetospeed(new MacOSX_C_lib.termios(termios)).intValue();
  }

  public int cfsetispeed(Termios termios, int speed) {
    MacOSX_C_lib.termios t = new MacOSX_C_lib.termios(termios);
    int ret = m_Clib.cfsetispeed(t, new NativeLong(speed));
    t.update(termios);
    return ret;
  }
View Full Code Here

Examples of com.sun.jna.NativeLong

    return ret;
  }

  public int cfsetospeed(Termios termios, int speed) {
    MacOSX_C_lib.termios t = new MacOSX_C_lib.termios(termios);
    int ret = m_Clib.cfsetospeed(t, new NativeLong(speed));
    t.update(termios);
    return ret;
  }
View Full Code Here

Examples of com.sun.jna.NativeLong

      s = DEVICE_DIR_PATH + s;
    return m_Clib.open(s, t);
  }

  public int read(int fd, byte[] buffer, int len) {
    return m_Clib.read(fd, ByteBuffer.wrap(buffer), new NativeLong(len)).intValue();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.