public void Init (Connection connection) { c = connection; //no extension if (XName == "") return; XProto xp = new XProto (); xp.Init (c); //QueryExtensionReply rep = xp.QueryExtension ((ushort)XName.Length, XName); Cookie<QueryExtensionReply> repCookie = xp.QueryExtension ((ushort)XName.Length, XName); //QueryExtensionReply rep = new QueryExtensionReply (); //repCookie.ReadReply (rep); QueryExtensionReply rep = repCookie; //req.Length = 2 + (7+1)/4; //4 + 10; GlobalId = rep.MajorOpcode; Trace.WriteLine ("Extension present: " + rep.Present + ", major opcode " + rep.MajorOpcode); //Trace.WriteLine (rep.FirstEvent); //Trace.WriteLine (rep.FirstError); }
public static byte GetDepth (Connection c, Screen screen) { //Drawable drawable; //drawable.Window = screen.Root; return 0; }
public static Screen GetScreen (Connection c, int screen) { //foreach (Screen s in c.Setup.Roots) {} //Trace.WriteLine (c.Setup.Roots.Length); //return c.Setup.Roots[screen]; return new Screen (); }
//TODO: only get the extension if we actually need a new Xid alloc public XidManager (XCMisc xcmisc) { this.xcmisc = xcmisc; c = xcmisc.Connection; last = 0; idbase = c.Setup.ResourceIdBase; max = c.Setup.ResourceIdMask; inc = (uint) (c.Setup.ResourceIdMask & -(c.Setup.ResourceIdMask)); }
public static Visualtype GetVisualtype (Connection c, int scr, uint vid) { return new Visualtype (); }