source: xtideuniversalbios/trunk/Assembly_Library/Inc/MenuEvents.inc@ 565

Last change on this file since 565 was 505, checked in by krille_n_@…, 12 years ago

Changes:

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