app: cosmetic cleanups in the new dynamics stuff in core/
This commit is contained in:
@ -583,6 +583,7 @@ typedef enum /*< pdb-skip >*/
|
||||
GIMP_COLOR_PROFILE_POLICY_CONVERT /*< desc="Convert to RGB workspace" >*/
|
||||
} GimpColorProfilePolicy;
|
||||
|
||||
|
||||
#define GIMP_TYPE_DYNAMICS_OUTPUT_TYPE (gimp_dynamics_output_type_get_type ())
|
||||
|
||||
GType gimp_dynamics_output_type_get_type (void) G_GNUC_CONST;
|
||||
|
||||
@ -437,9 +437,9 @@ gimp_dynamics_get_output (GimpDynamics *dynamics,
|
||||
/* private functions */
|
||||
|
||||
static GimpDynamicsOutput *
|
||||
gimp_dynamics_create_output (GimpDynamics *dynamics,
|
||||
const gchar *name,
|
||||
GimpDynamicsOutputType type)
|
||||
gimp_dynamics_create_output (GimpDynamics *dynamics,
|
||||
const gchar *name,
|
||||
GimpDynamicsOutputType type)
|
||||
{
|
||||
GimpDynamicsOutput *output = gimp_dynamics_output_new (name, type);
|
||||
|
||||
@ -457,5 +457,3 @@ gimp_dynamics_output_notify (GObject *output,
|
||||
{
|
||||
g_object_notify (G_OBJECT (dynamics), gimp_object_get_name (output));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -53,13 +53,13 @@ struct _GimpDynamicsClass
|
||||
};
|
||||
|
||||
|
||||
GType gimp_dynamics_get_type (void) G_GNUC_CONST;
|
||||
GType gimp_dynamics_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GimpData * gimp_dynamics_new (const gchar *name);
|
||||
GimpData * gimp_dynamics_get_standard (void);
|
||||
GimpData * gimp_dynamics_new (const gchar *name);
|
||||
GimpData * gimp_dynamics_get_standard (void);
|
||||
|
||||
GimpDynamicsOutput * gimp_dynamics_get_output (GimpDynamics *dynamics,
|
||||
GimpDynamicsOutputType type);
|
||||
|
||||
GimpDynamicsOutput * gimp_dynamics_get_output (GimpDynamics *dynamics,
|
||||
GimpDynamicsOutputType type_id);
|
||||
|
||||
#endif /* __GIMP_DYNAMICS_H__ */
|
||||
|
||||
@ -83,6 +83,14 @@ gimp_dynamics_output_class_init (GimpDynamicsOutputClass *klass)
|
||||
object_class->set_property = gimp_dynamics_output_set_property;
|
||||
object_class->get_property = gimp_dynamics_output_get_property;
|
||||
|
||||
g_object_class_install_property (object_class, PROP_TYPE,
|
||||
g_param_spec_enum ("type", NULL,
|
||||
_("Output type"),
|
||||
GIMP_TYPE_DYNAMICS_OUTPUT_TYPE,
|
||||
GIMP_DYNAMICS_OUTPUT_OPACITY,
|
||||
GIMP_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_USE_PRESSURE,
|
||||
"use-pressure", NULL,
|
||||
DEFAULT_USE_PRESSURE,
|
||||
@ -112,14 +120,6 @@ gimp_dynamics_output_class_init (GimpDynamicsOutputClass *klass)
|
||||
"use-fade", NULL,
|
||||
DEFAULT_USE_FADE,
|
||||
GIMP_PARAM_STATIC_STRINGS);
|
||||
|
||||
g_object_class_install_property (object_class, PROP_TYPE,
|
||||
g_param_spec_enum ("type", NULL,
|
||||
_("Output type"),
|
||||
GIMP_TYPE_DYNAMICS_OUTPUT_TYPE,
|
||||
GIMP_DYNAMICS_OUTPUT_OPACITY,
|
||||
GIMP_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -161,6 +161,7 @@ gimp_dynamics_output_set_property (GObject *object,
|
||||
case PROP_TYPE:
|
||||
output->type = g_value_get_enum (value);
|
||||
break;
|
||||
|
||||
case PROP_USE_PRESSURE:
|
||||
output->use_pressure = g_value_get_boolean (value);
|
||||
break;
|
||||
@ -204,6 +205,7 @@ gimp_dynamics_output_get_property (GObject *object,
|
||||
case PROP_TYPE:
|
||||
g_value_set_enum (value, output->type);
|
||||
break;
|
||||
|
||||
case PROP_USE_PRESSURE:
|
||||
g_value_set_boolean (value, output->use_pressure);
|
||||
break;
|
||||
@ -238,7 +240,8 @@ gimp_dynamics_output_get_property (GObject *object,
|
||||
/* public functions */
|
||||
|
||||
GimpDynamicsOutput *
|
||||
gimp_dynamics_output_new (const gchar *name, GimpDynamicsOutputType type)
|
||||
gimp_dynamics_output_new (const gchar *name,
|
||||
GimpDynamicsOutputType type)
|
||||
{
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
|
||||
|
||||
@ -34,23 +34,23 @@ typedef struct _GimpDynamicsOutputClass GimpDynamicsOutputClass;
|
||||
|
||||
struct _GimpDynamicsOutput
|
||||
{
|
||||
GimpObject parent_instance;
|
||||
GimpObject parent_instance;
|
||||
|
||||
GimpDynamicsOutputType type;
|
||||
GimpDynamicsOutputType type;
|
||||
|
||||
gboolean use_pressure;
|
||||
gboolean use_velocity;
|
||||
gboolean use_direction;
|
||||
gboolean use_tilt;
|
||||
gboolean use_random;
|
||||
gboolean use_fade;
|
||||
gboolean use_pressure;
|
||||
gboolean use_velocity;
|
||||
gboolean use_direction;
|
||||
gboolean use_tilt;
|
||||
gboolean use_random;
|
||||
gboolean use_fade;
|
||||
|
||||
GimpCurve *pressure_curve;
|
||||
GimpCurve *velocity_curve;
|
||||
GimpCurve *direction_curve;
|
||||
GimpCurve *tilt_curve;
|
||||
GimpCurve *random_curve;
|
||||
GimpCurve *fade_curve;
|
||||
GimpCurve *pressure_curve;
|
||||
GimpCurve *velocity_curve;
|
||||
GimpCurve *direction_curve;
|
||||
GimpCurve *tilt_curve;
|
||||
GimpCurve *random_curve;
|
||||
GimpCurve *fade_curve;
|
||||
};
|
||||
|
||||
struct _GimpDynamicsOutputClass
|
||||
|
||||
Reference in New Issue
Block a user