Window

Categoryrefcounted
Typehime_window_t
InheritsObject

Top-level window.

Constructors

hime_window_t hime_window_create(options)

Create a new window.

Parameters

Return

hime_window_t

Methods

void hime_window_close(self)

Close the window.

Parameters

Return

void

void hime_window_set_content_view(self, view)

Set the window's content view.

Parameters

Return

void

hime_view_t hime_window_get_content_view(self)

Get the window's content view.

Parameters

Return

hime_view_t

void hime_window_activate(self)

Show and focus the window.

Parameters

Return

void

void hime_window_deactivate(self)

Deactivate the window, making the next window in the Z order the active window.

Parameters

Return

void

bool hime_window_is_active(self)

Return whether the window is the currently active window.

Parameters

Return

bool

void hime_window_set_visible(self, visible)

Set whether window is visible.

Parameters

Return

void

bool hime_window_is_visible(self)

Return whether the window is visible.

Parameters

Return

bool

void hime_window_set_fullscreen(self, fullscreen)

Enter/leave fullscreen state.

Parameters

Return

void

bool hime_window_is_fullscreen(self)

Return whether window is in fullscreen.

Parameters

Return

bool

void hime_window_maximize(self)

Maximize the window.

Parameters

Return

void

bool hime_window_is_maximized(self)

Return whether window is maximized.

Parameters

Return

bool

void hime_window_minimize(self)

Minimize the window.

Parameters

Return

void

bool hime_window_is_minimized(self)

Return whether window is minimized.

Parameters

Return

bool

void hime_window_restore(self)

Put the window into the normal state.

Parameters

Return

void

void hime_window_set_resizable(self, resizable)

Set whether window can be resized.

Parameters

Return

void

bool hime_window_is_resizable(self)

Return whether window can be resized.

Parameters

Return

bool

void hime_window_set_maximizable(self, maximizable)

Set whether window can be maximized.

Parameters

Return

void

bool hime_window_is_maximizable(self)

Return whether window can be maximized.

Parameters

Return

bool

void hime_window_set_minimizable(self, minimizable)

Set whether window can be minimized.

Parameters

Return

void

bool hime_window_is_minimizable(self)

Return whether window can be minimized.

Parameters

Return

bool

void hime_window_set_fullscreenable(self, fullscreenable)

Set whether window can enter fullscreen.

Parameters

Return

void

bool hime_window_is_fullscreenable(self)

Return whether window can enter fullscreen.

Parameters

Return

bool

void hime_window_set_bounds(self, bounds)

Resize and/or place the window to the specified bounds.

Parameters

Return

void

hime_rect_t hime_window_get_bounds(self)

Return the bounds of the window in screen coordinates.

Parameters

Return

hime_rect_t

void hime_window_set_size(self, size)

Resize the window to the specified size.

Parameters

Return

void

hime_size_t hime_window_get_size(self)

Return the restored size for the window.

Parameters

Return

hime_size_t

void hime_window_center_to(self, size)

Resize the window to the specified size and center it.

Parameters

Return

void

void hime_window_set_title(self, title)

Set window title.

Parameters

Return

void

const char16_t* hime_window_get_title(self)

Return window title.

Parameters

Return

const char16_t*

void hime_window_set_opacity(self, opacity)

Set the opacity of the window.

This may allow windows behind the window in the Z-order to become visible, depending on the capabilities of the underlying windowing system.

Parameters

Return

void

void hime_window_set_aspect_ratio(self, aspect_ratio)

Set the aspect ratio of the window's client view, which will be maintained during interactive resizing.

Note that for windows that have a client view that is framed by custom-drawn borders / window frame / etc, the window size will be chosen so that the aspect ratio of client view, not the entire window, will be aspect_ratio.

Once set, some platforms ensure the content will only size to integer multiples of aspect_ratio.

Parameters

Return

void

void hime_window_flash_frame(self, flash) win

Flashes the frame of the window to draw attention to it.

Parameters

Return

void

Events

void hime_window_on_close(window)

Emitted when window is closed.

Parameters

Preventable

No.

void hime_window_on_visibility_change(window, visible)

Emitted when window's visibility has been changed.

Parameters

Preventable

No.

void hime_window_on_activation_change(window, active)

Emitted when window is focused or blurred.

Parameters

Preventable

No.

void hime_window_on_bounds_change(window, new_bounds)

Emitted when window has been moved or resized.

Parameters

Preventable

No.