github.com/rajveermalviya/gamen@v0.1.2-0.20220930195403-9be15877c1aa/internal/wayland/xdg-decoration-unstable-v1-client-protocol.go (about) 1 // Code generated by internal/wayland/wl/gen; DO NOT EDIT. 2 // XML file : ./protocols/xdg-decoration-unstable-v1.xml 3 4 //go:build linux && !android 5 6 package wayland 7 8 /* 9 10 #include "xdg-decoration-unstable-v1-client-protocol.h" 11 12 */ 13 import "C" 14 import "unsafe" 15 16 // destroy the decoration manager object 17 // 18 // Destroy the decoration manager. This doesn't destroy objects created 19 // with the manager. 20 func (l *wl_library) zxdg_decoration_manager_v1_destroy(zxdg_decoration_manager_v1 *C.struct_zxdg_decoration_manager_v1) { 21 C.gamen_zxdg_decoration_manager_v1_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, zxdg_decoration_manager_v1) 22 } 23 24 // create a new toplevel decoration object 25 // 26 // Create a new decoration object associated with the given toplevel. 27 // 28 // Creating an xdg_toplevel_decoration from an xdg_toplevel which has a 29 // buffer attached or committed is a client error, and any attempts by a 30 // client to attach or manipulate a buffer prior to the first 31 // xdg_toplevel_decoration.configure event must also be treated as 32 // errors. 33 func (l *wl_library) zxdg_decoration_manager_v1_get_toplevel_decoration(zxdg_decoration_manager_v1 *C.struct_zxdg_decoration_manager_v1, toplevel *C.struct_xdg_toplevel) *C.struct_zxdg_toplevel_decoration_v1 { 34 return C.gamen_zxdg_decoration_manager_v1_get_toplevel_decoration(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, zxdg_decoration_manager_v1, toplevel) 35 } 36 37 type enum_zxdg_toplevel_decoration_v1_error C.uint32_t 38 39 const ( 40 // xdg_toplevel has a buffer attached before configure 41 ZXDG_TOPLEVEL_DECORATION_V_1_ERROR_UNCONFIGURED_BUFFER enum_zxdg_toplevel_decoration_v1_error = 0 42 // xdg_toplevel already has a decoration object 43 ZXDG_TOPLEVEL_DECORATION_V_1_ERROR_ALREADY_CONSTRUCTED enum_zxdg_toplevel_decoration_v1_error = 1 44 // xdg_toplevel destroyed before the decoration object 45 ZXDG_TOPLEVEL_DECORATION_V_1_ERROR_ORPHANED enum_zxdg_toplevel_decoration_v1_error = 2 46 ) 47 48 // These values describe window decoration modes. 49 type enum_zxdg_toplevel_decoration_v1_mode C.uint32_t 50 51 const ( 52 // no server-side window decoration 53 ZXDG_TOPLEVEL_DECORATION_V_1_MODE_CLIENT_SIDE enum_zxdg_toplevel_decoration_v1_mode = 1 54 // server-side window decoration 55 ZXDG_TOPLEVEL_DECORATION_V_1_MODE_SERVER_SIDE enum_zxdg_toplevel_decoration_v1_mode = 2 56 ) 57 58 func (l *wl_library) zxdg_toplevel_decoration_v1_add_listener(zxdg_toplevel_decoration_v1 *C.struct_zxdg_toplevel_decoration_v1, listener *C.struct_zxdg_toplevel_decoration_v1_listener, data unsafe.Pointer) C.int { 59 return C.gamen_zxdg_toplevel_decoration_v1_add_listener(l.wl_proxy_add_listener_handle, zxdg_toplevel_decoration_v1, listener, data) 60 } 61 62 // destroy the decoration object 63 // 64 // Switch back to a mode without any server-side decorations at the next 65 // commit. 66 func (l *wl_library) zxdg_toplevel_decoration_v1_destroy(zxdg_toplevel_decoration_v1 *C.struct_zxdg_toplevel_decoration_v1) { 67 C.gamen_zxdg_toplevel_decoration_v1_destroy(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, zxdg_toplevel_decoration_v1) 68 } 69 70 // set the decoration mode 71 // 72 // Set the toplevel surface decoration mode. This informs the compositor 73 // that the client prefers the provided decoration mode. 74 // 75 // After requesting a decoration mode, the compositor will respond by 76 // emitting an xdg_surface.configure event. The client should then update 77 // its content, drawing it without decorations if the received mode is 78 // server-side decorations. The client must also acknowledge the configure 79 // when committing the new content (see xdg_surface.ack_configure). 80 // 81 // The compositor can decide not to use the client's mode and enforce a 82 // different mode instead. 83 // 84 // Clients whose decoration mode depend on the xdg_toplevel state may send 85 // a set_mode request in response to an xdg_surface.configure event and wait 86 // for the next xdg_surface.configure event to prevent unwanted state. 87 // Such clients are responsible for preventing configure loops and must 88 // make sure not to send multiple successive set_mode requests with the 89 // same decoration mode. 90 func (l *wl_library) zxdg_toplevel_decoration_v1_set_mode(zxdg_toplevel_decoration_v1 *C.struct_zxdg_toplevel_decoration_v1, mode enum_zxdg_toplevel_decoration_v1_mode) { 91 C.gamen_zxdg_toplevel_decoration_v1_set_mode(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, zxdg_toplevel_decoration_v1, C.uint32_t(mode)) 92 } 93 94 // unset the decoration mode 95 // 96 // Unset the toplevel surface decoration mode. This informs the compositor 97 // that the client doesn't prefer a particular decoration mode. 98 // 99 // This request has the same semantics as set_mode. 100 func (l *wl_library) zxdg_toplevel_decoration_v1_unset_mode(zxdg_toplevel_decoration_v1 *C.struct_zxdg_toplevel_decoration_v1) { 101 C.gamen_zxdg_toplevel_decoration_v1_unset_mode(l.wl_proxy_marshal_flags, l.wl_proxy_get_version, zxdg_toplevel_decoration_v1) 102 }