source: xtideuniversalbios/tags/Assembly_Library_for_v2.0.0beta1/Inc/MenuEvents.inc@ 554

Last change on this file since 554 was 198, checked in by gregli@…, 13 years ago

Fixing a bug in the configurator with user entry of word values into dialogs, introduced with the idle processing optimization in r189.

File size: 3.3 KB
Line 
1; File name : MenuEvents.inc
2; Project name : Assembly Library
3; Created date : 13.7.2010
4; Last update : 18.10.2010
5; Author : Tomi Tilli
6; Description : Defines for Menu events send to the user.
7%ifndef MENUEVENTS_INC
8%define MENUEVENTS_INC
9
10;--------------------------------------------------------------------
11; Events to be processed in user implemented handler.
12; Common parameters for all events:
13; BX: Menu event (anything from MENUEVENT struct)
14; SS:BP: Menu library handle
15; Common return values for all events:
16; CF: Set if event processed
17; Cleared if event not processed
18; Corrupts registers:
19; All
20;--------------------------------------------------------------------
21
22;
23; There are two ways to use MENUEVENT:
24;
25; 1. If the program needs two different menus, include the definition of the MENUEVENT structure below,
26; instantiate with members that point to the routines that make up the menu.
27;
28; 2. If the program needs only one menu, %define MENUEVENT_INLINE_OFFSETS before this include file,
29; and define (through EQU statements) each of the entry points as offsets from a base address.
30;
31
32;
33; If user level idle processing is desired, %define this symbol and .IdleProcessing will be called.
34; Otherwise, the code and structure entry will be omitted. Note that INCLUDE_MENU_DIALOGS requires
35; the idle processing (if that is the case, it is turned on here).
36;
37;%define MENUEVENT_IDLEPROCESSING_ENABLE
38;
39
40%ifdef INCLUDE_MENU_DIALOGS
41%define MENUEVENT_IDLEPROCESSING_ENABLE
42%endif
43
44%ifndef MENUEVENT_INLINE_OFFSETS
45
46struc MENUEVENT
47 ; Parameters:
48 ; DS:SI: Ptr to MENUINIT struct to initialize
49 ; Returns:
50 ; DS:SI: Ptr to initialized MENUINIT struct
51 .InitializeMenuinitFromDSSI resb 2
52%define MENUEVENT_InitializeMenuinitFromDSSI MENUEVENT.InitializeMenuinitFromDSSI
53
54 ; Parameters:
55 ; None
56 ; Returns:
57 ; CF: Set to exit menu
58 ; Clear to cancel exit
59 .ExitMenu resb 2
60%define MENUEVENT_ExitMenu MENUEVENT.ExitMenu
61
62%ifdef MENUEVENT_IDLEPROCESSING_ENABLE
63 ; Parameters:
64 ; None
65 ; See the definition of MENUEVENT_IDLEPROCESSING_ENABLE below.
66 .IdleProcessing resb 2
67%define MENUEVENT_IdleProcessing MENUEVENT.IdleProcessing
68%endif
69
70 ; Parameters:
71 ; CX: Index of new highlighted item
72 ; DX: Index of previously highlighted item or NO_ITEM_HIGHLIGHTED
73 .ItemHighlightedFromCX resb 2
74%define MENUEVENT_ItemHighlightedFromCX MENUEVENT.ItemHighlightedFromCX
75
76 ; Parameters:
77 ; CX: Index of selected item
78 .ItemSelectedFromCX resb 2
79%define MENUEVENT_ItemSelectedFromCX MENUEVENT.ItemSelectedFromCX
80
81 ; Parameters:
82 ; AL: ASCII character for the key
83 ; AH: Keyboard library scan code for the key
84 .KeyStrokeInAX resb 2
85%define MENUEVENT_KeyStrokeInAX MENUEVENT.KeyStrokeInAX
86
87 ; Parameters:
88 ; CX: Index of highlighted item
89 ; Cursor has been positioned to the beginning of first line
90 .RefreshTitle resb 2
91 .RefreshInformation resb 2
92%define MENUEVENT_RefreshTitle MENUEVENT.RefreshTitle
93%define MENUEVENT_RefreshInformation MENUEVENT.RefreshInformation
94
95 ; Parameters:
96 ; CX: Index of item to refresh
97 ; Cursor has been positioned to the beginning of item line
98 .RefreshItemFromCX resb 2
99%define MENUEVENT_RefreshItemFromCX MENUEVENT.RefreshItemFromCX
100endstruc
101
102%endif ; MENUEVENTS_INLINE_OFFSETS
103
104%endif ; MENUEVENTS_INC
Note: See TracBrowser for help on using the repository browser.