dotfiles

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

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


      1 /* Generated by wayland-scanner 1.22.0 */
      2 
      3 #ifndef DWL_IPC_UNSTABLE_V2_SERVER_PROTOCOL_H
      4 #define DWL_IPC_UNSTABLE_V2_SERVER_PROTOCOL_H
      5 
      6 #include <stdint.h>
      7 #include <stddef.h>
      8 #include "wayland-server.h"
      9 
     10 #ifdef  __cplusplus
     11 extern "C" {
     12 #endif
     13 
     14 struct wl_client;
     15 struct wl_resource;
     16 
     17 /**
     18  * @page page_dwl_ipc_unstable_v2 The dwl_ipc_unstable_v2 protocol
     19  * inter-proccess-communication about dwl's state
     20  *
     21  * @section page_desc_dwl_ipc_unstable_v2 Description
     22  *
     23  * This protocol allows clients to update and get updates from dwl.
     24  *
     25  * Warning! The protocol described in this file is experimental and
     26  * backward incompatible changes may be made. Backward compatible
     27  * changes may be added together with the corresponding interface
     28  * version bump.
     29  * Backward incompatible changes are done by bumping the version
     30  * number in the protocol and interface names and resetting the
     31  * interface version. Once the protocol is to be declared stable,
     32  * the 'z' prefix and the version number in the protocol and
     33  * interface names are removed and the interface version number is
     34  * reset.
     35  *
     36  * @section page_ifaces_dwl_ipc_unstable_v2 Interfaces
     37  * - @subpage page_iface_zdwl_ipc_manager_v2 - manage dwl state
     38  * - @subpage page_iface_zdwl_ipc_output_v2 - control dwl output
     39  */
     40 struct wl_output;
     41 struct zdwl_ipc_manager_v2;
     42 struct zdwl_ipc_output_v2;
     43 
     44 #ifndef ZDWL_IPC_MANAGER_V2_INTERFACE
     45 #define ZDWL_IPC_MANAGER_V2_INTERFACE
     46 /**
     47  * @page page_iface_zdwl_ipc_manager_v2 zdwl_ipc_manager_v2
     48  * @section page_iface_zdwl_ipc_manager_v2_desc Description
     49  *
     50  * This interface is exposed as a global in wl_registry.
     51  *
     52  * Clients can use this interface to get a dwl_ipc_output.
     53  * After binding the client will recieve the dwl_ipc_manager.tags and dwl_ipc_manager.layout events.
     54  * The dwl_ipc_manager.tags and dwl_ipc_manager.layout events expose tags and layouts to the client.
     55  * @section page_iface_zdwl_ipc_manager_v2_api API
     56  * See @ref iface_zdwl_ipc_manager_v2.
     57  */
     58 /**
     59  * @defgroup iface_zdwl_ipc_manager_v2 The zdwl_ipc_manager_v2 interface
     60  *
     61  * This interface is exposed as a global in wl_registry.
     62  *
     63  * Clients can use this interface to get a dwl_ipc_output.
     64  * After binding the client will recieve the dwl_ipc_manager.tags and dwl_ipc_manager.layout events.
     65  * The dwl_ipc_manager.tags and dwl_ipc_manager.layout events expose tags and layouts to the client.
     66  */
     67 extern const struct wl_interface zdwl_ipc_manager_v2_interface;
     68 #endif
     69 #ifndef ZDWL_IPC_OUTPUT_V2_INTERFACE
     70 #define ZDWL_IPC_OUTPUT_V2_INTERFACE
     71 /**
     72  * @page page_iface_zdwl_ipc_output_v2 zdwl_ipc_output_v2
     73  * @section page_iface_zdwl_ipc_output_v2_desc Description
     74  *
     75  * Observe and control a dwl output.
     76  *
     77  * Events are double-buffered:
     78  * Clients should cache events and redraw when a dwl_ipc_output.frame event is sent.
     79  *
     80  * Request are not double-buffered:
     81  * The compositor will update immediately upon request.
     82  * @section page_iface_zdwl_ipc_output_v2_api API
     83  * See @ref iface_zdwl_ipc_output_v2.
     84  */
     85 /**
     86  * @defgroup iface_zdwl_ipc_output_v2 The zdwl_ipc_output_v2 interface
     87  *
     88  * Observe and control a dwl output.
     89  *
     90  * Events are double-buffered:
     91  * Clients should cache events and redraw when a dwl_ipc_output.frame event is sent.
     92  *
     93  * Request are not double-buffered:
     94  * The compositor will update immediately upon request.
     95  */
     96 extern const struct wl_interface zdwl_ipc_output_v2_interface;
     97 #endif
     98 
     99 /**
    100  * @ingroup iface_zdwl_ipc_manager_v2
    101  * @struct zdwl_ipc_manager_v2_interface
    102  */
    103 struct zdwl_ipc_manager_v2_interface {
    104 	/**
    105 	 * release dwl_ipc_manager
    106 	 *
    107 	 * Indicates that the client will not the dwl_ipc_manager object
    108 	 * anymore. Objects created through this instance are not affected.
    109 	 */
    110 	void (*release)(struct wl_client *client,
    111 			struct wl_resource *resource);
    112 	/**
    113 	 * get a dwl_ipc_outout for a wl_output
    114 	 *
    115 	 * Get a dwl_ipc_outout for the specified wl_output.
    116 	 */
    117 	void (*get_output)(struct wl_client *client,
    118 			   struct wl_resource *resource,
    119 			   uint32_t id,
    120 			   struct wl_resource *output);
    121 };
    122 
    123 #define ZDWL_IPC_MANAGER_V2_TAGS 0
    124 #define ZDWL_IPC_MANAGER_V2_LAYOUT 1
    125 
    126 /**
    127  * @ingroup iface_zdwl_ipc_manager_v2
    128  */
    129 #define ZDWL_IPC_MANAGER_V2_TAGS_SINCE_VERSION 1
    130 /**
    131  * @ingroup iface_zdwl_ipc_manager_v2
    132  */
    133 #define ZDWL_IPC_MANAGER_V2_LAYOUT_SINCE_VERSION 1
    134 
    135 /**
    136  * @ingroup iface_zdwl_ipc_manager_v2
    137  */
    138 #define ZDWL_IPC_MANAGER_V2_RELEASE_SINCE_VERSION 1
    139 /**
    140  * @ingroup iface_zdwl_ipc_manager_v2
    141  */
    142 #define ZDWL_IPC_MANAGER_V2_GET_OUTPUT_SINCE_VERSION 1
    143 
    144 /**
    145  * @ingroup iface_zdwl_ipc_manager_v2
    146  * Sends an tags event to the client owning the resource.
    147  * @param resource_ The client's resource
    148  */
    149 static inline void
    150 zdwl_ipc_manager_v2_send_tags(struct wl_resource *resource_, uint32_t amount)
    151 {
    152 	wl_resource_post_event(resource_, ZDWL_IPC_MANAGER_V2_TAGS, amount);
    153 }
    154 
    155 /**
    156  * @ingroup iface_zdwl_ipc_manager_v2
    157  * Sends an layout event to the client owning the resource.
    158  * @param resource_ The client's resource
    159  */
    160 static inline void
    161 zdwl_ipc_manager_v2_send_layout(struct wl_resource *resource_, const char *name)
    162 {
    163 	wl_resource_post_event(resource_, ZDWL_IPC_MANAGER_V2_LAYOUT, name);
    164 }
    165 
    166 #ifndef ZDWL_IPC_OUTPUT_V2_TAG_STATE_ENUM
    167 #define ZDWL_IPC_OUTPUT_V2_TAG_STATE_ENUM
    168 enum zdwl_ipc_output_v2_tag_state {
    169 	/**
    170 	 * no state
    171 	 */
    172 	ZDWL_IPC_OUTPUT_V2_TAG_STATE_NONE = 0,
    173 	/**
    174 	 * tag is active
    175 	 */
    176 	ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE = 1,
    177 	/**
    178 	 * tag has at least one urgent client
    179 	 */
    180 	ZDWL_IPC_OUTPUT_V2_TAG_STATE_URGENT = 2,
    181 };
    182 #endif /* ZDWL_IPC_OUTPUT_V2_TAG_STATE_ENUM */
    183 
    184 /**
    185  * @ingroup iface_zdwl_ipc_output_v2
    186  * @struct zdwl_ipc_output_v2_interface
    187  */
    188 struct zdwl_ipc_output_v2_interface {
    189 	/**
    190 	 * release dwl_ipc_outout
    191 	 *
    192 	 * Indicates to that the client no longer needs this
    193 	 * dwl_ipc_output.
    194 	 */
    195 	void (*release)(struct wl_client *client,
    196 			struct wl_resource *resource);
    197 	/**
    198 	 * Set the active tags of this output
    199 	 *
    200 	 * 
    201 	 * @param tagmask bitmask of the tags that should be set.
    202 	 * @param toggle_tagset toggle the selected tagset, zero for invalid, nonzero for valid.
    203 	 */
    204 	void (*set_tags)(struct wl_client *client,
    205 			 struct wl_resource *resource,
    206 			 uint32_t tagmask,
    207 			 uint32_t toggle_tagset);
    208 	/**
    209 	 * Set the tags of the focused client.
    210 	 *
    211 	 * The tags are updated as follows: new_tags = (current_tags AND
    212 	 * and_tags) XOR xor_tags
    213 	 */
    214 	void (*set_client_tags)(struct wl_client *client,
    215 				struct wl_resource *resource,
    216 				uint32_t and_tags,
    217 				uint32_t xor_tags);
    218 	/**
    219 	 * Set the layout of this output
    220 	 *
    221 	 * 
    222 	 * @param index index of a layout recieved by dwl_ipc_manager.layout
    223 	 */
    224 	void (*set_layout)(struct wl_client *client,
    225 			   struct wl_resource *resource,
    226 			   uint32_t index);
    227 };
    228 
    229 #define ZDWL_IPC_OUTPUT_V2_TOGGLE_VISIBILITY 0
    230 #define ZDWL_IPC_OUTPUT_V2_ACTIVE 1
    231 #define ZDWL_IPC_OUTPUT_V2_TAG 2
    232 #define ZDWL_IPC_OUTPUT_V2_LAYOUT 3
    233 #define ZDWL_IPC_OUTPUT_V2_TITLE 4
    234 #define ZDWL_IPC_OUTPUT_V2_APPID 5
    235 #define ZDWL_IPC_OUTPUT_V2_LAYOUT_SYMBOL 6
    236 #define ZDWL_IPC_OUTPUT_V2_FRAME 7
    237 #define ZDWL_IPC_OUTPUT_V2_FULLSCREEN 8
    238 #define ZDWL_IPC_OUTPUT_V2_FLOATING 9
    239 
    240 /**
    241  * @ingroup iface_zdwl_ipc_output_v2
    242  */
    243 #define ZDWL_IPC_OUTPUT_V2_TOGGLE_VISIBILITY_SINCE_VERSION 1
    244 /**
    245  * @ingroup iface_zdwl_ipc_output_v2
    246  */
    247 #define ZDWL_IPC_OUTPUT_V2_ACTIVE_SINCE_VERSION 1
    248 /**
    249  * @ingroup iface_zdwl_ipc_output_v2
    250  */
    251 #define ZDWL_IPC_OUTPUT_V2_TAG_SINCE_VERSION 1
    252 /**
    253  * @ingroup iface_zdwl_ipc_output_v2
    254  */
    255 #define ZDWL_IPC_OUTPUT_V2_LAYOUT_SINCE_VERSION 1
    256 /**
    257  * @ingroup iface_zdwl_ipc_output_v2
    258  */
    259 #define ZDWL_IPC_OUTPUT_V2_TITLE_SINCE_VERSION 1
    260 /**
    261  * @ingroup iface_zdwl_ipc_output_v2
    262  */
    263 #define ZDWL_IPC_OUTPUT_V2_APPID_SINCE_VERSION 1
    264 /**
    265  * @ingroup iface_zdwl_ipc_output_v2
    266  */
    267 #define ZDWL_IPC_OUTPUT_V2_LAYOUT_SYMBOL_SINCE_VERSION 1
    268 /**
    269  * @ingroup iface_zdwl_ipc_output_v2
    270  */
    271 #define ZDWL_IPC_OUTPUT_V2_FRAME_SINCE_VERSION 1
    272 /**
    273  * @ingroup iface_zdwl_ipc_output_v2
    274  */
    275 #define ZDWL_IPC_OUTPUT_V2_FULLSCREEN_SINCE_VERSION 2
    276 /**
    277  * @ingroup iface_zdwl_ipc_output_v2
    278  */
    279 #define ZDWL_IPC_OUTPUT_V2_FLOATING_SINCE_VERSION 2
    280 
    281 /**
    282  * @ingroup iface_zdwl_ipc_output_v2
    283  */
    284 #define ZDWL_IPC_OUTPUT_V2_RELEASE_SINCE_VERSION 1
    285 /**
    286  * @ingroup iface_zdwl_ipc_output_v2
    287  */
    288 #define ZDWL_IPC_OUTPUT_V2_SET_TAGS_SINCE_VERSION 1
    289 /**
    290  * @ingroup iface_zdwl_ipc_output_v2
    291  */
    292 #define ZDWL_IPC_OUTPUT_V2_SET_CLIENT_TAGS_SINCE_VERSION 1
    293 /**
    294  * @ingroup iface_zdwl_ipc_output_v2
    295  */
    296 #define ZDWL_IPC_OUTPUT_V2_SET_LAYOUT_SINCE_VERSION 1
    297 
    298 /**
    299  * @ingroup iface_zdwl_ipc_output_v2
    300  * Sends an toggle_visibility event to the client owning the resource.
    301  * @param resource_ The client's resource
    302  */
    303 static inline void
    304 zdwl_ipc_output_v2_send_toggle_visibility(struct wl_resource *resource_)
    305 {
    306 	wl_resource_post_event(resource_, ZDWL_IPC_OUTPUT_V2_TOGGLE_VISIBILITY);
    307 }
    308 
    309 /**
    310  * @ingroup iface_zdwl_ipc_output_v2
    311  * Sends an active event to the client owning the resource.
    312  * @param resource_ The client's resource
    313  */
    314 static inline void
    315 zdwl_ipc_output_v2_send_active(struct wl_resource *resource_, uint32_t active)
    316 {
    317 	wl_resource_post_event(resource_, ZDWL_IPC_OUTPUT_V2_ACTIVE, active);
    318 }
    319 
    320 /**
    321  * @ingroup iface_zdwl_ipc_output_v2
    322  * Sends an tag event to the client owning the resource.
    323  * @param resource_ The client's resource
    324  * @param tag Index of the tag
    325  * @param state The state of the tag.
    326  * @param clients The number of clients in the tag.
    327  * @param focused If there is a focused client. Nonzero being valid, zero being invalid.
    328  */
    329 static inline void
    330 zdwl_ipc_output_v2_send_tag(struct wl_resource *resource_, uint32_t tag, uint32_t state, uint32_t clients, uint32_t focused)
    331 {
    332 	wl_resource_post_event(resource_, ZDWL_IPC_OUTPUT_V2_TAG, tag, state, clients, focused);
    333 }
    334 
    335 /**
    336  * @ingroup iface_zdwl_ipc_output_v2
    337  * Sends an layout event to the client owning the resource.
    338  * @param resource_ The client's resource
    339  * @param layout Index of the layout.
    340  */
    341 static inline void
    342 zdwl_ipc_output_v2_send_layout(struct wl_resource *resource_, uint32_t layout)
    343 {
    344 	wl_resource_post_event(resource_, ZDWL_IPC_OUTPUT_V2_LAYOUT, layout);
    345 }
    346 
    347 /**
    348  * @ingroup iface_zdwl_ipc_output_v2
    349  * Sends an title event to the client owning the resource.
    350  * @param resource_ The client's resource
    351  * @param title The new title name.
    352  */
    353 static inline void
    354 zdwl_ipc_output_v2_send_title(struct wl_resource *resource_, const char *title)
    355 {
    356 	wl_resource_post_event(resource_, ZDWL_IPC_OUTPUT_V2_TITLE, title);
    357 }
    358 
    359 /**
    360  * @ingroup iface_zdwl_ipc_output_v2
    361  * Sends an appid event to the client owning the resource.
    362  * @param resource_ The client's resource
    363  * @param appid The new appid.
    364  */
    365 static inline void
    366 zdwl_ipc_output_v2_send_appid(struct wl_resource *resource_, const char *appid)
    367 {
    368 	wl_resource_post_event(resource_, ZDWL_IPC_OUTPUT_V2_APPID, appid);
    369 }
    370 
    371 /**
    372  * @ingroup iface_zdwl_ipc_output_v2
    373  * Sends an layout_symbol event to the client owning the resource.
    374  * @param resource_ The client's resource
    375  * @param layout The new layout
    376  */
    377 static inline void
    378 zdwl_ipc_output_v2_send_layout_symbol(struct wl_resource *resource_, const char *layout)
    379 {
    380 	wl_resource_post_event(resource_, ZDWL_IPC_OUTPUT_V2_LAYOUT_SYMBOL, layout);
    381 }
    382 
    383 /**
    384  * @ingroup iface_zdwl_ipc_output_v2
    385  * Sends an frame event to the client owning the resource.
    386  * @param resource_ The client's resource
    387  */
    388 static inline void
    389 zdwl_ipc_output_v2_send_frame(struct wl_resource *resource_)
    390 {
    391 	wl_resource_post_event(resource_, ZDWL_IPC_OUTPUT_V2_FRAME);
    392 }
    393 
    394 /**
    395  * @ingroup iface_zdwl_ipc_output_v2
    396  * Sends an fullscreen event to the client owning the resource.
    397  * @param resource_ The client's resource
    398  * @param is_fullscreen If the selected client is fullscreen. Nonzero is valid, zero invalid
    399  */
    400 static inline void
    401 zdwl_ipc_output_v2_send_fullscreen(struct wl_resource *resource_, uint32_t is_fullscreen)
    402 {
    403 	wl_resource_post_event(resource_, ZDWL_IPC_OUTPUT_V2_FULLSCREEN, is_fullscreen);
    404 }
    405 
    406 /**
    407  * @ingroup iface_zdwl_ipc_output_v2
    408  * Sends an floating event to the client owning the resource.
    409  * @param resource_ The client's resource
    410  * @param is_floating If the selected client is floating. Nonzero is valid, zero invalid
    411  */
    412 static inline void
    413 zdwl_ipc_output_v2_send_floating(struct wl_resource *resource_, uint32_t is_floating)
    414 {
    415 	wl_resource_post_event(resource_, ZDWL_IPC_OUTPUT_V2_FLOATING, is_floating);
    416 }
    417 
    418 #ifdef  __cplusplus
    419 }
    420 #endif
    421 
    422 #endif