Set Nautilus-Actions as being the actual official product name
[nautilus-actions.git] / src / nact / nact-clipboard.h
blobacf7476f8502138a88727f8f9b4abb03e82c1549
1 /*
2 * Nautilus-Actions
3 * A Nautilus extension which offers configurable context menu actions.
5 * Copyright (C) 2005 The GNOME Foundation
6 * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
7 * Copyright (C) 2009, 2010, 2011 Pierre Wieser and others (see AUTHORS)
9 * This Program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This Program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public
20 * License along with this Library; see the file COPYING. If not,
21 * write to the Free Software Foundation, Inc., 59 Temple Place,
22 * Suite 330, Boston, MA 02111-1307, USA.
24 * Authors:
25 * Frederic Ruaudel <grumz@grumz.net>
26 * Rodrigo Moya <rodrigo@gnome-db.org>
27 * Pierre Wieser <pwieser@trychlos.org>
28 * ... and many others (see AUTHORS)
31 #ifndef __NACT_CLIPBOARD_H__
32 #define __NACT_CLIPBOARD_H__
35 * SECTION: nact_clipboard.
36 * @short_description: #NactClipboard class definition.
37 * @include: nact/nact-clipboard.h
39 * This is just a convenience class to extract clipboard functions
40 * from main window code. There is a unique object which manages all
41 * clipboard buffers.
44 #include <gtk/gtk.h>
46 #include "base-window.h"
48 G_BEGIN_DECLS
50 #define NACT_CLIPBOARD_TYPE ( nact_clipboard_get_type())
51 #define NACT_CLIPBOARD( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, NACT_CLIPBOARD_TYPE, NactClipboard ))
52 #define NACT_CLIPBOARD_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, NACT_CLIPBOARD_TYPE, NactClipboardClass ))
53 #define NACT_IS_CLIPBOARD( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, NACT_CLIPBOARD_TYPE ))
54 #define NACT_IS_CLIPBOARD_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), NACT_CLIPBOARD_TYPE ))
55 #define NACT_CLIPBOARD_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), NACT_CLIPBOARD_TYPE, NactClipboardClass ))
57 typedef struct NactClipboardPrivate NactClipboardPrivate;
59 typedef struct {
60 GObject parent;
61 NactClipboardPrivate *private;
63 NactClipboard;
65 typedef struct NactClipboardClassPrivate NactClipboardClassPrivate;
67 typedef struct {
68 GObjectClass parent;
69 NactClipboardClassPrivate *private;
71 NactClipboardClass;
73 /* drag and drop formats
75 enum {
76 NACT_XCHANGE_FORMAT_NACT = 0,
77 NACT_XCHANGE_FORMAT_XDS,
78 NACT_XCHANGE_FORMAT_APPLICATION_XML,
79 NACT_XCHANGE_FORMAT_TEXT_PLAIN,
80 NACT_XCHANGE_FORMAT_URI_LIST
83 /* mode indicator
85 enum {
86 CLIPBOARD_MODE_CUT = 1,
87 CLIPBOARD_MODE_COPY
90 GType nact_clipboard_get_type( void );
92 NactClipboard *nact_clipboard_new( BaseWindow *window );
94 void nact_clipboard_dnd_set( NactClipboard *clipboard, guint target, GList *rows, const gchar *folder, gboolean copy );
95 GList *nact_clipboard_dnd_get_data( NactClipboard *clipboard, gboolean *copy );
96 gchar *nact_clipboard_dnd_get_text( NactClipboard *clipboard, GList *rows );
97 void nact_clipboard_dnd_drag_end( NactClipboard *clipboard );
98 void nact_clipboard_dnd_clear( NactClipboard *clipboard );
100 void nact_clipboard_primary_set( NactClipboard *clipboard, GList *items, gint mode );
101 GList *nact_clipboard_primary_get( NactClipboard *clipboard, gboolean *relabel );
102 void nact_clipboard_primary_counts( NactClipboard *clipboard, guint *actions, guint *profiles, guint *menus );
104 void nact_clipboard_dump( NactClipboard *clipboard );
106 G_END_DECLS
108 #endif /* __NACT_CLIPBOARD_H__ */