public static void Load() { if (_loaded) { return; } _loaded = true; Interfaces = (wl_interface *)Marshal.AllocHGlobal(sizeof(wl_interface) * InterfaceCount); _messages = (wl_message *)Marshal.AllocHGlobal(sizeof(wl_message) * MessageCount); Util.CreateInterface(&Interfaces[0], "wp_viewporter", 1, 2, 0); Util.CreateInterface(&Interfaces[1], "wp_viewport", 1, 3, 0); _signatureTypes = (wl_interface **)Marshal.AllocHGlobal(sizeof(void *) * 6); _signatureTypes[0] = null; _signatureTypes[1] = null; _signatureTypes[2] = null; _signatureTypes[3] = null; _signatureTypes[4] = wp_viewport.Interface; _signatureTypes[5] = wl_surface.Interface; Util.CreateMessage(&_messages[0], "destroy", "", &_signatureTypes[0]); Util.CreateMessage(&_messages[1], "get_viewport", "no", &_signatureTypes[4]); Util.CreateMessage(&_messages[2], "destroy", "", &_signatureTypes[0]); Util.CreateMessage(&_messages[3], "set_source", "ffff", &_signatureTypes[0]); Util.CreateMessage(&_messages[4], "set_destination", "ii", &_signatureTypes[0]); Interfaces[0].Requests = &_messages[0]; Interfaces[0].Events = null; Interfaces[1].Requests = &_messages[2]; Interfaces[1].Events = null; }
public static void Load() { if (_loaded) { return; } _loaded = true; Interfaces = (wl_interface *)Marshal.AllocHGlobal(sizeof(wl_interface) * InterfaceCount); _messages = (wl_message *)Marshal.AllocHGlobal(sizeof(wl_message) * MessageCount); Util.CreateInterface(&Interfaces[0], "zxdg_decoration_manager_v1", 1, 2, 0); Util.CreateInterface(&Interfaces[1], "zxdg_toplevel_decoration_v1", 1, 3, 1); _signatureTypes = (wl_interface **)Marshal.AllocHGlobal(sizeof(void *) * 3); _signatureTypes[0] = zxdg_toplevel_decoration_v1.Interface; _signatureTypes[1] = xdg_toplevel.Interface; _signatureTypes[2] = null; Util.CreateMessage(&_messages[0], "destroy", "", &_signatureTypes[2]); Util.CreateMessage(&_messages[1], "get_toplevel_decoration", "no", &_signatureTypes[0]); Util.CreateMessage(&_messages[2], "destroy", "", &_signatureTypes[2]); Util.CreateMessage(&_messages[3], "set_mode", "u", &_signatureTypes[2]); Util.CreateMessage(&_messages[4], "unset_mode", "", &_signatureTypes[2]); Util.CreateMessage(&_messages[5], "configure", "u", &_signatureTypes[2]); Interfaces[0].Requests = &_messages[0]; Interfaces[0].Events = null; Interfaces[1].Requests = &_messages[2]; Interfaces[1].Events = &_messages[5]; }
public static void CreateInterface(wl_interface *iface, string name, uint version, int requestCount, int eventCount) { iface->Name = StringToUtf8(name); iface->Version = version; iface->RequestCount = requestCount; iface->EventCount = eventCount; }
public static extern wl_proxy *wl_proxy_marshal_array_constructor_versioned(wl_proxy *proxy, int opcode, wl_argument *args, wl_interface *iface, uint version);
public static extern wl_proxy *wl_proxy_marshal_array_constructor(wl_proxy *proxy, int opcode, wl_argument *args, wl_interface *iface);
public static extern wl_proxy *wl_proxy_marshal_constructor(wl_proxy *proxy, int opcode, wl_interface *iface, void *data);