Replace ClutterPoint by graphene_point_t

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
This commit is contained in:
Georges Basile Stavracas Neto 2019-02-20 11:53:44 -03:00
parent a06ad3a923
commit eb10b79cb0
No known key found for this signature in database
GPG Key ID: 886C17EE170D1385
44 changed files with 193 additions and 427 deletions

View File

@ -163,7 +163,7 @@ struct _SizeRequest
struct _ClutterLayoutInfo
{
/* fixed position coordinates */
ClutterPoint fixed_pos;
graphene_point_t fixed_pos;
ClutterMargin margin;
@ -209,7 +209,7 @@ struct _ClutterTransformInfo
gfloat z_position;
/* transformation center */
ClutterPoint pivot;
graphene_point_t pivot;
gfloat pivot_z;
CoglMatrix transform;

View File

@ -4401,7 +4401,7 @@ static const ClutterTransformInfo default_transform_info = {
0.f, /* z-position */
CLUTTER_POINT_INIT_ZERO, /* pivot */
GRAPHENE_POINT_INIT_ZERO, /* pivot */
0.f, /* pivot-z */
CLUTTER_MATRIX_INIT_IDENTITY,
@ -4481,7 +4481,7 @@ _clutter_actor_get_transform_info (ClutterActor *self)
static inline void
clutter_actor_set_pivot_point_internal (ClutterActor *self,
const ClutterPoint *pivot)
const graphene_point_t *pivot)
{
ClutterTransformInfo *info;
@ -5058,7 +5058,7 @@ clutter_actor_set_property (GObject *object,
case PROP_POSITION:
{
const ClutterPoint *pos = g_value_get_boxed (value);
const graphene_point_t *pos = g_value_get_boxed (value);
if (pos != NULL)
clutter_actor_set_position (actor, pos->x, pos->y);
@ -5163,10 +5163,10 @@ clutter_actor_set_property (GObject *object,
case PROP_PIVOT_POINT:
{
const ClutterPoint *pivot = g_value_get_boxed (value);
const graphene_point_t *pivot = g_value_get_boxed (value);
if (pivot == NULL)
pivot = clutter_point_zero ();
pivot = graphene_point_zero ();
clutter_actor_set_pivot_point (actor, pivot->x, pivot->y);
}
@ -5412,9 +5412,9 @@ clutter_actor_get_property (GObject *object,
case PROP_POSITION:
{
ClutterPoint position;
graphene_point_t position;
clutter_point_init (&position,
graphene_point_init (&position,
clutter_actor_get_x (actor),
clutter_actor_get_y (actor));
g_value_set_boxed (value, &position);
@ -6417,7 +6417,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
g_param_spec_boxed ("position",
P_("Position"),
P_("The position of the origin of the actor"),
CLUTTER_TYPE_POINT,
GRAPHENE_TYPE_POINT,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS |
CLUTTER_PARAM_ANIMATABLE);
@ -6972,7 +6972,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
g_param_spec_boxed ("pivot-point",
P_("Pivot Point"),
P_("The point around which the scaling and rotation occur"),
CLUTTER_TYPE_POINT,
GRAPHENE_TYPE_POINT,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS |
CLUTTER_PARAM_ANIMATABLE);
@ -10285,17 +10285,17 @@ clutter_actor_set_position (ClutterActor *self,
gfloat x,
gfloat y)
{
ClutterPoint new_position;
ClutterPoint cur_position;
graphene_point_t new_position;
graphene_point_t cur_position;
g_return_if_fail (CLUTTER_IS_ACTOR (self));
clutter_point_init (&new_position, x, y);
graphene_point_init (&new_position, x, y);
cur_position.x = clutter_actor_get_x (self);
cur_position.y = clutter_actor_get_y (self);
if (!clutter_point_equals (&cur_position, &new_position))
if (!graphene_point_equal (&cur_position, &new_position))
_clutter_actor_create_transition (self, obj_props[PROP_POSITION],
&cur_position,
&new_position);
@ -11250,7 +11250,7 @@ clutter_actor_set_y_internal (ClutterActor *self,
static void
clutter_actor_set_position_internal (ClutterActor *self,
const ClutterPoint *position)
const graphene_point_t *position)
{
ClutterActorPrivate *priv = self->priv;
ClutterLayoutInfo *linfo;
@ -11259,7 +11259,7 @@ clutter_actor_set_position_internal (ClutterActor *self,
linfo = _clutter_actor_get_layout_info (self);
if (priv->position_set &&
clutter_point_equals (position, &linfo->fixed_pos))
graphene_point_equal (position, &linfo->fixed_pos))
return;
clutter_actor_store_old_geometry (self, &old);
@ -12078,7 +12078,7 @@ clutter_actor_set_pivot_point (ClutterActor *self,
gfloat pivot_x,
gfloat pivot_y)
{
ClutterPoint pivot = CLUTTER_POINT_INIT (pivot_x, pivot_y);
graphene_point_t pivot = GRAPHENE_POINT_INIT (pivot_x, pivot_y);
const ClutterTransformInfo *info;
g_return_if_fail (CLUTTER_IS_ACTOR (self));
@ -18309,7 +18309,7 @@ clutter_actor_get_layout_manager (ClutterActor *self)
}
static const ClutterLayoutInfo default_layout_info = {
CLUTTER_POINT_INIT_ZERO, /* fixed-pos */
GRAPHENE_POINT_INIT_ZERO, /* fixed-pos */
{ 0, 0, 0, 0 }, /* margin */
CLUTTER_ACTOR_ALIGN_FILL, /* x-align */
CLUTTER_ACTOR_ALIGN_FILL, /* y-align */

View File

@ -94,7 +94,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterMatrix, clutter_matrix_free)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintNode, clutter_paint_node_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintVolume, clutter_paint_volume_free)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPathNode, clutter_path_node_free)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPoint, clutter_point_free)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterRect, clutter_rect_free)
#endif /* __GI_SCANNER__ */

View File

@ -212,194 +212,6 @@ G_DEFINE_BOXED_TYPE (ClutterMargin, clutter_margin,
/*
* ClutterPoint
*/
static const ClutterPoint _clutter_point_zero = CLUTTER_POINT_INIT_ZERO;
/**
* clutter_point_zero:
*
* A point centered at (0, 0).
*
* The returned value can be used as a guard.
*
* Return value: a point centered in (0, 0); the returned #ClutterPoint
* is owned by Clutter and it should not be modified or freed.
*
* Since: 1.12
*/
const ClutterPoint *
clutter_point_zero (void)
{
return &_clutter_point_zero;
}
/**
* clutter_point_alloc: (constructor)
*
* Allocates a new #ClutterPoint.
*
* Return value: (transfer full): the newly allocated #ClutterPoint.
* Use clutter_point_free() to free its resources.
*
* Since: 1.12
*/
ClutterPoint *
clutter_point_alloc (void)
{
return g_slice_new0 (ClutterPoint);
}
/**
* clutter_point_init:
* @point: a #ClutterPoint
* @x: the X coordinate of the point
* @y: the Y coordinate of the point
*
* Initializes @point with the given coordinates.
*
* Return value: (transfer none): the initialized #ClutterPoint
*
* Since: 1.12
*/
ClutterPoint *
clutter_point_init (ClutterPoint *point,
float x,
float y)
{
g_return_val_if_fail (point != NULL, NULL);
point->x = x;
point->y = y;
return point;
}
/**
* clutter_point_copy:
* @point: a #ClutterPoint
*
* Creates a new #ClutterPoint with the same coordinates of @point.
*
* Return value: (transfer full): a newly allocated #ClutterPoint.
* Use clutter_point_free() to free its resources.
*
* Since: 1.12
*/
ClutterPoint *
clutter_point_copy (const ClutterPoint *point)
{
return g_slice_dup (ClutterPoint, point);
}
/**
* clutter_point_free:
* @point: a #ClutterPoint
*
* Frees the resources allocated for @point.
*
* Since: 1.12
*/
void
clutter_point_free (ClutterPoint *point)
{
if (point != NULL && point != &_clutter_point_zero)
g_slice_free (ClutterPoint, point);
}
/**
* clutter_point_equals:
* @a: the first #ClutterPoint to compare
* @b: the second #ClutterPoint to compare
*
* Compares two #ClutterPoint for equality.
*
* Return value: %TRUE if the #ClutterPoints are equal
*
* Since: 1.12
*/
gboolean
clutter_point_equals (const ClutterPoint *a,
const ClutterPoint *b)
{
if (a == b)
return TRUE;
if (a == NULL || b == NULL)
return FALSE;
return fabsf (a->x - b->x) < FLOAT_EPSILON &&
fabsf (a->y - b->y) < FLOAT_EPSILON;
}
/**
* clutter_point_distance:
* @a: a #ClutterPoint
* @b: a #ClutterPoint
* @x_distance: (out) (allow-none): return location for the horizontal
* distance between the points
* @y_distance: (out) (allow-none): return location for the vertical
* distance between the points
*
* Computes the distance between two #ClutterPoint.
*
* Return value: the distance between the points.
*
* Since: 1.12
*/
float
clutter_point_distance (const ClutterPoint *a,
const ClutterPoint *b,
float *x_distance,
float *y_distance)
{
float x_d, y_d;
g_return_val_if_fail (a != NULL, 0.f);
g_return_val_if_fail (b != NULL, 0.f);
if (clutter_point_equals (a, b))
return 0.f;
x_d = (a->x - b->x);
y_d = (a->y - b->y);
if (x_distance != NULL)
*x_distance = fabsf (x_d);
if (y_distance != NULL)
*y_distance = fabsf (y_d);
return sqrt ((x_d * x_d) + (y_d * y_d));
}
static gboolean
clutter_point_progress (const GValue *a,
const GValue *b,
gdouble progress,
GValue *retval)
{
const ClutterPoint *ap = g_value_get_boxed (a);
const ClutterPoint *bp = g_value_get_boxed (b);
ClutterPoint res = CLUTTER_POINT_INIT (0, 0);
res.x = ap->x + (bp->x - ap->x) * progress;
res.y = ap->y + (bp->y - ap->y) * progress;
g_value_set_boxed (retval, &res);
return TRUE;
}
G_DEFINE_BOXED_TYPE_WITH_CODE (ClutterPoint, clutter_point,
clutter_point_copy,
clutter_point_free,
CLUTTER_REGISTER_INTERVAL_PROGRESS (clutter_point_progress))
/*
* ClutterRect
*/
@ -583,7 +395,7 @@ clutter_rect_equals (ClutterRect *a,
clutter_rect_normalize_internal (a);
clutter_rect_normalize_internal (b);
return clutter_point_equals (&a->origin, &b->origin) &&
return graphene_point_equal (&a->origin, &b->origin) &&
graphene_size_equal (&a->size, &b->size);
}
@ -616,7 +428,7 @@ clutter_rect_normalize (ClutterRect *rect)
/**
* clutter_rect_get_center:
* @rect: a #ClutterRect
* @center: (out caller-allocates): a #ClutterPoint
* @center: (out caller-allocates): a #graphene_point_t
*
* Retrieves the center of @rect, after normalizing the rectangle,
* and updates @center with the correct coordinates.
@ -625,7 +437,7 @@ clutter_rect_normalize (ClutterRect *rect)
*/
void
clutter_rect_get_center (ClutterRect *rect,
ClutterPoint *center)
graphene_point_t *center)
{
g_return_if_fail (rect != NULL);
g_return_if_fail (center != NULL);
@ -650,7 +462,7 @@ clutter_rect_get_center (ClutterRect *rect,
*/
gboolean
clutter_rect_contains_point (ClutterRect *rect,
ClutterPoint *point)
graphene_point_t *point)
{
g_return_val_if_fail (rect != NULL, FALSE);
g_return_val_if_fail (point != NULL, FALSE);

View File

@ -370,7 +370,7 @@ clutter_event_get_coords (const ClutterEvent *event,
gfloat *x,
gfloat *y)
{
ClutterPoint coords;
graphene_point_t coords;
g_return_if_fail (event != NULL);
@ -386,15 +386,15 @@ clutter_event_get_coords (const ClutterEvent *event,
/**
* clutter_event_get_position:
* @event: a #ClutterEvent
* @position: a #ClutterPoint
* @position: a #graphene_point_t
*
* Retrieves the event coordinates as a #ClutterPoint.
* Retrieves the event coordinates as a #graphene_point_t.
*
* Since: 1.12
*/
void
clutter_event_get_position (const ClutterEvent *event,
ClutterPoint *position)
graphene_point_t *position)
{
g_return_if_fail (event != NULL);
g_return_if_fail (position != NULL);
@ -415,41 +415,41 @@ clutter_event_get_position (const ClutterEvent *event,
case CLUTTER_PAD_BUTTON_RELEASE:
case CLUTTER_PAD_STRIP:
case CLUTTER_PAD_RING:
clutter_point_init (position, 0.f, 0.f);
graphene_point_init (position, 0.f, 0.f);
break;
case CLUTTER_ENTER:
case CLUTTER_LEAVE:
clutter_point_init (position, event->crossing.x, event->crossing.y);
graphene_point_init (position, event->crossing.x, event->crossing.y);
break;
case CLUTTER_BUTTON_PRESS:
case CLUTTER_BUTTON_RELEASE:
clutter_point_init (position, event->button.x, event->button.y);
graphene_point_init (position, event->button.x, event->button.y);
break;
case CLUTTER_MOTION:
clutter_point_init (position, event->motion.x, event->motion.y);
graphene_point_init (position, event->motion.x, event->motion.y);
break;
case CLUTTER_TOUCH_BEGIN:
case CLUTTER_TOUCH_UPDATE:
case CLUTTER_TOUCH_END:
case CLUTTER_TOUCH_CANCEL:
clutter_point_init (position, event->touch.x, event->touch.y);
graphene_point_init (position, event->touch.x, event->touch.y);
break;
case CLUTTER_SCROLL:
clutter_point_init (position, event->scroll.x, event->scroll.y);
graphene_point_init (position, event->scroll.x, event->scroll.y);
break;
case CLUTTER_TOUCHPAD_PINCH:
clutter_point_init (position, event->touchpad_pinch.x,
graphene_point_init (position, event->touchpad_pinch.x,
event->touchpad_pinch.y);
break;
case CLUTTER_TOUCHPAD_SWIPE:
clutter_point_init (position, event->touchpad_swipe.x,
graphene_point_init (position, event->touchpad_swipe.x,
event->touchpad_swipe.y);
break;
}
@ -1793,12 +1793,12 @@ float
clutter_event_get_distance (const ClutterEvent *source,
const ClutterEvent *target)
{
ClutterPoint p0, p1;
graphene_point_t p0, p1;
clutter_event_get_position (source, &p0);
clutter_event_get_position (source, &p1);
return clutter_point_distance (&p0, &p1, NULL, NULL);
return graphene_point_distance (&p0, &p1, NULL, NULL);
}
/**
@ -1819,17 +1819,17 @@ double
clutter_event_get_angle (const ClutterEvent *source,
const ClutterEvent *target)
{
ClutterPoint p0, p1;
graphene_point_t p0, p1;
float x_distance, y_distance;
double angle;
clutter_event_get_position (source, &p0);
clutter_event_get_position (target, &p1);
if (clutter_point_equals (&p0, &p1))
if (graphene_point_equal (&p0, &p1))
return 0;
clutter_point_distance (&p0, &p1, &x_distance, &y_distance);
graphene_point_distance (&p0, &p1, &x_distance, &y_distance);
angle = atan2 (x_distance, y_distance);

View File

@ -685,7 +685,7 @@ void clutter_event_get_coords (const ClutterEv
gfloat *y);
CLUTTER_EXPORT
void clutter_event_get_position (const ClutterEvent *event,
ClutterPoint *position);
graphene_point_t *position);
CLUTTER_EXPORT
float clutter_event_get_distance (const ClutterEvent *source,
const ClutterEvent *target);

View File

@ -26,6 +26,23 @@
#include "clutter-private.h"
#include "clutter-types.h"
static gboolean
graphene_point_progress (const GValue *a,
const GValue *b,
gdouble progress,
GValue *retval)
{
const graphene_point_t *ap = g_value_get_boxed (a);
const graphene_point_t *bp = g_value_get_boxed (b);
graphene_point_t res;
graphene_point_interpolate (ap, bp, progress, &res);
g_value_set_boxed (retval, &res);
return TRUE;
}
static gboolean
graphene_point3d_progress (const GValue *a,
const GValue *b,
@ -63,6 +80,8 @@ graphene_size_progress (const GValue *a,
void
clutter_graphene_init (void)
{
clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT,
graphene_point_progress);
clutter_interval_register_progress_func (GRAPHENE_TYPE_POINT3D,
graphene_point3d_progress);
clutter_interval_register_progress_func (GRAPHENE_TYPE_SIZE,

View File

@ -986,7 +986,7 @@ clutter_input_device_get_enabled (ClutterInputDevice *device)
gboolean
clutter_input_device_get_coords (ClutterInputDevice *device,
ClutterEventSequence *sequence,
ClutterPoint *point)
graphene_point_t *point)
{
g_return_val_if_fail (CLUTTER_IS_INPUT_DEVICE (device), FALSE);
g_return_val_if_fail (point != NULL, FALSE);
@ -1033,7 +1033,9 @@ _clutter_input_device_update (ClutterInputDevice *device,
ClutterStage *stage;
ClutterActor *new_cursor_actor;
ClutterActor *old_cursor_actor;
ClutterPoint point = { -1, -1 };
graphene_point_t point;
point = GRAPHENE_POINT_INIT (-1.0f, -1.0f);
if (device->device_type == CLUTTER_KEYBOARD_DEVICE)
return NULL;

View File

@ -58,7 +58,7 @@ gint clutter_input_device_get_device_id (ClutterInputDev
CLUTTER_EXPORT
gboolean clutter_input_device_get_coords (ClutterInputDevice *device,
ClutterEventSequence *sequence,
ClutterPoint *point);
graphene_point_t *point);
CLUTTER_EXPORT
ClutterModifierType clutter_input_device_get_modifier_state (ClutterInputDevice *device);
CLUTTER_EXPORT

View File

@ -493,7 +493,7 @@ _clutter_script_parse_color (ClutterScript *script,
static gboolean
parse_point_from_array (JsonArray *array,
ClutterPoint *point)
graphene_point_t *point)
{
if (json_array_get_length (array) != 2)
return FALSE;
@ -506,7 +506,7 @@ parse_point_from_array (JsonArray *array,
static gboolean
parse_point_from_object (JsonObject *object,
ClutterPoint *point)
graphene_point_t *point)
{
if (json_object_has_member (object, "x"))
point->x = json_object_get_double_member (object, "x");
@ -524,7 +524,7 @@ parse_point_from_object (JsonObject *object,
gboolean
_clutter_script_parse_point (ClutterScript *script,
JsonNode *node,
ClutterPoint *point)
graphene_point_t *point)
{
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE);
g_return_val_if_fail (node != NULL, FALSE);
@ -1364,9 +1364,9 @@ _clutter_script_parse_node (ClutterScript *script,
return TRUE;
}
}
else if (p_type == CLUTTER_TYPE_POINT)
else if (p_type == GRAPHENE_TYPE_POINT)
{
ClutterPoint point = CLUTTER_POINT_INIT_ZERO;
graphene_point_t point = GRAPHENE_POINT_INIT_ZERO;
if (_clutter_script_parse_point (script, node, &point))
{
@ -1441,9 +1441,9 @@ _clutter_script_parse_node (ClutterScript *script,
return TRUE;
}
}
else if (G_VALUE_HOLDS (value, CLUTTER_TYPE_POINT))
else if (G_VALUE_HOLDS (value, GRAPHENE_TYPE_POINT))
{
ClutterPoint point = CLUTTER_POINT_INIT_ZERO;
graphene_point_t point = GRAPHENE_POINT_INIT_ZERO;
if (_clutter_script_parse_point (script, node, &point))
{

View File

@ -132,7 +132,7 @@ GObject *_clutter_script_parse_alpha (ClutterScript *script,
JsonNode *node);
gboolean _clutter_script_parse_point (ClutterScript *script,
JsonNode *node,
ClutterPoint *point);
graphene_point_t *point);
gboolean _clutter_script_parse_size (ClutterScript *script,
JsonNode *node,
graphene_size_t *size);

View File

@ -56,7 +56,7 @@
struct _ClutterScrollActorPrivate
{
ClutterPoint scroll_to;
graphene_point_t scroll_to;
ClutterScrollMode scroll_mode;
@ -95,18 +95,18 @@ G_DEFINE_TYPE_WITH_CODE (ClutterScrollActor, clutter_scroll_actor, CLUTTER_TYPE_
static void
clutter_scroll_actor_set_scroll_to_internal (ClutterScrollActor *self,
const ClutterPoint *point)
const graphene_point_t *point)
{
ClutterScrollActorPrivate *priv = self->priv;
ClutterActor *actor = CLUTTER_ACTOR (self);
ClutterMatrix m = CLUTTER_MATRIX_INIT_IDENTITY;
float dx, dy;
if (clutter_point_equals (&priv->scroll_to, point))
if (graphene_point_equal (&priv->scroll_to, point))
return;
if (point == NULL)
clutter_point_init (&priv->scroll_to, 0.f, 0.f);
graphene_point_init (&priv->scroll_to, 0.f, 0.f);
else
priv->scroll_to = *point;
@ -216,7 +216,7 @@ clutter_scroll_actor_set_final_state (ClutterAnimatable *animatable,
if (strcmp (property_name, "scroll-to") == 0)
{
ClutterScrollActor *self = CLUTTER_SCROLL_ACTOR (animatable);
const ClutterPoint *point = g_value_get_boxed (value);
const graphene_point_t *point = g_value_get_boxed (value);
clutter_scroll_actor_set_scroll_to_internal (self, point);
}
@ -248,7 +248,7 @@ clutter_animatable_iface_init (ClutterAnimatableInterface *iface)
g_param_spec_boxed ("scroll-to",
"Scroll To",
"The point to scroll the actor to",
CLUTTER_TYPE_POINT,
GRAPHENE_TYPE_POINT,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS |
CLUTTER_PARAM_ANIMATABLE);
@ -322,7 +322,7 @@ clutter_scroll_actor_get_scroll_mode (ClutterScrollActor *actor)
/**
* clutter_scroll_actor_scroll_to_point:
* @actor: a #ClutterScrollActor
* @point: a #ClutterPoint
* @point: a #graphene_point_t
*
* Scrolls the contents of @actor so that @point is the new origin
* of the visible area.
@ -336,7 +336,7 @@ clutter_scroll_actor_get_scroll_mode (ClutterScrollActor *actor)
*/
void
clutter_scroll_actor_scroll_to_point (ClutterScrollActor *actor,
const ClutterPoint *point)
const graphene_point_t *point)
{
ClutterScrollActorPrivate *priv;
const ClutterAnimationInfo *info;
@ -390,10 +390,10 @@ clutter_scroll_actor_scroll_to_point (ClutterScrollActor *actor,
/* if a transition already exist, update its bounds */
clutter_transition_set_from (priv->transition,
CLUTTER_TYPE_POINT,
GRAPHENE_TYPE_POINT,
&priv->scroll_to);
clutter_transition_set_to (priv->transition,
CLUTTER_TYPE_POINT,
GRAPHENE_TYPE_POINT,
point);
/* always use the current easing state */

View File

@ -87,7 +87,7 @@ ClutterScrollMode clutter_scroll_actor_get_scroll_mode (ClutterScrollAc
CLUTTER_EXPORT
void clutter_scroll_actor_scroll_to_point (ClutterScrollActor *actor,
const ClutterPoint *point);
const graphene_point_t *point);
CLUTTER_EXPORT
void clutter_scroll_actor_scroll_to_rect (ClutterScrollActor *actor,
const ClutterRect *rect);

View File

@ -1164,7 +1164,7 @@ _clutter_stage_check_updated_pointers (ClutterStage *stage)
GSList *updating = NULL;
const GSList *devices;
cairo_rectangle_int_t clip;
ClutterPoint point;
graphene_point_t point;
gboolean has_clip;
has_clip = _clutter_stage_window_get_redraw_clip_bounds (priv->impl, &clip);

View File

@ -273,7 +273,7 @@ clutter_test_run (void)
typedef struct {
ClutterActor *stage;
ClutterPoint point;
graphene_point_t point;
gpointer result;
@ -349,7 +349,7 @@ on_key_press_event (ClutterActor *stage,
*/
gboolean
clutter_test_check_actor_at_point (ClutterActor *stage,
const ClutterPoint *point,
const graphene_point_t *point,
ClutterActor *actor,
ClutterActor **result)
{
@ -411,7 +411,7 @@ clutter_test_check_actor_at_point (ClutterActor *stage,
*/
gboolean
clutter_test_check_color_at_point (ClutterActor *stage,
const ClutterPoint *point,
const graphene_point_t *point,
const ClutterColor *color,
ClutterColor *result)
{

View File

@ -112,7 +112,7 @@ ClutterActor * clutter_test_get_stage (void);
#define clutter_test_assert_actor_at_point(stage,point,actor) \
G_STMT_START { \
const ClutterPoint *__p = (point); \
const graphene_point_t *__p = (point); \
ClutterActor *__actor = (actor); \
ClutterActor *__stage = (stage); \
ClutterActor *__res; \
@ -132,7 +132,7 @@ G_STMT_START { \
#define clutter_test_assert_color_at_point(stage,point,color) \
G_STMT_START { \
const ClutterPoint *__p = (point); \
const graphene_point_t *__p = (point); \
const ClutterColor *__c = (color); \
ClutterActor *__stage = (stage); \
ClutterColor __res; \
@ -150,12 +150,12 @@ G_STMT_START { \
CLUTTER_EXPORT
gboolean clutter_test_check_actor_at_point (ClutterActor *stage,
const ClutterPoint *point,
const graphene_point_t *point,
ClutterActor *actor,
ClutterActor **result);
CLUTTER_EXPORT
gboolean clutter_test_check_color_at_point (ClutterActor *stage,
const ClutterPoint *point,
const graphene_point_t *point,
const ClutterColor *color,
ClutterColor *result);

View File

@ -145,8 +145,8 @@ struct _ClutterTimelinePrivate
ClutterStepMode step_mode;
/* cubic-bezier() parameters */
ClutterPoint cb_1;
ClutterPoint cb_2;
graphene_point_t cb_1;
graphene_point_t cb_2;
guint is_playing : 1;
@ -850,8 +850,8 @@ clutter_timeline_init (ClutterTimeline *self)
self->priv->step_mode = CLUTTER_STEP_MODE_END;
/* default cubic-bezier() paramereters are (0, 0, 1, 1) */
clutter_point_init (&self->priv->cb_1, 0, 0);
clutter_point_init (&self->priv->cb_2, 1, 1);
graphene_point_init (&self->priv->cb_1, 0, 0);
graphene_point_init (&self->priv->cb_2, 1, 1);
}
struct CheckIfMarkerHitClosure
@ -2494,8 +2494,8 @@ clutter_timeline_get_step_progress (ClutterTimeline *timeline,
*/
void
clutter_timeline_set_cubic_bezier_progress (ClutterTimeline *timeline,
const ClutterPoint *c_1,
const ClutterPoint *c_2)
const graphene_point_t *c_1,
const graphene_point_t *c_2)
{
ClutterTimelinePrivate *priv;
@ -2531,8 +2531,8 @@ clutter_timeline_set_cubic_bezier_progress (ClutterTimeline *timeline,
*/
gboolean
clutter_timeline_get_cubic_bezier_progress (ClutterTimeline *timeline,
ClutterPoint *c_1,
ClutterPoint *c_2)
graphene_point_t *c_1,
graphene_point_t *c_2)
{
g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), FALSE);

View File

@ -209,12 +209,12 @@ gboolean clutter_timeline_get_step_progress
ClutterStepMode *step_mode);
CLUTTER_EXPORT
void clutter_timeline_set_cubic_bezier_progress (ClutterTimeline *timeline,
const ClutterPoint *c_1,
const ClutterPoint *c_2);
const graphene_point_t *c_1,
const graphene_point_t *c_2);
CLUTTER_EXPORT
gboolean clutter_timeline_get_cubic_bezier_progress (ClutterTimeline *timeline,
ClutterPoint *c_1,
ClutterPoint *c_2);
graphene_point_t *c_1,
graphene_point_t *c_2);
CLUTTER_EXPORT
gint64 clutter_timeline_get_duration_hint (ClutterTimeline *timeline);

View File

@ -44,7 +44,6 @@ G_BEGIN_DECLS
#define CLUTTER_TYPE_MATRIX (clutter_matrix_get_type ())
#define CLUTTER_TYPE_PAINT_VOLUME (clutter_paint_volume_get_type ())
#define CLUTTER_TYPE_PERSPECTIVE (clutter_perspective_get_type ())
#define CLUTTER_TYPE_POINT (clutter_point_get_type ())
#define CLUTTER_TYPE_RECT (clutter_rect_get_type ())
typedef struct _ClutterActor ClutterActor;
@ -82,7 +81,6 @@ typedef struct _ClutterGeometry ClutterGeometry; /* XXX:2.0 - re
typedef struct _ClutterKnot ClutterKnot;
typedef struct _ClutterMargin ClutterMargin;
typedef struct _ClutterPerspective ClutterPerspective;
typedef struct _ClutterPoint ClutterPoint;
typedef struct _ClutterRect ClutterRect;
typedef struct _ClutterAlpha ClutterAlpha;
@ -133,70 +131,6 @@ typedef struct _ClutterShader ClutterShader; /* deprecated */
*/
typedef struct _ClutterPaintVolume ClutterPaintVolume;
/**
* ClutterPoint:
* @x: X coordinate, in pixels
* @y: Y coordinate, in pixels
*
* A point in 2D space.
*
* Since: 1.12
*/
struct _ClutterPoint
{
float x;
float y;
};
/**
* CLUTTER_POINT_INIT:
* @x: X coordinate
* @y: Y coordinate
*
* A simple macro for initializing a #ClutterPoint when declaring it, e.g.:
*
* |[
* ClutterPoint p = CLUTTER_POINT_INIT (100, 100);
* ]|
*
* Since: 1.12
*/
#define CLUTTER_POINT_INIT(x,y) { (x), (y) }
/**
* CLUTTER_POINT_INIT_ZERO:
*
* A simple macro for initializing a #ClutterPoint to (0, 0) when
* declaring it.
*
* Since: 1.12
*/
#define CLUTTER_POINT_INIT_ZERO CLUTTER_POINT_INIT (0.f, 0.f)
CLUTTER_EXPORT
GType clutter_point_get_type (void) G_GNUC_CONST;
CLUTTER_EXPORT
const ClutterPoint * clutter_point_zero (void);
CLUTTER_EXPORT
ClutterPoint * clutter_point_alloc (void);
CLUTTER_EXPORT
ClutterPoint * clutter_point_init (ClutterPoint *point,
float x,
float y);
CLUTTER_EXPORT
ClutterPoint * clutter_point_copy (const ClutterPoint *point);
CLUTTER_EXPORT
void clutter_point_free (ClutterPoint *point);
CLUTTER_EXPORT
gboolean clutter_point_equals (const ClutterPoint *a,
const ClutterPoint *b);
CLUTTER_EXPORT
float clutter_point_distance (const ClutterPoint *a,
const ClutterPoint *b,
float *x_distance,
float *y_distance);
/**
* ClutterRect:
* @origin: the origin of the rectangle
@ -220,7 +154,7 @@ float clutter_point_distance (const ClutterPoint *a,
*/
struct _ClutterRect
{
ClutterPoint origin;
graphene_point_t origin;
graphene_size_t size;
};
@ -276,10 +210,10 @@ CLUTTER_EXPORT
ClutterRect * clutter_rect_normalize (ClutterRect *rect);
CLUTTER_EXPORT
void clutter_rect_get_center (ClutterRect *rect,
ClutterPoint *center);
graphene_point_t *center);
CLUTTER_EXPORT
gboolean clutter_rect_contains_point (ClutterRect *rect,
ClutterPoint *point);
graphene_point_t *point);
CLUTTER_EXPORT
gboolean clutter_rect_contains_rect (ClutterRect *a,
ClutterRect *b);

View File

@ -80,9 +80,9 @@ struct _ClutterZoomActionPrivate
ZoomPoint points[2];
ClutterPoint initial_focal_point;
ClutterPoint focal_point;
ClutterPoint transformed_focal_point;
graphene_point_t initial_focal_point;
graphene_point_t focal_point;
graphene_point_t transformed_focal_point;
gfloat initial_x;
gfloat initial_y;
@ -238,7 +238,7 @@ clutter_zoom_action_gesture_cancel (ClutterGestureAction *action,
static gboolean
clutter_zoom_action_real_zoom (ClutterZoomAction *action,
ClutterActor *actor,
ClutterPoint *focal_point,
graphene_point_t *focal_point,
gdouble factor)
{
ClutterZoomActionPrivate *priv = action->priv;
@ -400,7 +400,7 @@ clutter_zoom_action_class_init (ClutterZoomActionClass *klass)
_clutter_marshal_BOOLEAN__OBJECT_BOXED_DOUBLE,
G_TYPE_BOOLEAN, 3,
CLUTTER_TYPE_ACTOR,
CLUTTER_TYPE_POINT,
GRAPHENE_TYPE_POINT,
G_TYPE_DOUBLE);
}
@ -478,7 +478,7 @@ clutter_zoom_action_get_zoom_axis (ClutterZoomAction *action)
/**
* clutter_zoom_action_get_focal_point:
* @action: a #ClutterZoomAction
* @point: (out): a #ClutterPoint
* @point: (out): a #graphene_point_t
*
* Retrieves the focal point of the current zoom
*
@ -486,7 +486,7 @@ clutter_zoom_action_get_zoom_axis (ClutterZoomAction *action)
*/
void
clutter_zoom_action_get_focal_point (ClutterZoomAction *action,
ClutterPoint *point)
graphene_point_t *point)
{
g_return_if_fail (CLUTTER_IS_ZOOM_ACTION (action));
g_return_if_fail (point != NULL);
@ -497,7 +497,7 @@ clutter_zoom_action_get_focal_point (ClutterZoomAction *action,
/**
* clutter_zoom_action_get_transformed_focal_point:
* @action: a #ClutterZoomAction
* @point: (out): a #ClutterPoint
* @point: (out): a #graphene_point_t
*
* Retrieves the focal point relative to the actor's coordinates of
* the current zoom
@ -506,7 +506,7 @@ clutter_zoom_action_get_focal_point (ClutterZoomAction *action,
*/
void
clutter_zoom_action_get_transformed_focal_point (ClutterZoomAction *action,
ClutterPoint *point)
graphene_point_t *point)
{
g_return_if_fail (CLUTTER_IS_ZOOM_ACTION (action));
g_return_if_fail (point != NULL);

View File

@ -79,7 +79,7 @@ struct _ClutterZoomActionClass
/*< public >*/
gboolean (* zoom) (ClutterZoomAction *action,
ClutterActor *actor,
ClutterPoint *focal_point,
graphene_point_t *focal_point,
gdouble factor);
/*< private >*/
@ -104,10 +104,10 @@ ClutterZoomAxis clutter_zoom_action_get_zoom_axis (ClutterZoomActi
CLUTTER_EXPORT
void clutter_zoom_action_get_focal_point (ClutterZoomAction *action,
ClutterPoint *point);
graphene_point_t *point);
CLUTTER_EXPORT
void clutter_zoom_action_get_transformed_focal_point (ClutterZoomAction *action,
ClutterPoint *point);
graphene_point_t *point);
G_END_DECLS

View File

@ -405,7 +405,7 @@ notify_pinch_gesture_event (ClutterInputDevice *input_device,
ClutterSeatEvdev *seat;
ClutterStage *stage;
ClutterEvent *event = NULL;
ClutterPoint pos;
graphene_point_t pos;
/* We can drop the event on the floor if no stage has been
* associated with the device yet. */
@ -452,7 +452,7 @@ notify_swipe_gesture_event (ClutterInputDevice *input_device,
ClutterSeatEvdev *seat;
ClutterStage *stage;
ClutterEvent *event = NULL;
ClutterPoint pos;
graphene_point_t pos;
/* We can drop the event on the floor if no stage has been
* associated with the device yet. */

View File

@ -568,7 +568,7 @@ clutter_seat_evdev_notify_button (ClutterSeatEvdev *seat,
if (clutter_input_device_get_device_type (input_device) == CLUTTER_TABLET_DEVICE)
{
ClutterPoint point;
graphene_point_t point;
clutter_input_device_get_coords (input_device, NULL, &point);
event->button.x = point.x;

View File

@ -42,7 +42,7 @@ struct _ClutterTouchState
int device_slot;
int seat_slot;
ClutterPoint coords;
graphene_point_t coords;
};
struct _ClutterSeatEvdev

View File

@ -6,7 +6,7 @@ actor_basic_layout (void)
ClutterActor *stage = clutter_test_get_stage ();
ClutterActor *vase;
ClutterActor *flower[3];
ClutterPoint p;
graphene_point_t p;
vase = clutter_actor_new ();
clutter_actor_set_name (vase, "Vase");
@ -31,13 +31,13 @@ actor_basic_layout (void)
clutter_actor_set_name (flower[2], "Green Flower");
clutter_actor_add_child (vase, flower[2]);
clutter_point_init (&p, 50, 50);
graphene_point_init (&p, 50, 50);
clutter_test_assert_actor_at_point (stage, &p, flower[0]);
clutter_point_init (&p, 150, 50);
graphene_point_init (&p, 150, 50);
clutter_test_assert_actor_at_point (stage, &p, flower[1]);
clutter_point_init (&p, 250, 50);
graphene_point_init (&p, 250, 50);
clutter_test_assert_actor_at_point (stage, &p, flower[2]);
}
@ -47,7 +47,7 @@ actor_margin_layout (void)
ClutterActor *stage = clutter_test_get_stage ();
ClutterActor *vase;
ClutterActor *flower[3];
ClutterPoint p;
graphene_point_t p;
vase = clutter_actor_new ();
clutter_actor_set_name (vase, "Vase");
@ -76,13 +76,13 @@ actor_margin_layout (void)
clutter_actor_set_margin_bottom (flower[2], 6);
clutter_actor_add_child (vase, flower[2]);
clutter_point_init (&p, 0, 7);
graphene_point_init (&p, 0, 7);
clutter_test_assert_actor_at_point (stage, &p, flower[0]);
clutter_point_init (&p, 106, 50);
graphene_point_init (&p, 106, 50);
clutter_test_assert_actor_at_point (stage, &p, flower[1]);
clutter_point_init (&p, 212, 7);
graphene_point_init (&p, 212, 7);
clutter_test_assert_actor_at_point (stage, &p, flower[2]);
}

View File

@ -240,7 +240,7 @@ input_cb (ClutterActor *actor,
{
ClutterActor *stage = clutter_actor_get_stage (actor);
ClutterActor *source_actor = clutter_event_get_source (event);
ClutterPoint position;
graphene_point_t position;
gchar *state;
gchar keybuf[128];
gint device_id;

View File

@ -232,7 +232,7 @@ meta_backend_monitors_changed (MetaBackend *backend)
meta_backend_get_monitor_manager (backend);
ClutterDeviceManager *manager = clutter_device_manager_get_default ();
ClutterInputDevice *device = clutter_device_manager_get_core_device (manager, CLUTTER_POINTER_DEVICE);
ClutterPoint point;
graphene_point_t point;
meta_backend_sync_screen_size (backend);

View File

@ -284,13 +284,13 @@ meta_cursor_renderer_set_position (MetaCursorRenderer *renderer,
meta_cursor_renderer_update_cursor (renderer, priv->displayed_cursor);
}
ClutterPoint
graphene_point_t
meta_cursor_renderer_get_position (MetaCursorRenderer *renderer)
{
MetaCursorRendererPrivate *priv =
meta_cursor_renderer_get_instance_private (renderer);
return (ClutterPoint) {
return (graphene_point_t) {
.x = priv->current_x,
.y = priv->current_y
};

View File

@ -62,7 +62,7 @@ void meta_cursor_renderer_set_cursor (MetaCursorRenderer *renderer,
void meta_cursor_renderer_set_position (MetaCursorRenderer *renderer,
float x,
float y);
ClutterPoint meta_cursor_renderer_get_position (MetaCursorRenderer *renderer);
graphene_point_t meta_cursor_renderer_get_position (MetaCursorRenderer *renderer);
void meta_cursor_renderer_force_update (MetaCursorRenderer *renderer);
MetaCursorSprite * meta_cursor_renderer_get_cursor (MetaCursorRenderer *renderer);

View File

@ -387,7 +387,7 @@ get_pointer_position_clutter (int *x,
{
ClutterDeviceManager *cmanager;
ClutterInputDevice *cdevice;
ClutterPoint point;
graphene_point_t point;
cmanager = clutter_device_manager_get_default ();
cdevice = clutter_device_manager_get_core_device (cmanager, CLUTTER_POINTER_DEVICE);

View File

@ -164,7 +164,7 @@ is_cursor_in_stream (MetaScreenCastMonitorStreamSrc *monitor_src)
}
else
{
ClutterPoint cursor_position;
graphene_point_t cursor_position;
cursor_position = meta_cursor_renderer_get_position (cursor_renderer);
return clutter_rect_contains_point (&logical_monitor_rect,
@ -361,7 +361,7 @@ meta_screen_cast_monitor_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc
ClutterRect logical_monitor_rect;
MetaRendererView *view;
float view_scale;
ClutterPoint cursor_position;
graphene_point_t cursor_position;
int x, y;
cursor_sprite = meta_cursor_renderer_get_cursor (cursor_renderer);

View File

@ -114,8 +114,8 @@ maybe_draw_cursor_sprite (MetaScreenCastWindowStreamSrc *window_src,
MetaCursorSprite *cursor_sprite;
CoglTexture *cursor_texture;
MetaScreenCastWindow *screen_cast_window;
ClutterPoint cursor_position;
ClutterPoint relative_cursor_position;
graphene_point_t cursor_position;
graphene_point_t relative_cursor_position;
cairo_surface_t *cursor_surface;
uint8_t *cursor_surface_data;
GError *error = NULL;
@ -316,7 +316,7 @@ is_cursor_in_stream (MetaScreenCastWindowStreamSrc *window_src)
MetaCursorRenderer *cursor_renderer =
meta_backend_get_cursor_renderer (backend);
MetaCursorSprite *cursor_sprite;
ClutterPoint cursor_position;
graphene_point_t cursor_position;
MetaScreenCastWindow *screen_cast_window;
cursor_sprite = meta_cursor_renderer_get_cursor (cursor_renderer);
@ -446,9 +446,9 @@ meta_screen_cast_window_stream_src_set_cursor_metadata (MetaScreenCastStreamSrc
meta_backend_get_cursor_renderer (backend);
MetaScreenCastWindow *screen_cast_window = window_src->screen_cast_window;
MetaCursorSprite *cursor_sprite;
ClutterPoint cursor_position;
graphene_point_t cursor_position;
float scale;
ClutterPoint relative_cursor_position;
graphene_point_t relative_cursor_position;
int x, y;
cursor_sprite = meta_cursor_renderer_get_cursor (cursor_renderer);

View File

@ -54,9 +54,9 @@ meta_screen_cast_window_transform_relative_position (MetaScreenCastWindow *scree
gboolean
meta_screen_cast_window_transform_cursor_position (MetaScreenCastWindow *screen_cast_window,
MetaCursorSprite *cursor_sprite,
ClutterPoint *cursor_position,
graphene_point_t *cursor_position,
float *out_cursor_scale,
ClutterPoint *out_relative_cursor_position)
graphene_point_t *out_relative_cursor_position)
{
MetaScreenCastWindowInterface *iface =
META_SCREEN_CAST_WINDOW_GET_IFACE (screen_cast_window);

View File

@ -48,9 +48,9 @@ struct _MetaScreenCastWindowInterface
gboolean (*transform_cursor_position) (MetaScreenCastWindow *screen_cast_window,
MetaCursorSprite *cursor_sprite,
ClutterPoint *cursor_position,
graphene_point_t *cursor_position,
float *out_cursor_scale,
ClutterPoint *out_relative_cursor_position);
graphene_point_t *out_relative_cursor_position);
void (*capture_into) (MetaScreenCastWindow *screen_cast_window,
MetaRectangle *bounds,
@ -70,9 +70,9 @@ void meta_screen_cast_window_transform_relative_position (MetaScreenCastWindow *
gboolean meta_screen_cast_window_transform_cursor_position (MetaScreenCastWindow *screen_cast_window,
MetaCursorSprite *cursor_sprite,
ClutterPoint *cursor_position,
graphene_point_t *cursor_position,
float *out_cursor_scale,
ClutterPoint *out_relative_cursor_position);
graphene_point_t *out_relative_cursor_position);
void meta_screen_cast_window_capture_into (MetaScreenCastWindow *screen_cast_window,
MetaRectangle *bounds,

View File

@ -140,7 +140,7 @@ constrain_all_screen_monitors (ClutterInputDevice *device,
float *x,
float *y)
{
ClutterPoint current;
graphene_point_t current;
float cx, cy;
GList *logical_monitors, *l;

View File

@ -468,7 +468,7 @@ meta_barrier_manager_native_process (MetaBarrierManagerNative *manager,
float *x,
float *y)
{
ClutterPoint prev_pos;
graphene_point_t prev_pos;
float prev_x;
float prev_y;
float orig_x = *x;

View File

@ -207,7 +207,7 @@ meta_dnd_actor_drag_finish (MetaDnDActor *self,
if (CLUTTER_ACTOR_IS_VISIBLE (self->drag_origin))
{
int anchor_x, anchor_y;
ClutterPoint dest;
graphene_point_t dest;
clutter_actor_get_transformed_position (self->drag_origin,
&dest.x, &dest.y);

View File

@ -240,7 +240,7 @@ void
meta_feedback_actor_update (MetaFeedbackActor *self,
const ClutterEvent *event)
{
ClutterPoint point;
graphene_point_t point;
g_return_if_fail (META_IS_FEEDBACK_ACTOR (self));
g_return_if_fail (event != NULL);

View File

@ -1911,9 +1911,9 @@ meta_window_actor_transform_relative_position (MetaScreenCastWindow *screen_cast
static gboolean
meta_window_actor_transform_cursor_position (MetaScreenCastWindow *screen_cast_window,
MetaCursorSprite *cursor_sprite,
ClutterPoint *cursor_position,
graphene_point_t *cursor_position,
float *out_cursor_scale,
ClutterPoint *out_relative_cursor_position)
graphene_point_t *out_relative_cursor_position)
{
MetaWindowActor *window_actor = META_WINDOW_ACTOR (screen_cast_window);
MetaWindowActorPrivate *priv =

View File

@ -622,7 +622,7 @@ meta_pointer_confinement_wayland_maybe_warp (MetaPointerConfinementWayland *self
{
MetaWaylandSeat *seat;
MetaWaylandSurface *surface;
ClutterPoint point;
graphene_point_t point;
float sx;
float sy;
cairo_region_t *region;

View File

@ -185,7 +185,7 @@ meta_wayland_cursor_surface_is_on_logical_monitor (MetaWaylandSurfaceRole *role,
META_WAYLAND_CURSOR_SURFACE (surface->role);
MetaWaylandCursorSurfacePrivate *priv =
meta_wayland_cursor_surface_get_instance_private (cursor_surface);
ClutterPoint point;
graphene_point_t point;
ClutterRect logical_monitor_rect;
logical_monitor_rect =

View File

@ -1101,7 +1101,7 @@ meta_wayland_data_device_start_drag (MetaWaylandDataDevice *data
{
MetaWaylandSeat *seat = wl_container_of (data_device, seat, data_device);
MetaWaylandDragGrab *drag_grab;
ClutterPoint pos, surface_pos;
graphene_point_t pos, surface_pos;
ClutterModifierType modifiers;
MetaSurfaceActor *surface_actor;

View File

@ -891,7 +891,7 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
if (surface != NULL)
{
struct wl_client *client = wl_resource_get_client (surface->resource);
ClutterPoint pos;
graphene_point_t pos;
pointer->focus_surface = surface;
@ -1004,7 +1004,7 @@ meta_wayland_pointer_get_relative_coordinates (MetaWaylandPointer *pointer,
wl_fixed_t *sy)
{
float xf = 0.0f, yf = 0.0f;
ClutterPoint pos;
graphene_point_t pos;
clutter_input_device_get_coords (pointer->device, NULL, &pos);
meta_wayland_surface_get_relative_coordinates (surface, pos.x, pos.y, &xf, &yf);

View File

@ -993,7 +993,7 @@ meta_x11_drag_dest_update (MetaWaylandDataDevice *data_device,
{
MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
MetaWaylandSeat *seat = compositor->seat;
ClutterPoint pos;
graphene_point_t pos;
clutter_input_device_get_coords (seat->pointer->device, NULL, &pos);
xdnd_send_position (compositor->xwayland_manager.selection_data,
@ -1342,7 +1342,7 @@ pick_drop_surface (MetaWaylandCompositor *compositor,
{
MetaDisplay *display = meta_get_display ();
MetaWindow *focus_window = NULL;
ClutterPoint pos;
graphene_point_t pos;
clutter_event_get_coords (event, &pos.x, &pos.y);
focus_window = meta_stack_get_default_focus_window_at_point (display->stack,
@ -1532,7 +1532,7 @@ meta_xwayland_selection_handle_client_message (MetaWaylandCompositor *compositor
else if (event->message_type == xdnd_atoms[ATOM_DND_POSITION])
{
ClutterEvent *motion;
ClutterPoint pos;
graphene_point_t pos;
uint32_t action = 0;
dnd->selection.client_message_timestamp = event->data.l[3];