5 Copyright 1995-2007, The AROS Development Team. All rights reserved.
6 Copyright 2001-2003, The MorphOS Development Team. All Rights Reserved.
10 #define MENUTASK_NAME "<< Menu Handler >>"
11 #define MENUTASK_STACKSIZE AROS_STACKSIZE
13 #define MENUTASK_PRIORITY 19
15 #define MENUTASK_PRIORITY 10
19 #define ITEM_SUBITEM 2
21 #define AMIGAKEY_KEY_SPACING 4 /* GadTools assumes this, too */
22 #define AMIGAKEY_BORDER_SPACING 2
25 #include "intuition_intern.h"
26 #include "smallmenu.h"
29 /* Structure passed to the DefaultMenuHandler task when it's initialized */
33 struct IntuitionBase
*intuitionBase
;
35 struct MsgPort
*MenuHandlerPort
; /* filled in by MenuHandler task */
40 struct MenuHandlerData
44 struct IntDrawInfo
*dri
;
46 struct SmallMenuEntry
*entries
;
47 struct SmallMenuKeeper rootsmk
;
48 struct IntuitionBase
*intuitionBase
;
49 struct Hook backfillhook
;
50 struct HookData hookdata
;
59 ULONG delayedopenseconds
;
60 ULONG delayedopenmicros
;
61 struct SmallMenuEntry
*delayedopen
;
68 #endif /* USEWINDOWLOCK */
74 struct MenuHandlerData
79 struct Window
*menubarwin
;
80 struct Window
*menuwin
;
81 struct Window
*submenuwin
;
83 struct Menu
*activemenu
;
84 struct MenuItem
*activeitem
;
85 struct MenuItem
*activesubitem
;
86 struct Rectangle submenubox
;
87 struct Image
*checkmark
;
88 struct Image
*amigakey
;
89 struct Image
*submenuimage
;
90 ULONG DecorUserBufferSize
;
92 IPTR SubDecorUserBuffer
;
93 IPTR BarDecorUserBuffer
;
96 WORD menubaritemwidth
;
97 WORD menubaritemheight
;
101 WORD activesubitemnum
;
102 WORD maxcommkeywidth_menu
;
103 WORD maxcommkeywidth_submenu
;
113 WORD menuinnerbottom
;
117 WORD iteminnerbottom
;
129 BOOL
InitDefaultMenuHandler(struct IntuitionBase
*IntuitionBase
);
130 struct Task
*CreateMenuHandlerTask(APTR taskparams
, struct IntuitionBase
*IntuitionBase
);
131 void DefaultMenuHandler(struct MenuTaskParams
*taskparams
);
134 void AddToSelection(struct MenuHandlerData
*mhd
, struct SmallMenuEntry
*entry
,struct IntuitionBase
*IntuitionBase
);
135 BOOL
HandleCheckItem(struct MenuHandlerData
*mhd
, struct SmallMenuEntry
*entry
,
136 struct IntuitionBase
*IntuitionBase
);
139 #endif /* MENUTASK_H */