home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / rom / intuition / getscreendata.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-27  |  2.4 KB  |  100 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: getscreendata.c,v 1.5 1997/01/27 00:36:39 ldp Exp $
  4.     $Log: getscreendata.c,v $
  5.     Revision 1.5  1997/01/27 00:36:39  ldp
  6.     Polish
  7.  
  8.     Revision 1.4  1996/12/10 14:00:04  aros
  9.     Moved #include into first column to allow makedepend to see it.
  10.  
  11.     Revision 1.3  1996/11/08 11:28:02  aros
  12.     All OS function use now Amiga types
  13.  
  14.     Moved intuition-driver protos to intuition_intern.h
  15.  
  16.     Revision 1.2  1996/10/24 15:51:20  aros
  17.     Use the official AROS macros over the __AROS versions.
  18.  
  19.     Revision 1.1  1996/10/21 17:06:49  aros
  20.     A couple of new functions
  21.  
  22.  
  23.     Desc:
  24.     Lang: english
  25. */
  26. #include "intuition_intern.h"
  27. #include <string.h>
  28. #include <proto/exec.h>
  29.  
  30. /*****************************************************************************
  31.  
  32.     NAME */
  33. #include <intuition/screens.h>
  34. #include <proto/intuition.h>
  35.  
  36.     AROS_LH4(LONG, GetScreenData,
  37.  
  38. /*  SYNOPSIS */
  39.     AROS_LHA(APTR           , buffer, A0),
  40.     AROS_LHA(ULONG          , size, D0),
  41.     AROS_LHA(ULONG          , type, D1),
  42.     AROS_LHA(struct Screen *, screen, A1),
  43.  
  44. /*  LOCATION */
  45.     struct IntuitionBase *, IntuitionBase, 71, Intuition)
  46.  
  47. /*  FUNCTION
  48.     Copy part or all infos about a screen into a private buffer.
  49.  
  50.     To copy the Workbench, one would call
  51.  
  52.         GetScreenData (buffer, sizeof(struct Screen), WBENCHSCREEN, NULL)
  53.  
  54.     If the screen is not open, this call will open it. You can use
  55.     this function for these purposes:
  56.  
  57.     1) Get information about the workbench in order to open a window
  58.        on it (eg. size).
  59.     2) Clone a screen.
  60.  
  61.     INPUTS
  62.     buffer - The data gets copied here
  63.     size - The size of the buffer in bytes
  64.     type - The type of the screen as in OpenWindow().
  65.     screen - Ignored unless type is CUSTOMSCREEN.
  66.  
  67.     RESULT
  68.     TRUE if successful, FALSE if the screen could not be opened.
  69.  
  70.     NOTES
  71.  
  72.     EXAMPLE
  73.  
  74.     BUGS
  75.  
  76.     SEE ALSO
  77.  
  78.     INTERNALS
  79.  
  80.     HISTORY
  81.     29-10-95    digulla automatically created from
  82.                 intuition_lib.fd and clib/intuition_protos.h
  83.  
  84. *****************************************************************************/
  85. {
  86.     AROS_LIBFUNC_INIT
  87.     AROS_LIBBASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
  88.  
  89.     if (type == WBENCHSCREEN)
  90.     screen = GetPrivIBase(IntuitionBase)->WorkBench;
  91.     else if (type != CUSTOMSCREEN) /* TODO */
  92.     screen = NULL;
  93.  
  94.     if (screen)
  95.     CopyMem (screen, buffer, size);
  96.  
  97.     return (screen != NULL);
  98.     AROS_LIBFUNC_EXIT
  99. } /* GetScreenData */
  100.