Author: fejj
Date: 2007-09-27 14:42:05 -0400 (Thu, 27 Sep 2007)
New Revision: 86529
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/demo.cpp
trunk/moon/src/runtime.cpp
trunk/moon/src/runtime.h
Log:
2007-09-27 Jeffrey Stedfast <[EMAIL PROTECTED]>
* runtime.cpp (runtime_init): Now takes a flags argument for
enabling/disabling features. If RUNTIME_INIT_BROWSER is not set,
then make sure pango is recent enough (if not, print a warning
akin to the cairo warning).
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-09-27 18:38:53 UTC (rev 86528)
+++ trunk/moon/src/ChangeLog 2007-09-27 18:42:05 UTC (rev 86529)
@@ -1,3 +1,10 @@
+2007-09-27 Jeffrey Stedfast <[EMAIL PROTECTED]>
+
+ * runtime.cpp (runtime_init): Now takes a flags argument for
+ enabling/disabling features. If RUNTIME_INIT_BROWSER is not set,
+ then make sure pango is recent enough (if not, print a warning
+ akin to the cairo warning).
+
2007-09-27 Sebastien Pouliot <[EMAIL PROTECTED]>
* array.cpp: Fix issues on double parsing, including bug #328915 and
Modified: trunk/moon/src/demo.cpp
===================================================================
--- trunk/moon/src/demo.cpp 2007-09-27 18:38:53 UTC (rev 86528)
+++ trunk/moon/src/demo.cpp 2007-09-27 18:42:05 UTC (rev 86529)
@@ -155,7 +155,7 @@
gtk_init (&argc, &argv);
g_thread_init (NULL);
gdk_threads_init ();
- runtime_init ();
+ runtime_init (0);
downloader_set_functions (downloader_create_state,
downloader_destroy_state,
Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp 2007-09-27 18:38:53 UTC (rev 86528)
+++ trunk/moon/src/runtime.cpp 2007-09-27 18:42:05 UTC (rev 86529)
@@ -1050,8 +1050,10 @@
static bool inited = false;
static bool g_type_inited = false;
+guint32 moonlight_flags = 0;
+
void
-runtime_init (void)
+runtime_init (guint32 flags)
{
if (inited)
return;
@@ -1059,11 +1061,21 @@
if (cairo_version () < CAIRO_VERSION_ENCODE(1,4,0)) {
printf ("*** WARNING ***\n");
printf ("*** Cairo versions < 1.4.0 should not be used for
Moon.\n");
- printf ("*** Moon was configured to use Cairo version %d.%d.%d,
but\n", CAIRO_VERSION_MAJOR, CAIRO_VERSION_MINOR, CAIRO_VERSION_MICRO);
+ printf ("*** Moon was configured to use Cairo version %d.%d.%d,
but\n",
+ CAIRO_VERSION_MAJOR, CAIRO_VERSION_MINOR,
CAIRO_VERSION_MICRO);
printf ("*** is being run against version %s.\n",
cairo_version_string ());
printf ("*** Proceed at your own risk\n");
}
+ if (!(flags & RUNTIME_INIT_BROWSER) && pango_version () <
PANGO_VERSION_ENCODE (1,16,0)) {
+ printf ("*** WARNING ***\n");
+ printf ("*** Pango versions < 1.16.0 may have rendering
glitches.\n");
+ printf ("*** Moon was configured to use Pango version %d.%d.%d,
but\n",
+ PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR,
PANGO_VERSION_MICRO);
+ printf ("*** is being run against version %s.\n",
pango_version_string ());
+ printf ("*** It is suggested that you upgrade.\n");
+ }
+
#if OBJECT_TRACKING
printf ("Runtime created. Object tracking summary:\n");
printf ("\tObjects created: %i\n", Base::objects_created);
@@ -1072,12 +1084,14 @@
#endif
inited = true;
-
+
if (!g_type_inited) {
g_type_inited = true;
g_type_init ();
}
-
+
+ moonlight_flags = flags;
+
types_init ();
namescope_init ();
uielement_init ();
Modified: trunk/moon/src/runtime.h
===================================================================
--- trunk/moon/src/runtime.h 2007-09-27 18:38:53 UTC (rev 86528)
+++ trunk/moon/src/runtime.h 2007-09-27 18:42:05 UTC (rev 86529)
@@ -34,6 +34,11 @@
#define ENDTIMER(id,str)
#endif
+enum RuntimeInitFlags {
+ RUNTIME_INIT_BROWSER = 0x1,
+};
+
+
class Surface : public EventObject {
public:
Surface (int width, int height);
@@ -184,7 +189,7 @@
cairo_t *measuring_context_create (void);
void measuring_context_destroy (cairo_t *cr);
-void runtime_init (void);
+void runtime_init (guint32 flags);
uint32_t runtime_html_timer_timeout_add (int32_t interval, GSourceFunc
callback, gpointer data);
void runtime_html_timer_timeout_stop (uint32_t source_id);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches