public void init_server_info(Data reply) { connected = true; release_no = reply.read4(8); resource_base = reply.read4(12); resource_mask = reply.read4(16); int vendor_length = reply.read2(24); extended_maximum_request_length = maximum_request_length = reply.read2(26); int screen_count = reply.read1(28); int pixmap_format_count = reply.read1(29); image_byte_order = reply.read1(30); bitmap_format_bit_order = reply.read1(31); bitmap_format_scanline_unit = reply.read1(32); bitmap_format_scanline_pad = reply.read1(33); int min_keycode = reply.read1(34); int max_keycode = reply.read1(35); input = new Input(this, min_keycode, max_keycode); input.keyboard_mapping(); vendor = reply.read_string(40, vendor_length); // pixmap formats pixmap_formats = new Pixmap.Format [pixmap_format_count]; int pixmap_formats_offset = 40 + Data.len(vendor_length); for (int i = 0; i < pixmap_format_count; i++) { pixmap_formats [i] = new Pixmap.Format( reply, pixmap_formats_offset + i * 8); } // screens if (default_screen_no < 0 || default_screen_no >= screen_count) { throw new Exception("Invalid screen number (screen-count " + screen_count + "): " + default_screen_no); } screens = new Screen [screen_count]; int screen_offset = pixmap_formats_offset + 8 * pixmap_format_count; for (int i = 0; i < screen_count; i++) { screens [i] = new Screen(this, reply, screen_offset); screen_offset += screens [i].Length; } }
public WMClassHint (Data data) { int len = data.read4 (16)-1; res = data.read_string (32, len); middle = res.IndexOf ('\0'); }
public void init_server_info(Data reply) { connected = true; release_no = reply.read4 (8); resource_base = reply.read4 (12); resource_mask = reply.read4 (16); int vendor_length = reply.read2 (24); extended_maximum_request_length = maximum_request_length = reply.read2 (26); int screen_count = reply.read1 (28); int pixmap_format_count = reply.read1 (29); image_byte_order = reply.read1 (30); bitmap_format_bit_order = reply.read1 (31); bitmap_format_scanline_unit = reply.read1 (32); bitmap_format_scanline_pad = reply.read1 (33); int min_keycode = reply.read1 (34); int max_keycode = reply.read1 (35); input = new Input (this, min_keycode, max_keycode); input.keyboard_mapping (); vendor = reply.read_string (40, vendor_length); // pixmap formats pixmap_formats = new Pixmap.Format [pixmap_format_count]; int pixmap_formats_offset = 40 + Data.len (vendor_length); for (int i=0; i<pixmap_format_count; i++) pixmap_formats [i] = new Pixmap.Format ( reply, pixmap_formats_offset + i*8); // screens if (default_screen_no < 0 || default_screen_no >= screen_count) throw new Exception ("Invalid screen number (screen-count " + screen_count + "): " + default_screen_no); screens = new Screen [screen_count]; int screen_offset = pixmap_formats_offset + 8*pixmap_format_count; for (int i=0; i<screen_count; i++) { screens [i] = new Screen (this, reply, screen_offset); screen_offset += screens [i].Length; } }
public WMClassHint(Data data) { int len = data.read4 (16)-1; res = data.read_string (32, len); middle = res.IndexOf ('\0'); }