New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / intuition / openscreentaglist.c
blob7d0e1ba95ff0f846d7edadc388add53db1b725ed
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include "intuition_intern.h"
9 /*****************************************************************************
11 NAME */
12 #include <utility/tagitem.h>
13 #include <intuition/screens.h>
14 #include <proto/intuition.h>
16 AROS_LH2(struct Screen *, OpenScreenTagList,
18 /* SYNOPSIS */
19 AROS_LHA(struct NewScreen *, newScreen, A0),
20 AROS_LHA(struct TagItem *, tagList, A1),
22 /* LOCATION */
23 struct IntuitionBase *, IntuitionBase, 102, Intuition)
25 /* FUNCTION
27 INPUTS
29 RESULT
31 NOTES
33 EXAMPLE
35 BUGS
37 SEE ALSO
39 INTERNALS
41 HISTORY
42 29-10-95 digulla automatically created from
43 intuition_lib.fd and clib/intuition_protos.h
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
48 AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
50 struct ExtNewScreen ns =
52 0, 0, -1, -1, 1, /* left, top, width, height, depth */
53 0, 1, /* DetailPen, BlockPen */
54 HIRES | LACE, /* ViewModes */
55 CUSTOMSCREEN | SHOWTITLE, /* Type */
56 NULL, /* Font */
57 NULL, /* DefaultTitle */
58 NULL, /* Gadgets */
59 NULL, /* CustomBitMap */
60 NULL /* Extension (taglist) */
63 DEBUG_OPENSCREENTAGLIST(dprintf("OpenScreenTagList: NewScreen 0x%lx Tags 0x%lx\n",
64 newScreen, tagList));
65 ns.DetailPen = GetPrivIBase(IntuitionBase)->DriPens4[DETAILPEN];
66 ns.BlockPen = GetPrivIBase(IntuitionBase)->DriPens4[BLOCKPEN];
68 if (newScreen)
69 CopyMem (newScreen, &ns, (newScreen->Type & NS_EXTENDED) ? sizeof (struct ExtNewScreen) :
70 sizeof (struct NewScreen));
72 if (tagList)
74 ns.Extension = tagList;
75 ns.Type |= NS_EXTENDED;
78 #ifdef __MORPHOS__
79 /* calling OpenScreen through the library vector causes a loop with cgx's patch. */
81 extern ULONG LIB_OpenScreen(void);
83 REG_A0 = (LONG)&ns;
84 REG_A6 = (LONG)IntuitionBase;
86 return (struct Screen *) LIB_OpenScreen();
88 #else
89 return OpenScreen ((struct NewScreen *)&ns);
90 #endif
92 AROS_LIBFUNC_EXIT
94 } /* OpenScreenTagList */