src/events/SDL_clipboardevents.c
author Sam Lantinga <slouken@libsdl.org>
Mon, 12 Jul 2010 00:35:14 -0700
changeset 4506 b577f47379f3
parent 4503 524dfefd554c
child 5262 b530ef003506
permissions -rw-r--r--
Fixed compile warnings
slouken@4503
     1
/*
slouken@4503
     2
    SDL - Simple DirectMedia Layer
slouken@4503
     3
    Copyright (C) 1997-2010 Sam Lantinga
slouken@4503
     4
slouken@4503
     5
    This library is free software; you can redistribute it and/or
slouken@4503
     6
    modify it under the terms of the GNU Lesser General Public
slouken@4503
     7
    License as published by the Free Software Foundation; either
slouken@4503
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@4503
     9
slouken@4503
    10
    This library is distributed in the hope that it will be useful,
slouken@4503
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@4503
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@4503
    13
    Lesser General Public License for more details.
slouken@4503
    14
slouken@4503
    15
    You should have received a copy of the GNU Lesser General Public
slouken@4503
    16
    License along with this library; if not, write to the Free Software
slouken@4503
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@4503
    18
slouken@4503
    19
    Sam Lantinga
slouken@4503
    20
    slouken@libsdl.org
slouken@4503
    21
*/
slouken@4503
    22
#include "SDL_config.h"
slouken@4503
    23
slouken@4503
    24
/* Clipboard event handling code for SDL */
slouken@4503
    25
slouken@4503
    26
#include "SDL_events.h"
slouken@4503
    27
#include "SDL_events_c.h"
slouken@4503
    28
#include "SDL_clipboardevents_c.h"
slouken@4503
    29
slouken@4503
    30
slouken@4503
    31
int
slouken@4506
    32
SDL_SendClipboardUpdate(void)
slouken@4503
    33
{
slouken@4503
    34
    int posted;
slouken@4503
    35
slouken@4503
    36
    /* Post the event, if desired */
slouken@4503
    37
    posted = 0;
slouken@4503
    38
    if (SDL_GetEventState(SDL_CLIPBOARDUPDATE) == SDL_ENABLE) {
slouken@4503
    39
        SDL_Event event;
slouken@4503
    40
        event.type = SDL_CLIPBOARDUPDATE;
slouken@4503
    41
slouken@4503
    42
        posted = (SDL_PushEvent(&event) > 0);
slouken@4503
    43
    }
slouken@4503
    44
    return (posted);
slouken@4503
    45
}
slouken@4503
    46
slouken@4503
    47
/* vi: set ts=4 sw=4 expandtab: */