Window_Creation module

toggle_fullscreen

procedure3 overloadsSource

Switches the window between full screen and its normal size. Returns whether it worked and the new size.

Example↗
window := create_window(800, 600, "full screen");
saved: Saved_Window_Info;
ok, width, height := toggle_fullscreen(window, true, *saved);
toggle_fullscreen(window, false, *saved);

This one is only checked to compile, not run.

toggle_fullscreen :: (
    win: Window,
    desire_fullscreen: bool,
    saved: *Saved_Window_Info
) -> (success: bool, width: s32, height: s32)

Switches the window between full screen and its normal size. Returns whether it worked and the new size.

Parameters

win: Window
desire_fullscreen: bool
true to go full screen, false to go back.
saved: *Saved_Window_Info
where the old position and size are kept while full screen, to restore them on the way back.

Returns

success: bool
width: s32
height: s32
Example↗
window := create_window(800, 600, "full screen");
saved: Saved_Window_Info;
ok, width, height := toggle_fullscreen(window, true, *saved);
toggle_fullscreen(window, false, *saved);

This one is only checked to compile, not run.

toggle_fullscreen :: (
    hwnd: Windows.HWND,
    desire_fullscreen: bool,
    saved: *Saved_Window_Info
) -> (succcess: bool, width: s32, height: s32)

Parameters

hwnd: Windows.HWND
desire_fullscreen: bool

Returns

succcess: bool
width: s32
height: s32
toggle_fullscreen :: (
    win: *ObjC.NSWindow,
    desire_fullscreen: bool,
    saved: *Saved_Window_Info
) -> (success: bool, width: s32, height: s32)

Switches the window between full screen and its normal size. Returns whether it worked and the new size.

Parameters

desire_fullscreen: bool
true to go full screen, false to go back.
saved: *Saved_Window_Info
where the old position and size are kept while full screen, to restore them on the way back.

Returns

success: bool
width: s32
height: s32
Example↗
window := create_window(800, 600, "full screen");
saved: Saved_Window_Info;
ok, width, height := toggle_fullscreen(window, true, *saved);
toggle_fullscreen(window, false, *saved);

This one is only checked to compile, not run.

See also