[gtk+/wip/actor: 6/42] xxx: actor



commit 3ea15de983ea52f9283c33204e9960c1d09becc3
Author: Benjamin Otte <otte redhat com>
Date:   Sat Dec 8 19:24:55 2012 +0100

    xxx: actor

 gtk/actors/gtkactor.c        |   23 ++++++++++++++++++++++-
 gtk/actors/gtkactorprivate.h |    7 +++++--
 2 files changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/gtk/actors/gtkactor.c b/gtk/actors/gtkactor.c
index 9e4c9bd..40463ae 100644
--- a/gtk/actors/gtkactor.c
+++ b/gtk/actors/gtkactor.c
@@ -2233,7 +2233,7 @@ _gtk_actor_get_height (GtkActor *self)
 
 /**
  * _gtk_actor_allocate:
- * @self: A #ClutterActor
+ * @self: A #GtkActor
  * @width: new width of the actor
  * @height: new width of the actor
  *
@@ -2258,3 +2258,24 @@ _gtk_actor_allocate (GtkActor *self,
   GTK_ACTOR_GET_CLASS (self)->allocate (self, width, height);
 }
 
+/**
+ * _gtk_actor_get_screen:
+ * @self: a #GtkActor
+ *
+ * Get the #GdkScreen from the toplevel actor associated with
+ * this actor.
+ *
+ * In general, you should only create screen specific
+ * resources when an actor has been realized, and you should
+ * free those resources when the actor is unrealized.
+ *
+ * Return value: (transfer none): the #GdkScreen for the toplevel for this actor.
+ *
+ * Since: 2.2
+ **/
+GdkScreen *
+_gtk_actor_get_screen (GtkActor *self)
+{
+  /* FIXME */
+  return gdk_screen_get_default ();
+}
diff --git a/gtk/actors/gtkactorprivate.h b/gtk/actors/gtkactorprivate.h
index 6b28813..9bc0175 100644
--- a/gtk/actors/gtkactorprivate.h
+++ b/gtk/actors/gtkactorprivate.h
@@ -22,8 +22,8 @@
 #ifndef __GTK_ACTOR_PRIVATE_H__
 #define __GTK_ACTOR_PRIVATE_H__
 
-#include <glib-object.h>
 #include <cairo.h>
+#include <gdk/gdk.h>
 #include <gtk/gtkenums.h>
 
 G_BEGIN_DECLS
@@ -68,7 +68,7 @@ struct _GtkActorClass
   GtkSizeRequestMode    (* get_request_mode)     (GtkActor                 *self);
   void                  (* get_preferred_size)   (GtkActor                 *self,
                                                   GtkOrientation            orientation,
-                                                  gfloat                    for_width,
+                                                  gfloat                    for_size,
                                                   gfloat                   *min_size_p,
                                                   gfloat                   *natural_size_p);
   void                  (* position)             (GtkActor                 *self,
@@ -141,6 +141,9 @@ void                            _gtk_actor_set_text_direction
                                                                                  GtkTextDirection            text_dir);
 GtkTextDirection                _gtk_actor_get_text_direction                   (GtkActor                   *self);
 
+/* GDK integration */
+GdkScreen *                     _gtk_actor_get_screen                           (GtkActor                   *self);
+
 /* Actor hierarchy */
 void                            _gtk_actor_add_child                            (GtkActor                   *self,
                                                                                  GtkActor                   *child);



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