aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-05-30 00:43:07 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-05-30 00:43:21 +0200
commit769cd86117adeb23adc6861d00bd7b2361e503ad (patch)
tree582fc964cc61b5067c892958b8f5cf6a2a4cf5da /src
parent1e953244c00b01b33e6ad2f090118fc30f150cba (diff)
downloadcherry-769cd86117adeb23adc6861d00bd7b2361e503ad.tar.gz
cherry-769cd86117adeb23adc6861d00bd7b2361e503ad.zip
Add cherry_window_get_position() function
Diffstat (limited to 'src')
-rw-r--r--src/window.c7
-rw-r--r--src/window.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c
index eaee6c0..150d8ef 100644
--- a/src/window.c
+++ b/src/window.c
@@ -151,6 +151,12 @@ cherry_window_set_dimension(CherryWindow *window, int width, int height)
}
}
+cherry_window_get_position(CherryWindow *window, int *x, int *y)
+{
+ CherryWidget *widget = (CherryWidget *) window;
+ cherry_widget_get_position(widget, x, y);
+}
+
void
cherry_window_set_position(CherryWindow *w, int x, int y)
{
@@ -164,7 +170,6 @@ cherry_window_set_position(CherryWindow *w, int x, int y)
}
void
-cherry_window_set_visible(CherryWindow *w, int visible)
cherry_window_set_visible(CherryWindow *window, int visible)
{
CherryApplication *app = cherry_application_get_running_app();
diff --git a/src/window.h b/src/window.h
index b7a3081..2e1cd41 100644
--- a/src/window.h
+++ b/src/window.h
@@ -24,6 +24,7 @@ char *cherry_window_get_title(CherryWindow *);
void cherry_window_set_title(CherryWindow *, char *);
void cherry_window_get_dimension(CherryWindow *, int *, int *);
void cherry_window_set_dimension(CherryWindow *, int, int);
+void cherry_window_get_position(CherryWindow *, int *, int *);
void cherry_window_set_position(CherryWindow *, int, int);
void cherry_window_set_visible(CherryWindow *, int);
void cherry_window_set_listener(CherryWindow *, int (*listener)(struct CherryWindow *, CherryEvent));