Module: ui.backend.platform
Source: ./ui/backend/platform.reef
Overview
ui/backend/platform.reef - Platform abstraction for windowing systems Part of reef-stdlib UI module
This module defines the platform abstraction that all windowing backends implement. It provides common types and interfaces for window management, event handling, and system integration.
Types
Cursor (enum)
Variants:
DefaultArrowIBeamCrosshairHandResizeNSResizeEWResizeNWSEResizeNESWMoveNotAllowedWaitHidden
PlatformWindowConfig
Fields:
| Name | Type |
|---|---|
title |
string |
width |
int |
height |
int |
x |
int |
y |
int |
resizable |
bool |
decorated |
bool |
transparent |
bool |
always_on_top |
bool |
fullscreen |
bool |
PlatformEventKind (enum)
Variants:
NoneQuitWindowMouseKeyFocus
PlatformEvent
Fields:
| Name | Type |
|---|---|
kind |
PlatformEventKind |
window_id |
int |
window_event |
event.WindowEvent |
mouse_event |
event.MouseEvent |
key_event |
event.KeyEvent |
focus_event |
event.FocusEvent |
PlatformCapabilities
Fields:
| Name | Type |
|---|---|
name |
string |
supports_transparency |
bool |
supports_multiple_windows |
bool |
supports_clipboard |
bool |
supports_drag_drop |
bool |
supports_cursor_shapes |
bool |
supports_high_dpi |
bool |
WindowHandle
Fields:
| Name | Type |
|---|---|
ptr |
pointer |
Functions
fn cursor_default(): Cursor
fn cursor_arrow(): Cursor
fn cursor_ibeam(): Cursor
fn cursor_crosshair(): Cursor
fn cursor_hand(): Cursor
fn cursor_resize_ns(): Cursor
fn cursor_resize_ew(): Cursor
fn cursor_resize_nwse(): Cursor
fn cursor_resize_nesw(): Cursor
fn cursor_move(): Cursor
fn cursor_not_allowed(): Cursor
fn cursor_wait(): Cursor
fn cursor_hidden(): Cursor
fn is_cursor_default(c: Cursor): bool
fn cursor_name(c: Cursor): string
fn platform_window_config(title: string, width: int, height: int): PlatformWindowConfig
fn platform_window_config_full(title: string, width: int, height: int, x: int, y: int, resizable: bool, decorated: bool, transparent: bool, always_on_top: bool, fullscreen: bool): PlatformWindowConfig
fn default_mouse_event(): event.MouseEvent
Helper to create default mouse event
fn default_key_event(): event.KeyEvent
Helper to create default key event
fn platform_event_none(): PlatformEvent
fn platform_event_quit(): PlatformEvent
fn platform_event_window_resize(window_id: int, width: int, height: int): PlatformEvent
fn platform_event_window_close(window_id: int): PlatformEvent
fn platform_event_window_expose(window_id: int): PlatformEvent
fn platform_event_mouse(window_id: int, me: event.MouseEvent): PlatformEvent
fn platform_event_key(window_id: int, ke: event.KeyEvent): PlatformEvent
fn platform_event_focus(window_id: int, fe: event.FocusEvent): PlatformEvent
fn pe_is_none(e: PlatformEvent): bool
fn pe_is_quit(e: PlatformEvent): bool
fn platform_capabilities(name: string, supports_transparency: bool, supports_multiple_windows: bool, supports_clipboard: bool, supports_drag_drop: bool, supports_cursor_shapes: bool, supports_high_dpi: bool): PlatformCapabilities
fn window_handle_null(): WindowHandle
fn window_handle_from_pointer(p: pointer): WindowHandle
fn window_handle_is_null(h: WindowHandle): bool
Generated by reefc doc