File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 16
16
[x] void SetWindowMonitor(int monitor)
17
17
[x] void SetWindowMinSize(int width, int height)
18
18
[x] void SetWindowSize(int width, int height)
19
+ [x] Vector2 GetWindowPosition()
19
20
[x] void *GetWindowHandle(void)
20
21
[x] int GetScreenWidth(void)
21
22
[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) {
246
246
return janet_wrap_integer (GetMonitorPhysicalHeight (monitor ));
247
247
}
248
248
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
+
249
256
static Janet cfun_GetWindowScaleDPI (int32_t argc , Janet * argv ) {
250
257
(void ) argv ;
251
258
janet_fixarity (argc , 0 );
@@ -1023,6 +1030,10 @@ static JanetReg core_cfuns[] = {
1023
1030
{"get-monitor-physical-height" , cfun_GetMonitorPhysicalHeight ,
1024
1031
"(get-monitor-physical-height monitor)\n\n"
1025
1032
"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"
1026
1037
},
1027
1038
{"get-window-scale-dpi" , cfun_GetWindowScaleDPI ,
1028
1039
"(get-window-scale-dpi)\n\n"
You can’t perform that action at this time.
0 commit comments