mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
Merge branch 'master' into msvc-support-master
This commit is contained in:
commit
63dbcc245c
@ -455,7 +455,6 @@ gdk_source_h_priv = \
|
|||||||
$(srcdir)/gdk/clutter-backend-gdk.h \
|
$(srcdir)/gdk/clutter-backend-gdk.h \
|
||||||
$(srcdir)/gdk/clutter-device-manager-gdk.h \
|
$(srcdir)/gdk/clutter-device-manager-gdk.h \
|
||||||
$(srcdir)/gdk/clutter-input-device-gdk.h \
|
$(srcdir)/gdk/clutter-input-device-gdk.h \
|
||||||
$(srcdir)/gdk/clutter-event-gdk.h \
|
|
||||||
$(srcdir)/gdk/clutter-stage-gdk.h \
|
$(srcdir)/gdk/clutter-stage-gdk.h \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
@ -6289,6 +6289,9 @@ clutter_actor_allocate (ClutterActor *self,
|
|||||||
* size, in pixels. This means the untransformed actor will have the
|
* size, in pixels. This means the untransformed actor will have the
|
||||||
* given geometry. This is the same as calling clutter_actor_set_position()
|
* given geometry. This is the same as calling clutter_actor_set_position()
|
||||||
* and clutter_actor_set_size().
|
* and clutter_actor_set_size().
|
||||||
|
*
|
||||||
|
* Deprecated: 1.10: Use clutter_actor_set_position() and
|
||||||
|
* clutter_actor_set_size() instead.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_actor_set_geometry (ClutterActor *self,
|
clutter_actor_set_geometry (ClutterActor *self,
|
||||||
@ -6305,12 +6308,16 @@ clutter_actor_set_geometry (ClutterActor *self,
|
|||||||
/**
|
/**
|
||||||
* clutter_actor_get_geometry:
|
* clutter_actor_get_geometry:
|
||||||
* @self: A #ClutterActor
|
* @self: A #ClutterActor
|
||||||
* @geometry: (out): A location to store actors #ClutterGeometry
|
* @geometry: (out caller-allocates): A location to store actors #ClutterGeometry
|
||||||
*
|
*
|
||||||
* Gets the size and position of an actor relative to its parent
|
* Gets the size and position of an actor relative to its parent
|
||||||
* actor. This is the same as calling clutter_actor_get_position() and
|
* actor. This is the same as calling clutter_actor_get_position() and
|
||||||
* clutter_actor_get_size(). It tries to "do what you mean" and get the
|
* clutter_actor_get_size(). It tries to "do what you mean" and get the
|
||||||
* requested size and position if the actor's allocation is invalid.
|
* requested size and position if the actor's allocation is invalid.
|
||||||
|
*
|
||||||
|
* Deprecated: 1.10: Use clutter_actor_get_position() and
|
||||||
|
* clutter_actor_get_size(), or clutter_actor_get_allocation_geometry()
|
||||||
|
* instead.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_actor_get_geometry (ClutterActor *self,
|
clutter_actor_get_geometry (ClutterActor *self,
|
||||||
|
@ -326,10 +326,6 @@ void clutter_actor_get_allocation_geometry (ClutterActor
|
|||||||
void clutter_actor_get_allocation_vertices (ClutterActor *self,
|
void clutter_actor_get_allocation_vertices (ClutterActor *self,
|
||||||
ClutterActor *ancestor,
|
ClutterActor *ancestor,
|
||||||
ClutterVertex verts[]);
|
ClutterVertex verts[]);
|
||||||
void clutter_actor_set_geometry (ClutterActor *self,
|
|
||||||
const ClutterGeometry *geometry);
|
|
||||||
void clutter_actor_get_geometry (ClutterActor *self,
|
|
||||||
ClutterGeometry *geometry);
|
|
||||||
void clutter_actor_set_size (ClutterActor *self,
|
void clutter_actor_set_size (ClutterActor *self,
|
||||||
gfloat width,
|
gfloat width,
|
||||||
gfloat height);
|
gfloat height);
|
||||||
|
@ -2701,19 +2701,14 @@ clutter_get_default_frame_rate (void)
|
|||||||
* is possible, this value is ignored.
|
* is possible, this value is ignored.
|
||||||
*
|
*
|
||||||
* Since: 0.6
|
* Since: 0.6
|
||||||
|
*
|
||||||
|
* Deprecated: 1.10: This function does not do anything any more.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_set_default_frame_rate (guint frames_per_sec)
|
clutter_set_default_frame_rate (guint frames_per_sec)
|
||||||
{
|
{
|
||||||
ClutterMainContext *context;
|
|
||||||
|
|
||||||
context = _clutter_context_get_default ();
|
|
||||||
|
|
||||||
if (context->frame_rate != frames_per_sec)
|
|
||||||
context->frame_rate = frames_per_sec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_grab_actor_destroy (ClutterActor *actor,
|
on_grab_actor_destroy (ClutterActor *actor,
|
||||||
ClutterInputDevice *device)
|
ClutterInputDevice *device)
|
||||||
|
@ -127,9 +127,6 @@ guint clutter_threads_add_repaint_func (GSourceFunc
|
|||||||
GDestroyNotify notify);
|
GDestroyNotify notify);
|
||||||
void clutter_threads_remove_repaint_func (guint handle_id);
|
void clutter_threads_remove_repaint_func (guint handle_id);
|
||||||
|
|
||||||
void clutter_set_default_frame_rate (guint frames_per_sec);
|
|
||||||
guint clutter_get_default_frame_rate (void);
|
|
||||||
|
|
||||||
void clutter_grab_pointer (ClutterActor *actor);
|
void clutter_grab_pointer (ClutterActor *actor);
|
||||||
void clutter_ungrab_pointer (void);
|
void clutter_ungrab_pointer (void);
|
||||||
ClutterActor * clutter_get_pointer_grab (void);
|
ClutterActor * clutter_get_pointer_grab (void);
|
||||||
@ -141,6 +138,8 @@ PangoFontMap * clutter_get_font_map (void);
|
|||||||
|
|
||||||
ClutterTextDirection clutter_get_default_text_direction (void);
|
ClutterTextDirection clutter_get_default_text_direction (void);
|
||||||
|
|
||||||
|
guint clutter_get_default_frame_rate (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* _CLUTTER_MAIN_H__ */
|
#endif /* _CLUTTER_MAIN_H__ */
|
||||||
|
@ -6,10 +6,17 @@
|
|||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
CLUTTER_DEPRECATED
|
CLUTTER_DEPRECATED
|
||||||
guint32 clutter_actor_get_gid (ClutterActor *self);
|
void clutter_actor_set_geometry (ClutterActor *self,
|
||||||
|
const ClutterGeometry *geometry);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_actor_get_allocation_geometry)
|
||||||
|
void clutter_actor_get_geometry (ClutterActor *self,
|
||||||
|
ClutterGeometry *geometry);
|
||||||
|
CLUTTER_DEPRECATED
|
||||||
|
guint32 clutter_actor_get_gid (ClutterActor *self);
|
||||||
|
|
||||||
CLUTTER_DEPRECATED
|
CLUTTER_DEPRECATED
|
||||||
ClutterActor * clutter_get_actor_by_gid (guint32 id_);
|
ClutterActor * clutter_get_actor_by_gid (guint32 id_);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -42,11 +42,14 @@ CLUTTER_DEPRECATED_FOR(clutter_device_manager_get_device)
|
|||||||
ClutterInputDevice * clutter_get_input_device_for_id (gint id_);
|
ClutterInputDevice * clutter_get_input_device_for_id (gint id_);
|
||||||
|
|
||||||
CLUTTER_DEPRECATED_FOR(clutter_input_device_grab)
|
CLUTTER_DEPRECATED_FOR(clutter_input_device_grab)
|
||||||
void clutter_grab_pointer_for_device (ClutterActor *actor,
|
void clutter_grab_pointer_for_device (ClutterActor *actor,
|
||||||
gint id_);
|
gint id_);
|
||||||
|
|
||||||
CLUTTER_DEPRECATED_FOR(clutter_input_device_ungrab)
|
CLUTTER_DEPRECATED_FOR(clutter_input_device_ungrab)
|
||||||
void clutter_ungrab_pointer_for_device (gint id_);
|
void clutter_ungrab_pointer_for_device (gint id_);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED
|
||||||
|
void clutter_set_default_frame_rate (guint frames_per_sec);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -673,7 +673,7 @@ clutter_win32_get_stage_from_window (HWND hwnd)
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ClutterStageWin32 *stage_win32;
|
ClutterStageWin32 *stage_win32;
|
||||||
ClutterGeometry geom;
|
cairo_rectangle_int_t geom;
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
guint destroy_old_hwnd : 1;
|
guint destroy_old_hwnd : 1;
|
||||||
} ForeignWindowData;
|
} ForeignWindowData;
|
||||||
@ -700,7 +700,7 @@ set_foreign_window_callback (ClutterActor *actor,
|
|||||||
fwd->stage_win32->win_width = fwd->geom.width;
|
fwd->stage_win32->win_width = fwd->geom.width;
|
||||||
fwd->stage_win32->win_height = fwd->geom.height;
|
fwd->stage_win32->win_height = fwd->geom.height;
|
||||||
|
|
||||||
clutter_actor_set_geometry (actor, &fwd->geom);
|
clutter_actor_set_size (actor, fwd->geom.width, fwd->geom.height);
|
||||||
|
|
||||||
/* calling this with the stage unrealized will unset the stage
|
/* calling this with the stage unrealized will unset the stage
|
||||||
* from the GL context; once the stage is realized the GL context
|
* from the GL context; once the stage is realized the GL context
|
||||||
|
@ -1269,7 +1269,7 @@ clutter_x11_get_stage_visual (ClutterStage *stage)
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ClutterStageX11 *stage_x11;
|
ClutterStageX11 *stage_x11;
|
||||||
ClutterGeometry geom;
|
cairo_rectangle_int_t geom;
|
||||||
Window xwindow;
|
Window xwindow;
|
||||||
guint destroy_old_xwindow : 1;
|
guint destroy_old_xwindow : 1;
|
||||||
} ForeignWindowData;
|
} ForeignWindowData;
|
||||||
@ -1298,7 +1298,7 @@ set_foreign_window_callback (ClutterActor *actor,
|
|||||||
fwd->stage_x11->xwin_width = fwd->geom.width;
|
fwd->stage_x11->xwin_width = fwd->geom.width;
|
||||||
fwd->stage_x11->xwin_height = fwd->geom.height;
|
fwd->stage_x11->xwin_height = fwd->geom.height;
|
||||||
|
|
||||||
clutter_actor_set_geometry (actor, &fwd->geom);
|
clutter_actor_set_size (actor, fwd->geom.width, fwd->geom.height);
|
||||||
|
|
||||||
if (clutter_stages_by_xid == NULL)
|
if (clutter_stages_by_xid == NULL)
|
||||||
clutter_stages_by_xid = g_hash_table_new (NULL, NULL);
|
clutter_stages_by_xid = g_hash_table_new (NULL, NULL);
|
||||||
|
@ -29,23 +29,16 @@
|
|||||||
#define SIZE 50
|
#define SIZE 50
|
||||||
#define DEPTH -100
|
#define DEPTH -100
|
||||||
|
|
||||||
static const ClutterColor color1 = { 0xff, 0xff, 0x00, 0xff };
|
|
||||||
static const ClutterColor color2 = { 0x00, 0xff, 0x00, 0xff };
|
|
||||||
static const ClutterColor color3 = { 0x00, 0x00, 0xff, 0xff };
|
|
||||||
static const ClutterColor color4 = { 0xff, 0x00, 0xff, 0xff };
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
ClutterActor *stage = NULL;
|
ClutterActor *stage = NULL;
|
||||||
ClutterColor color = { 0x00, 0x00, 0x00, 0xff };
|
|
||||||
ClutterActor *button1 = NULL;
|
ClutterActor *button1 = NULL;
|
||||||
ClutterActor *button2 = NULL;
|
ClutterActor *button2 = NULL;
|
||||||
ClutterActor *button3 = NULL;
|
ClutterActor *button3 = NULL;
|
||||||
ClutterActor *button4 = NULL;
|
ClutterActor *button4 = NULL;
|
||||||
ClutterActor *group[4];
|
ClutterActor *group[4];
|
||||||
ClutterGeometry geom = {0, 0, SIZE, SIZE};
|
int i = 0;
|
||||||
gint i = 0;
|
|
||||||
|
|
||||||
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
return 1;
|
return 1;
|
||||||
@ -54,39 +47,34 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
|
||||||
clutter_stage_set_color (CLUTTER_STAGE (stage), &color);
|
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_White);
|
||||||
clutter_actor_set_size (stage, WIDTH, HEIGHT);
|
clutter_actor_set_size (stage, WIDTH, HEIGHT);
|
||||||
|
|
||||||
button1 = clutter_rectangle_new_with_color (&color1);
|
button1 = clutter_rectangle_new_with_color (CLUTTER_COLOR_Yellow);
|
||||||
clutter_actor_set_geometry (button1, &geom);
|
clutter_actor_set_size (button1, SIZE, SIZE);
|
||||||
|
|
||||||
button2 = clutter_rectangle_new_with_color (&color2);
|
button2 = clutter_rectangle_new_with_color (CLUTTER_COLOR_Green);
|
||||||
geom.x = 2*SIZE;
|
clutter_actor_set_position (button2, 2 * SIZE, 0);
|
||||||
geom.y = 0;
|
clutter_actor_set_size (button2, SIZE, SIZE);
|
||||||
clutter_actor_set_geometry (button2, &geom);
|
|
||||||
|
|
||||||
geom.x = 0;
|
button3 = clutter_rectangle_new_with_color (CLUTTER_COLOR_Blue);
|
||||||
geom.y = 2*SIZE;
|
clutter_actor_set_position (button3, 0, 2 * SIZE);
|
||||||
button3 = clutter_rectangle_new_with_color (&color3);
|
clutter_actor_set_size (button3, SIZE, SIZE);
|
||||||
clutter_actor_set_geometry (button3, &geom);
|
|
||||||
clutter_actor_set_depth( button3, DEPTH);
|
clutter_actor_set_depth( button3, DEPTH);
|
||||||
|
|
||||||
/* a nested hierarchy, to check that the relative positions are
|
/* a nested hierarchy, to check that the relative positions are
|
||||||
computed properly */
|
computed properly */
|
||||||
geom.x = SIZE/2;
|
button4 = clutter_rectangle_new_with_color (CLUTTER_COLOR_Magenta);
|
||||||
geom.y = SIZE/2;
|
clutter_actor_set_position (button4, SIZE / 2, SIZE / 2);
|
||||||
button4 = clutter_rectangle_new_with_color (&color4);
|
clutter_actor_set_size (button4, SIZE, SIZE);
|
||||||
clutter_actor_set_geometry (button4, &geom);
|
|
||||||
clutter_actor_show (button4);
|
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
group[i] = clutter_group_new ();
|
group[i] = clutter_group_new ();
|
||||||
clutter_actor_set_geometry (group[i], &geom);
|
clutter_actor_set_position (group[i], SIZE / 2, SIZE / 2);
|
||||||
|
clutter_actor_set_size (group[i], SIZE, SIZE);
|
||||||
|
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
clutter_container_add_actor (CLUTTER_CONTAINER (group[i]), group [i - 1]);
|
clutter_container_add_actor (CLUTTER_CONTAINER (group[i]), group [i - 1]);
|
||||||
|
|
||||||
clutter_actor_show_all (group[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clutter_container_add_actor (CLUTTER_CONTAINER (stage), button1);
|
clutter_container_add_actor (CLUTTER_CONTAINER (stage), button1);
|
||||||
@ -95,7 +83,7 @@ main (int argc, char *argv[])
|
|||||||
clutter_container_add_actor (CLUTTER_CONTAINER (stage), group[3]);
|
clutter_container_add_actor (CLUTTER_CONTAINER (stage), group[3]);
|
||||||
clutter_container_add_actor (CLUTTER_CONTAINER (group[0]), button4);
|
clutter_container_add_actor (CLUTTER_CONTAINER (group[0]), button4);
|
||||||
|
|
||||||
clutter_actor_show_all (stage);
|
clutter_actor_show (stage);
|
||||||
|
|
||||||
clutter_main ();
|
clutter_main ();
|
||||||
|
|
||||||
|
@ -88,31 +88,32 @@ make_ui (ClutterActor *stage)
|
|||||||
ClutterActor *editable = NULL;
|
ClutterActor *editable = NULL;
|
||||||
ClutterActor *rectangle = NULL;
|
ClutterActor *rectangle = NULL;
|
||||||
ClutterActor *label = NULL;
|
ClutterActor *label = NULL;
|
||||||
ClutterColor color_stage = { 0x00, 0x00, 0x00, 0xff };
|
|
||||||
ClutterColor color_text = { 0xff, 0x00, 0x00, 0xff };
|
ClutterColor color_text = { 0xff, 0x00, 0x00, 0xff };
|
||||||
ClutterColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
ClutterColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
||||||
ClutterColor color_label = { 0x00, 0xff, 0x55, 0xff };
|
ClutterColor color_label = { 0x00, 0xff, 0x55, 0xff };
|
||||||
ClutterColor color_rect = { 0x00, 0xff, 0xff, 0x55 };
|
ClutterColor color_rect = { 0x00, 0xff, 0xff, 0x55 };
|
||||||
ClutterGeometry label_geom = {0, 50, -1, -1};
|
float label_geom_y, editable_geom_y;
|
||||||
ClutterGeometry editable_geom = {150, 50, 500, 75};
|
|
||||||
|
|
||||||
|
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_White);
|
||||||
clutter_stage_set_color (CLUTTER_STAGE (stage), &color_stage);
|
|
||||||
clutter_actor_set_size (stage, WIDTH, HEIGHT);
|
clutter_actor_set_size (stage, WIDTH, HEIGHT);
|
||||||
|
|
||||||
|
label_geom_y = 50;
|
||||||
|
editable_geom_y = 50;
|
||||||
|
|
||||||
for (i = 0; i < NUM_ENTRIES; i++)
|
for (i = 0; i < NUM_ENTRIES; i++)
|
||||||
{
|
{
|
||||||
/* label */
|
/* label */
|
||||||
label = clutter_text_new_full ("Sans Bold 32px",
|
label = clutter_text_new_full ("Sans Bold 32px",
|
||||||
"Entry",
|
"Entry",
|
||||||
&color_label);
|
&color_label);
|
||||||
clutter_actor_set_geometry (label, &label_geom);
|
clutter_actor_set_position (label, 0, label_geom_y);
|
||||||
|
|
||||||
/* editable */
|
/* editable */
|
||||||
editable = clutter_text_new_full ("Sans Bold 32px",
|
editable = clutter_text_new_full ("Sans Bold 32px",
|
||||||
"ddd",
|
"ddd",
|
||||||
&color_text);
|
&color_text);
|
||||||
clutter_actor_set_geometry (editable, &editable_geom);
|
clutter_actor_set_position (editable, 150, editable_geom_y);
|
||||||
|
clutter_actor_set_size (editable, 500, 75);
|
||||||
clutter_text_set_editable (CLUTTER_TEXT (editable), TRUE);
|
clutter_text_set_editable (CLUTTER_TEXT (editable), TRUE);
|
||||||
clutter_text_set_selectable (CLUTTER_TEXT (editable), TRUE);
|
clutter_text_set_selectable (CLUTTER_TEXT (editable), TRUE);
|
||||||
clutter_text_set_selection_color (CLUTTER_TEXT (editable),
|
clutter_text_set_selection_color (CLUTTER_TEXT (editable),
|
||||||
@ -122,14 +123,15 @@ make_ui (ClutterActor *stage)
|
|||||||
|
|
||||||
/* rectangle: to create a entry "feeling" */
|
/* rectangle: to create a entry "feeling" */
|
||||||
rectangle = clutter_rectangle_new_with_color (&color_rect);
|
rectangle = clutter_rectangle_new_with_color (&color_rect);
|
||||||
clutter_actor_set_geometry (rectangle, &editable_geom);
|
clutter_actor_set_position (rectangle, 150, editable_geom_y);
|
||||||
|
clutter_actor_set_size (rectangle, 500, 75);
|
||||||
|
|
||||||
clutter_container_add_actor (CLUTTER_CONTAINER (stage), label);
|
clutter_container_add_actor (CLUTTER_CONTAINER (stage), label);
|
||||||
clutter_container_add_actor (CLUTTER_CONTAINER (stage), editable);
|
clutter_container_add_actor (CLUTTER_CONTAINER (stage), editable);
|
||||||
clutter_container_add_actor (CLUTTER_CONTAINER (stage), rectangle);
|
clutter_container_add_actor (CLUTTER_CONTAINER (stage), rectangle);
|
||||||
|
|
||||||
label_geom.y += HEIGHT_STEP;
|
label_geom_y += HEIGHT_STEP;
|
||||||
editable_geom.y += HEIGHT_STEP;
|
editable_geom_y += HEIGHT_STEP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ make_ui (ClutterActor *stage)
|
|||||||
ClutterColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
ClutterColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
||||||
ClutterColor color_label = { 0x00, 0xff, 0x55, 0xff };
|
ClutterColor color_label = { 0x00, 0xff, 0x55, 0xff };
|
||||||
ClutterColor color_rect = { 0x00, 0xff, 0xff, 0x55 };
|
ClutterColor color_rect = { 0x00, 0xff, 0xff, 0x55 };
|
||||||
ClutterGeometry editable_geom = {150, 50, 100, 75};
|
|
||||||
ClutterActor *full_entry = NULL;
|
ClutterActor *full_entry = NULL;
|
||||||
ClutterActor *cloned_entry = NULL;
|
ClutterActor *cloned_entry = NULL;
|
||||||
|
|
||||||
@ -68,7 +67,8 @@ make_ui (ClutterActor *stage)
|
|||||||
|
|
||||||
/* rectangle: to create a entry "feeling" */
|
/* rectangle: to create a entry "feeling" */
|
||||||
rectangle = clutter_rectangle_new_with_color (&color_rect);
|
rectangle = clutter_rectangle_new_with_color (&color_rect);
|
||||||
clutter_actor_set_geometry (rectangle, &editable_geom);
|
clutter_actor_set_position (rectangle, 150, 50);
|
||||||
|
clutter_actor_add_constraint (rectangle, clutter_bind_constraint_new (editable, CLUTTER_BIND_SIZE, 0));
|
||||||
|
|
||||||
full_entry = clutter_group_new ();
|
full_entry = clutter_group_new ();
|
||||||
clutter_actor_set_position (full_entry, 0, 50);
|
clutter_actor_set_position (full_entry, 0, 50);
|
||||||
|
@ -251,11 +251,14 @@ actor_picking (void)
|
|||||||
ClutterColor color = { x * 255 / (ACTORS_X - 1),
|
ClutterColor color = { x * 255 / (ACTORS_X - 1),
|
||||||
y * 255 / (ACTORS_Y - 1),
|
y * 255 / (ACTORS_Y - 1),
|
||||||
128, 255 };
|
128, 255 };
|
||||||
ClutterGeometry geom = { x * state.actor_width, y * state.actor_height,
|
|
||||||
state.actor_width, state.actor_height };
|
|
||||||
ClutterActor *rect = clutter_rectangle_new_with_color (&color);
|
ClutterActor *rect = clutter_rectangle_new_with_color (&color);
|
||||||
|
|
||||||
clutter_actor_set_geometry (rect, &geom);
|
clutter_actor_set_position (rect,
|
||||||
|
x * state.actor_width,
|
||||||
|
y * state.actor_height);
|
||||||
|
clutter_actor_set_size (rect,
|
||||||
|
state.actor_width,
|
||||||
|
state.actor_height);
|
||||||
|
|
||||||
clutter_container_add (CLUTTER_CONTAINER (state.stage), rect, NULL);
|
clutter_container_add (CLUTTER_CONTAINER (state.stage), rect, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user