[57] | 1 | ; File name : MenuStructs.inc |
---|
| 2 | ; Project name : XTIDE Universal BIOS Configurator v2 |
---|
| 3 | ; Created date : 5.10.2010 |
---|
| 4 | ; Last update : 2.11.2010 |
---|
| 5 | ; Author : Tomi Tilli |
---|
| 6 | ; Description : Menu page and item structs. |
---|
| 7 | %ifndef MENU_STRUCTS_INC |
---|
| 8 | %define MENU_STRUCTS_INC |
---|
| 9 | |
---|
| 10 | struc MENUPAGE |
---|
| 11 | .fnEnter resb 2 ; Function to initialize MENUPAGE |
---|
| 12 | .wMenuitems resb 2 ; Number of MENUITEM structs |
---|
| 13 | .rgMenuitem: ; All MENUITEM structs in this MENUPAGE |
---|
| 14 | endstruc |
---|
| 15 | |
---|
| 16 | struc MENUITEM |
---|
| 17 | .fnActivate resb 2 ; Offset to item activation function |
---|
| 18 | .fnFormatValue resb 2 ; Offset to item value formatting function |
---|
| 19 | |
---|
| 20 | .szName resb 2 ; Offset to item name string |
---|
| 21 | .szQuickInfo resb 2 ; Offset to item quick information string |
---|
| 22 | .szHelp resb 2 ; Offset to item help string |
---|
| 23 | |
---|
| 24 | .bFlags resb 1 ; Item flags |
---|
| 25 | .bType resb 1 ; Item type |
---|
| 26 | .itemValue resb ITEM_VALUE_size ; ITEM_VALUE for automated item handling |
---|
| 27 | endstruc |
---|
| 28 | |
---|
| 29 | ; Bit defines for MENUITEM.bFlags |
---|
| 30 | FLG_MENUITEM_VISIBLE EQU (1<<0) ; Item is visible |
---|
| 31 | FLG_MENUITEM_MODIFY_MENU EQU (1<<1) ; Item modifies visibility of other items |
---|
| 32 | FLG_MENUITEM_FLAGVALUE EQU (1<<2) ; Item value is single bit |
---|
| 33 | FLG_MENUITEM_BYTEVALUE EQU (1<<3) ; Item value is single byte |
---|
| 34 | |
---|
| 35 | ; Values for MENUITEM.bType |
---|
| 36 | TYPE_MENUITEM_PAGEBACK EQU (0<<1) ; Item returns to previous MENUPAGE |
---|
| 37 | TYPE_MENUITEM_PAGENEXT EQU (1<<1) ; Item changes to next MENUPAGE |
---|
| 38 | TYPE_MENUITEM_ACTION EQU (2<<1) ; Non-configurable item |
---|
| 39 | TYPE_MENUITEM_MULTICHOISE EQU (3<<1) ; Item with multiple predefined choises |
---|
| 40 | TYPE_MENUITEM_UNSIGNED EQU (4<<1) ; Menuitem with user inputted unsigned decimal value |
---|
| 41 | TYPE_MENUITEM_HEX EQU (5<<1) ; Menuitem with user inputted hexadecimal value |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | struc ITEM_VALUE |
---|
| 45 | .wRomvarsValueOffset resb 2 ; ROMVARS offset to actual value to be configured |
---|
| 46 | .szDialogTitle resb 2 ; Dialog title string |
---|
| 47 | |
---|
| 48 | .szMultichoise resb 2 ; Multiple choises in one string |
---|
| 49 | .rgwChoiseToValueLookup resb 2 ; Ptr to lookup table for translating selected choise to actual value |
---|
| 50 | .rgszValueToStringLookup: ; Ptr to lookup table for translating value to string |
---|
| 51 | .wMinValue resb 2 ; Minimum allowed integer value |
---|
| 52 | .wMaxValue: |
---|
| 53 | .wValueBitmask resb 2 ; Bitmask for item value flag |
---|
| 54 | endstruc |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | %endif ; MENU_STRUCTS_INC |
---|