File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1616[x] void SetWindowMonitor(int monitor)
1717[x] void SetWindowMinSize(int width, int height)
1818[x] void SetWindowSize(int width, int height)
19+ [x] Vector2 GetWindowPosition()
1920[x] void *GetWindowHandle(void)
2021[x] int GetScreenWidth(void)
2122[x] int GetScreenHeight(void)
Original file line number Diff line number Diff line change @@ -246,6 +246,13 @@ static Janet cfun_GetMonitorPhysicalHeight(int32_t argc, Janet *argv) {
246246 return janet_wrap_integer (GetMonitorPhysicalHeight (monitor ));
247247}
248248
249+ static Janet cfun_GetWindowPosition (int32_t argc , Janet * argv ) {
250+ (void ) argv ;
251+ janet_fixarity (argc , 0 );
252+ Vector2 position = GetWindowPosition ();
253+ return jaylib_wrap_vec2 (position );
254+ }
255+
249256static Janet cfun_GetWindowScaleDPI (int32_t argc , Janet * argv ) {
250257 (void ) argv ;
251258 janet_fixarity (argc , 0 );
@@ -1023,6 +1030,10 @@ static JanetReg core_cfuns[] = {
10231030 {"get-monitor-physical-height" , cfun_GetMonitorPhysicalHeight ,
10241031 "(get-monitor-physical-height monitor)\n\n"
10251032 "Get specified monitor physical height in millimetres"
1033+ },
1034+ {"get-window-position" , cfun_GetWindowPosition ,
1035+ "(get-window-position)\n\n"
1036+ "Get the window position on screen"
10261037 },
10271038 {"get-window-scale-dpi" , cfun_GetWindowScaleDPI ,
10281039 "(get-window-scale-dpi)\n\n"
You can’t perform that action at this time.
0 commit comments