summaryrefslogtreecommitdiffstats
path: root/Doc/mac/libscrap.tex
blob: 059c57ccfad1ccf3ac137da022a0b955da3288c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
\section{\module{Carbon.Scrap} --- Scrap Manager}
\declaremodule{standard}{Carbon.Scrap}
  \platform{Mac}
\modulesynopsis{The Scrap Manager provides basic services for
                implementing cut \&\ paste and clipboard operations.}


This module is only fully available on MacOS9 and earlier under
classic PPC MacPython.  Very limited functionality is available under
Carbon MacPython.

The Scrap\index{Scrap Manager} Manager supports the simplest form of
cut \&\ paste operations on the Macintosh.  It can be use for both
inter- and intra-application clipboard operations.

The \module{Scrap} module provides low-level access to the functions
of the Scrap Manager.  It contains the following functions:


\begin{funcdesc}{InfoScrap}{}
  Return current information about the scrap.  The information is
  encoded as a tuple containing the fields \code{(\var{size},
  \var{handle}, \var{count}, \var{state}, \var{path})}.

  \begin{tableii}{l|l}{var}{Field}{Meaning}
    \lineii{size}{Size of the scrap in bytes.}
    \lineii{handle}{Resource object representing the scrap.}
    \lineii{count}{Serial number of the scrap contents.}
    \lineii{state}{Integer; positive if in memory, \code{0} if on
                   disk, negative if uninitialized.}
    \lineii{path}{Filename of the scrap when stored on disk.}
  \end{tableii}
\end{funcdesc}



\begin{seealso}
  \seetitle[http://developer.apple.com/techpubs/mac/MoreToolbox/MoreToolbox-109.html]
           {Scrap Manager}{Apple's documentation for the Scrap Manager
            gives a lot of useful information about using the Scrap
            Manager in applications.}
\end{seealso}