summaryrefslogtreecommitdiff
path: root/clutter/egl/clutter-stage-eglnative.c
diff options
context:
space:
mode:
Diffstat (limited to 'clutter/egl/clutter-stage-eglnative.c')
-rw-r--r--clutter/egl/clutter-stage-eglnative.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/clutter/egl/clutter-stage-eglnative.c b/clutter/egl/clutter-stage-eglnative.c
index d7484bb96..1bb18386d 100644
--- a/clutter/egl/clutter-stage-eglnative.c
+++ b/clutter/egl/clutter-stage-eglnative.c
@@ -31,6 +31,7 @@
#include "clutter-stage-window.h"
#include "clutter-stage-private.h"
#include "clutter-stage-eglnative.h"
+#include "clutter-egl.h"
#include <cogl/cogl.h>
static ClutterStageWindowIface *clutter_stage_window_parent_iface = NULL;
@@ -68,3 +69,70 @@ clutter_stage_window_iface_init (ClutterStageWindowIface *iface)
iface->can_clip_redraws = clutter_stage_eglnative_can_clip_redraws;
}
+
+struct _ClutterEglOutput
+{
+ ClutterStageCoglView parent_instance;
+};
+
+struct _ClutterEglOutputClass
+{
+ ClutterStageCoglViewClass parent_instance;
+};
+
+G_DEFINE_TYPE (ClutterEglOutput, clutter_egl_output,
+ CLUTTER_TYPE_STAGE_COGL_VIEW)
+
+static void
+clutter_egl_output_init (ClutterEglOutput *output)
+{
+}
+
+static void
+clutter_egl_output_class_init (ClutterEglOutputClass *klass)
+{
+}
+
+ClutterEglOutput *
+clutter_egl_stage_add_output (ClutterStage *stage)
+{
+ ClutterStageWindow *stage_window;
+ ClutterStageCogl *stage_cogl;
+ ClutterEglOutput *output;
+
+ stage_window = _clutter_stage_get_window (stage);
+ stage_cogl = CLUTTER_STAGE_COGL (stage_window);
+
+ output = g_object_new (clutter_egl_output_get_type (), NULL);
+ clutter_stage_cogl_add_view (stage_cogl, CLUTTER_STAGE_COGL_VIEW (output));
+ return output;
+}
+
+ClutterEglOutput *
+clutter_egl_stage_remove_output (ClutterStage *stage,
+ ClutterEglOutput *output)
+{
+ ClutterStageWindow *stage_window;
+ ClutterStageCogl *stage_cogl;
+
+ stage_window = _clutter_stage_get_window (stage);
+ stage_cogl = CLUTTER_STAGE_COGL (stage_window);
+
+ output = g_object_new (clutter_egl_output_get_type (), NULL);
+ clutter_stage_cogl_add_view (stage_cogl, CLUTTER_STAGE_COGL_VIEW (output));
+}
+
+void
+clutter_egl_output_set_rect (ClutterEglOutput *output,
+ const cairo_rectangle_int_t *rect)
+{
+ clutter_stage_cogl_view_set_rect (CLUTTER_STAGE_COGL_VIEW (output), rect);
+}
+
+void
+clutter_egl_output_set_transform (ClutterEglOutput *output,
+ ClutterEglOutputTransform transform)
+{
+ clutter_stage_cogl_view_set_transform (CLUTTER_STAGE_COGL_VIEW (output),
+ transform);
+}