reordered params to be consistent with other param specs.
2006-03-28 Michael Natterer <mitch@gimp.org> * app/core/gimpparamspecs.[ch] (gimp_param_spec_string): reordered params to be consistent with other param specs. (gimp_value_get_rgb): utility function which reads the value into a GimpRGB struct, instead of returning a pointer. (gimp_value_set_rgb): added for symmetry. Just calls g_value_set_boxed().
This commit is contained in:

committed by
Michael Natterer

parent
76353a0684
commit
aead1803be
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2006-03-28 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/core/gimpparamspecs.[ch] (gimp_param_spec_string): reordered
|
||||||
|
params to be consistent with other param specs.
|
||||||
|
|
||||||
|
(gimp_value_get_rgb): utility function which reads the value
|
||||||
|
into a GimpRGB struct, instead of returning a pointer.
|
||||||
|
|
||||||
|
(gimp_value_set_rgb): added for symmetry. Just calls
|
||||||
|
g_value_set_boxed().
|
||||||
|
|
||||||
2006-03-28 Sven Neumann <sven@gimp.org>
|
2006-03-28 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* plug-ins/jpeg/jpeg-exif.c
|
* plug-ins/jpeg/jpeg-exif.c
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
#include "libgimpbase/gimpbase.h"
|
#include "libgimpbase/gimpbase.h"
|
||||||
|
#include "libgimpcolor/gimpcolor.h"
|
||||||
|
|
||||||
#include "core-types.h"
|
#include "core-types.h"
|
||||||
|
|
||||||
@ -127,9 +128,9 @@ GParamSpec *
|
|||||||
gimp_param_spec_string (const gchar *name,
|
gimp_param_spec_string (const gchar *name,
|
||||||
const gchar *nick,
|
const gchar *nick,
|
||||||
const gchar *blurb,
|
const gchar *blurb,
|
||||||
const gchar *default_value,
|
|
||||||
gboolean no_validate,
|
gboolean no_validate,
|
||||||
gboolean null_ok,
|
gboolean null_ok,
|
||||||
|
const gchar *default_value,
|
||||||
GParamFlags flags)
|
GParamFlags flags)
|
||||||
{
|
{
|
||||||
GimpParamSpecString *sspec;
|
GimpParamSpecString *sspec;
|
||||||
@ -623,6 +624,35 @@ gimp_value_set_display (GValue *value,
|
|||||||
value->data[0].v_int = id;
|
value->data[0].v_int = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GIMP_TYPE_RGB
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_value_get_rgb (const GValue *value,
|
||||||
|
GimpRGB *rgb)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GIMP_VALUE_HOLDS_RGB (value));
|
||||||
|
g_return_if_fail (rgb != NULL);
|
||||||
|
|
||||||
|
if (value->data[0].v_pointer)
|
||||||
|
*rgb = *((GimpRGB *) value->data[0].v_pointer);
|
||||||
|
else
|
||||||
|
gimp_rgba_set (rgb, 0.0, 0.0, 0.0, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_value_set_rgb (GValue *value,
|
||||||
|
GimpRGB *rgb)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GIMP_VALUE_HOLDS_RGB (value));
|
||||||
|
g_return_if_fail (rgb != NULL);
|
||||||
|
|
||||||
|
g_value_set_boxed (value, rgb);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GIMP_TYPE_PARASITE
|
* GIMP_TYPE_PARASITE
|
||||||
*/
|
*/
|
||||||
|
@ -38,9 +38,9 @@ GType gimp_param_string_get_type (void) G_GNUC_CONST;
|
|||||||
GParamSpec * gimp_param_spec_string (const gchar *name,
|
GParamSpec * gimp_param_spec_string (const gchar *name,
|
||||||
const gchar *nick,
|
const gchar *nick,
|
||||||
const gchar *blurb,
|
const gchar *blurb,
|
||||||
const gchar *default_value,
|
|
||||||
gboolean no_validate,
|
gboolean no_validate,
|
||||||
gboolean null_ok,
|
gboolean null_ok,
|
||||||
|
const gchar *default_value,
|
||||||
GParamFlags flags);
|
GParamFlags flags);
|
||||||
|
|
||||||
|
|
||||||
@ -110,6 +110,16 @@ void gimp_value_set_display (GValue *value,
|
|||||||
GimpObject *display);
|
GimpObject *display);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GIMP_TYPE_RGB
|
||||||
|
*/
|
||||||
|
|
||||||
|
void gimp_value_get_rgb (const GValue *value,
|
||||||
|
GimpRGB *rgb);
|
||||||
|
void gimp_value_set_rgb (GValue *value,
|
||||||
|
GimpRGB *rgb);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GIMP_TYPE_PARASITE
|
* GIMP_TYPE_PARASITE
|
||||||
*/
|
*/
|
||||||
@ -119,6 +129,7 @@ void gimp_value_set_display (GValue *value,
|
|||||||
|
|
||||||
GType gimp_parasite_get_type (void) G_GNUC_CONST;
|
GType gimp_parasite_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GIMP_TYPE_PARAM_PARASITE
|
* GIMP_TYPE_PARAM_PARASITE
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user