added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / rom / intuition / openscreentaglist.c
blobd4865e5994f6d16b71cb7a3486b8d030992f374d
1 /*
2 Copyright © 1995-2007, 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
49 struct ExtNewScreen ns =
51 0, 0, -1, -1, 1, /* left, top, width, height, depth */
52 0, 1, /* DetailPen, BlockPen */
53 HIRES | LACE, /* ViewModes */
54 CUSTOMSCREEN | SHOWTITLE, /* Type */
55 NULL, /* Font */
56 NULL, /* DefaultTitle */
57 NULL, /* Gadgets */
58 NULL, /* CustomBitMap */
59 NULL /* Extension (taglist) */
62 DEBUG_OPENSCREENTAGLIST(dprintf("OpenScreenTagList: NewScreen 0x%lx Tags 0x%lx\n",
63 newScreen, tagList));
64 ns.DetailPen = GetPrivIBase(IntuitionBase)->DriPens4[DETAILPEN];
65 ns.BlockPen = GetPrivIBase(IntuitionBase)->DriPens4[BLOCKPEN];
67 if (newScreen)
68 CopyMem (newScreen, &ns, (newScreen->Type & NS_EXTENDED) ? sizeof (struct ExtNewScreen) :
69 sizeof (struct NewScreen));
71 if (tagList)
73 ns.Extension = tagList;
74 ns.Type |= NS_EXTENDED;
77 #ifdef __MORPHOS__
78 /* calling OpenScreen through the library vector causes a loop with cgx's patch. */
80 extern ULONG LIB_OpenScreen(void);
82 REG_A0 = (LONG)&ns;
83 REG_A6 = (LONG)IntuitionBase;
85 return (struct Screen *) LIB_OpenScreen();
87 #else
88 return OpenScreen ((struct NewScreen *)&ns);
89 #endif
91 AROS_LIBFUNC_EXIT
93 } /* OpenScreenTagList */