annotate docs/ref/scrap.html @ 3172:d1b367fc08bc tests-returncode

Use a return code of 1 when the tests fail.
author Thomas Kluyver <takowl@gmail.com>
date Wed, 09 Jan 2013 10:13:57 +0000
parents 01b2cb16dc17
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
680
57c120cd3a49 Some documentation new scrap module. ... and some missing docs for cursor.
Rene Dudfield <renesd@gmail.com>
parents:
diff changeset
3
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
4 <html xmlns="http://www.w3.org/1999/xhtml">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
5 <head>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
7
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
8 <title>pygame.scrap &mdash; Pygame v1.9.2 documentation</title>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
9 <link rel="stylesheet" href="../_static/pygame.css" type="text/css" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
10 <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
11 <script type="text/javascript">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
12 var DOCUMENTATION_OPTIONS = {
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
13 URL_ROOT: '../',
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
14 VERSION: '1.9.2',
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
15 COLLAPSE_INDEX: false,
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
16 FILE_SUFFIX: '.html',
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
17 HAS_SOURCE: true
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
18 };
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
19 </script>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
20 <script type="text/javascript" src="../_static/jquery.js"></script>
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
21 <script type="text/javascript" src="../_static/underscore.js"></script>
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
22 <script type="text/javascript" src="../_static/doctools.js"></script>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
23 <link rel="shortcut icon" href="../_static/pygame.ico"/>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
24 <link rel="top" title="Pygame v1.9.2 documentation" href="../index.html" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
25 <link rel="next" title="pygame.sndarray" href="sndarray.html" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
26 <link rel="prev" title="pygame.Rect" href="rect.html" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
27 </head>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
28 <body>
680
57c120cd3a49 Some documentation new scrap module. ... and some missing docs for cursor.
Rene Dudfield <renesd@gmail.com>
parents:
diff changeset
29
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
30 <div class="document">
680
57c120cd3a49 Some documentation new scrap module. ... and some missing docs for cursor.
Rene Dudfield <renesd@gmail.com>
parents:
diff changeset
31
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
32 <div class="header">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
33 <table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
34 <tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
35 <td class="logo">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
36 <a href="http://www.pygame.org/">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
37 <img src="../_static/pygame_tiny.png"/>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
38 </a>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
39 <h5>pygame documentation</h5>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
40 </td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
41 <td class="pagelinks">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
42 <p class="top">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
43 ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
44 <a href="http://www.pygame.org/">Pygame Home</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
45 <a href="../index.html">Help Contents</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
46 <a href="../genindex.html">Reference Index</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
47 </p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
48 <p class="bottom">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
49 <a href="camera.html">camera</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
50 <a href="cdrom.html">cdrom</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
51 <a href="color.html">Color</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
52 <a href="cursors.html">cursors</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
53 <a href="display.html">display</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
54 <a href="draw.html">draw</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
55 <a href="event.html">event</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
56 <a href="examples.html">examples</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
57 <a href="font.html">font</a> ||
3065
0a3be7313aa4 Enable pygame._freetype extension module build by default
Lenard Lindstrom <len-l@telus.net>
parents: 2239
diff changeset
58 <a href="freetype.html">freetype</a> ||
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
59 <a href="gfxdraw.html">gfxdraw</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
60 <a href="image.html">image</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
61 <a href="joystick.html">joystick</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
62 <a href="key.html">key</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
63 <a href="locals.html">locals</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
64 <a href="mask.html">mask</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
65 <a href="math.html">math</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
66 <a href="midi.html">midi</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
67 <a href="mixer.html">mixer</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
68 <a href="mouse.html">mouse</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
69 <a href="movie.html">movie</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
70 <a href="music.html">music</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
71 <a href="overlay.html">Overlay</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
72 <a href="pixelarray.html">PixelArray</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
73 <a href="pixelcopy.html">pixelcopy</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
74 <a href="pygame.html">pygame</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
75 <a href="rect.html">Rect</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
76 <a href="scrap.html">scrap</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
77 <a href="sndarray.html">sndarray</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
78 <a href="sprite.html">sprite</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
79 <a href="surface.html">Surface</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
80 <a href="surfarray.html">surfarray</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
81 <a href="tests.html">tests</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
82 <a href="time.html">time</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
83 <a href="transform.html">transform</a> ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
84 <a href="pygame.html#module-pygame.version">version</a>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
85 </p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
86 </td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
87 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
88 </table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
89 </div>
680
57c120cd3a49 Some documentation new scrap module. ... and some missing docs for cursor.
Rene Dudfield <renesd@gmail.com>
parents:
diff changeset
90
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
91 <div class="documentwrapper">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
92 <div class="body">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
93
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
94 <div class="sectionwrapper">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
95 <div class="section" id="module-pygame.scrap">
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
96 <span id="pygame-scrap"></span><dl class="definition module">
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
97 <dt class="title module">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
98 <tt class="docutils literal"><span class="pre">pygame.scrap</span></tt></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
99 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
100 <div class="line"><span class="summaryline">pygame module for clipboard support.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
101 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
102 <table border="1" class="toc docutils">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
103 <colgroup>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
104 <col width="24%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
105 <col width="1%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
106 <col width="75%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
107 </colgroup>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
108 <tbody valign="top">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
109 <tr><td><a class="toc reference external" href="scrap.html#pygame.scrap.init">pygame.scrap.init</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
110 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
111 <td>Initializes the scrap module.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
112 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
113 <tr><td><a class="toc reference external" href="scrap.html#pygame.scrap.get">pygame.scrap.get</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
114 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
115 <td>Gets the data for the specified type from the clipboard.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
116 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
117 <tr><td><a class="toc reference external" href="scrap.html#pygame.scrap.get_types">pygame.scrap.get_types</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
118 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
119 <td>Gets a list of the available clipboard types.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
120 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
121 <tr><td><a class="toc reference external" href="scrap.html#pygame.scrap.put">pygame.scrap.put</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
122 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
123 <td>Places data into the clipboard.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
124 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
125 <tr><td><a class="toc reference external" href="scrap.html#pygame.scrap.contains">pygame.scrap.contains</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
126 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
127 <td>Checks, whether a certain type is available in the clipboard.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
128 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
129 <tr><td><a class="toc reference external" href="scrap.html#pygame.scrap.lost">pygame.scrap.lost</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
130 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
131 <td>Checks whether the clipboard is currently owned by the application.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
132 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
133 <tr><td><a class="toc reference external" href="scrap.html#pygame.scrap.set_mode">pygame.scrap.set_mode</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
134 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
135 <td>Sets the clipboard access mode.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
136 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
137 </tbody>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
138 </table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
139 <p>EXPERIMENTAL!: meaning this api may change, or dissapear in later pygame
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
140 releases. If you use this, your code will break with the next pygame release.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
141 <p>The scrap module is for getting and putting stuff from the clipboard. So you
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
142 can copy and paste things between pygame, and other application types. It
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
143 defines some basic own data types</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
144 <div class="highlight-python"><div class="highlight"><pre><span class="n">SCRAP_PPM</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
145 <span class="n">SCRAP_PBM</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
146 <span class="n">SCRAP_BMP</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
147 <span class="n">SCRAP_TEXT</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
148 </pre></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
149 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
150 <p>to be placed into the clipboard and allows to use define own clipboard types.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
151 <tt class="docutils literal"><span class="pre">SCRAP_PPM</span></tt>, <tt class="docutils literal"><span class="pre">SCRAP_PBM</span></tt> and <tt class="docutils literal"><span class="pre">SCRAP_BMP</span></tt> are suitable for surface buffers
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
152 to be shared with other applications, while <tt class="docutils literal"><span class="pre">SCRAP_TEXT</span></tt> is an alias for the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
153 plain text clipboard type.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
154 <p>The SCRAP_* types refer to the following <tt class="docutils literal"><span class="pre">MIME</span></tt> types and register those as
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
155 well as the default operating system type for this type of data:</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
156 <div class="highlight-python"><pre>SCRAP_TEXT text/plain for plain text
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
157 SCRAP_PBM image/pbm for PBM encoded image data
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
158 SCRAP_PPM image/ppm for PPM encoded image data
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
159 SCRAP_BMP image/bmp for BMP encoded image data</pre>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
160 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
161 <p>Depending on the platform additional types are automatically registered when
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
162 data is placed into the clipboard to guarantee a consistent sharing behaviour
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
163 with other applications. The following listed types can be used as string to be
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
164 passed to the respective <a class="tooltip reference internal" href="#module-pygame.scrap" title=""><tt class="xref py py-mod docutils literal"><span class="pre">pygame.scrap</span></tt><span class="tooltip-content">pygame module for clipboard support.</span></a> module functions.</p>
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
165 <p>For Windows platforms, the additional types are supported automatically and
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
166 resolve to their internal definitions:</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
167 <div class="highlight-python"><pre>text/plain;charset=utf-8 for UTF-8 encoded text
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
168 audio/wav for WAV encoded audio
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
169 image/tiff for TIFF encoded image data</pre>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
170 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
171 <p>For <tt class="docutils literal"><span class="pre">X11</span></tt> platforms, the additional types are supported automatically and
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
172 resolve to their internal definitions:</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
173 <div class="highlight-python"><pre>UTF8_STRING for UTF-8 encoded text
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
174 text/plain;charset=utf-8 for UTF-8 encoded text
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
175 COMPOUND_TEXT for COMPOUND text</pre>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
176 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
177 <p>As stated before you can define own types for the clipboard, those however
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
178 might not be usable by other applications. Thus data pasted into the clipboard
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
179 using</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
180 <div class="highlight-python"><div class="highlight"><pre><span class="n">pygame</span><span class="o">.</span><span class="n">scrap</span><span class="o">.</span><span class="n">put</span> <span class="p">(</span><span class="s">&quot;own_data&quot;</span><span class="p">,</span> <span class="n">data</span><span class="p">)</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
181 </pre></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
182 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
183 <p>can only be used by applications, which query the clipboard for the &#8220;own_data&#8221;
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
184 type.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
185 <p>New in pygame 1.8. Only works for Windows, <tt class="docutils literal"><span class="pre">X11</span></tt> and Mac <tt class="docutils literal"><span class="pre">OS</span></tt> <tt class="docutils literal"><span class="pre">X</span></tt> so far.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
186 On Mac <tt class="docutils literal"><span class="pre">OSX</span></tt> only text works at the moment - other types will be supported in
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
187 the next release.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
188 <dl class="definition function">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
189 <dt class="title" id="pygame.scrap.init">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
190 <tt class="descclassname">pygame.scrap.</tt><tt class="descname">init</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.scrap.init" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
191 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
192 <div class="line"><span class="summaryline">Initializes the scrap module.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
193 <div class="line"><span class="signature">init () -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
194 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
195 <p>Tries to initialize the scrap module and raises an exception, if it fails.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
196 Note that this module requires a set display surface, so you have to make
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
197 sure, you acquired one earlier using <tt class="docutils literal"><span class="pre">pygame.display.set_mode()</span></tt>.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
198 </dd></dl>
826
7d9044f4666a moved the docs out of the scrap.c and into scrap.doc
Rene Dudfield <renesd@gmail.com>
parents: 810
diff changeset
199
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
200 <dl class="definition function">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
201 <dt class="title" id="pygame.scrap.get">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
202 <tt class="descclassname">pygame.scrap.</tt><tt class="descname">get</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.scrap.get" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
203 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
204 <div class="line"><span class="summaryline">Gets the data for the specified type from the clipboard.</span></div>
3093
01b2cb16dc17 Update scrap docs for Python 3.x
Lenard Lindstrom <len-l@telus.net>
parents: 3065
diff changeset
205 <div class="line"><span class="signature">get (type) -&gt; bytes</span></div>
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
206 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
207 <p>Returns the data for the specified type from the clipboard. The data is
3093
01b2cb16dc17 Update scrap docs for Python 3.x
Lenard Lindstrom <len-l@telus.net>
parents: 3065
diff changeset
208 returned as a byte string and might need further processing,
01b2cb16dc17 Update scrap docs for Python 3.x
Lenard Lindstrom <len-l@telus.net>
parents: 3065
diff changeset
209 such as decoding to Unicode.
01b2cb16dc17 Update scrap docs for Python 3.x
Lenard Lindstrom <len-l@telus.net>
parents: 3065
diff changeset
210 If no data for the passed type is available, None is returned.</p>
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
211 <div class="highlight-python"><pre>text = pygame.scrap.get (SCRAP_TEXT)
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
212 if text:
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
213 # Do stuff with it.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
214 else:
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
215 print "There does not seem to be text in the clipboard."</pre>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
216 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
217 </dd></dl>
680
57c120cd3a49 Some documentation new scrap module. ... and some missing docs for cursor.
Rene Dudfield <renesd@gmail.com>
parents:
diff changeset
218
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
219 <dl class="definition function">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
220 <dt class="title" id="pygame.scrap.get_types">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
221 <tt class="descclassname">pygame.scrap.</tt><tt class="descname">get_types</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.scrap.get_types" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
222 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
223 <div class="line"><span class="summaryline">Gets a list of the available clipboard types.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
224 <div class="line"><span class="signature">get_types () -&gt; list</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
225 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
226 <p>Gets a list of strings with the identifiers for the available clipboard
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
227 types. Each identifier can be used in the <tt class="docutils literal"><span class="pre">scrap.get()</span></tt> method to get the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
228 clipboard content of the specific type. If there is no data in the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
229 clipboard, an empty list is returned.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
230 <div class="highlight-python"><div class="highlight"><pre><span class="n">types</span> <span class="o">=</span> <span class="n">pygame</span><span class="o">.</span><span class="n">scrap</span><span class="o">.</span><span class="n">get_types</span> <span class="p">()</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
231 <span class="k">for</span> <span class="n">t</span> <span class="ow">in</span> <span class="n">types</span><span class="p">:</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
232 <span class="k">if</span> <span class="s">&quot;text&quot;</span> <span class="ow">in</span> <span class="n">t</span><span class="p">:</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
233 <span class="c"># There is some content with the word &quot;text&quot; in it. It&#39;s</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
234 <span class="c"># possibly text, so print it.</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
235 <span class="k">print</span> <span class="n">pygame</span><span class="o">.</span><span class="n">scrap</span><span class="o">.</span><span class="n">get</span> <span class="p">(</span><span class="n">t</span><span class="p">)</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
236 </pre></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
237 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
238 </dd></dl>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
239
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
240 <dl class="definition function">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
241 <dt class="title" id="pygame.scrap.put">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
242 <tt class="descclassname">pygame.scrap.</tt><tt class="descname">put</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.scrap.put" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
243 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
244 <div class="line"><span class="summaryline">Places data into the clipboard.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
245 <div class="line"><span class="signature">put(type, data) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
246 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
247 <p>Places data for a specific clipboard type into the clipboard. The data must
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
248 be a string buffer. The type is a string identifying the type of data placed
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
249 into the clipboard. This can be one of the native <tt class="docutils literal"><span class="pre">SCRAP_PBM</span></tt>,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
250 <tt class="docutils literal"><span class="pre">SCRAP_PPM</span></tt>, <tt class="docutils literal"><span class="pre">SCRAP_BMP</span></tt> or <tt class="docutils literal"><span class="pre">SCRAP_TEXT</span></tt> values or an own string
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
251 identifier.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
252 <p>The method raises an exception, if the content could not be placed into the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
253 clipboard.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
254 <div class="highlight-python"><div class="highlight"><pre><span class="n">fp</span> <span class="o">=</span> <span class="nb">open</span> <span class="p">(</span><span class="s">&quot;example.bmp&quot;</span><span class="p">,</span> <span class="s">&quot;rb&quot;</span><span class="p">)</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
255 <span class="n">pygame</span><span class="o">.</span><span class="n">scrap</span><span class="o">.</span><span class="n">put</span> <span class="p">(</span><span class="n">SCRAP_BMP</span><span class="p">,</span> <span class="n">fp</span><span class="o">.</span><span class="n">read</span> <span class="p">())</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
256 <span class="n">fp</span><span class="o">.</span><span class="n">close</span> <span class="p">()</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
257 <span class="c"># Now you can acquire the image data from the clipboard in other</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
258 <span class="c"># applications.</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
259 <span class="n">pygame</span><span class="o">.</span><span class="n">scrap</span><span class="o">.</span><span class="n">put</span> <span class="p">(</span><span class="n">SCRAP_TEXT</span><span class="p">,</span> <span class="s">&quot;A text to copy&quot;</span><span class="p">)</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
260 <span class="n">pygame</span><span class="o">.</span><span class="n">scrap</span><span class="o">.</span><span class="n">put</span> <span class="p">(</span><span class="s">&quot;Plain text&quot;</span><span class="p">,</span> <span class="s">&quot;A text to copy&quot;</span><span class="p">)</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
261 </pre></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
262 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
263 </dd></dl>
680
57c120cd3a49 Some documentation new scrap module. ... and some missing docs for cursor.
Rene Dudfield <renesd@gmail.com>
parents:
diff changeset
264
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
265 <dl class="definition function">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
266 <dt class="title" id="pygame.scrap.contains">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
267 <tt class="descclassname">pygame.scrap.</tt><tt class="descname">contains</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.scrap.contains" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
268 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
269 <div class="line"><span class="summaryline">Checks, whether a certain type is available in the clipboard.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
270 <div class="line"><span class="signature">contains (type) -&gt; bool</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
271 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
272 <p>Returns True, if data for the passed type is available in the clipboard,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
273 False otherwise.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
274 <div class="highlight-python"><div class="highlight"><pre><span class="k">if</span> <span class="n">pygame</span><span class="o">.</span><span class="n">scrap</span><span class="o">.</span><span class="n">contains</span> <span class="p">(</span><span class="n">SCRAP_TEXT</span><span class="p">):</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
275 <span class="k">print</span> <span class="s">&quot;There is text in the clipboard.&quot;</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
276 <span class="k">if</span> <span class="n">pygame</span><span class="o">.</span><span class="n">scrap</span><span class="o">.</span><span class="n">contains</span> <span class="p">(</span><span class="s">&quot;own_data_type&quot;</span><span class="p">):</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
277 <span class="k">print</span> <span class="s">&quot;There is stuff in the clipboard.&quot;</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
278 </pre></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
279 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
280 </dd></dl>
826
7d9044f4666a moved the docs out of the scrap.c and into scrap.doc
Rene Dudfield <renesd@gmail.com>
parents: 810
diff changeset
281
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
282 <dl class="definition function">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
283 <dt class="title" id="pygame.scrap.lost">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
284 <tt class="descclassname">pygame.scrap.</tt><tt class="descname">lost</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.scrap.lost" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
285 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
286 <div class="line"><span class="summaryline">Checks whether the clipboard is currently owned by the application.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
287 <div class="line"><span class="signature">lost() -&gt; bool</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
288 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
289 <p>Returns True, if the clipboard is currently owned by the pygame application,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
290 False otherwise.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
291 <div class="highlight-python"><div class="highlight"><pre><span class="k">if</span> <span class="n">pygame</span><span class="o">.</span><span class="n">scrap</span><span class="o">.</span><span class="n">lost</span> <span class="p">():</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
292 <span class="k">print</span> <span class="s">&quot;No content from me anymore. The clipboard is used by someone else.&quot;</span>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
293 </pre></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
294 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
295 </dd></dl>
826
7d9044f4666a moved the docs out of the scrap.c and into scrap.doc
Rene Dudfield <renesd@gmail.com>
parents: 810
diff changeset
296
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
297 <dl class="definition function">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
298 <dt class="title" id="pygame.scrap.set_mode">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
299 <tt class="descclassname">pygame.scrap.</tt><tt class="descname">set_mode</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.scrap.set_mode" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
300 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
301 <div class="line"><span class="summaryline">Sets the clipboard access mode.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
302 <div class="line"><span class="signature">set_mode(mode) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
303 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
304 <p>Sets the access mode for the clipboard. This is only of interest for <tt class="docutils literal"><span class="pre">X11</span></tt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
305 environments, where clipboard modes for mouse selections (SRAP_SELECTION)
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
306 and the clipboard (SCRAP_CLIPBOARD) are available. Setting the mode to
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
307 <tt class="docutils literal"><span class="pre">SCRAP_SELECTION</span></tt> in other environments will not cause any difference.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
308 <p>If a value different from <tt class="docutils literal"><span class="pre">SCRAP_CLIPBOARD</span></tt> or <tt class="docutils literal"><span class="pre">SCRAP_SELECTION</span></tt> is
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
309 passed, a ValueError will be raised.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
310 </dd></dl>
826
7d9044f4666a moved the docs out of the scrap.c and into scrap.doc
Rene Dudfield <renesd@gmail.com>
parents: 810
diff changeset
311
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
312 </dd></dl>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
313
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
314 </div>
826
7d9044f4666a moved the docs out of the scrap.c and into scrap.doc
Rene Dudfield <renesd@gmail.com>
parents: 810
diff changeset
315
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
316 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
317 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
318 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
319 <div class="clearer"></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
320 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
321 <div class="related">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
322 <h3>Navigation</h3>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
323 <ul>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
324 <li class="right" style="margin-right: 10px">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
325 <a href="../genindex.html" title="General Index"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
326 accesskey="I">index</a></li>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
327 <li class="right" >
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
328 <a href="sndarray.html" title="pygame.sndarray"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
329 accesskey="N">next</a> |</li>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
330 <li class="right" >
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
331 <a href="rect.html" title="pygame.Rect"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
332 accesskey="P">previous</a> |</li>
2239
ca88e9308d44 regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents: 2225
diff changeset
333 <li><a href="../index.html">Pygame v1.9.2 documentation</a> &raquo;</li>
ca88e9308d44 regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents: 2225
diff changeset
334 <script type="text/javascript" src="jquery.plugin.docscomments.js"></script>
ca88e9308d44 regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents: 2225
diff changeset
335
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
336 </ul>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
337 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
338 <div class="footer">
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
339 &copy; Copyright 2011, Pygame Developers.
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
340 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
341 </body>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2148
diff changeset
342 </html>