2003-09-05 09:40:29 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
2000-02-26 11:41:06 +08:00
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
2000-02-11 05:54:12 +08:00
|
|
|
*
|
2000-02-26 11:41:06 +08:00
|
|
|
* gimpquerybox.h
|
2003-09-05 09:40:29 +08:00
|
|
|
* Copyright (C) 1999-2000 Michael Natterer <mitch@gimp.org>
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This library is free software: you can redistribute it and/or
|
2000-02-11 05:54:12 +08:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2009-01-18 06:28:01 +08:00
|
|
|
* version 3 of the License, or (at your option) any later version.
|
2003-09-05 09:40:29 +08:00
|
|
|
*
|
2000-02-26 11:41:06 +08:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2003-09-05 09:40:29 +08:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2000-02-26 11:41:06 +08:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2000-02-11 05:54:12 +08:00
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2009-01-18 06:28:01 +08:00
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
2003-09-05 09:40:29 +08:00
|
|
|
*/
|
2000-05-31 07:38:46 +08:00
|
|
|
|
2011-04-28 20:30:41 +08:00
|
|
|
#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
|
|
|
|
#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
#ifndef __GIMP_QUERY_BOX_H__
|
|
|
|
#define __GIMP_QUERY_BOX_H__
|
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
G_BEGIN_DECLS
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-05-31 07:38:46 +08:00
|
|
|
/* For information look into the C source or the html documentation */
|
2000-02-11 05:54:12 +08:00
|
|
|
|
|
|
|
|
2010-07-06 00:01:28 +08:00
|
|
|
/**
|
|
|
|
* GimpQueryStringCallback:
|
|
|
|
* @query_box: The query box.
|
|
|
|
* @string: The entered string.
|
|
|
|
* @data: The user data.
|
|
|
|
*
|
|
|
|
* Note that you must not g_free() the passed string.
|
|
|
|
**/
|
2003-09-05 09:40:29 +08:00
|
|
|
typedef void (* GimpQueryStringCallback) (GtkWidget *query_box,
|
2006-04-12 18:53:28 +08:00
|
|
|
const gchar *string,
|
|
|
|
gpointer data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2010-07-06 00:01:28 +08:00
|
|
|
/**
|
|
|
|
* GimpQueryIntCallback:
|
|
|
|
* @query_box: The query box.
|
|
|
|
* @value: The entered integer value.
|
|
|
|
* @data: The user data.
|
|
|
|
*
|
|
|
|
* The callback for an int query box.
|
|
|
|
**/
|
2003-09-05 09:40:29 +08:00
|
|
|
typedef void (* GimpQueryIntCallback) (GtkWidget *query_box,
|
2006-04-12 18:53:28 +08:00
|
|
|
gint value,
|
|
|
|
gpointer data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2010-07-06 00:01:28 +08:00
|
|
|
/**
|
|
|
|
* GimpQueryDoubleCallback:
|
|
|
|
* @query_box: The query box.
|
|
|
|
* @value: The entered double value.
|
|
|
|
* @data: The user data.
|
|
|
|
*
|
|
|
|
* The callback for a double query box.
|
|
|
|
**/
|
2003-09-05 09:40:29 +08:00
|
|
|
typedef void (* GimpQueryDoubleCallback) (GtkWidget *query_box,
|
2006-04-12 18:53:28 +08:00
|
|
|
gdouble value,
|
|
|
|
gpointer data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2010-07-06 00:01:28 +08:00
|
|
|
/**
|
|
|
|
* GimpQuerySizeCallback:
|
|
|
|
* @query_box: The query box.
|
|
|
|
* @size: The entered size in pixels.
|
|
|
|
* @unit: The selected unit from the #GimpUnitMenu.
|
|
|
|
* @data: The user data.
|
|
|
|
*
|
|
|
|
* The callback for a size query box.
|
|
|
|
**/
|
2003-09-05 09:40:29 +08:00
|
|
|
typedef void (* GimpQuerySizeCallback) (GtkWidget *query_box,
|
2006-04-12 18:53:28 +08:00
|
|
|
gdouble size,
|
|
|
|
GimpUnit unit,
|
|
|
|
gpointer data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2010-07-06 00:01:28 +08:00
|
|
|
/**
|
|
|
|
* GimpQueryBooleanCallback:
|
|
|
|
* @query_box: The query box.
|
|
|
|
* @value: The entered boolean value.
|
|
|
|
* @data: The user data.
|
|
|
|
*
|
|
|
|
* The callback for a boolean query box.
|
|
|
|
**/
|
2003-09-05 09:40:29 +08:00
|
|
|
typedef void (* GimpQueryBooleanCallback) (GtkWidget *query_box,
|
2006-04-12 18:53:28 +08:00
|
|
|
gboolean value,
|
|
|
|
gpointer data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2002-01-14 04:59:56 +08:00
|
|
|
|
2010-07-06 00:01:28 +08:00
|
|
|
/**
|
|
|
|
* GIMP_QUERY_BOX_VBOX:
|
|
|
|
* @qbox: The query box.
|
|
|
|
*
|
2010-07-06 01:04:15 +08:00
|
|
|
* A macro to access the #GtkVBox in a #libgimpwidgets-gimpquerybox.
|
|
|
|
* Useful if you want to add more widgets.
|
2010-07-06 00:01:28 +08:00
|
|
|
**/
|
2002-01-14 04:59:56 +08:00
|
|
|
#define GIMP_QUERY_BOX_VBOX(qbox) g_object_get_data (G_OBJECT (qbox), \
|
|
|
|
"gimp-query-box-vbox")
|
|
|
|
|
|
|
|
|
2000-02-12 21:07:59 +08:00
|
|
|
/* some simple query dialogs */
|
2000-11-18 08:25:42 +08:00
|
|
|
GtkWidget * gimp_query_string_box (const gchar *title,
|
2003-11-08 23:32:38 +08:00
|
|
|
GtkWidget *parent,
|
2006-04-12 18:53:28 +08:00
|
|
|
GimpHelpFunc help_func,
|
|
|
|
const gchar *help_id,
|
|
|
|
const gchar *message,
|
|
|
|
const gchar *initial,
|
|
|
|
GObject *object,
|
|
|
|
const gchar *signal,
|
|
|
|
GimpQueryStringCallback callback,
|
|
|
|
gpointer data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
GtkWidget * gimp_query_int_box (const gchar *title,
|
2003-11-08 23:32:38 +08:00
|
|
|
GtkWidget *parent,
|
2006-04-12 18:53:28 +08:00
|
|
|
GimpHelpFunc help_func,
|
|
|
|
const gchar *help_id,
|
|
|
|
const gchar *message,
|
|
|
|
gint initial,
|
|
|
|
gint lower,
|
|
|
|
gint upper,
|
|
|
|
GObject *object,
|
|
|
|
const gchar *signal,
|
|
|
|
GimpQueryIntCallback callback,
|
|
|
|
gpointer data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
GtkWidget * gimp_query_double_box (const gchar *title,
|
2003-11-08 23:32:38 +08:00
|
|
|
GtkWidget *parent,
|
2006-04-12 18:53:28 +08:00
|
|
|
GimpHelpFunc help_func,
|
|
|
|
const gchar *help_id,
|
|
|
|
const gchar *message,
|
|
|
|
gdouble initial,
|
|
|
|
gdouble lower,
|
|
|
|
gdouble upper,
|
|
|
|
gint digits,
|
|
|
|
GObject *object,
|
|
|
|
const gchar *signal,
|
|
|
|
GimpQueryDoubleCallback callback,
|
|
|
|
gpointer data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
GtkWidget * gimp_query_size_box (const gchar *title,
|
2003-11-08 23:32:38 +08:00
|
|
|
GtkWidget *parent,
|
2006-04-12 18:53:28 +08:00
|
|
|
GimpHelpFunc help_func,
|
|
|
|
const gchar *help_id,
|
|
|
|
const gchar *message,
|
|
|
|
gdouble initial,
|
|
|
|
gdouble lower,
|
|
|
|
gdouble upper,
|
|
|
|
gint digits,
|
|
|
|
GimpUnit unit,
|
|
|
|
gdouble resolution,
|
|
|
|
gboolean dot_for_dot,
|
|
|
|
GObject *object,
|
|
|
|
const gchar *signal,
|
|
|
|
GimpQuerySizeCallback callback,
|
|
|
|
gpointer data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-11-18 08:25:42 +08:00
|
|
|
GtkWidget * gimp_query_boolean_box (const gchar *title,
|
2003-11-08 23:32:38 +08:00
|
|
|
GtkWidget *parent,
|
2006-04-12 18:53:28 +08:00
|
|
|
GimpHelpFunc help_func,
|
|
|
|
const gchar *help_id,
|
2014-05-08 03:27:57 +08:00
|
|
|
const gchar *icon_name,
|
2006-04-12 18:53:28 +08:00
|
|
|
const gchar *message,
|
|
|
|
const gchar *true_button,
|
|
|
|
const gchar *false_button,
|
|
|
|
GObject *object,
|
|
|
|
const gchar *signal,
|
|
|
|
GimpQueryBooleanCallback callback,
|
|
|
|
gpointer data);
|
2000-02-11 05:54:12 +08:00
|
|
|
|
2000-05-31 07:38:46 +08:00
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
G_END_DECLS
|
2000-05-31 07:38:46 +08:00
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
#endif /* __GIMP_QUERY_BOX_H__ */
|