Author: rolf
Date: 2007-10-11 06:02:14 -0400 (Thu, 11 Oct 2007)
New Revision: 87325
Modified:
trunk/moon/plugin/ChangeLog
trunk/moon/plugin/plugin-glue.cpp
trunk/moon/plugin/plugin-proxy.cpp
trunk/moon/plugin/plugin.cpp
trunk/moon/src/ChangeLog
trunk/moon/src/animation.cpp
trunk/moon/src/animation.h
trunk/moon/src/demo.cpp
trunk/moon/src/dependencyobject.cpp
trunk/moon/src/dependencyobject.h
trunk/moon/src/runtime.cpp
trunk/moon/src/text.cpp
trunk/moon/src/text.h
trunk/moon/src/visual.cpp
Log:
* src/text.h, src/animation.h, src/text.cpp, plugin/plugin-glue.cpp:
Fix some const char/char mismatch warnings.
* src/dependencyobject.h, src/dependencyobject.cpp, src/animation.cpp,
plugin/plugin.cpp, plugin/plugin-proxy.cpp: Remove some const
char/char mismatch warnings.
* src/visual.cpp: Fix no newline warning.
* src/runtime.cpp: Fix a initialization warning.
* src/demo.cpp: Remove unused variable.
Modified: trunk/moon/plugin/ChangeLog
===================================================================
--- trunk/moon/plugin/ChangeLog 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/plugin/ChangeLog 2007-10-11 10:02:14 UTC (rev 87325)
@@ -1,3 +1,9 @@
+2007-10-11 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * plugin.cpp, plugin-proxy.cpp: Remove some const char/char mismatch
+ warnings.
+ * plugin-glue.cpp: Fix some const char/char mismatch warnings.
+
2007-10-10 Chris Toshok <[EMAIL PROTECTED]>
* plugin-class.cpp (EventListenerProxy::~EventListenerProxy):
Modified: trunk/moon/plugin/plugin-glue.cpp
===================================================================
--- trunk/moon/plugin/plugin-glue.cpp 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/plugin/plugin-glue.cpp 2007-10-11 10:02:14 UTC (rev 87325)
@@ -144,10 +144,10 @@
switch (variable) {
case NPPVpluginNameString:
- *((char **)result) = PLUGIN_NAME;
+ *((char **)result) = (char *) PLUGIN_NAME;
break;
case NPPVpluginDescriptionString:
- *((char **)result) = PLUGIN_DESCRIPTION;
+ *((char **)result) = (char *) PLUGIN_DESCRIPTION;
break;
case NPPVpluginNeedsXEmbed:
*((PRBool *)result) = PR_TRUE;
@@ -176,14 +176,13 @@
char *
NPP_GetMIMEDescription (void)
{
- return (MIME_TYPES_HANDLED);
+ return (char *) (MIME_TYPES_HANDLED);
}
void downloader_initialize ();
void downloader_destroy ();
static bool gtk_initialized = false;
-static bool already_initialized = false;
static bool runtime_initialized = false;
NPError
@@ -216,4 +215,5 @@
//TimeManager::Instance()->Shutdown ();
runtime_initialized = false;
downloader_destroy ();
+ //MoonlightObject::Summarize ();
}
Modified: trunk/moon/plugin/plugin-proxy.cpp
===================================================================
--- trunk/moon/plugin/plugin-proxy.cpp 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/plugin/plugin-proxy.cpp 2007-10-11 10:02:14 UTC (rev 87325)
@@ -89,7 +89,7 @@
if (getmime != NULL){
return (*getmime)();
}
- return "";
+ return (char *) "";
}
NPError
Modified: trunk/moon/plugin/plugin.cpp
===================================================================
--- trunk/moon/plugin/plugin.cpp 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/plugin/plugin.cpp 2007-10-11 10:02:14 UTC (rev 87325)
@@ -855,9 +855,9 @@
*userAgent = (char*)NPN_UserAgent (instance);
DEBUG_WARN_NOTIMPLEMENTED ("pluginInstance.getBrowserInformation");
- *name = "Foo!";
- *version = "Foo!";
- *platform = "Foo!";
+ *name = (char *) "Foo!";
+ *version = (char *) "Foo!";
+ *platform = (char *) "Foo!";
*cookieEnabled = true;
}
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/src/ChangeLog 2007-10-11 10:02:14 UTC (rev 87325)
@@ -1,5 +1,14 @@
2007-10-11 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+ * text.h, animation.h, text.cpp: Fix some const char/char mismatch
warnings.
+ * dependencyobject.h, dependencyobject.cpp, animation.cpp: Remove some
const
+ char/char mismatch warnings.
+ * visual.cpp: Fix no newline warning.
+ * runtime.cpp: Fix a initialization warning.
+ * demo.cpp: Remove unused variable.
+
+2007-10-11 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
* dependencyobject.cpp: base_unref_delayed: do nothing if base is NULL,
matches base_unref behaviour.
* dependencyobject.h: Use g_atomic_int* to make ref counting atomic
Modified: trunk/moon/src/animation.cpp
===================================================================
--- trunk/moon/src/animation.cpp 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/src/animation.cpp 2007-10-11 10:02:14 UTC (rev 87325)
@@ -320,7 +320,7 @@
void
Storyboard::SetTargetProperty (DependencyObject *o,
- char *targetProperty)
+ const char *targetProperty)
{
o->SetValue (Storyboard::TargetPropertyProperty, Value
(targetProperty));
}
@@ -334,7 +334,7 @@
void
Storyboard::SetTargetName (DependencyObject *o,
- char *targetName)
+ const char *targetName)
{
o->SetValue (Storyboard::TargetNameProperty, Value (targetName));
}
Modified: trunk/moon/src/animation.h
===================================================================
--- trunk/moon/src/animation.h 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/src/animation.h 2007-10-11 10:02:14 UTC (rev 87325)
@@ -536,9 +536,9 @@
// XXX event Completed
- static void SetTargetName (DependencyObject *o, char *targetName);
+ static void SetTargetName (DependencyObject *o, const char *targetName);
static char* GetTargetName (DependencyObject *o);
- static void SetTargetProperty (DependencyObject *o, char
*targetProperty);
+ static void SetTargetProperty (DependencyObject *o, const char
*targetProperty);
static char* GetTargetProperty (DependencyObject *o);
// events you can AddHandler to
Modified: trunk/moon/src/demo.cpp
===================================================================
--- trunk/moon/src/demo.cpp 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/src/demo.cpp 2007-10-11 10:02:14 UTC (rev 87325)
@@ -13,7 +13,6 @@
#include "libmoon.h"
-static UIElement *v;
static Rectangle *r;
static Rectangle *square;
Modified: trunk/moon/src/dependencyobject.cpp
===================================================================
--- trunk/moon/src/dependencyobject.cpp 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/src/dependencyobject.cpp 2007-10-11 10:02:14 UTC (rev 87325)
@@ -887,7 +887,7 @@
}
void
-EventObject::AddHandler (char *event_name, EventHandler handler, gpointer data)
+EventObject::AddHandler (const char *event_name, EventHandler handler,
gpointer data)
{
int id = GetType()->LookupEvent (event_name);
@@ -919,7 +919,7 @@
}
void
-EventObject::RemoveHandler (char *event_name, EventHandler handler, gpointer
data)
+EventObject::RemoveHandler (const char *event_name, EventHandler handler,
gpointer data)
{
int id = GetType()->LookupEvent (event_name);
@@ -991,13 +991,13 @@
}
void
-event_object_add_event_handler (EventObject *o, char *event, EventHandler
handler, gpointer closure)
+event_object_add_event_handler (EventObject *o, const char *event,
EventHandler handler, gpointer closure)
{
o->AddHandler (event, handler, closure);
}
void
-event_object_remove_event_handler (EventObject *o, char *event, EventHandler
handler, gpointer closure)
+event_object_remove_event_handler (EventObject *o, const char *event,
EventHandler handler, gpointer closure)
{
o->RemoveHandler (event, handler, closure);
}
Modified: trunk/moon/src/dependencyobject.h
===================================================================
--- trunk/moon/src/dependencyobject.h 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/src/dependencyobject.h 2007-10-11 10:02:14 UTC (rev 87325)
@@ -113,8 +113,8 @@
EventObject ();
virtual ~EventObject ();
- void AddHandler (char *event_name, EventHandler handler, gpointer data);
- void RemoveHandler (char *event_name, EventHandler handler, gpointer
data);
+ void AddHandler (const char *event_name, EventHandler handler, gpointer
data);
+ void RemoveHandler (const char *event_name, EventHandler handler,
gpointer data);
void AddHandler (int event_id, EventHandler handler, gpointer data);
void RemoveHandler (int event_id, EventHandler handler, gpointer data);
@@ -253,8 +253,8 @@
void dependencyobject_init (void);
-void event_object_add_event_handler (EventObject *o, char *event, EventHandler
handler, gpointer closure);
-void event_object_remove_event_handler (EventObject *o, char *event,
EventHandler handler, gpointer closure);
+void event_object_add_event_handler (EventObject *o, const char *event,
EventHandler handler, gpointer closure);
+void event_object_remove_event_handler (EventObject *o, const char *event,
EventHandler handler, gpointer closure);
G_END_DECLS
Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/src/runtime.cpp 2007-10-11 10:02:14 UTC (rev 87325)
@@ -83,15 +83,15 @@
Surface::Surface(int w, int h)
- : width (w), height (h), buffer (0), pixbuf (NULL),
+ : downloader_context (NULL),
+ width (w), height (h), buffer (0), pixbuf (NULL),
using_cairo_xlib_surface(0),
cairo_buffer_surface (NULL), cairo_buffer(NULL),
cairo_xlib(NULL), cairo (NULL), transparent(false),
background_color(NULL),
cursor (MouseCursorDefault),
drawing_area_normal (NULL),
- drawing_area_fullscreen (NULL),
- downloader_context (NULL)
+ drawing_area_fullscreen (NULL)
{
drawing_area = gtk_event_box_new ();
@@ -639,9 +639,11 @@
nframes++;
if ((now = get_now ()) > (start + TIMESPANTICKS_IN_SECOND)) {
+ /*
printf ("Rendered %d frames in %.3fs = %.3f FPS\n", nframes,
(now - start) / TIMESPANTICKS_IN_SECOND_FLOAT,
nframes / ((now - start) /
TIMESPANTICKS_IN_SECOND_FLOAT));
+ */
nframes = 0;
start = now;
}
Modified: trunk/moon/src/text.cpp
===================================================================
--- trunk/moon/src/text.cpp 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/src/text.cpp 2007-10-11 10:02:14 UTC (rev 87325)
@@ -212,7 +212,7 @@
}
void
-inline_set_font_family (Inline *inline_, char *value)
+inline_set_font_family (Inline *inline_, const char *value)
{
inline_->SetValue (Inline::FontFamilyProperty, Value (value));
}
@@ -331,7 +331,7 @@
}
void
-run_set_text (Run *run, char *value)
+run_set_text (Run *run, const char *value)
{
run->SetValue (Run::TextProperty, Value (value));
}
@@ -389,7 +389,7 @@
font.custom->SetSize (TEXTBLOCK_FONT_SIZE);
}
- text_block_set_text (this, (char *) "");
+ text_block_set_text (this, "");
Brush *brush = new SolidColorBrush ();
Color *color = color_from_str ("black");
@@ -1187,7 +1187,7 @@
}
void
-text_block_set_text (TextBlock *textblock, char *value)
+text_block_set_text (TextBlock *textblock, const char *value)
{
textblock->SetValue (TextBlock::TextProperty, Value (value));
}
Modified: trunk/moon/src/text.h
===================================================================
--- trunk/moon/src/text.h 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/src/text.h 2007-10-11 10:02:14 UTC (rev 87325)
@@ -51,7 +51,7 @@
};
char *inline_get_font_family (Inline *inline_);
-void inline_set_font_family (Inline *inline_, char *value);
+void inline_set_font_family (Inline *inline_, const char *value);
double inline_get_font_size (Inline *inline_);
void inline_set_font_size (Inline *inline_, double value);
@@ -93,7 +93,7 @@
Run *run_new (void);
char *run_get_text (Run *run);
-void run_set_text (Run *run, char *value);
+void run_set_text (Run *run, const char *value);
class TextBlock : public FrameworkElement {
@@ -223,7 +223,7 @@
void text_block_set_inlines (TextBlock *textblock, Inlines *value);
char *text_block_get_text (TextBlock *textblock);
-void text_block_set_text (TextBlock *textblock, char *value);
+void text_block_set_text (TextBlock *textblock, const char *value);
TextDecorations text_block_get_text_decorations (TextBlock *textblock);
void text_block_set_text_decorations (TextBlock *textblock, TextDecorations
value);
Modified: trunk/moon/src/visual.cpp
===================================================================
--- trunk/moon/src/visual.cpp 2007-10-11 09:45:46 UTC (rev 87324)
+++ trunk/moon/src/visual.cpp 2007-10-11 10:02:14 UTC (rev 87325)
@@ -38,4 +38,4 @@
{
if (visual)
visual->SetSurface (surface);
-}
\ No newline at end of file
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches