当前位置: 首页>>代码示例>>C#>>正文


C# Request.write1方法代码示例

本文整理汇总了C#中gnu.x11.Request.write1方法的典型用法代码示例。如果您正苦于以下问题:C# Request.write1方法的具体用法?C# Request.write1怎么用?C# Request.write1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gnu.x11.Request的用法示例。


在下文中一共展示了Request.write1方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DBE

        //throws NotFoundException {
        // dbe opcode 0 - get version
        public DBE(gnu.x11.Display display)
            : 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);
        }
开发者ID:jbnivoit,项目名称:projects,代码行数:14,代码来源:DBE.cs

示例2: text_extent

        // opcode 48 - query text extents
        /**
           * @see <a href="XQueryTextExtents.html">XQueryTextExtents</a>
           */
        public TextExtentReply text_extent(String s)
        {
            Request request = new Request (display, 48, s.Length % 2 == 1,
              2+Data.unit (s));

            request.write4 (id);
            request.write1 (s);
            return new TextExtentReply (display.read_reply (request));
        }
开发者ID:jbnivoit,项目名称:projects,代码行数:13,代码来源:Fontable.cs

示例3: Font

        // opcode 45 - open font
        /**
           * @see <a href="XLoadFont.html">XLoadFont</a>
           */
        public Font(Display display, String name)
            : base(display)
        {
            this.name = name;

            Request request = new Request (display, 45, 3+Data.unit (name));
            request.write4 (id);
            request.write2 (name.Length);
            request.write2_unused ();
            request.write1 (name);
            display.send_request (request);
        }
开发者ID:jbnivoit,项目名称:projects,代码行数:16,代码来源:Font.cs

示例4: XTest

        //throws NotFoundException {
        // xtest opcode 0 - get version
        /**
           * @see <a href="XTestQueryExtension.html">XTestQueryExtension</a>
           */
        public XTest(gnu.x11.Display display)
            : base(display, "XTEST", MINOR_OPCODE_STRINGS)
        {
            // check version before any other operations
            Request request = new Request (display, major_opcode, 0, 2);
            request.write1 (CLIENT_MAJOR_VERSION);
            request.write1_unused ();
            request.write2 (CLIENT_MINOR_VERSION);

            Data reply = display.read_reply (request);
            server_major_version = reply.read1 (1);
            server_minor_version = reply.read2 (10);
        }
开发者ID:jbnivoit,项目名称:projects,代码行数:18,代码来源:XTest.cs

示例5: fill_rectangle

     // render opcode 26 - fill rectangles
     /**
        * @see <a href="XRenderFillRectangle.html">XRenderFillRectangle</a>
        */
     public void fill_rectangle(int op, Color color, int x, int y, 
 int width, int height)
     {
         Request request = new Request (display, render.major_opcode, 26, 7);
         request.write1 (op);
         request.write3_unused ();
         request.write4 (id);
         request.write2 (x);
         request.write2 (y);
         request.write2 (width);
         request.write2 (height);
         request.write2 (color.red);
         request.write2 (color.green);
         request.write2 (color.blue);
         request.write2 (color.alpha);
         display.send_request (request);
     }
开发者ID:jbnivoit,项目名称:projects,代码行数:21,代码来源:Picture.cs

示例6: extension

 // opcode 98 - query extension
 /**
    * @see <a href="XQueryExtension.html">XQueryExtension</a>
    */
 public ExtensionReply extension(String name)
 {
     Request request = new Request (this, 98, 2+Data.unit (name));
     request.write2 (name.Length);
     request.write2_unused ();
     request.write1 (name);
     return new ExtensionReply (read_reply (request));
 }
开发者ID:jbnivoit,项目名称:projects,代码行数:12,代码来源:Display.cs

示例7: fonts

        public Enum fonts(String pattern, int max_name_count)
        {
            Request request = new Request (this, 49, 2+Data.unit (pattern));
            request.write2 (max_name_count);
            request.write2 (pattern.Length);
            request.write1 (pattern);

            Data reply = read_reply (request);
            return new FontsEnum (this, reply, 32, reply.read2 (8));
        }
开发者ID:jbnivoit,项目名称:projects,代码行数:10,代码来源:Display.cs

示例8: composite

     // render opcode 8 - composite
     /**
        * @param operation
        * {@link #CLEAR}
        * {@link #SRC}
        * {@link #DST}
        * {@link #OVER}
        * {@link #OVER_REVERSE}
        * {@link #IN}
        * {@link #IN_REVERSE}
        * {@link #OUT}
        * {@link #OUT_REVERSE}
        * {@link #ATOP}
        * {@link #ATOP_REVERSE}
        * {@link #XOR}
        * {@link #ADD}
        * {@link #SATURATE}
        * {@link #MAXIMUM}
        *
        * @see <a href="XRenderComposite.html">XRenderComposite</a>
        */
     public void composite(int op, Picture src, Picture mask, Picture dst, 
 int src_x, int src_y, int mask_x, int mask_y, int dst_x, int dst_y, 
 int width, int height)
     {
         Request request = new Request (display, major_opcode, 8, 9);
         request.write1 (op);
         request.write3_unused ();
         request.write4 (src.id);
         request.write4 (mask.id);
         request.write4 (dst.id);
         request.write2 (src_x);
         request.write2 (src_y);
         request.write2 (mask_x);
         request.write2 (mask_y);
         request.write2 (dst_x);
         request.write2 (dst_y);
         request.write2 (width);
         request.write2 (height);
         display.send_request (request);
     }
开发者ID:jbnivoit,项目名称:projects,代码行数:41,代码来源:Render.cs

