1a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat/*
2a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat * cutpaste.c - routines to deal with cut & paste buffers / selection.
3a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat */
4a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat
5a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat/*
6a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  OSXvnc Copyright (C) 2001 Dan McGuirk <mcguirk@incompleteness.net>.
7a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge.
8a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  All Rights Reserved.
9a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *
10a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  This is free software; you can redistribute it and/or modify
11a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  it under the terms of the GNU General Public License as published by
12a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  the Free Software Foundation; either version 2 of the License, or
13a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  (at your option) any later version.
14a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *
15a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  This software is distributed in the hope that it will be useful,
16a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  GNU General Public License for more details.
19a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *
20a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  You should have received a copy of the GNU General Public License
21a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  along with this software; if not, write to the Free Software
22a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
23a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat *  USA.
24a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat */
25a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat
26a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat#include <rfb/rfb.h>
27a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat
28a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat
29a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat/*
30a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat * rfbSetXCutText sets the cut buffer to be the given string.  We also clear
31a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat * the primary selection.  Ideally we'd like to set it to the same thing, but I
32a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat * can't work out how to do that without some kind of helper X client.
33a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat */
34a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat
35a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehatvoid rfbGotXCutText(rfbScreenInfoPtr rfbScreen, char *str, int len)
36a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat{
37a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat   rfbSendServerCutText(rfbScreen, str, len);
38a430b2b5ca4f0967836f5820e8f03adc17fc0a24San Mehat}
39