[gtk+/wip/actor: 35/42] xxx: cssactor



commit bb01e2042f011f900bfc9c3e27aec9efdbee1974
Author: Benjamin Otte <otte redhat com>
Date:   Mon Dec 17 12:11:34 2012 +0100

    xxx: cssactor

 gtk/actors/gtkcssactor.c |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 deletions(-)
---
diff --git a/gtk/actors/gtkcssactor.c b/gtk/actors/gtkcssactor.c
index cef8c58..3b6120b 100644
--- a/gtk/actors/gtkcssactor.c
+++ b/gtk/actors/gtkcssactor.c
@@ -29,6 +29,7 @@
 #include "gtkstylecontext.h"
 #include "gtkstylecontextprivate.h"
 #include "gtktypebuiltins.h"
+#include "gtkwidgetprivate.h"
 
 struct _GtkCssActorPrivate {
   GtkStyleContext *context;
@@ -232,21 +233,36 @@ static gboolean
 gtk_css_actor_source_init_css_matcher (GtkCssMatcher *matcher,
                                        gpointer       actor)
 {
+  return FALSE;
+#if 0
   _gtk_css_matcher_actor_init (matcher, actor);
 
   return TRUE;
+#endif
 }
 
 static GtkWidgetPath *
 gtk_css_actor_source_create_query_path (gpointer actor)
 {
-  return NULL;
+  GtkWidget *widget;
+  
+  widget = _gtk_actor_get_widget (actor);
+  if (widget == NULL)
+    return NULL;
+
+  return _gtk_widget_create_path (widget);
 }
 
 static const GtkWidgetPath *
 gtk_css_actor_source_get_path (gpointer actor)
 {
-  return NULL;
+  GtkWidget *widget;
+  
+  widget = _gtk_actor_get_widget (actor);
+  if (widget == NULL)
+    return NULL;
+
+  return gtk_widget_get_path (widget);
 }
 
 static void 
@@ -276,7 +292,7 @@ gtk_css_actor_source_invalidate (gpointer actor)
 static void 
 gtk_css_actor_source_queue_invalidate (gpointer actor)
 {
-  g_warning ("FIXME: queue_invalidate()");
+  //g_warning ("FIXME: queue_invalidate()");
 #if 0
   if (GTK_IS_RESIZE_CONTAINER (widget))
     _gtk_container_queue_restyle (GTK_CONTAINER (widget));
@@ -305,7 +321,13 @@ gtk_css_actor_source_should_animate (gpointer actor)
 static GType
 gtk_css_actor_source_get_widget_type (gpointer actor)
 {
-  return G_TYPE_INVALID;
+  GtkWidget *widget;
+  
+  widget = _gtk_actor_get_widget (actor);
+  if (widget == NULL)
+    return G_TYPE_INVALID;
+
+  return G_OBJECT_TYPE (widget);
 }
 
 static void 



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