[seed] Fix #641265 - remove gdk drawable



commit 9aa7ca97a9e4d5f30c0d7f3a6fe05b2b407124dc
Author: Frederic Crozat <fred crozat net>
Date:   Mon Feb 7 21:46:26 2011 +0100

    Fix #641265 - remove gdk drawable
    
    Port code to be compilable with GTK+3.

 modules/cairo/seed-cairo.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/modules/cairo/seed-cairo.c b/modules/cairo/seed-cairo.c
index 83bfd19..4c7e599 100644
--- a/modules/cairo/seed-cairo.c
+++ b/modules/cairo/seed-cairo.c
@@ -118,7 +118,7 @@ seed_cairo_construct_context (SeedContext ctx,
 }
 
 static SeedObject
-seed_cairo_construct_context_from_drawable (SeedContext ctx,
+seed_cairo_construct_context_from_window (SeedContext ctx,
 					    SeedObject constructor,
 					    size_t argument_count,
 					    const SeedValue arguments[],
@@ -130,13 +130,13 @@ seed_cairo_construct_context_from_drawable (SeedContext ctx,
       EXPECTED_EXCEPTION ("Context", "1 argument");
     }
   obj = seed_value_to_object (ctx, arguments[0], exception);
-  if (!GDK_IS_DRAWABLE(obj))
+  if (!GDK_IS_WINDOW(obj))
     {
-      seed_make_exception (ctx, exception, "ArgumentError", "Context.from_drawable requires a GdkDrawable argument");
+      seed_make_exception (ctx, exception, "ArgumentError", "Context.from_window requires a GdkWindow argument");
       return seed_make_null (ctx);
     }
 
-  return seed_object_from_cairo_context (ctx, gdk_cairo_create (GDK_DRAWABLE (obj)));
+  return seed_object_from_cairo_context (ctx, gdk_cairo_create (GDK_WINDOW (obj)));
 }
 
 static SeedObject
@@ -1834,14 +1834,14 @@ seed_module_init(SeedEngine * local_eng)
   gdk_context_constructor_ref = seed_make_constructor (eng->context,
 						       NULL,
 						       //				   seed_cairo_context_class,
-						       seed_cairo_construct_context_from_drawable);
+						       seed_cairo_construct_context_from_window);
   steal_context_constructor_ref = seed_make_constructor (eng->context,
 						       NULL,
 						       //				   seed_cairo_context_class,
 						       seed_cairo_construct_context_steal);
 
   seed_object_set_property (eng->context, namespace_ref, "Context", context_constructor_ref);
-  seed_object_set_property (eng->context, context_constructor_ref, "from_drawable", gdk_context_constructor_ref);
+  seed_object_set_property (eng->context, context_constructor_ref, "from_window", gdk_context_constructor_ref);
   seed_object_set_property (eng->context, context_constructor_ref, "steal", steal_context_constructor_ref);
 
   return namespace_ref;



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