[totem] backend: Add a way to rotate without animations



commit a55fedc84a255d742144dabec85e58147bab0edc
Author: Bastien Nocera <hadess hadess net>
Date:   Fri May 30 16:22:26 2014 +0200

    backend: Add a way to rotate without animations

 src/backend/totem-aspect-frame.c |   12 ++++++++++++
 src/backend/totem-aspect-frame.h |    3 +++
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/totem-aspect-frame.c b/src/backend/totem-aspect-frame.c
index 7e72e08..c352717 100644
--- a/src/backend/totem-aspect-frame.c
+++ b/src/backend/totem-aspect-frame.c
@@ -437,6 +437,18 @@ totem_aspect_frame_set_rotation (TotemAspectFrame *frame,
   totem_aspect_frame_set_rotation_internal (frame, rotation, TRUE);
 }
 
+void
+totem_aspect_frame_set_internal_rotation (TotemAspectFrame *frame,
+                                         gdouble           rotation)
+{
+  g_return_if_fail (TOTEM_IS_ASPECT_FRAME (frame));
+
+  rotation = fmod (rotation, 360.0);
+
+  frame->priv->rotation = rotation;
+  totem_aspect_frame_set_rotation_internal (frame, rotation, FALSE);
+}
+
 gdouble
 totem_aspect_frame_get_rotation (TotemAspectFrame *frame)
 {
diff --git a/src/backend/totem-aspect-frame.h b/src/backend/totem-aspect-frame.h
index 4ed8408..3371cf8 100644
--- a/src/backend/totem-aspect-frame.h
+++ b/src/backend/totem-aspect-frame.h
@@ -80,6 +80,9 @@ gboolean        totem_aspect_frame_get_expand   (TotemAspectFrame *frame);
 
 void            totem_aspect_frame_set_rotation (TotemAspectFrame *frame,
                                                 gdouble           rotation);
+void            totem_aspect_frame_set_internal_rotation
+                                               (TotemAspectFrame *frame,
+                                                gdouble           rotation);
 gdouble         totem_aspect_frame_get_rotation (TotemAspectFrame *frame);
 
 G_END_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]