squashed commit of private hostlib-resource branch
[tangerine.git] / compiler / include / intuition / screens.h
blobcde4c1d63178b0443ede09a70b3e60337bccaacf
1 #ifndef INTUITION_SCREENS_H
2 #define INTUITION_SCREENS_H
4 /*
5 Copyright 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Screen handling structures
9 Lang: english
12 #ifndef EXEC_TYPES_H
13 # include <exec/types.h>
14 #endif
15 #ifndef GRAPHICS_CLIP_H
16 # include <graphics/clip.h>
17 #endif
18 #ifndef GRAPHICS_GFX_H
19 # include <graphics/gfx.h>
20 #endif
21 #ifndef GRAPHICS_LAYERS_H
22 # include <graphics/layers.h>
23 #endif
24 #ifndef GRAPHICS_RASTPORT_H
25 # include <graphics/rastport.h>
26 #endif
27 #ifndef GRAPHICS_VIEW_H
28 # include <graphics/view.h>
29 #endif
30 #ifndef UTILITY_TAGITEM_H
31 # include <utility/tagitem.h>
32 #endif
34 struct Screen
36 struct Screen * NextScreen;
37 struct Window * FirstWindow;
39 WORD LeftEdge;
40 WORD TopEdge;
41 WORD Width;
42 WORD Height;
44 WORD MouseX;
45 WORD MouseY;
47 UWORD Flags;
48 UBYTE * Title;
49 UBYTE * DefaultTitle;
51 BYTE BarHeight;
52 BYTE BarVBorder;
53 BYTE BarHBorder;
54 BYTE MenuVBorder;
55 BYTE MenuHBorder;
56 BYTE WBorTop;
57 BYTE WBorLeft;
58 BYTE WBorRight;
59 BYTE WBorBottom;
61 struct TextAttr * Font;
63 struct ViewPort ViewPort;
64 struct RastPort RastPort;
65 struct BitMap BitMap; /* OBSOLETE */
66 struct Layer_Info LayerInfo;
68 struct Gadget * FirstGadget;
70 UBYTE DetailPen;
71 UBYTE BlockPen;
73 UWORD SaveColor0;
74 struct Layer * BarLayer;
75 UBYTE * ExtData;
76 UBYTE * UserData;
79 struct NewScreen
81 WORD LeftEdge;
82 WORD TopEdge;
83 WORD Width;
84 WORD Height;
86 WORD Depth;
87 UBYTE DetailPen;
88 UBYTE BlockPen;
90 UWORD ViewModes;
91 UWORD Type; /* see below */
93 struct TextAttr * Font;
94 UBYTE * DefaultTitle;
95 struct Gadget * Gadgets;
96 struct BitMap * CustomBitMap;
99 struct ExtNewScreen
101 WORD LeftEdge;
102 WORD TopEdge;
103 WORD Width;
104 WORD Height;
106 WORD Depth;
107 UBYTE DetailPen;
108 UBYTE BlockPen;
110 UWORD ViewModes;
111 UWORD Type; /* see below */
113 struct TextAttr * Font;
114 UBYTE * DefaultTitle;
115 struct Gadget * Gadgets;
116 struct BitMap * CustomBitMap;
118 /* ExtNewScreen specific extension */
119 struct TagItem * Extension; /* see below */
122 /* Screen->Flags and (Ext)NewScreen->Type*/
123 #define WBENCHSCREEN (1<<0)
124 #define PUBLICSCREEN (1<<1)
125 #define CUSTOMSCREEN 0x000F
126 #define SCREENTYPE 0x000F
127 /* Screen->Flags */
128 #define SHOWTITLE (1<<4)
129 #define BEEPING (1<<5)
130 #define CUSTOMBITMAP (1<<6)
131 #define SCREENBEHIND (1<<7)
132 #define SCREENQUIET (1<<8)
133 #define SCREENHIRES (1<<9)
134 #define PENSHARED (1<<10)
135 #define NS_EXTENDED (1<<12)
136 #define AUTOSCROLL (1<<14)
138 /* Height */
139 #define STDSCREENHEIGHT -1
140 /* Width */
141 #define STDSCREENWIDTH -1
143 /* ExtNewScreen->Extension (Tags) */
144 #define SA_Dummy (TAG_USER + 32)
145 #define SA_Left (SA_Dummy + 1)
146 #define SA_Top (SA_Dummy + 2)
147 #define SA_Width (SA_Dummy + 3)
148 #define SA_Height (SA_Dummy + 4)
149 #define SA_Depth (SA_Dummy + 5)
150 #define SA_DetailPen (SA_Dummy + 6)
151 #define SA_BlockPen (SA_Dummy + 7)
152 #define SA_Title (SA_Dummy + 8)
153 #define SA_Colors (SA_Dummy + 9)
154 #define SA_ErrorCode (SA_Dummy + 10)
155 #define SA_Font (SA_Dummy + 11)
156 #define SA_SysFont (SA_Dummy + 12)
157 #define SA_Type (SA_Dummy + 13)
158 #define SA_BitMap (SA_Dummy + 14)
159 #define SA_PubName (SA_Dummy + 15)
160 #define SA_PubSig (SA_Dummy + 16)
161 #define SA_PubTask (SA_Dummy + 17)
162 #define SA_DisplayID (SA_Dummy + 18)
163 #define SA_DClip (SA_Dummy + 19)
164 #define SA_Overscan (SA_Dummy + 20) /* see below */
166 #define SA_ShowTitle (SA_Dummy + 22)
167 #define SA_Behind (SA_Dummy + 23)
168 #define SA_Quiet (SA_Dummy + 24)
169 #define SA_AutoScroll (SA_Dummy + 25)
170 #define SA_Pens (SA_Dummy + 26)
171 #define SA_FullPalette (SA_Dummy + 27)
172 #define SA_ColorMapEntries (SA_Dummy + 28)
173 #define SA_Parent (SA_Dummy + 29)
174 #define SA_Draggable (SA_Dummy + 30)
175 #define SA_Exclusive (SA_Dummy + 31)
176 #define SA_SharePens (SA_Dummy + 32)
177 #define SA_BackFill (SA_Dummy + 33)
178 #define SA_Interleaved (SA_Dummy + 34)
179 #define SA_Colors32 (SA_Dummy + 35)
180 #define SA_VideoControl (SA_Dummy + 36)
181 #define SA_FrontChild (SA_Dummy + 37)
182 #define SA_BackChild (SA_Dummy + 38)
183 #define SA_LikeWorkbench (SA_Dummy + 39)
184 #define SA_MinimizeISG (SA_Dummy + 41)
185 #define SA_ID (SA_Dummy + 42)
187 /* SA_Overscan */
188 #define OSCAN_TEXT 1
189 #define OSCAN_STANDARD 2
190 #define OSCAN_MAX 3
191 #define OSCAN_VIDEO 4
193 /* Public Screens */
195 struct PubScreenNode
197 struct Node psn_Node;
199 struct Screen * psn_Screen;
200 UWORD psn_Flags; /* see below */
201 WORD psn_Size;
202 WORD psn_VisitorCount;
203 struct Task * psn_SigTask;
204 UBYTE psn_SigBit;
207 /* psn_Flags */
208 #define PSNF_PRIVATE (1<<0)
210 /* Maximum length of public screen names. The buffers containing these strings
211 must have a length of MAXPUBSCREENNAME+1. */
212 #define MAXPUBSCREENNAME 139
214 #define SHANGHAI (1<<0)
215 #define POPPUBSCREEN (1<<1)
217 /* Screen functions */
219 /* AllocScreenBuffer() */
220 #define SB_SCREEN_BITMAP 1
221 #define SB_COPY_BITMAP 2
223 struct ScreenBuffer
225 struct BitMap * sb_BitMap;
226 struct DBufInfo * sb_DBufInfo;
229 /* ScreenDepth() */
230 #define SDEPTH_TOFRONT 0
231 #define SDEPTH_TOBACK 1
232 #define SDEPTH_INFAMILY 2
234 /* ScreenPosition() */
235 #define SPOS_RELATIVE 0x00
236 #define SPOS_ABSOLUTE (1<<0)
237 #define SPOS_MAKEVISIBLE (1<<1)
238 #define SPOS_FORCEDRAG (1<<2)
240 /* Draw Info */
242 struct DrawInfo
244 UWORD dri_Version; /* see below */
245 UWORD dri_NumPens;
246 UWORD * dri_Pens; /* see below */
247 struct TextFont * dri_Font;
248 UWORD dri_Depth;
250 struct
252 UWORD X;
253 UWORD Y;
254 } dri_Resolution;
256 ULONG dri_Flags; /* see below */
258 struct Image * dri_CheckMark;
259 struct Image * dri_AmigaKey;
260 struct Image * dri_SubMenuImage;
262 ULONG dri_Reserved[5];
265 /* dri_Version */
266 #define DRI_VERSION 2
268 /* dri_Flags */
269 #define DRIF_NEWLOOK (1L<<0)
270 #define DRIF_DIRECTCOLOR (1L << 1)
272 /* dri_Pens */
273 #define DETAILPEN 0
274 #define BLOCKPEN 1
275 #define TEXTPEN 2
276 #define SHINEPEN 3
277 #define SHADOWPEN 4
278 #define FILLPEN 5
279 #define FILLTEXTPEN 6
280 #define BACKGROUNDPEN 7
281 #define HIGHLIGHTTEXTPEN 8
282 #define BARDETAILPEN 9
283 #define BARBLOCKPEN 10
284 #define BARTRIMPEN 11
285 #define NUMDRIPENS 12
287 #define PEN_C0 0xFEFF
288 #define PEN_C1 0xFEFE
289 #define PEN_C2 0xFEFD
290 #define PEN_C3 0xFEFC
292 /* values for ChangeDecoration ID param */
294 #define DECORATION_SET 0x8001
295 #define DECORATION_DEFAULT 0x8000
297 /* Errors */
298 #define OSERR_NOMONITOR 1
299 #define OSERR_NOCHIPS 2
300 #define OSERR_NOMEM 3
301 #define OSERR_NOCHIPMEM 4
302 #define OSERR_PUBNOTUNIQUE 5
303 #define OSERR_UNKNOWNMODE 6
304 #define OSERR_TOODEEP 7
305 #define OSERR_ATTACHFAIL 8
306 #define OSERR_NOTAVAILABLE 9
308 #endif /* GRAPHICS_SCREENS_H */