gimp/libgimp/gimpuitypes.h
Jehan 3918a0a04c libgimp: new metadata support concept in GimpSaveProcedure and new…
… class GimpSaveProcedureDialog.
The idea is that we have basically the same code in most file format
plug-ins to handle various generic metadata, yet usually with slight
differences here and there. Even behavior is sometimes a bit different
even though there is no reason for the logics to be different from one
format to another.

So I move the metadata support logics into GimpSaveProcedure (and
GimpProcedureConfig still keeps the main export logics). The GUI logics
is now in a new GimpSaveProcedureDialog. So export plug-ins will now get
the creation of generic metadata nearly for free. All they have to do is
to tell what kind of metadata the GimpSaveProcedure supports with the
gimp_save_procedure_set_support_*() functions.

Then consistency will apply:
- If a format supports a given metadata, they will always have an
  auxiliary argument with the same name across plug-ins.
- The label and tooltips will also be always the same in the GUI.
- Order of metadata widgets will also stay consistent.
- The widgets will work the same (no more "Comment" text view missing in
  one plug-in but present in another, or with an entry here, and a text
  view there, and so on).

Also adding gimp_save_procedure_dialog_add_metadata() to allow plug-ins
to "declare" one of their options as a metadata option, and therefore
have it packed within the "Metadata" block which is now created (for
instance for PNG/TIFF/JPEG specific metadata). This allows a nicer
organization of dialogs.
2020-11-23 02:15:13 +01:00

56 lines
2.1 KiB
C

/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpuitypes.h
*
* This library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_UI_TYPES_H__
#define __GIMP_UI_TYPES_H__
#include <libgimpwidgets/gimpwidgetstypes.h>
G_BEGIN_DECLS
/* For information look into the html documentation */
typedef struct _GimpProcedureDialog GimpProcedureDialog;
typedef struct _GimpSaveProcedureDialog GimpSaveProcedureDialog;
typedef struct _GimpAspectPreview GimpAspectPreview;
typedef struct _GimpDrawablePreview GimpDrawablePreview;
typedef struct _GimpProcBrowserDialog GimpProcBrowserDialog;
typedef struct _GimpProgressBar GimpProgressBar;
typedef struct _GimpZoomPreview GimpZoomPreview;
typedef struct _GimpDrawableComboBox GimpDrawableComboBox;
typedef struct _GimpChannelComboBox GimpChannelComboBox;
typedef struct _GimpLayerComboBox GimpLayerComboBox;
typedef struct _GimpVectorsComboBox GimpVectorsComboBox;
typedef struct _GimpImageComboBox GimpImageComboBox;
typedef struct _GimpSelectButton GimpSelectButton;
typedef struct _GimpBrushSelectButton GimpBrushSelectButton;
typedef struct _GimpFontSelectButton GimpFontSelectButton;
typedef struct _GimpGradientSelectButton GimpGradientSelectButton;
typedef struct _GimpPaletteSelectButton GimpPaletteSelectButton;
typedef struct _GimpPatternSelectButton GimpPatternSelectButton;
G_END_DECLS
#endif /* __GIMP_UI_TYPES_H__ */