return vendor as a string. don't cast to ULONG
[AROS.git] / rom / intuition / getscreendata.c
blob901508abef973c9e8ae1f15523a05ba602258678
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
6 Get info about a screen. *OBSOLETE*
7 */
9 #include "intuition_intern.h"
10 #include <string.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
15 NAME */
16 #include <intuition/screens.h>
17 #include <proto/intuition.h>
19 AROS_LH4(LONG, GetScreenData,
21 /* SYNOPSIS */
22 AROS_LHA(APTR , buffer, A0),
23 AROS_LHA(ULONG , size, D0),
24 AROS_LHA(ULONG , type, D1),
25 AROS_LHA(struct Screen *, screen, A1),
27 /* LOCATION */
28 struct IntuitionBase *, IntuitionBase, 71, Intuition)
30 /* FUNCTION
31 Copy part or all infos about a screen into a private buffer.
33 To copy the Workbench, one would call
35 GetScreenData (buffer, sizeof(struct Screen), WBENCHSCREEN, NULL)
37 If the screen is not open, this call will open it. You can use
38 this function for these purposes:
40 1) Get information about the workbench in order to open a window
41 on it (eg. size).
42 2) Clone a screen.
44 INPUTS
45 buffer - The data gets copied here
46 size - The size of the buffer in bytes
47 type - The type of the screen as in OpenWindow().
48 screen - Ignored unless type is CUSTOMSCREEN.
50 RESULT
51 TRUE if successful, FALSE if the screen could not be opened.
53 NOTES
55 EXAMPLE
57 BUGS
59 SEE ALSO
61 INTERNALS
63 *****************************************************************************/
65 AROS_LIBFUNC_INIT
67 DEBUG_GETSCREENDATA(dprintf("GetScreenData(buffer 0x%lx size 0x%lx type 0x%lx screen 0x%lx)\n",buffer,size,type,screen));
69 EXTENDUWORD(size);
70 EXTENDUWORD(type);
72 if (type == WBENCHSCREEN)
74 screen = GetPrivIBase(IntuitionBase)->WorkBench;
76 else if (type != CUSTOMSCREEN)
78 /* FIXME: Handle CUSTOMSCREEN */
79 screen = NULL;
82 if (screen)
83 CopyMem (screen, buffer, size);
85 return (screen != NULL);
87 AROS_LIBFUNC_EXIT
88 } /* GetScreenData */