![]() |
Ultibo API
C/C++ API for Ultibo Core
|
Go to the source code of this file.
Data Structures | |
| struct | _CONSOLE_CHAR |
| struct | CONSOLE_POINT |
| struct | CONSOLE_RECT |
| struct | _CONSOLE_PROPERTIES |
| struct | _CONSOLE_DEVICE |
| struct | _CONSOLE_CARET |
| struct | _WINDOW_PROPERTIES |
| struct | _CONSOLE_WINDOW |
| struct | _CONSOLE_HISTORY |
Macros | |
| #define | CONSOLE_NAME_PREFIX "Console" |
| Name prefix for Console Devices. | |
| #define | CONSOLE_TYPE_NONE 0 |
| #define | CONSOLE_TYPE_FRAMEBUFFER 1 |
| #define | CONSOLE_TYPE_SERIAL 2 |
| #define | CONSOLE_TYPE_REMOTE 3 |
| #define | CONSOLE_TYPE_LCD 4 |
| #define | CONSOLE_TYPE_MAX 4 |
| #define | CONSOLE_STATE_CLOSED 0 |
| #define | CONSOLE_STATE_OPEN 1 |
| #define | CONSOLE_STATE_MAX 1 |
| #define | CONSOLE_FLAG_NONE 0x00000000 |
| #define | CONSOLE_FLAG_LINE_WRAP 0x00000001 |
| Wrap long lines to the next line if set. | |
| #define | CONSOLE_FLAG_DMA_BOX 0x00000002 |
| Use DMA to draw boxes (Where applicable). | |
| #define | CONSOLE_FLAG_DMA_LINE 0x00000004 |
| Use DMA to draw lines (Where applicable). | |
| #define | CONSOLE_FLAG_DMA_FILL 0x00000008 |
| Use DMA to fill blocks (Where applicable). | |
| #define | CONSOLE_FLAG_DMA_CLEAR 0x00000010 |
| Use DMA to clear blocks (Where applicable). | |
| #define | CONSOLE_FLAG_DMA_SCROLL 0x00000020 |
| Use DMA to scroll blocks (Where applicable). | |
| #define | CONSOLE_FLAG_SINGLE_WINDOW 0x00000040 |
| Console supports only one window (Not multiple). | |
| #define | CONSOLE_FLAG_HARDWARE_CURSOR 0x00000080 |
| Console supports a hardware cursor (Mouse pointer) (Character mode only). | |
| #define | CONSOLE_FLAG_HARDWARE_CARET 0x00000100 |
| Console supports a hardware caret (Text cursor). | |
| #define | CONSOLE_FLAG_BLINK_CARET 0x00000200 |
| Console supports blinking caret. | |
| #define | CONSOLE_FLAG_TEXT_MODE 0x00000400 |
| Console supports text mode settings. | |
| #define | CONSOLE_FLAG_TEXT_BLINK 0x00000800 |
| Console supports blinking text. | |
| #define | CONSOLE_FLAG_COLOR 0x00001000 |
| Console supports colors. | |
| #define | CONSOLE_FLAG_FONT 0x00002000 |
| Console supports fonts. | |
| #define | CONSOLE_FLAG_FULLSCREEN 0x00004000 |
| Console supports creating a fullscreen window. | |
| #define | CONSOLE_FLAG_AUTO_SCROLL 0x00008000 |
| Automatically scroll up on reaching the last line. | |
| #define | CONSOLE_FLAG_DMA_TEXT 0x00010000 |
| Use DMA to draw text (Where applicable). | |
| #define | CONSOLE_FLAG_COLOR_REVERSE 0x00020000 |
| Console requires colors to be reversed for underlying hardware. | |
| #define | CONSOLE_FLAG_TEXT_CARET 0x00040000 |
| Console supports a caret (Text cursor. | |
| #define | CONSOLE_FLAG_FOCUS_CARET 0x00080000 |
| Only show caret on the focused (active) window. | |
| #define | CONSOLE_FLAG_DMA_MASK CONSOLE_FLAG_DMA_BOX | CONSOLE_FLAG_DMA_LINE | CONSOLE_FLAG_DMA_FILL | CONSOLE_FLAG_DMA_CLEAR | CONSOLE_FLAG_DMA_SCROLL | CONSOLE_FLAG_DMA_TEXT |
| #define | CONSOLE_FLAG_INTERNAL CONSOLE_FLAG_SINGLE_WINDOW | CONSOLE_FLAG_HARDWARE_CURSOR | CONSOLE_FLAG_HARDWARE_CARET | CONSOLE_FLAG_BLINK_CARET | CONSOLE_FLAG_TEXT_MODE | CONSOLE_FLAG_TEXT_BLINK | CONSOLE_FLAG_COLOR | CONSOLE_FLAG_FONT | CONSOLE_FLAG_FULLSCREEN | CONSOLE_FLAG_COLOR_REVERSE | CONSOLE_FLAG_TEXT_CARET |
| #define | CONSOLE_MODE_NONE 0 |
| #define | CONSOLE_MODE_PIXEL 1 |
| #define | CONSOLE_MODE_CHARACTER 2 |
| #define | CARET_SIGNATURE 0x9A2D40E3 |
| #define | WINDOW_SIGNATURE 0xDE3A5C04 |
| #define | WINDOW_STATE_INVISIBLE 0 |
| #define | WINDOW_STATE_VISIBLE 1 |
| #define | WINDOW_STATE_MAX 1 |
| #define | WINDOW_MODE_NONE 0 |
| #define | WINDOW_MODE_TEXT 1 |
| #define | WINDOW_MODE_GRAPHICS 2 |
| #define | WINDOW_MODE_MAX 2 |
| #define | WINDOW_FLAG_NONE 0x00000000 |
| #define | WINDOW_FLAG_LINE_WRAP 0x00000001 |
| Wrap long lines to the next line if set. | |
| #define | WINDOW_FLAG_BUFFERED 0x00000002 |
| Buffer output for scroll back and redraw. | |
| #define | WINDOW_FLAG_FULLSCREEN 0x00000004 |
| Window occupies the full screen. | |
| #define | WINDOW_FLAG_AUTO_SCROLL 0x00000008 |
| Automatically scroll up on reaching the last line. | |
| #define | WINDOW_FLAG_CHARACTER 0x00000010 |
| Console for this Window is character mode only. | |
| #define | WINDOW_FLAG_AUTO_UPDATE 0x00000020 |
| Automatically update output of buffered window. | |
| #define | WINDOW_FLAG_FOCUS_CURSOR 0x00000040 |
| Only show cursor (caret) on the focused (active) window. | |
| #define | WINDOW_FLAG_INTERNAL WINDOW_FLAG_FULLSCREEN | WINDOW_FLAG_CHARACTER |
| #define | WINDOW_DRAW_FLAG_NONE 0x00000000 |
| #define | WINDOW_DRAW_FLAG_BODY 0x00000001 |
| Draw the Window body. | |
| #define | WINDOW_DRAW_FLAG_TITLE 0x00000002 |
| Draw the Window title. | |
| #define | WINDOW_DRAW_FLAG_BORDER 0x00000004 |
| Draw the Window border. | |
| #define | WINDOW_DRAW_FLAG_ALL WINDOW_DRAW_FLAG_BODY | WINDOW_DRAW_FLAG_TITLE | WINDOW_DRAW_FLAG_BORDER |
| #define | WINDOW_HISTORY_MAX_COUNT 100 |
| #define | FRAMEBUFFER_CONSOLE_DESCRIPTION "Framebuffer Console" |
| Description of the Framebuffer Console device. | |
Typedefs | |
| typedef struct _CONSOLE_CHAR | CONSOLE_CHAR |
| typedef struct _CONSOLE_PROPERTIES | CONSOLE_PROPERTIES |
| typedef struct _CONSOLE_DEVICE | CONSOLE_DEVICE |
| typedef uint32_t STDCALL(* | console_enumerate_cb) (CONSOLE_DEVICE *console, void *data) |
| typedef uint32_t STDCALL(* | console_notification_cb) (DEVICE *device, void *data, uint32_t notification) |
| typedef uint32_t STDCALL(* | console_device_open_proc) (CONSOLE_DEVICE *console) |
| typedef uint32_t STDCALL(* | console_device_close_proc) (CONSOLE_DEVICE *console) |
| typedef uint32_t STDCALL(* | console_device_clear_proc) (CONSOLE_DEVICE *console, uint32_t color) |
| typedef uint32_t STDCALL(* | console_device_scroll_proc) (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t count, uint32_t direction) |
| typedef uint32_t STDCALL(* | console_device_draw_box_proc) (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color, uint32_t width) |
| typedef uint32_t STDCALL(* | console_device_draw_line_proc) (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color, uint32_t width) |
| typedef uint32_t STDCALL(* | console_device_plot_line_proc) (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color, uint32_t width) |
| typedef uint32_t STDCALL(* | console_device_draw_char_proc) (CONSOLE_DEVICE *console, FONT_HANDLE handle, char ch, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor) |
| typedef uint32_t STDCALL(* | console_device_draw_text_proc) (CONSOLE_DEVICE *console, FONT_HANDLE handle, const char *text, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor, uint32_t len) |
| typedef uint32_t STDCALL(* | console_device_draw_pixel_proc) (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, uint32_t color) |
| typedef uint32_t STDCALL(* | console_device_draw_block_proc) (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color) |
| typedef uint32_t STDCALL(* | console_device_draw_circle_proc) (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, uint32_t color, uint32_t width, uint32_t radius) |
| typedef uint32_t STDCALL(* | console_device_draw_image_proc) (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, void *buffer, uint32_t width, uint32_t height, uint32_t format, uint32_t skip) |
| typedef uint32_t STDCALL(* | console_device_draw_window_proc) (CONSOLE_DEVICE *console, WINDOW_HANDLE handle, uint32_t flags) |
| typedef uint32_t STDCALL(* | console_device_get_pixel_proc) (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, uint32_t *color) |
| typedef uint32_t STDCALL(* | console_device_get_image_proc) (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, void *buffer, uint32_t width, uint32_t height, uint32_t format, uint32_t skip) |
| typedef uint32_t STDCALL(* | console_device_put_text_proc) (CONSOLE_DEVICE *console, FONT_HANDLE handle, CONSOLE_POINT *source, CONSOLE_POINT *dest, CONSOLE_CHAR *buffer, uint32_t width, uint32_t height, uint32_t skip) |
| typedef uint32_t STDCALL(* | console_device_copy_image_proc) (CONSOLE_DEVICE *console, CONSOLE_POINT *source, CONSOLE_POINT *dest, uint32_t width, uint32_t height) |
| typedef HANDLE STDCALL(* | console_device_add_caret_proc) (CONSOLE_DEVICE *console, uint32_t width, uint32_t height, uint32_t offsetx, uint32_t offsety) |
| typedef uint32_t STDCALL(* | console_device_delete_caret_proc) (CONSOLE_DEVICE *console, HANDLE handle) |
| typedef uint32_t STDCALL(* | console_device_update_caret_proc) (CONSOLE_DEVICE *console, HANDLE handle, uint32_t x, uint32_t y, BOOL visible, BOOL blink) |
| typedef uint32_t STDCALL(* | console_device_update_caret_ex_proc) (CONSOLE_DEVICE *console, HANDLE handle, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor, BOOL visible, BOOL blink, BOOL reverse) |
| typedef uint32_t STDCALL(* | console_device_set_cursor_proc) (CONSOLE_DEVICE *console, uint32_t width, uint32_t height, char *chars) |
| typedef uint32_t STDCALL(* | console_device_update_cursor_proc) (CONSOLE_DEVICE *console, BOOL enabled, int32_t x, int32_t y, BOOL relative) |
| typedef uint32_t STDCALL(* | console_device_get_position_proc) (CONSOLE_DEVICE *console, uint32_t position, uint32_t *x1, uint32_t *y1, uint32_t *x2, uint32_t *y2) |
| typedef uint32_t STDCALL(* | console_device_get_properties_proc) (CONSOLE_DEVICE *console, CONSOLE_PROPERTIES *properties) |
| typedef struct _CONSOLE_CARET | CONSOLE_CARET |
| typedef struct _CONSOLE_WINDOW | CONSOLE_WINDOW |
| typedef struct _CONSOLE_HISTORY | CONSOLE_HISTORY |
| typedef struct _WINDOW_PROPERTIES | WINDOW_PROPERTIES |
| typedef uint32_t STDCALL(* | console_window_enumerate_cb) (CONSOLE_DEVICE *console, WINDOW_HANDLE handle, void *data) |
| typedef uint32_t STDCALL(* | console_window_completion_cb) (WINDOW_HANDLE handle, char *buffer, void *data) |
Enumerations | |
| enum | CURSOR_MODE { CURSOR_MODE_INSERT , CURSOR_MODE_OVERWRITE } |
| enum | CURSOR_STATE { CURSOR_STATE_ON , CURSOR_STATE_OFF } |
| enum | CURSOR_SHAPE { CURSOR_SHAPE_LINE , CURSOR_SHAPE_BAR , CURSOR_SHAPE_BLOCK } |
Functions | |
| uint32_t STDCALL | console_device_open (CONSOLE_DEVICE *console) |
| Open a console device ready for drawing. | |
| uint32_t STDCALL | console_device_close (CONSOLE_DEVICE *console) |
| Close a console device to prevent drawing. | |
| uint32_t STDCALL | console_device_clear (CONSOLE_DEVICE *console, uint32_t color) |
| Clear a console device using the specified color. | |
| uint32_t STDCALL | console_device_scroll (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t count, uint32_t direction) |
| Scroll all or part of a console device in the specified direction. | |
| uint32_t STDCALL | console_device_draw_box (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color, uint32_t width) |
| Draw an outline of a box on a console device. | |
| uint32_t STDCALL | console_device_draw_line (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color, uint32_t width) |
| Draw a horizontal or vertical line on a console device. | |
| uint32_t STDCALL | console_device_plot_line (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color, uint32_t width) |
| Draw a line in any direction on a console device. | |
| uint32_t STDCALL | console_device_draw_char (CONSOLE_DEVICE *console, FONT_HANDLE handle, char ch, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor) |
| Draw a character on a console device. | |
| uint32_t STDCALL | console_device_draw_text (CONSOLE_DEVICE *console, FONT_HANDLE handle, const char *text, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor, uint32_t len) |
| Draw a text string on a console device. | |
| uint32_t STDCALL | console_device_draw_pixel (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, uint32_t color) |
| Draw a pixel on a console device. | |
| uint32_t STDCALL | console_device_draw_block (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color) |
| Draw a filled block on a console device. | |
| uint32_t STDCALL | console_device_draw_circle (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, uint32_t color, uint32_t width, uint32_t radius) |
| Draw a circle on a console device. | |
| uint32_t STDCALL | console_device_draw_image (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, void *buffer, uint32_t width, uint32_t height, uint32_t format, uint32_t skip) |
| Draw an image on a console device. | |
| uint32_t STDCALL | console_device_draw_window (CONSOLE_DEVICE *console, WINDOW_HANDLE handle, uint32_t flags) |
| Draw a console window on a console device. | |
| uint32_t STDCALL | console_device_get_pixel (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, uint32_t *color) |
| Read a pixel from a console device. | |
| uint32_t STDCALL | console_device_get_image (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, void *buffer, uint32_t width, uint32_t height, uint32_t format, uint32_t skip) |
| Read an image from a console device. | |
| uint32_t STDCALL | console_device_put_text (CONSOLE_DEVICE *console, FONT_HANDLE handle, CONSOLE_POINT *source, CONSOLE_POINT *dest, CONSOLE_CHAR *buffer, uint32_t width, uint32_t height, uint32_t skip) |
| Output a rectangular area of text to a console device. | |
| uint32_t STDCALL | console_device_copy_image (CONSOLE_DEVICE *console, CONSOLE_POINT *source, CONSOLE_POINT *dest, uint32_t width, uint32_t height) |
| Copy an image within a console device. | |
| HANDLE STDCALL | console_device_add_caret (CONSOLE_DEVICE *console, uint32_t width, uint32_t height, uint32_t offsetx, uint32_t offsety) |
| Create a new caret (cursor) of the specified size. | |
| uint32_t STDCALL | console_device_delete_caret (CONSOLE_DEVICE *console, HANDLE handle) |
| Delete an existing caret (cursor). | |
| uint32_t STDCALL | console_device_update_caret (CONSOLE_DEVICE *console, HANDLE handle, uint32_t x, uint32_t y, BOOL visible, BOOL blink) |
| Update an existing carets position, visibility or blink. | |
| uint32_t STDCALL | console_device_update_caret_ex (CONSOLE_DEVICE *console, HANDLE handle, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor, BOOL visible, BOOL blink, BOOL reverse) |
| Update an existing carets position, colors, visibility, blink or reverse. | |
| uint32_t STDCALL | console_device_set_cursor (CONSOLE_DEVICE *console, uint32_t width, uint32_t height, char *chars) |
| Set the mouse cursor properties of a console device (CONSOLE_MODE_CHARACTER only). | |
| uint32_t STDCALL | console_device_update_cursor (CONSOLE_DEVICE *console, BOOL enabled, int32_t x, int32_t y, BOOL relative) |
| Update the position and state for the mouse cursor of a console device (CONSOLE_MODE_CHARACTER only). | |
| uint32_t STDCALL | console_device_get_position (CONSOLE_DEVICE *console, uint32_t position, uint32_t *x1, uint32_t *y1, uint32_t *x2, uint32_t *y2) |
| Get the coordinates of a console position from a console device. | |
| uint32_t STDCALL | console_device_get_properties (CONSOLE_DEVICE *console, CONSOLE_PROPERTIES *properties) |
| Get the current properties from a console device. | |
| BOOL STDCALL | console_device_check_flag (CONSOLE_DEVICE *console, uint32_t flag) |
| Check if a console device supports a flag value. | |
| uint32_t STDCALL | console_device_update_flag (CONSOLE_DEVICE *console, uint32_t flag, BOOL clear) |
| Set or clear a flag on a console device. | |
| uint32_t STDCALL | console_device_get_mode (CONSOLE_DEVICE *console) |
| Get the mode of a console device. | |
| uint32_t STDCALL | console_device_get_state (CONSOLE_DEVICE *console) |
| Get the state of a console device. | |
| CONSOLE_DEVICE *STDCALL | console_device_create (void) |
| Create a new Console entry. | |
| CONSOLE_DEVICE *STDCALL | console_device_create_ex (uint32_t size) |
| Create a new Console entry. | |
| uint32_t STDCALL | console_device_destroy (CONSOLE_DEVICE *console) |
| Destroy an existing Console entry. | |
| uint32_t STDCALL | console_device_register (CONSOLE_DEVICE *console) |
| Register a new Console in the Console table. | |
| uint32_t STDCALL | console_device_deregister (CONSOLE_DEVICE *console) |
| Deregister a Console from the Console table. | |
| CONSOLE_DEVICE *STDCALL | console_device_find (uint32_t consoleid) |
| Find a console device by ID in the console table. | |
| CONSOLE_DEVICE *STDCALL | console_device_find_by_device (DEVICE *device) |
| Find a console device by its related device in the console table. | |
| CONSOLE_DEVICE *STDCALL | console_device_find_by_name (const char *name) |
| Find a console device by name in the console table. | |
| CONSOLE_DEVICE *STDCALL | console_device_find_by_description (const char *description) |
| Find a console device by description in the console table. | |
| uint32_t STDCALL | console_device_enumerate (console_enumerate_cb callback, void *data) |
| Enumerate all console devices in the console table. | |
| uint32_t STDCALL | console_device_notification (CONSOLE_DEVICE *console, console_notification_cb callback, void *data, uint32_t notification, uint32_t flags) |
| Register a notification for console device changes. | |
| WINDOW_HANDLE STDCALL | console_window_create (CONSOLE_DEVICE *console, uint32_t position, BOOL _default) |
| Create a new Console window. | |
| WINDOW_HANDLE STDCALL | console_window_create_ex (CONSOLE_DEVICE *console, FONT_HANDLE font, uint32_t size, uint32_t state, uint32_t mode, uint32_t position, BOOL _default) |
| Create a new Console window. | |
| uint32_t STDCALL | console_window_destroy (WINDOW_HANDLE handle) |
| Close and Destroy an existing console window. | |
| uint32_t STDCALL | console_window_show (WINDOW_HANDLE handle) |
| Make an existing console window visible and show it on screen. | |
| uint32_t STDCALL | console_window_hide (WINDOW_HANDLE handle) |
| Make an existing console window invisible and hide it on screen. | |
| uint32_t STDCALL | console_window_activate (WINDOW_HANDLE handle) |
| Make an existing console window the active window. | |
| uint32_t STDCALL | console_window_deactivate (WINDOW_HANDLE handle) |
| Make an existing console window inactive. | |
| WINDOW_HANDLE STDCALL | console_window_next (CONSOLE_DEVICE *console, BOOL visible) |
| Get the next console window starting with the active window. | |
| WINDOW_HANDLE STDCALL | console_window_previous (CONSOLE_DEVICE *console, BOOL visible) |
| Get the previous console window starting with the active window. | |
| WINDOW_HANDLE STDCALL | console_window_at (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, BOOL visible) |
| Find the console window that X and Y coordinates are within. | |
| WINDOW_HANDLE STDCALL | console_window_find (CONSOLE_DEVICE *console, uint32_t position) |
| Find an existing console window in the position specified. | |
| uint32_t STDCALL | console_window_enumerate (CONSOLE_DEVICE *console, console_window_enumerate_cb callback, void *data) |
| Enumerate existing console windows on the specified console device. | |
| BOOL STDCALL | console_window_check_flag (WINDOW_HANDLE handle, uint32_t flag) |
| Check an existing console window to determine if a flag is set or not. | |
| uint32_t STDCALL | console_window_update_flag (WINDOW_HANDLE handle, uint32_t flag, BOOL clear) |
| Set or clear a flag on an existing console window. | |
| uint32_t STDCALL | console_window_get_mode (WINDOW_HANDLE handle) |
| Get the window mode of an existing console window. | |
| uint32_t STDCALL | console_window_get_state (WINDOW_HANDLE handle) |
| Get the window state of an existing console window. | |
| uint32_t STDCALL | console_window_get_position (WINDOW_HANDLE handle) |
| Get the position of an existing console window. | |
| uint32_t STDCALL | console_window_set_position (WINDOW_HANDLE handle, uint32_t position) |
| Set the position of an existing console window. | |
| uint32_t STDCALL | console_window_get_properties (WINDOW_HANDLE handle, WINDOW_PROPERTIES *properties) |
| Get the properties for the specified console window. | |
| uint32_t STDCALL | console_window_get_min_x (WINDOW_HANDLE handle) |
| Get the current minimum X of the window viewport for an existing console window. | |
| uint32_t STDCALL | console_window_get_min_y (WINDOW_HANDLE handle) |
| Get the current minimum Y of the window viewport for an existing console window. | |
| uint32_t STDCALL | console_window_get_max_x (WINDOW_HANDLE handle) |
| Get the current maximum X of the window viewport for an existing console window. | |
| uint32_t STDCALL | console_window_get_max_y (WINDOW_HANDLE handle) |
| Get the current maximum Y of the window viewport for an existing console window. | |
| CONSOLE_RECT STDCALL | console_window_get_rect (WINDOW_HANDLE handle) |
| Get the rectangle X1,Y1,X2,Y2 of the window viewport for an existing console window. | |
| uint32_t STDCALL | console_window_set_rect (WINDOW_HANDLE handle, CONSOLE_RECT *rect) |
| Set the rectangle X1,Y1,X2,Y2 of the window viewport for an existing console window. | |
| uint32_t STDCALL | console_window_reset_rect (WINDOW_HANDLE handle) |
| Reset the window viewport for an existing console window to the maximum size. | |
| uint32_t STDCALL | console_window_get_viewport (WINDOW_HANDLE handle, uint32_t *x1, uint32_t *y1, uint32_t *x2, uint32_t *y2) |
| Get the X1,Y1,X2,Y2 of the window viewport for an existing console window. | |
| uint32_t STDCALL | console_window_set_viewport (WINDOW_HANDLE handle, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2) |
| Set the X1,Y1,X2,Y2 of the window viewport for an existing console window. | |
| uint32_t STDCALL | console_window_reset_viewport (WINDOW_HANDLE handle) |
| Reset the window viewport for an existing console window to the maximum size. | |
| uint32_t STDCALL | console_window_get_x (WINDOW_HANDLE handle) |
| Get the current X (Column) position of an existing console window. | |
| uint32_t STDCALL | console_window_set_x (WINDOW_HANDLE handle, uint32_t x) |
| Set the current X (Column) position of an existing console window. | |
| uint32_t STDCALL | console_window_get_y (WINDOW_HANDLE handle) |
| Get the current Y (Row) position of an existing console window. | |
| uint32_t STDCALL | console_window_set_y (WINDOW_HANDLE handle, uint32_t y) |
| Set the current Y (Row) position of an existing console window. | |
| uint32_t STDCALL | console_window_get_xy (WINDOW_HANDLE handle, uint32_t *x, uint32_t *y) |
| Get the current X and Y positions of an existing console window. | |
| uint32_t STDCALL | console_window_set_xy (WINDOW_HANDLE handle, uint32_t x, uint32_t y) |
| Set the current X and Y positions of an existing console window. | |
| CONSOLE_POINT STDCALL | console_window_get_point (WINDOW_HANDLE handle) |
| Get the point X,Y of an existing console window. | |
| uint32_t STDCALL | console_window_set_point (WINDOW_HANDLE handle, CONSOLE_POINT *point) |
| Set the point X,Y of an existing console window. | |
| uint32_t STDCALL | console_window_get_cols (WINDOW_HANDLE handle) |
| Get the current columns of the window viewport for an existing console window. | |
| uint32_t STDCALL | console_window_get_rows (WINDOW_HANDLE handle) |
| Get the current rows of the window viewport for an existing console window. | |
| uint32_t STDCALL | console_window_get_width (WINDOW_HANDLE handle) |
| Get the absolute width of an existing console window. | |
| uint32_t STDCALL | console_window_get_height (WINDOW_HANDLE handle) |
| Get the absolute height of an existing console window. | |
| uint32_t STDCALL | console_window_get_format (WINDOW_HANDLE handle) |
| Get the color format of an existing console window. | |
| uint32_t STDCALL | console_window_get_forecolor (WINDOW_HANDLE handle) |
| Get the current foreground color of an existing console window. | |
| uint32_t STDCALL | console_window_set_forecolor (WINDOW_HANDLE handle, uint32_t color) |
| Set the current foreground color of an existing console window. | |
| uint32_t STDCALL | console_window_get_backcolor (WINDOW_HANDLE handle) |
| Get the current background color of an existing console window. | |
| uint32_t STDCALL | console_window_set_backcolor (WINDOW_HANDLE handle, uint32_t color) |
| Set the current background color of an existing console window. | |
| FONT_HANDLE STDCALL | console_window_get_font (WINDOW_HANDLE handle) |
| Get the default font of an existing console window. | |
| uint32_t STDCALL | console_window_set_font (WINDOW_HANDLE handle, FONT_HANDLE font) |
| Set the default font of an existing console window. | |
| uint32_t STDCALL | console_window_get_cursor_xy (WINDOW_HANDLE handle, uint32_t *x, uint32_t *y) |
| Get the current cursor X and Y positions of an existing console window. | |
| uint32_t STDCALL | console_window_set_cursor_xy (WINDOW_HANDLE handle, uint32_t x, uint32_t y) |
| Set the current cursor X and Y positions of an existing console window. | |
| CURSOR_MODE STDCALL | console_window_get_cursor_mode (WINDOW_HANDLE handle) |
| Get the current cursor mode of an existing console window. | |
| uint32_t STDCALL | console_window_set_cursor_mode (WINDOW_HANDLE handle, CURSOR_MODE cursormode) |
| Set the current cursor mode of an existing console window. | |
| BOOL STDCALL | console_window_get_cursor_blink (WINDOW_HANDLE handle) |
| Get the current cursor blink state of an existing console window. | |
| uint32_t STDCALL | console_window_set_cursor_blink (WINDOW_HANDLE handle, BOOL cursorblink) |
| Set the current cursor blink state of an existing console window. | |
| CURSOR_STATE STDCALL | console_window_get_cursor_state (WINDOW_HANDLE handle) |
| Get the current cursor state of an existing console window. | |
| uint32_t STDCALL | console_window_set_cursor_state (WINDOW_HANDLE handle, CURSOR_STATE cursorstate) |
| Set the current cursor state of an existing console window. | |
| CURSOR_SHAPE STDCALL | console_window_get_cursor_shape (WINDOW_HANDLE handle) |
| Get the current cursor shape of an existing console window. | |
| uint32_t STDCALL | console_window_set_cursor_shape (WINDOW_HANDLE handle, CURSOR_SHAPE cursorshape) |
| Set the current cursor shape of an existing console window. | |
| uint32_t STDCALL | console_window_get_cursor_color (WINDOW_HANDLE handle) |
| Get the current cursor color of an existing console window. | |
| uint32_t STDCALL | console_window_set_cursor_color (WINDOW_HANDLE handle, uint32_t color) |
| Set the current cursor color of an existing console window. | |
| BOOL STDCALL | console_window_get_cursor_reverse (WINDOW_HANDLE handle) |
| Get the current cursor reverse state of an existing console window. | |
| uint32_t STDCALL | console_window_set_cursor_reverse (WINDOW_HANDLE handle, BOOL cursorreverse) |
| Set the current cursor reverse state of an existing console window. | |
| uint32_t STDCALL | console_window_cursor_on (WINDOW_HANDLE handle) |
| Enable the cursor on an existing console window. | |
| uint32_t STDCALL | console_window_cursor_off (WINDOW_HANDLE handle) |
| Disable the cursor on an existing console window. | |
| uint32_t STDCALL | console_window_cursor_line (WINDOW_HANDLE handle) |
| Change the cursor to a vertical line on an existing console window. | |
| uint32_t STDCALL | console_window_cursor_bar (WINDOW_HANDLE handle) |
| Change the cursor to a horizontal bar on an existing console window. | |
| uint32_t STDCALL | console_window_cursor_block (WINDOW_HANDLE handle) |
| Change the cursor to a solid block on an existing console window. | |
| uint32_t STDCALL | console_window_cursor_move (WINDOW_HANDLE handle, uint32_t x, uint32_t y) |
| Move the cursor on an existing console window. | |
| uint32_t STDCALL | console_window_cursor_blink (WINDOW_HANDLE handle, BOOL enabled) |
| Set the blink state of the cursor on an existing console window. | |
| uint32_t STDCALL | console_window_cursor_color (WINDOW_HANDLE handle, uint32_t color) |
| Set the color of the cursor on an existing console window. | |
| uint32_t STDCALL | console_window_cursor_reverse (WINDOW_HANDLE handle, BOOL enabled) |
| Set the reverse state of the cursor on an existing console window. | |
| uint32_t STDCALL | console_window_add_history (WINDOW_HANDLE handle, const char *value) |
| Add a value to the command history table of an existing console window. | |
| uint32_t STDCALL | console_window_clear_history (WINDOW_HANDLE handle) |
| Remove all entries from the command history table of an existing console window. | |
| uint32_t STDCALL | console_window_first_history (WINDOW_HANDLE handle, char *value, uint32_t len) |
| Get the first (oldest) command history value from an existing console window. | |
| uint32_t STDCALL | console_window_last_history (WINDOW_HANDLE handle, char *value, uint32_t len) |
| Get the last (most recent) command history value from an existing console window. | |
| uint32_t STDCALL | console_window_next_history (WINDOW_HANDLE handle, char *value, uint32_t len) |
| Get the next (after current) command history value from an existing console window. | |
| uint32_t STDCALL | console_window_previous_history (WINDOW_HANDLE handle, char *value, uint32_t len) |
| Get the next (before current) command history value from an existing console window. | |
| uint32_t STDCALL | console_window_current_history (WINDOW_HANDLE handle, char *value, uint32_t len) |
| Get the current command history value from an existing console window. | |
| uint32_t STDCALL | console_window_scroll_up (WINDOW_HANDLE handle, uint32_t row, uint32_t lines) |
| Scroll the current viewport of an existing console window up. | |
| uint32_t STDCALL | console_window_scroll_down (WINDOW_HANDLE handle, uint32_t row, uint32_t lines) |
| Scroll the current viewport of an existing console window down. | |
| uint32_t STDCALL | console_window_scroll_left (WINDOW_HANDLE handle, uint32_t row, uint32_t col, uint32_t lines, uint32_t chars) |
| Scroll the current viewport of an existing console window left. | |
| uint32_t STDCALL | console_window_scroll_right (WINDOW_HANDLE handle, uint32_t row, uint32_t col, uint32_t lines, uint32_t chars) |
| Scroll the current viewport of an existing console window right. | |
| uint32_t STDCALL | console_window_clear (WINDOW_HANDLE handle) |
| Clear the current viewport of an existing console window. | |
| uint32_t STDCALL | console_window_clear_ex (WINDOW_HANDLE handle, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, BOOL cursor) |
| Clear part of the the current viewport of an existing console window. | |
| uint32_t STDCALL | console_window_write (WINDOW_HANDLE handle, const char *text) |
| Write text on an existing console window at the current position in the current color. | |
| uint32_t STDCALL | console_window_write_ex (WINDOW_HANDLE handle, const char *text, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor) |
| Write text on an existing console window. | |
| uint32_t STDCALL | console_window_write_ln (WINDOW_HANDLE handle, const char *text) |
| Write text on an existing console window at the current position in the current color. | |
| uint32_t STDCALL | console_window_write_ln_ex (WINDOW_HANDLE handle, const char *text, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor) |
| Write text on an existing console window. | |
| uint32_t STDCALL | console_window_write_chr (WINDOW_HANDLE handle, char ch) |
| Write a character on an existing console window at the current position in the current color. | |
| uint32_t STDCALL | console_window_write_chr_ex (WINDOW_HANDLE handle, char ch, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor) |
| Write a character on an existing console window. | |
| uint32_t STDCALL | console_window_output (WINDOW_HANDLE handle, CONSOLE_POINT *source, CONSOLE_POINT *dest, CONSOLE_CHAR *buffer, uint32_t width, uint32_t height, uint32_t skip) |
| Output a rectangular area of text to a console window. | |
| uint32_t STDCALL | console_window_read (WINDOW_HANDLE handle, char *text, uint32_t *len) |
| Read text input from the console and echo to an existing console window at the current position in the current color. | |
| uint32_t STDCALL | console_window_read_ln (WINDOW_HANDLE handle, char *text, uint32_t *len) |
| Read text input from the console and echo to an existing console window at the current position in the current color. | |
| uint32_t STDCALL | console_window_read_ln_ex (WINDOW_HANDLE handle, char *text, uint32_t *len, char *prompt, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor, BOOL scroll, BOOL history, console_window_completion_cb completion, void *data) |
| Read text input from the console and echo to an existing console window at the specified position in the specified color. | |
| uint32_t STDCALL | console_window_read_chr (WINDOW_HANDLE handle, char *ch) |
| Read one character input from the console and echo to an existing console window at the current position in the current color. | |
| uint32_t STDCALL | console_window_read_chr_ex (WINDOW_HANDLE handle, char *ch, char *prompt, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor, BOOL echo, BOOL scroll) |
| Read one character input from the console and optionally echo to an existing console window at the specified position in the specified color. | |
| int STDCALL | console_window_printf (WINDOW_HANDLE handle, const char *format,...) _ATTRIBUTE((__format__(__printf__ |
| Print formatted text to an existing console window at the current position in the current color. | |
| int STDCALL void STDCALL | console_clr_eol (void) |
| Compatible with RTL Crt unit function ClrEol. | |
| void STDCALL | console_clr_scr (void) |
| Compatible with RTL Crt unit function ClrScr. | |
| void STDCALL | console_delay (uint16_t ms) |
| Compatible with RTL Crt unit function Delay. | |
| void STDCALL | console_del_line (void) |
| Compatible with RTL Crt unit function DelLine. | |
| void STDCALL | console_goto_xy (int x, int y) |
| Compatible with RTL Crt unit function GotoXY. | |
| void STDCALL | console_high_video (void) |
| Compatible with RTL Crt unit function HighVideo. | |
| void STDCALL | console_ins_line (void) |
| Compatible with RTL Crt unit function InsLine. | |
| BOOL STDCALL | console_keypressed (void) |
| Compatible with RTL Crt unit function KeyPressed. | |
| void STDCALL | console_low_video (void) |
| Compatible with RTL Crt unit function LowVideo. | |
| void STDCALL | console_norm_video (void) |
| Compatible with RTL Crt unit function NormVideo. | |
| void STDCALL | console_no_sound (void) |
| Compatible with RTL Crt unit function NoSound. | |
| char STDCALL | console_read_key (void) |
| Compatible with RTL Crt unit function ReadKey. | |
| void STDCALL | console_sound (uint16_t hz) |
| Compatible with RTL Crt unit function Sound. | |
| void STDCALL | console_text_background (uint32_t color) |
| Compatible with RTL Crt unit function TextBackground. | |
| void STDCALL | console_text_color (uint32_t color) |
| Compatible with RTL Crt unit function TextColor. | |
| void STDCALL | console_text_mode (int mode) |
| Compatible with RTL Crt unit function TextMode. | |
| int STDCALL | console_where_x (void) |
| Compatible with RTL Crt unit function WhereX. | |
| int STDCALL | console_where_y (void) |
| Compatible with RTL Crt unit function WhereY. | |
| void STDCALL | console_window (int x1, int y1, int x2, int y2) |
| Compatible with RTL Crt unit function Window. | |
| void STDCALL | console_scroll_up (int row, int lines) |
| Scroll the default console window up. | |
| void STDCALL | console_scroll_down (int row, int lines) |
| Scroll the default console window down. | |
| void STDCALL | console_write (const char *text) |
| Write text on the default console window at the current position in the current color. | |
| void STDCALL | console_write_ln (const char *text) |
| Write text on the default console window at the current position in the current color. | |
| void STDCALL | console_write_chr (char ch) |
| Write a character on the default console window at the current position in the current color. | |
| void STDCALL | console_read (char *text, uint32_t *len) |
| Read text from console input and echo to the screen. | |
| void STDCALL | console_read_ln (char *text, uint32_t *len) |
| Read text from console input and echo to the screen. | |
| void STDCALL | console_read_chr (char *ch) |
| Read a character from console input and echo to the screen. | |
| int STDCALL | console_printf (const char *format,...) _ATTRIBUTE((__format__(__printf__ |
| Print formatted text to the default console window at the current position in the current color. | |
| int STDCALL uint32_t STDCALL | console_device_get_count (void) |
| Get the current console device count. | |
| CONSOLE_DEVICE *STDCALL | console_device_get_default (void) |
| Get the current default console device. | |
| uint32_t STDCALL | console_device_set_default (CONSOLE_DEVICE *console) |
| Set the current default console device. | |
| CONSOLE_DEVICE *STDCALL | console_device_check (CONSOLE_DEVICE *console) |
| Check if the supplied Console device is in the Console table. | |
| CONSOLE_CARET *STDCALL | console_device_caret_check (CONSOLE_DEVICE *console, CONSOLE_CARET *caret) |
| Check if a console caret entry is valid. | |
| uint32_t STDCALL | console_type_to_string (uint32_t consoletype, char *value, uint32_t len) |
| Convert a Console type value to a string. | |
| uint32_t STDCALL | console_state_to_string (uint32_t consolestate, char *value, uint32_t len) |
| Convert a Console state value to a string. | |
| FONT_HANDLE STDCALL | console_device_get_default_font (void) |
| Get the default console font. | |
| uint32_t STDCALL | console_position_to_string (uint32_t position, char *value, uint32_t len) |
| uint32_t STDCALL | console_window_get_count (CONSOLE_DEVICE *console) |
| Get the current console window count. | |
| WINDOW_HANDLE STDCALL | console_window_get_active (CONSOLE_DEVICE *console) |
| Get the current console active window. | |
| WINDOW_HANDLE STDCALL | console_window_get_default (CONSOLE_DEVICE *console) |
| Get the current console default window. | |
| uint32_t STDCALL | console_window_set_default (CONSOLE_DEVICE *console, WINDOW_HANDLE handle) |
| Set the current console default window. | |
| CONSOLE_WINDOW *STDCALL | console_window_check (CONSOLE_DEVICE *console, CONSOLE_WINDOW *window) |
| Check if a console window entry is valid. | |
| uint32_t STDCALL | console_window_state_to_string (uint32_t windowstate, char *value, uint32_t len) |
| Convert a Console Window state value to a string. | |
| uint32_t STDCALL | console_window_mode_to_string (uint32_t windowmode, char *value, uint32_t len) |
| Convert a Console Window mode value to a string. | |
| FONT_HANDLE STDCALL | console_window_get_default_font (void) |
| Get the default console window font. | |
| BOOL STDCALL | console_window_redirect_output (WINDOW_HANDLE handle) |
| Redirect standard output to the console window specified by Handle. | |
| #define CONSOLE_NAME_PREFIX "Console" |
Name prefix for Console Devices.
Console specific constants
| #define CONSOLE_TYPE_NONE 0 |
Console Device Types
| #define CONSOLE_TYPE_FRAMEBUFFER 1 |
| #define CONSOLE_TYPE_SERIAL 2 |
| #define CONSOLE_TYPE_REMOTE 3 |
| #define CONSOLE_TYPE_LCD 4 |
| #define CONSOLE_TYPE_MAX 4 |
| #define CONSOLE_STATE_CLOSED 0 |
Console Device States
| #define CONSOLE_STATE_OPEN 1 |
| #define CONSOLE_STATE_MAX 1 |
| #define CONSOLE_FLAG_NONE 0x00000000 |
Console Device Flags
| #define CONSOLE_FLAG_LINE_WRAP 0x00000001 |
Wrap long lines to the next line if set.
| #define CONSOLE_FLAG_DMA_BOX 0x00000002 |
Use DMA to draw boxes (Where applicable).
| #define CONSOLE_FLAG_DMA_LINE 0x00000004 |
Use DMA to draw lines (Where applicable).
| #define CONSOLE_FLAG_DMA_FILL 0x00000008 |
Use DMA to fill blocks (Where applicable).
| #define CONSOLE_FLAG_DMA_CLEAR 0x00000010 |
Use DMA to clear blocks (Where applicable).
| #define CONSOLE_FLAG_DMA_SCROLL 0x00000020 |
Use DMA to scroll blocks (Where applicable).
| #define CONSOLE_FLAG_SINGLE_WINDOW 0x00000040 |
Console supports only one window (Not multiple).
| #define CONSOLE_FLAG_HARDWARE_CURSOR 0x00000080 |
Console supports a hardware cursor (Mouse pointer) (Character mode only).
| #define CONSOLE_FLAG_HARDWARE_CARET 0x00000100 |
Console supports a hardware caret (Text cursor).
| #define CONSOLE_FLAG_BLINK_CARET 0x00000200 |
Console supports blinking caret.
| #define CONSOLE_FLAG_TEXT_MODE 0x00000400 |
Console supports text mode settings.
| #define CONSOLE_FLAG_TEXT_BLINK 0x00000800 |
Console supports blinking text.
| #define CONSOLE_FLAG_COLOR 0x00001000 |
Console supports colors.
| #define CONSOLE_FLAG_FONT 0x00002000 |
Console supports fonts.
| #define CONSOLE_FLAG_FULLSCREEN 0x00004000 |
Console supports creating a fullscreen window.
| #define CONSOLE_FLAG_AUTO_SCROLL 0x00008000 |
Automatically scroll up on reaching the last line.
| #define CONSOLE_FLAG_DMA_TEXT 0x00010000 |
Use DMA to draw text (Where applicable).
| #define CONSOLE_FLAG_COLOR_REVERSE 0x00020000 |
Console requires colors to be reversed for underlying hardware.
| #define CONSOLE_FLAG_TEXT_CARET 0x00040000 |
Console supports a caret (Text cursor.
| #define CONSOLE_FLAG_FOCUS_CARET 0x00080000 |
Only show caret on the focused (active) window.
| #define CONSOLE_FLAG_DMA_MASK CONSOLE_FLAG_DMA_BOX | CONSOLE_FLAG_DMA_LINE | CONSOLE_FLAG_DMA_FILL | CONSOLE_FLAG_DMA_CLEAR | CONSOLE_FLAG_DMA_SCROLL | CONSOLE_FLAG_DMA_TEXT |
Flags that cannot be changed by ConsoleDeviceUpdateFlag
| #define CONSOLE_MODE_NONE 0 |
Console Device Modes
| #define CONSOLE_MODE_PIXEL 1 |
| #define CONSOLE_MODE_CHARACTER 2 |
| #define CARET_SIGNATURE 0x9A2D40E3 |
Console Caret Signature
| #define WINDOW_SIGNATURE 0xDE3A5C04 |
Console Window Signature
| #define WINDOW_STATE_INVISIBLE 0 |
Console Window States
| #define WINDOW_STATE_VISIBLE 1 |
| #define WINDOW_STATE_MAX 1 |
| #define WINDOW_MODE_NONE 0 |
Console Window Modes
| #define WINDOW_MODE_TEXT 1 |
| #define WINDOW_MODE_GRAPHICS 2 |
| #define WINDOW_MODE_MAX 2 |
| #define WINDOW_FLAG_NONE 0x00000000 |
Console Window Flags
| #define WINDOW_FLAG_LINE_WRAP 0x00000001 |
Wrap long lines to the next line if set.
| #define WINDOW_FLAG_BUFFERED 0x00000002 |
Buffer output for scroll back and redraw.
| #define WINDOW_FLAG_FULLSCREEN 0x00000004 |
Window occupies the full screen.
| #define WINDOW_FLAG_AUTO_SCROLL 0x00000008 |
Automatically scroll up on reaching the last line.
| #define WINDOW_FLAG_CHARACTER 0x00000010 |
Console for this Window is character mode only.
| #define WINDOW_FLAG_AUTO_UPDATE 0x00000020 |
Automatically update output of buffered window.
| #define WINDOW_FLAG_FOCUS_CURSOR 0x00000040 |
Only show cursor (caret) on the focused (active) window.
| #define WINDOW_FLAG_INTERNAL WINDOW_FLAG_FULLSCREEN | WINDOW_FLAG_CHARACTER |
Flags that cannot be changed by ConsoleWindowUpdateFlag
| #define WINDOW_DRAW_FLAG_NONE 0x00000000 |
Console Window Draw Flags
| #define WINDOW_DRAW_FLAG_BODY 0x00000001 |
Draw the Window body.
| #define WINDOW_DRAW_FLAG_TITLE 0x00000002 |
Draw the Window title.
| #define WINDOW_DRAW_FLAG_BORDER 0x00000004 |
Draw the Window border.
| #define WINDOW_DRAW_FLAG_ALL WINDOW_DRAW_FLAG_BODY | WINDOW_DRAW_FLAG_TITLE | WINDOW_DRAW_FLAG_BORDER |
| #define WINDOW_HISTORY_MAX_COUNT 100 |
Console Window History
| #define FRAMEBUFFER_CONSOLE_DESCRIPTION "Framebuffer Console" |
Description of the Framebuffer Console device.
Framebuffer Console specific constants
| typedef struct _CONSOLE_CHAR CONSOLE_CHAR |
| typedef struct _CONSOLE_PROPERTIES CONSOLE_PROPERTIES |
| typedef struct _CONSOLE_DEVICE CONSOLE_DEVICE |
| typedef uint32_t STDCALL(* console_enumerate_cb) (CONSOLE_DEVICE *console, void *data) |
Console Enumeration Callback
| typedef uint32_t STDCALL(* console_notification_cb) (DEVICE *device, void *data, uint32_t notification) |
Console Notification Callback
| typedef uint32_t STDCALL(* console_device_open_proc) (CONSOLE_DEVICE *console) |
Console Device Methods
| typedef uint32_t STDCALL(* console_device_close_proc) (CONSOLE_DEVICE *console) |
| typedef uint32_t STDCALL(* console_device_clear_proc) (CONSOLE_DEVICE *console, uint32_t color) |
| typedef uint32_t STDCALL(* console_device_scroll_proc) (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t count, uint32_t direction) |
| typedef uint32_t STDCALL(* console_device_draw_box_proc) (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color, uint32_t width) |
| typedef uint32_t STDCALL(* console_device_draw_line_proc) (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color, uint32_t width) |
| typedef uint32_t STDCALL(* console_device_plot_line_proc) (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color, uint32_t width) |
| typedef uint32_t STDCALL(* console_device_draw_char_proc) (CONSOLE_DEVICE *console, FONT_HANDLE handle, char ch, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor) |
| typedef uint32_t STDCALL(* console_device_draw_text_proc) (CONSOLE_DEVICE *console, FONT_HANDLE handle, const char *text, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor, uint32_t len) |
| typedef uint32_t STDCALL(* console_device_draw_pixel_proc) (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, uint32_t color) |
| typedef uint32_t STDCALL(* console_device_draw_block_proc) (CONSOLE_DEVICE *console, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color) |
| typedef uint32_t STDCALL(* console_device_draw_circle_proc) (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, uint32_t color, uint32_t width, uint32_t radius) |
| typedef uint32_t STDCALL(* console_device_draw_image_proc) (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, void *buffer, uint32_t width, uint32_t height, uint32_t format, uint32_t skip) |
| typedef uint32_t STDCALL(* console_device_draw_window_proc) (CONSOLE_DEVICE *console, WINDOW_HANDLE handle, uint32_t flags) |
| typedef uint32_t STDCALL(* console_device_get_pixel_proc) (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, uint32_t *color) |
| typedef uint32_t STDCALL(* console_device_get_image_proc) (CONSOLE_DEVICE *console, uint32_t x, uint32_t y, void *buffer, uint32_t width, uint32_t height, uint32_t format, uint32_t skip) |
| typedef uint32_t STDCALL(* console_device_put_text_proc) (CONSOLE_DEVICE *console, FONT_HANDLE handle, CONSOLE_POINT *source, CONSOLE_POINT *dest, CONSOLE_CHAR *buffer, uint32_t width, uint32_t height, uint32_t skip) |
| typedef uint32_t STDCALL(* console_device_copy_image_proc) (CONSOLE_DEVICE *console, CONSOLE_POINT *source, CONSOLE_POINT *dest, uint32_t width, uint32_t height) |
| typedef HANDLE STDCALL(* console_device_add_caret_proc) (CONSOLE_DEVICE *console, uint32_t width, uint32_t height, uint32_t offsetx, uint32_t offsety) |
| typedef uint32_t STDCALL(* console_device_delete_caret_proc) (CONSOLE_DEVICE *console, HANDLE handle) |
| typedef uint32_t STDCALL(* console_device_update_caret_proc) (CONSOLE_DEVICE *console, HANDLE handle, uint32_t x, uint32_t y, BOOL visible, BOOL blink) |
| typedef uint32_t STDCALL(* console_device_update_caret_ex_proc) (CONSOLE_DEVICE *console, HANDLE handle, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor, BOOL visible, BOOL blink, BOOL reverse) |
| typedef uint32_t STDCALL(* console_device_set_cursor_proc) (CONSOLE_DEVICE *console, uint32_t width, uint32_t height, char *chars) |
| typedef uint32_t STDCALL(* console_device_update_cursor_proc) (CONSOLE_DEVICE *console, BOOL enabled, int32_t x, int32_t y, BOOL relative) |
| typedef uint32_t STDCALL(* console_device_get_position_proc) (CONSOLE_DEVICE *console, uint32_t position, uint32_t *x1, uint32_t *y1, uint32_t *x2, uint32_t *y2) |
| typedef uint32_t STDCALL(* console_device_get_properties_proc) (CONSOLE_DEVICE *console, CONSOLE_PROPERTIES *properties) |
| typedef struct _CONSOLE_CARET CONSOLE_CARET |
| typedef struct _CONSOLE_WINDOW CONSOLE_WINDOW |
| typedef struct _CONSOLE_HISTORY CONSOLE_HISTORY |
| typedef struct _WINDOW_PROPERTIES WINDOW_PROPERTIES |
| typedef uint32_t STDCALL(* console_window_enumerate_cb) (CONSOLE_DEVICE *console, WINDOW_HANDLE handle, void *data) |
Console Window Enumeration Callback
| typedef uint32_t STDCALL(* console_window_completion_cb) (WINDOW_HANDLE handle, char *buffer, void *data) |
Console Window Completion Callback
| enum CURSOR_MODE |
| enum CURSOR_STATE |
| enum CURSOR_SHAPE |
| uint32_t STDCALL console_device_open | ( | CONSOLE_DEVICE * | console | ) |
Open a console device ready for drawing.
Console Functions
| Console | The console device to open |
| uint32_t STDCALL console_device_close | ( | CONSOLE_DEVICE * | console | ) |
Close a console device to prevent drawing.
| Console | The console device to close |
| uint32_t STDCALL console_device_clear | ( | CONSOLE_DEVICE * | console, |
| uint32_t | color ) |
Clear a console device using the specified color.
| Console | The console device to clear |
| Color | The color to use when clearing the console |
| uint32_t STDCALL console_device_scroll | ( | CONSOLE_DEVICE * | console, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| uint32_t | count, | ||
| uint32_t | direction ) |
Scroll all or part of a console device in the specified direction.
| Console | The console device to scroll |
| X1 | The left edge of the area to scroll (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y1 | The top edge of the area to scroll (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| X2 | The right edge of the area to scroll (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y2 | The bottom edge of the area to scroll (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Count | The number of pixels or characters (depending on console mode) to scroll |
| Direction | The direction to scroll (eg CONSOLE_DIRECTION_UP) |
| uint32_t STDCALL console_device_draw_box | ( | CONSOLE_DEVICE * | console, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| uint32_t | color, | ||
| uint32_t | width ) |
Draw an outline of a box on a console device.
| Console | The console device to draw on |
| X1 | The left edge of the box (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y1 | The top edge of the box (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| X2 | The right edge of the box (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y2 | The bottom edge of the box (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Color | The color to draw with (eg COLOR_WHITE) |
| Width | The width of the box outline (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| uint32_t STDCALL console_device_draw_line | ( | CONSOLE_DEVICE * | console, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| uint32_t | color, | ||
| uint32_t | width ) |
Draw a horizontal or vertical line on a console device.
| Console | The console device to draw on |
| X1 | The left starting point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y1 | The top starting point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| X2 | The right ending point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y2 | The bottom ending point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Color | The color to draw with (eg COLOR_WHITE) |
| Width | The width of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| uint32_t STDCALL console_device_plot_line | ( | CONSOLE_DEVICE * | console, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| uint32_t | color, | ||
| uint32_t | width ) |
Draw a line in any direction on a console device.
| Console | The console device to draw on |
| X1 | The left starting point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y1 | The top starting point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| X2 | The right ending point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y2 | The bottom ending point of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Color | The color to draw with (eg COLOR_WHITE) |
| Width | The width of the line (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| uint32_t STDCALL console_device_draw_char | ( | CONSOLE_DEVICE * | console, |
| FONT_HANDLE | handle, | ||
| char | ch, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | forecolor, | ||
| uint32_t | backcolor ) |
Draw a character on a console device.
| Console | The console device to draw on |
| Handle | The handle of the font to draw with |
| Ch | The character to draw |
| X | The left starting point of the character (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y | The top starting point of the character (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Forecolor | The foreground color for the character (eg COLOR_WHITE) |
| Backcolor | The background color for the character (eg COLOR_BLACK) |
| uint32_t STDCALL console_device_draw_text | ( | CONSOLE_DEVICE * | console, |
| FONT_HANDLE | handle, | ||
| const char * | text, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | forecolor, | ||
| uint32_t | backcolor, | ||
| uint32_t | len ) |
Draw a text string on a console device.
| Console | The console device to draw on |
| Handle | The handle of the font to draw with |
| Text | The text to draw |
| X | The left starting point of the text (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y | The top starting point of the text (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Forecolor | The foreground color for the text (eg COLOR_WHITE) |
| Backcolor | The background color for the text (eg COLOR_BLACK) |
| Len | The length of the text (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| uint32_t STDCALL console_device_draw_pixel | ( | CONSOLE_DEVICE * | console, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | color ) |
Draw a pixel on a console device.
| Console | The console device to draw on |
| X | The column to draw the pixel (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y | The row to draw the pixel (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Color | The color to draw with (eg COLOR_WHITE) |
| uint32_t STDCALL console_device_draw_block | ( | CONSOLE_DEVICE * | console, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| uint32_t | color ) |
Draw a filled block on a console device.
| Console | The console device to draw on |
| X1 | The left edge of the block (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y1 | The top edge of the block (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| X2 | The right edge of the block (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y2 | The bottom edge of the block (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Color | The color to draw with (eg COLOR_WHITE) |
| uint32_t STDCALL console_device_draw_circle | ( | CONSOLE_DEVICE * | console, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | color, | ||
| uint32_t | width, | ||
| uint32_t | radius ) |
Draw a circle on a console device.
| Console | The console device to draw on |
| X | The column center point of the circle (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y | The row center point of the circle (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Color | The color to draw with (eg COLOR_WHITE) |
| Width | The width of the circle outline (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Radius | The radius of the circle (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| uint32_t STDCALL console_device_draw_image | ( | CONSOLE_DEVICE * | console, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| void * | buffer, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | format, | ||
| uint32_t | skip ) |
Draw an image on a console device.
| Console | The console device to draw on |
| X | The starting column of the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y | The starting row of the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Buffer | Pointer to a block of memory containing the pixels of the image in a contiguous block of rows |
| Width | The number of columns in the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Height | The number of rows in the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Format | The color format of the image (eg COLOR_FORMAT_RGB24) |
| Skip | The number of pixels to skip in the buffer after each row (Optional) |
| uint32_t STDCALL console_device_draw_window | ( | CONSOLE_DEVICE * | console, |
| WINDOW_HANDLE | handle, | ||
| uint32_t | flags ) |
Draw a console window on a console device.
| Console | The console device to draw on |
| Handle | The handle of the console window to draw |
| Flags | Flags to specify what should be drawn (eg WINDOW_DRAW_FLAG_BORDER) |
| uint32_t STDCALL console_device_get_pixel | ( | CONSOLE_DEVICE * | console, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t * | color ) |
Read a pixel from a console device.
| Console | The console device to read from |
| X | The column to read the pixel from (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y | The row to read the pixel from (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Color | The color value read from the console (eg COLOR_WHITE) |
| uint32_t STDCALL console_device_get_image | ( | CONSOLE_DEVICE * | console, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| void * | buffer, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | format, | ||
| uint32_t | skip ) |
Read an image from a console device.
| Console | The console device to read from |
| X | The starting column to read the image from (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y | The starting row to read the image from (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Buffer | Pointer to a block of memory large enough to hold the pixels of the image in a contiguous block of rows |
| Width | The number of columns to store in the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Height | The number of rows to store in the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Format | The color format to store the image in (eg COLOR_FORMAT_RGB24) |
| Skip | The number of pixels to skip in the buffer after each row (Optional) |
| uint32_t STDCALL console_device_put_text | ( | CONSOLE_DEVICE * | console, |
| FONT_HANDLE | handle, | ||
| CONSOLE_POINT * | source, | ||
| CONSOLE_POINT * | dest, | ||
| CONSOLE_CHAR * | buffer, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | skip ) |
Output a rectangular area of text to a console device.
| Console | The console device to output to |
| Source | The X and Y point in the source buffer to copy text from (Characters) |
| Dest | The X and Y point on the console device to copy text to (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Buffer | A pointer to a buffer of TConsoleChar structures which represent rows of text |
| Width | The width of the area to be output (Characters) |
| Height | The height of the area to be output (Characters) |
| Skip | The number of characters to skip in the buffer after each row (Optional) |
| uint32_t STDCALL console_device_copy_image | ( | CONSOLE_DEVICE * | console, |
| CONSOLE_POINT * | source, | ||
| CONSOLE_POINT * | dest, | ||
| uint32_t | width, | ||
| uint32_t | height ) |
Copy an image within a console device.
| Console | The console device to copy on |
| Source | The starting point for the source of the copy (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Dest | The starting point for the destination of the copy (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Width | The number of columns in the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Height | The number of rows in the image (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| HANDLE STDCALL console_device_add_caret | ( | CONSOLE_DEVICE * | console, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | offsetx, | ||
| uint32_t | offsety ) |
Create a new caret (cursor) of the specified size.
| Console | The console device to create the caret on |
| Width | The width of the new caret (Pixels for CONSOLE_MODE_PIXEL / Always 1 for CONSOLE_MODE_CHARACTER) |
| Height | The height of the new caret (Pixels for CONSOLE_MODE_PIXEL / Always 1 for CONSOLE_MODE_CHARACTER) |
| OffsetX | The X offset of the new caret (Optional)(Pixels for CONSOLE_MODE_PIXEL / Always 0 for CONSOLE_MODE_CHARACTER) |
| OffsetY | The Y offset of the new caret (Optional)(Pixels for CONSOLE_MODE_PIXEL / Always 0 for CONSOLE_MODE_CHARACTER) |
| uint32_t STDCALL console_device_delete_caret | ( | CONSOLE_DEVICE * | console, |
| HANDLE | handle ) |
Delete an existing caret (cursor).
| Console | The console device to delete the caret on |
| Handle | The handle of the caret to delete (as returned from ConsoleDeviceAddCaret) |
| uint32_t STDCALL console_device_update_caret | ( | CONSOLE_DEVICE * | console, |
| HANDLE | handle, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| BOOL | visible, | ||
| BOOL | blink ) |
Update an existing carets position, visibility or blink.
| Console | The console device to update the caret on |
| Handle | The handle of the caret to update (as returned from ConsoleDeviceAddCaret) |
| X | The X position of the caret (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y | The Y position of the caret (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Visible | If true then show the caret else hide it |
| Blink | If true then blink the caret at the default blink rate |
| uint32_t STDCALL console_device_update_caret_ex | ( | CONSOLE_DEVICE * | console, |
| HANDLE | handle, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | forecolor, | ||
| uint32_t | backcolor, | ||
| BOOL | visible, | ||
| BOOL | blink, | ||
| BOOL | reverse ) |
Update an existing carets position, colors, visibility, blink or reverse.
| Console | The console device to update the caret on |
| Handle | The handle of the caret to update (as returned from ConsoleDeviceAddCaret) |
| X | The X position of the caret (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y | The Y position of the caret (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Forecolor | The cursor foreground color if set or COLOR_NONE to disable |
| Backcolor | The cursor background color if set or COLOR_NONE to disable |
| Visible | If true then show the caret else hide it |
| Blink | If true then blink the caret at the default blink rate |
| Reverse | If true then enable reverse color else enable inverse color |
| uint32_t STDCALL console_device_set_cursor | ( | CONSOLE_DEVICE * | console, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| char * | chars ) |
Set the mouse cursor properties of a console device (CONSOLE_MODE_CHARACTER only).
| Console | The console device to set the cursor |
| Width | The width of the cursor in characters |
| Height | The height of the cursor in characters |
| Chars | A buffer containing the cursor characters |
| uint32_t STDCALL console_device_update_cursor | ( | CONSOLE_DEVICE * | console, |
| BOOL | enabled, | ||
| int32_t | x, | ||
| int32_t | y, | ||
| BOOL | relative ) |
Update the position and state for the mouse cursor of a console device (CONSOLE_MODE_CHARACTER only).
| Console | The console device to update the cursor |
| Enabled | If true then show the cursor else hide it |
| X | The cursor X location in characters |
| Y | The cursor Y location in characters |
| Relative | If true then X and Y are considered relative to the current position |
| uint32_t STDCALL console_device_get_position | ( | CONSOLE_DEVICE * | console, |
| uint32_t | position, | ||
| uint32_t * | x1, | ||
| uint32_t * | y1, | ||
| uint32_t * | x2, | ||
| uint32_t * | y2 ) |
Get the coordinates of a console position from a console device.
| Console | The console device to get from |
| Position | The console position to get the coordinates for (eg CONSOLE_POSITION_FULL) |
| X1 | The left edge of the console position (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y1 | The top edge of the console position (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| X2 | The right edge of the console position (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| Y2 | The bottom edge of the console position (Pixels for CONSOLE_MODE_PIXEL / Characters for CONSOLE_MODE_CHARACTER) |
| uint32_t STDCALL console_device_get_properties | ( | CONSOLE_DEVICE * | console, |
| CONSOLE_PROPERTIES * | properties ) |
Get the current properties from a console device.
| Console | The console device to get properties from |
| Properties | Pointer to a TConsoleProperties structure to return |
| BOOL STDCALL console_device_check_flag | ( | CONSOLE_DEVICE * | console, |
| uint32_t | flag ) |
Check if a console device supports a flag value.
| Console | The console device to check |
| Flag | The console flag to check (eg CONSOLE_FLAG_FULLSCREEN) |
| uint32_t STDCALL console_device_update_flag | ( | CONSOLE_DEVICE * | console, |
| uint32_t | flag, | ||
| BOOL | clear ) |
Set or clear a flag on a console device.
| Console | The console device to set or clear the flag on |
| Flag | The console flag to set or clear (eg CONSOLE_FLAG_LINE_WRAP) |
| Clear | If true clear the flag, else set it |
| uint32_t STDCALL console_device_get_mode | ( | CONSOLE_DEVICE * | console | ) |
Get the mode of a console device.
| Console | The console device to get from |
| uint32_t STDCALL console_device_get_state | ( | CONSOLE_DEVICE * | console | ) |
Get the state of a console device.
| Console | The console device to get from |
| CONSOLE_DEVICE *STDCALL console_device_create | ( | void | ) |
Create a new Console entry.
| CONSOLE_DEVICE *STDCALL console_device_create_ex | ( | uint32_t | size | ) |
Create a new Console entry.
| Size | Size in bytes to allocate for new Console (Including the Console entry) |
| uint32_t STDCALL console_device_destroy | ( | CONSOLE_DEVICE * | console | ) |
Destroy an existing Console entry.
| Console | The console device to destroy |
| uint32_t STDCALL console_device_register | ( | CONSOLE_DEVICE * | console | ) |
Register a new Console in the Console table.
| Console | The console device to register |
| uint32_t STDCALL console_device_deregister | ( | CONSOLE_DEVICE * | console | ) |
Deregister a Console from the Console table.
| Console | The console device to deregister |
| CONSOLE_DEVICE *STDCALL console_device_find | ( | uint32_t | consoleid | ) |
Find a console device by ID in the console table.
| ConsoleId | The ID number of the console to find |
| CONSOLE_DEVICE *STDCALL console_device_find_by_device | ( | DEVICE * | device | ) |
Find a console device by its related device in the console table.
| Device | Pointer to the related device to find |
| CONSOLE_DEVICE *STDCALL console_device_find_by_name | ( | const char * | name | ) |
Find a console device by name in the console table.
| Name | The name of the console to find (eg Console0) |
| CONSOLE_DEVICE *STDCALL console_device_find_by_description | ( | const char * | description | ) |
Find a console device by description in the console table.
| Description | The description of the console to find (eg Framebuffer Console (Framebuffer0)) |
| uint32_t STDCALL console_device_enumerate | ( | console_enumerate_cb | callback, |
| void * | data ) |
Enumerate all console devices in the console table.
| Callback | The callback function to call for each console in the table |
| Data | A private data pointer to pass to callback for each console in the table |
| uint32_t STDCALL console_device_notification | ( | CONSOLE_DEVICE * | console, |
| console_notification_cb | callback, | ||
| void * | data, | ||
| uint32_t | notification, | ||
| uint32_t | flags ) |
Register a notification for console device changes.
| Console | The console device to notify changes for (Optional, pass nil for all console devices) |
| Callback | The function to call when a notification event occurs |
| Data | A private data pointer to pass to callback when a notification event occurs |
| Notification | The events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER) |
| Flags | The flags to control the notification (eg NOTIFIER_FLAG_WORKER) |
| WINDOW_HANDLE STDCALL console_window_create | ( | CONSOLE_DEVICE * | console, |
| uint32_t | position, | ||
| BOOL | _default ) |
Create a new Console window.
Text Console Functions
| Console | The console device to create the new window on |
| Position | The console position to create the new window at (eg CONSOLE_POSITION_FULL) |
| Default | If true allow the new window to be the default window if there is no current default |
| WINDOW_HANDLE STDCALL console_window_create_ex | ( | CONSOLE_DEVICE * | console, |
| FONT_HANDLE | font, | ||
| uint32_t | size, | ||
| uint32_t | state, | ||
| uint32_t | mode, | ||
| uint32_t | position, | ||
| BOOL | _default ) |
Create a new Console window.
| Console | The console device to create the new window on |
| Font | The handle of the default font for the new console window |
| Size | The size in bytes to allocate for the new window entry (Defaults to SizeOf(TConsoleWindow)) |
| State | The state of the new console window (WINDOW_STATE_VISIBLE or WINDOW_STATE_INVISIBLE) |
| Mode | The mode of the new console window (Normally WINDOW_MODE_TEXT) |
| Position | The console position to create the new window at (eg CONSOLE_POSITION_FULL) |
| Default | If true allow the new window to be the default window if there is no current default |
| uint32_t STDCALL console_window_destroy | ( | WINDOW_HANDLE | handle | ) |
Close and Destroy an existing console window.
| Handle | The handle of the window to destroy |
| uint32_t STDCALL console_window_show | ( | WINDOW_HANDLE | handle | ) |
Make an existing console window visible and show it on screen.
| Handle | The handle of the window to show |
| uint32_t STDCALL console_window_hide | ( | WINDOW_HANDLE | handle | ) |
Make an existing console window invisible and hide it on screen.
| Handle | The handle of the window to hide |
| uint32_t STDCALL console_window_activate | ( | WINDOW_HANDLE | handle | ) |
Make an existing console window the active window.
| Handle | The handle of the window to activate |
| uint32_t STDCALL console_window_deactivate | ( | WINDOW_HANDLE | handle | ) |
Make an existing console window inactive.
| Handle | The handle of the window to deactivate |
| WINDOW_HANDLE STDCALL console_window_next | ( | CONSOLE_DEVICE * | console, |
| BOOL | visible ) |
Get the next console window starting with the active window.
| Console | The console device to change the active window on |
| Visible | If true only return windows that are visible |
| WINDOW_HANDLE STDCALL console_window_previous | ( | CONSOLE_DEVICE * | console, |
| BOOL | visible ) |
Get the previous console window starting with the active window.
| Console | The console device to change the active window on |
| Visible | If true only return windows that are visible |
| WINDOW_HANDLE STDCALL console_window_at | ( | CONSOLE_DEVICE * | console, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| BOOL | visible ) |
Find the console window that X and Y coordinates are within.
| Console | The console device to find the window on |
| X | The X coordinate to find the window for |
| Y | The Y coordinate to find the window for |
| Visible | If true only return windows that are visible |
| WINDOW_HANDLE STDCALL console_window_find | ( | CONSOLE_DEVICE * | console, |
| uint32_t | position ) |
Find an existing console window in the position specified.
| Console | The console device to find the window on |
| Position | The window position to find (eg CONSOLE_POSITION_FULL) |
| uint32_t STDCALL console_window_enumerate | ( | CONSOLE_DEVICE * | console, |
| console_window_enumerate_cb | callback, | ||
| void * | data ) |
Enumerate existing console windows on the specified console device.
| Console | The console device to enumerate windows for |
| Callback | The function to call for each window enumerated |
| Data | A pointer to private data to be passed to the callback (Optional) |
| BOOL STDCALL console_window_check_flag | ( | WINDOW_HANDLE | handle, |
| uint32_t | flag ) |
Check an existing console window to determine if a flag is set or not.
| Handle | The handle of the window to check |
| Flag | The window flag to check for (eg WINDOW_FLAG_LINE_WRAP) |
| uint32_t STDCALL console_window_update_flag | ( | WINDOW_HANDLE | handle, |
| uint32_t | flag, | ||
| BOOL | clear ) |
Set or clear a flag on an existing console window.
| Handle | The handle of the window to set or clear the flag on |
| Flag | The window flag to set or clear (eg WINDOW_FLAG_LINE_WRAP) |
| Clear | If true clear the flag, else set it |
| uint32_t STDCALL console_window_get_mode | ( | WINDOW_HANDLE | handle | ) |
Get the window mode of an existing console window.
| Handle | The handle of the window to get the mode for |
| uint32_t STDCALL console_window_get_state | ( | WINDOW_HANDLE | handle | ) |
Get the window state of an existing console window.
| Handle | The handle of the window to get the state for |
| uint32_t STDCALL console_window_get_position | ( | WINDOW_HANDLE | handle | ) |
Get the position of an existing console window.
| Handle | The handle of the window to get the position for |
| uint32_t STDCALL console_window_set_position | ( | WINDOW_HANDLE | handle, |
| uint32_t | position ) |
Set the position of an existing console window.
| Handle | The handle of the window to set the position for |
| Position | The new window position to set |
| uint32_t STDCALL console_window_get_properties | ( | WINDOW_HANDLE | handle, |
| WINDOW_PROPERTIES * | properties ) |
Get the properties for the specified console window.
| Handle | The handle of the window to get the properties from |
| Properties | Pointer to a TWindowProperties structure to fill in |
| uint32_t STDCALL console_window_get_min_x | ( | WINDOW_HANDLE | handle | ) |
Get the current minimum X of the window viewport for an existing console window.
| Handle | The handle of the window to get MinX for |
| uint32_t STDCALL console_window_get_min_y | ( | WINDOW_HANDLE | handle | ) |
Get the current minimum Y of the window viewport for an existing console window.
| Handle | The handle of the window to get MinY for |
| uint32_t STDCALL console_window_get_max_x | ( | WINDOW_HANDLE | handle | ) |
Get the current maximum X of the window viewport for an existing console window.
| Handle | The handle of the window to get MaxX for |
| uint32_t STDCALL console_window_get_max_y | ( | WINDOW_HANDLE | handle | ) |
Get the current maximum Y of the window viewport for an existing console window.
| Handle | The handle of the window to get MaxY for |
| CONSOLE_RECT STDCALL console_window_get_rect | ( | WINDOW_HANDLE | handle | ) |
Get the rectangle X1,Y1,X2,Y2 of the window viewport for an existing console window.
| Handle | The handle of the window to get the rectangle for |
| uint32_t STDCALL console_window_set_rect | ( | WINDOW_HANDLE | handle, |
| CONSOLE_RECT * | rect ) |
Set the rectangle X1,Y1,X2,Y2 of the window viewport for an existing console window.
| Handle | The handle of the window to set the rectangle for |
| Rect | The rectangle to set for the window viewport |
| uint32_t STDCALL console_window_reset_rect | ( | WINDOW_HANDLE | handle | ) |
Reset the window viewport for an existing console window to the maximum size.
| Handle | The handle of the window to reset the viewport for |
| uint32_t STDCALL console_window_get_viewport | ( | WINDOW_HANDLE | handle, |
| uint32_t * | x1, | ||
| uint32_t * | y1, | ||
| uint32_t * | x2, | ||
| uint32_t * | y2 ) |
Get the X1,Y1,X2,Y2 of the window viewport for an existing console window.
| Handle | The handle of the window to get the viewport for |
| X1 | The left edge of the current viewport |
| Y1 | The top edge of the current viewport |
| X2 | The right edge of the current viewport |
| Y2 | The bottom edge of the current viewport |
| uint32_t STDCALL console_window_set_viewport | ( | WINDOW_HANDLE | handle, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2 ) |
Set the X1,Y1,X2,Y2 of the window viewport for an existing console window.
| Handle | The handle of the window to get the viewport for |
| X1 | The left edge of the window viewport |
| Y1 | The top edge of the window viewport |
| X2 | The right edge of the window viewport |
| Y2 | The bottom edge of the window viewport |
| uint32_t STDCALL console_window_reset_viewport | ( | WINDOW_HANDLE | handle | ) |
Reset the window viewport for an existing console window to the maximum size.
| Handle | The handle of the window to reset the viewport for |
| uint32_t STDCALL console_window_get_x | ( | WINDOW_HANDLE | handle | ) |
Get the current X (Column) position of an existing console window.
| Handle | The handle of the window to get X for |
| uint32_t STDCALL console_window_set_x | ( | WINDOW_HANDLE | handle, |
| uint32_t | x ) |
Set the current X (Column) position of an existing console window.
| Handle | The handle of the window to set X for |
| X | The new X value to set |
| uint32_t STDCALL console_window_get_y | ( | WINDOW_HANDLE | handle | ) |
Get the current Y (Row) position of an existing console window.
| Handle | The handle of the window to get Y for |
| uint32_t STDCALL console_window_set_y | ( | WINDOW_HANDLE | handle, |
| uint32_t | y ) |
Set the current Y (Row) position of an existing console window.
| Handle | The handle of the window to set Y for |
| Y | The new Y value to set |
| uint32_t STDCALL console_window_get_xy | ( | WINDOW_HANDLE | handle, |
| uint32_t * | x, | ||
| uint32_t * | y ) |
Get the current X and Y positions of an existing console window.
| Handle | The handle of the window to get X and Y for |
| X | The returned X value |
| Y | The returned Y value |
| uint32_t STDCALL console_window_set_xy | ( | WINDOW_HANDLE | handle, |
| uint32_t | x, | ||
| uint32_t | y ) |
Set the current X and Y positions of an existing console window.
| Handle | The handle of the window to set X and Y for |
| X | The new X value |
| Y | The new Y value |
| CONSOLE_POINT STDCALL console_window_get_point | ( | WINDOW_HANDLE | handle | ) |
Get the point X,Y of an existing console window.
| Handle | The handle of the window to get the point for |
| uint32_t STDCALL console_window_set_point | ( | WINDOW_HANDLE | handle, |
| CONSOLE_POINT * | point ) |
Set the point X,Y of an existing console window.
| Handle | The handle of the window to set the point for |
| Point | The new point to set for the window |
| uint32_t STDCALL console_window_get_cols | ( | WINDOW_HANDLE | handle | ) |
Get the current columns of the window viewport for an existing console window.
| Handle | The handle of the window to get columns for |
| uint32_t STDCALL console_window_get_rows | ( | WINDOW_HANDLE | handle | ) |
Get the current rows of the window viewport for an existing console window.
| Handle | The handle of the window to get rows for |
| uint32_t STDCALL console_window_get_width | ( | WINDOW_HANDLE | handle | ) |
Get the absolute width of an existing console window.
| Handle | The handle of the window to get the width for |
| uint32_t STDCALL console_window_get_height | ( | WINDOW_HANDLE | handle | ) |
Get the absolute height of an existing console window.
| Handle | The handle of the window to get the height for |
| uint32_t STDCALL console_window_get_format | ( | WINDOW_HANDLE | handle | ) |
Get the color format of an existing console window.
| Handle | The handle of the window to get the format for |
| uint32_t STDCALL console_window_get_forecolor | ( | WINDOW_HANDLE | handle | ) |
Get the current foreground color of an existing console window.
| Handle | The handle of the window to get the foreground color for |
| uint32_t STDCALL console_window_set_forecolor | ( | WINDOW_HANDLE | handle, |
| uint32_t | color ) |
Set the current foreground color of an existing console window.
| Handle | The handle of the window to set the foreground color for |
| Color | The foreground color to set (eg COLOR_WHITE) |
| uint32_t STDCALL console_window_get_backcolor | ( | WINDOW_HANDLE | handle | ) |
Get the current background color of an existing console window.
| Handle | The handle of the window to get the background color for |
| uint32_t STDCALL console_window_set_backcolor | ( | WINDOW_HANDLE | handle, |
| uint32_t | color ) |
Set the current background color of an existing console window.
| Handle | The handle of the window to set the background color for |
| Color | The background color to set (eg COLOR_BLACK) |
| FONT_HANDLE STDCALL console_window_get_font | ( | WINDOW_HANDLE | handle | ) |
Get the default font of an existing console window.
| Handle | The handle of the window to get the default font for |
| uint32_t STDCALL console_window_set_font | ( | WINDOW_HANDLE | handle, |
| FONT_HANDLE | font ) |
Set the default font of an existing console window.
| Handle | The handle of the window to set the default font for |
| Font | The font handle of the default font to set |
| uint32_t STDCALL console_window_get_cursor_xy | ( | WINDOW_HANDLE | handle, |
| uint32_t * | x, | ||
| uint32_t * | y ) |
Get the current cursor X and Y positions of an existing console window.
| Handle | The handle of the window to get cursor X and Y for |
| X | The returned cursor X value |
| Y | The returned cursor Y value |
| uint32_t STDCALL console_window_set_cursor_xy | ( | WINDOW_HANDLE | handle, |
| uint32_t | x, | ||
| uint32_t | y ) |
Set the current cursor X and Y positions of an existing console window.
| Handle | The handle of the window to set cursor X and Y for |
| X | The new cursor X value |
| Y | The new cursor Y value |
| CURSOR_MODE STDCALL console_window_get_cursor_mode | ( | WINDOW_HANDLE | handle | ) |
Get the current cursor mode of an existing console window.
| Handle | The handle of the window to get the mode for |
| uint32_t STDCALL console_window_set_cursor_mode | ( | WINDOW_HANDLE | handle, |
| CURSOR_MODE | cursormode ) |
Set the current cursor mode of an existing console window.
| Handle | The handle of the window to set the mode for |
| CursorMode | The cursor mode to set (eg CURSOR_MODE_INSERT) |
| BOOL STDCALL console_window_get_cursor_blink | ( | WINDOW_HANDLE | handle | ) |
Get the current cursor blink state of an existing console window.
| Handle | The handle of the window to get blink state for |
| uint32_t STDCALL console_window_set_cursor_blink | ( | WINDOW_HANDLE | handle, |
| BOOL | cursorblink ) |
Set the current cursor blink state of an existing console window.
| Handle | The handle of the window to set the blink state for |
| CursorBlink | True to enable blink, False to disable |
| CURSOR_STATE STDCALL console_window_get_cursor_state | ( | WINDOW_HANDLE | handle | ) |
Get the current cursor state of an existing console window.
| Handle | The handle of the window to get the state for |
| uint32_t STDCALL console_window_set_cursor_state | ( | WINDOW_HANDLE | handle, |
| CURSOR_STATE | cursorstate ) |
Set the current cursor state of an existing console window.
| Handle | The handle of the window to set the state for |
| CursorState | The cursor state to set (eg CURSOR_STATE_ON) |
| CURSOR_SHAPE STDCALL console_window_get_cursor_shape | ( | WINDOW_HANDLE | handle | ) |
Get the current cursor shape of an existing console window.
| Handle | The handle of the window to get the shape for |
| uint32_t STDCALL console_window_set_cursor_shape | ( | WINDOW_HANDLE | handle, |
| CURSOR_SHAPE | cursorshape ) |
Set the current cursor shape of an existing console window.
| Handle | The handle of the window to set the shape for |
| CursorShape | The cursor shape to set (eg CURSOR_SHAPE_LINE) |
| uint32_t STDCALL console_window_get_cursor_color | ( | WINDOW_HANDLE | handle | ) |
Get the current cursor color of an existing console window.
| Handle | The handle of the window to get cursor color for |
| uint32_t STDCALL console_window_set_cursor_color | ( | WINDOW_HANDLE | handle, |
| uint32_t | color ) |
Set the current cursor color of an existing console window.
| Handle | The handle of the window to set the cursor color for |
| Color | The cursor color to set (eg COLOR_WHITE) |
| BOOL STDCALL console_window_get_cursor_reverse | ( | WINDOW_HANDLE | handle | ) |
Get the current cursor reverse state of an existing console window.
| Handle | The handle of the window to get reverse state for |
| uint32_t STDCALL console_window_set_cursor_reverse | ( | WINDOW_HANDLE | handle, |
| BOOL | cursorreverse ) |
Set the current cursor reverse state of an existing console window.
| Handle | The handle of the window to set the reverse state for |
| CursorReverse | True to enable reverse color, False to enable inverse color |
| uint32_t STDCALL console_window_cursor_on | ( | WINDOW_HANDLE | handle | ) |
Enable the cursor on an existing console window.
| Handle | The handle of the window to enable the cursor for |
| uint32_t STDCALL console_window_cursor_off | ( | WINDOW_HANDLE | handle | ) |
Disable the cursor on an existing console window.
| Handle | The handle of the window to disable the cursor for |
| uint32_t STDCALL console_window_cursor_line | ( | WINDOW_HANDLE | handle | ) |
Change the cursor to a vertical line on an existing console window.
| Handle | The handle of the window to change the cursor for |
| uint32_t STDCALL console_window_cursor_bar | ( | WINDOW_HANDLE | handle | ) |
Change the cursor to a horizontal bar on an existing console window.
| Handle | The handle of the window to change the cursor for |
| uint32_t STDCALL console_window_cursor_block | ( | WINDOW_HANDLE | handle | ) |
Change the cursor to a solid block on an existing console window.
| Handle | The handle of the window to change the cursor for |
| uint32_t STDCALL console_window_cursor_move | ( | WINDOW_HANDLE | handle, |
| uint32_t | x, | ||
| uint32_t | y ) |
Move the cursor on an existing console window.
| Handle | The handle of the window to move the cursor for |
| X | The column to move the cursor to |
| Y | The row to move the cursor to |
| uint32_t STDCALL console_window_cursor_blink | ( | WINDOW_HANDLE | handle, |
| BOOL | enabled ) |
Set the blink state of the cursor on an existing console window.
| Handle | The handle of the window to set the blink state for |
| Enabled | True if the cursor is blinking, False if not |
| uint32_t STDCALL console_window_cursor_color | ( | WINDOW_HANDLE | handle, |
| uint32_t | color ) |
Set the color of the cursor on an existing console window.
| Handle | The handle of the window to set the color for |
| Color | The cursor color to set (eg COLOR_WHITE) |
| uint32_t STDCALL console_window_cursor_reverse | ( | WINDOW_HANDLE | handle, |
| BOOL | enabled ) |
Set the reverse state of the cursor on an existing console window.
| Handle | The handle of the window to set the reverse state for |
| Enabled | True if the cursor shows in reverse colors, False if it shows in inverse colors |
| uint32_t STDCALL console_window_add_history | ( | WINDOW_HANDLE | handle, |
| const char * | value ) |
Add a value to the command history table of an existing console window.
| Handle | The handle of the window to add to |
| Value | The text to add to the command history |
| uint32_t STDCALL console_window_clear_history | ( | WINDOW_HANDLE | handle | ) |
Remove all entries from the command history table of an existing console window.
| Handle | The handle of the window to clear |
| uint32_t STDCALL console_window_first_history | ( | WINDOW_HANDLE | handle, |
| char * | value, | ||
| uint32_t | len ) |
Get the first (oldest) command history value from an existing console window.
| Handle | The handle of the window to get from |
| uint32_t STDCALL console_window_last_history | ( | WINDOW_HANDLE | handle, |
| char * | value, | ||
| uint32_t | len ) |
Get the last (most recent) command history value from an existing console window.
| Handle | The handle of the window to get from |
| uint32_t STDCALL console_window_next_history | ( | WINDOW_HANDLE | handle, |
| char * | value, | ||
| uint32_t | len ) |
Get the next (after current) command history value from an existing console window.
| Handle | The handle of the window to get from |
| uint32_t STDCALL console_window_previous_history | ( | WINDOW_HANDLE | handle, |
| char * | value, | ||
| uint32_t | len ) |
Get the next (before current) command history value from an existing console window.
| Handle | The handle of the window to get from |
| uint32_t STDCALL console_window_current_history | ( | WINDOW_HANDLE | handle, |
| char * | value, | ||
| uint32_t | len ) |
Get the current command history value from an existing console window.
| Handle | The handle of the window to get from |
| uint32_t STDCALL console_window_scroll_up | ( | WINDOW_HANDLE | handle, |
| uint32_t | row, | ||
| uint32_t | lines ) |
Scroll the current viewport of an existing console window up.
| Handle | The handle of the window to scroll |
| Row | The starting row (Y) for the scroll up, all rows from top plus Lines down to Row will be scrolled up |
| Lines | The number of character lines to scroll up, Lines number of rows at the top will be discarded |
| uint32_t STDCALL console_window_scroll_down | ( | WINDOW_HANDLE | handle, |
| uint32_t | row, | ||
| uint32_t | lines ) |
Scroll the current viewport of an existing console window down.
| Handle | The handle of the window to scroll |
| Row | The starting row (Y) for the scroll down, all rows from bottom minus Lines up to Row will be scrolled down |
| Lines | The number of character lines to scroll down, Lines number of rows at the bottom will be discarded |
| uint32_t STDCALL console_window_scroll_left | ( | WINDOW_HANDLE | handle, |
| uint32_t | row, | ||
| uint32_t | col, | ||
| uint32_t | lines, | ||
| uint32_t | chars ) |
Scroll the current viewport of an existing console window left.
| Handle | The handle of the window to scroll |
| Row | The starting row (Y) for the scroll left, all rows from Row down to Row + Lines will be scrolled left |
| Lines | The number of rows to scroll left, all rows from Row down to Row + Lines will be scrolled left |
| Col | The starting column (X) for the scroll left, all cols from left plus Chars to Col with be scrolled left |
| Chars | The number of characters to scroll left, Chars number of columns at the left will be discarded |
| uint32_t STDCALL console_window_scroll_right | ( | WINDOW_HANDLE | handle, |
| uint32_t | row, | ||
| uint32_t | col, | ||
| uint32_t | lines, | ||
| uint32_t | chars ) |
Scroll the current viewport of an existing console window right.
| Handle | The handle of the window to scroll |
| Row | The starting row (Y) for the scroll right, all rows from Row down to Row + Lines will be scrolled right |
| Lines | The number of rows to scroll right, all rows from Row down to Row + Lines will be scrolled right |
| Col | The starting column (X) for the scroll right, all rows from right minus Chars to Col will be scrolled right |
| Chars | The number of characters to scroll right, Chars number of columns at the right will be discarded |
| uint32_t STDCALL console_window_clear | ( | WINDOW_HANDLE | handle | ) |
Clear the current viewport of an existing console window.
| Handle | The handle of the window to clear |
| uint32_t STDCALL console_window_clear_ex | ( | WINDOW_HANDLE | handle, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| BOOL | cursor ) |
Clear part of the the current viewport of an existing console window.
| Handle | The handle of the window to clear |
| X1 | The left edge of the area to clear (relative to current viewport) |
| Y1 | The top edge of the area to clear (relative to current viewport) |
| X2 | The right edge of the area to clear (relative to current viewport) |
| Y2 | The bottom edge of the area to clear (relative to current viewport) |
| Cursor | If True update the cursor position after clearing |
| uint32_t STDCALL console_window_write | ( | WINDOW_HANDLE | handle, |
| const char * | text ) |
Write text on an existing console window at the current position in the current color.
| Handle | The handle of the window to write text on |
| Text | The text to write |
| uint32_t STDCALL console_window_write_ex | ( | WINDOW_HANDLE | handle, |
| const char * | text, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | forecolor, | ||
| uint32_t | backcolor ) |
Write text on an existing console window.
| Handle | The handle of the window to write text on |
| Text | The text to write |
| X | The column to start writing the text at |
| Y | The row to start writing the text at |
| Forecolor | The foreground color to use (eg COLOR_WHITE) |
| Backcolor | The background color to use (eg COLOR_BLACK) |
| uint32_t STDCALL console_window_write_ln | ( | WINDOW_HANDLE | handle, |
| const char * | text ) |
Write text on an existing console window at the current position in the current color.
| Handle | The handle of the window to write text on |
| Text | The text to write |
| uint32_t STDCALL console_window_write_ln_ex | ( | WINDOW_HANDLE | handle, |
| const char * | text, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | forecolor, | ||
| uint32_t | backcolor ) |
Write text on an existing console window.
| Handle | The handle of the window to write text on |
| Text | The text to write |
| X | The column to start writing the text at |
| Y | The row to start writing the text at |
| Forecolor | The foreground color to use (eg COLOR_WHITE) |
| Backcolor | The background color to use (eg COLOR_BLACK) |
| uint32_t STDCALL console_window_write_chr | ( | WINDOW_HANDLE | handle, |
| char | ch ) |
Write a character on an existing console window at the current position in the current color.
| Handle | The handle of the window to write the character on |
| Chr | The character to write |
| uint32_t STDCALL console_window_write_chr_ex | ( | WINDOW_HANDLE | handle, |
| char | ch, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | forecolor, | ||
| uint32_t | backcolor ) |
Write a character on an existing console window.
| Handle | The handle of the window to write the character on |
| Chr | The character to write |
| X | The column to start writing the character at |
| Y | The row to start writing the character at |
| Forecolor | The foreground color to use (eg COLOR_WHITE) |
| Backcolor | The background color to use (eg COLOR_BLACK) |
| uint32_t STDCALL console_window_output | ( | WINDOW_HANDLE | handle, |
| CONSOLE_POINT * | source, | ||
| CONSOLE_POINT * | dest, | ||
| CONSOLE_CHAR * | buffer, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | skip ) |
Output a rectangular area of text to a console window.
| Handle | The console window to output to |
| Source | The X and Y point in the source buffer to copy text from (Characters) |
| Dest | The X and Y point on the console window to copy text to (Characters) |
| Buffer | A pointer to a buffer of TConsoleChar structures which represent rows of text |
| Width | The width of the area to be output (Characters) |
| Height | The height of the area to be output (Characters) |
| Skip | The number of characters to skip in the buffer after each row (Optional) |
| uint32_t STDCALL console_window_read | ( | WINDOW_HANDLE | handle, |
| char * | text, | ||
| uint32_t * | len ) |
Read text input from the console and echo to an existing console window at the current position in the current color.
| Handle | The handle of the window to echo input to |
| Text | The text read from the console on return |
| uint32_t STDCALL console_window_read_ln | ( | WINDOW_HANDLE | handle, |
| char * | text, | ||
| uint32_t * | len ) |
Read text input from the console and echo to an existing console window at the current position in the current color.
| Handle | The handle of the window to echo input to |
| Text | The text read from the console on return |
| uint32_t STDCALL console_window_read_ln_ex | ( | WINDOW_HANDLE | handle, |
| char * | text, | ||
| uint32_t * | len, | ||
| char * | prompt, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | forecolor, | ||
| uint32_t | backcolor, | ||
| BOOL | scroll, | ||
| BOOL | history, | ||
| console_window_completion_cb | completion, | ||
| void * | data ) |
Read text input from the console and echo to an existing console window at the specified position in the specified color.
| Handle | The handle of the window to echo input to |
| Text | The text read from the console on return |
| Prompt | An optional text prompt to display at the start of the line |
| X | The starting X position for the output (0 for current position) |
| Y | The starting Y position for the output (0 for current position) |
| Forecolor | The text forecolor for the output (COLOR_NONE for current color) |
| Backcolor | The text backcolor for the output (COLOR_NONE for current color) |
| Scroll | If true then scroll up one line on return |
| History | If true then support console history buffer using Up, Down and F3 keys |
| uint32_t STDCALL console_window_read_chr | ( | WINDOW_HANDLE | handle, |
| char * | ch ) |
Read one character input from the console and echo to an existing console window at the current position in the current color.
| Handle | The handle of the window to echo input to |
| Chr | The character read from the console on return |
| uint32_t STDCALL console_window_read_chr_ex | ( | WINDOW_HANDLE | handle, |
| char * | ch, | ||
| char * | prompt, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | forecolor, | ||
| uint32_t | backcolor, | ||
| BOOL | echo, | ||
| BOOL | scroll ) |
Read one character input from the console and optionally echo to an existing console window at the specified position in the specified color.
| Handle | The handle of the window to echo input to |
| Chr | The character read from the console on return |
| Prompt | An optional text prompt to display at the start of the line |
| X | The starting X position for the output (0 for current position) |
| Y | The starting Y position for the output (0 for current position) |
| Forecolor | The text forecolor for the output (COLOR_NONE for current color) |
| Backcolor | The text backcolor for the output (COLOR_NONE for current color) |
| Echo | If true then echo the character to the console window |
| Scroll | If true then scroll up one line on return |
| int STDCALL console_window_printf | ( | WINDOW_HANDLE | handle, |
| const char * | format, | ||
| ... ) |
Print formatted text to an existing console window at the current position in the current color.
| Handle | The handle of the window to print to |
| Format | The formatted text to print (As per printf in standard C library) |
Compatible with RTL Crt unit function ClrEol.
CRT Console Functions
| void STDCALL console_clr_scr | ( | void | ) |
Compatible with RTL Crt unit function ClrScr.
| void STDCALL console_delay | ( | uint16_t | ms | ) |
Compatible with RTL Crt unit function Delay.
| void STDCALL console_del_line | ( | void | ) |
Compatible with RTL Crt unit function DelLine.
| void STDCALL console_goto_xy | ( | int | x, |
| int | y ) |
Compatible with RTL Crt unit function GotoXY.
| void STDCALL console_high_video | ( | void | ) |
Compatible with RTL Crt unit function HighVideo.
| void STDCALL console_ins_line | ( | void | ) |
Compatible with RTL Crt unit function InsLine.
Compatible with RTL Crt unit function KeyPressed.
| void STDCALL console_low_video | ( | void | ) |
Compatible with RTL Crt unit function LowVideo.
| void STDCALL console_norm_video | ( | void | ) |
Compatible with RTL Crt unit function NormVideo.
| void STDCALL console_no_sound | ( | void | ) |
Compatible with RTL Crt unit function NoSound.
| char STDCALL console_read_key | ( | void | ) |
Compatible with RTL Crt unit function ReadKey.
| void STDCALL console_sound | ( | uint16_t | hz | ) |
Compatible with RTL Crt unit function Sound.
| void STDCALL console_text_background | ( | uint32_t | color | ) |
Compatible with RTL Crt unit function TextBackground.
| void STDCALL console_text_color | ( | uint32_t | color | ) |
Compatible with RTL Crt unit function TextColor.
| void STDCALL console_text_mode | ( | int | mode | ) |
Compatible with RTL Crt unit function TextMode.
| int STDCALL console_where_x | ( | void | ) |
Compatible with RTL Crt unit function WhereX.
| int STDCALL console_where_y | ( | void | ) |
Compatible with RTL Crt unit function WhereY.
| void STDCALL console_window | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2 ) |
Compatible with RTL Crt unit function Window.
| void STDCALL console_scroll_up | ( | int | row, |
| int | lines ) |
Scroll the default console window up.
| Row | The starting row (Y) for the scroll up, all rows from top plus Lines down to Row will be scrolled up |
| Lines | The number of character lines to scroll up, Lines number of rows at the top will be discarded |
| void STDCALL console_scroll_down | ( | int | row, |
| int | lines ) |
Scroll the default console window down.
| Row | The starting row (Y) for the scroll down, all rows from bottom minus Lines up to Row will be scrolled down |
| Lines | The number of character lines to scroll down, Lines number of rows at the bottom will be discarded |
| void STDCALL console_write | ( | const char * | text | ) |
Write text on the default console window at the current position in the current color.
| Text | The text to write |
| void STDCALL console_write_ln | ( | const char * | text | ) |
Write text on the default console window at the current position in the current color.
| Text | The text to write |
| void STDCALL console_write_chr | ( | char | ch | ) |
Write a character on the default console window at the current position in the current color.
| Chr | The character to write |
| void STDCALL console_read | ( | char * | text, |
| uint32_t * | len ) |
Read text from console input and echo to the screen.
| Text | The text read from the console input |
| void STDCALL console_read_ln | ( | char * | text, |
| uint32_t * | len ) |
Read text from console input and echo to the screen.
| Text | The text read from the console input |
| void STDCALL console_read_chr | ( | char * | ch | ) |
Read a character from console input and echo to the screen.
| Chr | The character read from the console input |
| int STDCALL console_printf | ( | const char * | format, |
| ... ) |
Print formatted text to the default console window at the current position in the current color.
| Format | The formatted text to print (As per printf in standard C library) |
Get the current console device count.
Console Helper Functions
| CONSOLE_DEVICE *STDCALL console_device_get_default | ( | void | ) |
Get the current default console device.
| uint32_t STDCALL console_device_set_default | ( | CONSOLE_DEVICE * | console | ) |
Set the current default console device.
| CONSOLE_DEVICE *STDCALL console_device_check | ( | CONSOLE_DEVICE * | console | ) |
Check if the supplied Console device is in the Console table.
| CONSOLE_CARET *STDCALL console_device_caret_check | ( | CONSOLE_DEVICE * | console, |
| CONSOLE_CARET * | caret ) |
Check if a console caret entry is valid.
| Console | The console device to search for the caret |
| Caret | The caret entry to check for validity |
| uint32_t STDCALL console_type_to_string | ( | uint32_t | consoletype, |
| char * | value, | ||
| uint32_t | len ) |
Convert a Console type value to a string.
| uint32_t STDCALL console_state_to_string | ( | uint32_t | consolestate, |
| char * | value, | ||
| uint32_t | len ) |
Convert a Console state value to a string.
| FONT_HANDLE STDCALL console_device_get_default_font | ( | void | ) |
Get the default console font.
| uint32_t STDCALL console_position_to_string | ( | uint32_t | position, |
| char * | value, | ||
| uint32_t | len ) |
| uint32_t STDCALL console_window_get_count | ( | CONSOLE_DEVICE * | console | ) |
Get the current console window count.
Text Console Helper Functions
| Console | The console device to get the window count for |
| WINDOW_HANDLE STDCALL console_window_get_active | ( | CONSOLE_DEVICE * | console | ) |
Get the current console active window.
| Console | The console device to get the active window for |
| WINDOW_HANDLE STDCALL console_window_get_default | ( | CONSOLE_DEVICE * | console | ) |
Get the current console default window.
| Console | The console device to get the default window for |
| uint32_t STDCALL console_window_set_default | ( | CONSOLE_DEVICE * | console, |
| WINDOW_HANDLE | handle ) |
Set the current console default window.
| Console | The console device to set the default window for |
| CONSOLE_WINDOW *STDCALL console_window_check | ( | CONSOLE_DEVICE * | console, |
| CONSOLE_WINDOW * | window ) |
Check if a console window entry is valid.
| Console | The console device to search for the window |
| Window | The window entry to check for validity |
| uint32_t STDCALL console_window_state_to_string | ( | uint32_t | windowstate, |
| char * | value, | ||
| uint32_t | len ) |
Convert a Console Window state value to a string.
| uint32_t STDCALL console_window_mode_to_string | ( | uint32_t | windowmode, |
| char * | value, | ||
| uint32_t | len ) |
Convert a Console Window mode value to a string.
| FONT_HANDLE STDCALL console_window_get_default_font | ( | void | ) |
Get the default console window font.
| BOOL STDCALL console_window_redirect_output | ( | WINDOW_HANDLE | handle | ) |
Redirect standard output to the console window specified by Handle.
| Handle | The window handle to redirect output to (or INVALID_HANDLE_VALUE to stop redirection) |