dotfiles

my shiny new dotfiles
git clone git://git.jakekoroman.com/dotfiles
Log | Files | Refs | README

xdg-output-unstable-v1-protocol.h (14733B)


      1 /* Generated by wayland-scanner 1.22.0 */
      2 
      3 #ifndef XDG_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H
      4 #define XDG_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H
      5 
      6 #include <stdint.h>
      7 #include <stddef.h>
      8 #include "wayland-client.h"
      9 
     10 #ifdef  __cplusplus
     11 extern "C" {
     12 #endif
     13 
     14 /**
     15  * @page page_xdg_output_unstable_v1 The xdg_output_unstable_v1 protocol
     16  * Protocol to describe output regions
     17  *
     18  * @section page_desc_xdg_output_unstable_v1 Description
     19  *
     20  * This protocol aims at describing outputs in a way which is more in line
     21  * with the concept of an output on desktop oriented systems.
     22  *
     23  * Some information are more specific to the concept of an output for
     24  * a desktop oriented system and may not make sense in other applications,
     25  * such as IVI systems for example.
     26  *
     27  * Typically, the global compositor space on a desktop system is made of
     28  * a contiguous or overlapping set of rectangular regions.
     29  *
     30  * The logical_position and logical_size events defined in this protocol
     31  * might provide information identical to their counterparts already
     32  * available from wl_output, in which case the information provided by this
     33  * protocol should be preferred to their equivalent in wl_output. The goal is
     34  * to move the desktop specific concepts (such as output location within the
     35  * global compositor space, etc.) out of the core wl_output protocol.
     36  *
     37  * Warning! The protocol described in this file is experimental and
     38  * backward incompatible changes may be made. Backward compatible
     39  * changes may be added together with the corresponding interface
     40  * version bump.
     41  * Backward incompatible changes are done by bumping the version
     42  * number in the protocol and interface names and resetting the
     43  * interface version. Once the protocol is to be declared stable,
     44  * the 'z' prefix and the version number in the protocol and
     45  * interface names are removed and the interface version number is
     46  * reset.
     47  *
     48  * @section page_ifaces_xdg_output_unstable_v1 Interfaces
     49  * - @subpage page_iface_zxdg_output_manager_v1 - manage xdg_output objects
     50  * - @subpage page_iface_zxdg_output_v1 - compositor logical output region
     51  * @section page_copyright_xdg_output_unstable_v1 Copyright
     52  * <pre>
     53  *
     54  * Copyright © 2017 Red Hat Inc.
     55  *
     56  * Permission is hereby granted, free of charge, to any person obtaining a
     57  * copy of this software and associated documentation files (the "Software"),
     58  * to deal in the Software without restriction, including without limitation
     59  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
     60  * and/or sell copies of the Software, and to permit persons to whom the
     61  * Software is furnished to do so, subject to the following conditions:
     62  *
     63  * The above copyright notice and this permission notice (including the next
     64  * paragraph) shall be included in all copies or substantial portions of the
     65  * Software.
     66  *
     67  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     68  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     69  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
     70  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     71  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     72  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
     73  * DEALINGS IN THE SOFTWARE.
     74  * </pre>
     75  */
     76 struct wl_output;
     77 struct zxdg_output_manager_v1;
     78 struct zxdg_output_v1;
     79 
     80 #ifndef ZXDG_OUTPUT_MANAGER_V1_INTERFACE
     81 #define ZXDG_OUTPUT_MANAGER_V1_INTERFACE
     82 /**
     83  * @page page_iface_zxdg_output_manager_v1 zxdg_output_manager_v1
     84  * @section page_iface_zxdg_output_manager_v1_desc Description
     85  *
     86  * A global factory interface for xdg_output objects.
     87  * @section page_iface_zxdg_output_manager_v1_api API
     88  * See @ref iface_zxdg_output_manager_v1.
     89  */
     90 /**
     91  * @defgroup iface_zxdg_output_manager_v1 The zxdg_output_manager_v1 interface
     92  *
     93  * A global factory interface for xdg_output objects.
     94  */
     95 extern const struct wl_interface zxdg_output_manager_v1_interface;
     96 #endif
     97 #ifndef ZXDG_OUTPUT_V1_INTERFACE
     98 #define ZXDG_OUTPUT_V1_INTERFACE
     99 /**
    100  * @page page_iface_zxdg_output_v1 zxdg_output_v1
    101  * @section page_iface_zxdg_output_v1_desc Description
    102  *
    103  * An xdg_output describes part of the compositor geometry.
    104  *
    105  * This typically corresponds to a monitor that displays part of the
    106  * compositor space.
    107  *
    108  * For objects version 3 onwards, after all xdg_output properties have been
    109  * sent (when the object is created and when properties are updated), a
    110  * wl_output.done event is sent. This allows changes to the output
    111  * properties to be seen as atomic, even if they happen via multiple events.
    112  * @section page_iface_zxdg_output_v1_api API
    113  * See @ref iface_zxdg_output_v1.
    114  */
    115 /**
    116  * @defgroup iface_zxdg_output_v1 The zxdg_output_v1 interface
    117  *
    118  * An xdg_output describes part of the compositor geometry.
    119  *
    120  * This typically corresponds to a monitor that displays part of the
    121  * compositor space.
    122  *
    123  * For objects version 3 onwards, after all xdg_output properties have been
    124  * sent (when the object is created and when properties are updated), a
    125  * wl_output.done event is sent. This allows changes to the output
    126  * properties to be seen as atomic, even if they happen via multiple events.
    127  */
    128 extern const struct wl_interface zxdg_output_v1_interface;
    129 #endif
    130 
    131 #define ZXDG_OUTPUT_MANAGER_V1_DESTROY 0
    132 #define ZXDG_OUTPUT_MANAGER_V1_GET_XDG_OUTPUT 1
    133 
    134 
    135 /**
    136  * @ingroup iface_zxdg_output_manager_v1
    137  */
    138 #define ZXDG_OUTPUT_MANAGER_V1_DESTROY_SINCE_VERSION 1
    139 /**
    140  * @ingroup iface_zxdg_output_manager_v1
    141  */
    142 #define ZXDG_OUTPUT_MANAGER_V1_GET_XDG_OUTPUT_SINCE_VERSION 1
    143 
    144 /** @ingroup iface_zxdg_output_manager_v1 */
    145 static inline void
    146 zxdg_output_manager_v1_set_user_data(struct zxdg_output_manager_v1 *zxdg_output_manager_v1, void *user_data)
    147 {
    148 	wl_proxy_set_user_data((struct wl_proxy *) zxdg_output_manager_v1, user_data);
    149 }
    150 
    151 /** @ingroup iface_zxdg_output_manager_v1 */
    152 static inline void *
    153 zxdg_output_manager_v1_get_user_data(struct zxdg_output_manager_v1 *zxdg_output_manager_v1)
    154 {
    155 	return wl_proxy_get_user_data((struct wl_proxy *) zxdg_output_manager_v1);
    156 }
    157 
    158 static inline uint32_t
    159 zxdg_output_manager_v1_get_version(struct zxdg_output_manager_v1 *zxdg_output_manager_v1)
    160 {
    161 	return wl_proxy_get_version((struct wl_proxy *) zxdg_output_manager_v1);
    162 }
    163 
    164 /**
    165  * @ingroup iface_zxdg_output_manager_v1
    166  *
    167  * Using this request a client can tell the server that it is not
    168  * going to use the xdg_output_manager object anymore.
    169  *
    170  * Any objects already created through this instance are not affected.
    171  */
    172 static inline void
    173 zxdg_output_manager_v1_destroy(struct zxdg_output_manager_v1 *zxdg_output_manager_v1)
    174 {
    175 	wl_proxy_marshal_flags((struct wl_proxy *) zxdg_output_manager_v1,
    176 			 ZXDG_OUTPUT_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_output_manager_v1), WL_MARSHAL_FLAG_DESTROY);
    177 }
    178 
    179 /**
    180  * @ingroup iface_zxdg_output_manager_v1
    181  *
    182  * This creates a new xdg_output object for the given wl_output.
    183  */
    184 static inline struct zxdg_output_v1 *
    185 zxdg_output_manager_v1_get_xdg_output(struct zxdg_output_manager_v1 *zxdg_output_manager_v1, struct wl_output *output)
    186 {
    187 	struct wl_proxy *id;
    188 
    189 	id = wl_proxy_marshal_flags((struct wl_proxy *) zxdg_output_manager_v1,
    190 			 ZXDG_OUTPUT_MANAGER_V1_GET_XDG_OUTPUT, &zxdg_output_v1_interface, wl_proxy_get_version((struct wl_proxy *) zxdg_output_manager_v1), 0, NULL, output);
    191 
    192 	return (struct zxdg_output_v1 *) id;
    193 }
    194 
    195 /**
    196  * @ingroup iface_zxdg_output_v1
    197  * @struct zxdg_output_v1_listener
    198  */
    199 struct zxdg_output_v1_listener {
    200 	/**
    201 	 * position of the output within the global compositor space
    202 	 *
    203 	 * The position event describes the location of the wl_output
    204 	 * within the global compositor space.
    205 	 *
    206 	 * The logical_position event is sent after creating an xdg_output
    207 	 * (see xdg_output_manager.get_xdg_output) and whenever the
    208 	 * location of the output changes within the global compositor
    209 	 * space.
    210 	 * @param x x position within the global compositor space
    211 	 * @param y y position within the global compositor space
    212 	 */
    213 	void (*logical_position)(void *data,
    214 				 struct zxdg_output_v1 *zxdg_output_v1,
    215 				 int32_t x,
    216 				 int32_t y);
    217 	/**
    218 	 * size of the output in the global compositor space
    219 	 *
    220 	 * The logical_size event describes the size of the output in the
    221 	 * global compositor space.
    222 	 *
    223 	 * Most regular Wayland clients should not pay attention to the
    224 	 * logical size and would rather rely on xdg_shell interfaces.
    225 	 *
    226 	 * Some clients such as Xwayland, however, need this to configure
    227 	 * their surfaces in the global compositor space as the compositor
    228 	 * may apply a different scale from what is advertised by the
    229 	 * output scaling property (to achieve fractional scaling, for
    230 	 * example).
    231 	 *
    232 	 * For example, for a wl_output mode 3840×2160 and a scale factor
    233 	 * 2:
    234 	 *
    235 	 * - A compositor not scaling the monitor viewport in its
    236 	 * compositing space will advertise a logical size of 3840×2160,
    237 	 *
    238 	 * - A compositor scaling the monitor viewport with scale factor 2
    239 	 * will advertise a logical size of 1920×1080,
    240 	 *
    241 	 * - A compositor scaling the monitor viewport using a fractional
    242 	 * scale of 1.5 will advertise a logical size of 2560×1440.
    243 	 *
    244 	 * For example, for a wl_output mode 1920×1080 and a 90 degree
    245 	 * rotation, the compositor will advertise a logical size of
    246 	 * 1080x1920.
    247 	 *
    248 	 * The logical_size event is sent after creating an xdg_output (see
    249 	 * xdg_output_manager.get_xdg_output) and whenever the logical size
    250 	 * of the output changes, either as a result of a change in the
    251 	 * applied scale or because of a change in the corresponding output
    252 	 * mode(see wl_output.mode) or transform (see wl_output.transform).
    253 	 * @param width width in global compositor space
    254 	 * @param height height in global compositor space
    255 	 */
    256 	void (*logical_size)(void *data,
    257 			     struct zxdg_output_v1 *zxdg_output_v1,
    258 			     int32_t width,
    259 			     int32_t height);
    260 	/**
    261 	 * all information about the output have been sent
    262 	 *
    263 	 * This event is sent after all other properties of an xdg_output
    264 	 * have been sent.
    265 	 *
    266 	 * This allows changes to the xdg_output properties to be seen as
    267 	 * atomic, even if they happen via multiple events.
    268 	 *
    269 	 * For objects version 3 onwards, this event is deprecated.
    270 	 * Compositors are not required to send it anymore and must send
    271 	 * wl_output.done instead.
    272 	 */
    273 	void (*done)(void *data,
    274 		     struct zxdg_output_v1 *zxdg_output_v1);
    275 	/**
    276 	 * name of this output
    277 	 *
    278 	 * Many compositors will assign names to their outputs, show them
    279 	 * to the user, allow them to be configured by name, etc. The
    280 	 * client may wish to know this name as well to offer the user
    281 	 * similar behaviors.
    282 	 *
    283 	 * The naming convention is compositor defined, but limited to
    284 	 * alphanumeric characters and dashes (-). Each name is unique
    285 	 * among all wl_output globals, but if a wl_output global is
    286 	 * destroyed the same name may be reused later. The names will also
    287 	 * remain consistent across sessions with the same hardware and
    288 	 * software configuration.
    289 	 *
    290 	 * Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc.
    291 	 * However, do not assume that the name is a reflection of an
    292 	 * underlying DRM connector, X11 connection, etc.
    293 	 *
    294 	 * The name event is sent after creating an xdg_output (see
    295 	 * xdg_output_manager.get_xdg_output). This event is only sent once
    296 	 * per xdg_output, and the name does not change over the lifetime
    297 	 * of the wl_output global.
    298 	 *
    299 	 * This event is deprecated, instead clients should use
    300 	 * wl_output.name. Compositors must still support this event.
    301 	 * @param name output name
    302 	 * @since 2
    303 	 */
    304 	void (*name)(void *data,
    305 		     struct zxdg_output_v1 *zxdg_output_v1,
    306 		     const char *name);
    307 	/**
    308 	 * human-readable description of this output
    309 	 *
    310 	 * Many compositors can produce human-readable descriptions of
    311 	 * their outputs. The client may wish to know this description as
    312 	 * well, to communicate the user for various purposes.
    313 	 *
    314 	 * The description is a UTF-8 string with no convention defined for
    315 	 * its contents. Examples might include 'Foocorp 11" Display' or
    316 	 * 'Virtual X11 output via :1'.
    317 	 *
    318 	 * The description event is sent after creating an xdg_output (see
    319 	 * xdg_output_manager.get_xdg_output) and whenever the description
    320 	 * changes. The description is optional, and may not be sent at
    321 	 * all.
    322 	 *
    323 	 * For objects of version 2 and lower, this event is only sent once
    324 	 * per xdg_output, and the description does not change over the
    325 	 * lifetime of the wl_output global.
    326 	 *
    327 	 * This event is deprecated, instead clients should use
    328 	 * wl_output.description. Compositors must still support this
    329 	 * event.
    330 	 * @param description output description
    331 	 * @since 2
    332 	 */
    333 	void (*description)(void *data,
    334 			    struct zxdg_output_v1 *zxdg_output_v1,
    335 			    const char *description);
    336 };
    337 
    338 /**
    339  * @ingroup iface_zxdg_output_v1
    340  */
    341 static inline int
    342 zxdg_output_v1_add_listener(struct zxdg_output_v1 *zxdg_output_v1,
    343 			    const struct zxdg_output_v1_listener *listener, void *data)
    344 {
    345 	return wl_proxy_add_listener((struct wl_proxy *) zxdg_output_v1,
    346 				     (void (**)(void)) listener, data);
    347 }
    348 
    349 #define ZXDG_OUTPUT_V1_DESTROY 0
    350 
    351 /**
    352  * @ingroup iface_zxdg_output_v1
    353  */
    354 #define ZXDG_OUTPUT_V1_LOGICAL_POSITION_SINCE_VERSION 1
    355 /**
    356  * @ingroup iface_zxdg_output_v1
    357  */
    358 #define ZXDG_OUTPUT_V1_LOGICAL_SIZE_SINCE_VERSION 1
    359 /**
    360  * @ingroup iface_zxdg_output_v1
    361  */
    362 #define ZXDG_OUTPUT_V1_DONE_SINCE_VERSION 1
    363 /**
    364  * @ingroup iface_zxdg_output_v1
    365  */
    366 #define ZXDG_OUTPUT_V1_NAME_SINCE_VERSION 2
    367 /**
    368  * @ingroup iface_zxdg_output_v1
    369  */
    370 #define ZXDG_OUTPUT_V1_DESCRIPTION_SINCE_VERSION 2
    371 
    372 /**
    373  * @ingroup iface_zxdg_output_v1
    374  */
    375 #define ZXDG_OUTPUT_V1_DESTROY_SINCE_VERSION 1
    376 
    377 /** @ingroup iface_zxdg_output_v1 */
    378 static inline void
    379 zxdg_output_v1_set_user_data(struct zxdg_output_v1 *zxdg_output_v1, void *user_data)
    380 {
    381 	wl_proxy_set_user_data((struct wl_proxy *) zxdg_output_v1, user_data);
    382 }
    383 
    384 /** @ingroup iface_zxdg_output_v1 */
    385 static inline void *
    386 zxdg_output_v1_get_user_data(struct zxdg_output_v1 *zxdg_output_v1)
    387 {
    388 	return wl_proxy_get_user_data((struct wl_proxy *) zxdg_output_v1);
    389 }
    390 
    391 static inline uint32_t
    392 zxdg_output_v1_get_version(struct zxdg_output_v1 *zxdg_output_v1)
    393 {
    394 	return wl_proxy_get_version((struct wl_proxy *) zxdg_output_v1);
    395 }
    396 
    397 /**
    398  * @ingroup iface_zxdg_output_v1
    399  *
    400  * Using this request a client can tell the server that it is not
    401  * going to use the xdg_output object anymore.
    402  */
    403 static inline void
    404 zxdg_output_v1_destroy(struct zxdg_output_v1 *zxdg_output_v1)
    405 {
    406 	wl_proxy_marshal_flags((struct wl_proxy *) zxdg_output_v1,
    407 			 ZXDG_OUTPUT_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_output_v1), WL_MARSHAL_FLAG_DESTROY);
    408 }
    409 
    410 #ifdef  __cplusplus
    411 }
    412 #endif
    413 
    414 #endif