Merge theme handling code (WIP).

This commit is contained in:
Daiki Ueno
2011-03-04 18:52:13 +09:00
parent 23ab2a343f
commit 37c2579253
19 changed files with 2551 additions and 133 deletions

View File

@ -222,3 +222,46 @@ eek_color_new (gdouble red,
return color;
}
GType
eek_gradient_get_type (void)
{
static GType our_type = 0;
if (our_type == 0)
our_type =
g_boxed_type_register_static ("EekGradient",
(GBoxedCopyFunc)eek_gradient_copy,
(GBoxedFreeFunc)eek_gradient_free);
return our_type;
}
EekGradient *
eek_gradient_new (EekGradientType type,
EekColor *start,
EekColor *stop)
{
EekGradient *gradient;
gradient = g_slice_new (EekGradient);
gradient->type = type;
gradient->start = eek_color_copy (start);
gradient->stop = eek_color_copy (stop);
return gradient;
}
EekGradient *
eek_gradient_copy (const EekGradient *gradient)
{
return eek_gradient_new (gradient->type, gradient->start, gradient->stop);
}
void
eek_gradient_free (EekGradient *gradient)
{
if (gradient->start)
eek_color_free (gradient->start);
if (gradient->stop)
eek_color_free (gradient->stop);
}