Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / workbench / libs / muimaster / classes / application.h
blob235973b56473c5d5db86198ce84f1c4402260895
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 */
47 /* Method Structures */
48 struct MUIP_Application_AboutMUI { STACKED ULONG MethodID; STACKED Object *refwindow; };
49 struct MUIP_Application_AddInputHandler { STACKED ULONG MethodID; STACKED struct MUI_InputHandlerNode *ihnode; };
50 struct MUIP_Application_CheckRefresh { STACKED ULONG MethodID; };
51 struct MUIP_Application_GetMenuCheck { STACKED ULONG MethodID; STACKED ULONG MenuID; };
52 struct MUIP_Application_GetMenuState { STACKED ULONG MethodID; STACKED ULONG MenuID; };
53 struct MUIP_Application_Input { STACKED ULONG MethodID; STACKED ULONG *signal; };
54 struct MUIP_Application_InputBuffered { STACKED ULONG MethodID; };
55 struct MUIP_Application_Load { STACKED ULONG MethodID; STACKED STRPTR name; };
56 struct MUIP_Application_NewInput { STACKED ULONG MethodID; STACKED ULONG *signal; };
57 struct MUIP_Application_OpenConfigWindow { STACKED ULONG MethodID; STACKED ULONG flags; };
58 struct MUIP_Application_PushMethod { STACKED ULONG MethodID; STACKED Object *dest; STACKED LONG count; /* more elements may follow */ };
59 struct MUIP_Application_RemInputHandler { STACKED ULONG MethodID; STACKED struct MUI_InputHandlerNode *ihnode; };
60 struct MUIP_Application_ReturnID { STACKED ULONG MethodID; STACKED ULONG retid; };
61 struct MUIP_Application_Save { STACKED ULONG MethodID; STACKED STRPTR name; };
62 struct MUIP_Application_SetConfigItem { STACKED ULONG MethodID; STACKED ULONG item; STACKED APTR data; };
63 struct MUIP_Application_SetMenuCheck { STACKED ULONG MethodID; STACKED ULONG MenuID; STACKED LONG stat; };
64 struct MUIP_Application_SetMenuState { STACKED ULONG MethodID; STACKED ULONG MenuID; STACKED LONG stat; };
65 struct MUIP_Application_ShowHelp { STACKED ULONG MethodID; STACKED Object *window; STACKED char *name; STACKED char *node; STACKED LONG line; };
66 struct MUIP_Application_SetConfigdata { STACKED ULONG MethodID; STACKED APTR configdata; };
67 struct MUIP_Application_OpenWindows { STACKED ULONG MethodID; };
68 struct MUIP_Application_UpdateMenus { STACKED ULONG MethodID; };
70 /*** Attributes *************************************************************/
71 #define MUIA_Application_Active (MUIB_MUI|0x004260ab) /* MUI: V4 isg BOOL */
72 #define MUIA_Application_Author (MUIB_MUI|0x00424842) /* MUI: V4 i.g STRPTR */
73 #define MUIA_Application_Base (MUIB_MUI|0x0042e07a) /* MUI: V4 i.g STRPTR */
74 #define MUIA_Application_Broker (MUIB_MUI|0x0042dbce) /* MUI: V4 ..g Broker * */
75 #define MUIA_Application_BrokerHook (MUIB_MUI|0x00428f4b) /* MUI: V4 isg struct Hook * */
76 #define MUIA_Application_BrokerPort (MUIB_MUI|0x0042e0ad) /* MUI: V6 ..g struct MsgPort * */
77 #define MUIA_Application_BrokerPri (MUIB_MUI|0x0042c8d0) /* MUI: V6 i.g LONG */
78 #define MUIA_Application_Commands (MUIB_MUI|0x00428648) /* MUI: V4 isg struct MUI_Command * */
79 #define MUIA_Application_Copyright (MUIB_MUI|0x0042ef4d) /* MUI: V4 i.g STRPTR */
80 #define MUIA_Application_Description (MUIB_MUI|0x00421fc6) /* MUI: V4 i.g STRPTR */
81 #define MUIA_Application_DiskObject (MUIB_MUI|0x004235cb) /* MUI: V4 isg struct DiskObject * */
82 #define MUIA_Application_DoubleStart (MUIB_MUI|0x00423bc6) /* MUI: V4 ..g BOOL */
83 #define MUIA_Application_DropObject (MUIB_MUI|0x00421266) /* MUI: V5 is. Object * */
84 #define MUIA_Application_ForceQuit (MUIB_MUI|0x004257df) /* MUI: V8 ..g BOOL */
85 #define MUIA_Application_HelpFile (MUIB_MUI|0x004293f4) /* MUI: V8 isg STRPTR */
86 #define MUIA_Application_Iconified (MUIB_MUI|0x0042a07f) /* MUI: V4 .sg BOOL */
87 #define MUIA_Application_MenuAction (MUIB_MUI|0x00428961) /* MUI: V4 ..g ULONG */
88 #define MUIA_Application_MenuHelp (MUIB_MUI|0x0042540b) /* MUI: V4 ..g ULONG */
89 #define MUIA_Application_Menustrip (MUIB_MUI|0x004252d9) /* MUI: V8 i.. Object * */
90 #define MUIA_Application_RexxHook (MUIB_MUI|0x00427c42) /* MUI: V7 isg struct Hook * */
91 #define MUIA_Application_RexxMsg (MUIB_MUI|0x0042fd88) /* MUI: V4 ..g struct RxMsg * */
92 #define MUIA_Application_RexxString (MUIB_MUI|0x0042d711) /* MUI: V4 .s. STRPTR */
93 #define MUIA_Application_SingleTask (MUIB_MUI|0x0042a2c8) /* MUI: V4 i.. BOOL */
94 #define MUIA_Application_Sleep (MUIB_MUI|0x00425711) /* MUI: V4 .s. BOOL */
95 #define MUIA_Application_Title (MUIB_MUI|0x004281b8) /* MUI: V4 i.g STRPTR */
96 #define MUIA_Application_UseCommodities (MUIB_MUI|0x00425ee5) /* MUI: V10 i.. BOOL */
97 #define MUIA_Application_UsedClasses (MUIB_MUI|0x0042e9a7) /* MUI undoc: V20 i.. STRPTR [] */
98 #define MUIA_Application_UseRexx (MUIB_MUI|0x00422387) /* MUI: V10 i.. BOOL */
99 #define MUIA_Application_SetWinPos (MUIB_MUI|0x00432387)
100 #define MUIA_Application_GetWinPos (MUIB_MUI|0x00432388)
101 #define MUIA_Application_SearchWinId (MUIB_MUI|0x00432389)
102 #define MUIA_Application_GetWinPosAddr (MUIB_MUI|0x00432390)
103 #define MUIA_Application_GetWinPosSize (MUIB_MUI|0x00432391)
104 #define MUIA_Application_CopyWinPosToApp (MUIB_MUI|0x00432392)
105 #define MAXWINS 300
107 struct windowpos
109 ULONG id;
110 WORD x1,y1,w1,h1;
111 WORD x2,y2,w2,h2;
115 [I-G] CONST_STRPTR
116 Standard DOS version string. Example: "$VER: Program 1.3 (14.11.03)".
117 Zune extension: If unspecified or NULL, it will be automatically
118 constructed from MUIA_Application_Title, MUIA_Application_Version_Number,
119 MUIA_Application_Version_Date and MUIA_Application_Version_Extra as
120 follows: "$VER: <title> <version> (<date>) [<extra>]".
122 #define MUIA_Application_Version (MUIB_MUI|0x0042b33f)
124 #define MUIA_Application_Window (MUIB_MUI|0x0042bfe0) /* MUI: V4 i.. Object * */
125 #define MUIA_Application_WindowList (MUIB_MUI|0x00429abe) /* MUI: V13 ..g struct List * */
127 #define MUIA_Application_Configdata (MUIB_Application | 0x00000000) /* Zune 20030407 .s. Object * */
130 [I-G] CONST_STRPTR
131 Version number. Examples: "1.5", "2.37.4b".
133 #define MUIA_Application_Version_Number (MUIB_Application | 0x00000001)
136 [I-G] CONST_STRPTR
137 Date information on the standard international YYYY-MM-DD format.
139 #define MUIA_Application_Version_Date (MUIB_Application | 0x00000002)
142 [I-G] CONST_STRPTR
143 Arbitrary extra version information. Example: "nightly build".
145 #define MUIA_Application_Version_Extra (MUIB_Application | 0x00000003)
148 /* MUI Obsolette tags */
149 #ifdef MUI_OBSOLETE
150 #define MUIA_Application_Menu (MUIB_MUI|0x00420e1f) /* MUI: V4 i.g struct NewMenu * */
151 #endif /* MUI_OBSOLETE */
153 /**************************************************************************
154 Structure used ba MUIM_Application_AddInputHandler/RemInputHandler
155 **************************************************************************/
156 struct MUI_InputHandlerNode
158 struct MinNode ihn_Node;
159 Object *ihn_Object;
160 union
162 ULONG ihn_sigs;
163 struct
165 UWORD ihn_millis;
166 UWORD ihn_current;
167 } ihn_timer;
169 ihn_stuff;
170 ULONG ihn_Flags;
171 ULONG ihn_Method;
174 /* Easier access to the members */
175 #define ihn_Millis ihn_stuff.ihn_timer.ihn_millis
176 #define ihn_Current ihn_stuff.ihn_timer.ihn_current
177 #define ihn_Signals ihn_stuff.ihn_sigs
179 /* Flags for ihn_Flags */
180 #define MUIIHNF_TIMER (1<<0) /* you want to be called every ihn_Millis msecs */
182 /**************************************************************************
183 Special values for the name field of MUIM_Application_Load/Save
184 **************************************************************************/
185 #define MUIV_Application_Save_ENV ((STRPTR) 0)
186 #define MUIV_Application_Save_ENVARC ((STRPTR)~0)
187 #define MUIV_Application_Load_ENV ((STRPTR) 0)
188 #define MUIV_Application_Load_ENVARC ((STRPTR)~0)
191 /**************************************************************************
192 Special Values MUIM_Application_ReturnID. Usally programm should leave
193 the event loop if this is set
194 **************************************************************************/
195 #define MUIV_Application_ReturnID_Quit ((ULONG)-1)
199 extern const struct __MUIBuiltinClass _MUI_Application_desc; /* PRIV */
203 struct MUI_GlobalInfo
205 ULONG priv0;
206 Object *mgi_ApplicationObject;
208 /* The following data is private only, might be extented! */
209 struct MsgPort *mgi_WindowsPort; /* application-wide IDCMP port */ /* PRIV */
210 Object *mgi_Configdata; /* The config data */ /* PRIV */
211 struct ZunePrefsNew *mgi_Prefs; /* For faster access */ /* PRIV */
212 struct Screen *mgi_CustomScreen; /* Screen opened customly by the application */ /* PRIV */
216 #endif /* _MUI_CLASSES_APPLICATION_H */