From afb0d03fa58685ad4ae4feb609124121e61b8c27 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 4 Aug 2025 02:38:09 -0400 Subject: liboda: Add oda_movewin() Signed-off-by: Ian Moffett --- lib/liboda/include/liboda/oda.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/liboda/include') diff --git a/lib/liboda/include/liboda/oda.h b/lib/liboda/include/liboda/oda.h index 13474d5..9d96f2f 100644 --- a/lib/liboda/include/liboda/oda.h +++ b/lib/liboda/include/liboda/oda.h @@ -82,6 +82,22 @@ struct oda_wattr { odadimm_t w, h; }; +/* + * Arguments for oda_movewin() are stored + * within this structure to minimize the + * number of arguments within the function + * signature. + * + * @wp: Window to be moved + * @to_x: X position to move window to + * @to_y: Y position to move window to + */ +struct oda_movewin { + struct oda_window *wp; + odapos_t to_x; + odapos_t to_y; +}; + /* * A pixel point that can be plotted * onto a window. @@ -103,6 +119,7 @@ int oda_reqwin(struct oda_wattr *params, struct oda_window **res); int oda_termwin(struct oda_state *state, struct oda_window *win); int oda_plotwin(struct oda_state *state, const struct oda_point *point); +int oda_movewin(struct oda_state *state, struct oda_movewin *params); int oda_start_win(struct oda_state *state, struct oda_window *win); int oda_init(struct oda_state *res); -- cgit v1.2.3