![]() |
Ultibo API
C/C++ API for Ultibo Core
|
Go to the source code of this file.
Typedefs | |
| typedef console_window_enumerate_cb | graphics_window_enumerate_cb |
| typedef CONSOLE_WINDOW | GRAPHICS_WINDOW |
Functions | |
| WINDOW_HANDLE STDCALL | graphics_window_create (CONSOLE_DEVICE *console, uint32_t position) |
| Create a new Graphics window. | |
| WINDOW_HANDLE STDCALL | graphics_window_create_ex (CONSOLE_DEVICE *console, FONT_HANDLE font, uint32_t size, uint32_t state, uint32_t mode, uint32_t position) |
| Create a new Graphics window. | |
| uint32_t STDCALL | graphics_window_destroy (WINDOW_HANDLE handle) |
| Close and Destroy an existing console window. | |
| uint32_t STDCALL | graphics_window_show (WINDOW_HANDLE handle) |
| Make an existing console window visible and show it on screen. | |
| uint32_t STDCALL | graphics_window_hide (WINDOW_HANDLE handle) |
| Make an existing console window invisible and hide it on screen. | |
| uint32_t STDCALL | graphics_window_activate (WINDOW_HANDLE handle) |
| Make an existing console window the active window. | |
| uint32_t STDCALL | graphics_window_deactivate (WINDOW_HANDLE handle) |
| Make an existing console window inactive. | |
| WINDOW_HANDLE STDCALL | graphics_window_next (CONSOLE_DEVICE *console, BOOL visible) |
| Get the next console window starting with the active window. | |
| WINDOW_HANDLE STDCALL | graphics_window_previous (CONSOLE_DEVICE *console, BOOL visible) |
| Get the previous console window starting with the active window. | |
| WINDOW_HANDLE STDCALL | graphics_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 | graphics_window_find (CONSOLE_DEVICE *console, uint32_t position) |
| Find an existing console window in the position specified. | |
| uint32_t STDCALL | graphics_window_enumerate (CONSOLE_DEVICE *console, graphics_window_enumerate_cb callback, void *data) |
| Enumerate existing console windows on the specified console device. | |
| BOOL STDCALL | graphics_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 | graphics_window_update_flag (WINDOW_HANDLE handle, uint32_t flag, BOOL clear) |
| Set or clear a flag on an existing console window. | |
| uint32_t STDCALL | graphics_window_get_mode (WINDOW_HANDLE handle) |
| Get the window mode of an existing console window. | |
| uint32_t STDCALL | graphics_window_get_state (WINDOW_HANDLE handle) |
| Get the window state of an existing console window. | |
| uint32_t STDCALL | graphics_window_get_position (WINDOW_HANDLE handle) |
| Get the position of an existing console window. | |
| uint32_t STDCALL | graphics_window_set_position (WINDOW_HANDLE handle, uint32_t position) |
| Set the position of an existing console window. | |
| uint32_t STDCALL | graphics_window_get_properties (WINDOW_HANDLE handle, WINDOW_PROPERTIES *properties) |
| Get the properties for the specified console window. | |
| uint32_t STDCALL | graphics_window_get_min_x (WINDOW_HANDLE handle) |
| Get the current minimum X of the window viewport for an existing console window. | |
| uint32_t STDCALL | graphics_window_get_min_y (WINDOW_HANDLE handle) |
| Get the current minimum Y of the window viewport for an existing console window. | |
| uint32_t STDCALL | graphics_window_get_max_x (WINDOW_HANDLE handle) |
| Get the current maximum X of the window viewport for an existing console window. | |
| uint32_t STDCALL | graphics_window_get_max_y (WINDOW_HANDLE handle) |
| Get the current maximum Y of the window viewport for an existing console window. | |
| CONSOLE_RECT STDCALL | graphics_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 | graphics_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 | graphics_window_reset_rect (WINDOW_HANDLE handle) |
| Reset the window viewport for an existing console window to the maximum size. | |
| uint32_t STDCALL | graphics_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 | graphics_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 | graphics_window_reset_viewport (WINDOW_HANDLE handle) |
| Reset the window viewport for an existing console window to the maximum size. | |
| uint32_t STDCALL | graphics_window_get_cols (WINDOW_HANDLE handle) |
| Get the current columns of the window viewport for an existing console window. | |
| uint32_t STDCALL | graphics_window_get_rows (WINDOW_HANDLE handle) |
| Get the current rows of the window viewport for an existing console window. | |
| uint32_t STDCALL | graphics_window_get_width (WINDOW_HANDLE handle) |
| Get the absolute width of an existing console window. | |
| uint32_t STDCALL | graphics_window_get_height (WINDOW_HANDLE handle) |
| Get the absolute height of an existing console window. | |
| uint32_t STDCALL | graphics_window_get_format (WINDOW_HANDLE handle) |
| Get the color format of an existing console window. | |
| uint32_t STDCALL | graphics_window_get_forecolor (WINDOW_HANDLE handle) |
| Get the current foreground color of an existing console window. | |
| uint32_t STDCALL | graphics_window_set_forecolor (WINDOW_HANDLE handle, uint32_t color) |
| Set the current foreground color of an existing console window. | |
| uint32_t STDCALL | graphics_window_get_backcolor (WINDOW_HANDLE handle) |
| Get the current background color of an existing console window. | |
| uint32_t STDCALL | graphics_window_set_backcolor (WINDOW_HANDLE handle, uint32_t color) |
| Set the current background color of an existing console window. | |
| FONT_HANDLE STDCALL | graphics_window_get_font (WINDOW_HANDLE handle) |
| Get the default font of an existing console window. | |
| uint32_t STDCALL | graphics_window_set_font (WINDOW_HANDLE handle, FONT_HANDLE font) |
| Set the default font of an existing console window. | |
| uint32_t STDCALL | graphics_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 | graphics_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 | graphics_window_get_cursor_mode (WINDOW_HANDLE handle) |
| Get the current cursor mode of an existing console window. | |
| uint32_t STDCALL | graphics_window_set_cursor_mode (WINDOW_HANDLE handle, CURSOR_MODE cursormode) |
| Set the current cursor mode of an existing console window. | |
| BOOL STDCALL | graphics_window_get_cursor_blink (WINDOW_HANDLE handle) |
| Get the current cursor blink state of an existing console window. | |
| uint32_t STDCALL | graphics_window_set_cursor_blink (WINDOW_HANDLE handle, BOOL cursorblink) |
| Set the current cursor blink state of an existing console window. | |
| CURSOR_STATE STDCALL | graphics_window_get_cursor_state (WINDOW_HANDLE handle) |
| Get the current cursor state of an existing console window. | |
| uint32_t STDCALL | graphics_window_set_cursor_state (WINDOW_HANDLE handle, CURSOR_STATE cursorstate) |
| Set the current cursor state of an existing console window. | |
| CURSOR_SHAPE STDCALL | graphics_window_get_cursor_shape (WINDOW_HANDLE handle) |
| Get the current cursor shape of an existing console window. | |
| uint32_t STDCALL | graphics_window_set_cursor_shape (WINDOW_HANDLE handle, CURSOR_SHAPE cursorshape) |
| Set the current cursor shape of an existing console window. | |
| uint32_t STDCALL | graphics_window_cursor_on (WINDOW_HANDLE handle) |
| Enable the cursor on an existing console window. | |
| uint32_t STDCALL | graphics_window_cursor_off (WINDOW_HANDLE handle) |
| Disable the cursor on an existing console window. | |
| uint32_t STDCALL | graphics_window_cursor_line (WINDOW_HANDLE handle) |
| Change the cursor to a vertical line on an existing console window. | |
| uint32_t STDCALL | graphics_window_cursor_bar (WINDOW_HANDLE handle) |
| Change the cursor to a horizontal bar on an existing console window. | |
| uint32_t STDCALL | graphics_window_cursor_block (WINDOW_HANDLE handle) |
| Change the cursor to a solid block on an existing console window. | |
| uint32_t STDCALL | graphics_window_cursor_move (WINDOW_HANDLE handle, uint32_t x, uint32_t y) |
| Move the cursor on an existing console window. | |
| uint32_t STDCALL | graphics_window_cursor_blink (WINDOW_HANDLE handle, BOOL enabled) |
| Set the blink state of the cursor on an existing console window. | |
| uint32_t STDCALL | graphics_window_clear (WINDOW_HANDLE handle) |
| Clear the current viewport of an existing console window. | |
| uint32_t STDCALL | graphics_window_clear_ex (WINDOW_HANDLE handle, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color) |
| Clear part of the the current viewport of an existing console window. | |
| uint32_t STDCALL | graphics_window_draw_box (WINDOW_HANDLE handle, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color, uint32_t width) |
| Draw a rectangular box outline on an existing console window. | |
| uint32_t STDCALL | graphics_window_draw_line (WINDOW_HANDLE handle, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color, uint32_t width) |
| Draw a line on an existing console window. | |
| uint32_t STDCALL | graphics_window_draw_block (WINDOW_HANDLE handle, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t color) |
| Draw a rectangular filled block on an existing console window. | |
| uint32_t STDCALL | graphics_window_draw_circle (WINDOW_HANDLE handle, uint32_t x, uint32_t y, uint32_t color, uint32_t width, uint32_t radius) |
| Draw a circle on an existing console window. | |
| uint32_t STDCALL | graphics_window_draw_char (WINDOW_HANDLE handle, char ch, uint32_t x, uint32_t y) |
| Draw a character on an existing console window. | |
| uint32_t STDCALL | graphics_window_draw_char_ex (WINDOW_HANDLE handle, FONT_HANDLE font, char ch, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor) |
| Draw a character on an existing console window. | |
| uint32_t STDCALL | graphics_window_draw_text (WINDOW_HANDLE handle, const char *text, uint32_t x, uint32_t y) |
| Draw a text string on an existing console window. | |
| uint32_t STDCALL | graphics_window_draw_text_ex (WINDOW_HANDLE handle, FONT_HANDLE font, const char *text, uint32_t x, uint32_t y, uint32_t forecolor, uint32_t backcolor) |
| Draw a text string on an existing console window. | |
| uint32_t STDCALL | graphics_window_draw_pixel (WINDOW_HANDLE handle, uint32_t x, uint32_t y, uint32_t color) |
| Draw a single pixel on an existing console window. | |
| uint32_t STDCALL | graphics_window_draw_image (WINDOW_HANDLE handle, uint32_t x, uint32_t y, void *image, uint32_t width, uint32_t height, uint32_t format) |
| Draw an image on an existing console window. | |
| uint32_t STDCALL | graphics_window_get_pixel (WINDOW_HANDLE handle, uint32_t x, uint32_t y) |
| Get a single pixel from an existing console window. | |
| uint32_t STDCALL | graphics_window_get_image (WINDOW_HANDLE handle, uint32_t x, uint32_t y, void *image, uint32_t width, uint32_t height, uint32_t format) |
| Get an image from an existing console window. | |
| uint32_t STDCALL | graphics_window_copy_image (WINDOW_HANDLE handle, CONSOLE_POINT *source, CONSOLE_POINT *dest, uint32_t width, uint32_t height) |
| Copy an image from one place to another in an existing console window. | |
| uint32_t STDCALL | graphics_window_move_image (WINDOW_HANDLE handle, CONSOLE_POINT *source, CONSOLE_POINT *dest, uint32_t width, uint32_t height, uint32_t fillcolor) |
| Move an image from one place to another in an existing console window. | |
| uint32_t STDCALL | graphics_window_image_size (WINDOW_HANDLE handle, uint32_t width, uint32_t height, uint32_t format, uint32_t stride) |
| Calculate the size in bytes of an image that is Width by Height in the color format specified. | |
| uint32_t STDCALL | graphics_window_get_count (CONSOLE_DEVICE *console) |
| Get the current console window count. | |
| WINDOW_HANDLE STDCALL | graphics_window_get_active (CONSOLE_DEVICE *console) |
| Get the current console active window. | |
| GRAPHICS_WINDOW *STDCALL | graphics_window_check (CONSOLE_DEVICE *console, GRAPHICS_WINDOW *window) |
| Check if a console window entry is valid. | |
Graphics Console specific constants Graphics Console specific types Graphics Window Enumeration Callback
| typedef CONSOLE_WINDOW GRAPHICS_WINDOW |
Graphics Window
| WINDOW_HANDLE STDCALL graphics_window_create | ( | CONSOLE_DEVICE * | console, |
| uint32_t | position ) |
Create a new Graphics window.
Graphics 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) |
| WINDOW_HANDLE STDCALL graphics_window_create_ex | ( | CONSOLE_DEVICE * | console, |
| FONT_HANDLE | font, | ||
| uint32_t | size, | ||
| uint32_t | state, | ||
| uint32_t | mode, | ||
| uint32_t | position ) |
Create a new Graphics 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(TGraphicsWindow)) |
| 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_GRAPHICS) |
| Position | The console position to create the new window at (eg CONSOLE_POSITION_FULL) |
| uint32_t STDCALL graphics_window_destroy | ( | WINDOW_HANDLE | handle | ) |
Close and Destroy an existing console window.
| Handle | The handle of the window to destroy |
| uint32_t STDCALL graphics_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 graphics_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 graphics_window_activate | ( | WINDOW_HANDLE | handle | ) |
Make an existing console window the active window.
| Handle | The handle of the window to activate |
| uint32_t STDCALL graphics_window_deactivate | ( | WINDOW_HANDLE | handle | ) |
Make an existing console window inactive.
| Handle | The handle of the window to deactivate |
| WINDOW_HANDLE STDCALL graphics_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 graphics_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 graphics_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 graphics_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 graphics_window_enumerate | ( | CONSOLE_DEVICE * | console, |
| graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 CURSORLINE) |
| uint32_t STDCALL graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_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 graphics_window_clear_ex | ( | WINDOW_HANDLE | handle, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| uint32_t | color ) |
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) |
| Color | The fill color for the area to clear (eg COLOR_WHITE) |
| uint32_t STDCALL graphics_window_draw_box | ( | WINDOW_HANDLE | handle, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| uint32_t | color, | ||
| uint32_t | width ) |
Draw a rectangular box outline on an existing console window.
| Handle | The handle of the window to draw on |
| X1 | The left edge of the box (relative to current viewport) |
| Y1 | The top edge of the box (relative to current viewport) |
| X2 | The right edge of the box (relative to current viewport) |
| Y2 | The bottom edge of the box (relative to current viewport) |
| Color | The color to draw with (eg COLOR_WHITE) |
| Width | The width of the box outline |
| uint32_t STDCALL graphics_window_draw_line | ( | WINDOW_HANDLE | handle, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| uint32_t | color, | ||
| uint32_t | width ) |
Draw a line on an existing console window.
| Handle | The handle of the window to draw on |
| X1 | The left starting point of the line (relative to current viewport) |
| Y1 | The top starting point of the line (relative to current viewport) |
| X2 | The right ending point of the line (relative to current viewport) |
| Y2 | The bottom ending point of the line (relative to current viewport) |
| Color | The color to draw with (eg COLOR_WHITE) |
| Width | The width of the line |
| uint32_t STDCALL graphics_window_draw_block | ( | WINDOW_HANDLE | handle, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| uint32_t | color ) |
Draw a rectangular filled block on an existing console window.
| Handle | The handle of the window to draw on |
| X1 | The left edge of the block (relative to current viewport) |
| Y1 | The top edge of the block (relative to current viewport) |
| X2 | The right edge of the block (relative to current viewport) |
| Y2 | The bottom edge of the block (relative to current viewport) |
| Color | The color to draw with (eg COLOR_WHITE) |
| uint32_t STDCALL graphics_window_draw_circle | ( | WINDOW_HANDLE | handle, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | color, | ||
| uint32_t | width, | ||
| uint32_t | radius ) |
Draw a circle on an existing console window.
| Handle | The handle of the window to draw on |
| X | The left starting point of the circle (relative to current viewport) |
| Y | The top starting point of the circle (relative to current viewport) |
| Color | The color to draw with (eg COLOR_WHITE) |
| Width | The width of the circle outline |
| Radius | The radius of the circle |
| uint32_t STDCALL graphics_window_draw_char | ( | WINDOW_HANDLE | handle, |
| char | ch, | ||
| uint32_t | x, | ||
| uint32_t | y ) |
Draw a character on an existing console window.
| Handle | The handle of the window to draw on |
| Ch | The character to draw |
| X | The left starting point of the character (relative to current viewport) |
| Y | The top starting point of the character (relative to current viewport) |
| uint32_t STDCALL graphics_window_draw_char_ex | ( | WINDOW_HANDLE | handle, |
| FONT_HANDLE | font, | ||
| char | ch, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | forecolor, | ||
| uint32_t | backcolor ) |
Draw a character on an existing console window.
| Handle | The handle of the window to draw on |
| Font | The handle of the font to draw the character with |
| Ch | The character to draw |
| X | The left starting point of the character (relative to current viewport) |
| Y | The top starting point of the character (relative to current viewport) |
| Forecolor | The foreground color for the character (eg COLOR_WHITE) |
| Backcolor | The background color for the character (eg COLOR_BLACK) |
| uint32_t STDCALL graphics_window_draw_text | ( | WINDOW_HANDLE | handle, |
| const char * | text, | ||
| uint32_t | x, | ||
| uint32_t | y ) |
Draw a text string on an existing console window.
| Handle | The handle of the window to draw on |
| Text | The text to draw |
| X | The left starting point of the text (relative to current viewport) |
| Y | The top starting point of the text (relative to current viewport) |
| uint32_t STDCALL graphics_window_draw_text_ex | ( | WINDOW_HANDLE | handle, |
| FONT_HANDLE | font, | ||
| const char * | text, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | forecolor, | ||
| uint32_t | backcolor ) |
Draw a text string on an existing console window.
| Handle | The handle of the window to draw on |
| Font | The handle of the font to draw the text with |
| Text | The text to draw |
| X | The left starting point of the text (relative to current viewport) |
| Y | The top starting point of the text (relative to current viewport) |
| Forecolor | The foreground color for the text (eg COLOR_WHITE) |
| Backcolor | The background color for the text (eg COLOR_BLACK) |
| uint32_t STDCALL graphics_window_draw_pixel | ( | WINDOW_HANDLE | handle, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | color ) |
Draw a single pixel on an existing console window.
| Handle | The handle of the window to draw on |
| X | The column for the pixel (relative to current viewport) |
| Y | The row for the pixel (relative to current viewport) |
| Color | The color for the pixel (eg COLOR_WHITE) |
| uint32_t STDCALL graphics_window_draw_image | ( | WINDOW_HANDLE | handle, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| void * | image, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | format ) |
Draw an image on an existing console window.
| Handle | The handle of the window to draw on |
| X | The left starting point of the image (relative to current viewport) |
| Y | The top starting point of the image (relative to current viewport) |
| Image | Pointer to the image data in a contiguous block of pixel rows |
| Width | The width in pixels of a row in the image data |
| Height | The height in pixels of all rows in the image data |
| Format | The color format of the image data (eg COLOR_FORMAT_ARGB32) Pass COLOR_FORMAT_UNKNOWN to use the window format |
| uint32_t STDCALL graphics_window_get_pixel | ( | WINDOW_HANDLE | handle, |
| uint32_t | x, | ||
| uint32_t | y ) |
Get a single pixel from an existing console window.
| Handle | The handle of the window to get from |
| X | The column of the pixel (relative to current viewport) |
| Y | The row of the pixel (relative to current viewport) |
| uint32_t STDCALL graphics_window_get_image | ( | WINDOW_HANDLE | handle, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| void * | image, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | format ) |
Get an image from an existing console window.
| Handle | The handle of the window to get from |
| X | The left starting point of the image (relative to current viewport) |
| Y | The top starting point of the image (relative to current viewport) |
| Image | Pointer to a block of memory large enough to hold the image in a contiguous block of pixel rows |
| Width | The width in pixels of a row of the image |
| Height | The height in pixels of all rows of the image |
| Format | The color format to store in the image data (eg COLOR_FORMAT_ARGB32) Pass COLOR_FORMAT_UNKNOWN to use the window format |
| uint32_t STDCALL graphics_window_copy_image | ( | WINDOW_HANDLE | handle, |
| CONSOLE_POINT * | source, | ||
| CONSOLE_POINT * | dest, | ||
| uint32_t | width, | ||
| uint32_t | height ) |
Copy an image from one place to another in an existing console window.
| Handle | The handle of the window to copy from and to |
| Source | The starting point (X,Y) to copy the image from |
| Dest | The starting point (X,Y) to copy the image to |
| Width | The width in pixels of each row of the image |
| Height | The height in pixels of all rows of the image |
| uint32_t STDCALL graphics_window_move_image | ( | WINDOW_HANDLE | handle, |
| CONSOLE_POINT * | source, | ||
| CONSOLE_POINT * | dest, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | fillcolor ) |
Move an image from one place to another in an existing console window.
| Handle | The handle of the window to copy from and to |
| Source | The starting point (X,Y) to copy the image from |
| Dest | The starting point (X,Y) to copy the image to |
| Width | The width in pixels of each row of the image |
| Height | The height in pixels of all rows of the image |
| Fillcolor | The color to fill the area where the image was moved from (COLOR_NONE for no fill, same as copy) |
| uint32_t STDCALL graphics_window_image_size | ( | WINDOW_HANDLE | handle, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | format, | ||
| uint32_t | stride ) |
Calculate the size in bytes of an image that is Width by Height in the color format specified.
| Handle | The handle of the window for the image |
| Width | The width of the image in pixels |
| Height | The height of the image in pixels |
| Format | The color format to use for the calculation (eg COLOR_FORMAT_ARGB32) Pass COLOR_FORMAT_UNKNOWN to use the window format |
| Stride | The distance in bytes between each row of pixels (Optional) |
| uint32_t STDCALL graphics_window_get_count | ( | CONSOLE_DEVICE * | console | ) |
Get the current console window count.
Graphics Console Helper Functions
| Console | The console device to get the window count for |
| WINDOW_HANDLE STDCALL graphics_window_get_active | ( | CONSOLE_DEVICE * | console | ) |
Get the current console active window.
| Console | The console device to get the active window for |
| GRAPHICS_WINDOW *STDCALL graphics_window_check | ( | CONSOLE_DEVICE * | console, |
| GRAPHICS_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 |