OLD | NEW |
1 /* Generated by wayland-scanner 1.11.0 */ | 1 /* Generated by wayland-scanner 1.11.0 */ |
2 | 2 |
3 #ifndef REMOTE_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H | 3 #ifndef REMOTE_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H |
4 #define REMOTE_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H | 4 #define REMOTE_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H |
5 | 5 |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include "wayland-server.h" | 8 #include "wayland-server.h" |
9 | 9 |
10 #ifdef __cplusplus | 10 #ifdef __cplusplus |
(...skipping 18 matching lines...) Expand all Loading... |
29 * incompatible changes are done by bumping the version number in the protocol | 29 * incompatible changes are done by bumping the version number in the protocol |
30 * and interface names and resetting the interface version. Once the protocol | 30 * and interface names and resetting the interface version. Once the protocol |
31 * is to be declared stable, the 'z' prefix and the version number in the | 31 * is to be declared stable, the 'z' prefix and the version number in the |
32 * protocol and interface names are removed and the interface version number is | 32 * protocol and interface names are removed and the interface version number is |
33 * reset. | 33 * reset. |
34 * | 34 * |
35 * @section page_ifaces_remote_shell_unstable_v1 Interfaces | 35 * @section page_ifaces_remote_shell_unstable_v1 Interfaces |
36 * - @subpage page_iface_zcr_remote_shell_v1 - remote_shell | 36 * - @subpage page_iface_zcr_remote_shell_v1 - remote_shell |
37 * - @subpage page_iface_zcr_remote_surface_v1 - A desktop window | 37 * - @subpage page_iface_zcr_remote_surface_v1 - A desktop window |
38 * - @subpage page_iface_zcr_notification_surface_v1 - A notification window | 38 * - @subpage page_iface_zcr_notification_surface_v1 - A notification window |
39 * - @subpage page_iface_zwp_remote_shell_v1 - DEPRECATED | |
40 * - @subpage page_iface_zwp_remote_surface_v1 - DEPRECATED | |
41 * - @subpage page_iface_zwp_notification_surface_v1 - DEPRECATED | |
42 * @section page_copyright_remote_shell_unstable_v1 Copyright | 39 * @section page_copyright_remote_shell_unstable_v1 Copyright |
43 * <pre> | 40 * <pre> |
44 * | 41 * |
45 * Copyright 2016 The Chromium Authors. | 42 * Copyright 2016 The Chromium Authors. |
46 * | 43 * |
47 * Permission is hereby granted, free of charge, to any person obtaining a | 44 * Permission is hereby granted, free of charge, to any person obtaining a |
48 * copy of this software and associated documentation files (the "Software"), | 45 * copy of this software and associated documentation files (the "Software"), |
49 * to deal in the Software without restriction, including without limitation | 46 * to deal in the Software without restriction, including without limitation |
50 * the rights to use, copy, modify, merge, publish, distribute, sublicense, | 47 * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
51 * and/or sell copies of the Software, and to permit persons to whom the | 48 * and/or sell copies of the Software, and to permit persons to whom the |
52 * Software is furnished to do so, subject to the following conditions: | 49 * Software is furnished to do so, subject to the following conditions: |
53 * | 50 * |
54 * The above copyright notice and this permission notice (including the next | 51 * The above copyright notice and this permission notice (including the next |
55 * paragraph) shall be included in all copies or substantial portions of the | 52 * paragraph) shall be included in all copies or substantial portions of the |
56 * Software. | 53 * Software. |
57 * | 54 * |
58 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 55 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
59 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 56 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
60 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | 57 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
61 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | 58 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
62 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | 59 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
63 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 60 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
64 * DEALINGS IN THE SOFTWARE. | 61 * DEALINGS IN THE SOFTWARE. |
65 * </pre> | 62 * </pre> |
66 */ | 63 */ |
67 struct wl_surface; | 64 struct wl_surface; |
68 struct zcr_notification_surface_v1; | 65 struct zcr_notification_surface_v1; |
69 struct zcr_remote_shell_v1; | 66 struct zcr_remote_shell_v1; |
70 struct zcr_remote_surface_v1; | 67 struct zcr_remote_surface_v1; |
71 struct zwp_notification_surface_v1; | |
72 struct zwp_remote_shell_v1; | |
73 struct zwp_remote_surface_v1; | |
74 | 68 |
75 /** | 69 /** |
76 * @page page_iface_zcr_remote_shell_v1 zcr_remote_shell_v1 | 70 * @page page_iface_zcr_remote_shell_v1 zcr_remote_shell_v1 |
77 * @section page_iface_zcr_remote_shell_v1_desc Description | 71 * @section page_iface_zcr_remote_shell_v1_desc Description |
78 * | 72 * |
79 * The global interface that allows clients to turn a wl_surface into a | 73 * The global interface that allows clients to turn a wl_surface into a |
80 * "real window" which is remotely managed but can be stacked, activated | 74 * "real window" which is remotely managed but can be stacked, activated |
81 * and made fullscreen by the user. | 75 * and made fullscreen by the user. |
82 * @section page_iface_zcr_remote_shell_v1_api API | 76 * @section page_iface_zcr_remote_shell_v1_api API |
83 * See @ref iface_zcr_remote_shell_v1. | 77 * See @ref iface_zcr_remote_shell_v1. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 * @section page_iface_zcr_notification_surface_v1_api API | 129 * @section page_iface_zcr_notification_surface_v1_api API |
136 * See @ref iface_zcr_notification_surface_v1. | 130 * See @ref iface_zcr_notification_surface_v1. |
137 */ | 131 */ |
138 /** | 132 /** |
139 * @defgroup iface_zcr_notification_surface_v1 The zcr_notification_surface_v1 i
nterface | 133 * @defgroup iface_zcr_notification_surface_v1 The zcr_notification_surface_v1 i
nterface |
140 * | 134 * |
141 * An interface that may be implemented by a wl_surface to host | 135 * An interface that may be implemented by a wl_surface to host |
142 * notification contents. | 136 * notification contents. |
143 */ | 137 */ |
144 extern const struct wl_interface zcr_notification_surface_v1_interface; | 138 extern const struct wl_interface zcr_notification_surface_v1_interface; |
145 /** | |
146 * @page page_iface_zwp_remote_shell_v1 zwp_remote_shell_v1 | |
147 * @section page_iface_zwp_remote_shell_v1_desc Description | |
148 * | |
149 * The global interface that allows clients to turn a wl_surface into a | |
150 * "real window" which is remotely managed but can be stacked, activated | |
151 * and made fullscreen by the user. | |
152 * @section page_iface_zwp_remote_shell_v1_api API | |
153 * See @ref iface_zwp_remote_shell_v1. | |
154 */ | |
155 /** | |
156 * @defgroup iface_zwp_remote_shell_v1 The zwp_remote_shell_v1 interface | |
157 * | |
158 * The global interface that allows clients to turn a wl_surface into a | |
159 * "real window" which is remotely managed but can be stacked, activated | |
160 * and made fullscreen by the user. | |
161 */ | |
162 extern const struct wl_interface zwp_remote_shell_v1_interface; | |
163 /** | |
164 * @page page_iface_zwp_remote_surface_v1 zwp_remote_surface_v1 | |
165 * @section page_iface_zwp_remote_surface_v1_desc Description | |
166 * | |
167 * An interface that may be implemented by a wl_surface, for | |
168 * implementations that provide a desktop-style user interface | |
169 * and allows for remotely managed windows. | |
170 * | |
171 * It provides requests to treat surfaces like windows, allowing to set | |
172 * properties like app id and geometry. | |
173 * | |
174 * The client must call wl_surface.commit on the corresponding wl_surface | |
175 * for the remote_surface state to take effect. | |
176 * | |
177 * For a surface to be mapped by the compositor the client must have | |
178 * committed both an remote_surface state and a buffer. | |
179 * @section page_iface_zwp_remote_surface_v1_api API | |
180 * See @ref iface_zwp_remote_surface_v1. | |
181 */ | |
182 /** | |
183 * @defgroup iface_zwp_remote_surface_v1 The zwp_remote_surface_v1 interface | |
184 * | |
185 * An interface that may be implemented by a wl_surface, for | |
186 * implementations that provide a desktop-style user interface | |
187 * and allows for remotely managed windows. | |
188 * | |
189 * It provides requests to treat surfaces like windows, allowing to set | |
190 * properties like app id and geometry. | |
191 * | |
192 * The client must call wl_surface.commit on the corresponding wl_surface | |
193 * for the remote_surface state to take effect. | |
194 * | |
195 * For a surface to be mapped by the compositor the client must have | |
196 * committed both an remote_surface state and a buffer. | |
197 */ | |
198 extern const struct wl_interface zwp_remote_surface_v1_interface; | |
199 /** | |
200 * @page page_iface_zwp_notification_surface_v1 zwp_notification_surface_v1 | |
201 * @section page_iface_zwp_notification_surface_v1_desc Description | |
202 * | |
203 * An interface that may be implemented by a wl_surface to host | |
204 * notification contents. | |
205 * @section page_iface_zwp_notification_surface_v1_api API | |
206 * See @ref iface_zwp_notification_surface_v1. | |
207 */ | |
208 /** | |
209 * @defgroup iface_zwp_notification_surface_v1 The zwp_notification_surface_v1 i
nterface | |
210 * | |
211 * An interface that may be implemented by a wl_surface to host | |
212 * notification contents. | |
213 */ | |
214 extern const struct wl_interface zwp_notification_surface_v1_interface; | |
215 | 139 |
216 #ifndef ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM | 140 #ifndef ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM |
217 #define ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM | 141 #define ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM |
218 /** | 142 /** |
219 * @ingroup iface_zcr_remote_shell_v1 | 143 * @ingroup iface_zcr_remote_shell_v1 |
220 * containers for remote surfaces | 144 * containers for remote surfaces |
221 * | 145 * |
222 * Determine how a remote surface should be stacked relative to other | 146 * Determine how a remote surface should be stacked relative to other |
223 * shell surfaces. | 147 * shell surfaces. |
224 */ | 148 */ |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 /** | 582 /** |
659 * Destroy the notification_surface | 583 * Destroy the notification_surface |
660 * | 584 * |
661 * Unmap and destroy the notification surface. | 585 * Unmap and destroy the notification surface. |
662 */ | 586 */ |
663 void (*destroy)(struct wl_client *client, | 587 void (*destroy)(struct wl_client *client, |
664 struct wl_resource *resource); | 588 struct wl_resource *resource); |
665 }; | 589 }; |
666 | 590 |
667 | 591 |
668 #ifndef ZWP_REMOTE_SHELL_V1_CONTAINER_ENUM | |
669 #define ZWP_REMOTE_SHELL_V1_CONTAINER_ENUM | |
670 /** | |
671 * @ingroup iface_zwp_remote_shell_v1 | |
672 * containers for remote surfaces | |
673 * | |
674 * Determine how a remote surface should be stacked relative to other | |
675 * shell surfaces. | |
676 */ | |
677 enum zwp_remote_shell_v1_container { | |
678 /** | |
679 * default container | |
680 */ | |
681 ZWP_REMOTE_SHELL_V1_CONTAINER_DEFAULT = 1, | |
682 /** | |
683 * system modal container | |
684 */ | |
685 ZWP_REMOTE_SHELL_V1_CONTAINER_OVERLAY = 2, | |
686 }; | |
687 #endif /* ZWP_REMOTE_SHELL_V1_CONTAINER_ENUM */ | |
688 | |
689 #ifndef ZWP_REMOTE_SHELL_V1_STATE_TYPE_ENUM | |
690 #define ZWP_REMOTE_SHELL_V1_STATE_TYPE_ENUM | |
691 /** | |
692 * @ingroup iface_zwp_remote_shell_v1 | |
693 * state types for remote surfaces | |
694 * | |
695 * Defines common show states for shell surfaces. | |
696 */ | |
697 enum zwp_remote_shell_v1_state_type { | |
698 /** | |
699 * normal window state | |
700 */ | |
701 ZWP_REMOTE_SHELL_V1_STATE_TYPE_NORMAL = 1, | |
702 /** | |
703 * minimized window state | |
704 */ | |
705 ZWP_REMOTE_SHELL_V1_STATE_TYPE_MINIMIZED = 2, | |
706 /** | |
707 * maximized window state | |
708 */ | |
709 ZWP_REMOTE_SHELL_V1_STATE_TYPE_MAXIMIZED = 3, | |
710 /** | |
711 * fullscreen window state | |
712 */ | |
713 ZWP_REMOTE_SHELL_V1_STATE_TYPE_FULLSCREEN = 4, | |
714 /** | |
715 * pinned window state | |
716 */ | |
717 ZWP_REMOTE_SHELL_V1_STATE_TYPE_PINNED = 5, | |
718 /** | |
719 * trusted pinned window state | |
720 */ | |
721 ZWP_REMOTE_SHELL_V1_STATE_TYPE_TRUSTED_PINNED = 6, | |
722 }; | |
723 #endif /* ZWP_REMOTE_SHELL_V1_STATE_TYPE_ENUM */ | |
724 | |
725 #ifndef ZWP_REMOTE_SHELL_V1_ERROR_ENUM | |
726 #define ZWP_REMOTE_SHELL_V1_ERROR_ENUM | |
727 enum zwp_remote_shell_v1_error { | |
728 /** | |
729 * given wl_surface has another role | |
730 */ | |
731 ZWP_REMOTE_SHELL_V1_ERROR_ROLE = 0, | |
732 /** | |
733 * invalid notification id | |
734 */ | |
735 ZWP_REMOTE_SHELL_V1_ERROR_INVALID_NOTIFICATION_ID = 1, | |
736 }; | |
737 #endif /* ZWP_REMOTE_SHELL_V1_ERROR_ENUM */ | |
738 | |
739 #ifndef ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM | |
740 #define ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM | |
741 /** | |
742 * @ingroup iface_zwp_remote_shell_v1 | |
743 * the layout mode | |
744 * | |
745 * Determine how a client should layout surfaces. | |
746 */ | |
747 enum zwp_remote_shell_v1_layout_mode { | |
748 /** | |
749 * multiple windows | |
750 */ | |
751 ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED = 1, | |
752 /** | |
753 * restricted mode for tablet | |
754 */ | |
755 ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET = 2, | |
756 }; | |
757 #endif /* ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM */ | |
758 | |
759 /** | |
760 * @ingroup iface_zwp_remote_shell_v1 | |
761 * @struct zwp_remote_shell_v1_interface | |
762 */ | |
763 struct zwp_remote_shell_v1_interface { | |
764 /** | |
765 * destroy remote_shell | |
766 * | |
767 * Destroy this remote_shell object. | |
768 * | |
769 * Destroying a bound remote_shell object while there are surfaces | |
770 * still alive created by this remote_shell object instance is | |
771 * illegal and will result in a protocol error. | |
772 */ | |
773 void (*destroy)(struct wl_client *client, | |
774 struct wl_resource *resource); | |
775 /** | |
776 * create a remote shell surface from a surface | |
777 * | |
778 * This creates an remote_surface for the given surface and gives | |
779 * it the remote_surface role. A wl_surface can only be given a | |
780 * remote_surface role once. If get_remote_surface is called with a | |
781 * wl_surface that already has an active remote_surface associated | |
782 * with it, or if it had any other role, an error is raised. | |
783 * | |
784 * See the documentation of remote_surface for more details about | |
785 * what an remote_surface is and how it is used. | |
786 */ | |
787 void (*get_remote_surface)(struct wl_client *client, | |
788 struct wl_resource *resource, | |
789 uint32_t id, | |
790 struct wl_resource *surface, | |
791 uint32_t container); | |
792 /** | |
793 * create a notification surface from a surface | |
794 * | |
795 * Creates a notification_surface for the given surface, gives it | |
796 * the notification_surface role and associated it with a | |
797 * notification id. | |
798 * @since 6 | |
799 */ | |
800 void (*get_notification_surface)(struct wl_client *client, | |
801 struct wl_resource *resource, | |
802 uint32_t id, | |
803 struct wl_resource *surface, | |
804 const char *notification_id); | |
805 }; | |
806 | |
807 #define ZWP_REMOTE_SHELL_V1_CONFIGURE 0 | |
808 #define ZWP_REMOTE_SHELL_V1_ACTIVATED 1 | |
809 #define ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_CHANGED 2 | |
810 #define ZWP_REMOTE_SHELL_V1_CONFIGURATION_CHANGED 3 | |
811 | |
812 /** | |
813 * @ingroup iface_zwp_remote_shell_v1 | |
814 */ | |
815 #define ZWP_REMOTE_SHELL_V1_CONFIGURE_SINCE_VERSION 1 | |
816 /** | |
817 * @ingroup iface_zwp_remote_shell_v1 | |
818 */ | |
819 #define ZWP_REMOTE_SHELL_V1_ACTIVATED_SINCE_VERSION 1 | |
820 /** | |
821 * @ingroup iface_zwp_remote_shell_v1 | |
822 */ | |
823 #define ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_CHANGED_SINCE_VERSION 8 | |
824 /** | |
825 * @ingroup iface_zwp_remote_shell_v1 | |
826 */ | |
827 #define ZWP_REMOTE_SHELL_V1_CONFIGURATION_CHANGED_SINCE_VERSION 9 | |
828 | |
829 /** | |
830 * @ingroup iface_zwp_remote_shell_v1 | |
831 * Sends an configure event to the client owning the resource. | |
832 * @param resource_ The client's resource | |
833 */ | |
834 static inline void | |
835 zwp_remote_shell_v1_send_configure(struct wl_resource *resource_, int32_t width,
int32_t height, int32_t work_area_inset_left, int32_t work_area_inset_top, int3
2_t work_area_inset_right, int32_t work_area_inset_bottom) | |
836 { | |
837 wl_resource_post_event(resource_, ZWP_REMOTE_SHELL_V1_CONFIGURE, width,
height, work_area_inset_left, work_area_inset_top, work_area_inset_right, work_a
rea_inset_bottom); | |
838 } | |
839 | |
840 /** | |
841 * @ingroup iface_zwp_remote_shell_v1 | |
842 * Sends an activated event to the client owning the resource. | |
843 * @param resource_ The client's resource | |
844 */ | |
845 static inline void | |
846 zwp_remote_shell_v1_send_activated(struct wl_resource *resource_, struct wl_reso
urce *gained_active, struct wl_resource *lost_active) | |
847 { | |
848 wl_resource_post_event(resource_, ZWP_REMOTE_SHELL_V1_ACTIVATED, gained_
active, lost_active); | |
849 } | |
850 | |
851 /** | |
852 * @ingroup iface_zwp_remote_shell_v1 | |
853 * Sends an layout_mode_changed event to the client owning the resource. | |
854 * @param resource_ The client's resource | |
855 */ | |
856 static inline void | |
857 zwp_remote_shell_v1_send_layout_mode_changed(struct wl_resource *resource_, uint
32_t layout_mode) | |
858 { | |
859 wl_resource_post_event(resource_, ZWP_REMOTE_SHELL_V1_LAYOUT_MODE_CHANGE
D, layout_mode); | |
860 } | |
861 | |
862 /** | |
863 * @ingroup iface_zwp_remote_shell_v1 | |
864 * Sends an configuration_changed event to the client owning the resource. | |
865 * @param resource_ The client's resource | |
866 */ | |
867 static inline void | |
868 zwp_remote_shell_v1_send_configuration_changed(struct wl_resource *resource_, in
t32_t width, int32_t height, int32_t transform, wl_fixed_t scale_factor, int32_t
work_area_inset_left, int32_t work_area_inset_top, int32_t work_area_inset_righ
t, int32_t work_area_inset_bottom, uint32_t layout_mode) | |
869 { | |
870 wl_resource_post_event(resource_, ZWP_REMOTE_SHELL_V1_CONFIGURATION_CHAN
GED, width, height, transform, scale_factor, work_area_inset_left, work_area_ins
et_top, work_area_inset_right, work_area_inset_bottom, layout_mode); | |
871 } | |
872 | |
873 /** | |
874 * @ingroup iface_zwp_remote_surface_v1 | |
875 * @struct zwp_remote_surface_v1_interface | |
876 */ | |
877 struct zwp_remote_surface_v1_interface { | |
878 /** | |
879 * Destroy the remote_surface | |
880 * | |
881 * Unmap and destroy the window. The window will be effectively | |
882 * hidden from the user's point of view, and all state will be | |
883 * lost. | |
884 */ | |
885 void (*destroy)(struct wl_client *client, | |
886 struct wl_resource *resource); | |
887 /** | |
888 * set application ID | |
889 * | |
890 * Set an application identifier for the surface. | |
891 */ | |
892 void (*set_app_id)(struct wl_client *client, | |
893 struct wl_resource *resource, | |
894 const char *app_id); | |
895 /** | |
896 * set the new window geometry | |
897 * | |
898 * The window geometry of a window is its "visible bounds" from | |
899 * the user's perspective. Client-side decorations often have | |
900 * invisible portions like drop-shadows which should be ignored for | |
901 * the purposes of aligning, placing and constraining windows. | |
902 * | |
903 * The window geometry is double buffered, and will be applied at | |
904 * the time wl_surface.commit of the corresponding wl_surface is | |
905 * called. | |
906 * | |
907 * Once the window geometry of the surface is set once, it is not | |
908 * possible to unset it, and it will remain the same until | |
909 * set_window_geometry is called again, even if a new subsurface or | |
910 * buffer is attached. | |
911 * | |
912 * If never set, the value is the full bounds of the output. This | |
913 * updates dynamically on every commit. | |
914 * | |
915 * The arguments are given in the output coordinate space. | |
916 * | |
917 * The width and height must be greater than zero. | |
918 */ | |
919 void (*set_window_geometry)(struct wl_client *client, | |
920 struct wl_resource *resource, | |
921 int32_t x, | |
922 int32_t y, | |
923 int32_t width, | |
924 int32_t height); | |
925 /** | |
926 * set scale | |
927 * | |
928 * Set a scale factor that will be applied to surface and all | |
929 * descendants. | |
930 */ | |
931 void (*set_scale)(struct wl_client *client, | |
932 struct wl_resource *resource, | |
933 wl_fixed_t scale); | |
934 /** | |
935 * fullscreen | |
936 * | |
937 * Request that surface is made fullscreen. | |
938 * | |
939 * This is only a request that the window should be made | |
940 * fullscreen. The compositor may choose to ignore this request. | |
941 * The client should listen to set_fullscreen events to determine | |
942 * if the window was made fullscreen or not. | |
943 * @since 2 | |
944 */ | |
945 void (*fullscreen)(struct wl_client *client, | |
946 struct wl_resource *resource); | |
947 /** | |
948 * maximize | |
949 * | |
950 * Request that surface is maximized. The window geometry will be | |
951 * updated to whatever the compositor finds appropriate for a | |
952 * maximized window. | |
953 * | |
954 * This is only a request that the window should be maximized. The | |
955 * compositor may choose to ignore this request. The client should | |
956 * listen to set_maximized events to determine if the window was | |
957 * maximized or not. | |
958 * @since 2 | |
959 */ | |
960 void (*maximize)(struct wl_client *client, | |
961 struct wl_resource *resource); | |
962 /** | |
963 * minimize | |
964 * | |
965 * Request that surface is minimized. | |
966 * | |
967 * This is only a request that the window should be minimized. The | |
968 * compositor may choose to ignore this request. The client should | |
969 * listen to set_minimized events to determine if the window was | |
970 * minimized or not. | |
971 * @since 2 | |
972 */ | |
973 void (*minimize)(struct wl_client *client, | |
974 struct wl_resource *resource); | |
975 /** | |
976 * restore | |
977 * | |
978 * Request that surface is restored. This restores the window | |
979 * geometry to what it was before the window was minimized, | |
980 * maximized or made fullscreen. | |
981 * | |
982 * This is only a request that the window should be restored. The | |
983 * compositor may choose to ignore this request. The client should | |
984 * listen to unset_maximized, unset_minimize and unset_fullscreen | |
985 * events to determine if the window was restored or not. | |
986 * @since 2 | |
987 */ | |
988 void (*restore)(struct wl_client *client, | |
989 struct wl_resource *resource); | |
990 /** | |
991 * pin | |
992 * | |
993 * Request that surface is pinned. | |
994 * | |
995 * This is only a request that the window should be pinned. The | |
996 * compositor may choose to ignore this request. The client should | |
997 * listen to set_pinned events to determine if the window was | |
998 * pinned or not. | |
999 * @since 3 | |
1000 */ | |
1001 void (*pin)(struct wl_client *client, | |
1002 struct wl_resource *resource); | |
1003 /** | |
1004 * unpin | |
1005 * | |
1006 * Request that surface is unpinned. | |
1007 * | |
1008 * This is only a request that the window should be unpinned. The | |
1009 * compositor may choose to ignore this request. The client should | |
1010 * listen to unset_pinned events to determine if the window was | |
1011 * unpinned or not. | |
1012 * @since 3 | |
1013 */ | |
1014 void (*unpin)(struct wl_client *client, | |
1015 struct wl_resource *resource); | |
1016 /** | |
1017 * unfullscreen | |
1018 * | |
1019 * Request that surface is made unfullscreen. | |
1020 * | |
1021 * This is only a request that the window should be made | |
1022 * unfullscreen. The compositor may choose to ignore this request. | |
1023 * The client should listen to unset_fullscreen events to determine | |
1024 * if the window was made unfullscreen or not. | |
1025 * @since 3 | |
1026 */ | |
1027 void (*unfullscreen)(struct wl_client *client, | |
1028 struct wl_resource *resource); | |
1029 /** | |
1030 * set a rectangular shadow | |
1031 * | |
1032 * Request that surface needs a rectangular shadow. | |
1033 * | |
1034 * This is only a request that the surface should have a | |
1035 * rectangular shadow. The compositor may choose to ignore this | |
1036 * request. | |
1037 * | |
1038 * The arguments are given in the output coordinate space and | |
1039 * specifies the inner bounds of the shadow. | |
1040 * | |
1041 * The arguments are given in the output coordinate space. | |
1042 * Specifying zero width and height will disable the shadow. | |
1043 * @since 4 | |
1044 */ | |
1045 void (*set_rectangular_shadow)(struct wl_client *client, | |
1046 struct wl_resource *resource, | |
1047 int32_t x, | |
1048 int32_t y, | |
1049 int32_t width, | |
1050 int32_t height); | |
1051 /** | |
1052 * set surface title | |
1053 * | |
1054 * Set a short title for the surface. | |
1055 * | |
1056 * This string may be used to identify the surface in a task bar, | |
1057 * window list, or other user interface elements provided by the | |
1058 * compositor. | |
1059 * | |
1060 * The string must be encoded in UTF-8. | |
1061 * @since 5 | |
1062 */ | |
1063 void (*set_title)(struct wl_client *client, | |
1064 struct wl_resource *resource, | |
1065 const char *title); | |
1066 /** | |
1067 * set top inset for surface | |
1068 * | |
1069 * Set distance from the top of the surface to the contents. | |
1070 * | |
1071 * This distance typically represents the size of the window | |
1072 * caption. | |
1073 * @since 5 | |
1074 */ | |
1075 void (*set_top_inset)(struct wl_client *client, | |
1076 struct wl_resource *resource, | |
1077 int32_t height); | |
1078 /** | |
1079 * suggests a re-layout of remote shell input area | |
1080 * | |
1081 * Suggests a surface should become system modal. | |
1082 * @since 8 | |
1083 */ | |
1084 void (*set_system_modal)(struct wl_client *client, | |
1085 struct wl_resource *resource); | |
1086 /** | |
1087 * suggests a re-layout of remote shell input area | |
1088 * | |
1089 * Suggests a surface should become non system modal. | |
1090 * @since 8 | |
1091 */ | |
1092 void (*unset_system_modal)(struct wl_client *client, | |
1093 struct wl_resource *resource); | |
1094 /** | |
1095 * suggests the window's background opacity | |
1096 * | |
1097 * Suggests the window's background opacity when the shadow is | |
1098 * requested. | |
1099 * @since 9 | |
1100 */ | |
1101 void (*set_rectangular_shadow_background_opacity)(struct wl_client *clie
nt, | |
1102 struct wl_resource *re
source, | |
1103 wl_fixed_t opacity); | |
1104 /** | |
1105 * make the surface active | |
1106 * | |
1107 * Make the surface active and bring it to the front. | |
1108 * @param serial the serial of the user event | |
1109 * @since 10 | |
1110 */ | |
1111 void (*activate)(struct wl_client *client, | |
1112 struct wl_resource *resource, | |
1113 uint32_t serial); | |
1114 /** | |
1115 * set window mode as pinned with taking a trasted flag. | |
1116 * | |
1117 * Request that surface is pinned. | |
1118 * | |
1119 * This is only a request that the window should be pinned. The | |
1120 * compositor may choose to ignore this request. The client should | |
1121 * listen to set_pinned events to determine if the window was | |
1122 * pinned or not. If trusted flag is non-zero, the app can prevent | |
1123 * users from exiting the pinned mode. | |
1124 * @param trusted whether the app can enforce users to stay in
the pinned mode. | |
1125 * @since 11 | |
1126 */ | |
1127 void (*pin_with_trusted_flag)(struct wl_client *client, | |
1128 struct wl_resource *resource, | |
1129 int32_t trusted); | |
1130 }; | |
1131 | |
1132 #define ZWP_REMOTE_SURFACE_V1_SET_FULLSCREEN 0 | |
1133 #define ZWP_REMOTE_SURFACE_V1_UNSET_FULLSCREEN 1 | |
1134 #define ZWP_REMOTE_SURFACE_V1_CLOSE 2 | |
1135 #define ZWP_REMOTE_SURFACE_V1_SET_MAXIMIZED 3 | |
1136 #define ZWP_REMOTE_SURFACE_V1_UNSET_MAXIMIZED 4 | |
1137 #define ZWP_REMOTE_SURFACE_V1_SET_MINIMIZED 5 | |
1138 #define ZWP_REMOTE_SURFACE_V1_UNSET_MINIMIZED 6 | |
1139 #define ZWP_REMOTE_SURFACE_V1_SET_PINNED 7 | |
1140 #define ZWP_REMOTE_SURFACE_V1_UNSET_PINNED 8 | |
1141 #define ZWP_REMOTE_SURFACE_V1_STATE_TYPE_CHANGED 9 | |
1142 | |
1143 /** | |
1144 * @ingroup iface_zwp_remote_surface_v1 | |
1145 */ | |
1146 #define ZWP_REMOTE_SURFACE_V1_SET_FULLSCREEN_SINCE_VERSION 1 | |
1147 /** | |
1148 * @ingroup iface_zwp_remote_surface_v1 | |
1149 */ | |
1150 #define ZWP_REMOTE_SURFACE_V1_UNSET_FULLSCREEN_SINCE_VERSION 1 | |
1151 /** | |
1152 * @ingroup iface_zwp_remote_surface_v1 | |
1153 */ | |
1154 #define ZWP_REMOTE_SURFACE_V1_CLOSE_SINCE_VERSION 1 | |
1155 /** | |
1156 * @ingroup iface_zwp_remote_surface_v1 | |
1157 */ | |
1158 #define ZWP_REMOTE_SURFACE_V1_SET_MAXIMIZED_SINCE_VERSION 2 | |
1159 /** | |
1160 * @ingroup iface_zwp_remote_surface_v1 | |
1161 */ | |
1162 #define ZWP_REMOTE_SURFACE_V1_UNSET_MAXIMIZED_SINCE_VERSION 2 | |
1163 /** | |
1164 * @ingroup iface_zwp_remote_surface_v1 | |
1165 */ | |
1166 #define ZWP_REMOTE_SURFACE_V1_SET_MINIMIZED_SINCE_VERSION 2 | |
1167 /** | |
1168 * @ingroup iface_zwp_remote_surface_v1 | |
1169 */ | |
1170 #define ZWP_REMOTE_SURFACE_V1_UNSET_MINIMIZED_SINCE_VERSION 2 | |
1171 /** | |
1172 * @ingroup iface_zwp_remote_surface_v1 | |
1173 */ | |
1174 #define ZWP_REMOTE_SURFACE_V1_SET_PINNED_SINCE_VERSION 3 | |
1175 /** | |
1176 * @ingroup iface_zwp_remote_surface_v1 | |
1177 */ | |
1178 #define ZWP_REMOTE_SURFACE_V1_UNSET_PINNED_SINCE_VERSION 3 | |
1179 /** | |
1180 * @ingroup iface_zwp_remote_surface_v1 | |
1181 */ | |
1182 #define ZWP_REMOTE_SURFACE_V1_STATE_TYPE_CHANGED_SINCE_VERSION 7 | |
1183 | |
1184 /** | |
1185 * @ingroup iface_zwp_remote_surface_v1 | |
1186 * Sends an set_fullscreen event to the client owning the resource. | |
1187 * @param resource_ The client's resource | |
1188 */ | |
1189 static inline void | |
1190 zwp_remote_surface_v1_send_set_fullscreen(struct wl_resource *resource_) | |
1191 { | |
1192 wl_resource_post_event(resource_, ZWP_REMOTE_SURFACE_V1_SET_FULLSCREEN); | |
1193 } | |
1194 | |
1195 /** | |
1196 * @ingroup iface_zwp_remote_surface_v1 | |
1197 * Sends an unset_fullscreen event to the client owning the resource. | |
1198 * @param resource_ The client's resource | |
1199 */ | |
1200 static inline void | |
1201 zwp_remote_surface_v1_send_unset_fullscreen(struct wl_resource *resource_) | |
1202 { | |
1203 wl_resource_post_event(resource_, ZWP_REMOTE_SURFACE_V1_UNSET_FULLSCREEN
); | |
1204 } | |
1205 | |
1206 /** | |
1207 * @ingroup iface_zwp_remote_surface_v1 | |
1208 * Sends an close event to the client owning the resource. | |
1209 * @param resource_ The client's resource | |
1210 */ | |
1211 static inline void | |
1212 zwp_remote_surface_v1_send_close(struct wl_resource *resource_) | |
1213 { | |
1214 wl_resource_post_event(resource_, ZWP_REMOTE_SURFACE_V1_CLOSE); | |
1215 } | |
1216 | |
1217 /** | |
1218 * @ingroup iface_zwp_remote_surface_v1 | |
1219 * Sends an set_maximized event to the client owning the resource. | |
1220 * @param resource_ The client's resource | |
1221 */ | |
1222 static inline void | |
1223 zwp_remote_surface_v1_send_set_maximized(struct wl_resource *resource_) | |
1224 { | |
1225 wl_resource_post_event(resource_, ZWP_REMOTE_SURFACE_V1_SET_MAXIMIZED); | |
1226 } | |
1227 | |
1228 /** | |
1229 * @ingroup iface_zwp_remote_surface_v1 | |
1230 * Sends an unset_maximized event to the client owning the resource. | |
1231 * @param resource_ The client's resource | |
1232 */ | |
1233 static inline void | |
1234 zwp_remote_surface_v1_send_unset_maximized(struct wl_resource *resource_) | |
1235 { | |
1236 wl_resource_post_event(resource_, ZWP_REMOTE_SURFACE_V1_UNSET_MAXIMIZED)
; | |
1237 } | |
1238 | |
1239 /** | |
1240 * @ingroup iface_zwp_remote_surface_v1 | |
1241 * Sends an set_minimized event to the client owning the resource. | |
1242 * @param resource_ The client's resource | |
1243 */ | |
1244 static inline void | |
1245 zwp_remote_surface_v1_send_set_minimized(struct wl_resource *resource_) | |
1246 { | |
1247 wl_resource_post_event(resource_, ZWP_REMOTE_SURFACE_V1_SET_MINIMIZED); | |
1248 } | |
1249 | |
1250 /** | |
1251 * @ingroup iface_zwp_remote_surface_v1 | |
1252 * Sends an unset_minimized event to the client owning the resource. | |
1253 * @param resource_ The client's resource | |
1254 */ | |
1255 static inline void | |
1256 zwp_remote_surface_v1_send_unset_minimized(struct wl_resource *resource_) | |
1257 { | |
1258 wl_resource_post_event(resource_, ZWP_REMOTE_SURFACE_V1_UNSET_MINIMIZED)
; | |
1259 } | |
1260 | |
1261 /** | |
1262 * @ingroup iface_zwp_remote_surface_v1 | |
1263 * Sends an set_pinned event to the client owning the resource. | |
1264 * @param resource_ The client's resource | |
1265 */ | |
1266 static inline void | |
1267 zwp_remote_surface_v1_send_set_pinned(struct wl_resource *resource_) | |
1268 { | |
1269 wl_resource_post_event(resource_, ZWP_REMOTE_SURFACE_V1_SET_PINNED); | |
1270 } | |
1271 | |
1272 /** | |
1273 * @ingroup iface_zwp_remote_surface_v1 | |
1274 * Sends an unset_pinned event to the client owning the resource. | |
1275 * @param resource_ The client's resource | |
1276 */ | |
1277 static inline void | |
1278 zwp_remote_surface_v1_send_unset_pinned(struct wl_resource *resource_) | |
1279 { | |
1280 wl_resource_post_event(resource_, ZWP_REMOTE_SURFACE_V1_UNSET_PINNED); | |
1281 } | |
1282 | |
1283 /** | |
1284 * @ingroup iface_zwp_remote_surface_v1 | |
1285 * Sends an state_type_changed event to the client owning the resource. | |
1286 * @param resource_ The client's resource | |
1287 */ | |
1288 static inline void | |
1289 zwp_remote_surface_v1_send_state_type_changed(struct wl_resource *resource_, uin
t32_t state_type) | |
1290 { | |
1291 wl_resource_post_event(resource_, ZWP_REMOTE_SURFACE_V1_STATE_TYPE_CHANG
ED, state_type); | |
1292 } | |
1293 | |
1294 /** | |
1295 * @ingroup iface_zwp_notification_surface_v1 | |
1296 * @struct zwp_notification_surface_v1_interface | |
1297 */ | |
1298 struct zwp_notification_surface_v1_interface { | |
1299 /** | |
1300 * Destroy the notification_surface | |
1301 * | |
1302 * Unmap and destroy the notification surface. | |
1303 */ | |
1304 void (*destroy)(struct wl_client *client, | |
1305 struct wl_resource *resource); | |
1306 }; | |
1307 | |
1308 | |
1309 #ifdef __cplusplus | 592 #ifdef __cplusplus |
1310 } | 593 } |
1311 #endif | 594 #endif |
1312 | 595 |
1313 #endif | 596 #endif |
OLD | NEW |