Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / muiscreen / openpubscreen.c
blob12a3cf61d7133702c33cfad7d0a7808b712647a4
1 /*
2 Copyright © 2009, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <libraries/muiscreen.h>
7 #include <utility/hooks.h>
8 #include <intuition/screens.h>
9 #include <proto/intuition.h>
10 #include <proto/exec.h>
11 #include <exec/lists.h>
12 #define DEBUG 1
13 #include <aros/debug.h>
15 #include "muiscreen_intern.h"
17 /*****************************************************************************
19 NAME */
20 #include <proto/muiscreen.h>
22 AROS_LH1(char *, MUIS_OpenPubScreen,
24 /* SYNOPSIS */
25 AROS_LHA(struct MUI_PubScreenDesc *, desc, A0),
27 /* LOCATION */
28 struct MUIScreenBase_intern *, MUIScreenBase, 0x42, MUIScreen)
30 /* FUNCTION
32 INPUTS
34 RESULT
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 INTERNALS
46 ******************************************************************************/
49 AROS_LIBFUNC_INIT
51 struct TextAttr *font = NULL;
52 struct Hook *backfillHook = NULL;
53 char *ret = NULL;
55 D(bug("MUIS_OpenPubScreen(%p)\n", desc));
57 // TODO desc->SysDefault
58 // TODO desc->AutoClose
59 // TODO desc->CloseGadget
60 // TODO desc->SystemPens
61 // TODO desc->Palette
63 struct Screen *screen = OpenScreenTags(NULL,
64 SA_Type, (IPTR) PUBLICSCREEN,
65 SA_PubName, desc->Name,
66 SA_Title, desc->Title,
67 SA_Font, font,
68 (backfillHook ? SA_BackFill : TAG_IGNORE), backfillHook,
69 SA_DisplayID, (IPTR) desc->DisplayID,
70 SA_Width, (IPTR) desc->DisplayWidth,
71 SA_Height, (IPTR) desc->DisplayHeight,
72 SA_Depth, (IPTR) desc->DisplayDepth,
73 SA_Overscan, (IPTR) desc->OverscanType,
74 SA_AutoScroll, (IPTR) desc->AutoScroll,
75 SA_Draggable, (IPTR) !desc->NoDrag,
76 SA_Exclusive, (IPTR) desc->Exclusive,
77 SA_Interleaved, (IPTR) desc->Interleaved,
78 SA_Behind, (IPTR) desc->Behind,
79 TAG_DONE);
81 if(screen)
83 ret = desc->Name;
84 struct Node *node;
85 ForeachNode(&MUIScreenBase->clients, node)
87 struct MUIS_InfoClient *client = (struct MUIS_InfoClient*) node;
88 Signal(client->task, client->sigbit);
92 return ret;
94 AROS_LIBFUNC_EXIT