Window_Creation module

get_dimensions

procedure3 overloadsSource

Where the window's drawing area is on the screen and how big it is: x, y, width, height, success.

Example↗
window := create_window(800, 600, "size");
x, y, width, height, ok := get_dimensions(window, false);
assert(ok && width > 0);

This one is only checked to compile, not run.

get_dimensions :: (
    win: Window,
    right_handed: bool
) -> (x: s32, y: s32, width: s32, height: s32, success := true)

Where the window's drawing area is on the screen and how big it is: x, y, width, height, success.

Parameters

win: Window
right_handed: bool
counts y up from the bottom of the screen instead of down from the top.

Returns

x: s32
y: s32
width: s32
height: s32
success
Example↗
window := create_window(800, 600, "size");
x, y, width, height, ok := get_dimensions(window, false);
assert(ok && width > 0);

This one is only checked to compile, not run.

get_dimensions :: (
    hwnd: Windows.HWND,
    right_handed: bool
) -> (x: s32, y: s32, width: s32, height: s32, success := true)

Where the window's drawing area is on the screen and how big it is: x, y, width, height, success.

Parameters

hwnd: Windows.HWND
right_handed: bool
counts y up from the bottom of the screen instead of down from the top.

Returns

x: s32
y: s32
width: s32
height: s32
success
Example↗
window := create_window(800, 600, "size");
x, y, width, height, ok := get_dimensions(window, false);
assert(ok && width > 0);

This one is only checked to compile, not run.

get_dimensions :: (
    window: *ObjC.NSWindow,
    right_handed: bool
) -> (x: s32, y: s32, width: s32, height: s32, success := true)

Where the window's drawing area is on the screen and how big it is: x, y, width, height, success.

Parameters

window: *ObjC.NSWindow
right_handed: bool
counts y up from the bottom of the screen instead of down from the top.

Returns

x: s32
y: s32
width: s32
height: s32
success
Example↗
window := create_window(800, 600, "size");
x, y, width, height, ok := get_dimensions(window, false);
assert(ok && width > 0);

This one is only checked to compile, not run.

See also