app: add GimpOperationSettings
Add a new GimpOperationSettings class, to be used as a base class for all operation-config types. The class provides options common to all operations (namely, the clipping mode, input region, and color options), which were previously stored in GimpFilterOptions, and were therefore bound to the filter tool, instead of being stored as part of the operation settings; as a result, these options would have no effect when reapplying a filter, or when restoring a preset. The GimpOperationSettings options do not affect the operation node, but rather the associated GimpDrawableFilter object. The class provides a gimp_operation_settings_sync_drawable_filter() function, which applies the options to the filter. Modify all custom and auto-generated operation-config types to derive from GimpOperationSettings, and modify the GimpConfig functions of the former to account for the GimpOperationSettings properties, using a set of protected functions provided by the class.
This commit is contained in:
@ -22,7 +22,7 @@
|
||||
#define __GIMP_LEVELS_CONFIG_H__
|
||||
|
||||
|
||||
#include "core/gimpsettings.h"
|
||||
#include "gimpoperationsettings.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_LEVELS_CONFIG (gimp_levels_config_get_type ())
|
||||
@ -37,28 +37,28 @@ typedef struct _GimpLevelsConfigClass GimpLevelsConfigClass;
|
||||
|
||||
struct _GimpLevelsConfig
|
||||
{
|
||||
GimpSettings parent_instance;
|
||||
GimpOperationSettings parent_instance;
|
||||
|
||||
gboolean linear;
|
||||
gboolean linear;
|
||||
|
||||
GimpHistogramChannel channel;
|
||||
GimpHistogramChannel channel;
|
||||
|
||||
gdouble low_input[5];
|
||||
gdouble high_input[5];
|
||||
gdouble low_input[5];
|
||||
gdouble high_input[5];
|
||||
|
||||
gboolean clamp_input;
|
||||
gboolean clamp_input;
|
||||
|
||||
gdouble gamma[5];
|
||||
gdouble gamma[5];
|
||||
|
||||
gdouble low_output[5];
|
||||
gdouble high_output[5];
|
||||
gdouble low_output[5];
|
||||
gdouble high_output[5];
|
||||
|
||||
gboolean clamp_output;
|
||||
gboolean clamp_output;
|
||||
};
|
||||
|
||||
struct _GimpLevelsConfigClass
|
||||
{
|
||||
GimpSettingsClass parent_class;
|
||||
GimpOperationSettingsClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user