All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gnu.x11.extension.BigRequests Maven / Gradle / Ivy

Go to download

Escher is a collection of libraries for X Window System written purely in Java.

The newest version!
package gnu.x11.extension;

import gnu.x11.RequestOutputStream;
import gnu.x11.ResponseInputStream;


/**
 * Big Requests Extension. The specification can be found here.
 */
public class BigRequests extends Extension {
  public BigRequests (gnu.x11.Display display) throws NotFoundException { 
    super (display, "BIG-REQUESTS", null); 
  }


  // bigrequests opcode 0 - big req enable
  /**
   * @see 
   * XExtendedMaxRequestSize
   */
  public int enable () {
    int st;
    RequestOutputStream o = display.out;
    synchronized (o) {
      o.begin_request (major_opcode, 0, 1);
      ResponseInputStream i = display.in;
      synchronized (i) {
        i.read_reply (o);
        i.skip (8);
        st = i.read_int32 ();
        i.skip (20);
      }
    }
    return st;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy