gui.h File Reference


Detailed Description

Contains the definitions for the bx_gui_c base class used for interfacing with SDL and other device interfaces.

Id
gui.h,v 1.9 2008/03/14 15:31:29 iamcamiel Exp

X-1.8 Camiel Vanderhoeven 11-MAR-2008 Named, debuggable mutexes.

X-1.7 Camiel Vanderhoeven 05-MAR-2008 Multi-threading version.

X-1.6 David Leonard 20-FEB-2008 Avoid 'Xlib: unexpected async reply' errors on Linux/Unix/BSD's by adding some thread interlocking.

X-1.5 Camiel Vanderhoeven 20-JAN-2008 Avoid compiler warnings.

X-1.4 Camiel Vanderhoeven 02-JAN-2008 Comments.

X-1.3 Camiel Vanderhoeven 10-DEC-2007 Use Configurator.

X-1.2 Camiel Vanderhoeven 7-DEC-2007 Code cleanup.

X-1.1 Camiel Vanderhoeven 6-DEC-2007 Initial version for ES40 emulator.

Definition in file gui.h.

#include "vga.h"

Go to the source code of this file.

Data Structures

struct  bx_vga_tminfo_t
 VGA mode information for GUI. More...
struct  bx_svga_tileinfo_t
 VGA tile information for GUI. More...
class  bx_gui_c
 Abstract base class for GUI implementations. More...

Defines

#define BX_DEBUG(a)
#define BX_INFO(a)   BX_DEBUG(a)
#define BX_PANIC(a)   BX_DEBUG(a)
#define BX_ERROR(a)   BX_DEBUG(a)
#define BX_KEY_PRESSED   0x00000000
#define BX_KEY_RELEASED   0x80000000
#define BX_KEY_UNHANDLED   0x10000000
#define BX_KEY_CTRL_L   0
#define BX_KEY_SHIFT_L   1
#define BX_KEY_F1   2
#define BX_KEY_F2   3
#define BX_KEY_F3   4
#define BX_KEY_F4   5
#define BX_KEY_F5   6
#define BX_KEY_F6   7
#define BX_KEY_F7   8
#define BX_KEY_F8   9
#define BX_KEY_F9   10
#define BX_KEY_F10   11
#define BX_KEY_F11   12
#define BX_KEY_F12   13
#define BX_KEY_CTRL_R   14
#define BX_KEY_SHIFT_R   15
#define BX_KEY_CAPS_LOCK   16
#define BX_KEY_NUM_LOCK   17
#define BX_KEY_ALT_L   18
#define BX_KEY_ALT_R   19
#define BX_KEY_A   20
#define BX_KEY_B   21
#define BX_KEY_C   22
#define BX_KEY_D   23
#define BX_KEY_E   24
#define BX_KEY_F   25
#define BX_KEY_G   26
#define BX_KEY_H   27
#define BX_KEY_I   28
#define BX_KEY_J   29
#define BX_KEY_K   30
#define BX_KEY_L   31
#define BX_KEY_M   32
#define BX_KEY_N   33
#define BX_KEY_O   34
#define BX_KEY_P   35
#define BX_KEY_Q   36
#define BX_KEY_R   37
#define BX_KEY_S   38
#define BX_KEY_T   39
#define BX_KEY_U   40
#define BX_KEY_V   41
#define BX_KEY_W   42
#define BX_KEY_X   43
#define BX_KEY_Y   44
#define BX_KEY_Z   45
#define BX_KEY_0   46
#define BX_KEY_1   47
#define BX_KEY_2   48
#define BX_KEY_3   49
#define BX_KEY_4   50
#define BX_KEY_5   51
#define BX_KEY_6   52
#define BX_KEY_7   53
#define BX_KEY_8   54
#define BX_KEY_9   55
#define BX_KEY_ESC   56
#define BX_KEY_SPACE   57
#define BX_KEY_SINGLE_QUOTE   58
#define BX_KEY_COMMA   59
#define BX_KEY_PERIOD   60
#define BX_KEY_SLASH   61
#define BX_KEY_SEMICOLON   62
#define BX_KEY_EQUALS   63
#define BX_KEY_LEFT_BRACKET   64
#define BX_KEY_BACKSLASH   65
#define BX_KEY_RIGHT_BRACKET   66
#define BX_KEY_MINUS   67
#define BX_KEY_GRAVE   68
#define BX_KEY_BACKSPACE   69
#define BX_KEY_ENTER   70
#define BX_KEY_TAB   71
#define BX_KEY_LEFT_BACKSLASH   72
#define BX_KEY_PRINT   73
#define BX_KEY_SCRL_LOCK   74
#define BX_KEY_PAUSE   75
#define BX_KEY_INSERT   76
#define BX_KEY_DELETE   77
#define BX_KEY_HOME   78
#define BX_KEY_END   79
#define BX_KEY_PAGE_UP   80
#define BX_KEY_PAGE_DOWN   81
#define BX_KEY_KP_ADD   82
#define BX_KEY_KP_SUBTRACT   83
#define BX_KEY_KP_END   84
#define BX_KEY_KP_DOWN   85
#define BX_KEY_KP_PAGE_DOWN   86
#define BX_KEY_KP_LEFT   87
#define BX_KEY_KP_RIGHT   88
#define BX_KEY_KP_HOME   89
#define BX_KEY_KP_UP   90
#define BX_KEY_KP_PAGE_UP   91
#define BX_KEY_KP_INSERT   92
#define BX_KEY_KP_DELETE   93
#define BX_KEY_KP_5   94
#define BX_KEY_UP   95
#define BX_KEY_DOWN   96
#define BX_KEY_LEFT   97
#define BX_KEY_RIGHT   98
#define BX_KEY_KP_ENTER   99
#define BX_KEY_KP_MULTIPLY   100
#define BX_KEY_KP_DIVIDE   101
#define BX_KEY_WIN_L   102
#define BX_KEY_WIN_R   103
#define BX_KEY_MENU   104
#define BX_KEY_ALT_SYSREQ   105
#define BX_KEY_CTRL_BREAK   106
#define BX_KEY_INT_BACK   107
#define BX_KEY_INT_FORWARD   108
#define BX_KEY_INT_STOP   109
#define BX_KEY_INT_MAIL   110
#define BX_KEY_INT_SEARCH   111
#define BX_KEY_INT_FAV   112
#define BX_KEY_INT_HOME   113
#define BX_KEY_POWER_MYCOMP   114
#define BX_KEY_POWER_CALC   115
#define BX_KEY_POWER_SLEEP   116
#define BX_KEY_POWER_POWER   117
#define BX_KEY_POWER_WAKE   118
#define BX_KEY_NBKEYS   119
#define IMPLEMENT_GUI_PLUGIN_CODE(gui_name)

Variables

class bx_gui_cbx_gui


Define Documentation

#define BX_DEBUG (  ) 

#define BX_ERROR (  )     BX_DEBUG(a)

#define BX_INFO (  )     BX_DEBUG(a)

#define BX_KEY_0   46

Definition at line 228 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_1   47

Definition at line 229 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_2   48

Definition at line 230 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_3   49

Definition at line 231 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_4   50

Definition at line 232 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_5   51

Definition at line 233 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_6   52

Definition at line 234 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_7   53

Definition at line 235 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_8   54

Definition at line 236 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_9   55

Definition at line 237 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_A   20

Definition at line 201 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_ALT_L   18

Definition at line 198 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_ALT_R   19

Definition at line 199 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_ALT_SYSREQ   105

Definition at line 299 of file gui.h.

#define BX_KEY_B   21

Definition at line 202 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_BACKSLASH   65

Definition at line 251 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_BACKSPACE   69

Definition at line 256 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_C   22

Definition at line 203 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_CAPS_LOCK   16

Definition at line 196 of file gui.h.

Referenced by bx_sdl_gui_c::handle_events(), sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_COMMA   59

Definition at line 243 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_CTRL_BREAK   106

Definition at line 300 of file gui.h.

#define BX_KEY_CTRL_L   0

Definition at line 178 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_CTRL_R   14

Definition at line 194 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_D   23

Definition at line 204 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_DELETE   77

Definition at line 266 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_DOWN   96

Definition at line 287 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_E   24

Definition at line 205 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_END   79

Definition at line 268 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_ENTER   70

Definition at line 257 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_EQUALS   63

Definition at line 248 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_ESC   56

Definition at line 239 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_F   25

Definition at line 206 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_F1   2

Definition at line 181 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_F10   11

Definition at line 190 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_F11   12

Definition at line 191 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_F12   13

Definition at line 192 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_F2   3

Definition at line 182 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_F3   4

Definition at line 183 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_F4   5

Definition at line 184 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_F5   6

Definition at line 185 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_F6   7

Definition at line 186 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_F7   8

Definition at line 187 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_F8   9

Definition at line 188 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_F9   10

Definition at line 189 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_G   26

Definition at line 207 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_GRAVE   68

Definition at line 254 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_H   27

Definition at line 208 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_HOME   78

Definition at line 267 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_I   28

Definition at line 209 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_INSERT   76

Definition at line 265 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_INT_BACK   107

Definition at line 302 of file gui.h.

#define BX_KEY_INT_FAV   112

Definition at line 307 of file gui.h.

#define BX_KEY_INT_FORWARD   108

Definition at line 303 of file gui.h.

#define BX_KEY_INT_HOME   113

Definition at line 308 of file gui.h.

#define BX_KEY_INT_MAIL   110

Definition at line 305 of file gui.h.

