Examples of NativeLong


Examples of com.sun.jna.NativeLong

  }
 
  private int buffer_data(FileInputStream in, ogg_sync_state oy) throws IOException
  {
    final int BUFSIZE = 4096;
    Pointer buffer = OGG.ogg_sync_buffer(oy, new NativeLong(BUFSIZE));
    byte[] buffer2 = new byte[BUFSIZE]; // TODO: this is inefficient.
    int bytes = in.read(buffer2, 0, BUFSIZE);
    if (bytes < 0)
      return bytes; // EOF
    buffer.write(0, buffer2, 0, bytes);
    OGG.ogg_sync_wrote(oy, new NativeLong(bytes));
    return (bytes);
  }
View Full Code Here

Examples of com.sun.jna.NativeLong

  }
 
  private int buffer_data(PullSourceStream in, ogg_sync_state oy) throws IOException
  {
    final int BUFSIZE = 4096;
    Pointer buffer = OGG.ogg_sync_buffer(oy, new NativeLong(BUFSIZE));
    byte[] buffer2 = new byte[BUFSIZE]; // TODO: this is inefficient.
    int bytes = in.read(buffer2, 0, BUFSIZE);
    if (bytes < 0)
      return bytes; // EOF
    buffer.write(0, buffer2, 0, bytes);
    OGG.ogg_sync_wrote(oy, new NativeLong(bytes));
    return (bytes);
  }
View Full Code Here

Examples of com.sun.jna.NativeLong

          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 |
                    //X11.PointerMotionMask |
                    X11.EnterWindowMask |
View Full Code Here

Examples of com.sun.jna.NativeLong

     * Sets the native window for the {@link Element} to use to display video.
     *
     * @param handle A native handle to use to display video.
     */
    public void setWindowHandle(long handle) {
      GSTXOVERLAY_API.gst_x_overlay_set_window_handle(this, new NativeLong(handle));
    }
View Full Code Here

Examples of com.sun.jna.NativeLong

     * Sets a tuning frequency on the given tuner/channel.
     * <p><b>Note:</b> this requires the given channel to be a "tuning"
     * channel, which can be checked with {@link #isTuningChannel}
     */
    public void setFrequency(long frequency) {
        GSTTUNER_API.gst_tuner_set_frequency(tuner, this, new NativeLong(frequency));
    }
View Full Code Here

Examples of com.sun.jna.NativeLong

        } else if (propType.equals(GType.CHAR)) {
            GVALUE_API.g_value_set_char(propValue, (byte) intValue(data));
        } else if (propType.equals(GType.UCHAR)) {
            GVALUE_API.g_value_set_uchar(propValue, (byte) intValue(data));
        } else if (propType.equals(GType.LONG)) {
            GVALUE_API.g_value_set_long(propValue, new NativeLong(longValue(data)));
        } else if (propType.equals(GType.ULONG)) {
            GVALUE_API.g_value_set_ulong(propValue, new NativeLong(longValue(data)));
        } else if (propType.equals(GType.INT64)) {
            GVALUE_API.g_value_set_int64(propValue, longValue(data));
        } else if (propType.equals(GType.UINT64)) {
            GVALUE_API.g_value_set_uint64(propValue, longValue(data));
        } else if (propType.equals(GType.BOOLEAN)) {
View Full Code Here

Examples of com.sun.jna.NativeLong

        } else if (type.equals(GType.CHAR)) {
            GVALUE_API.g_value_set_char(value, (byte) intValue(data));
        } else if (type.equals(GType.UCHAR)) {
            GVALUE_API.g_value_set_uchar(value, (byte) intValue(data));
        } else if (type.equals(GType.LONG)) {
            GVALUE_API.g_value_set_long(value, new NativeLong(longValue(data)));
        } else if (type.equals(GType.ULONG)) {
            GVALUE_API.g_value_set_ulong(value, new NativeLong(longValue(data)));
        } else if (type.equals(GType.INT64)) {
            GVALUE_API.g_value_set_int64(value, longValue(data));
        } else if (type.equals(GType.UINT64)) {
            GVALUE_API.g_value_set_uint64(value, longValue(data));
        } else if (type.equals(GType.BOOLEAN)) {
View Full Code Here

Examples of com.sun.jna.NativeLong

        protected final Callback cb;
        protected final NativeLong id;
        volatile boolean connected = false;

        protected GCallback(NativeLong id, Callback cb) {
            this.id = id != null ? id : new NativeLong(0);
            this.cb = cb;
            this.connected = this.id.intValue() != 0;
        }
View Full Code Here

Examples of com.sun.jna.NativeLong

                } else if (Boolean.class.isAssignableFrom(paramType)) {
                    nativeType = int.class;
                }
                parameterTypes[i] = nativeType;
            }
            NativeLong connectID = GSIGNAL_API.g_signal_connect_data(GObject.this,
                    signal, this, null, null, 0);
            if (connectID.intValue() == 0) {
                throw new IllegalArgumentException(String.format("Failed to connect signal '%s'", signal));
            }
            this.id = connectID;
        }
View Full Code Here

Examples of com.sun.jna.NativeLong

  /**
   * readProcessMemory to memory.
   */
  long readProcessMemory(Pointer baseAddress, Memory goal)
  {
    NativeLong sizeAvalaible = new NativeLong(goal.size());
    NativeLongByReference bytesReadRefernce = new NativeLongByReference();
    boolean ret = MyKernel32.INSTANCE.ReadProcessMemory(_processInformation.hProcess.getPointer(), baseAddress, goal,
        sizeAvalaible, bytesReadRefernce);
    if (!ret)
      log("pid " + _pid + " ReadProcessMemory returns " + ret);
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.