mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
cosmic-workspaces: abstract transaction-addon
This allows to use it for a future ext-workspace implementation. It is also more generalized so can be used for other protocol implementation in the future in case the protocols require some kind of transaction management.
This commit is contained in:
parent
afe416f04e
commit
63dc609085
7 changed files with 258 additions and 176 deletions
|
|
@ -16,43 +16,6 @@ enum pending_change {
|
|||
CW_PENDING_WS_REMOVE = 1 << 3,
|
||||
};
|
||||
|
||||
struct transaction {
|
||||
uint32_t change;
|
||||
struct wl_list link;
|
||||
};
|
||||
|
||||
struct transaction_workspace {
|
||||
struct transaction base;
|
||||
struct lab_cosmic_workspace *workspace;
|
||||
};
|
||||
|
||||
struct transaction_group {
|
||||
struct transaction base;
|
||||
struct lab_cosmic_workspace_group *group;
|
||||
char *new_workspace_name;
|
||||
};
|
||||
|
||||
struct session_context {
|
||||
int ref_count;
|
||||
struct wl_list transactions;
|
||||
};
|
||||
|
||||
struct wl_resource_addon {
|
||||
struct session_context *ctx;
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct wl_resource_addon *resource_addon_create(struct session_context *ctx);
|
||||
|
||||
void transaction_add_workspace_ev(struct lab_cosmic_workspace *ws,
|
||||
struct wl_resource *resource, enum pending_change change);
|
||||
|
||||
void transaction_add_workspace_group_ev(struct lab_cosmic_workspace_group *group,
|
||||
struct wl_resource *resource, enum pending_change change,
|
||||
const char *new_workspace_name);
|
||||
|
||||
void resource_addon_destroy(struct wl_resource_addon *addon);
|
||||
|
||||
void group_output_send_initial_state(struct lab_cosmic_workspace_group *group,
|
||||
struct wl_resource *group_resource);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue