VIRTUTECH CONFIDENTIAL Previous - Up - Next
gfx-console
- Provided by
-
x11-console
- Class Hierarchy
-
conf-object → log-object → conf-object → log-object → gfx-console
- Interfaces Implemented
-
log_object, event_poster
- Description
-
The graphics-console class implements a graphical console with up to 256 colors, representing a computer screen. Several consoles may be present at any time. It also supports input of keyboard and mouse events. The objects of the graphics-console class should be connected to a graphics card device, and a keyboard/mouse device.
Attributes
- Attributes inherited from class conf-object
-
attributes, classname, component, iface, name, object_id, queue
- Attributes inherited from class log-object
-
access_count, log_buffer, log_buffer_last, log_buffer_size, log_group_mask, log_groups, log_level, log_type_mask
- Attributes inherited from class conf-object
-
attributes, classname, component, iface, name, object_id, queue
- Attributes inherited from class log-object
-
access_count, log_buffer, log_buffer_last, log_buffer_size, log_group_mask, log_groups, log_level, log_type_mask
- Attribute List
-
- auto_release
- Optional attribute; read/write access; type: Integer.
Flag whether the graphics-console automatically shall send a release event when the window focus is lost and keys still are pressed
- break
- Pseudo attribute; read-only access; ; string indexed; indexed type: Integer.
(source_obj, filename). Activate a graphical breakpoint previously saved to filename. Returns a breakpoint id.
- delete
- Pseudo attribute; write-only access; type: Integer.
Delete breakpoint with given id.
- depth
- Optional attribute; read/write access; type: Integer.
The simulated depth.
- double_x_limit
- Optional attribute; read/write access; type: Integer.
If the width of the console is less than this value the width of every pixel will be doubled.
- double_y_limit
- Optional attribute; read/write access; type: Integer.
If the hight of the console is less than this value the hight of every pixel will be doubled.
- fullscreen
- Session attribute; read/write access; type: Integer.
Set fullscreen mode. The console will only run in fullscreen while input grabbing is active. Note that not all graphics-console implementations support fullscreen.
- grab_button
- Optional attribute; read/write access; type: String.
One of left, middle and right The grab button specifies which mouse button that is used to grab and ungrab input for the console.
- grab_modifier
- Optional attribute; read/write access; type: String.
One of control, shift, alt and none. The modifier key used for grabbing and ungrabbing input for the console. When a modifier is selected, pressing only the middle mouse button cause the console to send this button event to the simulator. Currently only the left side modifier are interpreted.
- grab_ungrab
- Pseudo attribute; read/write access; type: Integer.
Set to one to grab the mouse, clear to ungrab.
- input_enable
- Optional attribute; read/write access; type: Integer.
Enable keyboard and mouse input to the console.
- input_key_event
- Pseudo attribute; write-only access; type: [ii].
Set to a enter a key event. The first list element is 0 for key down, 1 for key up. The second list element is the key code.
- kbd_event_queue
- Optional attribute; read/write access; type: [[ii]*].
Keyboard event queue.
- kbd_type
- Session attribute; read/write access; type: String.
One of PC, Sun, Mac or X11. By default the x11-console tries to find out what kind of keyboard that is connected to Simics, and use the raw key-codes from it. Since raw key-codes are used, the simulated machine must be setup with the same keyboard layout as the host. If the identification fails, Simics will use X11 cooked key symbols. The 'kbd_type' attribute allows manual setting of the keyboard type.
- keyboard
- Optional attribute; read/write access; type: Object or Nil.
The console's keyboard device.
- microm_x
- Session attribute; read/write access; type: Integer.
Micrometers per horizontal pixel.
- microm_y
- Session attribute; read/write access; type: Integer.
Micrometers per vertical pixel.
- mouse
- Optional attribute; read/write access; type: Object.
The console's mouse device.
- poll_rate
- Optional attribute; read/write access; type: Integer.
How often input is checked (Hz).
- refresh
- Pseudo attribute; write-only access; type: a.
If set the console will be completely redrawn.
- rgb_colors
- Optional attribute; read/write access; type: [[iii]{256}].
((r, g, b){256}) The color palette. 256 colors.
- save_bmp
- Pseudo attribute; write-only access; type: String.
Save current console bitmap as a BMP file.
- save_break
- Pseudo attribute; write-only access; type: [siiiis].
(source_obj, filename, left, top, right, bottom, comment). Saves a graphical breakpoint rectangle (top,left)->(bottom,right)to filename.
- title
- Optional attribute; read/write access; type: String.
Window title.
- try_open
- Optional attribute; read/write access; type: Integer.
If set to 1, the window will be opened. Close with 0.
- video
- Optional attribute; read/write access; type: Object.
The console's video device. Used to import video breakpoint functions.
- x_size
- Required attribute; read/write access; type: Integer.
The width of the console.
- y_size
- Required attribute; read/write access; type: Integer.
The height of the console.
Command List
- Commands defined by interface log_object
-
log, log-group, log-level, log-size, log-type
- Commands
-
Command Descriptions
-
<gfx-console>.auto-release
- Synopsis
-
<gfx-console>.auto-release [state]
- Description
-
Get or set the auto-release attribute on the gfx-console.
If set, automatic release events will be sent for any keys
still pressed when the window focus is lost.
-
<gfx-console>.break
- Synopsis
-
<gfx-console>.break filename
- Description
-
Activates a previously saved breakpoint specified by filename
and returns a breakpoint id. When a graphical breakpoint is reached it
is immediately deleted and a hap with id "Gfx_Break_String" is
triggered. If no callbacks for this hap were registered Simics halts
execution and returns to the command prompt.
-
<gfx-console>.close
- Synopsis
-
<gfx-console>.close
- Description
-
Close the console window.
- See Also
-
<gfx-console>.open
-
<gfx-console>.delete
- Synopsis
-
<gfx-console>.delete id
- Description
-
Delete breakpoint given by id
-
<gfx-console>.disable-input
- Synopsis
-
<gfx-console>.disable-input
- Description
-
Ignore all inputs received from the console.
Use this command to avoid sending input to the
simulated machine if determinism is desired.
- See Also
-
<gfx-console>.enable-input
-
<gfx-console>.enable-input
- Synopsis
-
<gfx-console>.enable-input
- Description
-
Enable inputs from the console. New consoles will have
input enabled.
- See Also
-
<gfx-console>.disable-input
-
<gfx-console>.grab-setup
- Synopsis
-
<gfx-console>.grab-setup ["button"] ["modifier"]
- Description
-
The grab button specifies which mouse button that is used to grab
and ungrab input for the console. A keyboard modifier can also be
specified that must be pressed for grabbing to occur. Valid buttons
are left, middle and right, while valid modifiers are alt, control,
shift and none. Only the left side modifier are currently used.
When called with no arguments, the currently selected button and
modifier will be printed.
-
<gfx-console>.input
- Synopsis
-
<gfx-console>.input "string" [-e]
- Description
-
Input string on console.
The -e switch enables emacs-style keystrokes. The following characters are
accepted: 'C' (Control), 'A' (Alt), 'Del', 'Up', 'Down', 'Left', 'Right',
'Esc', 'F1' to 'F12' and 'Enter'. They can be combined using the '-'
character. For example "C-a" will input Control and a pressed
together. "C-A-Del" will produce the famous Control-Alt-Del sequence.
-
<gfx-console>.open
- Synopsis
-
<gfx-console>.open
- Description
-
Open the console window.
- See Also
-
<gfx-console>.close
-
<gfx-console>.poll-rate
- Synopsis
-
<gfx-console>.poll-rate [rate]
- Description
-
Set the rate for inputs polling and display updates.
The rate for updates is the only argument, and specified
in Hz (simulated time). Default is 1000, but this may vary depending on
the config file used. When called with no arguments, the
current polling frequency is reported.
-
<gfx-console>.refresh
- Synopsis
-
<gfx-console>.refresh
- Description
-
Redraws all changes to the graphics console
The console display is normally only updated at intervals
specified by the poll-rate command. This command
causes the (full) display to be redrawn.
-
<gfx-console>.save-bmp
- Synopsis
-
<gfx-console>.save-bmp filename
- Description
-
This command saves the current console window contents to an image
file in BMP format.
-
<gfx-console>.save-break-xy
- Synopsis
-
<gfx-console>.save-break-xy filename left top right bottom ["comment"]
- Description
-
Lets the user select a rectangular area inside the graphics console by
specifying the top left corner (left, top) and the bottom
right corner (right, bottom). The selected area will be
saved as a binary graphical breakpoint file. An optional comment may be added
that will be put in the beginning of the file.
-
<gfx-console>.switch-to-text-console
- Synopsis
-
<gfx-console>.switch-to-text-console
- Description
-
Replace the graphics with a text console.
VIRTUTECH CONFIDENTIAL Previous - Up - Next