1 /* 2 * Nautilus-Actions 3 * A Nautilus extension which offers configurable context menu actions. 4 * 5 * Copyright (C) 2005 The GNOME Foundation 6 * Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS) 7 * Copyright (C) 2009-2014 Pierre Wieser and others (see AUTHORS) 8 * 9 * Nautilus-Actions 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. 13 * 14 * Nautilus-Actions 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 GNU 17 * General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with Nautilus-Actions; see the file COPYING. If not, see 21 * <http://www.gnu.org/licenses/>. 22 * 23 * Authors: 24 * Frederic Ruaudel <grumz@grumz.net> 25 * Rodrigo Moya <rodrigo@gnome-db.org> 26 * Pierre Wieser <pwieser@trychlos.org> 27 * ... and many others (see AUTHORS) 28 */ 29 30 #ifndef __NACT_CLIPBOARD_H__ 31 #define __NACT_CLIPBOARD_H__ 32 33 /* 34 * SECTION: nact_clipboard. 35 * @short_description: #NactClipboard class definition. 36 * @include: nact/nact-clipboard.h 37 * 38 * This is just a convenience class to extract clipboard functions 39 * from main window code. There is a unique object which manages all 40 * clipboard buffers. 41 */ 42 43 #include <gtk/gtk.h> 44 45 #include "base-window.h" 46 47 G_BEGIN_DECLS 48 49 #define NACT_TYPE_CLIPBOARD ( nact_clipboard_get_type()) 50 #define NACT_CLIPBOARD( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, NACT_TYPE_CLIPBOARD, NactClipboard )) 51 #define NACT_CLIPBOARD_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, NACT_TYPE_CLIPBOARD, NactClipboardClass )) 52 #define NACT_IS_CLIPBOARD( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, NACT_TYPE_CLIPBOARD )) 53 #define NACT_IS_CLIPBOARD_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), NACT_TYPE_CLIPBOARD )) 54 #define NACT_CLIPBOARD_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), NACT_TYPE_CLIPBOARD, NactClipboardClass )) 55 56 typedef struct _NactClipboardPrivate NactClipboardPrivate; 57 58 typedef struct { 59 /*< private >*/ 60 GObject parent; 61 NactClipboardPrivate *private; 62 } 63 NactClipboard; 64 65 typedef struct _NactClipboardClassPrivate NactClipboardClassPrivate; 66 67 typedef struct { 68 /*< private >*/ 69 GObjectClass parent; 70 NactClipboardClassPrivate *private; 71 } 72 NactClipboardClass; 73 74 /* drag and drop formats 75 */ 76 enum { 77 NACT_XCHANGE_FORMAT_NACT = 0, 78 NACT_XCHANGE_FORMAT_XDS, 79 NACT_XCHANGE_FORMAT_APPLICATION_XML, 80 NACT_XCHANGE_FORMAT_TEXT_PLAIN, 81 NACT_XCHANGE_FORMAT_URI_LIST 82 }; 83 84 /* mode indicator 85 */ 86 enum { 87 CLIPBOARD_MODE_CUT = 1, 88 CLIPBOARD_MODE_COPY 89 }; 90 91 GType nact_clipboard_get_type( void ); 92 93 NactClipboard *nact_clipboard_new( BaseWindow *window ); 94 95 void nact_clipboard_dnd_set( NactClipboard *clipboard, guint target, GList *rows, const gchar *folder, gboolean copy ); 96 GList *nact_clipboard_dnd_get_data( NactClipboard *clipboard, gboolean *copy ); 97 gchar *nact_clipboard_dnd_get_text( NactClipboard *clipboard, GList *rows ); 98 void nact_clipboard_dnd_drag_end( NactClipboard *clipboard ); 99 void nact_clipboard_dnd_clear( NactClipboard *clipboard ); 100 101 void nact_clipboard_primary_set( NactClipboard *clipboard, GList *items, gint mode ); 102 GList *nact_clipboard_primary_get( NactClipboard *clipboard, gboolean *relabel ); 103 void nact_clipboard_primary_counts( NactClipboard *clipboard, guint *actions, guint *profiles, guint *menus ); 104 105 void nact_clipboard_dump( NactClipboard *clipboard ); 106 107 G_END_DECLS 108 109 #endif /* __NACT_CLIPBOARD_H__ */ 110