示例#1
0
 //throws gnu.x11.extension.NotFoundException {
 // print opcode 0 - query version
 /**
    * @see <a href="XpQueryVersion.html">XpQueryVersion</a>
    */
 public Print(Display display)
     : base(display, "XpExtension", MINOR_OPCODE_STRINGS, 2, 2)
 {
     // check version before any other operations
     Request request = new Request (display, major_opcode, 0, 1);
     Data reply = display.read_reply (request);
     server_major_version = reply.read2 (4);
     server_minor_version = reply.read2 (4);
 }
示例#2
0
 //throws NotFoundException {
 // shape opcode 0 - query version
 /**
    * @see <a href="XShapeQueryExtension.html">XShapeQueryExtension</a>
    */
 public Shape(Display display)
     : base(display, "SHAPE", MINOR_OPCODE_STRINGS, 0, 1)
 {
     // check version before any other operations
     Request request = new Request (display, major_opcode, 0, 1);
     Data reply = display.read_reply (request);
     server_major_version = reply.read2 (8);
     server_minor_version = reply.read2 (10);
 }
示例#3
0
文件: EVI.cs 项目: jbnivoit/projects
 //throws NotFoundException {
 // evi opcode 0 - get version
 /**
    * @see <a href="XeviQueryVersion.html">XeviQueryVersion</a>
    */
 public EVI(Display display)
     : base(display, "Extended-Visual-Information", MINOR_OPCODE_STRINGS)
 {
     // check version before any other operations
     /* Note that the specification says the request includes a major and a
      * minor version, but most implementation (xfree86 3.3/4.0) does not.
      * Which one is bugged?
      */
     Request request = new Request (display, major_opcode, 0, 1);
     Data reply = display.read_reply (request);
     server_major_version = reply.read2 (8);
     server_minor_version = reply.read2 (10);
 }
示例#4
0
        // dbe opcode 0 - get version
        public DBE(gnu.x11.Display display) //throws NotFoundException {
            : base(display, "DOUBLE-BUFFER", MINOR_OPCODE_STRINGS, 1, 0)
        {
            // check version before any other operations
            Request request = new Request(display, major_opcode, 0, 2);

            request.write1(CLIENT_MAJOR_VERSION);
            request.write1(CLIENT_MINOR_VERSION);

            Data reply = display.read_reply(request);

            server_major_version = reply.read1(8);
            server_minor_version = reply.read1(9);
        }
示例#5
0
        // xc-misc opcode 0 - get version
        public XCMisc(gnu.x11.Display display) //throws NotFoundException {
            : base(display, "XC-MISC", MINOR_OPCODE_STRINGS)
        {
            // check version before any other operations
            Request request = new Request(display, major_opcode, 0, 2);

            request.write2(CLIENT_MAJOR_VERSION);
            request.write2(CLIENT_MINOR_VERSION);

            Data reply = display.read_reply(request);

            server_major_version = reply.read2(8);
            server_minor_version = reply.read2(10);
        }
示例#6
0
文件: Atom.cs 项目: jbnivoit/projects
        // opcode 16 - intern atom

        /**
         * @see <a href="XInternAtom.html">XInternAtom</a>
         */
        public Atom(Display display, String name, bool only_if_exists)
        {
            this.display = display;
            this.name    = name;

            Request request = new Request(display, 16, only_if_exists, 2 + Data.unit(name));

            request.write2(name.Length);
            request.write2_unused();
            request.write1(name);

            Data reply = display.read_reply(request);

            id = reply.read4(8);

            display.atom_ids.Add(id, this);
            display.atom_names.Add(name, this);
        }
示例#7
0
文件: Atom.cs 项目: jbnivoit/projects
        // opcode 17 - get atom name

        /**
         * @see <a href="XGetAtomName.html">XGetAtomName</a>
         */
        public Atom(Display display, int id, bool only_if_exists)
        {
            this.display = display;
            this.id      = id;

            Request request = new Request(display, 17, 2);

            request.write4(id);

            Data    reply = display.read_reply(request);
            int     len   = reply.read2(8);
            Decoder dec   = Encoding.ASCII.GetDecoder();

            char [] d = new char[len];
            len  = dec.GetChars(reply.data, 32, len, d, 0);
            name = new String(d, 0, len);

            display.atom_ids.Add(id, this);
            display.atom_names.Add(name, this);
        }
示例#8
0
文件: Atom.cs 项目: jbnivoit/projects
        // opcode 17 - get atom name
        /**
           * @see <a href="XGetAtomName.html">XGetAtomName</a>
           */
        public Atom(Display display, int id, bool only_if_exists)
        {
            this.display = display;
            this.id = id;

            Request request = new Request (display, 17, 2);
            request.write4 (id);

            Data reply = display.read_reply (request);
            int len = reply.read2 (8);
            Decoder dec	 = Encoding.ASCII.GetDecoder();
            char [] d = new char[len];
            len = dec.GetChars(reply.data,32,len,d,0);
            name = new String (d, 0, len);

            display.atom_ids.Add (id, this);
            display.atom_names.Add (name, this);
        }
示例#9
0
文件: Atom.cs 项目: jbnivoit/projects
        // opcode 16 - intern atom
        /**
           * @see <a href="XInternAtom.html">XInternAtom</a>
           */
        public Atom(Display display, String name, bool only_if_exists)
        {
            this.display = display;
            this.name = name;

            Request request = new Request (display, 16, only_if_exists, 2+Data.unit (name));
            request.write2 (name.Length);
            request.write2_unused ();
            request.write1 (name);

            Data reply = display.read_reply (request);
            id = reply.read4 (8);

            display.atom_ids.Add (id, this);
            display.atom_names.Add (name, this);
        }
示例#10
0
        // opcode 43 - get input focus

        /**
         * @see <a href="XGetInputFocus.html">XGetInputFocus</a>
         */
        public InputFocusReply input_focus()
        {
            Request request = new Request(display, 43, 1);

            return(new InputFocusReply(display, display.read_reply(request)));
        }
示例#11
0
        //throws gnu.x11.extension.NotFoundException
        // render opcode 0 - query version
        public Render(Display display)
            : base(display, "RENDER", MINOR_OPCODE_STRINGS, 5, 0)
        {
            // check version before any other operations
            Request request = new Request (display, major_opcode, 0, 3);
            request.write4 (CLIENT_MAJOR_VERSION);
            request.write4 (CLIENT_MINOR_VERSION);

            Data reply = display.read_reply (request);
            server_major_version = reply.read4 (8);
            server_minor_version = reply.read4 (12);
        }