Update to 24f58c58bb8d22c0e8e6c5ce43c536c47b719bc6
[gnt.git] / gntclipboard.h
blobd4c1771d1d474a20b9ad2177c601016bb0548620
1 /**
2 * @file gntclipboard.h Clipboard API
3 * @ingroup gnt
4 */
5 /*
6 * GNT - The GLib Ncurses Toolkit
8 * GNT is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
12 * This library is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
27 #ifndef GNT_CLIPBOARD_H
28 #define GNT_CLIPBOARD_H
30 #include <stdio.h>
31 #include <glib.h>
32 #include <glib-object.h>
34 #define GNT_TYPE_CLIPBOARD (gnt_clipboard_get_gtype())
35 #define GNT_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_CLIPBOARD, GntClipboard))
36 #define GNT_CLIPBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_CLIPBOARD, GntClipboardClass))
37 #define GNT_IS_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_CLIPBOARD))
38 #define GNT_IS_CLIPBOARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_CLIPBOARD))
39 #define GNT_CLIPBOARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_CLIPBOARD, GntClipboardClass))
41 typedef struct _GntClipboard GntClipboard;
42 typedef struct _GntClipboardClass GntClipboardClass;
44 struct _GntClipboard
46 GObject inherit;
47 gchar *string;
50 struct _GntClipboardClass
52 GObjectClass parent;
54 void (*gnt_reserved1)(void);
55 void (*gnt_reserved2)(void);
56 void (*gnt_reserved3)(void);
57 void (*gnt_reserved4)(void);
60 G_BEGIN_DECLS
62 /**
63 * @return GType for GntClipboard.
65 GType gnt_clipboard_get_gtype(void);
67 /**
68 * Get the current text from the clipboard.
70 * @param clip The clipboard.
72 * @return A copy of the string in the clipboard. The caller should free the
73 * returned value.
75 gchar * gnt_clipboard_get_string(GntClipboard *clip);
77 /**
78 * Set the text in the clipboard.
80 * @param clip The clipboard.
81 * @param string New string for the clipboard.
83 void gnt_clipboard_set_string(GntClipboard *clip, const gchar *string);
85 G_END_DECLS
87 #endif