本文整理汇总了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);
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}