Function in ldk_os.h

ldk_os_window_buffers_swap

Present a window by swapping its graphics buffers.

LDK_API void ldk_os_window_buffers_swap(LDKWindow window);

Parameters

LDKWindow window
Native window handle.
Function in ldk_os.h

ldk_os_window_client_area_size_get

Get the OS window client area size.

LDK_API LDKSize ldk_os_window_client_area_size_get(LDKWindow window);

Parameters

LDKWindow window
Native window handle.

Returns

The resulting size.

Function in ldk_os.h

ldk_os_window_client_area_size_set

Set the OS window client area size.

LDK_API void ldk_os_window_client_area_size_set(
 LDKWindow window,
 int width,
 int height
);

Parameters

LDKWindow window
Native window handle.
int width
Width in pixels or the units expected by the API.
int height
Height in pixels or the units expected by the API.
Function in ldk_os.h

ldk_os_window_create

Create the OS window.

LDK_API LDKWindow ldk_os_window_create(
 const char *title,
 i32 width,
 i32 height
);

Parameters

const char *title
Title shown by the window or dialog.
i32 width
Width in pixels or the units expected by the API.
i32 height
Height in pixels or the units expected by the API.

Returns

Handle to the requested object or resource.

Function in ldk_os.h

ldk_os_window_create_with_flags

Create a platform window with explicit window flags.

LDK_API LDKWindow ldk_os_window_create_with_flags(
 const char *title,
 i32 width,
 i32 height,
 LDKWindowFlags flags
);

Parameters

const char *title
Title shown by the window or dialog.
i32 width
Width in pixels or the units expected by the API.
i32 height
Height in pixels or the units expected by the API.
LDKWindowFlags flags
Bitmask of options controlling this operation.

Returns

Handle to the requested object or resource.

Function in ldk_os.h

ldk_os_window_destroy

Destroy the OS window.

LDK_API void ldk_os_window_destroy(LDKWindow window);

Parameters

LDKWindow window
Native window handle.
Function in ldk_os.h

ldk_os_window_draggable_area_set

If a window was created with LDK_WINDOW_FLAG_NOTITLEBAR, this function sets the area where the mouse cursor can drag to mode the window. The default value is the whole window. If the window does not have the LDK_WINDOW_FLAG_NOTITLEBAR flag, this function does nothing.

LDK_API void ldk_os_window_draggable_area_set(
 LDKWindow window,
 LDKRect rect
);

Parameters

LDKWindow window
Native window handle.
LDKRect rect
UI or geometry rectangle.
Function in ldk_os.h

ldk_os_window_fullscreen_get

Get the OS window fullscreen.

LDK_API bool ldk_os_window_fullscreen_get(LDKWindow window);

Parameters

LDKWindow window
Native window handle.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_os.h

ldk_os_window_fullscreen_set

Set the OS window fullscreen.

LDK_API bool ldk_os_window_fullscreen_set(
 LDKWindow window,
 bool fs
);

Parameters

LDKWindow window
Native window handle.
bool fs
Whether fullscreen mode should be enabled.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_os.h

ldk_os_window_icon_set

Set the OS window icon.

LDK_API bool ldk_os_window_icon_set(
 LDKWindow window,
 const char *iconPath
);

Parameters

LDKWindow window
Native window handle.
const char *iconPath
Path of the image used as a window icon.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_os.h

ldk_os_window_maximize

Maximizes a window

LDK_API void ldk_os_window_maximize(LDKWindow window);

Parameters

LDKWindow window
The LDK window to maximize. The window is shown if previously hidden.

Returns

void

Function in ldk_os.h

ldk_os_window_minimize

Minimizes a window

LDK_API void ldk_os_window_minimize(LDKWindow window);

Parameters

LDKWindow window
The LDK window to minimize. The window is shown if previously hidden.

Returns

void

Function in ldk_os.h

ldk_os_window_position_get

Get the OS window position.

LDK_API LDKPoint ldk_os_window_position_get(LDKWindow window);

Parameters

LDKWindow window
Native window handle.

Returns

The resulting point.

Function in ldk_os.h

ldk_os_window_position_set

Set the OS window position.

LDK_API void ldk_os_window_position_set(
 LDKWindow window,
 i32 x,
 i32 y
);

Parameters

LDKWindow window
Native window handle.
i32 x
X coordinate or component.
i32 y
Y coordinate or component.
Function in ldk_os.h

ldk_os_window_restore

Restores a minimized or maximized window

LDK_API void ldk_os_window_restore(LDKWindow window);

Parameters

LDKWindow window
The LDK window to restore. The window is shown if previously hidden.

Returns

void

Function in ldk_os.h

ldk_os_window_should_close

Check whether a native window has requested to close.

LDK_API bool ldk_os_window_should_close(LDKWindow window);

Parameters

LDKWindow window
Native window handle.

Returns

True when the queried condition holds; false otherwise.

Function in ldk_os.h

ldk_os_window_show

Show or hide a window.

LDK_API bool ldk_os_window_show(
 LDKWindow window,
 bool show
);

Parameters

LDKWindow window
The LDK window to show or hide.
bool show
true to show, false to hide the window.
Function in ldk_os.h

ldk_os_window_size_get

Get the OS window size.

LDK_API LDKSize ldk_os_window_size_get(LDKWindow window);

Parameters

LDKWindow window
Native window handle.

Returns

The resulting size.

Function in ldk_os.h

ldk_os_window_size_set

Set the OS window size.

LDK_API void ldk_os_window_size_set(
 LDKWindow window,
 i32 width,
 i32 height
);

Parameters

LDKWindow window
Native window handle.
i32 width
Width in pixels or the units expected by the API.
i32 height
Height in pixels or the units expected by the API.
Function in ldk_os.h

ldk_os_window_title_get

Copy the current native window title into a string.

LDK_API size_t ldk_os_window_title_get(
 LDKWindow window,
 XSmallstr *outTitle
);

Parameters

LDKWindow window
Native window handle.
XSmallstr *outTitle
Receives the current window title.

Returns

The resulting numeric value.

Function in ldk_os.h

ldk_os_window_title_set

Change the title shown by a native window.

LDK_API void ldk_os_window_title_set(
 LDKWindow window,
 const char *title
);

Parameters

LDKWindow window
Native window handle.
const char *title
Title shown by the window or dialog.