Callbacks for handling platform events like focus/size changes.
More...
|
|
#define | RETROFLAT_FOCUS_FLAG_ACTIVE 0x01 |
| |
|
#define | RETROFLAT_FOCUS_FLAG_VISIBLE 0x02 |
| |
|
|
typedef MERROR_RETVAL(* | retroflat_proc_resize_t) (uint16_t new_w, uint16_t new_h, void *data) |
| |
|
typedef MERROR_RETVAL(* | retroflat_proc_focus_t) (uint8_t flags, void *data) |
| |
|
typedef MERROR_RETVAL(* | retroflat_proc_quit_t) (void *data) |
| | Callback to call when window closing is attempted. Should return MERROR_PREEMPT to defer or MERROR_OK to continue closing.
|
| |
|
| void | retroflat_set_proc_resize (retroflat_proc_resize_t on_resize_in, void *data_in) |
| | Set the procedure to call when the window is resized (on platforms that support resizing). More...
|
| |
| ssize_t | retroflat_timer_add (retroflat_ms_t time, retroflat_timer_cb_t cb, void *data) |
| | Add a timer callback to be executed at the given time. More...
|
| |
| void | retroflat_set_proc_focus (retroflat_proc_focus_t on_focus_in, void *data_in) |
| | Set the procedure to call when the window gains or loses focus (on platforms that support multitasking). More...
|
| |
| void | retroflat_set_proc_quit (retroflat_proc_quit_t on_quit_in, void *data_in) |
| | Set the procedure to call when the window is attempted to be closed (on platforms that support windows). More...
|
| |
Callbacks for handling platform events like focus/size changes.
◆ retroflat_set_proc_focus()
| void retroflat_set_proc_focus |
( |
retroflat_proc_focus_t |
on_focus_in, |
|
|
void * |
data_in |
|
) |
| |
Set the procedure to call when the window gains or loses focus (on platforms that support multitasking).
- Parameters
-
| on_focus_in | Procedure to call when window gains/loses focus. |
| data_in | Data to pass to on_focus_in. |
- Note
- If this is not set, no procedure is called when focus changes.
◆ retroflat_set_proc_quit()
Set the procedure to call when the window is attempted to be closed (on platforms that support windows).
- Parameters
-
| on_quit_in | Procedure to call when window gains/loses focus. |
| data_in | Data to pass to on_quit_in. |
- Note
- If this is not set, no procedure is called when focus changes.
◆ retroflat_set_proc_resize()
| void retroflat_set_proc_resize |
( |
retroflat_proc_resize_t |
on_resize_in, |
|
|
void * |
data_in |
|
) |
| |
Set the procedure to call when the window is resized (on platforms that support resizing).
- Parameters
-
| on_resize_in | Procedure to call when window is resized. |
| data_in | Data to pass to on_resize_in. |
- Note
- If this is not set, no procedure is called. Some platforms may stretch the "virtual" screen to fill the physical window.
◆ retroflat_timer_add()
| ssize_t retroflat_timer_add |
( |
retroflat_ms_t |
time, |
|
|
retroflat_timer_cb_t |
cb, |
|
|
void * |
data |
|
) |
| |
Add a timer callback to be executed at the given time.
- Returns
- Index of the timer or merror_sz_to_retval() if error.