Minor fixes to comments.
[AROS.git] / rom / intuition / getscreendata.c
blobdd77fdf7380ae884bfdb62a461affabe66f41b9b
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$
6 Get infos 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 HISTORY
64 29-10-95 digulla automatically created from
65 intuition_lib.fd and clib/intuition_protos.h
67 *****************************************************************************/
69 AROS_LIBFUNC_INIT
71 DEBUG_GETSCREENDATA(dprintf("GetScreenData(buffer 0x%lx size 0x%lx type 0x%lx screen 0x%lx)\n",buffer,size,type,screen));
73 EXTENDUWORD(size);
74 EXTENDUWORD(type);
76 if (type == WBENCHSCREEN)
78 screen = GetPrivIBase(IntuitionBase)->WorkBench;
80 else if (type != CUSTOMSCREEN)
82 /* FIXME: Handle CUSTOMSCREEN */
83 screen = NULL;
86 if (screen)
87 CopyMem (screen, buffer, size);
89 return (screen != NULL);
91 AROS_LIBFUNC_EXIT
92 } /* GetScreenData */