2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2010 Sam Lantinga
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 * \file SDL_clipboard.h
26 * Include file for SDL clipboard handling
29 #ifndef _SDL_clipboard_h
30 #define _SDL_clipboard_h
32 #include "SDL_stdinc.h"
33 #include "SDL_surface.h"
35 #include "begin_code.h"
36 /* Set up for C function definitions, even when using C++ */
43 /* Function prototypes */
46 * \brief Put text into the clipboard
48 * \sa SDL_GetClipboardText()
50 extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
53 * \brief Get text from the clipboard, which must be freed with SDL_free()
55 * \sa SDL_SetClipboardText()
57 extern DECLSPEC char * SDLCALL SDL_GetClipboardText();
60 * \brief Returns whether the clipboard has text
62 * \sa SDL_GetClipboardText()
64 extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText();
67 * \brief Put an image into the clipboard
69 * \sa SDL_GetClipboardImage()
71 extern DECLSPEC int SDLCALL SDL_SetClipboardImage(SDL_Surface *image);
74 * \brief Get image from the clipboard, which must be freed with SDL_FreeSurface()
76 * \sa SDL_SetClipboard()
78 extern DECLSPEC SDL_Surface * SDLCALL SDL_GetClipboardImage();
81 * \brief Returns whether the clipboard has data in the specified format
83 * \sa SDL_GetClipboardImage()
85 extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardImage();
88 * \brief Set the data in the clipboard in the specified format
90 * \sa SDL_GetClipboard()
92 extern DECLSPEC int SDLCALL SDL_SetClipboard(Uint32 format, void *data, size_t length);
95 * \brief Get the data in the clipboard in the specified format, which must be
96 * freed with SDL_free()
98 * \sa SDL_SetClipboard()
100 extern DECLSPEC int SDLCALL SDL_GetClipboard(Uint32 format, void **data, size_t *length);
103 * \brief Returns whether the clipboard has data in the specified format
105 * \sa SDL_GetClipboard()
107 extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardFormat(Uint32 format);
110 * \brief Clear any data out of the clipboard, if possible.
112 extern DECLSPEC void SDLCALL SDL_ClearClipboard(void);
115 /* Ends C function definitions when using C++ */
121 #include "close_code.h"
123 #endif /* _SDL_clipboard_h */
125 /* vi: set ts=4 sw=4 expandtab: */