Home | History | Annotate | Download | only in gobject

Lines Matching full:value

36  * @short_description: Standard Parameter and Value Types
41 * copied, transformed and compared while holding a value of any
44 * specifications for most value types can be created as #GParamSpec
71 GValue *value)
73 value->data[0].v_int = G_PARAM_SPEC_CHAR (pspec)->default_value;
78 GValue *value)
81 gint oval = value->data[0].v_int;
83 value->data[0].v_int = CLAMP (value->data[0].v_int, cspec->minimum, cspec->maximum);
85 return value->data[0].v_int != oval;
100 GValue *value)
102 value->data[0].v_uint = G_PARAM_SPEC_UCHAR (pspec)->default_value;
107 GValue *value)
110 guint oval = value->data[0].v_uint;
112 value->data[0].v_uint = CLAMP (value->data[0].v_uint, uspec->minimum, uspec->maximum);
114 return value->data[0].v_uint != oval;
119 GValue *value)
121 value->data[0].v_int = G_PARAM_SPEC_BOOLEAN (pspec)->default_value;
126 GValue *value)
128 gint oval = value->data[0].v_int;
130 value->data[0].v_int = value->data[0].v_int != FALSE;
132 return value->data[0].v_int != oval;
147 GValue *value)
149 value->data[0].v_int = G_PARAM_SPEC_INT (pspec)->default_value;
154 GValue *value)
157 gint oval = value->data[0].v_int;
159 value->data[0].v_int = CLAMP (value->data[0].v_int, ispec->minimum, ispec->maximum);
161 return value->data[0].v_int != oval;
187 GValue *value)
189 value->data[0].v_uint = G_PARAM_SPEC_UINT (pspec)->default_value;
194 GValue *value)
197 guint oval = value->data[0].v_uint;
199 value->data[0].v_uint = CLAMP (value->data[0].v_uint, uspec->minimum, uspec->maximum);
201 return value->data[0].v_uint != oval;
232 GValue *value)
234 value->data[0].v_long = G_PARAM_SPEC_LONG (pspec)->default_value;
239 GValue *value)
242 glong oval = value->data[0].v_long;
244 value->data[0].v_long = CLAMP (value->data[0].v_long, lspec->minimum, lspec->maximum);
246 return value->data[0].v_long != oval;
276 GValue *value)
278 value->data[0].v_ulong = G_PARAM_SPEC_ULONG (pspec)->default_value;
283 GValue *value)
286 gulong oval = value->data[0].v_ulong;
288 value->data[0].v_ulong = CLAMP (value->data[0].v_ulong, uspec->minimum, uspec->maximum);
290 return value->data[0].v_ulong != oval;
316 GValue *value)
318 value->data[0].v_int64 = G_PARAM_SPEC_INT64 (pspec)->default_value;
323 GValue *value)
326 gint64 oval = value->data[0].v_int64;
328 value->data[0].v_int64 = CLAMP (value->data[0].v_int64, lspec->minimum, lspec->maximum);
330 return value->data[0].v_int64 != oval;
356 GValue *value)
358 value->data[0].v_uint64 = G_PARAM_SPEC_UINT64 (pspec)->default_value;
363 GValue *value)
366 guint64 oval = value->data[0].v_uint64;
368 value->data[0].v_uint64 = CLAMP (value->data[0].v_uint64, uspec->minimum, uspec->maximum);
370 return value->data[0].v_uint64 != oval;
394 GValue *value)
396 value->data[0].v_uint = G_PARAM_SPEC_UNICHAR (pspec)->default_value;
401 GValue *value)
403 gunichar oval = value->data[0].v_uint;
408 value->data[0].v_uint = 0;
452 GValue *value)
454 value->data[0].v_long = G_PARAM_SPEC_ENUM (pspec)->default_value;
459 GValue *value)
462 glong oval = value->data[0].v_long;
465 !g_enum_get_value (espec->enum_class, value->data[0].v_long))
466 value->data[0].v_long = espec->default_value;
468 return value->data[0].v_long != oval;
497 GValue *value)
499 value->data[0].v_ulong = G_PARAM_SPEC_FLAGS (pspec)->default_value;
504 GValue *value)
507 gulong oval = value->data[0].v_ulong;
510 value->data[0].v_ulong &= fspec->flags_class->mask;
512 value->data[0].v_ulong = fspec->default_value;
514 return value->data[0].v_ulong != oval;
530 GValue *value)
532 value->data[0].v_float = G_PARAM_SPEC_FLOAT (pspec)->default_value;
537 GValue *value)
540 gfloat oval = value->data[0].v_float;
542 value->data[0].v_float = CLAMP (value->data[0].v_float, fspec->minimum, fspec->maximum);
544 return value->data[0].v_float != oval;
573 GValue *value)
575 value->data[0].v_double = G_PARAM_SPEC_DOUBLE (pspec)->default_value;
580 GValue *value)
583 gdouble oval = value->data[0].v_double;
585 value->data[0].v_double = CLAMP (value->data[0].v_double, dspec->minimum, dspec->maximum);
587 return value->data[0].v_double != oval;
634 GValue *value)
636 value->data[0].v_pointer = g_strdup (G_PARAM_SPEC_STRING (pspec)->default_value);
641 GValue *value)
644 gchar *string = value->data[0].v_pointer;
653 if (value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)
655 value->data[0].v_pointer = g_strdup (string);
656 string = value->data[0].v_pointer;
657 value->data[1].v_uint &= ~G_VALUE_NOCOPY_CONTENTS;
666 if (value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)
668 value->data[0].v_pointer = g_strdup (string);
669 value->data[0].v_pointer + (s - string);
670 string = value->data[0].v_pointer;
671 value->data[1].v_uint &= ~G_VALUE_NOCOPY_CONTENTS;
679 if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS))
680 g_free (value->data[0].v_pointer);
682 value->data[1].v_uint &= ~G_VALUE_NOCOPY_CONTENTS;
683 value->data[0].v_pointer = NULL;
685 string = value->data[0].v_pointer;
689 value->data[1].v_uint &= ~G_VALUE_NOCOPY_CONTENTS;
690 value->data[0].v_pointer = g_strdup ("");
692 string = value->data[0].v_pointer;
719 GValue *value)
721 value->data[0].v_pointer = NULL;
726 GValue *value)
729 GParamSpec *param = value->data[0].v_pointer;
735 value->data[0].v_pointer = NULL;
750 GValue *value)
752 value->data[0].v_pointer = NULL;
757 GValue *value)
788 GValue *value)
790 value->data[0].v_pointer = NULL;
795 GValue *value)
864 GValue *value)
868 if (!value->data[0].v_pointer && aspec->fixed_n_elements)
869 value->data[0].v_pointer = g_value_array_new (aspec->fixed_n_elements);
871 if (value->data[0].v_pointer)
873 /* g_value_reset (value); already done */
874 value_array_ensure_size (value->data[0].v_pointer, aspec->fixed_n_elements);
880 GValue *value)
883 GValueArray *value_array = value->data[0].v_pointer;
886 if (!value->data[0].v_pointer && aspec->fixed_n_elements)
887 value->data[0].v_pointer = g_value_array_new (aspec->fixed_n_elements);
889 if (value->data[0].v_pointer)
904 /* need to fixup value type, or ensure that the array value is initialized at all */
913 /* validate array value against element_spec */
972 GValue *value)
974 value->data[0].v_pointer = NULL;
979 GValue *value)
982 GObject *object = value->data[0].v_pointer;
988 value->data[0].v_pointer = NULL;
1031 GValue *value)
1035 g_param_value_set_default (ospec->overridden, value);
1040 GValue *value)
1044 return g_param_value_validate (ospec->overridden, value);
1064 GValue *value)
1068 value->data[0].v_long = tspec->is_a_type;
1073 GValue *value)
1076 GType gtype = value->data[0].v_long;
1081 value->data[0].v_long = tspec->is_a_type;
1522 * @minimum: minimum value for the property specified
1523 * @maximum: maximum value for the property specified
1524 * @default_value: default value for the property specified
1562 * @minimum: minimum value for the property specified
1563 * @maximum: maximum value for the property specified
1564 * @default_value: default value for the property specified
1602 * @default_value: default value for the property specified
1639 * @minimum: minimum value for the property specified
1640 * @maximum: maximum value for the property specified
1641 * @default_value: default value for the property specified
1681 * @minimum: minimum value for the property specified
1682 * @maximum: maximum value for the property specified
1683 * @default_value: default value for the property specified
1723 * @minimum: minimum value for the property specified
1724 * @maximum: maximum value for the property specified
1725 * @default_value: default value for the property specified
1765 * @minimum: minimum value for the property specified
1766 * @maximum: maximum value for the property specified
1767 * @default_value: default value for the property specified
1808 * @minimum: minimum value for the property specified
1809 * @maximum: maximum value for the property specified
1810 * @default_value: default value for the property specified
1850 * @minimum: minimum value for the property specified
1851 * @maximum: maximum value for the property specified
1852 * @default_value: default value for the property specified
1893 * @default_value: default value for the property specified
1930 * @default_value: default value for the property specified
1976 * @default_value: default value for the property specified
2021 * @minimum: minimum value for the property specified
2022 * @maximum: maximum value for the property specified
2023 * @default_value: default value for the property specified
2063 * @minimum: minimum value for the property specified
2064 * @maximum: maximum value for the property specified
2065 * @default_value: default value for the property specified
2106 * @default_value: default value for the property specified