Commit 4abca411 authored by Jonas Ådahl's avatar Jonas Ådahl

clutter/stage: Expose stage view getter helper as API

Non-introspected and private to mutter, for getting a stage view from a
coordinate.

!610
parent e48c7c00
...@@ -43,6 +43,11 @@ void clutter_stage_capture_into (ClutterStage *stage, ...@@ -43,6 +43,11 @@ void clutter_stage_capture_into (ClutterStage *stage,
cairo_rectangle_int_t *rect, cairo_rectangle_int_t *rect,
uint8_t *data); uint8_t *data);
CLUTTER_EXPORT
ClutterStageView * clutter_stage_get_view_at (ClutterStage *stage,
float x,
float y);
CLUTTER_EXPORT CLUTTER_EXPORT
void clutter_stage_freeze_updates (ClutterStage *stage); void clutter_stage_freeze_updates (ClutterStage *stage);
......
...@@ -1586,10 +1586,13 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage, ...@@ -1586,10 +1586,13 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
return retval; return retval;
} }
static ClutterStageView * /**
get_view_at (ClutterStage *stage, * clutter_stage_get_view_at: (skip)
float x, */
float y) ClutterStageView *
clutter_stage_get_view_at (ClutterStage *stage,
float x,
float y)
{ {
ClutterStagePrivate *priv = stage->priv; ClutterStagePrivate *priv = stage->priv;
GList *l; GList *l;
...@@ -1636,7 +1639,7 @@ _clutter_stage_do_pick (ClutterStage *stage, ...@@ -1636,7 +1639,7 @@ _clutter_stage_do_pick (ClutterStage *stage,
if (x < 0 || x >= stage_width || y < 0 || y >= stage_height) if (x < 0 || x >= stage_width || y < 0 || y >= stage_height)
return actor; return actor;
view = get_view_at (stage, x, y); view = clutter_stage_get_view_at (stage, x, y);
if (view) if (view)
return _clutter_stage_do_pick_on_view (stage, x, y, mode, view); return _clutter_stage_do_pick_on_view (stage, x, y, mode, view);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment