2001-01-25 06:36:18 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
|
|
|
*
|
|
|
|
* gimpwidgetstypes.h
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This library is free software: you can redistribute it and/or
|
2001-01-25 06:36:18 +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-11-11 00:38:37 +08:00
|
|
|
*
|
2001-01-25 06:36:18 +08:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2003-11-11 00:38:37 +08:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-01-25 06:36:18 +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
|
2018-07-12 05:27:07 +08:00
|
|
|
* <https://www.gnu.org/licenses/>.
|
2001-01-25 06:36:18 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIMP_WIDGETS_TYPES_H__
|
|
|
|
#define __GIMP_WIDGETS_TYPES_H__
|
|
|
|
|
2006-09-26 16:55:41 +08:00
|
|
|
#include <libgimpconfig/gimpconfigtypes.h>
|
2001-01-25 06:36:18 +08:00
|
|
|
|
2005-05-21 02:34:00 +08:00
|
|
|
#include <libgimpwidgets/gimpwidgetsenums.h>
|
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
G_BEGIN_DECLS
|
2001-01-25 06:36:18 +08:00
|
|
|
|
|
|
|
/* For information look into the html documentation */
|
|
|
|
|
|
|
|
|
2014-03-15 05:01:46 +08:00
|
|
|
typedef struct _GimpBrowser GimpBrowser;
|
2018-05-29 22:29:55 +08:00
|
|
|
typedef struct _GimpBusyBox GimpBusyBox;
|
2014-03-15 05:01:46 +08:00
|
|
|
typedef struct _GimpButton GimpButton;
|
|
|
|
typedef struct _GimpCellRendererColor GimpCellRendererColor;
|
|
|
|
typedef struct _GimpCellRendererToggle GimpCellRendererToggle;
|
|
|
|
typedef struct _GimpChainButton GimpChainButton;
|
|
|
|
typedef struct _GimpColorArea GimpColorArea;
|
|
|
|
typedef struct _GimpColorButton GimpColorButton;
|
|
|
|
typedef struct _GimpColorDisplay GimpColorDisplay;
|
|
|
|
typedef struct _GimpColorDisplayStack GimpColorDisplayStack;
|
|
|
|
typedef struct _GimpColorHexEntry GimpColorHexEntry;
|
|
|
|
typedef struct _GimpColorNotebook GimpColorNotebook;
|
|
|
|
typedef struct _GimpColorProfileChooserDialog GimpColorProfileChooserDialog;
|
|
|
|
typedef struct _GimpColorProfileComboBox GimpColorProfileComboBox;
|
|
|
|
typedef struct _GimpColorProfileStore GimpColorProfileStore;
|
2014-03-16 23:43:23 +08:00
|
|
|
typedef struct _GimpColorProfileView GimpColorProfileView;
|
2014-03-15 05:01:46 +08:00
|
|
|
typedef struct _GimpColorScale GimpColorScale;
|
2020-11-01 04:55:57 +08:00
|
|
|
typedef struct _GimpColorScaleEntry GimpColorScaleEntry;
|
2014-03-15 05:01:46 +08:00
|
|
|
typedef struct _GimpColorScales GimpColorScales;
|
|
|
|
typedef struct _GimpColorSelector GimpColorSelector;
|
|
|
|
typedef struct _GimpColorSelect GimpColorSelect;
|
|
|
|
typedef struct _GimpColorSelection GimpColorSelection;
|
|
|
|
typedef struct _GimpController GimpController;
|
|
|
|
typedef struct _GimpDialog GimpDialog;
|
|
|
|
typedef struct _GimpEnumStore GimpEnumStore;
|
|
|
|
typedef struct _GimpEnumComboBox GimpEnumComboBox;
|
|
|
|
typedef struct _GimpEnumLabel GimpEnumLabel;
|
|
|
|
typedef struct _GimpFileEntry GimpFileEntry;
|
|
|
|
typedef struct _GimpFrame GimpFrame;
|
2019-07-24 21:11:51 +08:00
|
|
|
typedef struct _GimpHintBox GimpHintBox;
|
2014-03-15 05:01:46 +08:00
|
|
|
typedef struct _GimpIntComboBox GimpIntComboBox;
|
2022-06-11 04:58:43 +08:00
|
|
|
typedef struct _GimpIntRadioFrame GimpIntRadioFrame;
|
2014-03-15 05:01:46 +08:00
|
|
|
typedef struct _GimpIntStore GimpIntStore;
|
2020-11-05 08:13:49 +08:00
|
|
|
typedef struct _GimpLabeled GimpLabeled;
|
2022-02-17 05:20:46 +08:00
|
|
|
typedef struct _GimpLabelColor GimpLabelColor;
|
2022-02-17 04:30:33 +08:00
|
|
|
typedef struct _GimpLabelEntry GimpLabelEntry;
|
2020-11-05 08:13:49 +08:00
|
|
|
typedef struct _GimpLabelSpin GimpLabelSpin;
|
2014-03-15 05:01:46 +08:00
|
|
|
typedef struct _GimpMemsizeEntry GimpMemsizeEntry;
|
|
|
|
typedef struct _GimpNumberPairEntry GimpNumberPairEntry;
|
|
|
|
typedef struct _GimpOffsetArea GimpOffsetArea;
|
|
|
|
typedef struct _GimpPageSelector GimpPageSelector;
|
|
|
|
typedef struct _GimpPathEditor GimpPathEditor;
|
|
|
|
typedef struct _GimpPickButton GimpPickButton;
|
|
|
|
typedef struct _GimpPreview GimpPreview;
|
|
|
|
typedef struct _GimpPreviewArea GimpPreviewArea;
|
|
|
|
typedef struct _GimpRuler GimpRuler;
|
libgimpwidgets: make GimpScaleEntry into its own widget.
Instead of the gimp_scale_entry_new() which creates several bound yet
independant widgets, and in the same time pack them into an existing
grid and return a GtkAdjustment (while heavily relying on GObject data
to link widgets), let's have a proper custom widget with its own clean
API.
This also simplifies the gimp_prop_scale_entry_new() property widget
variant.
First advantage is that we don't force the usage of a grid to use this
widget (there are a few pieces of code which create a GtkGrid with only
this inside just to be able to use this feature).
Second thing is that I am creating a much simpler API.
gimp_scale_entry_new() had 17 parameters! How crazy is that? So I
removed all the grid packing related parameters. Also I moved the spin
button/scale unconstraining parameters into their separate function,
because the constrained behavior is the most common use case, so it's
stupid to add 3 permanent dummy parameters for most calls. Instead the
few times where we'll want different ranges for the spin button and the
scale, we'll call the separate API gimp_scale_entry_set_range().
Thirdly the tooltip can be set directly with gimp_help_set_help_data()
since this is now its own widget. No need to have dedicated logics
anymore, better stay generic. Similarly no need of a custom function to
switch sensitivitivy (instead of generic gtk_widget_set_sensitive()).
Fourth thing is that we should not use macros for the public API, but
proper functions, because macros are not properly introspected for
binding.
For future improvements, maybe we could even make this widget implement
GtkOrientable interface, in order to be able to use it vertically.
Note: right now, I created a separate gimp_scale_entry_new2() and only
modified the property widget API to use this new code. Eventually I will
remove fully the old gimp_scale_entry_new() function (and the new code
will replace it).
2020-10-30 07:30:03 +08:00
|
|
|
typedef struct _GimpScaleEntry GimpScaleEntry;
|
2014-03-15 05:01:46 +08:00
|
|
|
typedef struct _GimpScrolledPreview GimpScrolledPreview;
|
|
|
|
typedef struct _GimpSizeEntry GimpSizeEntry;
|
2018-11-10 19:26:46 +08:00
|
|
|
typedef struct _GimpSpinButton GimpSpinButton;
|
2014-03-15 05:01:46 +08:00
|
|
|
typedef struct _GimpStringComboBox GimpStringComboBox;
|
|
|
|
typedef struct _GimpUnitComboBox GimpUnitComboBox;
|
|
|
|
typedef struct _GimpUnitStore GimpUnitStore;
|
|
|
|
typedef struct _GimpZoomModel GimpZoomModel;
|
2001-01-25 06:36:18 +08:00
|
|
|
|
|
|
|
|
2010-07-06 00:01:28 +08:00
|
|
|
/**
|
|
|
|
* GimpHelpFunc:
|
|
|
|
* @help_id: the help ID
|
2020-05-09 03:48:30 +08:00
|
|
|
* @help_data: the help user data
|
2010-07-06 00:01:28 +08:00
|
|
|
*
|
|
|
|
* This is the prototype for all functions you pass as @help_func to
|
|
|
|
* the various GIMP dialog constructors like gimp_dialog_new(),
|
|
|
|
* gimp_query_int_box() etc.
|
|
|
|
*
|
|
|
|
* Help IDs are textual identifiers the help system uses to figure
|
|
|
|
* which page to display.
|
|
|
|
*
|
|
|
|
* All these dialog constructors functions call gimp_help_connect().
|
|
|
|
*
|
|
|
|
* In most cases it will be ok to use gimp_standard_help_func() which
|
|
|
|
* does nothing but passing the @help_id string to gimp_help(). If
|
|
|
|
* your plug-in needs some more sophisticated help handling you can
|
|
|
|
* provide your own @help_func which has to call gimp_help() to
|
|
|
|
* actually display the help.
|
|
|
|
**/
|
2003-08-24 03:35:05 +08:00
|
|
|
typedef void (* GimpHelpFunc) (const gchar *help_id,
|
2003-11-19 09:12:20 +08:00
|
|
|
gpointer help_data);
|
2001-01-25 06:36:18 +08:00
|
|
|
|
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
G_END_DECLS
|
2001-01-25 06:36:18 +08:00
|
|
|
|
|
|
|
#endif /* __GIMP_WIDGETS_TYPES_H__ */
|