This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xdg-activation-v1: new protocol implementation
This implements the new xdg-activation-v1 protocol [1]. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/50
- Loading branch information
Showing
5 changed files
with
394 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* This an unstable interface of wlroots. No guarantees are made regarding the | ||
* future consistency of this API. | ||
*/ | ||
#ifndef WLR_USE_UNSTABLE | ||
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features" | ||
#endif | ||
|
||
#ifndef WLR_TYPES_WLR_XDG_ACTIVATION_V1 | ||
#define WLR_TYPES_WLR_XDG_ACTIVATION_V1 | ||
|
||
#include <wayland-server-core.h> | ||
|
||
struct wlr_xdg_activation_token_v1 { | ||
struct wlr_xdg_activation_v1 *activation; | ||
struct wl_list link; // wlr_xdg_activation_v1.tokens | ||
|
||
// The source surface that created the token. | ||
struct wlr_surface *surface; // can be NULL | ||
// The seat on which activation is being requested. | ||
struct wlr_seat *seat; // can be NULL | ||
// The serial for the input event that created the token. | ||
uint32_t serial; // invalid if seat is NULL | ||
// The application ID to be activated. This is just a hint. | ||
char *app_id; // can be NULL | ||
|
||
// private state | ||
|
||
char *token; | ||
struct wl_resource *resource; // can be NULL | ||
|
||
struct wl_listener seat_destroy; | ||
struct wl_listener surface_destroy; | ||
}; | ||
|
||
struct wlr_xdg_activation_v1 { | ||
struct wl_global *global; | ||
|
||
struct wl_list tokens; // wlr_xdg_activation_token_v1.link | ||
|
||
struct { | ||
struct wl_signal destroy; | ||
struct wl_signal request_activate; // wlr_xdg_activation_v1_request_activate_event | ||
} events; | ||
|
||
struct wl_listener display_destroy; | ||
}; | ||
|
||
struct wlr_xdg_activation_v1_request_activate_event { | ||
// The token used to request activation. | ||
struct wlr_xdg_activation_token_v1 *token; | ||
// The surface requesting for activation. | ||
struct wlr_surface *surface; | ||
}; | ||
|
||
struct wlr_xdg_activation_v1 *wlr_xdg_activation_v1_create( | ||
struct wl_display *display); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.