source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/MenuStructs.inc@ 407

Last change on this file since 407 was 376, checked in by gregli@…, 12 years ago

WIDE checkin... Added copyright and license information to sorce files, as per the GPL instructions for usage.

File size: 3.4 KB
Line 
1; Project name : XTIDE Universal BIOS Configurator v2
2; Description : Menu page and item structs.
3
4;
5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
7;
8; This program is free software; you can redistribute it and/or modify
9; it under the terms of the GNU General Public License as published by
10; the Free Software Foundation; either version 2 of the License, or
11; (at your option) any later version.
12;
13; This program is distributed in the hope that it will be useful,
14; but WITHOUT ANY WARRANTY; without even the implied warranty of
15; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16; GNU General Public License for more details.
17; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18;
19
20%ifndef MENU_STRUCTS_INC
21%define MENU_STRUCTS_INC
22
23struc MENUPAGE
24 .fnEnter resb 2 ; Function to initialize MENUPAGE
25 .fnBack resb 2 ; Function to initialize previous MENUPAGE
26 .wMenuitems resb 2 ; Number of MENUITEM structs
27 .rgMenuitem: ; All MENUITEM structs in this MENUPAGE
28endstruc
29
30struc MENUITEM
31 .fnActivate resb 2 ; Offset to item activation function
32 .fnFormatValue resb 2 ; Offset to item value formatting function
33
34 .szName resb 2 ; Offset to item name string
35 .szQuickInfo resb 2 ; Offset to item quick information string
36 .szHelp resb 2 ; Offset to item help string
37
38 .bFlags resb 1 ; Item flags
39 .bType resb 1 ; Item type
40 .itemValue resb ITEM_VALUE_size ; ITEM_VALUE for automated item handling
41endstruc
42
43; Bit defines for MENUITEM.bFlags
44FLG_MENUITEM_VISIBLE EQU (1<<0) ; Item is visible
45FLG_MENUITEM_MODIFY_MENU EQU (1<<1) ; Item modifies visibility of other items
46FLG_MENUITEM_FLAGVALUE EQU (1<<2) ; Item value is single bit
47FLG_MENUITEM_BYTEVALUE EQU (1<<3) ; Item value is single byte
48FLG_MENUITEM_PROGRAMVAR EQU (1<<4) ; Item is for configuring program, not BIOS
49FLG_MENUITEM_CHOICESTRINGS EQU (1<<5) ; ChoiceToStringLookup table is 1-1 with ChoiceToValueLookup table,
50 ; ChoiceToStringLookup table must also be NULL terminated
51FLG_MENUITEM_MASKVALUE EQU (1<<6) ; Item value is more than one bit among other bits
52
53
54; Values for MENUITEM.bType
55TYPE_MENUITEM_PAGEBACK EQU (0<<1) ; Item returns to previous MENUPAGE
56TYPE_MENUITEM_PAGENEXT EQU (1<<1) ; Item changes to next MENUPAGE
57TYPE_MENUITEM_ACTION EQU (2<<1) ; Non-configurable item
58TYPE_MENUITEM_MULTICHOICE EQU (3<<1) ; Item with multiple predefined choices
59TYPE_MENUITEM_UNSIGNED EQU (4<<1) ; Menuitem with user inputted unsigned decimal value
60TYPE_MENUITEM_HEX EQU (5<<1) ; Menuitem with user inputted hexadecimal value
61
62
63struc ITEM_VALUE
64 .wRomvarsValueOffset resb 2 ; ROMVARS offset to actual value to be configured
65 .szDialogTitle resb 2 ; Dialog title string
66
67 .szMultichoice resb 2 ; Multiple choices in one string
68 .rgwChoiceToValueLookup resb 2 ; Ptr to lookup table for translating selected choice to actual value
69 .rgszValueToStringLookup: ; Ptr to lookup table for translating value to string
70 .rgszChoiceToStringLookup:
71 .wMinValue resb 2 ; Minimum allowed integer value
72 .wMaxValue:
73 .wValueBitmask resb 2 ; Bitmask for item value flag
74 .fnValueReader resb 2 ; Called just after ROMVARS is read, providing a hook for further action
75 .fnValueWriter resb 2 ; Called just before ROMVARS is written, providing a hook for further action
76endstruc
77
78
79%endif ; MENU_STRUCTS_INC
Note: See TracBrowser for help on using the repository browser.