#include "list.h"#include "theme.h"#include "control_template.h"#include "font.h"#include <stdbool.h>#include <mcp/syscalls.h>#include "a2560k.h"#include "general.h"#include "text.h"#include "bitmap.h"#include "window.h"Go to the source code of this file.
Data Structures | |
| struct | System |
Functions | |
| System * | Sys_New (void) |
| Allocate a System object. | |
| bool | Sys_Destroy (System **the_system) |
| void | Sys_Exit (System **the_system, bool error_condition) |
| Exit to MCP Destroys the system on the way out. More... | |
| bool | Sys_InitSystem (System *the_system) |
| Initialize the system (primary entry point for all system initialization activity) Starts up the memory manager, creates the global system object, runs autoconfigure to check the system hardware, loads system and application fonts, allocates a bitmap for the screen. | |
| bool | Sys_SetVideoMode (Screen *the_screen, screen_resolution new_mode) |
| Change video mode to the one passed. More... | |
| bool | Sys_SetModeText (System *the_system, bool as_overlay) |
| Switch machine into text mode. More... | |
| bool | Sys_SetGraphicMode (System *the_system, bool enable_sprites, bool enable_bitmaps, bool enable_tiles, bool enable_text_overlay, bool enable_text) |
| Switch machine into graphics mode, text mode, sprite mode, etc. More... | |
| bool | Sys_EnableTextModeCursor (System *the_system, Screen *the_screen, bool enable_it) |
| Enable or disable the hardware cursor in text mode, for the specified screen. More... | |
| bool | Sys_SetBorderSize (System *the_system, Screen *the_screen, uint8_t border_width, uint8_t border_height) |
| Set the left/right and top/bottom borders This will reset the visible text columns as a side effect Grotesquely large values will be accepted as is! More... | |
| bool | Sys_AddToWindowList (System *the_system, Window *the_new_window) |
| Add this window to the list of windows and make it the currently active window. More... | |
| bool | Sys_CreateBackdropWindow (System *the_system) |
| Window * | Sys_GetActiveWindow (System *the_system) |
| Window * | Sys_GetBackdropWindow (System *the_system) |
| Window * | Sys_GetNextWindow (System *the_system) |
| Window * | Sys_GetPreviousWindow (System *the_system) |
| Window * | Sys_GetWindowAtXY (System *the_system, int16_t x, int16_t y) |
| bool | Sys_SetActiveWindow (System *the_system, Window *the_window) |
| Set the passed window to the active window, and marks the previously active window as inactive NOTE: This will resort the list of windows to move the (new) active one to the front NOTE: The exception to this is that the backdrop window is never moved in front of other windows. More... | |
| void | Sys_IssueDamageRects (System *the_system) |
| Issue damage rects from the Active Window down to each other window in the system so that they can redraw portions of themselves Note: does not call for system re-render. | |
| void | Sys_IssueMenuDamageRects (System *the_system) |
| Issue damage rects from the menu down to every other window in the system so that they can redraw portions of themselves when menu closes Note: does not call for system re-render. | |
| void | Sys_CollectDamageRects (System *the_system, Window *the_future_active_window) |
| Collect damage rects for a window that is about to be made the active (foremost) window, so it can redraw portions of itself that may have been covered up by other windows Note: does not call for system re-render. | |
| Font * | Sys_GetSystemFont (System *the_system) |
| Font * | Sys_GetAppFont (System *the_system) |
| Screen * | Sys_GetScreen (System *the_system, int16_t channel_id) |
| Menu * | Sys_GetMenu (System *the_system) |
| Theme * | Sys_GetTheme (System *the_system) |
| Bitmap * | Sys_GetScreenBitmap (System *the_system, bitmap_layer the_layer) |
| NOTE: Foenix systems only have 1 screen with bitmap graphics, even if the system has 2 screens overall. More... | |
| EventManager * | Sys_GetEventManager (System *the_system) |
| void | Sys_SetSystemFont (System *the_system, Font *the_font) |
| void | Sys_SetAppFont (System *the_system, Font *the_font) |
| void | Sys_SetScreen (System *the_system, int16_t channel_id, Screen *the_screen) |
| void | Sys_SetScreenBitmap (System *the_system, Bitmap *the_bitmap, bitmap_layer the_layer) |
| NOTE: Foenix systems only have 1 screen with bitmap graphics, even if the system has 2 screens overall. More... | |
| bool | Sys_SetTheme (System *the_system, Theme *the_theme) |
| Set the passed theme as the System's current theme Note: this will dispose of the current theme after setting the new one. More... | |
| bool | Sys_SetVRAMAddr (System *the_system, uint8_t the_bitmap_layer, unsigned char *the_address) |
| Tell the VICKY to use a different address for the specified bitmap layer. More... | |
| void | Sys_Render (System *the_system) |
| Render all visible windows NOTE: this will move to a private Sys function later, once event handling is available. More... | |
Add this window to the list of windows and make it the currently active window.
| the_system | – valid pointer to system object |
| bool Sys_CreateBackdropWindow | ( | System * | the_system | ) |
| the_system | – valid pointer to system object |
| bool Sys_Destroy | ( | System ** | the_system | ) |
| the_system | – valid pointer to system object |
Enable or disable the hardware cursor in text mode, for the specified screen.
| the_system | – valid pointer to system object |
| the_screen | – valid pointer to the target screen to operate on |
| enable_it | – If true, turns the hardware blinking cursor on. If false, hides the hardware cursor; |
| void Sys_Exit | ( | System ** | the_system, |
| bool | error_condition | ||
| ) |
Exit to MCP Destroys the system on the way out.
| the_system | – valid pointer to system object |
| error_condition | – true if error, false if a normal exit. Use PARAM_EXIT_ON_ERROR/PARAM_EXIT_NO_ERROR |
| the_system | – valid pointer to system object |
| the_system | – valid pointer to system object |
| EventManager * Sys_GetEventManager | ( | System * | the_system | ) |
| the_system | – valid pointer to system object |
| the_system | – valid pointer to system object |
| the_system | – valid pointer to system object |
| the_system | – valid pointer to system object |
NOTE: Foenix systems only have 1 screen with bitmap graphics, even if the system has 2 screens overall.
The bitmap returned will always be from the appropriate channel (A or B).
| the_system | – valid pointer to system object |
| the_system | – valid pointer to system object |
| the_system | – valid pointer to system object |
| x | – global horizontal coordinate |
| y | – global vertical coordinate |
| void Sys_Render | ( | System * | the_system | ) |
Render all visible windows NOTE: this will move to a private Sys function later, once event handling is available.
| the_system | – valid pointer to system object |
Set the passed window to the active window, and marks the previously active window as inactive NOTE: This will resort the list of windows to move the (new) active one to the front NOTE: The exception to this is that the backdrop window is never moved in front of other windows.
| the_system | – valid pointer to system object |
| the_system | – valid pointer to system object |
| bool Sys_SetBorderSize | ( | System * | the_system, |
| Screen * | the_screen, | ||
| uint8_t | border_width, | ||
| uint8_t | border_height | ||
| ) |
Set the left/right and top/bottom borders This will reset the visible text columns as a side effect Grotesquely large values will be accepted as is!
| border_width | – width in pixels of the border on left and right side of the screen. Total border used with be the double of this. |
| border_height | – height in pixels of the border on top and bottom of the screen. Total border used with be the double of this. |
| bool Sys_SetGraphicMode | ( | System * | the_system, |
| bool | enable_sprites, | ||
| bool | enable_bitmaps, | ||
| bool | enable_tiles, | ||
| bool | enable_text_overlay, | ||
| bool | enable_text | ||
| ) |
Switch machine into graphics mode, text mode, sprite mode, etc.
| the_system | – valid pointer to system object Use PARAM_SPRITES_ON/OFF, PARAM_BITMAP_ON/OFF, PARAM_TILES_ON/OFF, PARAM_TEXT_OVERLAY_ON/OFF, PARAM_TEXT_ON/OFF |
| bool Sys_SetModeText | ( | System * | the_system, |
| bool | as_overlay | ||
| ) |
Switch machine into text mode.
| the_system | – valid pointer to system object |
| as_overlay | – If true, sets text overlay mode (text over graphics). If false, sets full text mode (no graphics); |
| the_system | – valid pointer to system object |
NOTE: Foenix systems only have 1 screen with bitmap graphics, even if the system has 2 screens overall.
The bitmap returned will always be from the appropriate channel (A or B).
| the_system | – valid pointer to system object |
| the_system | – valid pointer to system object |
Set the passed theme as the System's current theme Note: this will dispose of the current theme after setting the new one.
| the_system | – valid pointer to system object |
| bool Sys_SetVideoMode | ( | Screen * | the_screen, |
| screen_resolution | new_mode | ||
| ) |
Change video mode to the one passed.
| the_screen | – valid pointer to the target screen to operate on |
| new_mode | – One of the enumerated screen_resolution values. Must correspond to a valid VICKY video mode for the host machine. See VICKY_IIIA_RES_800X600_FLAGS, etc. defined in a2560_platform.h |
| bool Sys_SetVRAMAddr | ( | System * | the_system, |
| uint8_t | the_bitmap_layer, | ||
| unsigned char * | the_address | ||
| ) |
Tell the VICKY to use a different address for the specified bitmap layer.
| the_system | – valid pointer to system object |
| the_bitmap_layer | – 0 or 1, the bitmap layer to get a new address |
| the_address | – The address within the VRAM zone that the bitmap layer should be repointed to |