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