dotfiles

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

dwl-ipc-unstable-v2-protocol.h (14453B)


      1 /* Generated by wayland-scanner 1.22.0 */
      2 
      3 #ifndef DWL_IPC_UNSTABLE_V2_CLIENT_PROTOCOL_H
      4 #define DWL_IPC_UNSTABLE_V2_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_dwl_ipc_unstable_v2 The dwl_ipc_unstable_v2 protocol
     16  * inter-proccess-communication about dwl's state
     17  *
     18  * @section page_desc_dwl_ipc_unstable_v2 Description
     19  *
     20  * This protocol allows clients to update and get updates from dwl.
     21  *
     22  * Warning! The protocol described in this file is experimental and
     23  * backward incompatible changes may be made. Backward compatible
     24  * changes may be added together with the corresponding interface
     25  * version bump.
     26  * Backward incompatible changes are done by bumping the version
     27  * number in the protocol and interface names and resetting the
     28  * interface version. Once the protocol is to be declared stable,
     29  * the 'z' prefix and the version number in the protocol and
     30  * interface names are removed and the interface version number is
     31  * reset.
     32  *
     33  * @section page_ifaces_dwl_ipc_unstable_v2 Interfaces
     34  * - @subpage page_iface_zdwl_ipc_manager_v2 - manage dwl state
     35  * - @subpage page_iface_zdwl_ipc_output_v2 - control dwl output
     36  */
     37 struct wl_output;
     38 struct zdwl_ipc_manager_v2;
     39 struct zdwl_ipc_output_v2;
     40 
     41 #ifndef ZDWL_IPC_MANAGER_V2_INTERFACE
     42 #define ZDWL_IPC_MANAGER_V2_INTERFACE
     43 /**
     44  * @page page_iface_zdwl_ipc_manager_v2 zdwl_ipc_manager_v2
     45  * @section page_iface_zdwl_ipc_manager_v2_desc Description
     46  *
     47  * This interface is exposed as a global in wl_registry.
     48  *
     49  * Clients can use this interface to get a dwl_ipc_output.
     50  * After binding the client will recieve the dwl_ipc_manager.tags and dwl_ipc_manager.layout events.
     51  * The dwl_ipc_manager.tags and dwl_ipc_manager.layout events expose tags and layouts to the client.
     52  * @section page_iface_zdwl_ipc_manager_v2_api API
     53  * See @ref iface_zdwl_ipc_manager_v2.
     54  */
     55 /**
     56  * @defgroup iface_zdwl_ipc_manager_v2 The zdwl_ipc_manager_v2 interface
     57  *
     58  * This interface is exposed as a global in wl_registry.
     59  *
     60  * Clients can use this interface to get a dwl_ipc_output.
     61  * After binding the client will recieve the dwl_ipc_manager.tags and dwl_ipc_manager.layout events.
     62  * The dwl_ipc_manager.tags and dwl_ipc_manager.layout events expose tags and layouts to the client.
     63  */
     64 extern const struct wl_interface zdwl_ipc_manager_v2_interface;
     65 #endif
     66 #ifndef ZDWL_IPC_OUTPUT_V2_INTERFACE
     67 #define ZDWL_IPC_OUTPUT_V2_INTERFACE
     68 /**
     69  * @page page_iface_zdwl_ipc_output_v2 zdwl_ipc_output_v2
     70  * @section page_iface_zdwl_ipc_output_v2_desc Description
     71  *
     72  * Observe and control a dwl output.
     73  *
     74  * Events are double-buffered:
     75  * Clients should cache events and redraw when a dwl_ipc_output.frame event is sent.
     76  *
     77  * Request are not double-buffered:
     78  * The compositor will update immediately upon request.
     79  * @section page_iface_zdwl_ipc_output_v2_api API
     80  * See @ref iface_zdwl_ipc_output_v2.
     81  */
     82 /**
     83  * @defgroup iface_zdwl_ipc_output_v2 The zdwl_ipc_output_v2 interface
     84  *
     85  * Observe and control a dwl output.
     86  *
     87  * Events are double-buffered:
     88  * Clients should cache events and redraw when a dwl_ipc_output.frame event is sent.
     89  *
     90  * Request are not double-buffered:
     91  * The compositor will update immediately upon request.
     92  */
     93 extern const struct wl_interface zdwl_ipc_output_v2_interface;
     94 #endif
     95 
     96 /**
     97  * @ingroup iface_zdwl_ipc_manager_v2
     98  * @struct zdwl_ipc_manager_v2_listener
     99  */
    100 struct zdwl_ipc_manager_v2_listener {
    101 	/**
    102 	 * Announces tag amount
    103 	 *
    104 	 * This event is sent after binding. A roundtrip after binding
    105 	 * guarantees the client recieved all tags.
    106 	 */
    107 	void (*tags)(void *data,
    108 		     struct zdwl_ipc_manager_v2 *zdwl_ipc_manager_v2,
    109 		     uint32_t amount);
    110 	/**
    111 	 * Announces a layout
    112 	 *
    113 	 * This event is sent after binding. A roundtrip after binding
    114 	 * guarantees the client recieved all layouts.
    115 	 */
    116 	void (*layout)(void *data,
    117 		       struct zdwl_ipc_manager_v2 *zdwl_ipc_manager_v2,
    118 		       const char *name);
    119 };
    120 
    121 /**
    122  * @ingroup iface_zdwl_ipc_manager_v2
    123  */
    124 static inline int
    125 zdwl_ipc_manager_v2_add_listener(struct zdwl_ipc_manager_v2 *zdwl_ipc_manager_v2,
    126 				 const struct zdwl_ipc_manager_v2_listener *listener, void *data)
    127 {
    128 	return wl_proxy_add_listener((struct wl_proxy *) zdwl_ipc_manager_v2,
    129 				     (void (**)(void)) listener, data);
    130 }
    131 
    132 #define ZDWL_IPC_MANAGER_V2_RELEASE 0
    133 #define ZDWL_IPC_MANAGER_V2_GET_OUTPUT 1
    134 
    135 /**
    136  * @ingroup iface_zdwl_ipc_manager_v2
    137  */
    138 #define ZDWL_IPC_MANAGER_V2_TAGS_SINCE_VERSION 1
    139 /**
    140  * @ingroup iface_zdwl_ipc_manager_v2
    141  */
    142 #define ZDWL_IPC_MANAGER_V2_LAYOUT_SINCE_VERSION 1
    143 
    144 /**
    145  * @ingroup iface_zdwl_ipc_manager_v2
    146  */
    147 #define ZDWL_IPC_MANAGER_V2_RELEASE_SINCE_VERSION 1
    148 /**
    149  * @ingroup iface_zdwl_ipc_manager_v2
    150  */
    151 #define ZDWL_IPC_MANAGER_V2_GET_OUTPUT_SINCE_VERSION 1
    152 
    153 /** @ingroup iface_zdwl_ipc_manager_v2 */
    154 static inline void
    155 zdwl_ipc_manager_v2_set_user_data(struct zdwl_ipc_manager_v2 *zdwl_ipc_manager_v2, void *user_data)
    156 {
    157 	wl_proxy_set_user_data((struct wl_proxy *) zdwl_ipc_manager_v2, user_data);
    158 }
    159 
    160 /** @ingroup iface_zdwl_ipc_manager_v2 */
    161 static inline void *
    162 zdwl_ipc_manager_v2_get_user_data(struct zdwl_ipc_manager_v2 *zdwl_ipc_manager_v2)
    163 {
    164 	return wl_proxy_get_user_data((struct wl_proxy *) zdwl_ipc_manager_v2);
    165 }
    166 
    167 static inline uint32_t
    168 zdwl_ipc_manager_v2_get_version(struct zdwl_ipc_manager_v2 *zdwl_ipc_manager_v2)
    169 {
    170 	return wl_proxy_get_version((struct wl_proxy *) zdwl_ipc_manager_v2);
    171 }
    172 
    173 /** @ingroup iface_zdwl_ipc_manager_v2 */
    174 static inline void
    175 zdwl_ipc_manager_v2_destroy(struct zdwl_ipc_manager_v2 *zdwl_ipc_manager_v2)
    176 {
    177 	wl_proxy_destroy((struct wl_proxy *) zdwl_ipc_manager_v2);
    178 }
    179 
    180 /**
    181  * @ingroup iface_zdwl_ipc_manager_v2
    182  *
    183  * Indicates that the client will not the dwl_ipc_manager object anymore.
    184  * Objects created through this instance are not affected.
    185  */
    186 static inline void
    187 zdwl_ipc_manager_v2_release(struct zdwl_ipc_manager_v2 *zdwl_ipc_manager_v2)
    188 {
    189 	wl_proxy_marshal_flags((struct wl_proxy *) zdwl_ipc_manager_v2,
    190 			 ZDWL_IPC_MANAGER_V2_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) zdwl_ipc_manager_v2), WL_MARSHAL_FLAG_DESTROY);
    191 }
    192 
    193 /**
    194  * @ingroup iface_zdwl_ipc_manager_v2
    195  *
    196  * Get a dwl_ipc_outout for the specified wl_output.
    197  */
    198 static inline struct zdwl_ipc_output_v2 *
    199 zdwl_ipc_manager_v2_get_output(struct zdwl_ipc_manager_v2 *zdwl_ipc_manager_v2, struct wl_output *output)
    200 {
    201 	struct wl_proxy *id;
    202 
    203 	id = wl_proxy_marshal_flags((struct wl_proxy *) zdwl_ipc_manager_v2,
    204 			 ZDWL_IPC_MANAGER_V2_GET_OUTPUT, &zdwl_ipc_output_v2_interface, wl_proxy_get_version((struct wl_proxy *) zdwl_ipc_manager_v2), 0, NULL, output);
    205 
    206 	return (struct zdwl_ipc_output_v2 *) id;
    207 }
    208 
    209 #ifndef ZDWL_IPC_OUTPUT_V2_TAG_STATE_ENUM
    210 #define ZDWL_IPC_OUTPUT_V2_TAG_STATE_ENUM
    211 enum zdwl_ipc_output_v2_tag_state {
    212 	/**
    213 	 * no state
    214 	 */
    215 	ZDWL_IPC_OUTPUT_V2_TAG_STATE_NONE = 0,
    216 	/**
    217 	 * tag is active
    218 	 */
    219 	ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE = 1,
    220 	/**
    221 	 * tag has at least one urgent client
    222 	 */
    223 	ZDWL_IPC_OUTPUT_V2_TAG_STATE_URGENT = 2,
    224 };
    225 #endif /* ZDWL_IPC_OUTPUT_V2_TAG_STATE_ENUM */
    226 
    227 /**
    228  * @ingroup iface_zdwl_ipc_output_v2
    229  * @struct zdwl_ipc_output_v2_listener
    230  */
    231 struct zdwl_ipc_output_v2_listener {
    232 	/**
    233 	 * Toggle client visibilty
    234 	 *
    235 	 * Indicates the client should hide or show themselves. If the
    236 	 * client is visible then hide, if hidden then show.
    237 	 */
    238 	void (*toggle_visibility)(void *data,
    239 				  struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2);
    240 	/**
    241 	 * Update the selected output.
    242 	 *
    243 	 * Indicates if the output is active. Zero is invalid, nonzero is
    244 	 * valid.
    245 	 */
    246 	void (*active)(void *data,
    247 		       struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2,
    248 		       uint32_t active);
    249 	/**
    250 	 * Update the state of a tag.
    251 	 *
    252 	 * Indicates that a tag has been updated.
    253 	 * @param tag Index of the tag
    254 	 * @param state The state of the tag.
    255 	 * @param clients The number of clients in the tag.
    256 	 * @param focused If there is a focused client. Nonzero being valid, zero being invalid.
    257 	 */
    258 	void (*tag)(void *data,
    259 		    struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2,
    260 		    uint32_t tag,
    261 		    uint32_t state,
    262 		    uint32_t clients,
    263 		    uint32_t focused);
    264 	/**
    265 	 * Update the layout.
    266 	 *
    267 	 * Indicates a new layout is selected.
    268 	 * @param layout Index of the layout.
    269 	 */
    270 	void (*layout)(void *data,
    271 		       struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2,
    272 		       uint32_t layout);
    273 	/**
    274 	 * Update the title.
    275 	 *
    276 	 * Indicates the title has changed.
    277 	 * @param title The new title name.
    278 	 */
    279 	void (*title)(void *data,
    280 		      struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2,
    281 		      const char *title);
    282 	/**
    283 	 * Update the appid.
    284 	 *
    285 	 * Indicates the appid has changed.
    286 	 * @param appid The new appid.
    287 	 */
    288 	void (*appid)(void *data,
    289 		      struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2,
    290 		      const char *appid);
    291 	/**
    292 	 * Update the current layout symbol
    293 	 *
    294 	 * Indicates the layout has changed. Since layout symbols are
    295 	 * dynamic. As opposed to the zdwl_ipc_manager.layout event, this
    296 	 * should take precendence when displaying. You can ignore the
    297 	 * zdwl_ipc_output.layout event.
    298 	 * @param layout The new layout
    299 	 */
    300 	void (*layout_symbol)(void *data,
    301 			      struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2,
    302 			      const char *layout);
    303 	/**
    304 	 * The update sequence is done.
    305 	 *
    306 	 * Indicates that a sequence of status updates have finished and
    307 	 * the client should redraw.
    308 	 */
    309 	void (*frame)(void *data,
    310 		      struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2);
    311 	/**
    312 	 * Update fullscreen status
    313 	 *
    314 	 * Indicates if the selected client on this output is fullscreen.
    315 	 * @param is_fullscreen If the selected client is fullscreen. Nonzero is valid, zero invalid
    316 	 * @since 2
    317 	 */
    318 	void (*fullscreen)(void *data,
    319 			   struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2,
    320 			   uint32_t is_fullscreen);
    321 	/**
    322 	 * Update the floating status
    323 	 *
    324 	 * Indicates if the selected client on this output is floating.
    325 	 * @param is_floating If the selected client is floating. Nonzero is valid, zero invalid
    326 	 * @since 2
    327 	 */
    328 	void (*floating)(void *data,
    329 			 struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2,
    330 			 uint32_t is_floating);
    331 };
    332 
    333 /**
    334  * @ingroup iface_zdwl_ipc_output_v2
    335  */
    336 static inline int
    337 zdwl_ipc_output_v2_add_listener(struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2,
    338 				const struct zdwl_ipc_output_v2_listener *listener, void *data)
    339 {
    340 	return wl_proxy_add_listener((struct wl_proxy *) zdwl_ipc_output_v2,
    341 				     (void (**)(void)) listener, data);
    342 }
    343 
    344 #define ZDWL_IPC_OUTPUT_V2_RELEASE 0
    345 #define ZDWL_IPC_OUTPUT_V2_SET_TAGS 1
    346 #define ZDWL_IPC_OUTPUT_V2_SET_CLIENT_TAGS 2
    347 #define ZDWL_IPC_OUTPUT_V2_SET_LAYOUT 3
    348 
    349 /**
    350  * @ingroup iface_zdwl_ipc_output_v2
    351  */
    352 #define ZDWL_IPC_OUTPUT_V2_TOGGLE_VISIBILITY_SINCE_VERSION 1
    353 /**
    354  * @ingroup iface_zdwl_ipc_output_v2
    355  */
    356 #define ZDWL_IPC_OUTPUT_V2_ACTIVE_SINCE_VERSION 1
    357 /**
    358  * @ingroup iface_zdwl_ipc_output_v2
    359  */
    360 #define ZDWL_IPC_OUTPUT_V2_TAG_SINCE_VERSION 1
    361 /**
    362  * @ingroup iface_zdwl_ipc_output_v2
    363  */
    364 #define ZDWL_IPC_OUTPUT_V2_LAYOUT_SINCE_VERSION 1
    365 /**
    366  * @ingroup iface_zdwl_ipc_output_v2
    367  */
    368 #define ZDWL_IPC_OUTPUT_V2_TITLE_SINCE_VERSION 1
    369 /**
    370  * @ingroup iface_zdwl_ipc_output_v2
    371  */
    372 #define ZDWL_IPC_OUTPUT_V2_APPID_SINCE_VERSION 1
    373 /**
    374  * @ingroup iface_zdwl_ipc_output_v2
    375  */
    376 #define ZDWL_IPC_OUTPUT_V2_LAYOUT_SYMBOL_SINCE_VERSION 1
    377 /**
    378  * @ingroup iface_zdwl_ipc_output_v2
    379  */
    380 #define ZDWL_IPC_OUTPUT_V2_FRAME_SINCE_VERSION 1
    381 /**
    382  * @ingroup iface_zdwl_ipc_output_v2
    383  */
    384 #define ZDWL_IPC_OUTPUT_V2_FULLSCREEN_SINCE_VERSION 2
    385 /**
    386  * @ingroup iface_zdwl_ipc_output_v2
    387  */
    388 #define ZDWL_IPC_OUTPUT_V2_FLOATING_SINCE_VERSION 2
    389 
    390 /**
    391  * @ingroup iface_zdwl_ipc_output_v2
    392  */
    393 #define ZDWL_IPC_OUTPUT_V2_RELEASE_SINCE_VERSION 1
    394 /**
    395  * @ingroup iface_zdwl_ipc_output_v2
    396  */
    397 #define ZDWL_IPC_OUTPUT_V2_SET_TAGS_SINCE_VERSION 1
    398 /**
    399  * @ingroup iface_zdwl_ipc_output_v2
    400  */
    401 #define ZDWL_IPC_OUTPUT_V2_SET_CLIENT_TAGS_SINCE_VERSION 1
    402 /**
    403  * @ingroup iface_zdwl_ipc_output_v2
    404  */
    405 #define ZDWL_IPC_OUTPUT_V2_SET_LAYOUT_SINCE_VERSION 1
    406 
    407 /** @ingroup iface_zdwl_ipc_output_v2 */
    408 static inline void
    409 zdwl_ipc_output_v2_set_user_data(struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2, void *user_data)
    410 {
    411 	wl_proxy_set_user_data((struct wl_proxy *) zdwl_ipc_output_v2, user_data);
    412 }
    413 
    414 /** @ingroup iface_zdwl_ipc_output_v2 */
    415 static inline void *
    416 zdwl_ipc_output_v2_get_user_data(struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2)
    417 {
    418 	return wl_proxy_get_user_data((struct wl_proxy *) zdwl_ipc_output_v2);
    419 }
    420 
    421 static inline uint32_t
    422 zdwl_ipc_output_v2_get_version(struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2)
    423 {
    424 	return wl_proxy_get_version((struct wl_proxy *) zdwl_ipc_output_v2);
    425 }
    426 
    427 /** @ingroup iface_zdwl_ipc_output_v2 */
    428 static inline void
    429 zdwl_ipc_output_v2_destroy(struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2)
    430 {
    431 	wl_proxy_destroy((struct wl_proxy *) zdwl_ipc_output_v2);
    432 }
    433 
    434 /**
    435  * @ingroup iface_zdwl_ipc_output_v2
    436  *
    437  * Indicates to that the client no longer needs this dwl_ipc_output.
    438  */
    439 static inline void
    440 zdwl_ipc_output_v2_release(struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2)
    441 {
    442 	wl_proxy_marshal_flags((struct wl_proxy *) zdwl_ipc_output_v2,
    443 			 ZDWL_IPC_OUTPUT_V2_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) zdwl_ipc_output_v2), WL_MARSHAL_FLAG_DESTROY);
    444 }
    445 
    446 /**
    447  * @ingroup iface_zdwl_ipc_output_v2
    448  */
    449 static inline void
    450 zdwl_ipc_output_v2_set_tags(struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2, uint32_t tagmask, uint32_t toggle_tagset)
    451 {
    452 	wl_proxy_marshal_flags((struct wl_proxy *) zdwl_ipc_output_v2,
    453 			 ZDWL_IPC_OUTPUT_V2_SET_TAGS, NULL, wl_proxy_get_version((struct wl_proxy *) zdwl_ipc_output_v2), 0, tagmask, toggle_tagset);
    454 }
    455 
    456 /**
    457  * @ingroup iface_zdwl_ipc_output_v2
    458  *
    459  * The tags are updated as follows:
    460  * new_tags = (current_tags AND and_tags) XOR xor_tags
    461  */
    462 static inline void
    463 zdwl_ipc_output_v2_set_client_tags(struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2, uint32_t and_tags, uint32_t xor_tags)
    464 {
    465 	wl_proxy_marshal_flags((struct wl_proxy *) zdwl_ipc_output_v2,
    466 			 ZDWL_IPC_OUTPUT_V2_SET_CLIENT_TAGS, NULL, wl_proxy_get_version((struct wl_proxy *) zdwl_ipc_output_v2), 0, and_tags, xor_tags);
    467 }
    468 
    469 /**
    470  * @ingroup iface_zdwl_ipc_output_v2
    471  */
    472 static inline void
    473 zdwl_ipc_output_v2_set_layout(struct zdwl_ipc_output_v2 *zdwl_ipc_output_v2, uint32_t index)
    474 {
    475 	wl_proxy_marshal_flags((struct wl_proxy *) zdwl_ipc_output_v2,
    476 			 ZDWL_IPC_OUTPUT_V2_SET_LAYOUT, NULL, wl_proxy_get_version((struct wl_proxy *) zdwl_ipc_output_v2), 0, index);
    477 }
    478 
    479 #ifdef  __cplusplus
    480 }
    481 #endif
    482 
    483 #endif