Author: toshok
Date: 2007-06-20 18:13:13 -0400 (Wed, 20 Jun 2007)
New Revision: 80372

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/control.cpp
   trunk/moon/src/runtime.cpp
   trunk/moon/src/runtime.h
Log:
        * runtime.cpp (UIElement::render): make this print the classname
        like UIElement::getbounds() does.

        * runtime.h, runtime.cpp: make control_initialize_from_xaml take
        the xaml parser custom element callbacks.

2007-06-20  Chris Toshok  <[EMAIL PROTECTED]>



Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-06-20 21:48:29 UTC (rev 80371)
+++ trunk/moon/src/ChangeLog    2007-06-20 22:13:13 UTC (rev 80372)
@@ -1,5 +1,13 @@
 2007-06-20  Chris Toshok  <[EMAIL PROTECTED]>
 
+       * runtime.cpp (UIElement::render): make this print the classname
+       like UIElement::getbounds() does.
+
+       * runtime.h, runtime.cpp: make control_initialize_from_xaml take
+       the xaml parser custom element callbacks.
+
+2007-06-20  Chris Toshok  <[EMAIL PROTECTED]>
+
        * runtime.cpp (runtime_shutdown): set inited to false, since we
        want people to be able to call runtime_init again after this.
 

Modified: trunk/moon/src/control.cpp
===================================================================
--- trunk/moon/src/control.cpp  2007-06-20 21:48:29 UTC (rev 80371)
+++ trunk/moon/src/control.cpp  2007-06-20 22:13:13 UTC (rev 80372)
@@ -137,11 +137,15 @@
 }
 
 UIElement* 
-control_initialize_from_xaml (Control *control, const char *xaml, Type::Kind 
*element_type)
+control_initialize_from_xaml (Control *control, const char *xaml,
+                             xaml_create_custom_element_callback *cecb,
+                             xaml_set_custom_attribute_callback *sca,
+                             xaml_hookup_event_callback *hue,
+                             Type::Kind *element_type)
 {
        // No callback, figure out how this will work in the plugin to satisfy 
deps
 
-       UIElement *element = xaml_create_from_str (xaml, false, NULL, NULL, 
NULL, element_type);
+       UIElement *element = xaml_create_from_str (xaml, false, cecb, sca, hue, 
element_type);
        if (element == NULL)
                return NULL;
 

Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp  2007-06-20 21:48:29 UTC (rev 80371)
+++ trunk/moon/src/runtime.cpp  2007-06-20 22:13:13 UTC (rev 80372)
@@ -666,7 +666,8 @@
 void
 UIElement::render (Surface *s, int x, int y, int width, int height)
 {
-       g_warning ("UIElement:render has been called. The derived class should 
have overridden it.");
+       g_warning ("UIElement:render has been called. The derived class %s 
should have overridden it.",
+                  dependency_object_get_name (this));
 }
 
 void

Modified: trunk/moon/src/runtime.h
===================================================================
--- trunk/moon/src/runtime.h    2007-06-20 21:48:29 UTC (rev 80371)
+++ trunk/moon/src/runtime.h    2007-06-20 22:13:13 UTC (rev 80372)
@@ -19,6 +19,15 @@
 #define ENDTIMER(id,str)
 #endif
 
+// XAML callbacks up here so they can be used by
+// control_initialize_from_xaml down there in the guts of the file.
+class DependencyObject;
+
+typedef DependencyObject *xaml_create_custom_element_callback (const char 
*xmlns, const char *name);
+typedef void xaml_set_custom_attribute_callback (void *target, const char 
*name, const char *value);
+typedef void xaml_hookup_event_callback (void *target, const char *ename, 
const char *evalue);
+
+
 typedef void (*EventHandler) (gpointer data);
 
 class EventObject {
@@ -905,7 +914,11 @@
 };
 
 Control *control_new (void);
-UIElement* control_initialize_from_xaml (Control *control, const char *xaml, 
Type::Kind *element_type);
+UIElement* control_initialize_from_xaml (Control *control, const char *xaml,
+                                        xaml_create_custom_element_callback 
*cecb,
+                                        xaml_set_custom_attribute_callback 
*sca,
+                                        xaml_hookup_event_callback *hue,
+                                        Type::Kind *element_type);
 
 typedef struct _SurfacePrivate SurfacePrivate;
 
@@ -984,10 +997,6 @@
 // XAML
 //
 
-typedef DependencyObject *xaml_create_custom_element_callback (const char 
*xmlns, const char *name);
-typedef void xaml_set_custom_attribute_callback (void *target, const char 
*name, const char *value);
-typedef void xaml_hookup_event_callback (void *target, const char *ename, 
const char *evalue);
-
 UIElement  *xaml_create_from_file (const char *xaml, bool create_namescope, 
xaml_create_custom_element_callback *cecb,
                xaml_set_custom_attribute_callback *sca, 
xaml_hookup_event_callback *hue, Type::Kind *element_type);
 UIElement  *xaml_create_from_str  (const char *xaml, bool create_namescope, 
xaml_create_custom_element_callback *cecb,

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to