![]() |
dsekai
World engine for retrocomputers.
|
Options for specifying WINDOW placement in a WINDOW. More...
Macros | |
#define | WINDOW_PLACEMENT_CENTER 0x8000 |
WINDOW::x or WINDOW::y value indicating the system should do its best to center the WINDOW onscreen. | |
#define | WINDOW_PLACEMENT_RIGHT_BOTTOM 0x2000 |
Alight the window's right side (if specified as X) or bottom side (if specified as Y) to the window's respective side. | |
#define | WINDOW_PLACEMENT_GRID_RIGHT_DOWN 0xc000 |
Place the window at the grid X or Y as relevant, and set the grid width or height respectively at the window's width or height. | |
#define | WINDOW_PLACEMENT_GRID 0x4000 |
Place the window at the grid X or Y without modifying the grid. | |
#define | WINDOW_PLACEMENT_AUTO_MASK 0xe000 |
Bitmask for WINDOW::coords fields GUI_X and GUI_Y that specifies automatic placement flags. | |
#define | WINDOW_PLACEMENT_PHYS_MASK 0x1fff |
Bitmask for WINDOW::coords fields GUI_X and GUI_Y that specifies physical placement coordinate number. Inverse of WINDOW_SIZE_AUTO_MASK. | |
#define | WINDOW_SIZE_AUTO 0x8000 |
#define | WINDOW_SIZE_AUTO_MASK (WINDOW_PLACEMENT_AUTO_MASK) |
Bitmask for WINDOW::coords fields GUI_W and GUI_H that specifies automatic sizing flags. | |
#define | WINDOW_SIZE_PHYS_MASK (WINDOW_PLACEMENT_PHYS_MASK) |
Bitmask for WINDOW::coords fields GUI_W and GUI_H that specifies physical sizing coordinate number. Inverse of WINDOW_SIZE_AUTO_MASK. | |
#define | window_screen_reset_grid() memory_zero_ptr( g_window_screen_grid, 4 * sizeof( int16_t ) ); |
#define | window_update_coords(window, x_y_w_h, coord) (window)->coords[x_y_w_h] = ((window)->coords[x_y_w_h] & WINDOW_PLACEMENT_AUTO_MASK) | (WINDOW_PLACEMENT_PHYS_MASK & (coord)); |
Set the physical coordinates of a window without corrupting attached flags. | |
#define | window_get_coords(window, x_y_w_h) (((window)->coords[x_y_w_h] & WINDOW_PLACEMENT_PHYS_MASK)) |
Get the physical coordinates of a window without flags attached. | |
Options for specifying WINDOW placement in a WINDOW.
#define window_get_coords | ( | window, | |
x_y_w_h | |||
) | (((window)->coords[x_y_w_h] & WINDOW_PLACEMENT_PHYS_MASK)) |
Get the physical coordinates of a window without flags attached.
window | Locked MEMORY_PTR to the window to reference. |
#define window_update_coords | ( | window, | |
x_y_w_h, | |||
coord | |||
) | (window)->coords[x_y_w_h] = ((window)->coords[x_y_w_h] & WINDOW_PLACEMENT_AUTO_MASK) | (WINDOW_PLACEMENT_PHYS_MASK & (coord)); |
Set the physical coordinates of a window without corrupting attached flags.
window | Locked MEMORY_PTR to the window to modify. |