-
Notifications
You must be signed in to change notification settings - Fork 1
Experimental Wayland support #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
perk11
wants to merge
2
commits into
main
Choose a base branch
from
wayland
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,323 @@ | ||
| /* Generated by wayland-scanner 1.24.0 */ | ||
|
|
||
| #ifndef EXT_IDLE_NOTIFY_V1_CLIENT_PROTOCOL_H | ||
| #define EXT_IDLE_NOTIFY_V1_CLIENT_PROTOCOL_H | ||
|
|
||
| #include <stdint.h> | ||
| #include <stddef.h> | ||
| #include "wayland-client.h" | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
|
|
||
| /** | ||
| * @page page_ext_idle_notify_v1 The ext_idle_notify_v1 protocol | ||
| * @section page_ifaces_ext_idle_notify_v1 Interfaces | ||
| * - @subpage page_iface_ext_idle_notifier_v1 - idle notification manager | ||
| * - @subpage page_iface_ext_idle_notification_v1 - idle notification | ||
| * @section page_copyright_ext_idle_notify_v1 Copyright | ||
| * <pre> | ||
| * | ||
| * Copyright © 2015 Martin Gräßlin | ||
| * Copyright © 2022 Simon Ser | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining a | ||
| * copy of this software and associated documentation files (the "Software"), | ||
| * to deal in the Software without restriction, including without limitation | ||
| * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| * and/or sell copies of the Software, and to permit persons to whom the | ||
| * Software is furnished to do so, subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice (including the next | ||
| * paragraph) shall be included in all copies or substantial portions of the | ||
| * Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
| * DEALINGS IN THE SOFTWARE. | ||
| * </pre> | ||
| */ | ||
| struct ext_idle_notification_v1; | ||
| struct ext_idle_notifier_v1; | ||
| struct wl_seat; | ||
|
|
||
| #ifndef EXT_IDLE_NOTIFIER_V1_INTERFACE | ||
| #define EXT_IDLE_NOTIFIER_V1_INTERFACE | ||
| /** | ||
| * @page page_iface_ext_idle_notifier_v1 ext_idle_notifier_v1 | ||
| * @section page_iface_ext_idle_notifier_v1_desc Description | ||
| * | ||
| * This interface allows clients to monitor user idle status. | ||
| * | ||
| * After binding to this global, clients can create ext_idle_notification_v1 | ||
| * objects to get notified when the user is idle for a given amount of time. | ||
| * @section page_iface_ext_idle_notifier_v1_api API | ||
| * See @ref iface_ext_idle_notifier_v1. | ||
| */ | ||
| /** | ||
| * @defgroup iface_ext_idle_notifier_v1 The ext_idle_notifier_v1 interface | ||
| * | ||
| * This interface allows clients to monitor user idle status. | ||
| * | ||
| * After binding to this global, clients can create ext_idle_notification_v1 | ||
| * objects to get notified when the user is idle for a given amount of time. | ||
| */ | ||
| extern const struct wl_interface ext_idle_notifier_v1_interface; | ||
| #endif | ||
| #ifndef EXT_IDLE_NOTIFICATION_V1_INTERFACE | ||
| #define EXT_IDLE_NOTIFICATION_V1_INTERFACE | ||
| /** | ||
| * @page page_iface_ext_idle_notification_v1 ext_idle_notification_v1 | ||
| * @section page_iface_ext_idle_notification_v1_desc Description | ||
| * | ||
| * This interface is used by the compositor to send idle notification events | ||
| * to clients. | ||
| * | ||
| * Initially the notification object is not idle. The notification object | ||
| * becomes idle when no user activity has happened for at least the timeout | ||
| * duration, starting from the creation of the notification object. User | ||
| * activity may include input events or a presence sensor, but is | ||
| * compositor-specific. | ||
| * | ||
| * How this notification responds to idle inhibitors depends on how | ||
| * it was constructed. If constructed from the | ||
| * get_idle_notification request, then if an idle inhibitor is | ||
| * active (e.g. another client has created a zwp_idle_inhibitor_v1 | ||
| * on a visible surface), the compositor must not make the | ||
| * notification object idle. However, if constructed from the | ||
| * get_input_idle_notification request, then idle inhibitors are | ||
| * ignored, and only input from the user, e.g. from a keyboard or | ||
| * mouse, counts as activity. | ||
| * | ||
| * When the notification object becomes idle, an idled event is sent. When | ||
| * user activity starts again, the notification object stops being idle, | ||
| * a resumed event is sent and the timeout is restarted. | ||
| * @section page_iface_ext_idle_notification_v1_api API | ||
| * See @ref iface_ext_idle_notification_v1. | ||
| */ | ||
| /** | ||
| * @defgroup iface_ext_idle_notification_v1 The ext_idle_notification_v1 interface | ||
| * | ||
| * This interface is used by the compositor to send idle notification events | ||
| * to clients. | ||
| * | ||
| * Initially the notification object is not idle. The notification object | ||
| * becomes idle when no user activity has happened for at least the timeout | ||
| * duration, starting from the creation of the notification object. User | ||
| * activity may include input events or a presence sensor, but is | ||
| * compositor-specific. | ||
| * | ||
| * How this notification responds to idle inhibitors depends on how | ||
| * it was constructed. If constructed from the | ||
| * get_idle_notification request, then if an idle inhibitor is | ||
| * active (e.g. another client has created a zwp_idle_inhibitor_v1 | ||
| * on a visible surface), the compositor must not make the | ||
| * notification object idle. However, if constructed from the | ||
| * get_input_idle_notification request, then idle inhibitors are | ||
| * ignored, and only input from the user, e.g. from a keyboard or | ||
| * mouse, counts as activity. | ||
| * | ||
| * When the notification object becomes idle, an idled event is sent. When | ||
| * user activity starts again, the notification object stops being idle, | ||
| * a resumed event is sent and the timeout is restarted. | ||
| */ | ||
| extern const struct wl_interface ext_idle_notification_v1_interface; | ||
| #endif | ||
|
|
||
| #define EXT_IDLE_NOTIFIER_V1_DESTROY 0 | ||
| #define EXT_IDLE_NOTIFIER_V1_GET_IDLE_NOTIFICATION 1 | ||
| #define EXT_IDLE_NOTIFIER_V1_GET_INPUT_IDLE_NOTIFICATION 2 | ||
|
|
||
|
|
||
| /** | ||
| * @ingroup iface_ext_idle_notifier_v1 | ||
| */ | ||
| #define EXT_IDLE_NOTIFIER_V1_DESTROY_SINCE_VERSION 1 | ||
| /** | ||
| * @ingroup iface_ext_idle_notifier_v1 | ||
| */ | ||
| #define EXT_IDLE_NOTIFIER_V1_GET_IDLE_NOTIFICATION_SINCE_VERSION 1 | ||
| /** | ||
| * @ingroup iface_ext_idle_notifier_v1 | ||
| */ | ||
| #define EXT_IDLE_NOTIFIER_V1_GET_INPUT_IDLE_NOTIFICATION_SINCE_VERSION 2 | ||
|
|
||
| /** @ingroup iface_ext_idle_notifier_v1 */ | ||
| static inline void | ||
| ext_idle_notifier_v1_set_user_data(struct ext_idle_notifier_v1 *ext_idle_notifier_v1, void *user_data) | ||
| { | ||
| wl_proxy_set_user_data((struct wl_proxy *) ext_idle_notifier_v1, user_data); | ||
| } | ||
|
|
||
| /** @ingroup iface_ext_idle_notifier_v1 */ | ||
| static inline void * | ||
| ext_idle_notifier_v1_get_user_data(struct ext_idle_notifier_v1 *ext_idle_notifier_v1) | ||
| { | ||
| return wl_proxy_get_user_data((struct wl_proxy *) ext_idle_notifier_v1); | ||
| } | ||
|
|
||
| static inline uint32_t | ||
| ext_idle_notifier_v1_get_version(struct ext_idle_notifier_v1 *ext_idle_notifier_v1) | ||
| { | ||
| return wl_proxy_get_version((struct wl_proxy *) ext_idle_notifier_v1); | ||
| } | ||
|
|
||
| /** | ||
| * @ingroup iface_ext_idle_notifier_v1 | ||
| * | ||
| * Destroy the manager object. All objects created via this interface | ||
| * remain valid. | ||
| */ | ||
| static inline void | ||
| ext_idle_notifier_v1_destroy(struct ext_idle_notifier_v1 *ext_idle_notifier_v1) | ||
| { | ||
| wl_proxy_marshal_flags((struct wl_proxy *) ext_idle_notifier_v1, | ||
| EXT_IDLE_NOTIFIER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) ext_idle_notifier_v1), WL_MARSHAL_FLAG_DESTROY); | ||
| } | ||
|
|
||
| /** | ||
| * @ingroup iface_ext_idle_notifier_v1 | ||
| * | ||
| * Create a new idle notification object. | ||
| * | ||
| * The notification object has a minimum timeout duration and is tied to a | ||
| * seat. The client will be notified if the seat is inactive for at least | ||
| * the provided timeout. See ext_idle_notification_v1 for more details. | ||
| * | ||
| * A zero timeout is valid and means the client wants to be notified as | ||
| * soon as possible when the seat is inactive. | ||
| */ | ||
| static inline struct ext_idle_notification_v1 * | ||
| ext_idle_notifier_v1_get_idle_notification(struct ext_idle_notifier_v1 *ext_idle_notifier_v1, uint32_t timeout, struct wl_seat *seat) | ||
| { | ||
| struct wl_proxy *id; | ||
|
|
||
| id = wl_proxy_marshal_flags((struct wl_proxy *) ext_idle_notifier_v1, | ||
| EXT_IDLE_NOTIFIER_V1_GET_IDLE_NOTIFICATION, &ext_idle_notification_v1_interface, wl_proxy_get_version((struct wl_proxy *) ext_idle_notifier_v1), 0, NULL, timeout, seat); | ||
|
|
||
| return (struct ext_idle_notification_v1 *) id; | ||
| } | ||
|
|
||
| /** | ||
| * @ingroup iface_ext_idle_notifier_v1 | ||
| * | ||
| * Create a new idle notification object to track input from the | ||
| * user, such as keyboard and mouse movement. Because this object is | ||
| * meant to track user input alone, it ignores idle inhibitors. | ||
| * | ||
| * The notification object has a minimum timeout duration and is tied to a | ||
| * seat. The client will be notified if the seat is inactive for at least | ||
| * the provided timeout. See ext_idle_notification_v1 for more details. | ||
| * | ||
| * A zero timeout is valid and means the client wants to be notified as | ||
| * soon as possible when the seat is inactive. | ||
| */ | ||
| static inline struct ext_idle_notification_v1 * | ||
| ext_idle_notifier_v1_get_input_idle_notification(struct ext_idle_notifier_v1 *ext_idle_notifier_v1, uint32_t timeout, struct wl_seat *seat) | ||
| { | ||
| struct wl_proxy *id; | ||
|
|
||
| id = wl_proxy_marshal_flags((struct wl_proxy *) ext_idle_notifier_v1, | ||
| EXT_IDLE_NOTIFIER_V1_GET_INPUT_IDLE_NOTIFICATION, &ext_idle_notification_v1_interface, wl_proxy_get_version((struct wl_proxy *) ext_idle_notifier_v1), 0, NULL, timeout, seat); | ||
|
|
||
| return (struct ext_idle_notification_v1 *) id; | ||
| } | ||
|
|
||
| /** | ||
| * @ingroup iface_ext_idle_notification_v1 | ||
| * @struct ext_idle_notification_v1_listener | ||
| */ | ||
| struct ext_idle_notification_v1_listener { | ||
| /** | ||
| * notification object is idle | ||
| * | ||
| * This event is sent when the notification object becomes idle. | ||
| * | ||
| * It's a compositor protocol error to send this event twice | ||
| * without a resumed event in-between. | ||
| */ | ||
| void (*idled)(void *data, | ||
| struct ext_idle_notification_v1 *ext_idle_notification_v1); | ||
| /** | ||
| * notification object is no longer idle | ||
| * | ||
| * This event is sent when the notification object stops being | ||
| * idle. | ||
| * | ||
| * It's a compositor protocol error to send this event twice | ||
| * without an idled event in-between. It's a compositor protocol | ||
| * error to send this event prior to any idled event. | ||
| */ | ||
| void (*resumed)(void *data, | ||
| struct ext_idle_notification_v1 *ext_idle_notification_v1); | ||
| }; | ||
|
|
||
| /** | ||
| * @ingroup iface_ext_idle_notification_v1 | ||
| */ | ||
| static inline int | ||
| ext_idle_notification_v1_add_listener(struct ext_idle_notification_v1 *ext_idle_notification_v1, | ||
| const struct ext_idle_notification_v1_listener *listener, void *data) | ||
| { | ||
| return wl_proxy_add_listener((struct wl_proxy *) ext_idle_notification_v1, | ||
| (void (**)(void)) listener, data); | ||
| } | ||
|
|
||
| #define EXT_IDLE_NOTIFICATION_V1_DESTROY 0 | ||
|
|
||
| /** | ||
| * @ingroup iface_ext_idle_notification_v1 | ||
| */ | ||
| #define EXT_IDLE_NOTIFICATION_V1_IDLED_SINCE_VERSION 1 | ||
| /** | ||
| * @ingroup iface_ext_idle_notification_v1 | ||
| */ | ||
| #define EXT_IDLE_NOTIFICATION_V1_RESUMED_SINCE_VERSION 1 | ||
|
|
||
| /** | ||
| * @ingroup iface_ext_idle_notification_v1 | ||
| */ | ||
| #define EXT_IDLE_NOTIFICATION_V1_DESTROY_SINCE_VERSION 1 | ||
|
|
||
| /** @ingroup iface_ext_idle_notification_v1 */ | ||
| static inline void | ||
| ext_idle_notification_v1_set_user_data(struct ext_idle_notification_v1 *ext_idle_notification_v1, void *user_data) | ||
| { | ||
| wl_proxy_set_user_data((struct wl_proxy *) ext_idle_notification_v1, user_data); | ||
| } | ||
|
|
||
| /** @ingroup iface_ext_idle_notification_v1 */ | ||
| static inline void * | ||
| ext_idle_notification_v1_get_user_data(struct ext_idle_notification_v1 *ext_idle_notification_v1) | ||
| { | ||
| return wl_proxy_get_user_data((struct wl_proxy *) ext_idle_notification_v1); | ||
| } | ||
|
|
||
| static inline uint32_t | ||
| ext_idle_notification_v1_get_version(struct ext_idle_notification_v1 *ext_idle_notification_v1) | ||
| { | ||
| return wl_proxy_get_version((struct wl_proxy *) ext_idle_notification_v1); | ||
| } | ||
|
|
||
| /** | ||
| * @ingroup iface_ext_idle_notification_v1 | ||
| * | ||
| * Destroy the notification object. | ||
| */ | ||
| static inline void | ||
| ext_idle_notification_v1_destroy(struct ext_idle_notification_v1 *ext_idle_notification_v1) | ||
| { | ||
| wl_proxy_marshal_flags((struct wl_proxy *) ext_idle_notification_v1, | ||
| EXT_IDLE_NOTIFICATION_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) ext_idle_notification_v1), WL_MARSHAL_FLAG_DESTROY); | ||
| } | ||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
|
|
||
| #endif |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two spaces between 'arguments_parsing.c' and 'ext-idle-notify-v1-protocol.c' which is inconsistent with the single space used between other files in the SOURCES list.