revert 213 commits (to 56092) from the last month. 10 still need work to resolve...
[AROS.git] / workbench / libs / muimaster / classes / application.h
blob3cc2d7ed5471bbdb81dd05a5b02ac147a38bcc12
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 */
41 #define MUIM_Application_UnpushMethod (MUIB_MUI|0x004211dd) /* MUI: V20 */
43 #define MUIM_Application_SetConfigdata (MUIB_Application | 0x00000000) /* Zune 20030407 */
44 #define MUIM_Application_OpenWindows (MUIB_Application | 0x00000001) /* Zune 20030407 */
45 #define MUIM_Application_Iconify (MUIB_Application | 0x00000002) /* Zune: V1 */
46 #define MUIM_Application_Execute (MUIB_Application | 0x00000003)
47 #define MUIM_Application_UpdateMenus (MUIB_Application | 0x00000004) /* Zune 20070712 */
49 /* Method Structures */
50 struct MUIP_Application_AboutMUI
52 STACKED ULONG MethodID;
53 STACKED Object *refwindow;
56 struct MUIP_Application_AddInputHandler
58 STACKED ULONG MethodID;
59 STACKED struct MUI_InputHandlerNode *ihnode;
62 struct MUIP_Application_CheckRefresh
64 STACKED ULONG MethodID;
67 struct MUIP_Application_GetMenuCheck
69 STACKED ULONG MethodID;
70 STACKED ULONG MenuID;
73 struct MUIP_Application_GetMenuState
75 STACKED ULONG MethodID;
76 STACKED ULONG MenuID;
79 struct MUIP_Application_Input
81 STACKED ULONG MethodID;
82 STACKED ULONG *signal;
85 struct MUIP_Application_InputBuffered
87 STACKED ULONG MethodID;
90 struct MUIP_Application_Load
92 STACKED ULONG MethodID;
93 STACKED STRPTR name;
96 struct MUIP_Application_NewInput
98 STACKED ULONG MethodID;
99 STACKED ULONG *signal;
102 struct MUIP_Application_OpenConfigWindow
104 STACKED ULONG MethodID;
105 STACKED ULONG flags;
108 struct MUIP_Application_PushMethod
110 STACKED ULONG MethodID;
111 STACKED Object *dest;
112 STACKED LONG count; /* more elements may follow */
115 struct MUIP_Application_UnpushMethod
117 STACKED ULONG MethodID;
118 STACKED Object *dest;
119 STACKED IPTR methodid;
120 STACKED ULONG method;
123 struct MUIP_Application_RemInputHandler
125 STACKED ULONG MethodID;
126 STACKED struct MUI_InputHandlerNode *ihnode;
129 struct MUIP_Application_ReturnID
131 STACKED ULONG MethodID;
132 STACKED ULONG retid;
135 struct MUIP_Application_Save
137 STACKED ULONG MethodID;
138 STACKED STRPTR name;
141 struct MUIP_Application_SetConfigItem
143 STACKED ULONG MethodID;
144 STACKED ULONG item;
145 STACKED APTR data;
148 struct MUIP_Application_SetMenuCheck
150 STACKED ULONG MethodID;
151 STACKED ULONG MenuID;
152 STACKED LONG stat;
155 struct MUIP_Application_SetMenuState
157 STACKED ULONG MethodID;
158 STACKED ULONG MenuID;
159 STACKED LONG stat;
162 struct MUIP_Application_ShowHelp
164 STACKED ULONG MethodID;
165 STACKED Object *window;
166 STACKED char *name;
167 STACKED char *node;
168 STACKED LONG line;
171 struct MUIP_Application_SetConfigdata
173 STACKED ULONG MethodID;
174 STACKED APTR configdata;
177 struct MUIP_Application_OpenWindows
179 STACKED ULONG MethodID;
182 struct MUIP_Application_UpdateMenus
184 STACKED ULONG MethodID;
187 /*** Attributes *************************************************************/
188 #define MUIA_Application_Active \
189 (MUIB_MUI|0x004260ab) /* MUI: V4 isg BOOL */
190 #define MUIA_Application_Author \
191 (MUIB_MUI|0x00424842) /* MUI: V4 i.g STRPTR */
192 #define MUIA_Application_Base \
193 (MUIB_MUI|0x0042e07a) /* MUI: V4 i.g STRPTR */
194 #define MUIA_Application_Broker \
195 (MUIB_MUI|0x0042dbce) /* MUI: V4 ..g Broker * */
196 #define MUIA_Application_BrokerHook \
197 (MUIB_MUI|0x00428f4b) /* MUI: V4 isg struct Hook * */
198 #define MUIA_Application_BrokerPort \
199 (MUIB_MUI|0x0042e0ad) /* MUI: V6 ..g struct MsgPort * */
200 #define MUIA_Application_BrokerPri \
201 (MUIB_MUI|0x0042c8d0) /* MUI: V6 i.g LONG */
202 #define MUIA_Application_Commands \
203 (MUIB_MUI|0x00428648) /* MUI: V4 isg struct MUI_Command * */
204 #define MUIA_Application_Copyright \
205 (MUIB_MUI|0x0042ef4d) /* MUI: V4 i.g STRPTR */
206 #define MUIA_Application_Description \
207 (MUIB_MUI|0x00421fc6) /* MUI: V4 i.g STRPTR */
208 #define MUIA_Application_DiskObject \
209 (MUIB_MUI|0x004235cb) /* MUI: V4 isg struct DiskObject * */
210 #define MUIA_Application_DoubleStart \
211 (MUIB_MUI|0x00423bc6) /* MUI: V4 ..g BOOL */
212 #define MUIA_Application_DropObject \
213 (MUIB_MUI|0x00421266) /* MUI: V5 is. Object * */
214 #define MUIA_Application_ForceQuit \
215 (MUIB_MUI|0x004257df) /* MUI: V8 ..g BOOL */
216 #define MUIA_Application_HelpFile \
217 (MUIB_MUI|0x004293f4) /* MUI: V8 isg STRPTR */
218 #define MUIA_Application_Iconified \
219 (MUIB_MUI|0x0042a07f) /* MUI: V4 .sg BOOL */
220 #define MUIA_Application_MenuAction \
221 (MUIB_MUI|0x00428961) /* MUI: V4 ..g ULONG */
222 #define MUIA_Application_MenuHelp \
223 (MUIB_MUI|0x0042540b) /* MUI: V4 ..g ULONG */
224 #define MUIA_Application_Menustrip \
225 (MUIB_MUI|0x004252d9) /* MUI: V8 i.. Object * */
226 #define MUIA_Application_RexxHook \
227 (MUIB_MUI|0x00427c42) /* MUI: V7 isg struct Hook * */
228 #define MUIA_Application_RexxMsg \
229 (MUIB_MUI|0x0042fd88) /* MUI: V4 ..g struct RxMsg * */
230 #define MUIA_Application_RexxString \
231 (MUIB_MUI|0x0042d711) /* MUI: V4 .s. STRPTR */
232 #define MUIA_Application_SingleTask \
233 (MUIB_MUI|0x0042a2c8) /* MUI: V4 i.. BOOL */
234 #define MUIA_Application_Sleep \
235 (MUIB_MUI|0x00425711) /* MUI: V4 .s. BOOL */
236 #define MUIA_Application_Title \
237 (MUIB_MUI|0x004281b8) /* MUI: V4 i.g STRPTR */
238 #define MUIA_Application_UseCommodities \
239 (MUIB_MUI|0x00425ee5) /* MUI: V10 i.. BOOL */
240 #define MUIA_Application_UsedClasses \
241 (MUIB_MUI|0x0042e9a7) /* MUI undoc: V20 i.. STRPTR [] */
242 #define MUIA_Application_UseRexx \
243 (MUIB_MUI|0x00422387) /* MUI: V10 i.. BOOL */
244 #define MUIA_Application_SetWinPos \
245 (MUIB_MUI|0x00432387)
246 #define MUIA_Application_GetWinPos \
247 (MUIB_MUI|0x00432388)
248 #define MUIA_Application_SearchWinId \
249 (MUIB_MUI|0x00432389)
250 #define MUIA_Application_GetWinPosAddr \
251 (MUIB_MUI|0x00432390)
252 #define MUIA_Application_GetWinPosSize \
253 (MUIB_MUI|0x00432391)
254 #define MUIA_Application_CopyWinPosToApp \
255 (MUIB_MUI|0x00432392)
256 #define MAXWINS 300
258 struct windowpos
260 ULONG id;
261 WORD x1, y1, w1, h1;
262 WORD x2, y2, w2, h2;
266 [I-G] CONST_STRPTR
267 Standard DOS version string. Example: "$VER: Program 1.3 (14.11.03)".
268 Zune extension: If unspecified or NULL, it will be automatically
269 constructed from MUIA_Application_Title, MUIA_Application_Version_Number,
270 MUIA_Application_Version_Date and MUIA_Application_Version_Extra as
271 follows: "$VER: <title> <version> (<date>) [<extra>]".
273 #define MUIA_Application_Version \
274 (MUIB_MUI|0x0042b33f)
276 #define MUIA_Application_Window \
277 (MUIB_MUI|0x0042bfe0) /* MUI: V4 i.. Object * */
278 #define MUIA_Application_WindowList \
279 (MUIB_MUI|0x00429abe) /* MUI: V13 ..g struct List * */
281 #define MUIA_Application_Configdata \
282 (MUIB_Application | 0x00000000) /* Zune 20030407 .s. Object * */
285 [I-G] CONST_STRPTR
286 Version number. Examples: "1.5", "2.37.4b".
288 #define MUIA_Application_Version_Number \
289 (MUIB_Application | 0x00000001)
292 [I-G] CONST_STRPTR
293 Date information on the standard international YYYY-MM-DD format.
295 #define MUIA_Application_Version_Date \
296 (MUIB_Application | 0x00000002)
299 [I-G] CONST_STRPTR
300 Arbitrary extra version information. Example: "nightly build".
302 #define MUIA_Application_Version_Extra \
303 (MUIB_Application | 0x00000003)
306 /* MUI Obsolette tags */
307 #ifdef MUI_OBSOLETE
308 #define MUIA_Application_Menu \
309 (MUIB_MUI | 0x00420e1f) /* MUI: V4 i.g struct NewMenu * */
310 #endif /* MUI_OBSOLETE */
312 /**************************************************************************
313 Structure used ba MUIM_Application_AddInputHandler/RemInputHandler
314 **************************************************************************/
315 struct MUI_InputHandlerNode
317 struct MinNode ihn_Node;
318 Object *ihn_Object;
319 union
321 ULONG ihn_sigs;
322 struct
324 UWORD ihn_millis;
325 UWORD ihn_current;
326 } ihn_timer;
328 ihn_stuff;
329 ULONG ihn_Flags;
330 ULONG ihn_Method;
333 /* Easier access to the members */
334 #define ihn_Millis ihn_stuff.ihn_timer.ihn_millis
335 #define ihn_Current ihn_stuff.ihn_timer.ihn_current
336 #define ihn_Signals ihn_stuff.ihn_sigs
338 /* Flags for ihn_Flags */
339 #define MUIIHNF_TIMER (1<<0) /* you want to be called every ihn_Millis msecs */
341 /**************************************************************************
342 Special values for the name field of MUIM_Application_Load/Save
343 **************************************************************************/
344 #define MUIV_Application_Save_ENV ((STRPTR) 0)
345 #define MUIV_Application_Save_ENVARC ((STRPTR)~0)
346 #define MUIV_Application_Load_ENV ((STRPTR) 0)
347 #define MUIV_Application_Load_ENVARC ((STRPTR)~0)
350 /**************************************************************************
351 Special Values MUIM_Application_ReturnID. Usually program should leave
352 the event loop if this is set
353 **************************************************************************/
354 #define MUIV_Application_ReturnID_Quit ((ULONG)-1)
357 extern const struct __MUIBuiltinClass _MUI_Application_desc; /* PRIV */
360 struct MUI_GlobalInfo
362 ULONG priv0;
363 Object *mgi_ApplicationObject;
365 /* The following data is private only, might be extended! */
366 struct MsgPort *mgi_WindowsPort; /* application-wide IDCMP port *//* PRIV */
367 struct MsgPort *mgi_AppPort; /* application-wide AppMessage port */ /* PRIV */
368 Object *mgi_Configdata; /* The config data *//* PRIV */
369 struct ZunePrefsNew *mgi_Prefs; /* For faster access *//* PRIV */
370 struct Screen *mgi_CustomScreen; /* Screen opened customly by the application *//* PRIV */
374 #endif /* _MUI_CLASSES_APPLICATION_H */