annotate src/video/x11/SDL_x11clipboard.c @ 4886:df5525eb7c41

Updated build for Visual Studio 2010
author Sam Lantinga <slouken@libsdl.org>
date Fri, 17 Sep 2010 09:08:47 -0700
parents f18bc9935507
children 58265e606e4e
rev   line source
4508
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /*
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3 Copyright (C) 1997-2010 Sam Lantinga
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 Lesser General Public License for more details.
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 Sam Lantinga
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 slouken@libsdl.org
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 */
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22 #include "SDL_config.h"
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 #include <limits.h> /* For INT_MAX */
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 #include "SDL_events.h"
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27 #include "SDL_x11video.h"
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29
4509
8e91c3947210 Made it possible to switch the text format in one place
Sam Lantinga <slouken@libsdl.org>
parents: 4508
diff changeset
30 /* If you don't support UTF-8, you might use XA_STRING here */
4516
f18bc9935507 Use a better switch for the clipboard property format
Sam Lantinga <slouken@libsdl.org>
parents: 4509
diff changeset
31 #ifdef X_HAVE_UTF8_STRING
4509
8e91c3947210 Made it possible to switch the text format in one place
Sam Lantinga <slouken@libsdl.org>
parents: 4508
diff changeset
32 #define TEXT_FORMAT XInternAtom(display, "UTF8_STRING", False)
8e91c3947210 Made it possible to switch the text format in one place
Sam Lantinga <slouken@libsdl.org>
parents: 4508
diff changeset
33 #else
8e91c3947210 Made it possible to switch the text format in one place
Sam Lantinga <slouken@libsdl.org>
parents: 4508
diff changeset
34 #define TEXT_FORMAT XA_STRING
8e91c3947210 Made it possible to switch the text format in one place
Sam Lantinga <slouken@libsdl.org>
parents: 4508
diff changeset
35 #endif
8e91c3947210 Made it possible to switch the text format in one place
Sam Lantinga <slouken@libsdl.org>
parents: 4508
diff changeset
36
4508
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37 /* Get any application owned window handle for clipboard association */
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38 static Window
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39 GetWindow(_THIS)
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
40 {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
41 SDL_VideoDisplay *display;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
42 SDL_Window *window;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
43
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
44 display = _this->displays;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45 if (display) {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46 window = display->windows;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
47 if (window) {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
48 return ((SDL_WindowData *) window->driverdata)->xwindow;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
49 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
50 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
51 return None;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
52 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
53
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
54 int
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
55 X11_SetClipboardText(_THIS, const char *text)
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
56 {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
57 Display *display = ((SDL_VideoData *) _this->driverdata)->display;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
58 Atom format;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
59 Window window;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
60
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
61 /* Get the SDL window that will own the selection */
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
62 window = GetWindow(_this);
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
63 if (window == None) {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
64 SDL_SetError("Couldn't find a window to own the selection");
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
65 return -1;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
66 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
67
4509
8e91c3947210 Made it possible to switch the text format in one place
Sam Lantinga <slouken@libsdl.org>
parents: 4508
diff changeset
68 /* Save the selection on the root window */
8e91c3947210 Made it possible to switch the text format in one place
Sam Lantinga <slouken@libsdl.org>
parents: 4508
diff changeset
69 format = TEXT_FORMAT;
4508
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
70 XChangeProperty(display, DefaultRootWindow(display),
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
71 XA_CUT_BUFFER0, format, 8, PropModeReplace,
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
72 (const unsigned char *)text, SDL_strlen(text));
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
73
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
74 if (XGetSelectionOwner(display, XA_PRIMARY) != window) {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
75 XSetSelectionOwner(display, XA_PRIMARY, window, CurrentTime);
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
76 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
77 return 0;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
78 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
79
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
80 char *
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
81 X11_GetClipboardText(_THIS)
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
82 {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
83 SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
84 Display *display = videodata->display;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
85 Atom format;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
86 Window window;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
87 Window owner;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
88 Atom selection;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
89 Atom seln_type;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
90 int seln_format;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
91 unsigned long nbytes;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
92 unsigned long overflow;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
93 unsigned char *src;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
94 char *text;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
95
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
96 text = NULL;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
97
4509
8e91c3947210 Made it possible to switch the text format in one place
Sam Lantinga <slouken@libsdl.org>
parents: 4508
diff changeset
98 /* Get the window that holds the selection */
4508
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
99 window = GetWindow(_this);
4509
8e91c3947210 Made it possible to switch the text format in one place
Sam Lantinga <slouken@libsdl.org>
parents: 4508
diff changeset
100 format = TEXT_FORMAT;
4508
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
101 owner = XGetSelectionOwner(display, XA_PRIMARY);
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
102 if ((owner == None) || (owner == window)) {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
103 owner = DefaultRootWindow(display);
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
104 selection = XA_CUT_BUFFER0;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
105 } else {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
106 /* Request that the selection owner copy the data to our window */
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
107 owner = window;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
108 selection = XInternAtom(display, "SDL_SELECTION", False);
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
109 XConvertSelection(display, XA_PRIMARY, format, selection, owner,
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
110 CurrentTime);
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
111
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
112 /* FIXME: Should we have a timeout here? */
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
113 videodata->selection_waiting = SDL_TRUE;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
114 while (videodata->selection_waiting) {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
115 SDL_PumpEvents();
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
116 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
117 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
118
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
119 if (XGetWindowProperty(display, owner, selection, 0, INT_MAX/4, False,
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
120 format, &seln_type, &seln_format, &nbytes, &overflow, &src)
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
121 == Success) {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
122 if (seln_type == format) {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
123 text = (char *)SDL_malloc(nbytes+1);
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
124 if (text) {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
125 SDL_memcpy(text, src, nbytes);
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
126 text[nbytes] = '\0';
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
127 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
128 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
129 XFree(src);
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
130 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
131
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
132 if (!text) {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
133 text = SDL_strdup("");
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
134 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
135 return text;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
136 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
137
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
138 SDL_bool
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
139 X11_HasClipboardText(_THIS)
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
140 {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
141 /* Not an easy way to tell with X11, as far as I know... */
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
142 char *text;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
143 SDL_bool retval;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
144
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
145 text = X11_GetClipboardText(_this);
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
146 if (*text) {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
147 retval = SDL_TRUE;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
148 } else {
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
149 retval = SDL_FALSE;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
150 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
151 SDL_free(text);
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
152
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
153 return retval;
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
154 }
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
155
15d2c6f40c48 Added X11 clipboard support.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
156 /* vi: set ts=4 sw=4 expandtab: */