README: add deprecation notice
[nautilus-actions.git] / src / ui / base-gtk-utils.h
blobe09ae508df0d13df6fb7251347511855f1b58c15
1 /*
2 * FileManager-Actions
3 * A file-manager extension which offers configurable context menu actions.
5 * Copyright (C) 2005 The GNOME Foundation
6 * Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
7 * Copyright (C) 2009-2015 Pierre Wieser and others (see AUTHORS)
9 * FileManager-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.
14 * FileManager-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.
19 * You should have received a copy of the GNU General Public License
20 * along with FileManager-Actions; see the file COPYING. If not, see
21 * <http://www.gnu.org/licenses/>.
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)
30 #ifndef __UI_BASE_GTK_UTILS_H__
31 #define __UI_BASE_GTK_UTILS_H__
33 /**
34 * SECTION: base-gtk-utils
35 * @title: BaseGtkUtils
36 * @short_description: Gtk helper functions
37 * @include: ui/base-gtk-utils.h
40 #include "base-window.h"
42 G_BEGIN_DECLS
44 /* window size and position
46 void base_gtk_utils_restore_window_position( const BaseWindow *window, const gchar *wsp_name );
47 void base_gtk_utils_save_window_position ( const BaseWindow *window, const gchar *wsp_name );
49 /* widget status
51 void base_gtk_utils_set_editable( GObject *widget, gboolean editable );
53 void base_gtk_utils_radio_set_initial_state ( GtkRadioButton *button,
54 GCallback toggled_handler, void *user_data,
55 gboolean editable, gboolean sensitive );
57 void base_gtk_utils_radio_reset_initial_state( GtkRadioButton *button, GCallback toggled_handler );
59 void base_gtk_utils_toggle_set_initial_state ( BaseWindow *window,
60 const gchar *button_name, GCallback toggled_handler,
61 gboolean active, gboolean editable, gboolean sensitive );
63 void base_gtk_utils_toggle_reset_initial_state( GtkToggleButton *button );
65 void base_gtk_utils_widget_set_color( GtkWidget *widget, GdkRGBA *color );
67 /* image utilities
69 GdkPixbuf *base_gtk_utils_get_pixbuf( const gchar *name, GtkWidget *widget, GtkIconSize size );
70 void base_gtk_utils_render( const gchar *name, GtkImage *widget, GtkIconSize size );
72 /* standard dialog boxes
74 void base_gtk_utils_select_file( GtkApplicationWindow *window,
75 const gchar *title, const gchar *wsp_name,
76 GtkWidget *entry, const gchar *entry_name );
78 void base_gtk_utils_select_file_with_preview( GtkApplicationWindow *window,
79 const gchar *title, const gchar *wsp_name,
80 GtkWidget *entry, const gchar *entry_name,
81 GCallback update_preview_cb );
83 void base_gtk_utils_select_dir( GtkApplicationWindow *window,
84 const gchar *title, const gchar *wsp_name,
85 GtkWidget *entry, const gchar *entry_name );
87 /* try to dynamically convert a GtkTable to a GtkGrid
89 void base_gtk_utils_table_to_grid( BaseWindow *window, const gchar *table_name );
91 G_END_DECLS
93 #endif /* __UI_BASE_GTK_UTILS_H__ */