示例9: change_hosts

        // opcode 109 - change hosts
        /**
           * @param mode valid:
           * {@link #INSERT},
           * {@link #DELETE}
           *
           * @see <a href="XAddHost.html">XAddHost</a>
           * @see <a href="XRemoveHost.html">XRemoveHost</a>
           */
        public void change_hosts(int mode, int family, byte [] host)
        {
            Request request = new Request (this, 109, mode, 2+Data.unit (host));

            request.write1 (family);
            request.write1_unused ();
            request.write2 (host.Length);
            request.write1 (host);
            send_request (request);
        }
开发者ID:jbnivoit,项目名称:projects,代码行数:19,代码来源:Display.cs

示例10: grab_key

        // opcode 33 - grab key
        /**
           * @param modifiers possible: {@link #ANY_MODIFIER}
           * @param pointer_mode valid:
           * {@link #SYNCHRONOUS},
           * {@link #ASYNCHRONOUS}
           *
           * @param keyboard_mode valid:
           * {@link #SYNCHRONOUS},
           * {@link #ASYNCHRONOUS}
           *
           * @see <a href="XGrabKey.html">XGrabKey</a>
           */
        public void grab_key(int keysym, int modifiers, bool owner_events, 
    int pointer_mode, int keyboard_mode)
        {
            int keycode = display.input.keysym_to_keycode (keysym);

            Request request = new Request (display, 33, owner_events, 4);
            request.write4 (id);
            request.write2 (modifiers);
            request.write1 (keycode);
            request.write1 (pointer_mode);
            request.write1 (keyboard_mode);
            display.send_request (request);
        }
开发者ID:jbnivoit,项目名称:projects,代码行数:26,代码来源:Window.cs

示例11: set_pointer_mapping

 // opcode 116 - set pointer mapping
 /**
    * @return valid:
    * {@link #SUCCESS},
    * {@link #BUSY}
    *
    * @see <a href="XSetPointerMapping.html">XSetPointerMapping</a>
    */
 public int set_pointer_mapping(byte [] map)
 {
     Request request = new Request (display, 116, map.Length, 2+Data.unit (map));
     request.write1 (map);
     return display.read_reply (request).read1 (1);
 }
开发者ID:jbnivoit,项目名称:projects,代码行数:14,代码来源:Input.cs

示例12: fake_input

     // xtest opcode 2 - fake input
     /**
        * @param type valid:
        * {@link #KEY_PRESS},
        * {@link #KEY_RELEASE},
        * {@link #BUTTON_PRESS},
        * {@link #BUTTON_RELEASE},
        * {@link #MOTION_NOTIFY}
        *
        * @param time possible: {@link gnu.x11.Display#CURRENT_TIME}
        */
     public void fake_input(int type, int detail, int delay, Window root, 
 int x, int y)
     {
         Request request = new Request (display, major_opcode, 2, 9);
         request.write1 (type);
         request.write1 (detail);
         request.write2_unused ();
         request.write4 (delay);
         request.write4 (root.id);
         request.write_unused (8);
         request.write2 (x);
         request.write2 (y);
         display.send_request (request);
     }
开发者ID:jbnivoit,项目名称:projects,代码行数:25,代码来源:XTest.cs

示例13: set_screen_saver

     // opcode 107 - set screen saver
     /**
        * @param prefer_blanking valid:
        * {@link #NO},
        * {@link #YES},
        * {@link #DEFAULT}
        *
        * @param allow_exposures valid:
        * {@link #NO},
        * {@link #YES},
        * {@link #DEFAULT}
        *
        * @see <a href="XSetScreenSaver.html">XSetScreenSaver</a>
        */
     public void set_screen_saver(int timeout, int interval, 
 int prefer_blanking, int allow_exposures)
     {
         Request request = new Request (this, 107, 3);
         request.write2 (timeout);
         request.write2 (interval);
         request.write1 (prefer_blanking);
         request.write1 (allow_exposures);
         send_request (request);
     }
开发者ID:jbnivoit,项目名称:projects,代码行数:24,代码来源:Display.cs

示例14: grab_control

 // xtest opcode 3 - grab control
 /**
    * @see <a href="XTestGrabControl.html">XTestGrabControl</a>
    */
 public void grab_control(bool impervious)
 {
     Request request = new Request (display, major_opcode, 3, 2);
     request.write1 (impervious);
     display.send_request (request);
 }
开发者ID:jbnivoit,项目名称:projects,代码行数:10,代码来源:XTest.cs

示例15: change_property

        // opcode 18 - change property
        /**
           * Extra parameters (offset and data_format) are used to support Data
           * class as parameter for writing. See set_wm_normal_hints ().
           *
           * @param mode valid:
           * {@link #REPLACE},
           * {@link #PREPEND},
           * {@link #APPEND}
           *
           * @param format: valid:
           * <code>8</code>,
           * <code>16</code>,
           * <code>32</code>
           *
           * @param data_format: valid:
           * <code>8</code>,
           * <code>16</code>,
           * <code>32</code>
           *
           * @see <a href="XChangeProperty.html">XChangeProperty</a>
           */
        public void change_property(int mode, int n, Atom property, Atom type,
    int format, Object data, int offset, int data_format)
        {
            Request request = new Request (display, 18, mode, 6+Data.unit (n*format/8));
            request.write4 (id);
            request.write4 (property.id);
            request.write4 (type.id);
            request.write1 (format);
            request.write3_unused ();
            request.write4 (n);		// data length in format unit

            // data
            switch (data_format) {
            case 8: request.write1 ((byte []) data, offset); break;
            case 16: request.write2 ((int []) data, offset); break;
            case 32: request.write4 ((int []) data, offset); break;
            }
            display.send_request (request);
        }
开发者ID:jbnivoit,项目名称:projects,代码行数:41,代码来源:Window.cs


注:本文中的gnu.x11.Request.write1方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。