2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include "intuition_intern.h"
9 /*****************************************************************************
12 #include <utility/tagitem.h>
13 #include <intuition/screens.h>
14 #include <proto/intuition.h>
16 AROS_LH2(struct Screen
*, OpenScreenTagList
,
19 AROS_LHA(struct NewScreen
*, newScreen
, A0
),
20 AROS_LHA(struct TagItem
*, tagList
, A1
),
23 struct IntuitionBase
*, IntuitionBase
, 102, Intuition
)
29 newScreen - struct with screen specification. This is for compatibility
30 with OpenScreen() and usually set to NULL.
31 tagList - tags which specify the screen
41 Default depends on display clip
44 Default depends on display clip
47 Select depth of screen. This specifies how many
48 colors the screen can display.
52 Pen number for details.
56 Pen number for block fills.
62 SA_Font (struct TextAttr *)
63 Default: NULL, meaning user's preferred monospace font
65 SA_BitMap (struct BitMap *)
66 Provide a custom bitmap.
72 Screen will be created behind other open screens.
76 Intuition doesn't draw system gadgets and screen title.
80 PUBLICSCREEN or CUSTOMSCREEN.
83 32-bit display mode ID, as defined in the <graphics/modeid.h>.
90 OSCAN_TEXT - A region which is fully visible.
91 Recommended for text display.
93 OSCAN_STANDARD - A region whose edges are "just out of view."
94 Recommended for games and presentations.
96 OSCAN_MAX - Largest region which Intuition can handle comfortably.
98 OSCAN_VIDEO - Largest region the graphics.library can display.
102 SA_DClip (struct Rectangle *)
103 Define a DisplayClip region. See QueryOverscan().
104 It's easier to use SA_Overscan.
107 Screens can be larger than the DisplayClip region. Set this tag
108 to TRUE if you want to enable automatic scrolling when you reach
109 the edge of the screen with the mouse pointer.
112 Make this screen a public screen with the given name.
113 Screen is opened in "private" mode.
116 Define the pen array for struct DrawInfo. This enables
119 This array contains often just the terminator ~0.
120 You define a list of pens which overwrite the DrawInfo pens.
121 The pen arrayy must be terminated with ~0.
123 SA_PubTask (struct Task *)
124 Task to be signalled, when last visitor window of a public
128 Signal number used to notify a task when the last visitor window
129 of a public screen is closed.
131 SA_Colors (struct ColorSpec *)
132 Screen's initial color palette. Array must be terminated
133 with ColorIndex = -1.
135 SA_FullPalette (BOOL)
136 Intuition maintains a set of 32 preference colors.
139 SA_ErrorCode (ULONG *)
140 Intuition puts additional error code in this field when
141 opening the screen failed.
142 OSERR_NOMONITOR - monitor for display mode not available.
143 OSERR_NOCHIPS - you need newer custom chips for display mode.
144 OSERR_NOMEM - couldn't get normal memory
145 OSERR_NOCHIPMEM - couldn't get chip memory
146 OSERR_PUBNOTUNIQUE - public screen name already used
147 OSERR_UNKNOWNMODE - don't recognize display mode requested
148 OSERR_TOODEEP - screen too deep to be displayed on
150 OSERR_ATTACHFAIL - An illegal attachment of screens was
154 Select screen font type. This overwrites SA_Font.
157 0 - Fixed-width font (old-style)
158 1 - Font which is set by font preferences editor. Note:
159 windows opened on this screen will still have the rastport
160 initialized with the fixed-width font (sysfont 0).
164 SA_Parent (struct Screen *)
165 Attach the screen to the given parent screen.
167 SA_FrontChild (struct Screen *)
168 Attach given child screen to this screen. Child screen
169 must already be open. The child screen will go to the
170 front of the screen group.
172 SA_BackChild (struct Screen *)
173 Attach given child screen to this screen. Child screen
174 must already be open. The child screen will go behind other
177 SA_BackFill (struct Hook *)
178 Backfill hook (see layers.library/InstallLayerInfoHook() ).
181 Make screen draggable.
185 Set to TRUE if the screen must not share the display with
186 other screens. The screen will not be draggable and doesn't
187 appear behind other screens, but it still is depth arrangeable.
191 Per default, Intuition obtains the pens of a public screen with
192 PENF_EXCLUSIVE. Set this to TRUE to instruct Intuition to leave
193 the pens unallocated.
196 SA_Colors32 (ULONG *)
197 Data is forwarded to graphics.library/LoadRGB32().
198 Overwrites values which were set by SA_Colors.
200 SA_Interleaved (BOOL)
201 Request interleaved bimap. It this fails a non-interleaved
202 bitmap will be allocated.
205 SA_VideoControl (struct TagItem *)
206 Taglist which will be passed to VideoControl() after the
210 Number of entries of the ColorMap.
211 Default: 1<<depth, but not less than 32
213 SA_LikeWorkbench (BOOL)
214 Inherit depth, colors, pen-array, screen mode, etc. from
215 the Workbench screen. Individual attributes can be overridden
219 SA_MinimizeISG (BOOL)
220 Minimize the Inter-Screen-Gap. For compatibility,
223 Pointer to screen or NULL if opening fails.
226 If you need a pointer to the screen's bitmap use
227 Screen->RastPort.BitMap instead of &Screen->BitMap.
229 If you want DOS requester to appear on your screen you have to do:
230 process = FindTask(0);
231 process->pr_WindowPtr = (APTR) window;
232 The old value of pr->WindowPtr must be reset before you quit your
243 *****************************************************************************/
247 struct ExtNewScreen ns
=
249 0, 0, -1, -1, 1, /* left, top, width, height, depth */
250 0, 1, /* DetailPen, BlockPen */
251 HIRES
| LACE
, /* ViewModes */
252 CUSTOMSCREEN
| SHOWTITLE
, /* Type */
254 NULL
, /* DefaultTitle */
256 NULL
, /* CustomBitMap */
257 NULL
/* Extension (taglist) */
260 DEBUG_OPENSCREENTAGLIST(dprintf("OpenScreenTagList: NewScreen 0x%lx Tags 0x%lx\n",
261 newScreen
, tagList
));
262 ns
.DetailPen
= GetPrivIBase(IntuitionBase
)->DriPens4
[DETAILPEN
];
263 ns
.BlockPen
= GetPrivIBase(IntuitionBase
)->DriPens4
[BLOCKPEN
];
266 CopyMem (newScreen
, &ns
, (newScreen
->Type
& NS_EXTENDED
) ? sizeof (struct ExtNewScreen
) :
267 sizeof (struct NewScreen
));
271 ns
.Extension
= tagList
;
272 ns
.Type
|= NS_EXTENDED
;
276 /* calling OpenScreen through the library vector causes a loop with cgx's patch. */
278 extern ULONG
LIB_OpenScreen(void);
281 REG_A6
= (LONG
)IntuitionBase
;
283 return (struct Screen
*) LIB_OpenScreen();
286 return OpenScreen ((struct NewScreen
*)&ns
);
291 } /* OpenScreenTagList */