gfx_con
is implemented by graphics consoles of class
graphcon and is used by attached video devices to update the
screen.
The set_color method sets the specified indexed palette color. The return value has no meaning.
The set_size method sets the size of the displayed screen.
The put_pixelmethod sets the pixel at (x, y) to the specified palette color. The change will only be visible after the next call to redraw.
The put_pixel_rgb method sets the pixel at (x,
y) to the color rgb, which should be in
GFX_xRGB_8888
format. The change will only be visible after the
next call to redraw.
The put_pixel_col method sets the pixel at (x, y) to the color defined by r, g and b. The change will only be visible after the next call to redraw.
The put_block method draws pixels from a memory block to the screen rectangle described by (minx, miny, maxx, maxy); the upper bounds are inclusive. The block parameter refers to the source memory block, whose rows should be src_stride bytes long. Memory on each row outside the rectangle is not accessed. The src_fmt parameter specifies the pixel format in block. The change will only be visible after the next call to redraw.
The redraw method updates the changed parts of the console screen window, so should typically be called at the end of every frame update.
The update_keyboard_leds method changes the keyboard LEDs.
The led_change parameter must be one of the KBD_
constants from simics/model-iface/sim-keys.h
.
SIM_INTERFACE(gfx_con) { int (*set_color)(conf_object_t *obj, uint8 index, uint8 r, uint8 g, uint8 b); void (*set_size)(conf_object_t *obj, int width, int height); void (*put_pixel)(conf_object_t *obj, int x, int y, uint8 index); void (*put_pixel_rgb)(conf_object_t *obj, int x, int y, uint32 rgb); #ifndef PYWRAP void (*put_block_old)(conf_object_t *obj, uint8 *src, int minx, int miny, int maxx, int maxy, int src_fmt, int src_stride, int unused); #endif void (*redraw)(conf_object_t *obj); void (*update_keyboard_leds)(conf_object_t *obj, int led_change); void (*put_pixel_col)(conf_object_t *obj, int x, int y, int r, int g, int b); void (*put_block)(conf_object_t *obj, bytes_t block, int minx, int miny, int maxx, int maxy, gfx_con_pixel_fmt_t src_fmt, int src_stride); }; #define GFX_CON_INTERFACE "gfx_con"