1 // Copyright 2019 The ChromiumOS Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 /* automatically generated by rust-bindgen */ 6 7 /// @page page_xdg_shell_unstable_v6 The xdg_shell_unstable_v6 protocol 8 /// @section page_ifaces_xdg_shell_unstable_v6 Interfaces 9 /// - @subpage page_iface_zxdg_shell_v6 - create desktop-style surfaces 10 /// - @subpage page_iface_zxdg_positioner_v6 - child surface positioner 11 /// - @subpage page_iface_zxdg_surface_v6 - desktop user interface surface base interface 12 /// - @subpage page_iface_zxdg_toplevel_v6 - toplevel surface 13 /// - @subpage page_iface_zxdg_popup_v6 - short-lived, popup surfaces for menus 14 /// @section page_copyright_xdg_shell_unstable_v6 Copyright 15 /// <pre> 16 /// 17 /// Copyright © 2008-2013 Kristian Høgsberg 18 /// Copyright © 2013 Rafael Antognolli 19 /// Copyright © 2013 Jasper St. Pierre 20 /// Copyright © 2010-2013 Intel Corporation 21 /// 22 /// Permission is hereby granted, free of charge, to any person obtaining a 23 /// copy of this software and associated documentation files (the "Software"), 24 /// to deal in the Software without restriction, including without limitation 25 /// the rights to use, copy, modify, merge, publish, distribute, sublicense, 26 /// and/or sell copies of the Software, and to permit persons to whom the 27 /// Software is furnished to do so, subject to the following conditions: 28 /// 29 /// The above copyright notice and this permission notice (including the next 30 /// paragraph) shall be included in all copies or substantial portions of the 31 /// Software. 32 /// 33 /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 34 /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 35 /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 36 /// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 37 /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 38 /// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 39 /// DEALINGS IN THE SOFTWARE. 40 /// </pre> 41 #[repr(C)] 42 #[derive(Debug, Copy, Clone)] 43 pub struct wl_output { 44 _unused: [u8; 0], 45 } 46 #[repr(C)] 47 pub struct dwl_context { 48 pub _bindgen_opaque_blob: [u64; 52usize], 49 } 50 #[repr(C)] 51 #[derive(Debug, Copy, Clone)] 52 pub struct dwl_dmabuf { 53 pub _bindgen_opaque_blob: [u64; 3usize], 54 } 55 #[repr(C)] 56 #[derive(Debug, Copy, Clone)] 57 pub struct dwl_surface { 58 pub _bindgen_opaque_blob: [u64; 12usize], 59 } 60 61 #[allow(dead_code)] 62 pub const DWL_KEYBOARD_KEY_STATE_RELEASED: i32 = 0; 63 pub const DWL_KEYBOARD_KEY_STATE_PRESSED: i32 = 1; 64 65 #[allow(dead_code)] 66 pub const DWL_EVENT_TYPE_KEYBOARD_ENTER: u32 = 0x00; 67 #[allow(dead_code)] 68 pub const DWL_EVENT_TYPE_KEYBOARD_LEAVE: u32 = 0x01; 69 pub const DWL_EVENT_TYPE_KEYBOARD_KEY: u32 = 0x02; 70 #[allow(dead_code)] 71 pub const DWL_EVENT_TYPE_POINTER_ENTER: u32 = 0x10; 72 #[allow(dead_code)] 73 pub const DWL_EVENT_TYPE_POINTER_LEAVE: u32 = 0x11; 74 #[allow(dead_code)] 75 pub const DWL_EVENT_TYPE_POINTER_MOVE: u32 = 0x12; 76 #[allow(dead_code)] 77 pub const DWL_EVENT_TYPE_POINTER_BUTTON: u32 = 0x13; 78 pub const DWL_EVENT_TYPE_TOUCH_DOWN: u32 = 0x20; 79 pub const DWL_EVENT_TYPE_TOUCH_UP: u32 = 0x21; 80 pub const DWL_EVENT_TYPE_TOUCH_MOTION: u32 = 0x22; 81 82 pub const DWL_SURFACE_FLAG_RECEIVE_INPUT: u32 = 1 << 0; 83 pub const DWL_SURFACE_FLAG_HAS_ALPHA: u32 = 1 << 1; 84 85 #[repr(C)] 86 #[derive(Debug, Copy, Clone)] 87 pub struct dwl_event { 88 pub surface_descriptor: *const ::std::ffi::c_void, 89 pub event_type: u32, 90 pub params: [i32; 3usize], 91 } 92 93 #[allow(non_camel_case_types)] 94 pub type dwl_error_callback_type = 95 ::std::option::Option<unsafe extern "C" fn(message: *const ::std::os::raw::c_char)>; 96 97 extern "C" { dwl_context_new(log_proc: dwl_error_callback_type) -> *mut dwl_context98 pub fn dwl_context_new(log_proc: dwl_error_callback_type) -> *mut dwl_context; 99 } 100 extern "C" { dwl_context_destroy(self_: *mut *mut dwl_context)101 pub fn dwl_context_destroy(self_: *mut *mut dwl_context); 102 } 103 extern "C" { dwl_context_setup( self_: *mut dwl_context, socket_path: *const ::std::os::raw::c_char, ) -> bool104 pub fn dwl_context_setup( 105 self_: *mut dwl_context, 106 socket_path: *const ::std::os::raw::c_char, 107 ) -> bool; 108 } 109 extern "C" { dwl_context_fd(self_: *mut dwl_context) -> ::std::os::raw::c_int110 pub fn dwl_context_fd(self_: *mut dwl_context) -> ::std::os::raw::c_int; 111 } 112 extern "C" { dwl_context_dispatch(self_: *mut dwl_context)113 pub fn dwl_context_dispatch(self_: *mut dwl_context); 114 } 115 extern "C" { dwl_context_dmabuf_new( self_: *mut dwl_context, import_id: u32, fd: ::std::os::raw::c_int, offset: u32, stride: u32, modifiers: u64, width: u32, height: u32, fourcc: u32, ) -> *mut dwl_dmabuf116 pub fn dwl_context_dmabuf_new( 117 self_: *mut dwl_context, 118 import_id: u32, 119 fd: ::std::os::raw::c_int, 120 offset: u32, 121 stride: u32, 122 modifiers: u64, 123 width: u32, 124 height: u32, 125 fourcc: u32, 126 ) -> *mut dwl_dmabuf; 127 } 128 extern "C" { dwl_dmabuf_destroy(self_: *mut *mut dwl_dmabuf)129 pub fn dwl_dmabuf_destroy(self_: *mut *mut dwl_dmabuf); 130 } 131 extern "C" { dwl_context_surface_new( self_: *mut dwl_context, parent_id: u32, surface_id: u32, shm_fd: ::std::os::raw::c_int, shm_size: usize, buffer_size: usize, width: u32, height: u32, stride: u32, flags: u32, ) -> *mut dwl_surface132 pub fn dwl_context_surface_new( 133 self_: *mut dwl_context, 134 parent_id: u32, 135 surface_id: u32, 136 shm_fd: ::std::os::raw::c_int, 137 shm_size: usize, 138 buffer_size: usize, 139 width: u32, 140 height: u32, 141 stride: u32, 142 flags: u32, 143 ) -> *mut dwl_surface; 144 } 145 146 extern "C" { dwl_surface_destroy(self_: *mut *mut dwl_surface)147 pub fn dwl_surface_destroy(self_: *mut *mut dwl_surface); 148 } 149 extern "C" { dwl_surface_commit(self_: *mut dwl_surface)150 pub fn dwl_surface_commit(self_: *mut dwl_surface); 151 } 152 extern "C" { dwl_surface_buffer_in_use(self_: *mut dwl_surface, buffer_index: usize) -> bool153 pub fn dwl_surface_buffer_in_use(self_: *mut dwl_surface, buffer_index: usize) -> bool; 154 } 155 extern "C" { dwl_surface_flip(self_: *mut dwl_surface, buffer_index: usize)156 pub fn dwl_surface_flip(self_: *mut dwl_surface, buffer_index: usize); 157 } 158 extern "C" { dwl_surface_flip_to(self_: *mut dwl_surface, import_id: u32)159 pub fn dwl_surface_flip_to(self_: *mut dwl_surface, import_id: u32); 160 } 161 extern "C" { dwl_surface_close_requested(self_: *const dwl_surface) -> bool162 pub fn dwl_surface_close_requested(self_: *const dwl_surface) -> bool; 163 } 164 extern "C" { dwl_surface_set_position(self_: *mut dwl_surface, x: u32, y: u32)165 pub fn dwl_surface_set_position(self_: *mut dwl_surface, x: u32, y: u32); 166 } 167 extern "C" { dwl_surface_descriptor(self_: *const dwl_surface) -> *const ::std::ffi::c_void168 pub fn dwl_surface_descriptor(self_: *const dwl_surface) -> *const ::std::ffi::c_void; 169 } 170 extern "C" { dwl_context_pending_events(self_: *const dwl_context) -> bool171 pub fn dwl_context_pending_events(self_: *const dwl_context) -> bool; 172 } 173 extern "C" { dwl_context_next_event(self_: *mut dwl_context, event: *mut dwl_event)174 pub fn dwl_context_next_event(self_: *mut dwl_context, event: *mut dwl_event); 175 } 176 extern "C" { dwl_surface_set_scanout_id(self_: *mut dwl_surface, scanout_id: u32)177 pub fn dwl_surface_set_scanout_id(self_: *mut dwl_surface, scanout_id: u32); 178 } 179