Mercurial > sdl-ios-xcode
annotate include/SDL_clipboard.h @ 4493:f0b7c8d169f5
First pass at clipboard API, still very much in progress
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 07 Jul 2010 23:24:04 -0700 |
parents | |
children | 621dc91c7a04 |
rev | line source |
---|---|
4493
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 /* |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
3 Copyright (C) 1997-2009 Sam Lantinga |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
19 Sam Lantinga |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 slouken@libsdl.org |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
23 /** |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
24 * \file SDL_clipboard.h |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
25 * |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
26 * Include file for SDL clipboard handling |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
27 */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
28 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 #ifndef _SDL_clipboard_h |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
30 #define _SDL_clipboard_h |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
31 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
32 #include "SDL_stdinc.h" |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
33 #include "SDL_surface.h" |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
34 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
35 #include "begin_code.h" |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
36 /* Set up for C function definitions, even when using C++ */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
37 #ifdef __cplusplus |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
38 /* *INDENT-OFF* */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
39 extern "C" { |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
40 /* *INDENT-ON* */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
41 #endif |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
42 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
43 /* Function prototypes */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
44 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
45 /** |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
46 * \brief Put text into the clipboard |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
47 * |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
48 * \sa SDL_GetClipboardText() |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
49 */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
50 extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text); |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
51 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
52 /** |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
53 * \brief Get text from the clipboard, which must be freed with SDL_free() |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
54 * |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
55 * \sa SDL_SetClipboardText() |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
56 */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
57 extern DECLSPEC char * SDLCALL SDL_GetClipboardText(); |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
58 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
59 /** |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
60 * \brief Returns whether the clipboard has text |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
61 * |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
62 * \sa SDL_GetClipboardText() |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
63 */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
64 extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(); |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
65 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
66 /** |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
67 * \brief Put an image into the clipboard |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
68 * |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
69 * \sa SDL_GetClipboardImage() |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
70 */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
71 extern DECLSPEC int SDLCALL SDL_SetClipboardImage(SDL_Surface *image); |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
72 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
73 /** |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
74 * \brief Get image from the clipboard, which must be freed with SDL_FreeSurface() |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
75 * |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
76 * \sa SDL_SetClipboard() |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
77 */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
78 extern DECLSPEC SDL_Surface * SDLCALL SDL_GetClipboardImage(); |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
79 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
80 /** |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
81 * \brief Returns whether the clipboard has data in the specified format |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
82 * |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
83 * \sa SDL_GetClipboardImage() |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
84 */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
85 extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardImage(); |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
86 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
87 /** |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
88 * \brief Set the data in the clipboard in the specified format |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
89 * |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
90 * \sa SDL_GetClipboard() |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
91 */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
92 extern DECLSPEC int SDLCALL SDL_SetClipboard(Uint32 format, void *data, size_t length); |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
93 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
94 /** |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
95 * \brief Get the data in the clipboard in the specified format, which must be |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
96 * freed with SDL_free() |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
97 * |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
98 * \sa SDL_SetClipboard() |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
99 */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
100 extern DECLSPEC int SDLCALL SDL_GetClipboard(Uint32 format, void **data, size_t *length); |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
101 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
102 /** |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
103 * \brief Returns whether the clipboard has data in the specified format |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
104 * |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
105 * \sa SDL_GetClipboard() |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
106 */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
107 extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardFormat(Uint32 format); |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
108 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
109 /** |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
110 * \brief Clear any data out of the clipboard, if possible. |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
111 */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
112 extern DECLSPEC void SDLCALL SDL_ClearClipboard(void); |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
113 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
114 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
115 /* Ends C function definitions when using C++ */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
116 #ifdef __cplusplus |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
117 /* *INDENT-OFF* */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
118 } |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
119 /* *INDENT-ON* */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
120 #endif |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
121 #include "close_code.h" |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
122 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
123 #endif /* _SDL_clipboard_h */ |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
124 |
f0b7c8d169f5
First pass at clipboard API, still very much in progress
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
125 /* vi: set ts=4 sw=4 expandtab: */ |