[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog plugin/plugin.cpp plugin/mozill...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog plugin/plugin.cpp plugin/mozill... |
Date: |
Wed, 27 Sep 2006 11:48:46 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/09/27 11:48:46
Modified files:
. : ChangeLog
plugin : plugin.cpp
plugin/mozilla-sdk: np_entry.cpp npn_gate.cpp
Log message:
* plugin/plugin.cpp: cleanup and use of getCurrentPageURL()
* plugin/mozilla-sdk/np_entry.cpp,
plugin/mozilla-sdk/npn_gate.cpp:
Added NPN_GetStringIdentifier, NPN_GetProperty and
NPN_ReleaseObject interfaces (tested with firefox 1.0.4!)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.935&r2=1.936
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/plugin.cpp?cvsroot=gnash&r1=1.55&r2=1.56
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/mozilla-sdk/np_entry.cpp?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/mozilla-sdk/npn_gate.cpp?cvsroot=gnash&r1=1.6&r2=1.7
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.935
retrieving revision 1.936
diff -u -b -r1.935 -r1.936
--- ChangeLog 27 Sep 2006 09:51:23 -0000 1.935
+++ ChangeLog 27 Sep 2006 11:48:45 -0000 1.936
@@ -1,5 +1,9 @@
2006-09-27 Sandro Santilli <address@hidden>
+ * plugin/plugin.cpp: cleanup and use of getCurrentPageURL()
+ * plugin/mozilla-sdk/np_entry.cpp, plugin/mozilla-sdk/npn_gate.cpp:
+ Added NPN_GetStringIdentifier, NPN_GetProperty and
+ NPN_ReleaseObject interfaces (tested with firefox 1.0.4!)
* gui/gui.cpp: added missing render_handler.h include, removed
gnash.h include
* gui/gui.h: removed gnash.h include, added forward declaration
Index: plugin/plugin.cpp
===================================================================
RCS file: /sources/gnash/gnash/plugin/plugin.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- plugin/plugin.cpp 27 Sep 2006 09:18:05 -0000 1.55
+++ plugin/plugin.cpp 27 Sep 2006 11:48:46 -0000 1.56
@@ -590,6 +590,13 @@
// setup the command line
+ const char* pageurl = getCurrentPageURL();
+ if ( pageurl )
+ {
+ log_msg("UNIMPLEMENTED: current page url: %s", pageurl);
+ // invoke gnash with -U <current_page_url>
+ }
+
const size_t buf_size = 30;
char xid[buf_size], width[buf_size], height[buf_size];
snprintf(xid, buf_size, "%ld", win);
@@ -658,35 +665,43 @@
{
NPP npp = _instance;
- NPObject *window;
NPIdentifier sDocument = NPN_GetStringIdentifier("document");
- NPVariant vDoc;
+
+ NPObject *window;
NPN_GetValue(npp, NPNVWindowNPObject, &window);
+
+ NPVariant vDoc;
NPN_GetProperty(npp, window, sDocument, &vDoc);
NPN_ReleaseObject(window);
if (!NPVARIANT_IS_OBJECT(vDoc))
{
- return FALSE;
+ log_error("Can't get window object");
+ return NULL;
}
NPObject* npDoc = NPVARIANT_TO_OBJECT(vDoc);
+
NPIdentifier sLocation = NPN_GetStringIdentifier("location");
NPVariant vLoc;
NPN_GetProperty(npp, npDoc, sLocation, &vLoc);
NPN_ReleaseObject(npDoc);
if (!NPVARIANT_IS_OBJECT(vLoc))
{
- return FALSE;
+ log_error("Can't get window.location object");
+ return NULL;
}
NPObject* npLoc = NPVARIANT_TO_OBJECT(vLoc);
+
NPIdentifier sProperty = NPN_GetStringIdentifier("href");
NPVariant vProp;
NPN_GetProperty(npp, npLoc, sProperty, &vProp);
NPN_ReleaseObject(npLoc);
if (!NPVARIANT_IS_STRING(vProp))
{
- return FALSE;
+ log_error("Can't get window.location.href object");
+ return NULL;
}
const NPString& propValue = NPVARIANT_TO_STRING(vProp);
+
return propValue.utf8characters; // const char *
}
Index: plugin/mozilla-sdk/np_entry.cpp
===================================================================
RCS file: /sources/gnash/gnash/plugin/mozilla-sdk/np_entry.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- plugin/mozilla-sdk/np_entry.cpp 22 Sep 2006 17:35:21 -0000 1.4
+++ plugin/mozilla-sdk/np_entry.cpp 27 Sep 2006 11:48:46 -0000 1.5
@@ -114,6 +114,12 @@
NPNFuncs.invalidateregion = aNPNFuncs->invalidateregion;
NPNFuncs.forceredraw = aNPNFuncs->forceredraw;
+// The following has been copied from a newer version of npn_gate.cpp
+
+ NPNFuncs.getstringidentifier = aNPNFuncs->getstringidentifier;
+ NPNFuncs.getproperty = aNPNFuncs->getproperty;
+ NPNFuncs.releaseobject = aNPNFuncs->releaseobject;
+
return NPERR_NO_ERROR;
}
Index: plugin/mozilla-sdk/npn_gate.cpp
===================================================================
RCS file: /sources/gnash/gnash/plugin/mozilla-sdk/npn_gate.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- plugin/mozilla-sdk/npn_gate.cpp 15 Sep 2006 03:49:15 -0000 1.6
+++ plugin/mozilla-sdk/npn_gate.cpp 27 Sep 2006 11:48:46 -0000 1.7
@@ -192,3 +192,21 @@
{
CallNPN_ForceRedrawProc(NPNFuncs.forceredraw, instance);
}
+
+// The following has been copied from a newer version of npn_gate.cpp
+
+NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name)
+{
+ return NPNFuncs.getstringidentifier(name);
+}
+
+bool NPN_GetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName,
+ NPVariant *result)
+{
+ return NPNFuncs.getproperty(npp, obj, propertyName, result);
+}
+
+void NPN_ReleaseObject(NPObject *obj)
+{
+ return NPNFuncs.releaseobject(obj);
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog plugin/plugin.cpp plugin/mozill...,
Sandro Santilli <=