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 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.
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_IACTIONS_LIST_H__
32 #define __NACT_IACTIONS_LIST_H__
35 * SECTION: nact_iactions_list
36 * @short_description: #NactIActionsList interface definition.
37 * @include: nact/nact-iactions-list.h
39 * This same interface is used in the main window (edition mode, default),
40 * and in the export assistant (export mode).
44 * Counting rows is needed to maintain action sensitivities in the
45 * menubar : at least 'Tools\Export' menu item depends of the content
46 * of the IActionsList.
47 * Rows are first counted when the treeview is primarily filled, or
49 * Counters are then incremented in nact_iactions_list_insert() and
50 * nact_iactions_list_delete() functions.
55 #include <api/na-object-item.h>
59 #define NACT_IACTIONS_LIST_TYPE ( nact_iactions_list_get_type())
60 #define NACT_IACTIONS_LIST( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, NACT_IACTIONS_LIST_TYPE, NactIActionsList ))
61 #define NACT_IS_IACTIONS_LIST( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, NACT_IACTIONS_LIST_TYPE ))
62 #define NACT_IACTIONS_LIST_GET_INTERFACE( instance ) ( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), NACT_IACTIONS_LIST_TYPE, NactIActionsListInterface ))
64 typedef struct NactIActionsList NactIActionsList
;
66 typedef struct NactIActionsListInterfacePrivate NactIActionsListInterfacePrivate
;
69 GTypeInterface parent
;
70 NactIActionsListInterfacePrivate
*private;
74 * @instance: this #NactIActionsList implementor.
76 * Returns: a newly allocated string, which contains the treeview
77 * widget name in its XML UI definition.
79 * The returned string will be g_free() by IActionsList interface.
81 * This is a pure virtual function which must be implemented.
83 gchar
* ( *get_treeview_name
)( NactIActionsList
*instance
);
85 NactIActionsListInterface
;
89 #define IACTIONS_LIST_SIGNAL_LIST_COUNT_UPDATED "nact-iactions-list-count-updated"
90 #define IACTIONS_LIST_SIGNAL_SELECTION_CHANGED "nact-iactions-list-selection-changed"
91 #define IACTIONS_LIST_SIGNAL_FOCUS_IN "nact-iactions-list-focus-in"
92 #define IACTIONS_LIST_SIGNAL_FOCUS_OUT "nact-iactions-list-focus-out"
93 #define IACTIONS_LIST_SIGNAL_COLUMN_EDITED "nact-iactions-list-column-edited"
94 #define IACTIONS_LIST_SIGNAL_STATUS_CHANGED "nact-iactions-list-status-changed"
97 * - edition: dnd, filter, multiple selection, item updated signal
98 * - export: multiple selection
101 IACTIONS_LIST_MANAGEMENT_MODE_EDITION
= 1,
102 IACTIONS_LIST_MANAGEMENT_MODE_EXPORT
105 GType
nact_iactions_list_get_type( void );
107 void nact_iactions_list_initial_load_toplevel( NactIActionsList
*instance
);
108 void nact_iactions_list_runtime_init_toplevel( NactIActionsList
*instance
, GList
*actions
);
109 void nact_iactions_list_all_widgets_showed( NactIActionsList
*instance
);
110 void nact_iactions_list_dispose( NactIActionsList
*instance
);
112 void nact_iactions_list_brief_tree_dump( NactIActionsList
*instance
);
113 void nact_iactions_list_collapse_all( NactIActionsList
*instance
);
114 void nact_iactions_list_display_order_change( NactIActionsList
*instance
, gint order_mode
);
115 void nact_iactions_list_expand_all( NactIActionsList
*instance
);
116 void nact_iactions_list_fill( NactIActionsList
*instance
, GList
*items
);
117 gint
nact_iactions_list_get_management_mode( NactIActionsList
*instance
);
118 gboolean
nact_iactions_list_has_modified_items( NactIActionsList
*instance
);
119 void nact_iactions_list_on_treeview_selection_changed( GtkTreeSelection
*selection
, NactIActionsList
*instance
);
120 GList
*nact_iactions_list_remove_rec( GList
*list
, NAObject
*object
);
121 void nact_iactions_list_set_management_mode( NactIActionsList
*instance
, gint mode
);
123 void nact_iactions_list_bis_clear_selection( NactIActionsList
*instance
, GtkTreeView
*treeview
);
124 void nact_iactions_list_bis_collapse_to_parent( NactIActionsList
*instance
);
125 void nact_iactions_list_bis_delete( NactIActionsList
*instance
, GList
*items
, gboolean select_at_end
);
126 void nact_iactions_list_bis_expand_to_first_child( NactIActionsList
*instance
);
127 NAObject
*nact_iactions_list_bis_get_item( NactIActionsList
*instance
, const gchar
*uuid
);
128 GList
*nact_iactions_list_bis_get_items( NactIActionsList
*instance
);
129 GList
*nact_iactions_list_bis_get_selected_items( NactIActionsList
*instance
);
130 void nact_iactions_list_bis_insert_at_path( NactIActionsList
*instance
, GList
*items
, GtkTreePath
*path
);
131 void nact_iactions_list_bis_insert_items( NactIActionsList
*instance
, GList
*items
, NAObject
*sibling
);
132 void nact_iactions_list_bis_insert_into( NactIActionsList
*instance
, GList
*items
);
133 void nact_iactions_list_bis_list_modified_items( NactIActionsList
*instance
);
134 void nact_iactions_list_bis_remove_modified( NactIActionsList
*instance
, const NAObjectItem
*item
);
135 void nact_iactions_list_bis_select_first_row( NactIActionsList
*instance
);
136 void nact_iactions_list_bis_select_row_at_path( NactIActionsList
*instance
, GtkTreeView
*treeview
, GtkTreeModel
*model
, GtkTreePath
*path
);
137 void nact_iactions_list_bis_toggle_collapse( NactIActionsList
*instance
);
138 void nact_iactions_list_bis_toggle_collapse_object( NactIActionsList
*instance
, const NAObject
*item
);
142 #endif /* __NACT_IACTIONS_LIST_H__ */