aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2022-01-08 22:52:51 +0300
committerKirill Primak <vyivel@eclair.cafe>2022-02-02 21:06:11 +0300
commitaffe0d8713a7070844ed4d7558d02785e60ffd10 (patch)
tree9390dbd9e872572657850a9109a00557645356b2 /include
parentee52c32915e20821c985c3b36498701e47c636a3 (diff)
xdg-toplevel: fix functions' main argument type
With this commit, `wlr_xdg_toplevel_*()` functions now expect a `wlr_xdg_toplevel` instead of a `wlr_xdg_surface`.
Diffstat (limited to 'include')
-rw-r--r--include/types/wlr_xdg_shell.h12
-rw-r--r--include/wlr/types/wlr_xdg_shell.h38
2 files changed, 28 insertions, 22 deletions
diff --git a/include/types/wlr_xdg_shell.h b/include/types/wlr_xdg_shell.h
index 9a34c49c..e3688a94 100644
--- a/include/types/wlr_xdg_shell.h
+++ b/include/types/wlr_xdg_shell.h
@@ -36,11 +36,11 @@ struct wlr_xdg_popup_grab *get_xdg_shell_popup_grab_from_seat(
void create_xdg_toplevel(struct wlr_xdg_surface *xdg_surface,
uint32_t id);
-void handle_xdg_surface_toplevel_committed(struct wlr_xdg_surface *surface);
-void send_xdg_toplevel_configure(struct wlr_xdg_surface *surface,
- struct wlr_xdg_surface_configure *configure);
-void handle_xdg_toplevel_ack_configure(struct wlr_xdg_surface *surface,
- struct wlr_xdg_surface_configure *configure);
-void destroy_xdg_toplevel(struct wlr_xdg_surface *surface);
+void handle_xdg_toplevel_committed(struct wlr_xdg_toplevel *toplevel);
+struct wlr_xdg_toplevel_configure *send_xdg_toplevel_configure(
+ struct wlr_xdg_toplevel *toplevel);
+void handle_xdg_toplevel_ack_configure(struct wlr_xdg_toplevel *toplevel,
+ struct wlr_xdg_toplevel_configure *configure);
+void destroy_xdg_toplevel(struct wlr_xdg_toplevel *toplevel);
#endif
diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h
index 8d1a6fce..e16d3218 100644
--- a/include/wlr/types/wlr_xdg_shell.h
+++ b/include/wlr/types/wlr_xdg_shell.h
@@ -258,7 +258,7 @@ struct wlr_xdg_toplevel_show_window_menu_event {
struct wlr_xdg_shell *wlr_xdg_shell_create(struct wl_display *display);
-/** Returns the wlr_xdg_surface from an xdg_surface resource.
+/** Get the corresponding wlr_xdg_surface from a resource.
*
* Aborts if the resource doesn't have the correct type. Returns NULL if the
* resource is inert.
@@ -267,7 +267,13 @@ struct wlr_xdg_surface *wlr_xdg_surface_from_resource(
struct wl_resource *resource);
struct wlr_xdg_surface *wlr_xdg_surface_from_popup_resource(
struct wl_resource *resource);
-struct wlr_xdg_surface *wlr_xdg_surface_from_toplevel_resource(
+
+/** Get the corresponding wlr_xdg_toplevel from a resource.
+ *
+ * Aborts if the resource doesn't have the correct type. Returns NULL if the
+ * resource is inert.
+ */
+struct wlr_xdg_toplevel *wlr_xdg_toplevel_from_resource(
struct wl_resource *resource);
/**
@@ -280,55 +286,55 @@ void wlr_xdg_surface_ping(struct wlr_xdg_surface *surface);
* Request that this toplevel surface be the given size. Returns the associated
* configure serial.
*/
-uint32_t wlr_xdg_toplevel_set_size(struct wlr_xdg_surface *surface,
+uint32_t wlr_xdg_toplevel_set_size(struct wlr_xdg_toplevel *toplevel,
uint32_t width, uint32_t height);
/**
- * Request that this toplevel surface show itself in an activated or deactivated
+ * Request that this toplevel show itself in an activated or deactivated
* state. Returns the associated configure serial.
*/
-uint32_t wlr_xdg_toplevel_set_activated(struct wlr_xdg_surface *surface,
+uint32_t wlr_xdg_toplevel_set_activated(struct wlr_xdg_toplevel *toplevel,
bool activated);
/**
- * Request that this toplevel surface consider itself maximized or not
+ * Request that this toplevel consider itself maximized or not
* maximized. Returns the associated configure serial.
*/
-uint32_t wlr_xdg_toplevel_set_maximized(struct wlr_xdg_surface *surface,
+uint32_t wlr_xdg_toplevel_set_maximized(struct wlr_xdg_toplevel *toplevel,
bool maximized);
/**
- * Request that this toplevel surface consider itself fullscreen or not
+ * Request that this toplevel consider itself fullscreen or not
* fullscreen. Returns the associated configure serial.
*/
-uint32_t wlr_xdg_toplevel_set_fullscreen(struct wlr_xdg_surface *surface,
+uint32_t wlr_xdg_toplevel_set_fullscreen(struct wlr_xdg_toplevel *toplevel,
bool fullscreen);
/**
- * Request that this toplevel surface consider itself to be resizing or not
+ * Request that this toplevel consider itself to be resizing or not
* resizing. Returns the associated configure serial.
*/
-uint32_t wlr_xdg_toplevel_set_resizing(struct wlr_xdg_surface *surface,
+uint32_t wlr_xdg_toplevel_set_resizing(struct wlr_xdg_toplevel *toplevel,
bool resizing);
/**
- * Request that this toplevel surface consider itself in a tiled layout and some
+ * Request that this toplevel consider itself in a tiled layout and some
* edges are adjacent to another part of the tiling grid. `tiled_edges` is a
* bitfield of `enum wlr_edges`. Returns the associated configure serial.
*/
-uint32_t wlr_xdg_toplevel_set_tiled(struct wlr_xdg_surface *surface,
+uint32_t wlr_xdg_toplevel_set_tiled(struct wlr_xdg_toplevel *toplevel,
uint32_t tiled_edges);
/**
* Request that this xdg toplevel closes.
*/
-void wlr_xdg_toplevel_send_close(struct wlr_xdg_surface *surface);
+void wlr_xdg_toplevel_send_close(struct wlr_xdg_toplevel *toplevel);
/**
* Sets the parent of this toplevel. Parent can be NULL.
*/
-void wlr_xdg_toplevel_set_parent(struct wlr_xdg_surface *surface,
- struct wlr_xdg_surface *parent);
+void wlr_xdg_toplevel_set_parent(struct wlr_xdg_toplevel *toplevel,
+ struct wlr_xdg_toplevel *parent);
/**
* Request that this xdg popup closes.