|
MERROR_RETVAL | retrowin_redraw_win_stack (struct MDATA_VECTOR *win_stack) |
|
MERROR_RETVAL | retrowin_refresh_win_stack (struct MDATA_VECTOR *win_stack) |
| Force all windows on the stack to redraw.
|
|
retrogui_idc_t | retrowin_poll_win_stack (struct MDATA_VECTOR *win_stack, retrogui_idc_t idc_active, RETROFLAT_IN_KEY *p_input, struct RETROFLAT_INPUT *input_evt) |
|
void | retrowin_free_win (struct RETROWIN *win) |
|
ssize_t | retrowin_get_by_idc (size_t idc, struct MDATA_VECTOR *win_stack) |
|
ssize_t | retrowin_push_win (struct RETROGUI *gui, struct MDATA_VECTOR *win_stack, size_t idc, const char *font_filename, size_t x, size_t y, size_t w, size_t h, uint8_t flags) |
| Create a new window on the given win_stack.
|
|
MERROR_RETVAL | retrowin_destroy_win (struct MDATA_VECTOR *win_stack, size_t idc) |
| Destroy the given window's resources and remove it from the window stack.
|
|
struct RETROWIN* win = NULL;
struct MDATA_VECTOR win_stack;
retrowin_push_win(
NULL, / * This window should create and manage its own GUI. * /
&win_stack,
IDC_EXAMPLE_WIN, "unscii_8.hex",
/ * Center * /
(retroflat_screen_w() >> 1) - (EXAMPLE_WIN_W >> 1),
/ * Center * /
(retroflat_screen_h() >> 1) - (EXAMPLE_WIN_H >> 1),
EXAMPLE_WIN_W, EXAMPLE_WIN_H, RETROWIN_FLAG_BORDER_BLUE );
mdata_vector_lock( &win_stack );
win = mdata_vector_get_last( &win_stack, struct RETROWIN );
maug_cleanup_if_null_lock( struct RETROWIN*, win );
/ * Lock macros will automatically fail to cleanup: label if something
* goes wrong, so no error handling here!
* /
retrowin_lock_gui( win );
/ *** Pause Example to Insert Controls *** /
For inserting controls into a
RETROGUI, please see
RetroGUI Example. Use win->gui_p as the GUI to lock and push controls onto, instead of the gui_p variable in that example.
/ *** Resume Example *** /
/ * Unlock window and window stack after controls have been added. * /
retrowin_unlock_gui( win );
mdata_vector_unlock( &win_stack );