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

Last change on this file since 576 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
RevLine 
[41]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;--------------------------------------------------------------------
[183]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,
[505]25; and define (through EQU statements) each of the entry points as offsets from a base address.
26;
[198]27
[183]28;
[198]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;
[183]35
[198]36%ifdef INCLUDE_MENU_DIALOGS
37%define MENUEVENT_IDLEPROCESSING_ENABLE
38%endif
39
[183]40%ifndef MENUEVENT_INLINE_OFFSETS
41
[41]42struc MENUEVENT
43 ; Parameters:
44 ; DS:SI: Ptr to MENUINIT struct to initialize
45 ; Returns:
46 ; DS:SI: Ptr to initialized MENUINIT struct
[505]47 .InitializeMenuinitFromDSSI resb 2
48%define MENUEVENT_InitializeMenuinitFromDSSI MENUEVENT.InitializeMenuinitFromDSSI
[41]49
50 ; Parameters:
51 ; None
[58]52 ; Returns:
53 ; CF: Set to exit menu
54 ; Clear to cancel exit
[505]55 .ExitMenu resb 2
56%define MENUEVENT_ExitMenu MENUEVENT.ExitMenu
[41]57
[198]58%ifdef MENUEVENT_IDLEPROCESSING_ENABLE
[41]59 ; Parameters:
60 ; None
[189]61 ; See the definition of MENUEVENT_IDLEPROCESSING_ENABLE below.
[505]62 .IdleProcessing resb 2
63%define MENUEVENT_IdleProcessing MENUEVENT.IdleProcessing
[198]64%endif
[41]65
66 ; Parameters:
67 ; CX: Index of new highlighted item
68 ; DX: Index of previously highlighted item or NO_ITEM_HIGHLIGHTED
[505]69 .ItemHighlightedFromCX resb 2
70%define MENUEVENT_ItemHighlightedFromCX MENUEVENT.ItemHighlightedFromCX
[41]71
72 ; Parameters:
73 ; CX: Index of selected item
[505]74 .ItemSelectedFromCX resb 2
75%define MENUEVENT_ItemSelectedFromCX MENUEVENT.ItemSelectedFromCX
[41]76
77 ; Parameters:
78 ; AL: ASCII character for the key
79 ; AH: Keyboard library scan code for the key
[505]80 .KeyStrokeInAX resb 2
81%define MENUEVENT_KeyStrokeInAX MENUEVENT.KeyStrokeInAX
[41]82
83 ; Parameters:
[48]84 ; CX: Index of highlighted item
85 ; Cursor has been positioned to the beginning of first line
[505]86 .RefreshTitle resb 2
87 .RefreshInformation resb 2
88%define MENUEVENT_RefreshTitle MENUEVENT.RefreshTitle
89%define MENUEVENT_RefreshInformation MENUEVENT.RefreshInformation
[41]90
91 ; Parameters:
92 ; CX: Index of item to refresh
93 ; Cursor has been positioned to the beginning of item line
[505]94 .RefreshItemFromCX resb 2
95%define MENUEVENT_RefreshItemFromCX MENUEVENT.RefreshItemFromCX
[41]96endstruc
97
[505]98%endif ; MENUEVENT_INLINE_OFFSETS
[41]99
100%endif ; MENUEVENTS_INC
Note: See TracBrowser for help on using the repository browser.