libt3widget
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
extclipboard.h
1 /* Copyright (C) 2011 G.P. Halkes
2  This program is free software: you can redistribute it and/or modify
3  it under the terms of the GNU General Public License version 3, as
4  published by the Free Software Foundation.
5 
6  This program is distributed in the hope that it will be useful,
7  but WITHOUT ANY WARRANTY; without even the implied warranty of
8  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  GNU General Public License for more details.
10 
11  You should have received a copy of the GNU General Public License
12  along with this program. If not, see <http://www.gnu.org/licenses/>.
13 */
14 #ifndef T3_WIDGET_EXTCLIPBOARD_H
15 #define T3_WIDGET_EXTCLIPBOARD_H
16 
17 #ifndef _T3_WIDGET_INTERNAL
18 #error This header file is for internal use _only_!!
19 #endif
20 
21 /* This file only contains the definition of the interface struct used to
22  communicate with the X11 module. It should _not_ contain any symbol that is
23  dependent on the X11 headers. */
24 
25 #include <string>
26 #include "widget_api.h"
27 #include "ptr.h"
28 
29 namespace t3_widget {
30 
31 T3_WIDGET_API extern linked_ptr<std::string>::t clipboard_data;
32 T3_WIDGET_API extern linked_ptr<std::string>::t primary_data;
33 
34 #define EXTCLIPBOARD_VERSION 1
35 
37  int version;
38  bool (*init)(void);
39  void (*release_selections)(void);
40  linked_ptr<std::string>::t (*get_selection)(bool clipboard);
41  void (*claim_selection)(bool clipboard, std::string *data);
42  void (*lock)(void);
43  void (*unlock)(void);
44  void (*stop)(void);
45 };
46 
47 }; // namespace
48 #endif
Definition: extclipboard.h:36