Tabs to spaces, more consistent formatting.
[AROS.git] / workbench / libs / muimaster / classes / application.h
blobe76e9fc4efdbc72b8764268b335edffd3ee8bd3c
1 /*
2 Copyright © 1999, David Le Corfec.
3 Copyright © 2002-2003, The AROS Development Team.
4 All rights reserved.
6 $Id$
7 */
9 #ifndef _MUI_CLASSES_APPLICATION_H
10 #define _MUI_CLASSES_APPLICATION_H
12 #ifndef EXEC_SEMAPHORES_H
13 #include <exec/semaphores.h>
14 #endif
16 /*** Name *******************************************************************/
17 #define MUIC_Application "Application.mui"
19 /*** Identifier base (for Zune extensions) **********************************/
20 #define MUIB_Application (MUIB_ZUNE | 0x00000100)
22 /*** Methods ****************************************************************/
23 #define MUIM_Application_AboutMUI (MUIB_MUI|0x0042d21d) /* MUI: V14 */
24 #define MUIM_Application_AddInputHandler (MUIB_MUI|0x0042f099) /* MUI: V11 */
25 #define MUIM_Application_CheckRefresh (MUIB_MUI|0x00424d68) /* MUI: V11 */
26 #define MUIM_Application_GetMenuCheck (MUIB_MUI|0x0042c0a7) /* MUI: V4 */
27 #define MUIM_Application_GetMenuState (MUIB_MUI|0x0042a58f) /* MUI: V4 */
28 #define MUIM_Application_Input (MUIB_MUI|0x0042d0f5) /* MUI: V4 */
29 #define MUIM_Application_InputBuffered (MUIB_MUI|0x00427e59) /* MUI: V4 */
30 #define MUIM_Application_Load (MUIB_MUI|0x0042f90d) /* MUI: V4 */
31 #define MUIM_Application_NewInput (MUIB_MUI|0x00423ba6) /* MUI: V11 */
32 #define MUIM_Application_OpenConfigWindow (MUIB_MUI|0x004299ba) /* MUI: V11 */
33 #define MUIM_Application_PushMethod (MUIB_MUI|0x00429ef8) /* MUI: V4 */
34 #define MUIM_Application_RemInputHandler (MUIB_MUI|0x0042e7af) /* MUI: V11 */
35 #define MUIM_Application_ReturnID (MUIB_MUI|0x004276ef) /* MUI: V4 */
36 #define MUIM_Application_Save (MUIB_MUI|0x004227ef) /* MUI: V4 */
37 #define MUIM_Application_SetConfigItem (MUIB_MUI|0x00424a80) /* MUI: V11 */
38 #define MUIM_Application_SetMenuCheck (MUIB_MUI|0x0042a707) /* MUI: V4 */
39 #define MUIM_Application_SetMenuState (MUIB_MUI|0x00428bef) /* MUI: V4 */
40 #define MUIM_Application_ShowHelp (MUIB_MUI|0x00426479) /* MUI: V4 */
42 #define MUIM_Application_SetConfigdata (MUIB_Application | 0x00000000) /* Zune 20030407 */
43 #define MUIM_Application_OpenWindows (MUIB_Application | 0x00000001) /* Zune 20030407 */
44 #define MUIM_Application_Iconify (MUIB_Application | 0x00000002) /* Zune: V1 */
45 #define MUIM_Application_Execute (MUIB_Application | 0x00000003)
46 #define MUIM_Application_UpdateMenus (MUIB_Application | 0x00000004) /* Zune 20070712 */
48 /* Method Structures */
49 struct MUIP_Application_AboutMUI
51 STACKED ULONG MethodID;
52 STACKED Object *refwindow;
55 struct MUIP_Application_AddInputHandler
57 STACKED ULONG MethodID;
58 STACKED struct MUI_InputHandlerNode *ihnode;
61 struct MUIP_Application_CheckRefresh
63 STACKED ULONG MethodID;
66 struct MUIP_Application_GetMenuCheck
68 STACKED ULONG MethodID;
69 STACKED ULONG MenuID;
72 struct MUIP_Application_GetMenuState
74 STACKED ULONG MethodID;
75 STACKED ULONG MenuID;
78 struct MUIP_Application_Input
80 STACKED ULONG MethodID;
81 STACKED ULONG *signal;
84 struct MUIP_Application_InputBuffered
86 STACKED ULONG MethodID;
89 struct MUIP_Application_Load
91 STACKED ULONG MethodID;
92 STACKED STRPTR name;
95 struct MUIP_Application_NewInput
97 STACKED ULONG MethodID;
98 STACKED ULONG *signal;
101 struct MUIP_Application_OpenConfigWindow
103 STACKED ULONG MethodID;
104 STACKED ULONG flags;
107 struct MUIP_Application_PushMethod
109 STACKED ULONG MethodID;
110 STACKED Object *dest;
111 STACKED LONG count; /* more elements may follow */
114 struct MUIP_Application_RemInputHandler
116 STACKED ULONG MethodID;
117 STACKED struct MUI_InputHandlerNode *ihnode;
120 struct MUIP_Application_ReturnID
122 STACKED ULONG MethodID;
123 STACKED ULONG retid;
126 struct MUIP_Application_Save
128 STACKED ULONG MethodID;
129 STACKED STRPTR name;
132 struct MUIP_Application_SetConfigItem
134 STACKED ULONG MethodID;
135 STACKED ULONG item;
136 STACKED APTR data;
139 struct MUIP_Application_SetMenuCheck
141 STACKED ULONG MethodID;
142 STACKED ULONG MenuID;
143 STACKED LONG stat;
146 struct MUIP_Application_SetMenuState
148 STACKED ULONG MethodID;
149 STACKED ULONG MenuID;
150 STACKED LONG stat;
153 struct MUIP_Application_ShowHelp
155 STACKED ULONG MethodID;
156 STACKED Object *window;
157 STACKED char *name;
158 STACKED char *node;
159 STACKED LONG line;
162 struct MUIP_Application_SetConfigdata
164 STACKED ULONG MethodID;
165 STACKED APTR configdata;
168 struct MUIP_Application_OpenWindows
170 STACKED ULONG MethodID;
173 struct MUIP_Application_UpdateMenus
175 STACKED ULONG MethodID;
178 /*** Attributes *************************************************************/
179 #define MUIA_Application_Active \
180 (MUIB_MUI|0x004260ab) /* MUI: V4 isg BOOL */
181 #define MUIA_Application_Author \
182 (MUIB_MUI|0x00424842) /* MUI: V4 i.g STRPTR */
183 #define MUIA_Application_Base \
184 (MUIB_MUI|0x0042e07a) /* MUI: V4 i.g STRPTR */
185 #define MUIA_Application_Broker \
186 (MUIB_MUI|0x0042dbce) /* MUI: V4 ..g Broker * */
187 #define MUIA_Application_BrokerHook \
188 (MUIB_MUI|0x00428f4b) /* MUI: V4 isg struct Hook * */
189 #define MUIA_Application_BrokerPort \
190 (MUIB_MUI|0x0042e0ad) /* MUI: V6 ..g struct MsgPort * */
191 #define MUIA_Application_BrokerPri \
192 (MUIB_MUI|0x0042c8d0) /* MUI: V6 i.g LONG */
193 #define MUIA_Application_Commands \
194 (MUIB_MUI|0x00428648) /* MUI: V4 isg struct MUI_Command * */
195 #define MUIA_Application_Copyright \
196 (MUIB_MUI|0x0042ef4d) /* MUI: V4 i.g STRPTR */
197 #define MUIA_Application_Description \
198 (MUIB_MUI|0x00421fc6) /* MUI: V4 i.g STRPTR */
199 #define MUIA_Application_DiskObject \
200 (MUIB_MUI|0x004235cb) /* MUI: V4 isg struct DiskObject * */
201 #define MUIA_Application_DoubleStart \
202 (MUIB_MUI|0x00423bc6) /* MUI: V4 ..g BOOL */
203 #define MUIA_Application_DropObject \
204 (MUIB_MUI|0x00421266) /* MUI: V5 is. Object * */
205 #define MUIA_Application_ForceQuit \
206 (MUIB_MUI|0x004257df) /* MUI: V8 ..g BOOL */
207 #define MUIA_Application_HelpFile \
208 (MUIB_MUI|0x004293f4) /* MUI: V8 isg STRPTR */
209 #define MUIA_Application_Iconified \
210 (MUIB_MUI|0x0042a07f) /* MUI: V4 .sg BOOL */
211 #define MUIA_Application_MenuAction \
212 (MUIB_MUI|0x00428961) /* MUI: V4 ..g ULONG */
213 #define MUIA_Application_MenuHelp \
214 (MUIB_MUI|0x0042540b) /* MUI: V4 ..g ULONG */
215 #define MUIA_Application_Menustrip \
216 (MUIB_MUI|0x004252d9) /* MUI: V8 i.. Object * */
217 #define MUIA_Application_RexxHook \
218 (MUIB_MUI|0x00427c42) /* MUI: V7 isg struct Hook * */
219 #define MUIA_Application_RexxMsg \
220 (MUIB_MUI|0x0042fd88) /* MUI: V4 ..g struct RxMsg * */
221 #define MUIA_Application_RexxString \
222 (MUIB_MUI|0x0042d711) /* MUI: V4 .s. STRPTR */
223 #define MUIA_Application_SingleTask \
224 (MUIB_MUI|0x0042a2c8) /* MUI: V4 i.. BOOL */
225 #define MUIA_Application_Sleep \
226 (MUIB_MUI|0x00425711) /* MUI: V4 .s. BOOL */
227 #define MUIA_Application_Title \
228 (MUIB_MUI|0x004281b8) /* MUI: V4 i.g STRPTR */
229 #define MUIA_Application_UseCommodities \
230 (MUIB_MUI|0x00425ee5) /* MUI: V10 i.. BOOL */
231 #define MUIA_Application_UsedClasses \
232 (MUIB_MUI|0x0042e9a7) /* MUI undoc: V20 i.. STRPTR [] */
233 #define MUIA_Application_UseRexx \
234 (MUIB_MUI|0x00422387) /* MUI: V10 i.. BOOL */
235 #define MUIA_Application_SetWinPos \
236 (MUIB_MUI|0x00432387)
237 #define MUIA_Application_GetWinPos \
238 (MUIB_MUI|0x00432388)
239 #define MUIA_Application_SearchWinId \
240 (MUIB_MUI|0x00432389)
241 #define MUIA_Application_GetWinPosAddr \
242 (MUIB_MUI|0x00432390)
243 #define MUIA_Application_GetWinPosSize \
244 (MUIB_MUI|0x00432391)
245 #define MUIA_Application_CopyWinPosToApp \
246 (MUIB_MUI|0x00432392)
247 #define MAXWINS 300
249 struct windowpos
251 ULONG id;
252 WORD x1, y1, w1, h1;
253 WORD x2, y2, w2, h2;
257 [I-G] CONST_STRPTR
258 Standard DOS version string. Example: "$VER: Program 1.3 (14.11.03)".
259 Zune extension: If unspecified or NULL, it will be automatically
260 constructed from MUIA_Application_Title, MUIA_Application_Version_Number,
261 MUIA_Application_Version_Date and MUIA_Application_Version_Extra as
262 follows: "$VER: <title> <version> (<date>) [<extra>]".
264 #define MUIA_Application_Version \
265 (MUIB_MUI|0x0042b33f)
267 #define MUIA_Application_Window \
268 (MUIB_MUI|0x0042bfe0) /* MUI: V4 i.. Object * */
269 #define MUIA_Application_WindowList \
270 (MUIB_MUI|0x00429abe) /* MUI: V13 ..g struct List * */
272 #define MUIA_Application_Configdata \
273 (MUIB_Application | 0x00000000) /* Zune 20030407 .s. Object * */
276 [I-G] CONST_STRPTR
277 Version number. Examples: "1.5", "2.37.4b".
279 #define MUIA_Application_Version_Number \
280 (MUIB_Application | 0x00000001)
283 [I-G] CONST_STRPTR
284 Date information on the standard international YYYY-MM-DD format.
286 #define MUIA_Application_Version_Date \
287 (MUIB_Application | 0x00000002)
290 [I-G] CONST_STRPTR
291 Arbitrary extra version information. Example: "nightly build".
293 #define MUIA_Application_Version_Extra \
294 (MUIB_Application | 0x00000003)
297 /* MUI Obsolette tags */
298 #ifdef MUI_OBSOLETE
299 #define MUIA_Application_Menu \
300 (MUIB_MUI | 0x00420e1f) /* MUI: V4 i.g struct NewMenu * */
301 #endif /* MUI_OBSOLETE */
303 /**************************************************************************
304 Structure used ba MUIM_Application_AddInputHandler/RemInputHandler
305 **************************************************************************/
306 struct MUI_InputHandlerNode
308 struct MinNode ihn_Node;
309 Object *ihn_Object;
310 union
312 ULONG ihn_sigs;
313 struct
315 UWORD ihn_millis;
316 UWORD ihn_current;
317 } ihn_timer;
319 ihn_stuff;
320 ULONG ihn_Flags;
321 ULONG ihn_Method;
324 /* Easier access to the members */
325 #define ihn_Millis ihn_stuff.ihn_timer.ihn_millis
326 #define ihn_Current ihn_stuff.ihn_timer.ihn_current
327 #define ihn_Signals ihn_stuff.ihn_sigs
329 /* Flags for ihn_Flags */
330 #define MUIIHNF_TIMER (1<<0) /* you want to be called every ihn_Millis msecs */
332 /**************************************************************************
333 Special values for the name field of MUIM_Application_Load/Save
334 **************************************************************************/
335 #define MUIV_Application_Save_ENV ((STRPTR) 0)
336 #define MUIV_Application_Save_ENVARC ((STRPTR)~0)
337 #define MUIV_Application_Load_ENV ((STRPTR) 0)
338 #define MUIV_Application_Load_ENVARC ((STRPTR)~0)
341 /**************************************************************************
342 Special Values MUIM_Application_ReturnID. Usually program should leave
343 the event loop if this is set
344 **************************************************************************/
345 #define MUIV_Application_ReturnID_Quit ((ULONG)-1)
348 extern const struct __MUIBuiltinClass _MUI_Application_desc; /* PRIV */
351 struct MUI_GlobalInfo
353 ULONG priv0;
354 Object *mgi_ApplicationObject;
356 /* The following data is private only, might be extended! */
357 struct MsgPort *mgi_WindowsPort; /* application-wide IDCMP port *//* PRIV */
358 struct MsgPort *mgi_AppPort; /* application-wide AppMessage port */ /* PRIV */
359 Object *mgi_Configdata; /* The config data *//* PRIV */
360 struct ZunePrefsNew *mgi_Prefs; /* For faster access *//* PRIV */
361 struct Screen *mgi_CustomScreen; /* Screen opened customly by the application *//* PRIV */
365 #endif /* _MUI_CLASSES_APPLICATION_H */