cleanup: Port from ClutterColor to CoglColor
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544>
This commit is contained in:
@ -1331,7 +1331,7 @@ meta_compositor_flash_display (MetaCompositor *compositor,
|
||||
clutter_actor_get_size (stage, &width, &height);
|
||||
|
||||
flash = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (flash, &CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_actor_set_background_color (flash, &COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_actor_set_size (flash, width, height);
|
||||
clutter_actor_set_opacity (flash, 0);
|
||||
clutter_actor_add_child (stage, flash);
|
||||
@ -1370,7 +1370,7 @@ meta_compositor_flash_window (MetaCompositor *compositor,
|
||||
ClutterTransition *transition;
|
||||
|
||||
flash = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (flash, &CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_actor_set_background_color (flash, &COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_actor_set_size (flash, window->rect.width, window->rect.height);
|
||||
clutter_actor_set_position (flash,
|
||||
window->custom_frame_extents.left,
|
||||
|
@ -58,8 +58,8 @@ struct _MetaBackground
|
||||
|
||||
GDesktopBackgroundStyle style;
|
||||
GDesktopBackgroundShading shading_direction;
|
||||
ClutterColor color;
|
||||
ClutterColor second_color;
|
||||
CoglColor color;
|
||||
CoglColor second_color;
|
||||
|
||||
GFile *file1;
|
||||
MetaBackgroundImage *background_image1;
|
||||
@ -945,9 +945,9 @@ meta_background_new (MetaDisplay *display)
|
||||
|
||||
void
|
||||
meta_background_set_color (MetaBackground *self,
|
||||
ClutterColor *color)
|
||||
CoglColor *color)
|
||||
{
|
||||
ClutterColor dummy = { 0 };
|
||||
CoglColor dummy = { 0 };
|
||||
|
||||
g_return_if_fail (META_IS_BACKGROUND (self));
|
||||
g_return_if_fail (color != NULL);
|
||||
@ -960,8 +960,8 @@ meta_background_set_color (MetaBackground *self,
|
||||
void
|
||||
meta_background_set_gradient (MetaBackground *self,
|
||||
GDesktopBackgroundShading shading_direction,
|
||||
ClutterColor *color,
|
||||
ClutterColor *second_color)
|
||||
CoglColor *color,
|
||||
CoglColor *second_color)
|
||||
{
|
||||
g_return_if_fail (META_IS_BACKGROUND (self));
|
||||
g_return_if_fail (color != NULL);
|
||||
|
@ -599,7 +599,7 @@ do_sync_geometry (MetaWindowActorWayland *self)
|
||||
{
|
||||
self->background = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (self->background,
|
||||
&CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
&COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_actor_set_reactive (self->background, TRUE);
|
||||
clutter_actor_insert_child_below (CLUTTER_ACTOR (self),
|
||||
self->background,
|
||||
|
@ -350,7 +350,7 @@ on_monitors_changed (MetaMonitorManager *monitor_manager,
|
||||
|
||||
background = meta_background_new (display);
|
||||
meta_background_set_color (background,
|
||||
&CLUTTER_COLOR_INIT (red, green, blue, 255));
|
||||
&COGL_COLOR_INIT (red, green, blue, 255));
|
||||
meta_background_content_set_background (background_content, background);
|
||||
g_object_unref (background);
|
||||
|
||||
@ -824,7 +824,7 @@ get_display_tile_preview (MetaDisplay *display)
|
||||
preview = g_new0 (DisplayTilePreview, 1);
|
||||
|
||||
preview->actor = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (preview->actor, &CLUTTER_COLOR_INIT (0, 0, 255, 255));
|
||||
clutter_actor_set_background_color (preview->actor, &COGL_COLOR_INIT (0, 0, 255, 255));
|
||||
clutter_actor_set_opacity (preview->actor, 100);
|
||||
|
||||
clutter_actor_add_child (meta_get_window_group_for_display (display), preview->actor);
|
||||
|
@ -51,13 +51,13 @@ MetaBackground *meta_background_new (MetaDisplay *display);
|
||||
|
||||
META_EXPORT
|
||||
void meta_background_set_color (MetaBackground *self,
|
||||
ClutterColor *color);
|
||||
CoglColor *color);
|
||||
|
||||
META_EXPORT
|
||||
void meta_background_set_gradient (MetaBackground *self,
|
||||
GDesktopBackgroundShading shading_direction,
|
||||
ClutterColor *color,
|
||||
ClutterColor *second_color);
|
||||
CoglColor *color,
|
||||
CoglColor *second_color);
|
||||
|
||||
META_EXPORT
|
||||
void meta_background_set_file (MetaBackground *self,
|
||||
|
@ -44,22 +44,22 @@ main (int argc, char *argv[])
|
||||
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkComponent Test");
|
||||
clutter_actor_set_background_color (CLUTTER_ACTOR (stage),
|
||||
&CLUTTER_COLOR_INIT (255, 255, 255, 255));
|
||||
&COGL_COLOR_INIT (255, 255, 255, 255));
|
||||
clutter_actor_set_size (stage, WIDTH, HEIGHT);
|
||||
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_test_quit), NULL);
|
||||
|
||||
button1 = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (button1, &CLUTTER_COLOR_INIT (255, 255, 0, 255));
|
||||
clutter_actor_set_background_color (button1, &COGL_COLOR_INIT (255, 255, 0, 255));
|
||||
clutter_actor_set_size (button1, SIZE, SIZE);
|
||||
|
||||
button2 = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (button2, &CLUTTER_COLOR_INIT (0, 255, 0, 255));
|
||||
clutter_actor_set_background_color (button2, &COGL_COLOR_INIT (0, 255, 0, 255));
|
||||
clutter_actor_set_position (button2, 2 * SIZE, 0);
|
||||
clutter_actor_set_size (button2, SIZE, SIZE);
|
||||
|
||||
button3 = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (button3, &CLUTTER_COLOR_INIT (0, 0, 255, 255));
|
||||
clutter_actor_set_background_color (button3, &COGL_COLOR_INIT (0, 0, 255, 255));
|
||||
clutter_actor_set_position (button3, 0, 2 * SIZE);
|
||||
clutter_actor_set_size (button3, SIZE, SIZE);
|
||||
clutter_actor_set_z_position (button3, DEPTH);
|
||||
@ -67,7 +67,7 @@ main (int argc, char *argv[])
|
||||
/* a nested hierarchy, to check that the relative positions are
|
||||
computed properly */
|
||||
button4 = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (button4, &CLUTTER_COLOR_INIT (255, 0, 255, 255));
|
||||
clutter_actor_set_background_color (button4, &COGL_COLOR_INIT (255, 0, 255, 255));
|
||||
clutter_actor_set_position (button4, SIZE / 2, SIZE / 2);
|
||||
clutter_actor_set_size (button4, SIZE, SIZE);
|
||||
|
||||
|
@ -149,12 +149,12 @@ _create_button (const gchar *text)
|
||||
|
||||
button = clutter_actor_new ();
|
||||
rectangle = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (rectangle, &CLUTTER_COLOR_INIT (255, 0, 255, 255));
|
||||
clutter_actor_set_background_color (rectangle, &COGL_COLOR_INIT (255, 0, 255, 255));
|
||||
clutter_actor_set_size (rectangle, 375, 35);
|
||||
|
||||
label = clutter_text_new_full ("Sans Bold 32px",
|
||||
text,
|
||||
&CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
&COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_actor_add_child (button, rectangle);
|
||||
clutter_actor_add_child (button, label);
|
||||
clutter_actor_set_reactive (button, TRUE);
|
||||
@ -169,24 +169,24 @@ make_ui (ClutterActor *stage)
|
||||
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkEditable Test");
|
||||
clutter_actor_set_background_color (CLUTTER_ACTOR (stage),
|
||||
&CLUTTER_COLOR_INIT (255, 255, 255, 255));
|
||||
&COGL_COLOR_INIT (255, 255, 255, 255));
|
||||
clutter_actor_set_size (stage, WIDTH, HEIGHT);
|
||||
|
||||
/* text */
|
||||
text_actor = clutter_text_new_full ("Sans Bold 32px",
|
||||
"Lorem ipsum dolor sit amet",
|
||||
&CLUTTER_COLOR_INIT (255, 0, 0, 255));
|
||||
&COGL_COLOR_INIT (255, 0, 0, 255));
|
||||
clutter_actor_add_child (stage, text_actor);
|
||||
|
||||
/* text_editable */
|
||||
text_editable_actor = clutter_text_new_full ("Sans Bold 32px",
|
||||
"consectetur adipisicing elit",
|
||||
&CLUTTER_COLOR_INIT (255, 0, 0, 255));
|
||||
&COGL_COLOR_INIT (255, 0, 0, 255));
|
||||
clutter_actor_set_position (text_editable_actor, 0, 100);
|
||||
clutter_text_set_editable (CLUTTER_TEXT (text_editable_actor), TRUE);
|
||||
clutter_text_set_selectable (CLUTTER_TEXT (text_editable_actor), TRUE);
|
||||
clutter_text_set_selection_color (CLUTTER_TEXT (text_editable_actor),
|
||||
&CLUTTER_COLOR_INIT (0, 255, 0, 255));
|
||||
&COGL_COLOR_INIT (0, 255, 0, 255));
|
||||
clutter_text_set_activatable (CLUTTER_TEXT (text_editable_actor),
|
||||
TRUE);
|
||||
clutter_text_set_line_wrap (CLUTTER_TEXT (text_editable_actor), TRUE);
|
||||
|
@ -86,13 +86,13 @@ make_ui (ClutterActor *stage)
|
||||
ClutterActor *editable = NULL;
|
||||
ClutterActor *rectangle = NULL;
|
||||
ClutterActor *label = NULL;
|
||||
ClutterColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
||||
ClutterColor color_label = { 0x00, 0xff, 0x55, 0xff };
|
||||
ClutterColor color_rect = { 0x00, 0xff, 0xff, 0x55 };
|
||||
CoglColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
||||
CoglColor color_label = { 0x00, 0xff, 0x55, 0xff };
|
||||
CoglColor color_rect = { 0x00, 0xff, 0xff, 0x55 };
|
||||
float label_geom_y, editable_geom_y;
|
||||
|
||||
clutter_actor_set_background_color (CLUTTER_ACTOR (stage),
|
||||
&CLUTTER_COLOR_INIT (255, 255, 255, 255));
|
||||
&COGL_COLOR_INIT (255, 255, 255, 255));
|
||||
clutter_actor_set_size (stage, WIDTH, HEIGHT);
|
||||
|
||||
label_geom_y = 50;
|
||||
@ -109,7 +109,7 @@ make_ui (ClutterActor *stage)
|
||||
/* editable */
|
||||
editable = clutter_text_new_full ("Sans Bold 32px",
|
||||
"ddd",
|
||||
&CLUTTER_COLOR_INIT (255, 0, 0, 255));
|
||||
&COGL_COLOR_INIT (255, 0, 0, 255));
|
||||
clutter_actor_set_position (editable, 150, editable_geom_y);
|
||||
clutter_actor_set_size (editable, 500, 75);
|
||||
clutter_text_set_editable (CLUTTER_TEXT (editable), TRUE);
|
||||
|
@ -169,11 +169,11 @@ button_press_cb (ClutterActor *actor,
|
||||
static void
|
||||
make_ui (ClutterActor *stage)
|
||||
{
|
||||
ClutterColor color_stage = { 0x00, 0x00, 0x00, 0xff };
|
||||
ClutterColor color_text = { 0xff, 0x00, 0x00, 0xff };
|
||||
ClutterColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
||||
ClutterColor color_rect = { 0x00, 0xff, 0xff, 0xff };
|
||||
ClutterColor color_label = { 0x00, 0x00, 0x00, 0xff };
|
||||
CoglColor color_stage = { 0x00, 0x00, 0x00, 0xff };
|
||||
CoglColor color_text = { 0xff, 0x00, 0x00, 0xff };
|
||||
CoglColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
||||
CoglColor color_rect = { 0x00, 0xff, 0xff, 0xff };
|
||||
CoglColor color_label = { 0x00, 0x00, 0x00, 0xff };
|
||||
ClutterActor *button = NULL;
|
||||
ClutterActor *rectangle = NULL;
|
||||
ClutterActor *label = NULL;
|
||||
|
@ -34,11 +34,11 @@ make_ui (ClutterActor *stage)
|
||||
ClutterActor *editable = NULL;
|
||||
ClutterActor *rectangle = NULL;
|
||||
ClutterActor *label = NULL;
|
||||
ClutterColor color_stage = { 0x00, 0x00, 0x00, 0xff };
|
||||
ClutterColor color_text = { 0xff, 0x00, 0x00, 0xff };
|
||||
ClutterColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
||||
ClutterColor color_label = { 0x00, 0xff, 0x55, 0xff };
|
||||
ClutterColor color_rect = { 0x00, 0xff, 0xff, 0x55 };
|
||||
CoglColor color_stage = { 0x00, 0x00, 0x00, 0xff };
|
||||
CoglColor color_text = { 0xff, 0x00, 0x00, 0xff };
|
||||
CoglColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
||||
CoglColor color_label = { 0x00, 0xff, 0x55, 0xff };
|
||||
CoglColor color_rect = { 0x00, 0xff, 0xff, 0x55 };
|
||||
ClutterActor *full_entry = NULL;
|
||||
ClutterActor *cloned_entry = NULL;
|
||||
|
||||
|
@ -16,19 +16,19 @@ actor_basic_layout (void)
|
||||
clutter_actor_add_child (stage, vase);
|
||||
|
||||
flower[0] = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (flower[0], &CLUTTER_COLOR_INIT (255, 0, 0, 255));
|
||||
clutter_actor_set_background_color (flower[0], &COGL_COLOR_INIT (255, 0, 0, 255));
|
||||
clutter_actor_set_size (flower[0], 100, 100);
|
||||
clutter_actor_set_name (flower[0], "Red Flower");
|
||||
clutter_actor_add_child (vase, flower[0]);
|
||||
|
||||
flower[1] = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (flower[1], &CLUTTER_COLOR_INIT (255, 255, 0, 255));
|
||||
clutter_actor_set_background_color (flower[1], &COGL_COLOR_INIT (255, 255, 0, 255));
|
||||
clutter_actor_set_size (flower[1], 100, 100);
|
||||
clutter_actor_set_name (flower[1], "Yellow Flower");
|
||||
clutter_actor_add_child (vase, flower[1]);
|
||||
|
||||
flower[2] = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (flower[2], &CLUTTER_COLOR_INIT (0, 255, 0, 255));
|
||||
clutter_actor_set_background_color (flower[2], &COGL_COLOR_INIT (0, 255, 0, 255));
|
||||
clutter_actor_set_size (flower[2], 100, 100);
|
||||
clutter_actor_set_name (flower[2], "Green Flower");
|
||||
clutter_actor_add_child (vase, flower[2]);
|
||||
@ -59,13 +59,13 @@ actor_margin_layout (void)
|
||||
clutter_actor_add_child (stage, vase);
|
||||
|
||||
flower[0] = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (flower[0], &CLUTTER_COLOR_INIT (255, 0, 0, 255));
|
||||
clutter_actor_set_background_color (flower[0], &COGL_COLOR_INIT (255, 0, 0, 255));
|
||||
clutter_actor_set_size (flower[0], 100, 100);
|
||||
clutter_actor_set_name (flower[0], "Red Flower");
|
||||
clutter_actor_add_child (vase, flower[0]);
|
||||
|
||||
flower[1] = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (flower[1], &CLUTTER_COLOR_INIT (255, 255, 0, 255));
|
||||
clutter_actor_set_background_color (flower[1], &COGL_COLOR_INIT (255, 255, 0, 255));
|
||||
clutter_actor_set_size (flower[1], 100, 100);
|
||||
clutter_actor_set_name (flower[1], "Yellow Flower");
|
||||
clutter_actor_set_margin_right (flower[1], 6);
|
||||
@ -73,7 +73,7 @@ actor_margin_layout (void)
|
||||
clutter_actor_add_child (vase, flower[1]);
|
||||
|
||||
flower[2] = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (flower[2], &CLUTTER_COLOR_INIT (0, 255, 0, 255));
|
||||
clutter_actor_set_background_color (flower[2], &COGL_COLOR_INIT (0, 255, 0, 255));
|
||||
clutter_actor_set_size (flower[2], 100, 100);
|
||||
clutter_actor_set_name (flower[2], "Green Flower");
|
||||
clutter_actor_set_margin_top (flower[2], 6);
|
||||
|
@ -415,7 +415,7 @@ actor_offscreen_redirect (void)
|
||||
data.stage = clutter_test_get_stage ();
|
||||
data.parent_container = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (data.parent_container,
|
||||
&(ClutterColor) { 255, 255, 255, 255 });
|
||||
&(CoglColor) { 255, 255, 255, 255 });
|
||||
|
||||
data.container = g_object_new (foo_group_get_type (), NULL);
|
||||
data.foo_actor = g_object_new (foo_actor_get_type (), NULL);
|
||||
|
@ -8,8 +8,8 @@ opacity_label (void)
|
||||
{
|
||||
ClutterActor *stage;
|
||||
ClutterActor *label;
|
||||
ClutterColor label_color = { 255, 0, 0, 128 };
|
||||
ClutterColor color_check = { 0, };
|
||||
CoglColor label_color = { 255, 0, 0, 128 };
|
||||
CoglColor color_check = { 0, };
|
||||
|
||||
stage = clutter_test_get_stage ();
|
||||
|
||||
@ -47,8 +47,8 @@ opacity_rectangle (void)
|
||||
{
|
||||
ClutterActor *stage;
|
||||
ClutterActor *rect;
|
||||
ClutterColor rect_color = { 0, 0, 255, 255 };
|
||||
ClutterColor color_check = { 0, };
|
||||
CoglColor rect_color = { 0, 0, 255, 255 };
|
||||
CoglColor color_check = { 0, };
|
||||
|
||||
stage = clutter_test_get_stage ();
|
||||
|
||||
@ -83,9 +83,9 @@ opacity_paint (void)
|
||||
{
|
||||
ClutterActor *stage, *group1, *group2;
|
||||
ClutterActor *label, *rect;
|
||||
ClutterColor label_color = { 255, 0, 0, 128 };
|
||||
ClutterColor rect_color = { 0, 0, 255, 255 };
|
||||
ClutterColor color_check = { 0, };
|
||||
CoglColor label_color = { 255, 0, 0, 128 };
|
||||
CoglColor rect_color = { 0, 0, 255, 255 };
|
||||
CoglColor color_check = { 0, };
|
||||
|
||||
stage = clutter_test_get_stage ();
|
||||
|
||||
|
@ -54,7 +54,7 @@ on_timeout (gpointer data)
|
||||
}
|
||||
if (test_num == 1)
|
||||
{
|
||||
static const ClutterColor red = { 0xff, 0x00, 0x00, 0xff };
|
||||
static const CoglColor red = { 0xff, 0x00, 0x00, 0xff };
|
||||
/* Create an actor that covers the whole stage but that
|
||||
isn't visible so it shouldn't affect the picking */
|
||||
over_actor = clutter_actor_new ();
|
||||
@ -182,7 +182,7 @@ actor_pick (void)
|
||||
for (y = 0; y < ACTORS_Y; y++)
|
||||
for (x = 0; x < ACTORS_X; x++)
|
||||
{
|
||||
ClutterColor color = { x * 255 / (ACTORS_X - 1),
|
||||
CoglColor color = { x * 255 / (ACTORS_X - 1),
|
||||
y * 255 / (ACTORS_Y - 1),
|
||||
128, 255 };
|
||||
ClutterActor *rect = clutter_actor_new ();
|
||||
|
@ -201,7 +201,7 @@ static ClutterActor *
|
||||
make_actor (GType shader_type)
|
||||
{
|
||||
ClutterActor *rect;
|
||||
const ClutterColor white = { 0xff, 0xff, 0xff, 0xff };
|
||||
const CoglColor white = { 0xff, 0xff, 0xff, 0xff };
|
||||
|
||||
rect = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (rect, &white);
|
||||
|
@ -133,7 +133,7 @@ static gboolean
|
||||
do_tests (CallbackData *data)
|
||||
{
|
||||
PangoFontDescription *fd;
|
||||
static const ClutterColor red = { 0xff, 0x00, 0x00, 0xff };
|
||||
static const CoglColor red = { 0xff, 0x00, 0x00, 0xff };
|
||||
PangoAttrList *attr_list, *attr_list_copy;
|
||||
PangoAttribute *attr;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define DIVISION_WIDTH (SOURCE_SIZE / SOURCE_DIVISIONS_X)
|
||||
#define DIVISION_HEIGHT (SOURCE_SIZE / SOURCE_DIVISIONS_Y)
|
||||
|
||||
static const ClutterColor
|
||||
static const CoglColor
|
||||
corner_colors[SOURCE_DIVISIONS_X * SOURCE_DIVISIONS_Y] =
|
||||
{
|
||||
{ 0xff, 0x00, 0x00, 0xff }, /* red top left */
|
||||
@ -18,7 +18,7 @@ corner_colors[SOURCE_DIVISIONS_X * SOURCE_DIVISIONS_Y] =
|
||||
{ 0xff, 0x00, 0xff, 0xff } /* purple bottom right */
|
||||
};
|
||||
|
||||
static const ClutterColor stage_color = { 0x0, 0x0, 0x0, 0xff };
|
||||
static const CoglColor stage_color = { 0x0, 0x0, 0x0, 0xff };
|
||||
|
||||
typedef struct _TestState
|
||||
{
|
||||
@ -84,7 +84,7 @@ validate_part (TestState *state,
|
||||
for (x = 0; x < SOURCE_DIVISIONS_X; x++)
|
||||
{
|
||||
guchar *pixels;
|
||||
const ClutterColor *correct_color;
|
||||
const CoglColor *correct_color;
|
||||
|
||||
/* Read the center pixels of this division */
|
||||
pixels = clutter_stage_read_pixels (CLUTTER_STAGE (state->stage),
|
||||
|
@ -156,7 +156,7 @@ test_actors_main (int argc, char *argv[])
|
||||
oh->stage = clutter_test_get_stage ();
|
||||
clutter_actor_set_size (oh->stage, 800, 600);
|
||||
clutter_actor_set_name (oh->stage, "Default Stage");
|
||||
clutter_actor_set_background_color (oh->stage, &CLUTTER_COLOR_INIT (114, 159, 207, 255));
|
||||
clutter_actor_set_background_color (oh->stage, &COGL_COLOR_INIT (114, 159, 207, 255));
|
||||
g_signal_connect (oh->stage, "destroy", G_CALLBACK (stop_and_quit), oh);
|
||||
|
||||
clutter_stage_set_title (CLUTTER_STAGE (oh->stage), "Actors");
|
||||
|
@ -30,7 +30,7 @@ on_clicked (ClutterClickAction *action,
|
||||
gfloat old_x, old_y, new_x, new_y;
|
||||
gfloat old_width, old_height, new_width, new_height;
|
||||
gdouble new_angle;
|
||||
ClutterColor new_color;
|
||||
CoglColor new_color;
|
||||
guint8 new_opacity;
|
||||
|
||||
clutter_actor_get_position (actor, &old_x, &old_y);
|
||||
@ -47,7 +47,7 @@ on_clicked (ClutterClickAction *action,
|
||||
new_height = old_height + 200;
|
||||
new_angle = 360.0;
|
||||
|
||||
new_color = CLUTTER_COLOR_INIT (164, 0, 0, 255);
|
||||
new_color = COGL_COLOR_INIT (164, 0, 0, 255);
|
||||
new_opacity = 255;
|
||||
}
|
||||
else
|
||||
@ -58,7 +58,7 @@ on_clicked (ClutterClickAction *action,
|
||||
new_height = old_height - 200;
|
||||
new_angle = 0.0;
|
||||
|
||||
new_color = CLUTTER_COLOR_INIT (206, 92, 0, 255);
|
||||
new_color = COGL_COLOR_INIT (206, 92, 0, 255);
|
||||
|
||||
new_opacity = 128;
|
||||
}
|
||||
@ -93,12 +93,12 @@ test_animation_main (int argc, char *argv[])
|
||||
clutter_test_init (&argc, &argv);
|
||||
|
||||
stage = clutter_test_get_stage ();
|
||||
clutter_actor_set_background_color (stage, &CLUTTER_COLOR_INIT (114, 159, 207, 255));
|
||||
clutter_actor_set_background_color (stage, &COGL_COLOR_INIT (114, 159, 207, 255));
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Animation");
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_test_quit), NULL);
|
||||
|
||||
rect = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (rect, &CLUTTER_COLOR_INIT (252, 175, 62, 255));
|
||||
clutter_actor_set_background_color (rect, &COGL_COLOR_INIT (252, 175, 62, 255));
|
||||
clutter_actor_add_child (stage, rect);
|
||||
clutter_actor_set_size (rect, 50, 50);
|
||||
clutter_actor_set_pivot_point (rect, .5f, .5f);
|
||||
|
@ -174,7 +174,7 @@ test_bind_constraint_main (int argc, char *argv[])
|
||||
ClutterActor *stage, *rect;
|
||||
ClutterConstraint *constraint;
|
||||
ClutterEffect *effect;
|
||||
ClutterColor rect_color;
|
||||
CoglColor rect_color;
|
||||
gint i;
|
||||
|
||||
clutter_test_init (&argc, &argv);
|
||||
@ -185,7 +185,7 @@ test_bind_constraint_main (int argc, char *argv[])
|
||||
clutter_actor_set_size (stage, 800, 600);
|
||||
|
||||
/* main rectangle */
|
||||
clutter_color_from_string (&rect_color, "#3465a4");
|
||||
cogl_color_from_string (&rect_color, "#3465a4");
|
||||
rect = clutter_actor_new ();
|
||||
g_signal_connect (rect, "button-release-event",
|
||||
G_CALLBACK (on_button_release),
|
||||
@ -226,7 +226,7 @@ test_bind_constraint_main (int argc, char *argv[])
|
||||
if (i == Center)
|
||||
continue;
|
||||
|
||||
clutter_color_from_string (&rect_color, colors[i]);
|
||||
cogl_color_from_string (&rect_color, colors[i]);
|
||||
|
||||
rect = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (rect, &rect_color);
|
||||
|
@ -273,7 +273,7 @@ test_binding_pool_main (int argc, char *argv[])
|
||||
/* add three rectangles to the key group */
|
||||
clutter_actor_add_child (key_group,
|
||||
g_object_new (CLUTTER_TYPE_ACTOR,
|
||||
"background-color", &CLUTTER_COLOR_INIT (255, 0, 0, 255),
|
||||
"background-color", &COGL_COLOR_INIT (255, 0, 0, 255),
|
||||
"name", "Red Rectangle",
|
||||
"width", 100.0,
|
||||
"height", 100.0,
|
||||
@ -282,7 +282,7 @@ test_binding_pool_main (int argc, char *argv[])
|
||||
NULL));
|
||||
clutter_actor_add_child (key_group,
|
||||
g_object_new (CLUTTER_TYPE_ACTOR,
|
||||
"background-color", &CLUTTER_COLOR_INIT (0, 255, 0, 255),
|
||||
"background-color", &COGL_COLOR_INIT (0, 255, 0, 255),
|
||||
"name", "Green Rectangle",
|
||||
"width", 100.0,
|
||||
"height", 100.0,
|
||||
@ -291,7 +291,7 @@ test_binding_pool_main (int argc, char *argv[])
|
||||
NULL));
|
||||
clutter_actor_add_child (key_group,
|
||||
g_object_new (CLUTTER_TYPE_ACTOR,
|
||||
"background-color", &CLUTTER_COLOR_INIT (0, 0, 255, 255),
|
||||
"background-color", &COGL_COLOR_INIT (0, 0, 255, 255),
|
||||
"name", "Blue Rectangle",
|
||||
"width", 100.0,
|
||||
"height", 100.0,
|
||||
|
@ -114,7 +114,7 @@ test_cogl_multitexture_main (int argc, char *argv[])
|
||||
{
|
||||
GError *error = NULL;
|
||||
ClutterActor *stage;
|
||||
ClutterColor stage_color = { 0x61, 0x56, 0x56, 0xff };
|
||||
CoglColor stage_color = { 0x61, 0x56, 0x56, 0xff };
|
||||
g_autofree TestMultiLayerPipelineState *state = g_new0 (TestMultiLayerPipelineState, 1);
|
||||
gfloat stage_w, stage_h;
|
||||
gchar **files;
|
||||
|
@ -22,7 +22,7 @@ struct _Firework
|
||||
float size;
|
||||
float x, y;
|
||||
float start_x, start_y;
|
||||
ClutterColor color;
|
||||
CoglColor color;
|
||||
|
||||
/* Velocities are in units per second */
|
||||
float initial_x_velocity;
|
||||
@ -36,8 +36,8 @@ typedef struct _Spark Spark;
|
||||
struct _Spark
|
||||
{
|
||||
float x, y;
|
||||
ClutterColor color;
|
||||
ClutterColor base_color;
|
||||
CoglColor color;
|
||||
CoglColor base_color;
|
||||
};
|
||||
|
||||
typedef struct _Data Data;
|
||||
@ -137,12 +137,12 @@ on_after_paint (ClutterActor *stage,
|
||||
/* Pick a random color out of six */
|
||||
if (g_random_boolean ())
|
||||
{
|
||||
memset (&firework->color, 0, sizeof (ClutterColor));
|
||||
memset (&firework->color, 0, sizeof (CoglColor));
|
||||
((guint8 *) &firework->color)[g_random_int_range (0, 3)] = 255;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset (&firework->color, 255, sizeof (ClutterColor));
|
||||
memset (&firework->color, 255, sizeof (CoglColor));
|
||||
((guint8 *) &firework->color)[g_random_int_range (0, 3)] = 0;
|
||||
}
|
||||
firework->color.alpha = 255;
|
||||
@ -262,7 +262,7 @@ test_cogl_point_sprites_main (int argc, char *argv[])
|
||||
|
||||
stage = clutter_test_get_stage ();
|
||||
clutter_actor_set_background_color (CLUTTER_ACTOR (stage),
|
||||
&CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
&COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cogl Point Sprites");
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_test_quit), NULL);
|
||||
g_signal_connect (CLUTTER_STAGE (stage), "after-paint", G_CALLBACK (on_after_paint), &data);
|
||||
|
@ -313,7 +313,7 @@ test_cogl_shader_glsl_main (int argc, char *argv[])
|
||||
ClutterActor *actor;
|
||||
char *file;
|
||||
GError *error;
|
||||
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
||||
CoglColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
||||
CoglPipeline *shader_pipeline;
|
||||
CoglContext *ctx =
|
||||
clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||
|
@ -340,7 +340,7 @@ test_cogl_tex_polygon_main (int argc, char *argv[])
|
||||
ClutterActor *slicing_toggle;
|
||||
ClutterActor *note;
|
||||
ClutterTimeline *timeline;
|
||||
ClutterColor blue = { 0x30, 0x30, 0xff, 0xff };
|
||||
CoglColor blue = { 0x30, 0x30, 0xff, 0xff };
|
||||
|
||||
clutter_test_init (&argc, &argv);
|
||||
|
||||
|
@ -41,7 +41,7 @@ color_content_paint_content (ClutterContent *content,
|
||||
{
|
||||
ColorContent *self = (ColorContent *) content;
|
||||
ClutterActorBox box, content_box;
|
||||
ClutterColor color;
|
||||
CoglColor color;
|
||||
PangoLayout *layout;
|
||||
PangoRectangle logical;
|
||||
ClutterPaintNode *node;
|
||||
@ -206,7 +206,7 @@ test_content_main (int argc, char *argv[])
|
||||
for (i = 0; i < n_rects; i++)
|
||||
{
|
||||
ClutterActor *box = clutter_actor_new ();
|
||||
ClutterColor bg_color = {
|
||||
CoglColor bg_color = {
|
||||
g_random_int_range (0, 255),
|
||||
g_random_int_range (0, 255),
|
||||
g_random_int_range (0, 255),
|
||||
@ -214,7 +214,7 @@ test_content_main (int argc, char *argv[])
|
||||
};
|
||||
char *name, *color;
|
||||
|
||||
color = clutter_color_to_string (&bg_color);
|
||||
color = cogl_color_to_string (&bg_color);
|
||||
name = g_strconcat ("Box <", color, ">", NULL);
|
||||
clutter_actor_set_name (box, name);
|
||||
|
||||
|
@ -170,7 +170,7 @@ test_devices_main (int argc, char **argv)
|
||||
app->devices = g_hash_table_new (g_direct_hash, g_direct_equal) ;
|
||||
|
||||
stage = clutter_test_get_stage ();
|
||||
clutter_actor_set_background_color (stage, &CLUTTER_COLOR_INIT (114, 159, 207, 255));
|
||||
clutter_actor_set_background_color (stage, &COGL_COLOR_INIT (114, 159, 207, 255));
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Devices");
|
||||
g_signal_connect (stage,
|
||||
"destroy", G_CALLBACK (clutter_test_quit),
|
||||
|
@ -389,16 +389,13 @@ test_events_main (int argc, char *argv[])
|
||||
g_signal_connect (stage, "event", G_CALLBACK (input_cb), (char *) "stage");
|
||||
|
||||
focus_box = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (focus_box, &CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_actor_set_background_color (focus_box, &COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_actor_set_name (focus_box, "Focus Box");
|
||||
clutter_actor_add_child (stage, focus_box);
|
||||
|
||||
actor = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (actor, &CLUTTER_COLOR_INIT (0, 255, 0, 255));
|
||||
clutter_actor_set_background_color (actor, &COGL_COLOR_INIT (0, 255, 0, 255));
|
||||
clutter_actor_set_name (actor, "Green Box");
|
||||
clutter_actor_set_size (actor, 100, 100);
|
||||
clutter_actor_set_position (actor, 250, 100);
|
||||
clutter_actor_set_reactive (actor, TRUE);
|
||||
clutter_actor_add_child (stage, actor);
|
||||
g_signal_connect (actor, "event", G_CALLBACK (input_cb), (char *) "green box");
|
||||
g_signal_connect (actor, "key-focus-in", G_CALLBACK (key_focus_in_cb),
|
||||
@ -409,7 +406,7 @@ test_events_main (int argc, char *argv[])
|
||||
|
||||
/* non reactive */
|
||||
actor = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (actor, &CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_actor_set_background_color (actor, &COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_actor_set_name (actor, "Black Box");
|
||||
clutter_actor_set_size (actor, 400, 50);
|
||||
clutter_actor_set_position (actor, 100, 250);
|
||||
@ -422,7 +419,7 @@ test_events_main (int argc, char *argv[])
|
||||
|
||||
/* non reactive group, with reactive child */
|
||||
actor = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (actor, &CLUTTER_COLOR_INIT (255, 255, 0, 255));
|
||||
clutter_actor_set_background_color (actor, &COGL_COLOR_INIT (255, 255, 0, 255));
|
||||
clutter_actor_set_name (actor, "Yellow Box");
|
||||
clutter_actor_set_size (actor, 100, 100);
|
||||
clutter_actor_set_reactive (actor, TRUE);
|
||||
@ -437,7 +434,7 @@ test_events_main (int argc, char *argv[])
|
||||
|
||||
/* border actor */
|
||||
actor = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (actor, &CLUTTER_COLOR_INIT (255, 0, 255, 255));
|
||||
clutter_actor_set_background_color (actor, &COGL_COLOR_INIT (255, 0, 255, 255));
|
||||
clutter_actor_set_name (actor, "Border Box");
|
||||
clutter_actor_set_size (actor, 100, 100);
|
||||
clutter_actor_set_position (actor,
|
||||
|
@ -200,10 +200,10 @@ G_MODULE_EXPORT int
|
||||
test_grab_main (int argc, char *argv[])
|
||||
{
|
||||
ClutterActor *stage, *actor;
|
||||
ClutterColor rcol = { 0xff, 0, 0, 0xff},
|
||||
bcol = { 0, 0, 0xff, 0xff },
|
||||
ccol = { 0, 0xff, 0xff, 0xff },
|
||||
ycol = { 0xff, 0xff, 0, 0xff };
|
||||
CoglColor rcol = { 0xff, 0, 0, 0xff},
|
||||
bcol = { 0, 0, 0xff, 0xff },
|
||||
ccol = { 0, 0xff, 0xff, 0xff },
|
||||
ycol = { 0xff, 0xff, 0, 0xff };
|
||||
|
||||
clutter_test_init (&argc, &argv);
|
||||
|
||||
|
@ -42,7 +42,7 @@ solid_content_paint_content (ClutterContent *content,
|
||||
{
|
||||
SolidContent *self = (SolidContent *) content;
|
||||
ClutterActorBox box, content_box;
|
||||
ClutterColor color;
|
||||
CoglColor color;
|
||||
PangoLayout *layout;
|
||||
PangoRectangle logical;
|
||||
ClutterPaintNode *node;
|
||||
@ -227,7 +227,7 @@ test_image_main (int argc, char *argv[])
|
||||
for (i = 0; i < n_rects; i++)
|
||||
{
|
||||
ClutterActor *box = clutter_actor_new ();
|
||||
ClutterColor bg_color = {
|
||||
CoglColor bg_color = {
|
||||
g_random_int_range (0, 255),
|
||||
g_random_int_range (0, 255),
|
||||
g_random_int_range (0, 255),
|
||||
@ -235,7 +235,7 @@ test_image_main (int argc, char *argv[])
|
||||
};
|
||||
char *name, *str;
|
||||
|
||||
str = clutter_color_to_string (&bg_color);
|
||||
str = cogl_color_to_string (&bg_color);
|
||||
name = g_strconcat ("Box <", color, ">", NULL);
|
||||
clutter_actor_set_name (box, name);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "tests/clutter-test-utils.h"
|
||||
|
||||
static const ClutterColor colors[] = {
|
||||
static const CoglColor colors[] = {
|
||||
{ 255, 0, 0, 255 },
|
||||
{ 0, 255, 0, 255 },
|
||||
{ 0, 0, 255, 255 },
|
||||
|
@ -23,7 +23,7 @@ test_shader_effects_main (int argc, char *argv[])
|
||||
|
||||
stage = clutter_test_get_stage ();
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Rotations");
|
||||
clutter_actor_set_background_color (stage, &CLUTTER_COLOR_INIT (186, 189, 182, 255));
|
||||
clutter_actor_set_background_color (stage, &COGL_COLOR_INIT (186, 189, 182, 255));
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_test_quit), NULL);
|
||||
|
||||
/* Make a timeline */
|
||||
@ -50,7 +50,7 @@ test_shader_effects_main (int argc, char *argv[])
|
||||
NULL);
|
||||
|
||||
rect = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (rect, &CLUTTER_COLOR_INIT (206, 92, 0, 255));
|
||||
clutter_actor_set_background_color (rect, &COGL_COLOR_INIT (206, 92, 0, 255));
|
||||
clutter_actor_add_effect_with_name (rect, "blur", clutter_blur_effect_new ());
|
||||
clutter_actor_set_position (rect, 415, 215);
|
||||
clutter_actor_set_size (rect, 150, 150);
|
||||
|
@ -47,7 +47,7 @@ test_stage_sizing_main (int argc, char *argv[])
|
||||
|
||||
rect = clutter_actor_new ();
|
||||
clutter_actor_set_layout_manager (rect, clutter_bin_layout_new ());
|
||||
clutter_actor_set_background_color (rect, &CLUTTER_COLOR_INIT (52, 101, 164, 255));
|
||||
clutter_actor_set_background_color (rect, &COGL_COLOR_INIT (52, 101, 164, 255));
|
||||
clutter_actor_set_reactive (rect, TRUE);
|
||||
g_signal_connect_swapped (rect, "button-press-event",
|
||||
G_CALLBACK (shrink_clicked_cb), stage);
|
||||
@ -58,7 +58,7 @@ test_stage_sizing_main (int argc, char *argv[])
|
||||
|
||||
rect = clutter_actor_new ();
|
||||
clutter_actor_set_layout_manager (rect, clutter_bin_layout_new ());
|
||||
clutter_actor_set_background_color (rect, &CLUTTER_COLOR_INIT (237, 212, 0, 255));
|
||||
clutter_actor_set_background_color (rect, &COGL_COLOR_INIT (237, 212, 0, 255));
|
||||
clutter_actor_set_reactive (rect, TRUE);
|
||||
g_signal_connect_swapped (rect, "button-press-event",
|
||||
G_CALLBACK (expand_clicked_cb), stage);
|
||||
|
@ -125,7 +125,7 @@ test_swipe_action_main (int argc, char *argv[])
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_test_quit), NULL);
|
||||
|
||||
rect = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (rect, &CLUTTER_COLOR_INIT (255, 0, 0, 255));
|
||||
clutter_actor_set_background_color (rect, &COGL_COLOR_INIT (255, 0, 0, 255));
|
||||
clutter_actor_set_name (rect, "Vertical swipes");
|
||||
clutter_actor_set_size (rect, 150, 150);
|
||||
clutter_actor_set_position (rect, 10, 100);
|
||||
@ -134,7 +134,7 @@ test_swipe_action_main (int argc, char *argv[])
|
||||
attach_action (rect, VERTICAL);
|
||||
|
||||
rect = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (rect, &CLUTTER_COLOR_INIT (0, 0, 255, 255));
|
||||
clutter_actor_set_background_color (rect, &COGL_COLOR_INIT (0, 0, 255, 255));
|
||||
clutter_actor_set_name (rect, "Horizontal swipes");
|
||||
clutter_actor_set_size (rect, 150, 150);
|
||||
clutter_actor_set_position (rect, 170, 100);
|
||||
@ -143,7 +143,7 @@ test_swipe_action_main (int argc, char *argv[])
|
||||
attach_action (rect, HORIZONTAL);
|
||||
|
||||
rect = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (rect, &CLUTTER_COLOR_INIT (0, 255, 0, 255));
|
||||
clutter_actor_set_background_color (rect, &COGL_COLOR_INIT (0, 255, 0, 255));
|
||||
clutter_actor_set_name (rect, "All swipes");
|
||||
clutter_actor_set_size (rect, 150, 150);
|
||||
clutter_actor_set_position (rect, 330, 100);
|
||||
|
@ -198,8 +198,8 @@ on_captured_event (ClutterText *text,
|
||||
}
|
||||
|
||||
static ClutterActor *
|
||||
create_label (const ClutterColor *color,
|
||||
const gchar *text)
|
||||
create_label (const CoglColor *color,
|
||||
const gchar *text)
|
||||
{
|
||||
ClutterActor *retval = clutter_text_new ();
|
||||
|
||||
@ -214,15 +214,15 @@ create_label (const ClutterColor *color,
|
||||
}
|
||||
|
||||
static ClutterActor *
|
||||
create_entry (const ClutterColor *color,
|
||||
const gchar *text,
|
||||
PangoAttrList *attrs,
|
||||
gunichar password_char,
|
||||
gint max_length)
|
||||
create_entry (const CoglColor *color,
|
||||
const gchar *text,
|
||||
PangoAttrList *attrs,
|
||||
gunichar password_char,
|
||||
gint max_length)
|
||||
{
|
||||
ClutterActor *retval = clutter_text_new_full (NULL, text, color);
|
||||
ClutterColor selection = { 0, };
|
||||
ClutterColor selected_text = { 0x00, 0x00, 0xff, 0xff };
|
||||
CoglColor selection = { 0, };
|
||||
CoglColor selected_text = { 0x00, 0x00, 0xff, 0xff };
|
||||
|
||||
clutter_actor_set_reactive (retval, TRUE);
|
||||
|
||||
@ -234,7 +234,7 @@ create_entry (const ClutterColor *color,
|
||||
clutter_text_set_cursor_color (CLUTTER_TEXT (retval), &selection);
|
||||
clutter_text_set_max_length (CLUTTER_TEXT (retval), max_length);
|
||||
clutter_text_set_selected_text_color (CLUTTER_TEXT (retval), &selected_text);
|
||||
clutter_actor_set_background_color (retval, &CLUTTER_COLOR_INIT (192, 192, 192, 255));
|
||||
clutter_actor_set_background_color (retval, &COGL_COLOR_INIT (192, 192, 192, 255));
|
||||
if (attrs)
|
||||
clutter_text_set_attributes (CLUTTER_TEXT (retval), attrs);
|
||||
|
||||
@ -261,7 +261,7 @@ test_text_field_main (gint argc,
|
||||
|
||||
stage = clutter_test_get_stage ();
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Text Fields");
|
||||
clutter_actor_set_background_color (stage, &CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_actor_set_background_color (stage, &COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_test_quit), NULL);
|
||||
|
||||
grid = clutter_grid_layout_new ();
|
||||
@ -275,7 +275,7 @@ test_text_field_main (gint argc,
|
||||
clutter_actor_set_position (box, 12, 12);
|
||||
clutter_actor_add_child (stage, box);
|
||||
|
||||
label = create_label (&CLUTTER_COLOR_INIT (255, 255, 255, 255), "<b>Input field:</b>");
|
||||
label = create_label (&COGL_COLOR_INIT (255, 255, 255, 255), "<b>Input field:</b>");
|
||||
g_object_set (label, "min-width", 150.0, NULL);
|
||||
clutter_actor_add_child (box, label);
|
||||
clutter_layout_manager_child_set (grid, box, label,
|
||||
@ -288,7 +288,7 @@ test_text_field_main (gint argc,
|
||||
entry_attrs = pango_attr_list_new ();
|
||||
pango_attr_list_insert (entry_attrs, pango_attr_underline_new (PANGO_UNDERLINE_ERROR));
|
||||
pango_attr_list_insert (entry_attrs, pango_attr_underline_color_new (65535, 0, 0));
|
||||
entry = create_entry (&CLUTTER_COLOR_INIT (0, 0, 0, 255), "somme misspeeled textt", entry_attrs, 0, 0);
|
||||
entry = create_entry (&COGL_COLOR_INIT (0, 0, 0, 255), "somme misspeeled textt", entry_attrs, 0, 0);
|
||||
clutter_actor_add_child (box, entry);
|
||||
clutter_layout_manager_child_set (grid, box, entry,
|
||||
"row", 0,
|
||||
@ -299,7 +299,7 @@ test_text_field_main (gint argc,
|
||||
NULL);
|
||||
clutter_actor_grab_key_focus (entry);
|
||||
|
||||
label = create_label (&CLUTTER_COLOR_INIT (255, 255, 255, 255), "<b>A very long password field:</b>");
|
||||
label = create_label (&COGL_COLOR_INIT (255, 255, 255, 255), "<b>A very long password field:</b>");
|
||||
clutter_actor_add_child (box, label);
|
||||
clutter_layout_manager_child_set (grid, box, label,
|
||||
"row", 1,
|
||||
@ -308,7 +308,7 @@ test_text_field_main (gint argc,
|
||||
"y-expand", FALSE,
|
||||
NULL);
|
||||
|
||||
entry = create_entry (&CLUTTER_COLOR_INIT (0, 0, 0, 255), "password", NULL, '*', 8);
|
||||
entry = create_entry (&COGL_COLOR_INIT (0, 0, 0, 255), "password", NULL, '*', 8);
|
||||
clutter_actor_add_child (box, entry);
|
||||
clutter_layout_manager_child_set (grid, box, entry,
|
||||
"row", 1,
|
||||
|
@ -25,15 +25,15 @@ test_text_main (gint argc,
|
||||
{
|
||||
ClutterActor *stage;
|
||||
ClutterActor *text, *text2;
|
||||
ClutterColor text_color = { 0x33, 0xff, 0x33, 0xff };
|
||||
ClutterColor cursor_color = { 0xff, 0x33, 0x33, 0xff };
|
||||
CoglColor text_color = { 0x33, 0xff, 0x33, 0xff };
|
||||
CoglColor cursor_color = { 0xff, 0x33, 0x33, 0xff };
|
||||
ClutterTextBuffer *buffer;
|
||||
|
||||
clutter_test_init (&argc, &argv);
|
||||
|
||||
stage = clutter_test_get_stage ();
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Text Editing");
|
||||
clutter_actor_set_background_color (stage, &CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_actor_set_background_color (stage, &COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_test_quit), NULL);
|
||||
|
||||
buffer = clutter_text_buffer_new_with_text ("·", -1);
|
||||
@ -53,7 +53,7 @@ test_text_main (gint argc,
|
||||
clutter_text_set_editable (CLUTTER_TEXT (text), TRUE);
|
||||
clutter_text_set_selectable (CLUTTER_TEXT (text), TRUE);
|
||||
clutter_text_set_cursor_color (CLUTTER_TEXT (text), &cursor_color);
|
||||
clutter_text_set_selected_text_color (CLUTTER_TEXT (text), &CLUTTER_COLOR_INIT (0, 0, 255, 255));
|
||||
clutter_text_set_selected_text_color (CLUTTER_TEXT (text), &COGL_COLOR_INIT (0, 0, 255, 255));
|
||||
|
||||
text2 = clutter_text_new_with_buffer (buffer);
|
||||
clutter_text_set_color (CLUTTER_TEXT (text2), &text_color);
|
||||
@ -66,7 +66,7 @@ test_text_main (gint argc,
|
||||
clutter_text_set_editable (CLUTTER_TEXT (text2), TRUE);
|
||||
clutter_text_set_selectable (CLUTTER_TEXT (text2), TRUE);
|
||||
clutter_text_set_cursor_color (CLUTTER_TEXT (text2), &cursor_color);
|
||||
clutter_text_set_selected_text_color (CLUTTER_TEXT (text2), &CLUTTER_COLOR_INIT (0, 255, 0, 255));
|
||||
clutter_text_set_selected_text_color (CLUTTER_TEXT (text2), &COGL_COLOR_INIT (0, 255, 0, 255));
|
||||
|
||||
if (argv[1])
|
||||
{
|
||||
|
@ -139,7 +139,7 @@ main (int argc, char *argv[])
|
||||
|
||||
clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT);
|
||||
clutter_actor_set_background_color (CLUTTER_ACTOR (stage),
|
||||
&CLUTTER_COLOR_INIT (255, 255, 255, 255));
|
||||
&COGL_COLOR_INIT (255, 255, 255, 255));
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cogl Performance Test");
|
||||
|
||||
/* We want continuous redrawing of the stage... */
|
||||
|
@ -58,7 +58,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
glong i;
|
||||
gdouble angle;
|
||||
ClutterColor color = { 0x00, 0x00, 0x00, 0xff };
|
||||
CoglColor color = { 0x00, 0x00, 0x00, 0xff };
|
||||
ClutterActor *stage, *rect;
|
||||
|
||||
g_setenv ("CLUTTER_VBLANK", "none", FALSE);
|
||||
@ -70,7 +70,7 @@ main (int argc, char **argv)
|
||||
stage = clutter_test_get_stage ();
|
||||
clutter_actor_set_size (stage, 512, 512);
|
||||
clutter_actor_set_background_color (CLUTTER_ACTOR (stage),
|
||||
&CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
&COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Picking");
|
||||
|
||||
printf ("Picking performance test with "
|
||||
|
@ -85,7 +85,7 @@ get_character (int ch)
|
||||
static ClutterActor *
|
||||
create_label (void)
|
||||
{
|
||||
ClutterColor label_color = { 0xff, 0xff, 0xff, 0xff };
|
||||
CoglColor label_color = { 0xff, 0xff, 0xff, 0xff };
|
||||
ClutterActor *label;
|
||||
char *font_name;
|
||||
GString *str;
|
||||
@ -134,7 +134,7 @@ main (int argc, char *argv[])
|
||||
stage = clutter_test_get_stage ();
|
||||
clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT);
|
||||
clutter_actor_set_background_color (CLUTTER_ACTOR (stage),
|
||||
&CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
&COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Text Performance");
|
||||
|
||||
g_signal_connect (CLUTTER_STAGE (stage), "after-paint", G_CALLBACK (on_after_paint), NULL);
|
||||
|
@ -58,7 +58,7 @@ main (int argc, char *argv[])
|
||||
stage = clutter_test_get_stage ();
|
||||
clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT);
|
||||
clutter_actor_set_background_color (CLUTTER_ACTOR (stage),
|
||||
&CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
&COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Text");
|
||||
|
||||
group = clutter_actor_new ();
|
||||
@ -103,7 +103,7 @@ main (int argc, char *argv[])
|
||||
|
||||
label = clutter_text_new_with_text (font_name, text);
|
||||
clutter_text_set_color (CLUTTER_TEXT (label),
|
||||
&CLUTTER_COLOR_INIT (255, 255, 255, 255));
|
||||
&COGL_COLOR_INIT (255, 255, 255, 255));
|
||||
clutter_actor_set_position (label, (1.0*STAGE_WIDTH/COLS)*col,
|
||||
(1.0*STAGE_HEIGHT/ROWS)*row);
|
||||
/*clutter_actor_set_clip (label, 0,0, (1.0*STAGE_WIDTH/COLS),
|
||||
|
@ -51,7 +51,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
glong i;
|
||||
gdouble angle;
|
||||
ClutterColor color = { 0x00, 0x00, 0x00, 0xff };
|
||||
CoglColor color = { 0x00, 0x00, 0x00, 0xff };
|
||||
ClutterActor *stage, *rect;
|
||||
|
||||
clutter_perf_fps_init ();
|
||||
@ -61,7 +61,7 @@ main (int argc, char **argv)
|
||||
stage = clutter_test_get_stage ();
|
||||
clutter_actor_set_size (stage, 512, 512);
|
||||
clutter_actor_set_background_color (CLUTTER_ACTOR (stage),
|
||||
&CLUTTER_COLOR_INIT (0, 0, 0, 255));
|
||||
&COGL_COLOR_INIT (0, 0, 0, 255));
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Picking Performance");
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_test_quit), NULL);
|
||||
|
||||
|
@ -56,7 +56,7 @@ get_character (int ch)
|
||||
static ClutterActor *
|
||||
create_label (void)
|
||||
{
|
||||
ClutterColor label_color = { 0xff, 0xff, 0xff, 0xff };
|
||||
CoglColor label_color = { 0xff, 0xff, 0xff, 0xff };
|
||||
ClutterActor *label;
|
||||
char *font_name;
|
||||
GString *str;
|
||||
@ -81,7 +81,7 @@ int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
ClutterActor *stage;
|
||||
ClutterColor stage_color = { 0x00, 0x00, 0x00, 0xff };
|
||||
CoglColor stage_color = { 0x00, 0x00, 0x00, 0xff };
|
||||
ClutterActor *label;
|
||||
int w, h;
|
||||
int row, col;
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "test-conform-common.h"
|
||||
|
||||
static const ClutterColor stage_color = { 0x0, 0x0, 0x0, 0xff };
|
||||
static const CoglColor stage_color = { 0x0, 0x0, 0x0, 0xff };
|
||||
|
||||
#define QUAD_WIDTH 20
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#define FRAMEBUFFER_WIDTH 640
|
||||
#define FRAMEBUFFER_HEIGHT 480
|
||||
|
||||
static const ClutterColor stage_color = { 0x0, 0x0, 0x0, 0xff };
|
||||
static const CoglColor stage_color = { 0x0, 0x0, 0x0, 0xff };
|
||||
|
||||
|
||||
static void
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "test-conform-common.h"
|
||||
|
||||
static const ClutterColor stage_color = { 0x00, 0x00, 0x00, 0xff };
|
||||
static const CoglColor stage_color = { 0x00, 0x00, 0x00, 0xff };
|
||||
|
||||
#define TEX_SIZE 64
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "test-conform-common.h"
|
||||
|
||||
static const ClutterColor stage_color = { 0x00, 0x00, 0x00, 0xff };
|
||||
static const CoglColor stage_color = { 0x00, 0x00, 0x00, 0xff };
|
||||
|
||||
#ifdef HAVE_X11
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define FRAMEBUFFER_WIDTH 640
|
||||
#define FRAMEBUFFER_HEIGHT 480
|
||||
|
||||
static const ClutterColor stage_color = { 0x0, 0x0, 0x0, 0xff };
|
||||
static const CoglColor stage_color = { 0x0, 0x0, 0x0, 0xff };
|
||||
|
||||
static void
|
||||
assert_region_color (int x,
|
||||
|
@ -284,7 +284,7 @@ on_monitors_changed (MetaMonitorManager *monitor_manager,
|
||||
|
||||
background = meta_background_new (display);
|
||||
meta_background_set_color (background,
|
||||
&CLUTTER_COLOR_INIT (red, green, blue, 255));
|
||||
&COGL_COLOR_INIT (red, green, blue, 255));
|
||||
meta_background_content_set_background (background_content, background);
|
||||
g_object_unref (background);
|
||||
|
||||
@ -699,7 +699,7 @@ get_display_tile_preview (MetaDisplay *display)
|
||||
preview = g_new0 (DisplayTilePreview, 1);
|
||||
|
||||
preview->actor = clutter_actor_new ();
|
||||
clutter_actor_set_background_color (preview->actor, &CLUTTER_COLOR_INIT (0, 0, 255, 255));
|
||||
clutter_actor_set_background_color (preview->actor, &COGL_COLOR_INIT (0, 0, 255, 255));
|
||||
clutter_actor_set_opacity (preview->actor, 100);
|
||||
|
||||
clutter_actor_add_child (meta_get_window_group_for_display (display),
|
||||
|
@ -106,7 +106,7 @@ meta_test_virtual_monitor_create (void)
|
||||
actor = clutter_actor_new ();
|
||||
clutter_actor_set_position (actor, 10, 10);
|
||||
clutter_actor_set_size (actor, 40, 40);
|
||||
clutter_actor_set_background_color (actor, &CLUTTER_COLOR_INIT (114, 159, 207, 255));
|
||||
clutter_actor_set_background_color (actor, &COGL_COLOR_INIT (114, 159, 207, 255));
|
||||
clutter_actor_add_child (meta_backend_get_stage (backend), actor);
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
|
@ -95,7 +95,7 @@ meta_test_ref_test_sanity (void)
|
||||
actor1 = clutter_actor_new ();
|
||||
clutter_actor_set_position (actor1, 10, 10);
|
||||
clutter_actor_set_size (actor1, 50, 50);
|
||||
clutter_actor_set_background_color (actor1, &CLUTTER_COLOR_INIT (245, 121, 0, 255));
|
||||
clutter_actor_set_background_color (actor1, &COGL_COLOR_INIT (245, 121, 0, 255));
|
||||
clutter_actor_add_child (stage, actor1);
|
||||
|
||||
meta_ref_test_verify_view (get_view (),
|
||||
@ -105,7 +105,7 @@ meta_test_ref_test_sanity (void)
|
||||
actor2 = clutter_actor_new ();
|
||||
clutter_actor_set_position (actor2, 20, 20);
|
||||
clutter_actor_set_size (actor2, 50, 50);
|
||||
clutter_actor_set_background_color (actor2, &CLUTTER_COLOR_INIT (52, 101, 164, 255));
|
||||
clutter_actor_set_background_color (actor2, &COGL_COLOR_INIT (52, 101, 164, 255));
|
||||
clutter_actor_add_child (stage, actor2);
|
||||
|
||||
g_test_expect_message ("libmutter-test",
|
||||
|
Reference in New Issue
Block a user