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


C# Request.write2方法代码示例

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


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

示例1: best_size

        // opcode 97 - query best size
        /**
           * @param klass valid:
           * {@link #CURSOR},
           * {@link #TILE},
           * {@link #STIPPLE}
           *
           * @see <a href="XQueryBestSize.html">XQueryBestSize</a>
           */
        public Size best_size(int klass, int width, int height)
        {
            Request request = new Request (display, 97, 3);
            request.write4 (id);
            request.write2 (width);
            request.write2 (height);

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

示例2: XCMisc

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

示例3: alloc_color

        // opcode 84 - alloc color
        /**
           * @see <a href="XAllocColor.html">XAllocColor</a>
           */
        public Color alloc_color(int red, int green, int blue)
        {
            Request request = new Request (display, 84, 4);
            request.write4 (id);
            request.write2 (red);
            request.write2 (green);
            request.write2 (blue);

            Data reply = display.read_reply (request);
            Color color = new Color (reply.read4 (16));
            color.exact = new RGB (reply.read2 (8), reply.read2 (10), reply.read2 (12));
            return color;
        }
开发者ID:jbnivoit,项目名称:projects,代码行数:17,代码来源:Colormap.cs

示例4: Pixmap

        // opcode 53 - create pixmap
        /**
           * @see <a href="XCreatePixmap.html">XCreatePixmap</a>
           */
        public Pixmap(Drawable drawable, int width, int height, int depth)
            : base(drawable.display)
        {
            this.width = width;
            this.height = height;

            Request request = new Request (display, 53, depth, 4);
            request.write4 (id);
            request.write4 (drawable.id);
            request.write2 (width);
            request.write2 (height);
            display.send_request (request);
        }
开发者ID:jbnivoit,项目名称:projects,代码行数:17,代码来源:Pixmap.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: 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

示例7: grab_pointer

     // opcode 26 - grab pointer
     /**
        * @param pointer_mode valid:
        * {@link #SYNCHRONOUS},
        * {@link #ASYNCHRONOUS}
        *
        * @param keyboard_mode valid:
        * {@link #SYNCHRONOUS},
        * {@link #ASYNCHRONOUS}
        *
        * @param confine_to possible: {@link #NONE}
        * @param cursor possible: {@link Cursor#NONE}
        * @param time possible: {@link Display#CURRENT_TIME}
        *
        * @return valid:
        * {@link #SUCCESS},
        * {@link #ALREADY_GRABBED},
        * {@link #FROZEN},
        * {@link #INVALID_TIME},
        * {@link #NOT_VIEWABLE}
        *
        * @see <a href="XGrabPointer.html">XGrabPointer</a>
        */
     public int grab_pointer(bool owner_events, int event_mask, 
 int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor,
 int time)
     {
         Request request = new Request (display, 26, owner_events, 6);
         request.write4 (id);
         request.write2 (event_mask);
         request.write1 (pointer_mode);
         request.write1 (keyboard_mode);
         request.write4 (confine_to.id);
         request.write4 (cursor.id);
         request.write4 (time);
         return display.read_reply (request).read1 (1);
     }
开发者ID:jbnivoit,项目名称:projects,代码行数:37,代码来源:Window.cs

示例8: set_clip_rectangles

        // render opcode 6 - set picture clip rectangles
        /**
           * @see <a href="XRenderSetPictureClipRectangles.html">
           * XRenderSetPictureClipRectangles</a>
           */
        public void set_clip_rectangles(int x_origin, int y_origin,
    Rectangle [] rectangles)
        {
            Request request = new Request (display, render.major_opcode, 7,
              3+2*rectangles.Length);
            request.write4 (id);

            for (int i=0; i<rectangles.Length; i++) {
              request.write2 (rectangles [i].x);
              request.write2 (rectangles [i].y);
              request.write2 (rectangles [i].width);
              request.write2 (rectangles [i].height);
            }
            display.send_request (request);
        }
开发者ID:jbnivoit,项目名称:projects,代码行数:20,代码来源:Picture.cs

示例9: warp_pointer

     // opcode 41 - warp pointer
     /**
        * @param src possible: {@link #NONE}
        * @see <a href="XWarpPointer.html">XWarpPointer</a>
        */
     public void warp_pointer(Window src, int src_x, int src_y, 
 int src_width, int src_height, int dest_x, int dest_y)
     {
         Request request = new Request (display, 41, 6);
         request.write4 (src.id);
         request.write4 (id);
         request.write2 (src_x);
         request.write2 (src_y);
         request.write2 (src_width);
         request.write2 (src_height);
         request.write2 (dest_x);
         request.write2 (dest_y);
         display.send_request (request);
     }
开发者ID:jbnivoit,项目名称:projects,代码行数:19,代码来源:Window.cs

示例10: change_pointer_control

     // opcode 105 - change pointer control
     /**
        * @see <a href="XChangePointerControl.html">XChangePointerControl</a>
        */
     public void change_pointer_control(bool do_accel, 
 bool do_threshold, int accel_numerator, int accel_denominator,
 int threshold)
     {
         Request request = new Request (display, 105, 3);
         request.write2 (accel_numerator);
         request.write2 (accel_denominator);
         request.write2 (threshold);
         request.write1 (do_accel);
         request.write1 (do_threshold);
         display.send_request (request);
     }
开发者ID:jbnivoit,项目名称:projects,代码行数:16,代码来源:Input.cs

示例11: set_font_path

 // opcode 51 - set font path
 /**
    * @see <a href="XSetFontPath.html">XSetFontPath</a>
    */
 public void set_font_path(int count, String path)
 {
     Request request = new Request (this, 51, 2+Data.unit (path));
     request.write2 (count);
     request.write2_unused ();
     request.write1 (path);
     send_request (request);
 }
开发者ID:jbnivoit,项目名称:projects,代码行数:12,代码来源:Display.cs

示例12: 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

示例13: 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

示例14: 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

示例15: 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


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