#define BX_KEY_INT_SEARCH   111

Definition at line 306 of file gui.h.

#define BX_KEY_INT_STOP   109

Definition at line 304 of file gui.h.

#define BX_KEY_J   29

Definition at line 210 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_K   30

Definition at line 211 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_KP_5   94

Definition at line 284 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_ADD   82

Definition at line 272 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_DELETE   93

Definition at line 283 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_DIVIDE   101

Definition at line 293 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_DOWN   85

Definition at line 275 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_END   84

Definition at line 274 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_ENTER   99

Definition at line 291 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_HOME   89

Definition at line 279 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_INSERT   92

Definition at line 282 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_LEFT   87

Definition at line 277 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_MULTIPLY   100

Definition at line 292 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_PAGE_DOWN   86

Definition at line 276 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_PAGE_UP   91

Definition at line 281 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_RIGHT   88

Definition at line 278 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_SUBTRACT   83

Definition at line 273 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_KP_UP   90

Definition at line 280 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_L   31

Definition at line 212 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_LEFT   97

Definition at line 288 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_LEFT_BACKSLASH   72

Definition at line 260 of file gui.h.

#define BX_KEY_LEFT_BRACKET   64

Definition at line 250 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_M   32

Definition at line 213 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_MENU   104

Definition at line 297 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_MINUS   67

Definition at line 253 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_N   33

Definition at line 214 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_NBKEYS   119

Definition at line 316 of file gui.h.

Referenced by bx_keymap_c::convertStringToBXKey().

#define BX_KEY_NUM_LOCK   17

Definition at line 197 of file gui.h.

Referenced by bx_sdl_gui_c::handle_events(), sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_O   34

Definition at line 215 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_P   35

Definition at line 216 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_PAGE_DOWN   81

Definition at line 270 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_PAGE_UP   80

Definition at line 269 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_PAUSE   75

Definition at line 263 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_PERIOD   60

Definition at line 244 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_POWER_CALC   115

Definition at line 311 of file gui.h.

#define BX_KEY_POWER_MYCOMP   114

Definition at line 310 of file gui.h.

#define BX_KEY_POWER_POWER   117

Definition at line 313 of file gui.h.

#define BX_KEY_POWER_SLEEP   116

Definition at line 312 of file gui.h.

#define BX_KEY_POWER_WAKE   118

Definition at line 314 of file gui.h.

#define BX_KEY_PRESSED   0x00000000

Definition at line 173 of file gui.h.

Referenced by enq_key_event(), and simWndProc().

#define BX_KEY_PRINT   73

Definition at line 261 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_Q   36

Definition at line 217 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_R   37

Definition at line 218 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_RELEASED   0x80000000

#define BX_KEY_RIGHT   98

Definition at line 289 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_RIGHT_BRACKET   66

Definition at line 252 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_S   38

Definition at line 219 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_SCRL_LOCK   74

Definition at line 262 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_SEMICOLON   62

Definition at line 247 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_SHIFT_L   1

Definition at line 179 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_SHIFT_R   15

Definition at line 195 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_SINGLE_QUOTE   58

Definition at line 242 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_SLASH   61

Definition at line 245 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_SPACE   57

Definition at line 241 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_T   39

Definition at line 220 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_TAB   71

Definition at line 258 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_U   40

Definition at line 221 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_UNHANDLED   0x10000000

Definition at line 176 of file gui.h.

Referenced by bx_sdl_gui_c::handle_events(), and sdl_sym_to_bx_key().

#define BX_KEY_UP   95

Definition at line 286 of file gui.h.

Referenced by sdl_sym_to_bx_key(), and xkeypress().

#define BX_KEY_V   41

Definition at line 222 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_W   42

Definition at line 223 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_WIN_L   102

Definition at line 295 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_WIN_R   103

Definition at line 296 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_X   43

Definition at line 224 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_Y   44

Definition at line 225 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_KEY_Z   45

Definition at line 226 of file gui.h.

Referenced by sdl_sym_to_bx_key().

#define BX_PANIC (  )     BX_DEBUG(a)

#define IMPLEMENT_GUI_PLUGIN_CODE ( gui_name   ) 

Value:

int lib##gui_name##_LTX_plugin_init(CConfigurator*  cfg)                    \
  {                                                                           \
    printf("%%GUI-I-INS: Installing %s module as the ES40 GUI\n", #gui_name); \
    theGui = new bx_##gui_name##_gui_c(cfg);                                  \
    bx_gui = theGui;                                                          \
    return(0);  /* Success */                                                 \
  }                                                                           \
                                                                             \
  void lib##gui_name##_LTX_plugin_fini(void)                                  \
  { }

Definition at line 335 of file gui.h.


Variable Documentation

class bx_gui_c* bx_gui


SourceForge.net Logo
Project space on SourceForge.net