Updated PCI IDs to latest snapshot.
[tangerine.git] / rom / intuition / menutask.h
blob1b28da18fb9d844d69c8f92f804b66a1a66cb00a
1 #ifndef MENUTASK_H
2 #define MENUTASK_H
4 /*
5 Copyright 1995-2007, The AROS Development Team. All rights reserved.
6 Copyright 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 $Id$
8 */
10 #define MENUTASK_NAME " Menu Handler "
11 #define MENUTASK_STACKSIZE AROS_STACKSIZE
12 #ifdef __MORPHOS__
13 #define MENUTASK_PRIORITY 19
14 #else
15 #define MENUTASK_PRIORITY 10
16 #endif
18 #define ITEM_ITEM 1
19 #define ITEM_SUBITEM 2
21 #define AMIGAKEY_KEY_SPACING 4 /* GadTools assumes this, too */
22 #define AMIGAKEY_BORDER_SPACING 2
24 #ifdef SKINS
25 #include "intuition_intern.h"
26 #include "smallmenu.h"
27 #endif
29 /* Structure passed to the DefaultMenuHandler task when it's initialized */
31 struct MenuTaskParams
33 struct IntuitionBase *intuitionBase;
34 struct Task *Caller;
35 struct MsgPort *MenuHandlerPort; /* filled in by MenuHandler task */
36 BOOL success;
39 #ifdef SKINS
40 struct MenuHandlerData
42 struct Window *win;
43 struct Screen *scr;
44 struct IntDrawInfo *dri;
45 struct Menu *menu;
46 struct SmallMenuEntry *entries;
47 struct SmallMenuKeeper rootsmk;
48 struct IntuitionBase *intuitionBase;
49 struct Hook backfillhook;
50 struct HookData hookdata;
52 WORD scrmousex;
53 WORD scrmousey;
54 UWORD firstmenupick;
55 UWORD lastmenupick;
56 ULONG openseconds;
57 ULONG openmicros;
59 ULONG delayedopenseconds;
60 ULONG delayedopenmicros;
61 struct SmallMenuEntry *delayedopen;
63 BOOL active;
64 BOOL keepmenuup;
65 BOOL isundermouse;
66 #ifdef USEWINDOWLOCK
67 BOOL windowlock;
68 #endif /* USEWINDOWLOCK */
72 #else
74 struct MenuHandlerData
76 struct Window *win;
77 struct Screen *scr;
78 struct DrawInfo *dri;
79 struct Window *menubarwin;
80 struct Window *menuwin;
81 struct Window *submenuwin;
82 struct Menu *menu;
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;
91 IPTR DecorUserBuffer;
92 IPTR SubDecorUserBuffer;
93 IPTR BarDecorUserBuffer;
94 WORD menubarwidth;
95 WORD menubarheight;
96 WORD menubaritemwidth;
97 WORD menubaritemheight;
98 WORD nummenubaritems;
99 WORD activemenunum;
100 WORD activeitemnum;
101 WORD activesubitemnum;
102 WORD maxcommkeywidth_menu;
103 WORD maxcommkeywidth_submenu;
104 WORD scrmousex;
105 WORD scrmousey;
106 WORD innerleft;
107 WORD innertop;
108 WORD innerright;
109 WORD innerbottom;
110 WORD menuinnerleft;
111 WORD menuinnertop;
112 WORD menuinnerright;
113 WORD menuinnerbottom;
114 WORD iteminnerleft;
115 WORD iteminnertop;
116 WORD iteminnerright;
117 WORD iteminnerbottom;
118 UWORD firstmenupick;
119 UWORD lastmenupick;
120 BOOL active;
121 BOOL keepmenuup;
122 BOOL TrueColor;
123 ULONG openseconds;
124 ULONG openmicros;
127 #endif /* SKINS */
129 BOOL InitDefaultMenuHandler(struct IntuitionBase *IntuitionBase);
130 struct Task *CreateMenuHandlerTask(APTR taskparams, struct IntuitionBase *IntuitionBase);
131 void DefaultMenuHandler(struct MenuTaskParams *taskparams);
133 #ifdef SKINS
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);
137 #endif
139 #endif /* MENUTASK_H */