NAImporterAsk: fix z-order
[nautilus-actions.git] / src / nact / base-gtk-utils.h
blob32e3ec922928e21da2c7a1ab4d1dcc04d5df334e
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 __BASE_GTK_UTILS_H__
32 #define __BASE_GTK_UTILS_H__
34 /**
35 * SECTION: base-gtk-utils
36 * @title: BaseGtkUtils
37 * @short_description: Gtk helper functions
38 * @include: base-gtk-utils.h
41 #include "base-window.h"
43 G_BEGIN_DECLS
45 /* window size and position
47 void base_gtk_utils_restore_window_position( const BaseWindow *window, const gchar *wsp_name );
48 void base_gtk_utils_save_window_position ( const BaseWindow *window, const gchar *wsp_name );
50 #define NACT_PROP_TOGGLE_EDITABLE "nact-prop-toggle-editable"
52 void base_gtk_utils_set_editable( GObject *widget, gboolean editable );
54 void base_gtk_utils_radio_set_initial_state ( GtkRadioButton *button,
55 GCallback toggled_handler, void *user_data,
56 gboolean editable, gboolean sensitive );
58 void base_gtk_utils_radio_reset_initial_state( GtkRadioButton *button, GCallback toggled_handler );
60 void base_gtk_utils_toggle_set_initial_state ( BaseWindow *window,
61 const gchar *button_name, GCallback toggled_handler,
62 gboolean active, gboolean editable, gboolean sensitive );
64 void base_gtk_utils_toggle_reset_initial_state( GtkToggleButton *button );
66 /* image utilities
68 GdkPixbuf *base_gtk_utils_get_pixbuf( const gchar *name, GtkWidget *widget, GtkIconSize size );
69 void base_gtk_utils_render( const gchar *name, GtkImage *widget, GtkIconSize size );
71 /* standard dialog boxes
73 void base_gtk_utils_select_file( BaseWindow *window,
74 const gchar *title, const gchar *wsp_name,
75 GtkWidget *entry, const gchar *entry_name );
77 void base_gtk_utils_select_file_with_preview( BaseWindow *window,
78 const gchar *title, const gchar *wsp_name,
79 GtkWidget *entry, const gchar *entry_name,
80 GCallback update_preview_cb );
82 void base_gtk_utils_select_dir( BaseWindow *window,
83 const gchar *title, const gchar *wsp_name,
84 GtkWidget *entry, const gchar *entry_name );
86 G_END_DECLS
88 #endif /* __BASE_GTK_UTILS_H__ */