Author: everaldo
Date: 2007-06-02 18:30:41 -0400 (Sat, 02 Jun 2007)
New Revision: 78481
Added:
trunk/moon/plugin/moon-plugin-glue.cpp
trunk/moon/plugin/moon-plugin.cpp
Removed:
trunk/moon/plugin/moon-plugin-glue.c
trunk/moon/plugin/moon-plugin.c
Modified:
trunk/moon/plugin/Makefile.am
trunk/moon/plugin/moon-plugin.h
trunk/moon/plugin/test/index.html
trunk/moon/src/demo.cpp
Log:
Modified: trunk/moon/plugin/Makefile.am
===================================================================
--- trunk/moon/plugin/Makefile.am 2007-06-02 19:08:51 UTC (rev 78480)
+++ trunk/moon/plugin/Makefile.am 2007-06-02 22:30:41 UTC (rev 78481)
@@ -10,12 +10,12 @@
libmoonplugin_la_LDFLAGS = \
`pkg-config --libs gtk+-2.0` \
- `pkg-config --libs nspr`
+ `pkg-config --libs nspr` -lmoon
libmoonplugin_la_SOURCES = \
- moon-plugin.c \
+ moon-plugin.cpp \
moon-plugin.h \
- moon-plugin-glue.c
+ moon-plugin-glue.cpp
# custom install rule
install-plugin:
Deleted: trunk/moon/plugin/moon-plugin-glue.c
===================================================================
--- trunk/moon/plugin/moon-plugin-glue.c 2007-06-02 19:08:51 UTC (rev
78480)
+++ trunk/moon/plugin/moon-plugin-glue.c 2007-06-02 22:30:41 UTC (rev
78481)
@@ -1,255 +0,0 @@
-/*
- * moon-plugin-glue.c: MoonLight browser plugin.
- *
- * Author:
- * Everaldo Canuto ([EMAIL PROTECTED])
- *
- * Copyright 2007 Novell, Inc. (http://www.novell.com)
- *
- * See the LICENSE file included with the distribution for details.
- *
- */
-
-#define XP_UNIX 1
-
-#include "moon-plugin.h"
-
-/* Global function table */
-static NPNetscapeFuncs MozillaFuncs;
-
-void
-NPN_Version (int* plugin_major, int* plugin_minor, int* netscape_major, int*
netscape_minor)
-{
- *plugin_major = NP_VERSION_MAJOR;
- *plugin_minor = NP_VERSION_MINOR;
-
- *netscape_major = MozillaFuncs.version >> 8;
- *netscape_minor = MozillaFuncs.version & 0xFF;
-}
-
-NPError
-NPN_GetValue (NPP instance, NPNVariable variable, void *r_value)
-{
- return CallNPN_GetValueProc (MozillaFuncs.getvalue, instance, variable,
r_value);
-}
-
-NPError
-NPN_SetValue (NPP instance, NPPVariable variable, void *value)
-{
- return CallNPN_SetValueProc (MozillaFuncs.setvalue, instance, variable,
value);
-}
-
-NPError
-NPN_GetURL (NPP instance, const char* url, const char* window)
-{
- return CallNPN_GetURLProc (MozillaFuncs.geturl, instance, url, window);
-}
-
-NPError
-NPN_GetURLNotify (NPP instance, const char* url, const char* window, void*
notifyData)
-{
- return CallNPN_GetURLNotifyProc (MozillaFuncs.geturlnotify, instance,
url, window, notifyData);
-}
-
-NPError
-NPN_PostURL (NPP instance, const char* url, const char* window, uint32 len,
const char* buf, NPBool file)
-{
- return CallNPN_PostURLProc (MozillaFuncs.posturl, instance, url,
window, len, buf, file);
-}
-
-NPError
-NPN_PostURLNotify (NPP instance, const char* url, const char* window, uint32
len, const char* buf, NPBool file, void* notifyData)
-{
- return CallNPN_PostURLNotifyProc (MozillaFuncs.posturlnotify, instance,
url, window, len, buf, file, notifyData);
-}
-
-NPError
-NPN_RequestRead (NPStream* stream, NPByteRange* rangeList)
-{
- return CallNPN_RequestReadProc (MozillaFuncs.requestread, stream,
rangeList);
-}
-
-NPError
-NPN_NewStream (NPP instance, NPMIMEType type, const char *window, NPStream**
stream_ptr)
-{
- return CallNPN_NewStreamProc (MozillaFuncs.newstream, instance, type,
window, stream_ptr);
-}
-
-int32
-NPN_Write (NPP instance, NPStream* stream, int32 len, void* buffer)
-{
- return CallNPN_WriteProc (MozillaFuncs.write, instance, stream, len,
buffer);
-}
-
-NPError
-NPN_DestroyStream (NPP instance, NPStream* stream, NPError reason)
-{
- return CallNPN_DestroyStreamProc (MozillaFuncs.destroystream, instance,
stream, reason);
-}
-
-void
-NPN_Status (NPP instance, const char* message)
-{
- CallNPN_StatusProc (MozillaFuncs.status, instance, message);
-}
-
-const char*
-NPN_UserAgent (NPP instance)
-{
- return CallNPN_UserAgentProc (MozillaFuncs.uagent, instance);
-}
-
-void*
-NPN_MemAlloc (uint32 size)
-{
- return CallNPN_MemAllocProc (MozillaFuncs.memalloc, size);
-}
-
-void NPN_MemFree (void* ptr)
-{
- CallNPN_MemFreeProc (MozillaFuncs.memfree, ptr);
-}
-
-uint32 NPN_MemFlush (uint32 size)
-{
- return CallNPN_MemFlushProc (MozillaFuncs.memflush, size);
-}
-
-void NPN_ReloadPlugins (NPBool reloadPages)
-{
- CallNPN_ReloadPluginsProc (MozillaFuncs.reloadplugins, reloadPages);
-}
-
-void
-NPN_InvalidateRect (NPP instance, NPRect *invalidRect)
-{
- CallNPN_InvalidateRectProc (MozillaFuncs.invalidaterect, instance,
invalidRect);
-}
-
-void
-NPN_InvalidateRegion (NPP instance, NPRegion invalidRegion)
-{
- CallNPN_InvalidateRegionProc (MozillaFuncs.invalidateregion, instance,
invalidRegion);
-}
-
-void
-NPN_ForceRedraw (NPP instance)
-{
- CallNPN_ForceRedrawProc (MozillaFuncs.forceredraw, instance);
-}
-
-void NPN_PushPopupsEnabledState (NPP instance, NPBool enabled)
-{
- CallNPN_PushPopupsEnabledStateProc
(MozillaFuncs.pushpopupsenabledstate, instance, enabled);
-}
-
-void NPN_PopPopupsEnabledState (NPP instance)
-{
- CallNPN_PopPopupsEnabledStateProc (MozillaFuncs.poppopupsenabledstate,
instance);
-}
-
-
-/********** These functions are located automagically by netscape
*************/
-
-NPError
-NP_GetValue (void* future, NPPVariable variable, void *value)
-{
- DEBUG ("NP_GetValue %d (%x)", variable, variable);
-
- return moon_plugin_get_value (NULL, variable, value);
-}
-
-char *
-NP_GetMIMEDescription (void)
-{
- DEBUG ("NP_GetMIMEDescription");
- return (MIME_TYPES_HANDLED);
-}
-
-NPError
-NP_Initialize (NPNetscapeFuncs * mozilla_funcs, NPPluginFuncs * plugin_funcs)
-{
- NPError err = NPERR_NO_ERROR;
- NPBool supportsXEmbed = PR_FALSE;
- NPNToolkitType toolkit = (NPNToolkitType) 0;
-
- DEBUG ("NP_Initialize");
-
- /* XEMBED? */
- err = CallNPN_GetValueProc (mozilla_funcs->getvalue, NULL,
-
NPNVSupportsXEmbedBool,
- (void
*)&supportsXEmbed);
-
- if (err != NPERR_NO_ERROR || supportsXEmbed != PR_TRUE)
- return NPERR_INCOMPATIBLE_VERSION_ERROR;
-
- /* GTK+ 2.x Moz? */
- err = CallNPN_GetValueProc (mozilla_funcs->getvalue, NULL,
- NPNVToolkit,
- (void
*)&toolkit);
-
- if (err != NPERR_NO_ERROR || toolkit != NPNVGtk2)
- return NPERR_INCOMPATIBLE_VERSION_ERROR;
-
- if (mozilla_funcs == NULL || plugin_funcs == NULL)
- return NPERR_INVALID_FUNCTABLE_ERROR;
-
- if ((mozilla_funcs->version >> 8) > NP_VERSION_MAJOR)
- return NPERR_INCOMPATIBLE_VERSION_ERROR;
-
- if (mozilla_funcs->size < sizeof (NPNetscapeFuncs))
- return NPERR_INVALID_FUNCTABLE_ERROR;
-
- if (plugin_funcs->size < sizeof (NPPluginFuncs))
- return NPERR_INVALID_FUNCTABLE_ERROR;
-
- /* Copy fields from Mozilla function table to global MozillaFuncs */
- MozillaFuncs.version = mozilla_funcs->version;
- MozillaFuncs.size = mozilla_funcs->size;
- MozillaFuncs.posturl = mozilla_funcs->posturl;
- MozillaFuncs.geturl = mozilla_funcs->geturl;
- MozillaFuncs.geturlnotify = mozilla_funcs->geturlnotify;
- MozillaFuncs.requestread = mozilla_funcs->requestread;
- MozillaFuncs.newstream = mozilla_funcs->newstream;
- MozillaFuncs.write = mozilla_funcs->write;
- MozillaFuncs.destroystream = mozilla_funcs->destroystream;
- MozillaFuncs.status = mozilla_funcs->status;
- MozillaFuncs.uagent = mozilla_funcs->uagent;
- MozillaFuncs.memalloc = mozilla_funcs->memalloc;
- MozillaFuncs.memfree = mozilla_funcs->memfree;
- MozillaFuncs.memflush = mozilla_funcs->memflush;
- MozillaFuncs.reloadplugins = mozilla_funcs->reloadplugins;
- MozillaFuncs.getJavaEnv = mozilla_funcs->getJavaEnv;
- MozillaFuncs.getJavaPeer = mozilla_funcs->getJavaPeer;
- MozillaFuncs.getvalue = mozilla_funcs->getvalue;
- MozillaFuncs.setvalue = mozilla_funcs->setvalue;
- MozillaFuncs.pushpopupsenabledstate =
mozilla_funcs->pushpopupsenabledstate;
- MozillaFuncs.poppopupsenabledstate =
mozilla_funcs->poppopupsenabledstate;
-
- /* Set up the plugin function table */
- plugin_funcs->size = sizeof (NPPluginFuncs);
- plugin_funcs->version = (NP_VERSION_MAJOR << 8) +
NP_VERSION_MINOR;
- plugin_funcs->newp = NewNPP_NewProc (moon_plugin_new);
- plugin_funcs->destroy = NewNPP_DestroyProc (moon_plugin_destroy);
- plugin_funcs->getvalue = NewNPP_GetValueProc
(moon_plugin_get_value);
- plugin_funcs->setwindow = NewNPP_SetWindowProc
(moon_plugin_set_window);
- plugin_funcs->newstream = NewNPP_NewStreamProc
(moon_plugin_new_stream);
- plugin_funcs->asfile = NewNPP_StreamAsFileProc
(moon_plugin_stream_as_file);
- plugin_funcs->destroystream = NewNPP_DestroyStreamProc
(moon_plugin_destroy_stream);
- plugin_funcs->writeready = NewNPP_WriteReadyProc
(moon_plugin_write_ready);
- plugin_funcs->write = NewNPP_WriteProc (moon_plugin_write);
- plugin_funcs->print = NewNPP_PrintProc (moon_plugin_print);
- plugin_funcs->urlnotify = NewNPP_URLNotifyProc
(moon_plugin_url_notify);
- plugin_funcs->event = NewNPP_HandleEventProc
(moon_plugin_handle_event);
- plugin_funcs->javaClass = NULL;
-
- DEBUG ("NP_Initialize succeeded");
- return moon_plugin_initialise ();
-}
-
-NPError
-NP_Shutdown (void)
-{
- DEBUG ("NP_Shutdown");
- return moon_plugin_shutdown ();
-}
Added: trunk/moon/plugin/moon-plugin-glue.cpp
===================================================================
--- trunk/moon/plugin/moon-plugin-glue.cpp 2007-06-02 19:08:51 UTC (rev
78480)
+++ trunk/moon/plugin/moon-plugin-glue.cpp 2007-06-02 22:30:41 UTC (rev
78481)
@@ -0,0 +1,255 @@
+/*
+ * moon-plugin-glue.c: MoonLight browser plugin.
+ *
+ * Author:
+ * Everaldo Canuto ([EMAIL PROTECTED])
+ *
+ * Copyright 2007 Novell, Inc. (http://www.novell.com)
+ *
+ * See the LICENSE file included with the distribution for details.
+ *
+ */
+
+#define XP_UNIX 1
+
+#include "moon-plugin.h"
+
+/* Global function table */
+static NPNetscapeFuncs MozillaFuncs;
+
+void
+NPN_Version (int* plugin_major, int* plugin_minor, int* netscape_major, int*
netscape_minor)
+{
+ *plugin_major = NP_VERSION_MAJOR;
+ *plugin_minor = NP_VERSION_MINOR;
+
+ *netscape_major = MozillaFuncs.version >> 8;
+ *netscape_minor = MozillaFuncs.version & 0xFF;
+}
+
+NPError
+NPN_GetValue (NPP instance, NPNVariable variable, void *r_value)
+{
+ return CallNPN_GetValueProc (MozillaFuncs.getvalue, instance, variable,
r_value);
+}
+
+NPError
+NPN_SetValue (NPP instance, NPPVariable variable, void *value)
+{
+ return CallNPN_SetValueProc (MozillaFuncs.setvalue, instance, variable,
value);
+}
+
+NPError
+NPN_GetURL (NPP instance, const char* url, const char* window)
+{
+ return CallNPN_GetURLProc (MozillaFuncs.geturl, instance, url, window);
+}
+
+NPError
+NPN_GetURLNotify (NPP instance, const char* url, const char* window, void*
notifyData)
+{
+ return CallNPN_GetURLNotifyProc (MozillaFuncs.geturlnotify, instance,
url, window, notifyData);
+}
+
+NPError
+NPN_PostURL (NPP instance, const char* url, const char* window, uint32 len,
const char* buf, NPBool file)
+{
+ return CallNPN_PostURLProc (MozillaFuncs.posturl, instance, url,
window, len, buf, file);
+}
+
+NPError
+NPN_PostURLNotify (NPP instance, const char* url, const char* window, uint32
len, const char* buf, NPBool file, void* notifyData)
+{
+ return CallNPN_PostURLNotifyProc (MozillaFuncs.posturlnotify, instance,
url, window, len, buf, file, notifyData);
+}
+
+NPError
+NPN_RequestRead (NPStream* stream, NPByteRange* rangeList)
+{
+ return CallNPN_RequestReadProc (MozillaFuncs.requestread, stream,
rangeList);
+}
+
+NPError
+NPN_NewStream (NPP instance, NPMIMEType type, const char *window, NPStream**
stream_ptr)
+{
+ return CallNPN_NewStreamProc (MozillaFuncs.newstream, instance, type,
window, stream_ptr);
+}
+
+int32
+NPN_Write (NPP instance, NPStream* stream, int32 len, void* buffer)
+{
+ return CallNPN_WriteProc (MozillaFuncs.write, instance, stream, len,
buffer);
+}
+
+NPError
+NPN_DestroyStream (NPP instance, NPStream* stream, NPError reason)
+{
+ return CallNPN_DestroyStreamProc (MozillaFuncs.destroystream, instance,
stream, reason);
+}
+
+void
+NPN_Status (NPP instance, const char* message)
+{
+ CallNPN_StatusProc (MozillaFuncs.status, instance, message);
+}
+
+const char*
+NPN_UserAgent (NPP instance)
+{
+ return CallNPN_UserAgentProc (MozillaFuncs.uagent, instance);
+}
+
+void*
+NPN_MemAlloc (uint32 size)
+{
+ return CallNPN_MemAllocProc (MozillaFuncs.memalloc, size);
+}
+
+void NPN_MemFree (void* ptr)
+{
+ CallNPN_MemFreeProc (MozillaFuncs.memfree, ptr);
+}
+
+uint32 NPN_MemFlush (uint32 size)
+{
+ return CallNPN_MemFlushProc (MozillaFuncs.memflush, size);
+}
+
+void NPN_ReloadPlugins (NPBool reloadPages)
+{
+ CallNPN_ReloadPluginsProc (MozillaFuncs.reloadplugins, reloadPages);
+}
+
+void
+NPN_InvalidateRect (NPP instance, NPRect *invalidRect)
+{
+ CallNPN_InvalidateRectProc (MozillaFuncs.invalidaterect, instance,
invalidRect);
+}
+
+void
+NPN_InvalidateRegion (NPP instance, NPRegion invalidRegion)
+{
+ CallNPN_InvalidateRegionProc (MozillaFuncs.invalidateregion, instance,
invalidRegion);
+}
+
+void
+NPN_ForceRedraw (NPP instance)
+{
+ CallNPN_ForceRedrawProc (MozillaFuncs.forceredraw, instance);
+}
+
+void NPN_PushPopupsEnabledState (NPP instance, NPBool enabled)
+{
+ CallNPN_PushPopupsEnabledStateProc
(MozillaFuncs.pushpopupsenabledstate, instance, enabled);
+}
+
+void NPN_PopPopupsEnabledState (NPP instance)
+{
+ CallNPN_PopPopupsEnabledStateProc (MozillaFuncs.poppopupsenabledstate,
instance);
+}
+
+
+/********** These functions are located automagically by netscape
*************/
+
+NPError
+NP_GetValue (void* future, NPPVariable variable, void *value)
+{
+ DEBUG ("NP_GetValue %d (%x)", variable, variable);
+
+ return moon_plugin_get_value (NULL, variable, value);
+}
+
+char *
+NP_GetMIMEDescription (void)
+{
+ DEBUG ("NP_GetMIMEDescription");
+ return (MIME_TYPES_HANDLED);
+}
+
+NPError
+NP_Initialize (NPNetscapeFuncs * mozilla_funcs, NPPluginFuncs * plugin_funcs)
+{
+ NPError err = NPERR_NO_ERROR;
+ NPBool supportsXEmbed = PR_FALSE;
+ NPNToolkitType toolkit = (NPNToolkitType) 0;
+
+ DEBUG ("NP_Initialize");
+
+ /* XEMBED? */
+ err = CallNPN_GetValueProc (mozilla_funcs->getvalue, NULL,
+
NPNVSupportsXEmbedBool,
+ (void
*)&supportsXEmbed);
+
+ if (err != NPERR_NO_ERROR || supportsXEmbed != PR_TRUE)
+ return NPERR_INCOMPATIBLE_VERSION_ERROR;
+
+ /* GTK+ 2.x Moz? */
+ err = CallNPN_GetValueProc (mozilla_funcs->getvalue, NULL,
+ NPNVToolkit,
+ (void
*)&toolkit);
+
+ if (err != NPERR_NO_ERROR || toolkit != NPNVGtk2)
+ return NPERR_INCOMPATIBLE_VERSION_ERROR;
+
+ if (mozilla_funcs == NULL || plugin_funcs == NULL)
+ return NPERR_INVALID_FUNCTABLE_ERROR;
+
+ if ((mozilla_funcs->version >> 8) > NP_VERSION_MAJOR)
+ return NPERR_INCOMPATIBLE_VERSION_ERROR;
+
+ if (mozilla_funcs->size < sizeof (NPNetscapeFuncs))
+ return NPERR_INVALID_FUNCTABLE_ERROR;
+
+ if (plugin_funcs->size < sizeof (NPPluginFuncs))
+ return NPERR_INVALID_FUNCTABLE_ERROR;
+
+ /* Copy fields from Mozilla function table to global MozillaFuncs */
+ MozillaFuncs.version = mozilla_funcs->version;
+ MozillaFuncs.size = mozilla_funcs->size;
+ MozillaFuncs.posturl = mozilla_funcs->posturl;
+ MozillaFuncs.geturl = mozilla_funcs->geturl;
+ MozillaFuncs.geturlnotify = mozilla_funcs->geturlnotify;
+ MozillaFuncs.requestread = mozilla_funcs->requestread;
+ MozillaFuncs.newstream = mozilla_funcs->newstream;
+ MozillaFuncs.write = mozilla_funcs->write;
+ MozillaFuncs.destroystream = mozilla_funcs->destroystream;
+ MozillaFuncs.status = mozilla_funcs->status;
+ MozillaFuncs.uagent = mozilla_funcs->uagent;
+ MozillaFuncs.memalloc = mozilla_funcs->memalloc;
+ MozillaFuncs.memfree = mozilla_funcs->memfree;
+ MozillaFuncs.memflush = mozilla_funcs->memflush;
+ MozillaFuncs.reloadplugins = mozilla_funcs->reloadplugins;
+ MozillaFuncs.getJavaEnv = mozilla_funcs->getJavaEnv;
+ MozillaFuncs.getJavaPeer = mozilla_funcs->getJavaPeer;
+ MozillaFuncs.getvalue = mozilla_funcs->getvalue;
+ MozillaFuncs.setvalue = mozilla_funcs->setvalue;
+ MozillaFuncs.pushpopupsenabledstate =
mozilla_funcs->pushpopupsenabledstate;
+ MozillaFuncs.poppopupsenabledstate =
mozilla_funcs->poppopupsenabledstate;
+
+ /* Set up the plugin function table */
+ plugin_funcs->size = sizeof (NPPluginFuncs);
+ plugin_funcs->version = (NP_VERSION_MAJOR << 8) +
NP_VERSION_MINOR;
+ plugin_funcs->newp = NewNPP_NewProc (moon_plugin_new);
+ plugin_funcs->destroy = NewNPP_DestroyProc (moon_plugin_destroy);
+ plugin_funcs->getvalue = NewNPP_GetValueProc
(moon_plugin_get_value);
+ plugin_funcs->setwindow = NewNPP_SetWindowProc
(moon_plugin_set_window);
+ plugin_funcs->newstream = NewNPP_NewStreamProc
(moon_plugin_new_stream);
+ plugin_funcs->asfile = NewNPP_StreamAsFileProc
(moon_plugin_stream_as_file);
+ plugin_funcs->destroystream = NewNPP_DestroyStreamProc
(moon_plugin_destroy_stream);
+ plugin_funcs->writeready = NewNPP_WriteReadyProc
(moon_plugin_write_ready);
+ plugin_funcs->write = NewNPP_WriteProc (moon_plugin_write);
+ plugin_funcs->print = NewNPP_PrintProc (moon_plugin_print);
+ plugin_funcs->urlnotify = NewNPP_URLNotifyProc
(moon_plugin_url_notify);
+ plugin_funcs->event = NewNPP_HandleEventProc
(moon_plugin_handle_event);
+ plugin_funcs->javaClass = NULL;
+
+ DEBUG ("NP_Initialize succeeded");
+ return moon_plugin_initialise ();
+}
+
+NPError
+NP_Shutdown (void)
+{
+ DEBUG ("NP_Shutdown");
+ return moon_plugin_shutdown ();
+}
Deleted: trunk/moon/plugin/moon-plugin.c
===================================================================
--- trunk/moon/plugin/moon-plugin.c 2007-06-02 19:08:51 UTC (rev 78480)
+++ trunk/moon/plugin/moon-plugin.c 2007-06-02 22:30:41 UTC (rev 78481)
@@ -1,379 +0,0 @@
-/*
- * moon-plugin.c: MoonLight browser plugin.
- *
- * Author:
- * Everaldo Canuto ([EMAIL PROTECTED])
- *
- * Copyright 2007 Novell, Inc. (http://www.novell.com)
- *
- * See the LICENSE file included with the distribution for details.
- *
- */
-
-
-#include "moon-plugin.h"
-//#include "runtime.h"
-
-static NPWindow windowlessWindow;
-
-static void moon_plugin_demo (PluginInstance *plugin)
-{
- /*Rectangle *r;
-
- // Create our objects
- Surface *t = surface_new (600, 600);
- gtk_container_add (GTK_CONTAINER (plugin->container), t->drawing_area);
-
- r = rectangle_new (50, 50, 100, 100);
- Color c = Color (1.0, 0.0, 0.5, 0.5);
- shape_set_stroke (r, new SolidColorBrush (c));
- cairo_matrix_init_rotate (&trans, 0.4);
- item_transform_set (r, (double *) (&trans));
- surface_repaint (t, 0, 0, 300, 300);
-
- panel_child_add (t, r);*/
-}
-
-
-NPError
-moon_plugin_initialise ()
-{
- gtk_init (0, 0);
-
- return NPERR_NO_ERROR;
-}
-
-NPError
-moon_plugin_shutdown ()
-{
- return NPERR_NO_ERROR;
-}
-
-NPError
-moon_plugin_get_value (void *instance, NPPVariable variable, void *result)
-{
- DEBUG ("GetValue %d (%x)", variable, variable);
-
- NPError err = NPERR_NO_ERROR;
-
- switch (variable) {
- case NPPVpluginNameString:
- *((char **)result) = PLUGIN_NAME;
- break;
- case NPPVpluginDescriptionString:
- *((char **)result) = PLUGIN_DESCRIPTION;
- break;
- case NPPVpluginNeedsXEmbed:
- *((PRBool *)result) = PR_TRUE;
- break;
- default:
- err = NPERR_GENERIC_ERROR;
- }
- return err;
-}
-
-NPError
-moon_plugin_new (NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
char* argn[], char* argv[], NPSavedData* saved)
-{
- DEBUG ("New");
-
- PluginInstance* This;
-
- if (!instance)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- instance->pdata = NPN_MemAlloc (sizeof (PluginInstance));
-
- This = (PluginInstance*) instance->pdata;
-
- if (This == NULL)
- {
- return NPERR_OUT_OF_MEMORY_ERROR;
- }
-
- memset (This, 0, sizeof (PluginInstance));
-
- /* mode is NP_EMBED, NP_FULL, or NP_BACKGROUND (see npapi.h) */
- This->mode = mode;
- This->instance = instance;
- This->dialog_up = 0;
- This->windowless = FALSE;
-
- return NPERR_NO_ERROR;
-}
-
-NPError
-moon_plugin_destroy (NPP instance, NPSavedData** save)
-{
- DEBUG ("Destroy");
- return NPERR_NO_ERROR;
-}
-
-NPError
-moon_plugin_set_window (NPP instance, NPWindow* window)
-{
- PluginInstance* This;
- NPSetWindowCallbackStruct *ws_info;
-
- int xembedSupported = 0;
-
- DEBUG ("SetWindow %d %d", window->width, window->height);
-
- if (instance == NULL)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- This = (PluginInstance*) instance->pdata;
-
- if (This == NULL)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- ws_info = (NPSetWindowCallbackStruct *)window->ws_info;
-
- /* Mozilla likes to re-run its greatest hits */
- /*if ((window == This->window) &&
- (window->x == This->x) &&
- (window->y == This->y) &&
- (window->width == This->width) &&
- (window->height == This->height)) {*/
-if (window == This->window) {
- printf(" (window re-run; returning)\n");
- return NPERR_NO_ERROR;
- }
-
- NPN_GetValue(instance, NPNVSupportsXEmbedBool, &xembedSupported);
- if (!xembedSupported)
- {
- printf("DiamondX: XEmbed not supported\n");
- return NPERR_GENERIC_ERROR;
- }
-
- This->window = window;
- This->x = window->x;
- This->y = window->y;
- This->width = window->width;
- This->height = window->height;
-
- moon_plugin_create_window (instance, window);
-
- return NPERR_NO_ERROR;
-}
-
-NPError
-moon_plugin_create_window (NPP instance, NPWindow* window)
-{
- DEBUG ("moon_plugin_create_window %d %d", window->width,
window->height);
-
- PluginInstance* Instance;
- NPSetWindowCallbackStruct *ws_info;
-
- int xembedSupported = 0;
-
- if (instance == NULL)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- instance->pdata = NPN_MemAlloc (sizeof (PluginInstance));
-
- Instance = (PluginInstance*) instance->pdata;
-
- if (Instance == NULL)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- NPN_GetValue (instance, NPNVSupportsXEmbedBool, &xembedSupported);
- if (!xembedSupported)
- {
- DEBUG ("XEmbed not supported\n");
- return NPERR_GENERIC_ERROR;
- }
-
- Instance->window = window;
- Instance->x = window->x;
- Instance->y = window->y;
- Instance->width = window->width;
- Instance->height = window->height;
-
- /* GtkPlug container and drawing canvas inside */
- Instance->container = gtk_plug_new ((GdkNativeWindow) window->window);
- Instance->canvas = gtk_drawing_area_new ();
-
- gtk_container_add (GTK_CONTAINER (Instance->container),
Instance->canvas);
-
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (Instance->canvas), GTK_CAN_FOCUS);
-
- gtk_widget_add_events (
- Instance->canvas,
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_KEY_PRESS_MASK |
- GDK_KEY_RELEASE_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_SCROLL_MASK |
- GDK_EXPOSURE_MASK |
- GDK_VISIBILITY_NOTIFY_MASK |
- GDK_ENTER_NOTIFY_MASK |
- GDK_LEAVE_NOTIFY_MASK |
- GDK_FOCUS_CHANGE_MASK
- );
-
- g_signal_connect (G_OBJECT(Instance->canvas), "event", G_CALLBACK
(moon_plugin_canvas_event), Instance);
-
-
- moon_plugin_demo (Instance);
-
- gtk_widget_show (Instance->canvas);
- gtk_widget_show (Instance->container);
-
- return NPERR_NO_ERROR;
-}
-
-NPError
-moon_plugin_new_stream (NPP instance, NPMIMEType type, NPStream* stream,
NPBool seekable, uint16* stype)
-{
- DEBUG ("moon_plugin_new_stream");
- return NPERR_NO_ERROR;
-}
-
-void
-moon_plugin_stream_as_file (NPP instance, NPStream* stream, const char* fname)
-{
- DEBUG ("moon_plugin_stream_as_file");
-}
-
-NPError
-moon_plugin_destroy_stream (NPP instance, NPStream* stream, NPError reason)
-{
- DEBUG ("moon_plugin_destroy_stream");
-
- if (instance == NULL)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- return NPERR_NO_ERROR;
-}
-
-int32
-moon_plugin_write_ready (NPP instance, NPStream* stream)
-{
- DEBUG ("moon_plugin_write_ready");
-
- if (instance == NULL)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- NPN_DestroyStream(instance, stream, NPRES_DONE);
-
- return -1L;
-}
-
-int32
-moon_plugin_write (NPP instance, NPStream* stream, int32 offset, int32 len,
void* buffer)
-{
- DEBUG ("moon_plugin_write");
-
- if (instance == NULL)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- NPN_DestroyStream(instance, stream, NPRES_DONE);
-
- return -1L;
-}
-
-void
-moon_plugin_url_notify (NPP instance, const char* url, NPReason reason, void*
notifyData)
-{
- DEBUG ("moon_plugin_url_notify");
-}
-
-void
-moon_plugin_print (NPP instance, NPPrint* platformPrint)
-{
- DEBUG ("moon_plugin_print");
-}
-
-int16
-moon_plugin_handle_event (NPP instance, void* event)
-{
- XGraphicsExposeEvent exposeEvent;
- XEvent *nsEvent;
-
- nsEvent = (XEvent *)event;
- exposeEvent = nsEvent->xgraphicsexpose;
-
- DEBUG ("event: x, y, w, h = %d, %d, %d, %d; display @ %p,
window/drawable = %d\n",
- exposeEvent.x,
- exposeEvent.y,
- exposeEvent.width,
- exposeEvent.height,
- exposeEvent.display,
- exposeEvent.drawable);
-
- windowlessWindow.window = exposeEvent.display;
- windowlessWindow.x = exposeEvent.x;
- windowlessWindow.y = exposeEvent.y;
- windowlessWindow.width = exposeEvent.width;
- windowlessWindow.height = exposeEvent.height;
- windowlessWindow.ws_info = (void *) exposeEvent.drawable;
-
- moon_plugin_set_window (instance, &windowlessWindow);
-
- return 0;
-}
-
-gboolean
-moon_plugin_canvas_event (GtkWidget *widget, GdkEvent *event, gpointer
user_data)
-{
- DEBUG ("moon_plugin_canvas_event");
-
- gboolean handled = 0;
- PluginInstance *plugin = (PluginInstance *)user_data;
-
- GdkEventButton *button;
-
- switch (event->type) {
-
- case GDK_BUTTON_PRESS:
- button = (GdkEventButton *) event;
- if (button->button == 3) {
- moon_plugin_show_menu ();
- }
- handled = 1;
- break;
-
- default:
- break;
- }
-
- return handled;
-
-}
-
-gboolean
-moon_plugin_show_menu (PluginInstance *plugin)
-{
- DEBUG ("moon_plugin_show_menu");
-
- GtkWidget *menu;
- GtkWidget *menu_item;
-
- menu = gtk_menu_new();
-
- menu_item = gtk_menu_item_new_with_label ("Help...");
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- gtk_widget_show (menu_item);
-
- menu_item = gtk_separator_menu_item_new();
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- gtk_widget_show (menu_item);
-
- menu_item = gtk_menu_item_new_with_label (g_strdup_printf ("%s %s",
PLUGIN_NAME, PLUGIN_VERSION));
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- g_signal_connect_swapped (G_OBJECT(menu_item), "activate", G_CALLBACK
(moon_plugin_menu_about), plugin);
- gtk_widget_show (menu_item);
-
- gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
- 0, gtk_get_current_event_time());
-}
-
-static void moon_plugin_menu_about (PluginInstance *plugin)
-{
- DEBUG ("moon_plugin_menu_about Clicked!");
-
-}
-
Added: trunk/moon/plugin/moon-plugin.cpp
===================================================================
--- trunk/moon/plugin/moon-plugin.cpp 2007-06-02 19:08:51 UTC (rev 78480)
+++ trunk/moon/plugin/moon-plugin.cpp 2007-06-02 22:30:41 UTC (rev 78481)
@@ -0,0 +1,404 @@
+/*
+ * moon-plugin.c: MoonLight browser plugin.
+ *
+ * Author:
+ * Everaldo Canuto ([EMAIL PROTECTED])
+ *
+ * Copyright 2007 Novell, Inc. (http://www.novell.com)
+ *
+ * See the LICENSE file included with the distribution for details.
+ *
+ */
+
+
+#include "moon-plugin.h"
+#include "runtime.h"
+
+
+
+static void moon_plugin_demo (PluginInstance *plugin)
+{
+ DEBUG ("*** moon_plugin_demo");
+
+ GtkWidget *w, *box, *button;
+ cairo_matrix_t trans;
+
+ Rectangle *r;
+
+ box = gtk_hbox_new (FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (plugin->container), box);
+ gtk_widget_show_all (box);
+
+ //button = gtk_button_new_with_label ("dingus");
+ //gtk_container_add (GTK_CONTAINER (box), button);
+
+ // Create our objects
+ Surface *t = surface_new (300, 600);
+ gtk_container_add (GTK_CONTAINER (box), t->drawing_area);
+
+ r = rectangle_new (50, 50, 100, 100);
+ Color c = Color (1.0, 0.0, 0.5, 0.5);
+ shape_set_stroke (r, new SolidColorBrush (c));
+ cairo_matrix_init_rotate (&trans, 0.4);
+ item_transform_set (r, (double *) (&trans));
+ surface_repaint (t, 0, 0, 300, 300);
+
+#if VIDEO_DEMO
+ Item *v; *v2
+
+ v = video_new ("/home/everaldo/BoxerSmacksdownInhoffe.wmv", 0, 0);
+ item_transform_set (v, (double *) (&trans));
+ panel_child_add (t, v);
+
+ v2 = video_new ("/home/everaldo/sawamu.wmv", 100, 30);
+ panel_child_add (t, v2);
+#endif
+ panel_child_add (t, r);
+
+ gtk_widget_show_all (box);
+ //gtk_timeout_add (60, repaint, w);
+}
+
+
+NPError
+moon_plugin_initialise ()
+{
+ gtk_init (0, 0);
+
+ return NPERR_NO_ERROR;
+}
+
+NPError
+moon_plugin_shutdown ()
+{
+ return NPERR_NO_ERROR;
+}
+
+NPError
+moon_plugin_get_value (void *instance, NPPVariable variable, void *result)
+{
+ DEBUG ("GetValue %d (%x)", variable, variable);
+
+ NPError err = NPERR_NO_ERROR;
+
+ switch (variable) {
+ case NPPVpluginNameString:
+ *((char **)result) = PLUGIN_NAME;
+ break;
+ case NPPVpluginDescriptionString:
+ *((char **)result) = PLUGIN_DESCRIPTION;
+ break;
+ case NPPVpluginNeedsXEmbed:
+ *((PRBool *)result) = PR_TRUE;
+ break;
+ default:
+ err = NPERR_GENERIC_ERROR;
+ }
+ return err;
+}
+
+NPError
+moon_plugin_new (NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
char* argn[], char* argv[], NPSavedData* saved)
+{
+ DEBUG ("New");
+
+ PluginInstance* This;
+
+ if (!instance)
+ return NPERR_INVALID_INSTANCE_ERROR;
+
+ instance->pdata = NPN_MemAlloc (sizeof (PluginInstance));
+
+ This = (PluginInstance*) instance->pdata;
+
+ if (This == NULL)
+ {
+ return NPERR_OUT_OF_MEMORY_ERROR;
+ }
+
+ memset (This, 0, sizeof (PluginInstance));
+
+ /* mode is NP_EMBED, NP_FULL, or NP_BACKGROUND (see npapi.h) */
+ This->mode = mode;
+ This->instance = instance;
+ This->dialog_up = 0;
+ This->windowless = FALSE;
+
+ return NPERR_NO_ERROR;
+}
+
+NPError
+moon_plugin_destroy (NPP instance, NPSavedData** save)
+{
+ DEBUG ("Destroy");
+ return NPERR_NO_ERROR;
+}
+
+NPError
+moon_plugin_set_window (NPP instance, NPWindow* window)
+{
+ PluginInstance* This;
+ NPSetWindowCallbackStruct *ws_info;
+
+ int xembedSupported = 0;
+
+ DEBUG ("SetWindow %d %d", window->width, window->height);
+
+ if (instance == NULL)
+ return NPERR_INVALID_INSTANCE_ERROR;
+
+ This = (PluginInstance*) instance->pdata;
+
+ if (This == NULL)
+ return NPERR_INVALID_INSTANCE_ERROR;
+
+ ws_info = (NPSetWindowCallbackStruct *)window->ws_info;
+
+ /* Mozilla likes to re-run its greatest hits */
+ /*if ((window == This->window) &&
+ (window->x == This->x) &&
+ (window->y == This->y) &&
+ (window->width == This->width) &&
+ (window->height == This->height)) {*/
+if (window == This->window) {
+ printf(" (window re-run; returning)\n");
+ return NPERR_NO_ERROR;
+ }
+
+ NPN_GetValue(instance, NPNVSupportsXEmbedBool, &xembedSupported);
+ if (!xembedSupported)
+ {
+ printf("DiamondX: XEmbed not supported\n");
+ return NPERR_GENERIC_ERROR;
+ }
+
+ This->window = window;
+ This->x = window->x;
+ This->y = window->y;
+ This->width = window->width;
+ This->height = window->height;
+
+ moon_plugin_create_window (instance, window);
+
+ return NPERR_NO_ERROR;
+}
+
+NPError
+moon_plugin_create_window (NPP instance, NPWindow* window)
+{
+ DEBUG ("moon_plugin_create_window %d %d", window->width,
window->height);
+
+ PluginInstance* Instance;
+ NPSetWindowCallbackStruct *ws_info;
+
+ int xembedSupported = 0;
+
+ if (instance == NULL)
+ return NPERR_INVALID_INSTANCE_ERROR;
+
+ instance->pdata = NPN_MemAlloc (sizeof (PluginInstance));
+
+ Instance = (PluginInstance*) instance->pdata;
+
+ if (Instance == NULL)
+ return NPERR_INVALID_INSTANCE_ERROR;
+
+ NPN_GetValue (instance, NPNVSupportsXEmbedBool, &xembedSupported);
+ if (!xembedSupported)
+ {
+ DEBUG ("XEmbed not supported\n");
+ return NPERR_GENERIC_ERROR;
+ }
+
+ Instance->window = window;
+ Instance->x = window->x;
+ Instance->y = window->y;
+ Instance->width = window->width;
+ Instance->height = window->height;
+
+ /* GtkPlug container and drawing canvas inside */
+ Instance->container = gtk_plug_new ((GdkNativeWindow) window->window);
+ Instance->canvas = gtk_drawing_area_new ();
+
+ //gtk_container_add (GTK_CONTAINER (Instance->container),
Instance->canvas);
+
+ GTK_WIDGET_SET_FLAGS (GTK_WIDGET (Instance->canvas), GTK_CAN_FOCUS);
+
+ gtk_widget_add_events (
+ Instance->canvas,
+ GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_KEY_PRESS_MASK |
+ GDK_KEY_RELEASE_MASK |
+ GDK_POINTER_MOTION_MASK |
+ GDK_SCROLL_MASK |
+ GDK_EXPOSURE_MASK |
+ GDK_VISIBILITY_NOTIFY_MASK |
+ GDK_ENTER_NOTIFY_MASK |
+ GDK_LEAVE_NOTIFY_MASK |
+ GDK_FOCUS_CHANGE_MASK
+ );
+
+ g_signal_connect (G_OBJECT(Instance->canvas), "event", G_CALLBACK
(moon_plugin_canvas_event), Instance);
+
+
+ moon_plugin_demo (Instance);
+
+ gtk_widget_show (Instance->canvas);
+ gtk_widget_show (Instance->container);
+
+ return NPERR_NO_ERROR;
+}
+
+NPError
+moon_plugin_new_stream (NPP instance, NPMIMEType type, NPStream* stream,
NPBool seekable, uint16* stype)
+{
+ DEBUG ("moon_plugin_new_stream");
+ return NPERR_NO_ERROR;
+}
+
+void
+moon_plugin_stream_as_file (NPP instance, NPStream* stream, const char* fname)
+{
+ DEBUG ("moon_plugin_stream_as_file");
+}
+
+NPError
+moon_plugin_destroy_stream (NPP instance, NPStream* stream, NPError reason)
+{
+ DEBUG ("moon_plugin_destroy_stream");
+
+ if (instance == NULL)
+ return NPERR_INVALID_INSTANCE_ERROR;
+
+ return NPERR_NO_ERROR;
+}
+
+int32
+moon_plugin_write_ready (NPP instance, NPStream* stream)
+{
+ DEBUG ("moon_plugin_write_ready");
+
+ if (instance == NULL)
+ return NPERR_INVALID_INSTANCE_ERROR;
+
+ NPN_DestroyStream(instance, stream, NPRES_DONE);
+
+ return -1L;
+}
+
+int32
+moon_plugin_write (NPP instance, NPStream* stream, int32 offset, int32 len,
void* buffer)
+{
+ DEBUG ("moon_plugin_write");
+
+ if (instance == NULL)
+ return NPERR_INVALID_INSTANCE_ERROR;
+
+ NPN_DestroyStream(instance, stream, NPRES_DONE);
+
+ return -1L;
+}
+
+void
+moon_plugin_url_notify (NPP instance, const char* url, NPReason reason, void*
notifyData)
+{
+ DEBUG ("moon_plugin_url_notify");
+}
+
+void
+moon_plugin_print (NPP instance, NPPrint* platformPrint)
+{
+ DEBUG ("moon_plugin_print");
+}
+
+int16
+moon_plugin_handle_event (NPP instance, void* event)
+{
+ XGraphicsExposeEvent exposeEvent;
+ XEvent *nsEvent;
+
+ nsEvent = (XEvent *)event;
+ exposeEvent = nsEvent->xgraphicsexpose;
+
+ DEBUG ("event: x, y, w, h = %d, %d, %d, %d; display @ %p,
window/drawable = %d\n",
+ exposeEvent.x,
+ exposeEvent.y,
+ exposeEvent.width,
+ exposeEvent.height,
+ exposeEvent.display,
+ exposeEvent.drawable);
+
+ windowlessWindow.window = exposeEvent.display;
+ windowlessWindow.x = exposeEvent.x;
+ windowlessWindow.y = exposeEvent.y;
+ windowlessWindow.width = exposeEvent.width;
+ windowlessWindow.height = exposeEvent.height;
+ windowlessWindow.ws_info = (void *) exposeEvent.drawable;
+
+ moon_plugin_set_window (instance, &windowlessWindow);
+
+ return 0;
+}
+
+gboolean
+moon_plugin_canvas_event (GtkWidget *widget, GdkEvent *event, gpointer
user_data)
+{
+ DEBUG ("moon_plugin_canvas_event");
+
+ gboolean handled = 0;
+ PluginInstance *plugin = (PluginInstance *)user_data;
+
+ GdkEventButton *button;
+
+ switch (event->type) {
+
+ case GDK_BUTTON_PRESS:
+ button = (GdkEventButton *) event;
+ if (button->button == 3) {
+ moon_plugin_show_menu (plugin);
+ }
+ handled = 1;
+ break;
+
+ default:
+ break;
+ }
+
+ return handled;
+
+}
+
+gboolean
+moon_plugin_show_menu (PluginInstance *plugin)
+{
+ DEBUG ("moon_plugin_show_menu");
+
+ GtkWidget *menu;
+ GtkWidget *menu_item;
+
+ menu = gtk_menu_new();
+
+ menu_item = gtk_menu_item_new_with_label ("Help...");
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+ gtk_widget_show (menu_item);
+
+ menu_item = gtk_separator_menu_item_new();
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+ gtk_widget_show (menu_item);
+
+ menu_item = gtk_menu_item_new_with_label (g_strdup_printf ("%s %s",
PLUGIN_NAME, PLUGIN_VERSION));
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
+ g_signal_connect_swapped (G_OBJECT(menu_item), "activate", G_CALLBACK
(moon_plugin_menu_about), plugin);
+ gtk_widget_show (menu_item);
+
+ gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
+ 0, gtk_get_current_event_time());
+}
+
+static void moon_plugin_menu_about (PluginInstance *plugin)
+{
+ DEBUG ("moon_plugin_menu_about Clicked!");
+ // TODO: Implement an about Window.
+}
+
Modified: trunk/moon/plugin/moon-plugin.h
===================================================================
--- trunk/moon/plugin/moon-plugin.h 2007-06-02 19:08:51 UTC (rev 78480)
+++ trunk/moon/plugin/moon-plugin.h 2007-06-02 22:30:41 UTC (rev 78481)
@@ -42,6 +42,8 @@
#define DEBUG(msg)
#endif
+G_BEGIN_DECLS
+
typedef struct {
uint16 mode;
@@ -80,9 +82,12 @@
void moon_plugin_print (NPP instance, NPPrint* platformPrint);
int16 moon_plugin_handle_event (NPP instance, void* event);
gboolean moon_plugin_canvas_event (GtkWidget *widget, GdkEvent *event,
gpointer user_data);
-gboolean moon_plugin_show_menu ();
+gboolean moon_plugin_show_menu (PluginInstance *plugin);
static void moon_plugin_menu_about (PluginInstance *plugin);
+G_END_DECLS
+
#endif /* MOON_PLUGIN */
+
Modified: trunk/moon/plugin/test/index.html
===================================================================
--- trunk/moon/plugin/test/index.html 2007-06-02 19:08:51 UTC (rev 78480)
+++ trunk/moon/plugin/test/index.html 2007-06-02 22:30:41 UTC (rev 78481)
@@ -1,10 +1,10 @@
<html>
-<body>
+<body bgcolor="gray">
<h1>Moonlight Browser Plugin</h3>
-<embed src="moonlight.scr" type="application/ag-plugin" width="50%"
height="300"></embed>
+<embed src="moonlight.scr" type="application/ag-plugin" width="80%"
height="300"></embed>
<br><br>
Modified: trunk/moon/src/demo.cpp
===================================================================
--- trunk/moon/src/demo.cpp 2007-06-02 19:08:51 UTC (rev 78480)
+++ trunk/moon/src/demo.cpp 2007-06-02 22:30:41 UTC (rev 78481)
@@ -62,7 +62,7 @@
surface_repaint (t, 0, 0, 300, 300);
#ifdef VIDEO_DEMO1
- v = video_new ("file:///tmp/BoxerSmacksdownInhoffe.wmv", 0, 0);
+ v = video_new ("BoxerSmacksdownInhoffe.wmv", 0, 0);
//printf ("Got %d\n", v);
item_transform_set (v, (double *) (&trans));
panel_child_add (t, v);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches