tools

various tools I have been using throughout the years
Log | Files | Refs | README | LICENSE

river-status.h (14424B)


      1 /* Generated by wayland-scanner 1.24.0 */
      2 
      3 #ifndef RIVER_STATUS_UNSTABLE_V1_CLIENT_PROTOCOL_H
      4 #define RIVER_STATUS_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_river_status_unstable_v1 The river_status_unstable_v1 protocol
     16  * @section page_ifaces_river_status_unstable_v1 Interfaces
     17  * - @subpage page_iface_zriver_status_manager_v1 - manage river status objects
     18  * - @subpage page_iface_zriver_output_status_v1 - track output tags and focus
     19  * - @subpage page_iface_zriver_seat_status_v1 - track seat focus
     20  * @section page_copyright_river_status_unstable_v1 Copyright
     21  * <pre>
     22  *
     23  * Copyright 2020 The River Developers
     24  *
     25  * Permission to use, copy, modify, and/or distribute this software for any
     26  * purpose with or without fee is hereby granted, provided that the above
     27  * copyright notice and this permission notice appear in all copies.
     28  *
     29  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     30  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     31  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     32  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     33  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     34  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     35  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     36  * </pre>
     37  */
     38 struct wl_output;
     39 struct wl_seat;
     40 struct zriver_output_status_v1;
     41 struct zriver_seat_status_v1;
     42 struct zriver_status_manager_v1;
     43 
     44 #ifndef ZRIVER_STATUS_MANAGER_V1_INTERFACE
     45 #define ZRIVER_STATUS_MANAGER_V1_INTERFACE
     46 /**
     47  * @page page_iface_zriver_status_manager_v1 zriver_status_manager_v1
     48  * @section page_iface_zriver_status_manager_v1_desc Description
     49  *
     50  * A global factory for objects that receive status information specific
     51  * to river. It could be used to implement, for example, a status bar.
     52  * @section page_iface_zriver_status_manager_v1_api API
     53  * See @ref iface_zriver_status_manager_v1.
     54  */
     55 /**
     56  * @defgroup iface_zriver_status_manager_v1 The zriver_status_manager_v1 interface
     57  *
     58  * A global factory for objects that receive status information specific
     59  * to river. It could be used to implement, for example, a status bar.
     60  */
     61 extern const struct wl_interface zriver_status_manager_v1_interface;
     62 #endif
     63 #ifndef ZRIVER_OUTPUT_STATUS_V1_INTERFACE
     64 #define ZRIVER_OUTPUT_STATUS_V1_INTERFACE
     65 /**
     66  * @page page_iface_zriver_output_status_v1 zriver_output_status_v1
     67  * @section page_iface_zriver_output_status_v1_desc Description
     68  *
     69  * This interface allows clients to receive information about the current
     70  * windowing state of an output.
     71  * @section page_iface_zriver_output_status_v1_api API
     72  * See @ref iface_zriver_output_status_v1.
     73  */
     74 /**
     75  * @defgroup iface_zriver_output_status_v1 The zriver_output_status_v1 interface
     76  *
     77  * This interface allows clients to receive information about the current
     78  * windowing state of an output.
     79  */
     80 extern const struct wl_interface zriver_output_status_v1_interface;
     81 #endif
     82 #ifndef ZRIVER_SEAT_STATUS_V1_INTERFACE
     83 #define ZRIVER_SEAT_STATUS_V1_INTERFACE
     84 /**
     85  * @page page_iface_zriver_seat_status_v1 zriver_seat_status_v1
     86  * @section page_iface_zriver_seat_status_v1_desc Description
     87  *
     88  * This interface allows clients to receive information about the current
     89  * focus of a seat. Note that (un)focused_output events will only be sent
     90  * if the client has bound the relevant wl_output globals.
     91  * @section page_iface_zriver_seat_status_v1_api API
     92  * See @ref iface_zriver_seat_status_v1.
     93  */
     94 /**
     95  * @defgroup iface_zriver_seat_status_v1 The zriver_seat_status_v1 interface
     96  *
     97  * This interface allows clients to receive information about the current
     98  * focus of a seat. Note that (un)focused_output events will only be sent
     99  * if the client has bound the relevant wl_output globals.
    100  */
    101 extern const struct wl_interface zriver_seat_status_v1_interface;
    102 #endif
    103 
    104 #define ZRIVER_STATUS_MANAGER_V1_DESTROY 0
    105 #define ZRIVER_STATUS_MANAGER_V1_GET_RIVER_OUTPUT_STATUS 1
    106 #define ZRIVER_STATUS_MANAGER_V1_GET_RIVER_SEAT_STATUS 2
    107 
    108 
    109 /**
    110  * @ingroup iface_zriver_status_manager_v1
    111  */
    112 #define ZRIVER_STATUS_MANAGER_V1_DESTROY_SINCE_VERSION 1
    113 /**
    114  * @ingroup iface_zriver_status_manager_v1
    115  */
    116 #define ZRIVER_STATUS_MANAGER_V1_GET_RIVER_OUTPUT_STATUS_SINCE_VERSION 1
    117 /**
    118  * @ingroup iface_zriver_status_manager_v1
    119  */
    120 #define ZRIVER_STATUS_MANAGER_V1_GET_RIVER_SEAT_STATUS_SINCE_VERSION 1
    121 
    122 /** @ingroup iface_zriver_status_manager_v1 */
    123 static inline void
    124 zriver_status_manager_v1_set_user_data(struct zriver_status_manager_v1 *zriver_status_manager_v1, void *user_data)
    125 {
    126 	wl_proxy_set_user_data((struct wl_proxy *) zriver_status_manager_v1, user_data);
    127 }
    128 
    129 /** @ingroup iface_zriver_status_manager_v1 */
    130 static inline void *
    131 zriver_status_manager_v1_get_user_data(struct zriver_status_manager_v1 *zriver_status_manager_v1)
    132 {
    133 	return wl_proxy_get_user_data((struct wl_proxy *) zriver_status_manager_v1);
    134 }
    135 
    136 static inline uint32_t
    137 zriver_status_manager_v1_get_version(struct zriver_status_manager_v1 *zriver_status_manager_v1)
    138 {
    139 	return wl_proxy_get_version((struct wl_proxy *) zriver_status_manager_v1);
    140 }
    141 
    142 /**
    143  * @ingroup iface_zriver_status_manager_v1
    144  *
    145  * This request indicates that the client will not use the
    146  * river_status_manager object any more. Objects that have been created
    147  * through this instance are not affected.
    148  */
    149 static inline void
    150 zriver_status_manager_v1_destroy(struct zriver_status_manager_v1 *zriver_status_manager_v1)
    151 {
    152 	wl_proxy_marshal_flags((struct wl_proxy *) zriver_status_manager_v1,
    153 			 ZRIVER_STATUS_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zriver_status_manager_v1), WL_MARSHAL_FLAG_DESTROY);
    154 }
    155 
    156 /**
    157  * @ingroup iface_zriver_status_manager_v1
    158  *
    159  * This creates a new river_output_status object for the given wl_output.
    160  */
    161 static inline struct zriver_output_status_v1 *
    162 zriver_status_manager_v1_get_river_output_status(struct zriver_status_manager_v1 *zriver_status_manager_v1, struct wl_output *output)
    163 {
    164 	struct wl_proxy *id;
    165 
    166 	id = wl_proxy_marshal_flags((struct wl_proxy *) zriver_status_manager_v1,
    167 			 ZRIVER_STATUS_MANAGER_V1_GET_RIVER_OUTPUT_STATUS, &zriver_output_status_v1_interface, wl_proxy_get_version((struct wl_proxy *) zriver_status_manager_v1), 0, NULL, output);
    168 
    169 	return (struct zriver_output_status_v1 *) id;
    170 }
    171 
    172 /**
    173  * @ingroup iface_zriver_status_manager_v1
    174  *
    175  * This creates a new river_seat_status object for the given wl_seat.
    176  */
    177 static inline struct zriver_seat_status_v1 *
    178 zriver_status_manager_v1_get_river_seat_status(struct zriver_status_manager_v1 *zriver_status_manager_v1, struct wl_seat *seat)
    179 {
    180 	struct wl_proxy *id;
    181 
    182 	id = wl_proxy_marshal_flags((struct wl_proxy *) zriver_status_manager_v1,
    183 			 ZRIVER_STATUS_MANAGER_V1_GET_RIVER_SEAT_STATUS, &zriver_seat_status_v1_interface, wl_proxy_get_version((struct wl_proxy *) zriver_status_manager_v1), 0, NULL, seat);
    184 
    185 	return (struct zriver_seat_status_v1 *) id;
    186 }
    187 
    188 /**
    189  * @ingroup iface_zriver_output_status_v1
    190  * @struct zriver_output_status_v1_listener
    191  */
    192 struct zriver_output_status_v1_listener {
    193 	/**
    194 	 * focused tags of the output
    195 	 *
    196 	 * Sent once binding the interface and again whenever the tag
    197 	 * focus of the output changes.
    198 	 * @param tags 32-bit bitfield
    199 	 */
    200 	void (*focused_tags)(void *data,
    201 			     struct zriver_output_status_v1 *zriver_output_status_v1,
    202 			     uint32_t tags);
    203 	/**
    204 	 * tag state of an output's views
    205 	 *
    206 	 * Sent once on binding the interface and again whenever the tag
    207 	 * state of the output changes.
    208 	 * @param tags array of 32-bit bitfields
    209 	 */
    210 	void (*view_tags)(void *data,
    211 			  struct zriver_output_status_v1 *zriver_output_status_v1,
    212 			  struct wl_array *tags);
    213 	/**
    214 	 * tags of the output with an urgent view
    215 	 *
    216 	 * Sent once on binding the interface and again whenever the set
    217 	 * of tags with at least one urgent view changes.
    218 	 * @param tags 32-bit bitfield
    219 	 * @since 2
    220 	 */
    221 	void (*urgent_tags)(void *data,
    222 			    struct zriver_output_status_v1 *zriver_output_status_v1,
    223 			    uint32_t tags);
    224 	/**
    225 	 * name of the layout
    226 	 *
    227 	 * Sent once on binding the interface should a layout name exist
    228 	 * and again whenever the name changes.
    229 	 * @param name layout name
    230 	 * @since 4
    231 	 */
    232 	void (*layout_name)(void *data,
    233 			    struct zriver_output_status_v1 *zriver_output_status_v1,
    234 			    const char *name);
    235 	/**
    236 	 * name of the layout
    237 	 *
    238 	 * Sent when the current layout name has been removed without a
    239 	 * new one being set, for example when the active layout generator
    240 	 * disconnects.
    241 	 * @since 4
    242 	 */
    243 	void (*layout_name_clear)(void *data,
    244 				  struct zriver_output_status_v1 *zriver_output_status_v1);
    245 };
    246 
    247 /**
    248  * @ingroup iface_zriver_output_status_v1
    249  */
    250 static inline int
    251 zriver_output_status_v1_add_listener(struct zriver_output_status_v1 *zriver_output_status_v1,
    252 				     const struct zriver_output_status_v1_listener *listener, void *data)
    253 {
    254 	return wl_proxy_add_listener((struct wl_proxy *) zriver_output_status_v1,
    255 				     (void (**)(void)) listener, data);
    256 }
    257 
    258 #define ZRIVER_OUTPUT_STATUS_V1_DESTROY 0
    259 
    260 /**
    261  * @ingroup iface_zriver_output_status_v1
    262  */
    263 #define ZRIVER_OUTPUT_STATUS_V1_FOCUSED_TAGS_SINCE_VERSION 1
    264 /**
    265  * @ingroup iface_zriver_output_status_v1
    266  */
    267 #define ZRIVER_OUTPUT_STATUS_V1_VIEW_TAGS_SINCE_VERSION 1
    268 /**
    269  * @ingroup iface_zriver_output_status_v1
    270  */
    271 #define ZRIVER_OUTPUT_STATUS_V1_URGENT_TAGS_SINCE_VERSION 2
    272 /**
    273  * @ingroup iface_zriver_output_status_v1
    274  */
    275 #define ZRIVER_OUTPUT_STATUS_V1_LAYOUT_NAME_SINCE_VERSION 4
    276 /**
    277  * @ingroup iface_zriver_output_status_v1
    278  */
    279 #define ZRIVER_OUTPUT_STATUS_V1_LAYOUT_NAME_CLEAR_SINCE_VERSION 4
    280 
    281 /**
    282  * @ingroup iface_zriver_output_status_v1
    283  */
    284 #define ZRIVER_OUTPUT_STATUS_V1_DESTROY_SINCE_VERSION 1
    285 
    286 /** @ingroup iface_zriver_output_status_v1 */
    287 static inline void
    288 zriver_output_status_v1_set_user_data(struct zriver_output_status_v1 *zriver_output_status_v1, void *user_data)
    289 {
    290 	wl_proxy_set_user_data((struct wl_proxy *) zriver_output_status_v1, user_data);
    291 }
    292 
    293 /** @ingroup iface_zriver_output_status_v1 */
    294 static inline void *
    295 zriver_output_status_v1_get_user_data(struct zriver_output_status_v1 *zriver_output_status_v1)
    296 {
    297 	return wl_proxy_get_user_data((struct wl_proxy *) zriver_output_status_v1);
    298 }
    299 
    300 static inline uint32_t
    301 zriver_output_status_v1_get_version(struct zriver_output_status_v1 *zriver_output_status_v1)
    302 {
    303 	return wl_proxy_get_version((struct wl_proxy *) zriver_output_status_v1);
    304 }
    305 
    306 /**
    307  * @ingroup iface_zriver_output_status_v1
    308  *
    309  * This request indicates that the client will not use the
    310  * river_output_status object any more.
    311  */
    312 static inline void
    313 zriver_output_status_v1_destroy(struct zriver_output_status_v1 *zriver_output_status_v1)
    314 {
    315 	wl_proxy_marshal_flags((struct wl_proxy *) zriver_output_status_v1,
    316 			 ZRIVER_OUTPUT_STATUS_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zriver_output_status_v1), WL_MARSHAL_FLAG_DESTROY);
    317 }
    318 
    319 /**
    320  * @ingroup iface_zriver_seat_status_v1
    321  * @struct zriver_seat_status_v1_listener
    322  */
    323 struct zriver_seat_status_v1_listener {
    324 	/**
    325 	 * the seat focused an output
    326 	 *
    327 	 * Sent on binding the interface and again whenever an output
    328 	 * gains focus.
    329 	 */
    330 	void (*focused_output)(void *data,
    331 			       struct zriver_seat_status_v1 *zriver_seat_status_v1,
    332 			       struct wl_output *output);
    333 	/**
    334 	 * the seat unfocused an output
    335 	 *
    336 	 * Sent whenever an output loses focus.
    337 	 */
    338 	void (*unfocused_output)(void *data,
    339 				 struct zriver_seat_status_v1 *zriver_seat_status_v1,
    340 				 struct wl_output *output);
    341 	/**
    342 	 * information on the focused view
    343 	 *
    344 	 * Sent once on binding the interface and again whenever the
    345 	 * focused view or a property thereof changes. The title may be an
    346 	 * empty string if no view is focused or the focused view did not
    347 	 * set a title.
    348 	 * @param title title of the focused view
    349 	 */
    350 	void (*focused_view)(void *data,
    351 			     struct zriver_seat_status_v1 *zriver_seat_status_v1,
    352 			     const char *title);
    353 	/**
    354 	 * the active mode changed
    355 	 *
    356 	 * Sent once on binding the interface and again whenever a new
    357 	 * mode is entered (e.g. with riverctl enter-mode foobar).
    358 	 * @param name name of the mode
    359 	 * @since 3
    360 	 */
    361 	void (*mode)(void *data,
    362 		     struct zriver_seat_status_v1 *zriver_seat_status_v1,
    363 		     const char *name);
    364 };
    365 
    366 /**
    367  * @ingroup iface_zriver_seat_status_v1
    368  */
    369 static inline int
    370 zriver_seat_status_v1_add_listener(struct zriver_seat_status_v1 *zriver_seat_status_v1,
    371 				   const struct zriver_seat_status_v1_listener *listener, void *data)
    372 {
    373 	return wl_proxy_add_listener((struct wl_proxy *) zriver_seat_status_v1,
    374 				     (void (**)(void)) listener, data);
    375 }
    376 
    377 #define ZRIVER_SEAT_STATUS_V1_DESTROY 0
    378 
    379 /**
    380  * @ingroup iface_zriver_seat_status_v1
    381  */
    382 #define ZRIVER_SEAT_STATUS_V1_FOCUSED_OUTPUT_SINCE_VERSION 1
    383 /**
    384  * @ingroup iface_zriver_seat_status_v1
    385  */
    386 #define ZRIVER_SEAT_STATUS_V1_UNFOCUSED_OUTPUT_SINCE_VERSION 1
    387 /**
    388  * @ingroup iface_zriver_seat_status_v1
    389  */
    390 #define ZRIVER_SEAT_STATUS_V1_FOCUSED_VIEW_SINCE_VERSION 1
    391 /**
    392  * @ingroup iface_zriver_seat_status_v1
    393  */
    394 #define ZRIVER_SEAT_STATUS_V1_MODE_SINCE_VERSION 3
    395 
    396 /**
    397  * @ingroup iface_zriver_seat_status_v1
    398  */
    399 #define ZRIVER_SEAT_STATUS_V1_DESTROY_SINCE_VERSION 1
    400 
    401 /** @ingroup iface_zriver_seat_status_v1 */
    402 static inline void
    403 zriver_seat_status_v1_set_user_data(struct zriver_seat_status_v1 *zriver_seat_status_v1, void *user_data)
    404 {
    405 	wl_proxy_set_user_data((struct wl_proxy *) zriver_seat_status_v1, user_data);
    406 }
    407 
    408 /** @ingroup iface_zriver_seat_status_v1 */
    409 static inline void *
    410 zriver_seat_status_v1_get_user_data(struct zriver_seat_status_v1 *zriver_seat_status_v1)
    411 {
    412 	return wl_proxy_get_user_data((struct wl_proxy *) zriver_seat_status_v1);
    413 }
    414 
    415 static inline uint32_t
    416 zriver_seat_status_v1_get_version(struct zriver_seat_status_v1 *zriver_seat_status_v1)
    417 {
    418 	return wl_proxy_get_version((struct wl_proxy *) zriver_seat_status_v1);
    419 }
    420 
    421 /**
    422  * @ingroup iface_zriver_seat_status_v1
    423  *
    424  * This request indicates that the client will not use the
    425  * river_seat_status object any more.
    426  */
    427 static inline void
    428 zriver_seat_status_v1_destroy(struct zriver_seat_status_v1 *zriver_seat_status_v1)
    429 {
    430 	wl_proxy_marshal_flags((struct wl_proxy *) zriver_seat_status_v1,
    431 			 ZRIVER_SEAT_STATUS_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zriver_seat_status_v1), WL_MARSHAL_FLAG_DESTROY);
    432 }
    433 
    434 #ifdef  __cplusplus
    435 }
    436 #endif
    437 
    438 #endif