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 __BASE_WINDOW_H__
32 #define __BASE_WINDOW_H__
35 * SECTION: base_window
36 * @short_description: #BaseWindow public function declaration.
37 * @include: nact/base-window.h
39 * This is a base class which encapsulates a Gtk+ windows.
40 * It works together with the BaseApplication class to run a Gtk+
46 #include "base-application-class.h"
47 #include "base-window-class.h"
51 /* instance properties
53 #define BASE_WINDOW_PROP_PARENT "base-window-parent"
54 #define BASE_WINDOW_PROP_APPLICATION "base-window-application"
55 #define BASE_WINDOW_PROP_TOPLEVEL_NAME "base-window-toplevel-name"
56 #define BASE_WINDOW_PROP_TOPLEVEL_WIDGET "base-window-toplevel-widget"
57 #define BASE_WINDOW_PROP_INITIALIZED "base-window-is-initialized"
58 #define BASE_WINDOW_PROP_SAVE_WINDOW_POSITION "base-window-save-window-position"
59 #define BASE_WINDOW_PROP_HAS_OWN_BUILDER "base-window-has-own-builder"
60 #define BASE_WINDOW_PROP_XML_UI_FILENAME "base-window-xml-ui-filename"
62 /* signals defined in this class
64 * All signals of this class have the same behavior:
65 * - the message is sent to all derived classes, which are free to
66 * connect to the signal in order to implement their own code
67 * - finally, the default class handler points to a virtual function
68 * - the virtual function actually tries to call the actual function
69 * as possibly implemented by the derived class
70 * - if no derived class has implemented the virtual function, the call
71 * fall back to doing nothing at all
73 #define BASE_WINDOW_SIGNAL_INITIAL_LOAD "nact-base-window-initial-load"
74 #define BASE_WINDOW_SIGNAL_RUNTIME_INIT "nact-base-window-runtime-init"
75 #define BASE_WINDOW_SIGNAL_ALL_WIDGETS_SHOWED "nact-base-window-all-widgets-showed"
77 gboolean
base_window_init( BaseWindow
*window
);
78 gboolean
base_window_run( BaseWindow
*window
);
80 BaseApplication
*base_window_get_application( const BaseWindow
*window
);
81 GtkWindow
*base_window_get_named_toplevel( const BaseWindow
*window
, const gchar
*name
);
82 BaseWindow
*base_window_get_parent( const BaseWindow
*window
);
83 GtkWindow
*base_window_get_toplevel( const BaseWindow
*window
);
84 GtkWidget
*base_window_get_widget( const BaseWindow
*window
, const gchar
*name
);
85 gboolean
base_window_is_willing_to_quit( const BaseWindow
*window
);
87 void base_window_error_dlg( const BaseWindow
*window
, GtkMessageType type
, const gchar
*primary
, const gchar
*secondary
);
88 gboolean
base_window_yesno_dlg( const BaseWindow
*window
, GtkMessageType type
, const gchar
*first
, const gchar
*second
);
90 gulong
base_window_signal_connect( BaseWindow
*window
, GObject
*instance
, const gchar
*signal
, GCallback fn
);
91 gulong
base_window_signal_connect_after( BaseWindow
*window
, GObject
*instance
, const gchar
*signal
, GCallback fn
);
92 gulong
base_window_signal_connect_by_name( BaseWindow
*window
, const gchar
*name
, const gchar
*signal
, GCallback fn
);
93 gulong
base_window_signal_connect_with_data( BaseWindow
*window
, GObject
*instance
, const gchar
*signal
, GCallback fn
, void *user_data
);
97 #endif /* __BASE_WINDOW_H__ */