diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp index 7e4bb831770..1dc16f7e1c9 100644 --- a/platform/haiku/os_haiku.cpp +++ b/platform/haiku/os_haiku.cpp @@ -185,7 +185,18 @@ void OS_Haiku::set_window_title(const String& p_title) { } Size2 OS_Haiku::get_window_size() const { - ERR_PRINT("get_window_size() NOT IMPLEMENTED"); + BSize size = window->Size(); + return Size2i(size.IntegerWidth(), size.IntegerHeight()); +} + +Point2 OS_Haiku::get_window_position() const { + BPoint point(0, 0); + window->ConvertToScreen(&point); + return Point2i(point.x, point.y); +} + +void OS_Haiku::set_window_position(const Point2& p_position) { + window->MoveTo(p_position.x, p_position.y); } void OS_Haiku::set_video_mode(const VideoMode& p_video_mode, int p_screen) { diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h index b741ae7da03..59f47fa11f0 100644 --- a/platform/haiku/os_haiku.h +++ b/platform/haiku/os_haiku.h @@ -71,6 +71,8 @@ public: virtual void set_window_title(const String& p_title); virtual Size2 get_window_size() const; + virtual Point2 get_window_position() const; + virtual void set_window_position(const Point2& p_position); virtual void set_video_mode(const VideoMode& p_video_mode, int p_screen=0); virtual VideoMode get_video_mode(int p_screen=0) const;