You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(128) |
Dec
(65) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(48) |
Feb
(132) |
Mar
(95) |
Apr
(47) |
May
(54) |
Jun
(2) |
Jul
(57) |
Aug
(109) |
Sep
(131) |
Oct
(186) |
Nov
(105) |
Dec
(78) |
2007 |
Jan
(125) |
Feb
(105) |
Mar
(52) |
Apr
(104) |
May
(63) |
Jun
(116) |
Jul
(76) |
Aug
|
Sep
(18) |
Oct
(93) |
Nov
(110) |
Dec
(169) |
2008 |
Jan
(90) |
Feb
(64) |
Mar
(41) |
Apr
(23) |
May
(6) |
Jun
(18) |
Jul
(10) |
Aug
(61) |
Sep
(139) |
Oct
(50) |
Nov
(55) |
Dec
(2) |
2009 |
Jan
|
Feb
(1) |
Mar
(62) |
Apr
(22) |
May
(17) |
Jun
(19) |
Jul
(40) |
Aug
(21) |
Sep
|
Oct
(40) |
Nov
(23) |
Dec
|
2010 |
Jan
(14) |
Feb
(40) |
Mar
(9) |
Apr
(11) |
May
(19) |
Jun
(4) |
Jul
(10) |
Aug
(22) |
Sep
(15) |
Oct
|
Nov
(2) |
Dec
|
2011 |
Jan
(13) |
Feb
(10) |
Mar
|
Apr
(13) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(33) |
May
(20) |
Jun
|
Jul
(8) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Braden M. <br...@us...> - 2006-10-10 22:29:00
|
Update of /cvsroot/openvrml/openvrml/lib/gtkglext In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12108/lib/gtkglext Modified Files: Tag: OpenVRML-0_16-BRANCH configure.in Log Message: Build against X11 if we are building under Cygwin with Cygwin X11. Index: configure.in =================================================================== RCS file: /cvsroot/openvrml/openvrml/lib/gtkglext/configure.in,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -C2 -d -r1.2.2.2 -r1.2.2.3 *** configure.in 4 Oct 2006 02:28:29 -0000 1.2.2.2 --- configure.in 10 Oct 2006 22:28:58 -0000 1.2.2.3 *************** *** 172,176 **** AM_CONDITIONAL([MS_LIB_AVAILABLE], [test "x$ms_librarian" = "xyes"]) ! if test "x$platform_win32" = "xyes"; then gdktarget=win32 else --- 172,178 ---- AM_CONDITIONAL([MS_LIB_AVAILABLE], [test "x$ms_librarian" = "xyes"]) ! AC_PATH_XTRA ! ! if test "x$platform_win32" = "xyes" -a "x$no_x" = "xyes"; then gdktarget=win32 else *************** *** 439,444 **** if test "x$gdktarget" = "xx11"; then - AC_PATH_XTRA - save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" --- 441,444 ---- |
From: Braden M. <br...@us...> - 2006-10-10 22:28:59
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12108 Modified Files: Tag: OpenVRML-0_16-BRANCH ChangeLog Log Message: Build against X11 if we are building under Cygwin with Cygwin X11. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1310.2.34 retrieving revision 1.1310.2.35 diff -C2 -d -r1.1310.2.34 -r1.1310.2.35 *** ChangeLog 10 Oct 2006 21:49:09 -0000 1.1310.2.34 --- ChangeLog 10 Oct 2006 22:28:57 -0000 1.1310.2.35 *************** *** 1,4 **** --- 1,9 ---- 2006-10-10 Braden McDaniel <br...@en...> + * lib/gtkglext/configure.in: Build against X11 if we are building + under Cygwin with Cygwin X11. + + 2006-10-10 Braden McDaniel <br...@en...> + * src/libopenvrml-gl/openvrml/gl/viewer.cpp (OPENVRML_GL_CALLBACK_): Don't apply __stdcall__ attribute if |
From: Braden M. <br...@us...> - 2006-10-10 21:50:08
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml-gl/openvrml/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29842/src/libopenvrml-gl/openvrml/gl Modified Files: viewer.cpp Log Message: Don't apply __stdcall__ attribute if we're building with Cygwin X11's glu.h. Index: viewer.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml-gl/openvrml/gl/viewer.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** viewer.cpp 31 Aug 2006 07:28:13 -0000 1.46 --- viewer.cpp 10 Oct 2006 21:50:05 -0000 1.47 *************** *** 73,77 **** # endif ! # if defined(__CYGWIN__) || defined(__MINGW32__) # define OPENVRML_GL_CALLBACK_ __attribute__ ((__stdcall__)) # elif defined (_WIN32) --- 73,77 ---- # endif ! # if (defined(__CYGWIN__) && defined(X_DISPLAY_MISSING)) || defined(__MINGW32__) # define OPENVRML_GL_CALLBACK_ __attribute__ ((__stdcall__)) # elif defined (_WIN32) |
From: Braden M. <br...@us...> - 2006-10-10 21:50:08
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29842 Modified Files: ChangeLog Log Message: Don't apply __stdcall__ attribute if we're building with Cygwin X11's glu.h. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1348 retrieving revision 1.1349 diff -C2 -d -r1.1348 -r1.1349 *** ChangeLog 9 Oct 2006 18:43:09 -0000 1.1348 --- ChangeLog 10 Oct 2006 21:50:05 -0000 1.1349 *************** *** 1,2 **** --- 1,8 ---- + 2006-10-10 Braden McDaniel <br...@en...> + + * src/libopenvrml-gl/openvrml/gl/viewer.cpp + (OPENVRML_GL_CALLBACK_): Don't apply __stdcall__ attribute if + we're building with Cygwin X11's glu.h. + 2006-10-09 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-10-10 21:49:13
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29456 Modified Files: Tag: OpenVRML-0_16-BRANCH ChangeLog Log Message: Don't apply __stdcall__ attribute if we're building with Cygwin X11's glu.h. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1310.2.33 retrieving revision 1.1310.2.34 diff -C2 -d -r1.1310.2.33 -r1.1310.2.34 *** ChangeLog 9 Oct 2006 18:42:52 -0000 1.1310.2.33 --- ChangeLog 10 Oct 2006 21:49:09 -0000 1.1310.2.34 *************** *** 1,2 **** --- 1,8 ---- + 2006-10-10 Braden McDaniel <br...@en...> + + * src/libopenvrml-gl/openvrml/gl/viewer.cpp + (OPENVRML_GL_CALLBACK_): Don't apply __stdcall__ attribute if + we're building with Cygwin X11's glu.h. + 2006-10-09 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-10-10 21:49:13
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml-gl/openvrml/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29456/src/libopenvrml-gl/openvrml/gl Modified Files: Tag: OpenVRML-0_16-BRANCH viewer.cpp Log Message: Don't apply __stdcall__ attribute if we're building with Cygwin X11's glu.h. Index: viewer.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml-gl/openvrml/gl/viewer.cpp,v retrieving revision 1.43.2.1 retrieving revision 1.43.2.2 diff -C2 -d -r1.43.2.1 -r1.43.2.2 *** viewer.cpp 31 Aug 2006 06:30:33 -0000 1.43.2.1 --- viewer.cpp 10 Oct 2006 21:49:10 -0000 1.43.2.2 *************** *** 73,77 **** # endif ! # if defined(__CYGWIN__) || defined(__MINGW32__) # define OPENVRML_GL_CALLBACK_ __attribute__ ((__stdcall__)) # elif defined (_WIN32) --- 73,77 ---- # endif ! # if (defined(__CYGWIN__) && defined(X_DISPLAY_MISSING)) || defined(__MINGW32__) # define OPENVRML_GL_CALLBACK_ __attribute__ ((__stdcall__)) # elif defined (_WIN32) |
From: Braden M. <br...@us...> - 2006-10-09 18:43:15
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv354 Modified Files: ChangeLog configure.ac Log Message: Removed XPIDL, XPIDLFLAGS precious variables. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** configure.ac 5 Oct 2006 03:31:36 -0000 1.96 --- configure.ac 9 Oct 2006 18:43:09 -0000 1.97 *************** *** 333,339 **** AC_SUBST([OPENVRML_RPATH]) - AC_ARG_VAR([XPIDL], [Mozilla XPCOM IDL compiler]) - AC_ARG_VAR([XPIDLFLAGS], [Mozilla XPCOM IDL compiler flags]) - if test X$enable_gtkplug != Xno; then gtkglext_subdir=gtkglext --- 333,336 ---- Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1347 retrieving revision 1.1348 diff -C2 -d -r1.1347 -r1.1348 *** ChangeLog 9 Oct 2006 03:09:55 -0000 1.1347 --- ChangeLog 9 Oct 2006 18:43:09 -0000 1.1348 *************** *** 1,2 **** --- 1,6 ---- + 2006-10-09 Braden McDaniel <br...@en...> + + * configure.ac: Removed XPIDL, XPIDLFLAGS precious variables. + 2006-10-08 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-10-09 18:42:56
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32455 Modified Files: Tag: OpenVRML-0_16-BRANCH ChangeLog configure.ac Log Message: Removed XPIDL, XPIDLFLAGS precious variables. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.92.2.4 retrieving revision 1.92.2.5 diff -C2 -d -r1.92.2.4 -r1.92.2.5 *** configure.ac 5 Oct 2006 03:28:31 -0000 1.92.2.4 --- configure.ac 9 Oct 2006 18:42:53 -0000 1.92.2.5 *************** *** 341,347 **** AC_SUBST([OPENVRML_RPATH]) - AC_ARG_VAR([XPIDL], [Mozilla XPCOM IDL compiler]) - AC_ARG_VAR([XPIDLFLAGS], [Mozilla XPCOM IDL compiler flags]) - if test X$enable_gtkplug != Xno; then gtkglext_subdir=gtkglext --- 341,344 ---- Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1310.2.32 retrieving revision 1.1310.2.33 diff -C2 -d -r1.1310.2.32 -r1.1310.2.33 *** ChangeLog 9 Oct 2006 03:09:01 -0000 1.1310.2.32 --- ChangeLog 9 Oct 2006 18:42:52 -0000 1.1310.2.33 *************** *** 1,2 **** --- 1,6 ---- + 2006-10-09 Braden McDaniel <br...@en...> + + * configure.ac: Removed XPIDL, XPIDLFLAGS precious variables. + 2006-10-08 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-10-09 03:09:58
|
Update of /cvsroot/openvrml/openvrml/mozilla-plugin/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22586/mozilla-plugin/src Modified Files: Makefile.am openvrml.cpp Removed Files: openvrml.idl Log Message: Use the npruntime extensions to NPAPI to make the plug-in scriptable instead of XPCOM. --- openvrml.idl DELETED --- Index: openvrml.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/mozilla-plugin/src/openvrml.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** openvrml.cpp 1 Oct 2006 05:47:07 -0000 1.39 --- openvrml.cpp 9 Oct 2006 03:09:56 -0000 1.40 *************** *** 19,24 **** // ! # include <cerrno> ! # include <list> # include <memory> # include <sstream> --- 19,23 ---- // ! # include <map> # include <memory> # include <sstream> *************** *** 29,39 **** # include <boost/lexical_cast.hpp> # include <boost/noncopyable.hpp> # include <mozilla-config.h> # include <npupp.h> - # include <nsCOMPtr.h> - # include <nsIServiceManagerUtils.h> - # include <nsMemory.h> - # include <nsString.h> - # include <nsIConsoleService.h> # if defined MOZ_X11 # include <fcntl.h> --- 28,34 ---- # include <boost/lexical_cast.hpp> # include <boost/noncopyable.hpp> + # include <boost/scoped_ptr.hpp> # include <mozilla-config.h> # include <npupp.h> # if defined MOZ_X11 # include <fcntl.h> *************** *** 42,46 **** # error Unsupported toolkit. # endif - # include "openvrml.h" namespace { --- 37,40 ---- *************** *** 48,59 **** void printerr(const char * str); - class ScriptablePeer; - extern "C" gboolean request_data_available(GIOChannel * source, GIOCondition condition, gpointer data); ! class PluginInstance : boost::noncopyable { ! friend class ScriptablePeer; friend gboolean request_data_available(GIOChannel * source, GIOCondition condition, --- 42,71 ---- void printerr(const char * str); extern "C" gboolean request_data_available(GIOChannel * source, GIOCondition condition, gpointer data); + class plugin_instance; ! typedef bool (plugin_instance::*script_callback_t)(const NPVariant *, ! uint32_t, ! NPVariant *); ! ! // ! // Mozilla doesn't like us to use NPN_GetStringIdentifier during static ! // initialization; so this is a singleton. ! // ! class script_callback_map : public std::map<NPIdentifier, ! script_callback_t>, ! boost::noncopyable { ! static boost::scoped_ptr<const script_callback_map> instance_; ! ! script_callback_map(); ! ! public: ! static const script_callback_map & instance(); ! }; ! ! ! class plugin_instance : boost::noncopyable { friend gboolean request_data_available(GIOChannel * source, GIOCondition condition, *************** *** 68,93 **** guint request_channel_watch_id; std::stringstream request_line; - nsCOMPtr<VrmlBrowser> scriptablePeer; public: ! explicit PluginInstance(NPP npp) throw (std::bad_alloc); ! ~PluginInstance() throw (); ! ! nsISupports * GetScriptablePeer() throw (); ! void SetWindow(NPWindow & window) throw (std::bad_alloc); ! void HandleEvent(void * event) throw (); ! ssize_t WriteCommand(const std::string & command); ! }; ! class ScriptablePeer : public nsIClassInfo, public VrmlBrowser { ! PluginInstance & pluginInstance; ! public: ! explicit ScriptablePeer(PluginInstance & pluginInstance); ! ~ScriptablePeer(); ! NS_DECL_ISUPPORTS ! NS_DECL_NSICLASSINFO ! NS_DECL_VRMLBROWSER }; } // namespace --- 80,101 ---- guint request_channel_watch_id; std::stringstream request_line; public: ! NPObject * const npobj; ! explicit plugin_instance(NPP npp) throw (std::bad_alloc); ! ~plugin_instance() throw (); ! void set_window(NPWindow & window) throw (std::bad_alloc); ! void HandleEvent(void * event) throw (); ! ssize_t write_command(const std::string & command); ! // ! // Scripting API method implementations. ! // ! bool get_name(const NPVariant * args, uint32_t argCount, ! NPVariant * result); ! bool get_version(const NPVariant * args, uint32_t argCount, ! NPVariant * result); }; } // namespace *************** *** 100,104 **** namespace { NPNetscapeFuncs mozillaFuncs; - nsCOMPtr<nsIConsoleService> console_service; } --- 108,111 ---- *************** *** 151,172 **** // table could be bigger than what we expect. // ! mozillaFuncs.version = mozTable->version; ! mozillaFuncs.size = mozTable->size; ! mozillaFuncs.posturl = mozTable->posturl; ! mozillaFuncs.geturl = mozTable->geturl; ! mozillaFuncs.geturlnotify = mozTable->geturlnotify; ! mozillaFuncs.requestread = mozTable->requestread; ! mozillaFuncs.newstream = mozTable->newstream; ! mozillaFuncs.write = mozTable->write; ! mozillaFuncs.destroystream = mozTable->destroystream; ! mozillaFuncs.status = mozTable->status; ! mozillaFuncs.uagent = mozTable->uagent; ! mozillaFuncs.memalloc = mozTable->memalloc; ! mozillaFuncs.memfree = mozTable->memfree; ! mozillaFuncs.memflush = mozTable->memflush; ! mozillaFuncs.reloadplugins = mozTable->reloadplugins; ! mozillaFuncs.getJavaEnv = mozTable->getJavaEnv; ! mozillaFuncs.getJavaPeer = mozTable->getJavaPeer; ! mozillaFuncs.getvalue = mozTable->getvalue; // --- 158,198 ---- // table could be bigger than what we expect. // ! mozillaFuncs.version = mozTable->version; ! mozillaFuncs.size = mozTable->size; ! mozillaFuncs.posturl = mozTable->posturl; ! mozillaFuncs.geturl = mozTable->geturl; ! mozillaFuncs.geturlnotify = mozTable->geturlnotify; ! mozillaFuncs.requestread = mozTable->requestread; ! mozillaFuncs.newstream = mozTable->newstream; ! mozillaFuncs.write = mozTable->write; ! mozillaFuncs.destroystream = mozTable->destroystream; ! mozillaFuncs.status = mozTable->status; ! mozillaFuncs.uagent = mozTable->uagent; ! mozillaFuncs.memalloc = mozTable->memalloc; ! mozillaFuncs.memfree = mozTable->memfree; ! mozillaFuncs.memflush = mozTable->memflush; ! mozillaFuncs.reloadplugins = mozTable->reloadplugins; ! mozillaFuncs.getJavaEnv = mozTable->getJavaEnv; ! mozillaFuncs.getJavaPeer = mozTable->getJavaPeer; ! mozillaFuncs.getvalue = mozTable->getvalue; ! mozillaFuncs.getstringidentifier = mozTable->getstringidentifier; ! mozillaFuncs.getstringidentifiers = mozTable->getstringidentifiers; ! mozillaFuncs.getintidentifier = mozTable->getintidentifier; ! mozillaFuncs.identifierisstring = mozTable->identifierisstring; ! mozillaFuncs.utf8fromidentifier = mozTable->utf8fromidentifier; ! mozillaFuncs.intfromidentifier = mozTable->intfromidentifier; ! mozillaFuncs.createobject = mozTable->createobject; ! mozillaFuncs.retainobject = mozTable->retainobject; ! mozillaFuncs.releaseobject = mozTable->releaseobject; ! mozillaFuncs.invoke = mozTable->invoke; ! mozillaFuncs.invokeDefault = mozTable->invokeDefault; ! mozillaFuncs.evaluate = mozTable->evaluate; ! mozillaFuncs.getproperty = mozTable->getproperty; ! mozillaFuncs.setproperty = mozTable->setproperty; ! mozillaFuncs.removeproperty = mozTable->removeproperty; ! mozillaFuncs.hasproperty = mozTable->hasproperty; ! mozillaFuncs.hasmethod = mozTable->hasmethod; ! mozillaFuncs.releasevariantvalue = mozTable->releasevariantvalue; ! mozillaFuncs.setexception = mozTable->setexception; // *************** *** 222,229 **** # endif // defined MOZ_X11 - nsresult rv; - console_service = do_GetService(NS_CONSOLESERVICE_CONTRACTID, &rv); - if (NS_FAILED(rv)) { return NPERR_GENERIC_ERROR; } - return NPP_Initialize(); } --- 248,251 ---- *************** *** 320,324 **** try { ! instance->pdata = new PluginInstance(instance); } catch (std::bad_alloc &) { return NPERR_OUT_OF_MEMORY_ERROR; --- 342,346 ---- try { ! instance->pdata = new plugin_instance(instance); } catch (std::bad_alloc &) { return NPERR_OUT_OF_MEMORY_ERROR; *************** *** 376,380 **** */ ! delete static_cast<PluginInstance *>(instance->pdata); instance->pdata = 0; --- 398,402 ---- */ ! delete static_cast<plugin_instance *>(instance->pdata); instance->pdata = 0; *************** *** 387,392 **** try { assert(window); ! static_cast<PluginInstance *>(instance->pdata) ! ->SetWindow(*window); } catch (std::bad_alloc &) { return NPERR_OUT_OF_MEMORY_ERROR; --- 409,414 ---- try { assert(window); ! static_cast<plugin_instance *>(instance->pdata) ! ->set_window(*window); } catch (std::bad_alloc &) { return NPERR_OUT_OF_MEMORY_ERROR; *************** *** 405,415 **** assert(instance->pdata); ! PluginInstance & pluginInstance = ! *static_cast<PluginInstance *>(instance->pdata); std::ostringstream command; command << "new-stream " << ptrdiff_t(stream) << ' ' << type << ' ' << stream->url << '\n'; ! const ssize_t bytes_written = pluginInstance.WriteCommand(command.str()); return (bytes_written < 0) ? NPERR_GENERIC_ERROR --- 427,437 ---- assert(instance->pdata); ! plugin_instance & pluginInstance = ! *static_cast<plugin_instance *>(instance->pdata); std::ostringstream command; command << "new-stream " << ptrdiff_t(stream) << ' ' << type << ' ' << stream->url << '\n'; ! const ssize_t bytes_written = pluginInstance.write_command(command.str()); return (bytes_written < 0) ? NPERR_GENERIC_ERROR *************** *** 423,432 **** if (!instance || !instance->pdata) { return NPERR_INVALID_INSTANCE_ERROR; } ! PluginInstance & pluginInstance = ! *static_cast<PluginInstance *>(instance->pdata); std::ostringstream command; command << "destroy-stream " << ptrdiff_t(stream) << '\n'; ! const ssize_t bytes_written = pluginInstance.WriteCommand(command.str()); return (bytes_written < 0) ? NPERR_GENERIC_ERROR --- 445,454 ---- if (!instance || !instance->pdata) { return NPERR_INVALID_INSTANCE_ERROR; } ! plugin_instance & pluginInstance = ! *static_cast<plugin_instance *>(instance->pdata); std::ostringstream command; command << "destroy-stream " << ptrdiff_t(stream) << '\n'; ! const ssize_t bytes_written = pluginInstance.write_command(command.str()); return (bytes_written < 0) ? NPERR_GENERIC_ERROR *************** *** 466,471 **** if (!instance || !instance->pdata) { return 0; } ! PluginInstance & pluginInstance = ! *static_cast<PluginInstance *>(instance->pdata); std::ostringstream command; --- 488,493 ---- if (!instance || !instance->pdata) { return 0; } ! plugin_instance & pluginInstance = ! *static_cast<plugin_instance *>(instance->pdata); std::ostringstream command; *************** *** 475,479 **** command.put(static_cast<char *>(buffer)[i]); } ! const ssize_t bytes_written = pluginInstance.WriteCommand(command.str()); return bytes_written; // The number of bytes accepted. --- 497,501 ---- command.put(static_cast<char *>(buffer)[i]); } ! const ssize_t bytes_written = pluginInstance.write_command(command.str()); return bytes_written; // The number of bytes accepted. *************** *** 551,593 **** } ! NPError NPP_GetValue(const NPP instance, const NPPVariable variable, void * const value) { ! if (!instance) { return NPERR_INVALID_INSTANCE_ERROR; } NPError err = NPERR_NO_ERROR; ! static const nsIID scriptableIID = VRMLBROWSER_IID; ! nsISupports * scriptablePeer = 0; ! nsIID * scriptableIID_ptr = 0; ! PluginInstance * pluginInstance = 0; switch (variable) { - case NPPVpluginScriptableInstance: - assert(instance->pdata); - pluginInstance = - static_cast<PluginInstance *>(instance->pdata); - scriptablePeer = pluginInstance->GetScriptablePeer(); - assert(scriptablePeer); - // - // Add reference for the caller requesting the object. - // - NS_ADDREF(scriptablePeer); - *static_cast<nsISupports **>(value) = scriptablePeer; - break; - case NPPVpluginScriptableIID: - try { - scriptableIID_ptr = - static_cast<nsIID *>(NPN_MemAlloc(sizeof (nsIID))); - if (!scriptableIID_ptr) { throw std::bad_alloc(); } - *scriptableIID_ptr = scriptableIID; - *static_cast<nsIID **>(value) = scriptableIID_ptr; - } catch (std::bad_alloc &) { - err = NPERR_OUT_OF_MEMORY_ERROR; - } - break; case NPPVpluginNeedsXEmbed: *static_cast<PRBool *>(value) = PR_TRUE; break; default: err = NP_GetValue(instance, variable, value); --- 573,595 ---- } ! NPError NPP_GetValue(const NPP npp, const NPPVariable variable, void * const value) { ! if (!npp) { return NPERR_INVALID_INSTANCE_ERROR; } NPError err = NPERR_NO_ERROR; ! plugin_instance * instance = 0; switch (variable) { case NPPVpluginNeedsXEmbed: *static_cast<PRBool *>(value) = PR_TRUE; break; + case NPPVpluginScriptableNPObject: + assert(npp->pdata); + instance = static_cast<plugin_instance *>(npp->pdata); + NPN_RetainObject(instance->npobj); + *static_cast<NPObject **>(value) = instance->npobj; + break; default: err = NP_GetValue(instance, variable, value); *************** *** 785,992 **** } ! namespace { ! ! void printerr(const char * str) ! { ! console_service->LogStringMessage(NS_ConvertUTF8toUTF16(str).get()); ! } ! ! ScriptablePeer::ScriptablePeer(PluginInstance & pluginInstance): ! pluginInstance(pluginInstance) ! { ! NS_INIT_ISUPPORTS(); ! } ! ScriptablePeer::~ScriptablePeer() ! {} ! NS_IMPL_ISUPPORTS2(ScriptablePeer, nsIClassInfo, VrmlBrowser) ! /////////////////////////////////////////////////////////////////////////// ! // ! // nsIClassInfo implementation ! // ! NS_IMETHODIMP ScriptablePeer::GetFlags(PRUint32 * aFlags) ! { ! *aFlags = nsIClassInfo::PLUGIN_OBJECT | nsIClassInfo::DOM_OBJECT; ! return NS_OK; ! } ! NS_IMETHODIMP ! ScriptablePeer:: ! GetImplementationLanguage(PRUint32 * aImplementationLanguage) ! { ! *aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS; ! return NS_OK; ! } ! NS_IMETHODIMP ScriptablePeer::GetInterfaces(PRUint32 * /* count */, ! nsIID *** /* array */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ScriptablePeer::GetHelperForLanguage(PRUint32 /* language */, ! nsISupports ** /* _retval */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ScriptablePeer::GetContractID(char ** /* aContractID */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ! ScriptablePeer::GetClassDescription(char ** /* aClassDescription */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ScriptablePeer::GetClassID(nsCID ** /* aClassID */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ScriptablePeer::GetClassIDNoAlloc(nsCID * /* aClassIDNoAlloc */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! /////////////////////////////////////////////////////////////////////////// ! // ! // VrmlBrowser implementation ! // ! NS_IMETHODIMP ScriptablePeer::GetName(char ** _retval) ! { ! if (!_retval) { return NS_ERROR_NULL_POINTER; } ! const std::string name; ! const size_t bufferSize = sizeof (char) * (name.length() + 1); ! *_retval = static_cast<char *>(nsMemory::Clone(name.c_str(), ! bufferSize)); ! if (!*_retval) { return NS_ERROR_OUT_OF_MEMORY; } ! return NS_OK; ! } ! NS_IMETHODIMP ScriptablePeer::GetVersion(char ** _retval) ! { ! if (!_retval) { return NS_ERROR_NULL_POINTER; } ! const std::string version; ! const size_t bufferSize = sizeof (char) * (version.length() + 1); ! *_retval = static_cast<char *>(nsMemory::Clone(version.c_str(), ! bufferSize)); ! if (!*_retval) { return NS_ERROR_OUT_OF_MEMORY; } ! return NS_OK; ! } ! NS_IMETHODIMP ScriptablePeer::GetCurrentSpeed(float * /* _retval */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::GetCurrentFrameRate(float * /* _retval */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::GetWorldURL(char ** /* _retval */) { ! return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHODIMP ScriptablePeer::ReplaceWorld(PRUint32 /* nodeArraySize */, - VrmlNode ** /* nodeArray */) - { - return NS_ERROR_NOT_IMPLEMENTED; - } ! NS_IMETHODIMP ScriptablePeer::LoadURL(PRUint32 /* urlArraySize */, ! const char ** /* url */, ! PRUint32 /* paramArraySize */, ! const char ** /* parameter */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ScriptablePeer::SetDescription(const char * /* description */) { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ! ScriptablePeer::CreateVrmlFromString(const char * /* vrmlSyntax */, ! PRUint32 * /* nodeArraySize */, ! VrmlNode *** /* nodeArray */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ScriptablePeer::CreateVrmlFromURL(PRUint32 /* urlArraySize */, ! const char ** /* url */, ! VrmlNode * /* node */, ! const char * /* event */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::GetNode(const char * /* name */, ! VrmlNode ** /* _retval */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::AddRoute(VrmlNode * /* fromNode */, ! const char * /* fromEventOut */, ! VrmlNode * /* toNode */, ! const char * /* toEventIn */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::DeleteRoute(VrmlNode * /* fromNode */, ! const char * /* fromEventOut */, ! VrmlNode * /* toNode */, ! const char * /* toEvent */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::BeginUpdate() { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::EndUpdate() { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::Dispose() { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ! ScriptablePeer::AddBrowserListener(VrmlBrowserListener * /* listener */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ! ScriptablePeer::RemoveBrowserListener(VrmlBrowserListener * /* listener */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! PluginInstance::PluginInstance(const NPP npp) throw (std::bad_alloc): npp(npp), window(0), --- 787,1033 ---- } ! void NPN_ReleaseVariantValue(NPVariant * variant) ! { ! CallNPN_ReleaseVariantValueProc(mozillaFuncs.releasevariantvalue, variant); ! } ! NPIdentifier NPN_GetStringIdentifier(const NPUTF8 * name) ! { ! return CallNPN_GetStringIdentifierProc(mozillaFuncs.getstringidentifier, ! name); ! } ! void NPN_GetStringIdentifiers(const NPUTF8 ** names, ! int32_t nameCount, ! NPIdentifier * identifiers) ! { ! CallNPN_GetStringIdentifiersProc(mozillaFuncs.getstringidentifiers, ! names, ! nameCount, ! identifiers); ! } ! NPIdentifier NPN_GetIntIdentifier(int32_t intid) ! { ! return CallNPN_GetIntIdentifierProc(mozillaFuncs.getintidentifier, intid); ! } ! bool NPN_IdentifierIsString(NPIdentifier * identifier) ! { ! return CallNPN_IdentifierIsStringProc(mozillaFuncs.identifierisstring, ! identifier); ! } ! NPUTF8 * NPN_UTF8FromIdentifier(NPIdentifier identifier) ! { ! return CallNPN_UTF8FromIdentifierProc(mozillaFuncs.utf8fromidentifier, ! identifier); ! } ! int32_t NPN_IntFromIdentifier(NPIdentifier identifier) ! { ! return CallNPN_IntFromIdentifierProc(mozillaFuncs.intfromidentifier, ! identifier); ! } ! NPObject * NPN_CreateObject(NPP npp, NPClass * aClass) ! { ! return CallNPN_CreateObjectProc(mozillaFuncs.createobject, npp, aClass); ! } ! NPObject * NPN_RetainObject(NPObject * npobj) ! { ! return CallNPN_RetainObjectProc(mozillaFuncs.retainobject, npobj); ! } ! void NPN_ReleaseObject(NPObject * npobj) ! { ! CallNPN_ReleaseObjectProc(mozillaFuncs.releaseobject, npobj); ! } ! bool NPN_Invoke(NPP npp, NPObject * npobj, NPIdentifier methodName, ! const NPVariant * args, uint32_t argCount, NPVariant * result) ! { ! return CallNPN_InvokeProc(mozillaFuncs.invoke, ! npp, npobj, methodName, args, argCount, result); ! } ! bool NPN_InvokeDefault(NPP npp, NPObject * npobj, const NPVariant * args, ! uint32_t argCount, NPVariant * result) ! { ! return CallNPN_InvokeDefaultProc(mozillaFuncs.invokeDefault, ! npp, npobj, args, argCount, result); ! } ! bool NPN_Evaluate(NPP npp, NPObject * npobj, NPString * script, ! NPVariant * result) ! { ! return CallNPN_EvaluateProc(mozillaFuncs.evaluate, npp, npobj, script, ! result); ! } ! bool NPN_GetProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName, ! NPVariant * result) ! { ! return CallNPN_GetPropertyProc(mozillaFuncs.getproperty, ! npp, npobj, propertyName, result); ! } ! bool NPN_SetProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName, ! const NPVariant * result) ! { ! return CallNPN_SetPropertyProc(mozillaFuncs.setproperty, ! npp, npobj, propertyName, result); ! } ! bool NPN_RemoveProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName) ! { ! return CallNPN_RemovePropertyProc(mozillaFuncs.removeproperty, ! npp, npobj, propertyName); ! } ! bool NPN_HasProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName) ! { ! return CallNPN_HasPropertyProc(mozillaFuncs.hasproperty, ! npp, npobj, propertyName); ! } ! bool NPN_HasMethod(NPP npp, NPObject * npobj, NPIdentifier methodName) ! { ! return CallNPN_HasMethodProc(mozillaFuncs.hasmethod, ! npp, npobj, methodName); ! } ! void NPN_SetException(NPObject * npobj, const NPUTF8 * message) ! { ! return CallNPN_SetExceptionProc(mozillaFuncs.setexception, npobj, message); ! } ! namespace { ! boost::scoped_ptr<const script_callback_map> script_callback_map::instance_; ! script_callback_map::script_callback_map() { ! using std::make_pair; ! this->insert(make_pair(NPN_GetStringIdentifier("getName"), ! &plugin_instance::get_name)); ! this->insert(make_pair(NPN_GetStringIdentifier("getVersion"), ! &plugin_instance::get_version)); } ! const script_callback_map & script_callback_map::instance() { ! if (!script_callback_map::instance_) { ! script_callback_map::instance_.reset(new script_callback_map); ! } ! return *script_callback_map::instance_; } ! void printerr(const char * str) { ! fprintf(stderr, "%s\n", str); } ! struct OpenVRMLNPObject { ! NPObject npobj; ! NPP npp; ! }; ! NPObject * openvrmlnpobject_allocate(NPP npp, NPClass *) { ! OpenVRMLNPObject * const npobj = ! static_cast<OpenVRMLNPObject *>( ! NPN_MemAlloc(sizeof (OpenVRMLNPObject))); ! npobj->npp = npp; ! return static_cast<NPObject *>(static_cast<void *>(npobj)); } ! void openvrmlnpobject_deallocate(NPObject * const npobj) { ! NPN_MemFree(npobj); } ! void openvrmlnpobject_invalidate(NPObject * /* npobj */) ! {} ! ! bool openvrmlnpobject_hasMethod(NPObject *, const NPIdentifier name) { ! const script_callback_map::const_iterator pos = ! script_callback_map::instance().find(name); ! return pos != script_callback_map::instance().end(); } ! bool openvrmlnpobject_invoke(NPObject * const npobj, ! const NPIdentifier name, ! const NPVariant * const args, ! const uint32_t argCount, ! NPVariant * const result) { ! const script_callback_map::const_iterator pos = ! script_callback_map::instance().find(name); ! assert(pos != script_callback_map::instance().end()); ! ! OpenVRMLNPObject * const openvrml_npobj = ! static_cast<OpenVRMLNPObject *>(static_cast<void *>(npobj)); ! ! plugin_instance * const instance = ! static_cast<plugin_instance *>(openvrml_npobj->npp->pdata); ! ! return (instance->*(pos->second))(args, argCount, result); } ! bool openvrmlnpobject_invokeDefault(NPObject * /* npobj */, ! const NPVariant * /* args */, ! uint32_t /* argCount */, ! NPVariant * /* result */) { ! return false; } ! bool openvrmlnpobject_hasProperty(NPObject * /* npobj */, ! NPIdentifier /* name */) { ! return false; } ! bool openvrmlnpobject_getProperty(NPObject * /* npobj */, ! NPIdentifier /* name */, ! NPVariant * /* result */) { ! return false; } ! bool openvrmlnpobject_setProperty(NPObject * /* npobj */, ! NPIdentifier /* name */, ! const NPVariant * /* value */) { ! return false; } ! bool openvrmlnpobject_removeProperty(NPObject * /* npobj */, ! NPIdentifier /* name */) { ! return false; } + NPClass npclass = { + NP_CLASS_STRUCT_VERSION, + openvrmlnpobject_allocate, + openvrmlnpobject_deallocate, + openvrmlnpobject_invalidate, + openvrmlnpobject_hasMethod, + openvrmlnpobject_invoke, + openvrmlnpobject_invokeDefault, + openvrmlnpobject_hasProperty, + openvrmlnpobject_getProperty, + openvrmlnpobject_setProperty, + openvrmlnpobject_removeProperty + }; ! plugin_instance::plugin_instance(const NPP npp) throw (std::bad_alloc): npp(npp), window(0), *************** *** 998,1005 **** request_channel(0), request_channel_watch_id(0), ! scriptablePeer(new ScriptablePeer(*this)) ! {} ! PluginInstance::~PluginInstance() throw () { if (this->request_channel_watch_id) { --- 1039,1048 ---- request_channel(0), request_channel_watch_id(0), ! npobj(NPN_CreateObject(this->npp, &npclass)) ! { ! if (!this->npobj) { throw std::bad_alloc(); } ! } ! plugin_instance::~plugin_instance() throw () { if (this->request_channel_watch_id) { *************** *** 1040,1051 **** g_io_channel_unref(this->command_channel); } - } ! nsISupports * PluginInstance::GetScriptablePeer() throw () ! { ! return this->scriptablePeer; } ! void PluginInstance::SetWindow(NPWindow & window) throw (std::bad_alloc) { --- 1083,1091 ---- g_io_channel_unref(this->command_channel); } ! NPN_ReleaseObject(this->npobj); } ! void plugin_instance::set_window(NPWindow & window) throw (std::bad_alloc) { *************** *** 1176,1183 **** } ! void PluginInstance::HandleEvent(void *) throw () {} ! ssize_t PluginInstance::WriteCommand(const std::string & command) { if (!this->command_channel) { return 0; } --- 1216,1223 ---- } ! void plugin_instance::HandleEvent(void *) throw () {} ! ssize_t plugin_instance::write_command(const std::string & command) { if (!this->command_channel) { return 0; } *************** *** 1213,1216 **** --- 1253,1280 ---- } + bool plugin_instance::get_name(const NPVariant * const args, + const uint32_t argCount, + NPVariant * const result) + { + static const std::string name = PACKAGE_NAME; + NPUTF8 * const name_str = + static_cast<NPUTF8 *>(NPN_MemAlloc(sizeof (NPUTF8) * name.length())); + std::copy(name.begin(), name.end(), name_str); + STRINGN_TO_NPVARIANT(name_str, name.length(), *result); + return true; + } + + bool plugin_instance::get_version(const NPVariant * const args, + const uint32_t argCount, + NPVariant * const result) + { + static const std::string ver = PACKAGE_VERSION; + NPUTF8 * const ver_str = + static_cast<NPUTF8 *>(NPN_MemAlloc(sizeof (NPUTF8) * ver.length())); + std::copy(ver.begin(), ver.end(), ver_str); + STRINGN_TO_NPVARIANT(ver_str, ver.length(), *result); + return true; + } + gboolean request_data_available(GIOChannel * const source, GIOCondition, *************** *** 1219,1223 **** using std::string; ! PluginInstance & pluginInstance = *static_cast<PluginInstance *>(data); gchar c; --- 1283,1287 ---- using std::string; ! plugin_instance & pluginInstance = *static_cast<plugin_instance *>(data); gchar c; *************** *** 1257,1262 **** command << "get-url-result " << url << ' ' << result << '\n'; const ssize_t bytes_written = ! pluginInstance.WriteCommand(command.str()); ! if (bytes_written != command.str().length()) { // XXX // XXX Do what here? Console message? --- 1321,1326 ---- command << "get-url-result " << url << ' ' << result << '\n'; const ssize_t bytes_written = ! pluginInstance.write_command(command.str()); ! if (bytes_written != ssize_t(command.str().length())) { // XXX // XXX Do what here? Console message? Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/mozilla-plugin/src/Makefile.am,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Makefile.am 1 Oct 2006 05:47:07 -0000 1.14 --- Makefile.am 9 Oct 2006 03:09:56 -0000 1.15 *************** *** 5,17 **** AM_CXXFLAGS = @MOZILLA_PLUGIN_CFLAGS@ @GTK_CFLAGS@ - idldir = $(datadir)/idl/openvrml-@PACKAGE_VERSION@ - mozpluginsdir = $(libdir)/mozilla/plugins if ENABLE_MOZILLA_PLUGIN mozplugins_LTLIBRARIES = openvrml.la - mozplugins_DATA = openvrml.xpt endif - dist_idl_DATA = openvrml.idl openvrml_la_SOURCES = openvrml.cpp --- 5,13 ---- *************** *** 22,33 **** EXTRA_DIST = $(openvrml_la_SOURCES) - - BUILT_SOURCES = openvrml.h - - CLEANFILES = openvrml.h openvrml.xpt - - .idl.h: - $(XPIDL) $(XPIDLFLAGS) @MOZILLA_XPIDLFLAGS@ -m header $< - - .idl.xpt: - $(XPIDL) $(XPIDLFLAGS) @MOZILLA_XPIDLFLAGS@ -m typelib $< --- 18,19 ---- |
From: Braden M. <br...@us...> - 2006-10-09 03:09:57
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22586 Modified Files: ChangeLog configure-gcc-dbg Log Message: Use the npruntime extensions to NPAPI to make the plug-in scriptable instead of XPCOM. Index: configure-gcc-dbg =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure-gcc-dbg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** configure-gcc-dbg 1 Oct 2006 05:46:54 -0000 1.2 --- configure-gcc-dbg 9 Oct 2006 03:09:55 -0000 1.3 *************** *** 1,3 **** #!/bin/bash ! ./$(dirname $0)/configure -C --disable-static --enable-gtk-doc CXXFLAGS='-g -O0 -Wall -Wextra -Wno-missing-braces' $* --- 1,3 ---- #!/bin/bash ! ./$(dirname $0)/configure -C --disable-static --enable-gtk-doc CXXFLAGS='-g -O0 -Wall -Wextra -Wno-missing-braces -Wno-missing-field-initializers' $* Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1346 retrieving revision 1.1347 diff -C2 -d -r1.1346 -r1.1347 *** ChangeLog 5 Oct 2006 05:14:14 -0000 1.1346 --- ChangeLog 9 Oct 2006 03:09:55 -0000 1.1347 *************** *** 1,2 **** --- 1,100 ---- + 2006-10-08 Braden McDaniel <br...@en...> + + Use the npruntime extensions to NPAPI to make the plug-in + scriptable instead of XPCOM. + + * mozilla-plugin/configure.ac: Removed XPCOM-related checks. + * mozilla-plugin/src/Makefile.am: Removed references to + openvrml.idl and files generated from it. + * mozilla-plugin/src/openvrml.cpp + (script_callback_map): A singleton to map NPIdentifiers to + functions. + (plugin_instance::scriptablePeer): Removed member. + (plugin_instance::npobj): Added member; the NPObject associated + with the plug-in instance. + (plugin_instance::get_name(const NPVariant *, uint32_t, + NPVariant*)): Browser.getName() implementation. + (plugin_instance::get_version(const NPVariant *, uint32_t, + NPVariant*)): Browser.getVersion() implementation. + (ScriptablePeer): Removed class. + (NP_Initialize(NPNetscapeFuncs *, NPPluginFuncs *)): Initialize + mozillaFuncs with the npruntime API function pointers. Removed + initialization of the console_service pointer to the Mozilla XPCOM + console service. + (NPP_GetValue(NPP, NPPVariable, void *)): Removed support for + NPPVpluginScriptableInstance and NPPVpluginScriptableIID. Added + support for NPPVpluginScriptableNPObject. + (printerr(const char *)): Write to stderr rather than the + JavaScript console. + (NPN_ReleaseVariantValue(NPVariant *)): Added npruntime function. + (NPN_GetStringIdentifier(const NPUTF8 *)): Added npruntime + function. + (NPN_GetStringIdentifiers(const NPUTF8 **, int32_t, + NPIdentifier*)): Added npruntime function. + (NPN_GetIntIdentifier(int32_t)): Added npruntime function. + (NPN_IdentifierIsString(NPIdentifier *)): Added npruntime + function. + (NPN_UTF8FromIdentifier(NPIdentifier)): Added npruntime function. + (NPN_IntFromIdentifier(NPIdentifier)): Added npruntime function. + (NPN_CreateObject(NPP, NPClass *)): Added npruntime function. + (NPN_RetainObject(NPObject *)): Added npruntime function. + (NPN_ReleaseObject(NPObject *)): Added npruntime function. + (NPN_Invoke(NPP, NPObject *, NPIdentifier, const NPVariant *, + uint32_t, NPVariant *)): Added npruntime function. + (NPN_InvokeDefault(NPP, NPObject *, const NPVariant *, uint32_t, + NPVariant *)): Added npruntime function. + (NPN_Evaluate(NPP, NPObject *, NPString *, NPVariant *)): Added + npruntime function. + (NPN_GetProperty(NPP, NPObject *, NPIdentifier, NPVariant *)): + Added npruntime function. + (NPN_SetProperty(NPP, NPObject *, NPIdentifier, const + NPVariant*)): Added npruntime function. + (NPN_RemoveProperty(NPP, NPObject *, NPIdentifier)): Added + npruntime function. + (NPN_HasProperty(NPP, NPObject *, NPIdentifier)): Added npruntime + function. + (NPN_HasMethod(NPP, NPObject *, NPIdentifier)): Added npruntime + function. + (NPN_SetException(NPObject *, const NPUTF8 *)): Added npruntime + function. + (script_callback_map::instance_): Singleton instance. + (script_callback_map::script_callback_map()): Initialize the map + with pointers to the script method implementations. + (script_callback_map::instance()): Get the instance. + (OpenVRMLNPObject): NPObject corresponding to the plug-in + instance. + (openvrmlnpobject_allocate(NPP, NPClass *)): "allocate" callback + function for the plug-in's NPObject. + (openvrmlnpobject_deallocate(NPObject *)): "deallocate" callback + function for the plug-in's NPObject. + (openvrmlnpobject_invalidate(NPObject *)): "invalidate" callback + function for the plug-in's NPObject. + (openvrmlnpobject_hasMethod(NPObject *, NPIdentifier)): + "hasMethod" callback function for the plug-in's NPObject. + (openvrmlnpobject_invoke(NPObject *, NPIdentifier, const + NPVariant*, uint32_t, NPVariant *)): "invoke" callback function + for the plug-in's NPObject. + (openvrmlnpobject_invokeDefault(NPObject *, const NPVariant *, + uint32_t, NPVariant *)): "invokeDefault" callback function for the + plug-in's NPObject. + (openvrmlnpobject_getProperty(NPObject *, NPIdentifier, + NPVariant*)): "getProperty" callback function for the plug-in's + NPObject. + (openvrmlnpobject_setProperty(NPObject *, NPIdentifier, const + NPVariant *)): "setProperty" callback function for the plug-in's + NPObject. + (openvrmlnpobject_removeProperty(NPObject *, NPIdentifier)): + "removeProperty" callback function for the plug-in's NPObject. + (npclass): NPClass object for the plug-in's NPObject. + (plugin_instance::plugin_instance(NPP)): Initialize the plug-in + instance's NPObject pointer. + (plugin_instance::~plugin_instance()): Call NPN_ReleaseObject on + the plug-in instance's NPObject. + (plugin_instance::get_name(const NPVariant *, uint32_t, + NPVariant*)): Return the VRML browser name. + (plugin_instance::get_version(const NPVariant *, uint32_t, + NPVariant *)): Return the VRML browser version. + * mozilla-plugin/src/openvrml.idl: Removed file. + 2006-10-05 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-10-09 03:09:57
|
Update of /cvsroot/openvrml/openvrml/mozilla-plugin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22586/mozilla-plugin Modified Files: configure.ac Log Message: Use the npruntime extensions to NPAPI to make the plug-in scriptable instead of XPCOM. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/mozilla-plugin/configure.ac,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** configure.ac 1 Oct 2006 05:46:56 -0000 1.15 --- configure.ac 9 Oct 2006 03:09:56 -0000 1.16 *************** *** 16,24 **** ACX_PTHREAD(, [AC_MSG_FAILURE([pthread support not found])]) - PKG_CHECK_MODULES([MOZILLA_XPCOM], [mozilla-xpcom], , [have_mozilla_xpcom=no]) - if test "X$PKG_CONFIG" != "Xno" -a -z "MOZILLA_XPCOM_PKG_ERRORS"; then - mozincludedir=`$PKG_CONFIG --variable=includedir mozilla-xpcom` - MOZILLA_XPCOM_CFLAGS="-I$mozincludedir $MOZILLA_XPCOM_CFLAGS" - fi PKG_CHECK_MODULES([MOZILLA_PLUGIN], [mozilla-plugin >= 1.6], , [have_mozilla_plugin=no]) --- 16,19 ---- *************** *** 26,48 **** mozprefix=`$PKG_CONFIG --variable=prefix mozilla-plugin` mozlibdir=`$PKG_CONFIG --variable=libdir mozilla-plugin` - AC_ARG_VAR([XPIDL], [Mozilla XPCOM IDL compiler]) - AC_ARG_VAR([XPIDLFLAGS], [Mozilla XPCOM IDL compiler flags]) - AC_PATH_PROG([XPIDL], [xpidl], , ["$mozlibdir"]) - mozidldir="$mozprefix/share/idl/mozilla-$mozversion" - MOZILLA_XPIDLFLAGS="-I $mozidldir" AC_SUBST([mozlibdir]) - AC_SUBST([MOZILLA_XPIDLFLAGS]) PKG_CHECK_MODULES([GTK], [gtk+-2.0], , [have_gtk=no]) - AX_CHECK_GL - AC_PATH_XTRA - if test "X$enable_mozilla_plugin" != "Xno"; then if test "X$have_mozilla_plugin" = "Xno"; then AC_MSG_FAILURE([Mozilla plug-in development headers are required to build the Mozilla plug-in.]) fi - if test -z "$XPIDL"; then - AC_MSG_FAILURE([xpidl is required to build the Mozilla plug-in]) - fi if test "X$have_gtk" = "Xno"; then AC_MSG_FAILURE([GTK+ is required to build the Mozilla plug-in]) --- 21,31 ---- |
From: Braden M. <br...@us...> - 2006-10-09 03:09:06
|
Update of /cvsroot/openvrml/openvrml/mozilla-plugin/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22198/mozilla-plugin/src Modified Files: Tag: OpenVRML-0_16-BRANCH Makefile.am openvrml.cpp Removed Files: Tag: OpenVRML-0_16-BRANCH openvrml.idl Log Message: Use the npruntime extensions to NPAPI to make the plug-in scriptable instead of XPCOM. --- openvrml.idl DELETED --- Index: openvrml.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/mozilla-plugin/src/openvrml.cpp,v retrieving revision 1.37.2.2 retrieving revision 1.37.2.3 diff -C2 -d -r1.37.2.2 -r1.37.2.3 *** openvrml.cpp 1 Oct 2006 05:48:29 -0000 1.37.2.2 --- openvrml.cpp 9 Oct 2006 03:09:02 -0000 1.37.2.3 *************** *** 19,24 **** // ! # include <cerrno> ! # include <list> # include <memory> # include <sstream> --- 19,23 ---- // ! # include <map> # include <memory> # include <sstream> *************** *** 29,39 **** # include <boost/lexical_cast.hpp> # include <boost/noncopyable.hpp> # include <mozilla-config.h> # include <npupp.h> - # include <nsCOMPtr.h> - # include <nsIServiceManagerUtils.h> - # include <nsMemory.h> - # include <nsString.h> - # include <nsIConsoleService.h> # if defined MOZ_X11 # include <fcntl.h> --- 28,34 ---- # include <boost/lexical_cast.hpp> # include <boost/noncopyable.hpp> + # include <boost/scoped_ptr.hpp> # include <mozilla-config.h> # include <npupp.h> # if defined MOZ_X11 # include <fcntl.h> *************** *** 42,46 **** # error Unsupported toolkit. # endif - # include "openvrml.h" namespace { --- 37,40 ---- *************** *** 48,59 **** void printerr(const char * str); - class ScriptablePeer; - extern "C" gboolean request_data_available(GIOChannel * source, GIOCondition condition, gpointer data); ! class PluginInstance : boost::noncopyable { ! friend class ScriptablePeer; friend gboolean request_data_available(GIOChannel * source, GIOCondition condition, --- 42,71 ---- void printerr(const char * str); extern "C" gboolean request_data_available(GIOChannel * source, GIOCondition condition, gpointer data); + class plugin_instance; ! typedef bool (plugin_instance::*script_callback_t)(const NPVariant *, ! uint32_t, ! NPVariant *); ! ! // ! // Mozilla doesn't like us to use NPN_GetStringIdentifier during static ! // initialization; so this is a singleton. ! // ! class script_callback_map : public std::map<NPIdentifier, ! script_callback_t>, ! boost::noncopyable { ! static boost::scoped_ptr<const script_callback_map> instance_; ! ! script_callback_map(); ! ! public: ! static const script_callback_map & instance(); ! }; ! ! ! class plugin_instance : boost::noncopyable { friend gboolean request_data_available(GIOChannel * source, GIOCondition condition, *************** *** 68,93 **** guint request_channel_watch_id; std::stringstream request_line; - nsCOMPtr<VrmlBrowser> scriptablePeer; public: ! explicit PluginInstance(NPP npp) throw (std::bad_alloc); ! ~PluginInstance() throw (); ! ! nsISupports * GetScriptablePeer() throw (); ! void SetWindow(NPWindow & window) throw (std::bad_alloc); ! void HandleEvent(void * event) throw (); ! ssize_t WriteCommand(const std::string & command); ! }; ! class ScriptablePeer : public nsIClassInfo, public VrmlBrowser { ! PluginInstance & pluginInstance; ! public: ! explicit ScriptablePeer(PluginInstance & pluginInstance); ! ~ScriptablePeer(); ! NS_DECL_ISUPPORTS ! NS_DECL_NSICLASSINFO ! NS_DECL_VRMLBROWSER }; } // namespace --- 80,101 ---- guint request_channel_watch_id; std::stringstream request_line; public: ! NPObject * const npobj; ! explicit plugin_instance(NPP npp) throw (std::bad_alloc); ! ~plugin_instance() throw (); ! void set_window(NPWindow & window) throw (std::bad_alloc); ! void HandleEvent(void * event) throw (); ! ssize_t write_command(const std::string & command); ! // ! // Scripting API method implementations. ! // ! bool get_name(const NPVariant * args, uint32_t argCount, ! NPVariant * result); ! bool get_version(const NPVariant * args, uint32_t argCount, ! NPVariant * result); }; } // namespace *************** *** 100,104 **** namespace { NPNetscapeFuncs mozillaFuncs; - nsCOMPtr<nsIConsoleService> console_service; } --- 108,111 ---- *************** *** 151,172 **** // table could be bigger than what we expect. // ! mozillaFuncs.version = mozTable->version; ! mozillaFuncs.size = mozTable->size; ! mozillaFuncs.posturl = mozTable->posturl; ! mozillaFuncs.geturl = mozTable->geturl; ! mozillaFuncs.geturlnotify = mozTable->geturlnotify; ! mozillaFuncs.requestread = mozTable->requestread; ! mozillaFuncs.newstream = mozTable->newstream; ! mozillaFuncs.write = mozTable->write; ! mozillaFuncs.destroystream = mozTable->destroystream; ! mozillaFuncs.status = mozTable->status; ! mozillaFuncs.uagent = mozTable->uagent; ! mozillaFuncs.memalloc = mozTable->memalloc; ! mozillaFuncs.memfree = mozTable->memfree; ! mozillaFuncs.memflush = mozTable->memflush; ! mozillaFuncs.reloadplugins = mozTable->reloadplugins; ! mozillaFuncs.getJavaEnv = mozTable->getJavaEnv; ! mozillaFuncs.getJavaPeer = mozTable->getJavaPeer; ! mozillaFuncs.getvalue = mozTable->getvalue; // --- 158,198 ---- // table could be bigger than what we expect. // ! mozillaFuncs.version = mozTable->version; ! mozillaFuncs.size = mozTable->size; ! mozillaFuncs.posturl = mozTable->posturl; ! mozillaFuncs.geturl = mozTable->geturl; ! mozillaFuncs.geturlnotify = mozTable->geturlnotify; ! mozillaFuncs.requestread = mozTable->requestread; ! mozillaFuncs.newstream = mozTable->newstream; ! mozillaFuncs.write = mozTable->write; ! mozillaFuncs.destroystream = mozTable->destroystream; ! mozillaFuncs.status = mozTable->status; ! mozillaFuncs.uagent = mozTable->uagent; ! mozillaFuncs.memalloc = mozTable->memalloc; ! mozillaFuncs.memfree = mozTable->memfree; ! mozillaFuncs.memflush = mozTable->memflush; ! mozillaFuncs.reloadplugins = mozTable->reloadplugins; ! mozillaFuncs.getJavaEnv = mozTable->getJavaEnv; ! mozillaFuncs.getJavaPeer = mozTable->getJavaPeer; ! mozillaFuncs.getvalue = mozTable->getvalue; ! mozillaFuncs.getstringidentifier = mozTable->getstringidentifier; ! mozillaFuncs.getstringidentifiers = mozTable->getstringidentifiers; ! mozillaFuncs.getintidentifier = mozTable->getintidentifier; ! mozillaFuncs.identifierisstring = mozTable->identifierisstring; ! mozillaFuncs.utf8fromidentifier = mozTable->utf8fromidentifier; ! mozillaFuncs.intfromidentifier = mozTable->intfromidentifier; ! mozillaFuncs.createobject = mozTable->createobject; ! mozillaFuncs.retainobject = mozTable->retainobject; ! mozillaFuncs.releaseobject = mozTable->releaseobject; ! mozillaFuncs.invoke = mozTable->invoke; ! mozillaFuncs.invokeDefault = mozTable->invokeDefault; ! mozillaFuncs.evaluate = mozTable->evaluate; ! mozillaFuncs.getproperty = mozTable->getproperty; ! mozillaFuncs.setproperty = mozTable->setproperty; ! mozillaFuncs.removeproperty = mozTable->removeproperty; ! mozillaFuncs.hasproperty = mozTable->hasproperty; ! mozillaFuncs.hasmethod = mozTable->hasmethod; ! mozillaFuncs.releasevariantvalue = mozTable->releasevariantvalue; ! mozillaFuncs.setexception = mozTable->setexception; // *************** *** 222,229 **** # endif // defined MOZ_X11 - nsresult rv; - console_service = do_GetService(NS_CONSOLESERVICE_CONTRACTID, &rv); - if (NS_FAILED(rv)) { return NPERR_GENERIC_ERROR; } - return NPP_Initialize(); } --- 248,251 ---- *************** *** 320,324 **** try { ! instance->pdata = new PluginInstance(instance); } catch (std::bad_alloc &) { return NPERR_OUT_OF_MEMORY_ERROR; --- 342,346 ---- try { ! instance->pdata = new plugin_instance(instance); } catch (std::bad_alloc &) { return NPERR_OUT_OF_MEMORY_ERROR; *************** *** 376,380 **** */ ! delete static_cast<PluginInstance *>(instance->pdata); instance->pdata = 0; --- 398,402 ---- */ ! delete static_cast<plugin_instance *>(instance->pdata); instance->pdata = 0; *************** *** 387,392 **** try { assert(window); ! static_cast<PluginInstance *>(instance->pdata) ! ->SetWindow(*window); } catch (std::bad_alloc &) { return NPERR_OUT_OF_MEMORY_ERROR; --- 409,414 ---- try { assert(window); ! static_cast<plugin_instance *>(instance->pdata) ! ->set_window(*window); } catch (std::bad_alloc &) { return NPERR_OUT_OF_MEMORY_ERROR; *************** *** 405,415 **** assert(instance->pdata); ! PluginInstance & pluginInstance = ! *static_cast<PluginInstance *>(instance->pdata); std::ostringstream command; command << "new-stream " << ptrdiff_t(stream) << ' ' << type << ' ' << stream->url << '\n'; ! const ssize_t bytes_written = pluginInstance.WriteCommand(command.str()); return (bytes_written < 0) ? NPERR_GENERIC_ERROR --- 427,437 ---- assert(instance->pdata); ! plugin_instance & pluginInstance = ! *static_cast<plugin_instance *>(instance->pdata); std::ostringstream command; command << "new-stream " << ptrdiff_t(stream) << ' ' << type << ' ' << stream->url << '\n'; ! const ssize_t bytes_written = pluginInstance.write_command(command.str()); return (bytes_written < 0) ? NPERR_GENERIC_ERROR *************** *** 423,432 **** if (!instance || !instance->pdata) { return NPERR_INVALID_INSTANCE_ERROR; } ! PluginInstance & pluginInstance = ! *static_cast<PluginInstance *>(instance->pdata); std::ostringstream command; command << "destroy-stream " << ptrdiff_t(stream) << '\n'; ! const ssize_t bytes_written = pluginInstance.WriteCommand(command.str()); return (bytes_written < 0) ? NPERR_GENERIC_ERROR --- 445,454 ---- if (!instance || !instance->pdata) { return NPERR_INVALID_INSTANCE_ERROR; } ! plugin_instance & pluginInstance = ! *static_cast<plugin_instance *>(instance->pdata); std::ostringstream command; command << "destroy-stream " << ptrdiff_t(stream) << '\n'; ! const ssize_t bytes_written = pluginInstance.write_command(command.str()); return (bytes_written < 0) ? NPERR_GENERIC_ERROR *************** *** 466,471 **** if (!instance || !instance->pdata) { return 0; } ! PluginInstance & pluginInstance = ! *static_cast<PluginInstance *>(instance->pdata); std::ostringstream command; --- 488,493 ---- if (!instance || !instance->pdata) { return 0; } ! plugin_instance & pluginInstance = ! *static_cast<plugin_instance *>(instance->pdata); std::ostringstream command; *************** *** 475,479 **** command.put(static_cast<char *>(buffer)[i]); } ! const ssize_t bytes_written = pluginInstance.WriteCommand(command.str()); return bytes_written; // The number of bytes accepted. --- 497,501 ---- command.put(static_cast<char *>(buffer)[i]); } ! const ssize_t bytes_written = pluginInstance.write_command(command.str()); return bytes_written; // The number of bytes accepted. *************** *** 551,593 **** } ! NPError NPP_GetValue(const NPP instance, const NPPVariable variable, void * const value) { ! if (!instance) { return NPERR_INVALID_INSTANCE_ERROR; } NPError err = NPERR_NO_ERROR; ! static const nsIID scriptableIID = VRMLBROWSER_IID; ! nsISupports * scriptablePeer = 0; ! nsIID * scriptableIID_ptr = 0; ! PluginInstance * pluginInstance = 0; switch (variable) { - case NPPVpluginScriptableInstance: - assert(instance->pdata); - pluginInstance = - static_cast<PluginInstance *>(instance->pdata); - scriptablePeer = pluginInstance->GetScriptablePeer(); - assert(scriptablePeer); - // - // Add reference for the caller requesting the object. - // - NS_ADDREF(scriptablePeer); - *static_cast<nsISupports **>(value) = scriptablePeer; - break; - case NPPVpluginScriptableIID: - try { - scriptableIID_ptr = - static_cast<nsIID *>(NPN_MemAlloc(sizeof (nsIID))); - if (!scriptableIID_ptr) { throw std::bad_alloc(); } - *scriptableIID_ptr = scriptableIID; - *static_cast<nsIID **>(value) = scriptableIID_ptr; - } catch (std::bad_alloc &) { - err = NPERR_OUT_OF_MEMORY_ERROR; - } - break; case NPPVpluginNeedsXEmbed: *static_cast<PRBool *>(value) = PR_TRUE; break; default: err = NP_GetValue(instance, variable, value); --- 573,595 ---- } ! NPError NPP_GetValue(const NPP npp, const NPPVariable variable, void * const value) { ! if (!npp) { return NPERR_INVALID_INSTANCE_ERROR; } NPError err = NPERR_NO_ERROR; ! plugin_instance * instance = 0; switch (variable) { case NPPVpluginNeedsXEmbed: *static_cast<PRBool *>(value) = PR_TRUE; break; + case NPPVpluginScriptableNPObject: + assert(npp->pdata); + instance = static_cast<plugin_instance *>(npp->pdata); + NPN_RetainObject(instance->npobj); + *static_cast<NPObject **>(value) = instance->npobj; + break; default: err = NP_GetValue(instance, variable, value); *************** *** 785,992 **** } ! namespace { ! ! void printerr(const char * str) ! { ! console_service->LogStringMessage(NS_ConvertUTF8toUTF16(str).get()); ! } ! ! ScriptablePeer::ScriptablePeer(PluginInstance & pluginInstance): ! pluginInstance(pluginInstance) ! { ! NS_INIT_ISUPPORTS(); ! } ! ScriptablePeer::~ScriptablePeer() ! {} ! NS_IMPL_ISUPPORTS2(ScriptablePeer, nsIClassInfo, VrmlBrowser) ! /////////////////////////////////////////////////////////////////////////// ! // ! // nsIClassInfo implementation ! // ! NS_IMETHODIMP ScriptablePeer::GetFlags(PRUint32 * aFlags) ! { ! *aFlags = nsIClassInfo::PLUGIN_OBJECT | nsIClassInfo::DOM_OBJECT; ! return NS_OK; ! } ! NS_IMETHODIMP ! ScriptablePeer:: ! GetImplementationLanguage(PRUint32 * aImplementationLanguage) ! { ! *aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS; ! return NS_OK; ! } ! NS_IMETHODIMP ScriptablePeer::GetInterfaces(PRUint32 * /* count */, ! nsIID *** /* array */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ScriptablePeer::GetHelperForLanguage(PRUint32 /* language */, ! nsISupports ** /* _retval */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ScriptablePeer::GetContractID(char ** /* aContractID */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ! ScriptablePeer::GetClassDescription(char ** /* aClassDescription */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ScriptablePeer::GetClassID(nsCID ** /* aClassID */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ScriptablePeer::GetClassIDNoAlloc(nsCID * /* aClassIDNoAlloc */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! /////////////////////////////////////////////////////////////////////////// ! // ! // VrmlBrowser implementation ! // ! NS_IMETHODIMP ScriptablePeer::GetName(char ** _retval) ! { ! if (!_retval) { return NS_ERROR_NULL_POINTER; } ! const std::string name; ! const size_t bufferSize = sizeof (char) * (name.length() + 1); ! *_retval = static_cast<char *>(nsMemory::Clone(name.c_str(), ! bufferSize)); ! if (!*_retval) { return NS_ERROR_OUT_OF_MEMORY; } ! return NS_OK; ! } ! NS_IMETHODIMP ScriptablePeer::GetVersion(char ** _retval) ! { ! if (!_retval) { return NS_ERROR_NULL_POINTER; } ! const std::string version; ! const size_t bufferSize = sizeof (char) * (version.length() + 1); ! *_retval = static_cast<char *>(nsMemory::Clone(version.c_str(), ! bufferSize)); ! if (!*_retval) { return NS_ERROR_OUT_OF_MEMORY; } ! return NS_OK; ! } ! NS_IMETHODIMP ScriptablePeer::GetCurrentSpeed(float * /* _retval */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::GetCurrentFrameRate(float * /* _retval */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::GetWorldURL(char ** /* _retval */) { ! return NS_ERROR_NOT_IMPLEMENTED; } - NS_IMETHODIMP ScriptablePeer::ReplaceWorld(PRUint32 /* nodeArraySize */, - VrmlNode ** /* nodeArray */) - { - return NS_ERROR_NOT_IMPLEMENTED; - } ! NS_IMETHODIMP ScriptablePeer::LoadURL(PRUint32 /* urlArraySize */, ! const char ** /* url */, ! PRUint32 /* paramArraySize */, ! const char ** /* parameter */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ScriptablePeer::SetDescription(const char * /* description */) { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ! ScriptablePeer::CreateVrmlFromString(const char * /* vrmlSyntax */, ! PRUint32 * /* nodeArraySize */, ! VrmlNode *** /* nodeArray */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; ! } ! NS_IMETHODIMP ScriptablePeer::CreateVrmlFromURL(PRUint32 /* urlArraySize */, ! const char ** /* url */, ! VrmlNode * /* node */, ! const char * /* event */) ! { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::GetNode(const char * /* name */, ! VrmlNode ** /* _retval */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::AddRoute(VrmlNode * /* fromNode */, ! const char * /* fromEventOut */, ! VrmlNode * /* toNode */, ! const char * /* toEventIn */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::DeleteRoute(VrmlNode * /* fromNode */, ! const char * /* fromEventOut */, ! VrmlNode * /* toNode */, ! const char * /* toEvent */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::BeginUpdate() { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::EndUpdate() { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ScriptablePeer::Dispose() { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ! ScriptablePeer::AddBrowserListener(VrmlBrowserListener * /* listener */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! NS_IMETHODIMP ! ScriptablePeer::RemoveBrowserListener(VrmlBrowserListener * /* listener */) { ! return NS_ERROR_NOT_IMPLEMENTED; } ! PluginInstance::PluginInstance(const NPP npp) throw (std::bad_alloc): npp(npp), window(0), --- 787,1033 ---- } ! void NPN_ReleaseVariantValue(NPVariant * variant) ! { ! CallNPN_ReleaseVariantValueProc(mozillaFuncs.releasevariantvalue, variant); ! } ! NPIdentifier NPN_GetStringIdentifier(const NPUTF8 * name) ! { ! return CallNPN_GetStringIdentifierProc(mozillaFuncs.getstringidentifier, ! name); ! } ! void NPN_GetStringIdentifiers(const NPUTF8 ** names, ! int32_t nameCount, ! NPIdentifier * identifiers) ! { ! CallNPN_GetStringIdentifiersProc(mozillaFuncs.getstringidentifiers, ! names, ! nameCount, ! identifiers); ! } ! NPIdentifier NPN_GetIntIdentifier(int32_t intid) ! { ! return CallNPN_GetIntIdentifierProc(mozillaFuncs.getintidentifier, intid); ! } ! bool NPN_IdentifierIsString(NPIdentifier * identifier) ! { ! return CallNPN_IdentifierIsStringProc(mozillaFuncs.identifierisstring, ! identifier); ! } ! NPUTF8 * NPN_UTF8FromIdentifier(NPIdentifier identifier) ! { ! return CallNPN_UTF8FromIdentifierProc(mozillaFuncs.utf8fromidentifier, ! identifier); ! } ! int32_t NPN_IntFromIdentifier(NPIdentifier identifier) ! { ! return CallNPN_IntFromIdentifierProc(mozillaFuncs.intfromidentifier, ! identifier); ! } ! NPObject * NPN_CreateObject(NPP npp, NPClass * aClass) ! { ! return CallNPN_CreateObjectProc(mozillaFuncs.createobject, npp, aClass); ! } ! NPObject * NPN_RetainObject(NPObject * npobj) ! { ! return CallNPN_RetainObjectProc(mozillaFuncs.retainobject, npobj); ! } ! void NPN_ReleaseObject(NPObject * npobj) ! { ! CallNPN_ReleaseObjectProc(mozillaFuncs.releaseobject, npobj); ! } ! bool NPN_Invoke(NPP npp, NPObject * npobj, NPIdentifier methodName, ! const NPVariant * args, uint32_t argCount, NPVariant * result) ! { ! return CallNPN_InvokeProc(mozillaFuncs.invoke, ! npp, npobj, methodName, args, argCount, result); ! } ! bool NPN_InvokeDefault(NPP npp, NPObject * npobj, const NPVariant * args, ! uint32_t argCount, NPVariant * result) ! { ! return CallNPN_InvokeDefaultProc(mozillaFuncs.invokeDefault, ! npp, npobj, args, argCount, result); ! } ! bool NPN_Evaluate(NPP npp, NPObject * npobj, NPString * script, ! NPVariant * result) ! { ! return CallNPN_EvaluateProc(mozillaFuncs.evaluate, npp, npobj, script, ! result); ! } ! bool NPN_GetProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName, ! NPVariant * result) ! { ! return CallNPN_GetPropertyProc(mozillaFuncs.getproperty, ! npp, npobj, propertyName, result); ! } ! bool NPN_SetProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName, ! const NPVariant * result) ! { ! return CallNPN_SetPropertyProc(mozillaFuncs.setproperty, ! npp, npobj, propertyName, result); ! } ! bool NPN_RemoveProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName) ! { ! return CallNPN_RemovePropertyProc(mozillaFuncs.removeproperty, ! npp, npobj, propertyName); ! } ! bool NPN_HasProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName) ! { ! return CallNPN_HasPropertyProc(mozillaFuncs.hasproperty, ! npp, npobj, propertyName); ! } ! bool NPN_HasMethod(NPP npp, NPObject * npobj, NPIdentifier methodName) ! { ! return CallNPN_HasMethodProc(mozillaFuncs.hasmethod, ! npp, npobj, methodName); ! } ! void NPN_SetException(NPObject * npobj, const NPUTF8 * message) ! { ! return CallNPN_SetExceptionProc(mozillaFuncs.setexception, npobj, message); ! } ! namespace { ! boost::scoped_ptr<const script_callback_map> script_callback_map::instance_; ! script_callback_map::script_callback_map() { ! using std::make_pair; ! this->insert(make_pair(NPN_GetStringIdentifier("getName"), ! &plugin_instance::get_name)); ! this->insert(make_pair(NPN_GetStringIdentifier("getVersion"), ! &plugin_instance::get_version)); } ! const script_callback_map & script_callback_map::instance() { ! if (!script_callback_map::instance_) { ! script_callback_map::instance_.reset(new script_callback_map); ! } ! return *script_callback_map::instance_; } ! void printerr(const char * str) { ! fprintf(stderr, "%s\n", str); } ! struct OpenVRMLNPObject { ! NPObject npobj; ! NPP npp; ! }; ! NPObject * openvrmlnpobject_allocate(NPP npp, NPClass *) { ! OpenVRMLNPObject * const npobj = ! static_cast<OpenVRMLNPObject *>( ! NPN_MemAlloc(sizeof (OpenVRMLNPObject))); ! npobj->npp = npp; ! return static_cast<NPObject *>(static_cast<void *>(npobj)); } ! void openvrmlnpobject_deallocate(NPObject * const npobj) { ! NPN_MemFree(npobj); } ! void openvrmlnpobject_invalidate(NPObject * /* npobj */) ! {} ! ! bool openvrmlnpobject_hasMethod(NPObject *, const NPIdentifier name) { ! const script_callback_map::const_iterator pos = ! script_callback_map::instance().find(name); ! return pos != script_callback_map::instance().end(); } ! bool openvrmlnpobject_invoke(NPObject * const npobj, ! const NPIdentifier name, ! const NPVariant * const args, ! const uint32_t argCount, ! NPVariant * const result) { ! const script_callback_map::const_iterator pos = ! script_callback_map::instance().find(name); ! assert(pos != script_callback_map::instance().end()); ! ! OpenVRMLNPObject * const openvrml_npobj = ! static_cast<OpenVRMLNPObject *>(static_cast<void *>(npobj)); ! ! plugin_instance * const instance = ! static_cast<plugin_instance *>(openvrml_npobj->npp->pdata); ! ! return (instance->*(pos->second))(args, argCount, result); } ! bool openvrmlnpobject_invokeDefault(NPObject * /* npobj */, ! const NPVariant * /* args */, ! uint32_t /* argCount */, ! NPVariant * /* result */) { ! return false; } ! bool openvrmlnpobject_hasProperty(NPObject * /* npobj */, ! NPIdentifier /* name */) { ! return false; } ! bool openvrmlnpobject_getProperty(NPObject * /* npobj */, ! NPIdentifier /* name */, ! NPVariant * /* result */) { ! return false; } ! bool openvrmlnpobject_setProperty(NPObject * /* npobj */, ! NPIdentifier /* name */, ! const NPVariant * /* value */) { ! return false; } ! bool openvrmlnpobject_removeProperty(NPObject * /* npobj */, ! NPIdentifier /* name */) { ! return false; } + NPClass npclass = { + NP_CLASS_STRUCT_VERSION, + openvrmlnpobject_allocate, + openvrmlnpobject_deallocate, + openvrmlnpobject_invalidate, + openvrmlnpobject_hasMethod, + openvrmlnpobject_invoke, + openvrmlnpobject_invokeDefault, + openvrmlnpobject_hasProperty, + openvrmlnpobject_getProperty, + openvrmlnpobject_setProperty, + openvrmlnpobject_removeProperty + }; ! plugin_instance::plugin_instance(const NPP npp) throw (std::bad_alloc): npp(npp), window(0), *************** *** 998,1005 **** request_channel(0), request_channel_watch_id(0), ! scriptablePeer(new ScriptablePeer(*this)) ! {} ! PluginInstance::~PluginInstance() throw () { if (this->request_channel_watch_id) { --- 1039,1048 ---- request_channel(0), request_channel_watch_id(0), ! npobj(NPN_CreateObject(this->npp, &npclass)) ! { ! if (!this->npobj) { throw std::bad_alloc(); } ! } ! plugin_instance::~plugin_instance() throw () { if (this->request_channel_watch_id) { *************** *** 1040,1051 **** g_io_channel_unref(this->command_channel); } - } ! nsISupports * PluginInstance::GetScriptablePeer() throw () ! { ! return this->scriptablePeer; } ! void PluginInstance::SetWindow(NPWindow & window) throw (std::bad_alloc) { --- 1083,1091 ---- g_io_channel_unref(this->command_channel); } ! NPN_ReleaseObject(this->npobj); } ! void plugin_instance::set_window(NPWindow & window) throw (std::bad_alloc) { *************** *** 1176,1183 **** } ! void PluginInstance::HandleEvent(void *) throw () {} ! ssize_t PluginInstance::WriteCommand(const std::string & command) { if (!this->command_channel) { return 0; } --- 1216,1223 ---- } ! void plugin_instance::HandleEvent(void *) throw () {} ! ssize_t plugin_instance::write_command(const std::string & command) { if (!this->command_channel) { return 0; } *************** *** 1213,1216 **** --- 1253,1280 ---- } + bool plugin_instance::get_name(const NPVariant * const args, + const uint32_t argCount, + NPVariant * const result) + { + static const std::string name = PACKAGE_NAME; + NPUTF8 * const name_str = + static_cast<NPUTF8 *>(NPN_MemAlloc(sizeof (NPUTF8) * name.length())); + std::copy(name.begin(), name.end(), name_str); + STRINGN_TO_NPVARIANT(name_str, name.length(), *result); + return true; + } + + bool plugin_instance::get_version(const NPVariant * const args, + const uint32_t argCount, + NPVariant * const result) + { + static const std::string ver = PACKAGE_VERSION; + NPUTF8 * const ver_str = + static_cast<NPUTF8 *>(NPN_MemAlloc(sizeof (NPUTF8) * ver.length())); + std::copy(ver.begin(), ver.end(), ver_str); + STRINGN_TO_NPVARIANT(ver_str, ver.length(), *result); + return true; + } + gboolean request_data_available(GIOChannel * const source, GIOCondition, *************** *** 1219,1223 **** using std::string; ! PluginInstance & pluginInstance = *static_cast<PluginInstance *>(data); gchar c; --- 1283,1287 ---- using std::string; ! plugin_instance & pluginInstance = *static_cast<plugin_instance *>(data); gchar c; *************** *** 1257,1262 **** command << "get-url-result " << url << ' ' << result << '\n'; const ssize_t bytes_written = ! pluginInstance.WriteCommand(command.str()); ! if (bytes_written != command.str().length()) { // XXX // XXX Do what here? Console message? --- 1321,1326 ---- command << "get-url-result " << url << ' ' << result << '\n'; const ssize_t bytes_written = ! pluginInstance.write_command(command.str()); ! if (bytes_written != ssize_t(command.str().length())) { // XXX // XXX Do what here? Console message? Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/mozilla-plugin/src/Makefile.am,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -C2 -d -r1.13.2.1 -r1.13.2.2 *** Makefile.am 1 Oct 2006 05:48:29 -0000 1.13.2.1 --- Makefile.am 9 Oct 2006 03:09:02 -0000 1.13.2.2 *************** *** 5,17 **** AM_CXXFLAGS = @MOZILLA_PLUGIN_CFLAGS@ @GTK_CFLAGS@ - idldir = $(datadir)/idl/openvrml-@PACKAGE_VERSION@ - mozpluginsdir = $(libdir)/mozilla/plugins if ENABLE_MOZILLA_PLUGIN mozplugins_LTLIBRARIES = openvrml.la - mozplugins_DATA = openvrml.xpt endif - dist_idl_DATA = openvrml.idl openvrml_la_SOURCES = openvrml.cpp --- 5,13 ---- *************** *** 22,33 **** EXTRA_DIST = $(openvrml_la_SOURCES) - - BUILT_SOURCES = openvrml.h - - CLEANFILES = openvrml.h openvrml.xpt - - .idl.h: - $(XPIDL) $(XPIDLFLAGS) @MOZILLA_XPIDLFLAGS@ -m header $< - - .idl.xpt: - $(XPIDL) $(XPIDLFLAGS) @MOZILLA_XPIDLFLAGS@ -m typelib $< --- 18,19 ---- |
From: Braden M. <br...@us...> - 2006-10-09 03:09:05
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22198 Modified Files: Tag: OpenVRML-0_16-BRANCH ChangeLog configure-gcc-dbg Log Message: Use the npruntime extensions to NPAPI to make the plug-in scriptable instead of XPCOM. Index: configure-gcc-dbg =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure-gcc-dbg,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** configure-gcc-dbg 1 Oct 2006 05:48:14 -0000 1.1.2.1 --- configure-gcc-dbg 9 Oct 2006 03:09:02 -0000 1.1.2.2 *************** *** 1,3 **** #!/bin/bash ! ./$(dirname $0)/configure -C --disable-static --enable-gtk-doc CXXFLAGS='-g -O0 -Wall -Wextra -Wno-missing-braces' $* --- 1,3 ---- #!/bin/bash ! ./$(dirname $0)/configure -C --disable-static --enable-gtk-doc CXXFLAGS='-g -O0 -Wall -Wextra -Wno-missing-braces -Wno-missing-field-initializers' $* Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1310.2.31 retrieving revision 1.1310.2.32 diff -C2 -d -r1.1310.2.31 -r1.1310.2.32 *** ChangeLog 5 Oct 2006 05:14:03 -0000 1.1310.2.31 --- ChangeLog 9 Oct 2006 03:09:01 -0000 1.1310.2.32 *************** *** 1,2 **** --- 1,100 ---- + 2006-10-08 Braden McDaniel <br...@en...> + + Use the npruntime extensions to NPAPI to make the plug-in + scriptable instead of XPCOM. + + * mozilla-plugin/configure.ac: Removed XPCOM-related checks. + * mozilla-plugin/src/Makefile.am: Removed references to + openvrml.idl and files generated from it. + * mozilla-plugin/src/openvrml.cpp + (script_callback_map): A singleton to map NPIdentifiers to + functions. + (plugin_instance::scriptablePeer): Removed member. + (plugin_instance::npobj): Added member; the NPObject associated + with the plug-in instance. + (plugin_instance::get_name(const NPVariant *, uint32_t, + NPVariant*)): Browser.getName() implementation. + (plugin_instance::get_version(const NPVariant *, uint32_t, + NPVariant*)): Browser.getVersion() implementation. + (ScriptablePeer): Removed class. + (NP_Initialize(NPNetscapeFuncs *, NPPluginFuncs *)): Initialize + mozillaFuncs with the npruntime API function pointers. Removed + initialization of the console_service pointer to the Mozilla XPCOM + console service. + (NPP_GetValue(NPP, NPPVariable, void *)): Removed support for + NPPVpluginScriptableInstance and NPPVpluginScriptableIID. Added + support for NPPVpluginScriptableNPObject. + (printerr(const char *)): Write to stderr rather than the + JavaScript console. + (NPN_ReleaseVariantValue(NPVariant *)): Added npruntime function. + (NPN_GetStringIdentifier(const NPUTF8 *)): Added npruntime + function. + (NPN_GetStringIdentifiers(const NPUTF8 **, int32_t, + NPIdentifier*)): Added npruntime function. + (NPN_GetIntIdentifier(int32_t)): Added npruntime function. + (NPN_IdentifierIsString(NPIdentifier *)): Added npruntime + function. + (NPN_UTF8FromIdentifier(NPIdentifier)): Added npruntime function. + (NPN_IntFromIdentifier(NPIdentifier)): Added npruntime function. + (NPN_CreateObject(NPP, NPClass *)): Added npruntime function. + (NPN_RetainObject(NPObject *)): Added npruntime function. + (NPN_ReleaseObject(NPObject *)): Added npruntime function. + (NPN_Invoke(NPP, NPObject *, NPIdentifier, const NPVariant *, + uint32_t, NPVariant *)): Added npruntime function. + (NPN_InvokeDefault(NPP, NPObject *, const NPVariant *, uint32_t, + NPVariant *)): Added npruntime function. + (NPN_Evaluate(NPP, NPObject *, NPString *, NPVariant *)): Added + npruntime function. + (NPN_GetProperty(NPP, NPObject *, NPIdentifier, NPVariant *)): + Added npruntime function. + (NPN_SetProperty(NPP, NPObject *, NPIdentifier, const + NPVariant*)): Added npruntime function. + (NPN_RemoveProperty(NPP, NPObject *, NPIdentifier)): Added + npruntime function. + (NPN_HasProperty(NPP, NPObject *, NPIdentifier)): Added npruntime + function. + (NPN_HasMethod(NPP, NPObject *, NPIdentifier)): Added npruntime + function. + (NPN_SetException(NPObject *, const NPUTF8 *)): Added npruntime + function. + (script_callback_map::instance_): Singleton instance. + (script_callback_map::script_callback_map()): Initialize the map + with pointers to the script method implementations. + (script_callback_map::instance()): Get the instance. + (OpenVRMLNPObject): NPObject corresponding to the plug-in + instance. + (openvrmlnpobject_allocate(NPP, NPClass *)): "allocate" callback + function for the plug-in's NPObject. + (openvrmlnpobject_deallocate(NPObject *)): "deallocate" callback + function for the plug-in's NPObject. + (openvrmlnpobject_invalidate(NPObject *)): "invalidate" callback + function for the plug-in's NPObject. + (openvrmlnpobject_hasMethod(NPObject *, NPIdentifier)): + "hasMethod" callback function for the plug-in's NPObject. + (openvrmlnpobject_invoke(NPObject *, NPIdentifier, const + NPVariant*, uint32_t, NPVariant *)): "invoke" callback function + for the plug-in's NPObject. + (openvrmlnpobject_invokeDefault(NPObject *, const NPVariant *, + uint32_t, NPVariant *)): "invokeDefault" callback function for the + plug-in's NPObject. + (openvrmlnpobject_getProperty(NPObject *, NPIdentifier, + NPVariant*)): "getProperty" callback function for the plug-in's + NPObject. + (openvrmlnpobject_setProperty(NPObject *, NPIdentifier, const + NPVariant *)): "setProperty" callback function for the plug-in's + NPObject. + (openvrmlnpobject_removeProperty(NPObject *, NPIdentifier)): + "removeProperty" callback function for the plug-in's NPObject. + (npclass): NPClass object for the plug-in's NPObject. + (plugin_instance::plugin_instance(NPP)): Initialize the plug-in + instance's NPObject pointer. + (plugin_instance::~plugin_instance()): Call NPN_ReleaseObject on + the plug-in instance's NPObject. + (plugin_instance::get_name(const NPVariant *, uint32_t, + NPVariant*)): Return the VRML browser name. + (plugin_instance::get_version(const NPVariant *, uint32_t, + NPVariant *)): Return the VRML browser version. + * mozilla-plugin/src/openvrml.idl: Removed file. + 2006-10-05 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-10-09 03:09:05
|
Update of /cvsroot/openvrml/openvrml/mozilla-plugin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22198/mozilla-plugin Modified Files: Tag: OpenVRML-0_16-BRANCH configure.ac Log Message: Use the npruntime extensions to NPAPI to make the plug-in scriptable instead of XPCOM. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/mozilla-plugin/configure.ac,v retrieving revision 1.14.2.1 retrieving revision 1.14.2.2 diff -C2 -d -r1.14.2.1 -r1.14.2.2 *** configure.ac 1 Oct 2006 05:48:25 -0000 1.14.2.1 --- configure.ac 9 Oct 2006 03:09:02 -0000 1.14.2.2 *************** *** 16,24 **** ACX_PTHREAD(, [AC_MSG_FAILURE([pthread support not found])]) - PKG_CHECK_MODULES([MOZILLA_XPCOM], [mozilla-xpcom], , [have_mozilla_xpcom=no]) - if test "X$PKG_CONFIG" != "Xno" -a -z "MOZILLA_XPCOM_PKG_ERRORS"; then - mozincludedir=`$PKG_CONFIG --variable=includedir mozilla-xpcom` - MOZILLA_XPCOM_CFLAGS="-I$mozincludedir $MOZILLA_XPCOM_CFLAGS" - fi PKG_CHECK_MODULES([MOZILLA_PLUGIN], [mozilla-plugin >= 1.6], , [have_mozilla_plugin=no]) --- 16,19 ---- *************** *** 26,48 **** mozprefix=`$PKG_CONFIG --variable=prefix mozilla-plugin` mozlibdir=`$PKG_CONFIG --variable=libdir mozilla-plugin` - AC_ARG_VAR([XPIDL], [Mozilla XPCOM IDL compiler]) - AC_ARG_VAR([XPIDLFLAGS], [Mozilla XPCOM IDL compiler flags]) - AC_PATH_PROG([XPIDL], [xpidl], , ["$mozlibdir"]) - mozidldir="$mozprefix/share/idl/mozilla-$mozversion" - MOZILLA_XPIDLFLAGS="-I $mozidldir" AC_SUBST([mozlibdir]) - AC_SUBST([MOZILLA_XPIDLFLAGS]) PKG_CHECK_MODULES([GTK], [gtk+-2.0], , [have_gtk=no]) - AX_CHECK_GL - AC_PATH_XTRA - if test "X$enable_mozilla_plugin" != "Xno"; then if test "X$have_mozilla_plugin" = "Xno"; then AC_MSG_FAILURE([Mozilla plug-in development headers are required to build the Mozilla plug-in.]) fi - if test -z "$XPIDL"; then - AC_MSG_FAILURE([xpidl is required to build the Mozilla plug-in]) - fi if test "X$have_gtk" = "Xno"; then AC_MSG_FAILURE([GTK+ is required to build the Mozilla plug-in]) --- 21,31 ---- |
From: Braden M. <br...@us...> - 2006-10-05 05:14:16
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32514 Modified Files: ChangeLog openvrml.spec.in Log Message: Added openvrml-gtkplug info. Index: openvrml.spec.in =================================================================== RCS file: /cvsroot/openvrml/openvrml/openvrml.spec.in,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** openvrml.spec.in 1 Oct 2006 05:46:54 -0000 1.54 --- openvrml.spec.in 5 Oct 2006 05:14:14 -0000 1.55 *************** *** 123,126 **** --- 123,127 ---- %files gtkplug %doc AUTHORS COPYING ChangeLog NEWS README THANKS + %{_infodir}/openvrml-gtkplug.info %{_libexecdir}/openvrml-gtkplug *************** *** 133,136 **** --- 134,140 ---- %changelog + * Thu Oct 05 2006 Braden McDaniel <br...@en...> + - Added openvrml-gtkplug info. + * Thu Sep 28 2006 Braden McDaniel <br...@en...> - Added openvrml-gtkplug package. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1345 retrieving revision 1.1346 diff -C2 -d -r1.1345 -r1.1346 *** ChangeLog 5 Oct 2006 03:31:36 -0000 1.1345 --- ChangeLog 5 Oct 2006 05:14:14 -0000 1.1346 *************** *** 1,2 **** --- 1,6 ---- + 2006-10-05 Braden McDaniel <br...@en...> + + * openvrml.spec.in: Added openvrml-gtkplug info. + 2006-10-04 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-10-05 05:14:08
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32226 Modified Files: Tag: OpenVRML-0_16-BRANCH ChangeLog openvrml.spec.in Log Message: Added openvrml-gtkplug info. Index: openvrml.spec.in =================================================================== RCS file: /cvsroot/openvrml/openvrml/openvrml.spec.in,v retrieving revision 1.52.2.2 retrieving revision 1.52.2.3 diff -C2 -d -r1.52.2.2 -r1.52.2.3 *** openvrml.spec.in 1 Oct 2006 05:48:14 -0000 1.52.2.2 --- openvrml.spec.in 5 Oct 2006 05:14:03 -0000 1.52.2.3 *************** *** 123,126 **** --- 123,127 ---- %files gtkplug %doc AUTHORS COPYING ChangeLog NEWS README THANKS + %{_infodir}/openvrml-gtkplug.info %{_libexecdir}/openvrml-gtkplug *************** *** 133,136 **** --- 134,140 ---- %changelog + * Thu Oct 05 2006 Braden McDaniel <br...@en...> + - Added openvrml-gtkplug info. + * Thu Sep 28 2006 Braden McDaniel <br...@en...> - Added openvrml-gtkplug package. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1310.2.30 retrieving revision 1.1310.2.31 diff -C2 -d -r1.1310.2.30 -r1.1310.2.31 *** ChangeLog 5 Oct 2006 03:28:30 -0000 1.1310.2.30 --- ChangeLog 5 Oct 2006 05:14:03 -0000 1.1310.2.31 *************** *** 1,2 **** --- 1,6 ---- + 2006-10-05 Braden McDaniel <br...@en...> + + * openvrml.spec.in: Added openvrml-gtkplug info. + 2006-10-04 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-10-05 03:31:38
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25284 Modified Files: ChangeLog configure.ac Log Message: Fixed usage of AC_PATH_PROG when checking for Rez. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** configure.ac 5 Oct 2006 03:25:59 -0000 1.95 --- configure.ac 5 Oct 2006 03:31:36 -0000 1.96 *************** *** 59,63 **** AC_ARG_VAR([REZ], [Mac OS X resource fork compiler]) ! AC_PATH_PROG([REZ], [Rez], [$PATH:/Developer/Tools]) # --- 59,63 ---- AC_ARG_VAR([REZ], [Mac OS X resource fork compiler]) ! AC_PATH_PROG([REZ], [Rez], , [$PATH:/Developer/Tools]) # Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1344 retrieving revision 1.1345 diff -C2 -d -r1.1344 -r1.1345 *** ChangeLog 5 Oct 2006 03:25:59 -0000 1.1344 --- ChangeLog 5 Oct 2006 03:31:36 -0000 1.1345 *************** *** 1,4 **** --- 1,8 ---- 2006-10-04 Braden McDaniel <br...@en...> + * configure.ac: Fixed usage of AC_PATH_PROG when checking for Rez. + + 2006-10-04 Braden McDaniel <br...@en...> + Only recurse into lib/gtkglext if building openvrml-gtkplug. |
From: Braden M. <br...@us...> - 2006-10-05 03:28:33
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24099 Modified Files: Tag: OpenVRML-0_16-BRANCH ChangeLog configure.ac Log Message: Fixed usage of AC_PATH_PROG when checking for Rez. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.92.2.3 retrieving revision 1.92.2.4 diff -C2 -d -r1.92.2.3 -r1.92.2.4 *** configure.ac 5 Oct 2006 03:25:45 -0000 1.92.2.3 --- configure.ac 5 Oct 2006 03:28:31 -0000 1.92.2.4 *************** *** 59,63 **** AC_ARG_VAR([REZ], [Mac OS X resource fork compiler]) ! AC_PATH_PROG([REZ], [Rez], [$PATH:/Developer/Tools]) # --- 59,63 ---- AC_ARG_VAR([REZ], [Mac OS X resource fork compiler]) ! AC_PATH_PROG([REZ], [Rez], , [$PATH:/Developer/Tools]) # Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1310.2.29 retrieving revision 1.1310.2.30 diff -C2 -d -r1.1310.2.29 -r1.1310.2.30 *** ChangeLog 5 Oct 2006 03:25:45 -0000 1.1310.2.29 --- ChangeLog 5 Oct 2006 03:28:30 -0000 1.1310.2.30 *************** *** 1,4 **** --- 1,8 ---- 2006-10-04 Braden McDaniel <br...@en...> + * configure.ac: Fixed usage of AC_PATH_PROG when checking for Rez. + + 2006-10-04 Braden McDaniel <br...@en...> + Only recurse into lib/gtkglext if building openvrml-gtkplug. |
From: Braden M. <br...@us...> - 2006-10-05 03:26:02
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22952 Modified Files: ChangeLog configure.ac Log Message: Only recurse into lib/gtkglext if building openvrml-gtkplug. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** configure.ac 1 Oct 2006 05:46:54 -0000 1.94 --- configure.ac 5 Oct 2006 03:25:59 -0000 1.95 *************** *** 335,338 **** --- 335,344 ---- AC_ARG_VAR([XPIDL], [Mozilla XPCOM IDL compiler]) AC_ARG_VAR([XPIDLFLAGS], [Mozilla XPCOM IDL compiler flags]) + + if test X$enable_gtkplug != Xno; then + gtkglext_subdir=gtkglext + fi + AC_SUBST([gtkglext_subdir]) + AC_CONFIG_SUBDIRS([lib/gtkglext mozilla-plugin]) Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1343 retrieving revision 1.1344 diff -C2 -d -r1.1343 -r1.1344 *** ChangeLog 5 Oct 2006 03:15:49 -0000 1.1343 --- ChangeLog 5 Oct 2006 03:25:59 -0000 1.1344 *************** *** 1,4 **** --- 1,13 ---- 2006-10-04 Braden McDaniel <br...@en...> + Only recurse into lib/gtkglext if building openvrml-gtkplug. + + * configure.ac: Added gtkglext_subdir substitution. + * lib/Makefile.am: Add gtkglext to SUBDIRS as a configure + substitution. We don't want to recurse there if we aren't + building openvrml-gtkplug. + + 2006-10-04 Braden McDaniel <br...@en...> + * README: Updated package layout description to reflect openvrml-gtkplug. |
From: Braden M. <br...@us...> - 2006-10-05 03:26:02
|
Update of /cvsroot/openvrml/openvrml/lib In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22952/lib Modified Files: Makefile.am Log Message: Only recurse into lib/gtkglext if building openvrml-gtkplug. Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/lib/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.am 1 Oct 2006 05:46:54 -0000 1.5 --- Makefile.am 5 Oct 2006 03:25:59 -0000 1.6 *************** *** 1 **** ! SUBDIRS = antlr gtkglext --- 1,2 ---- ! SUBDIRS = antlr @gtkglext_subdir@ ! DIST_SUBDIRS = antlr gtkglext |
From: Braden M. <br...@us...> - 2006-10-05 03:25:50
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22929 Modified Files: Tag: OpenVRML-0_16-BRANCH ChangeLog configure.ac Log Message: Only recurse into lib/gtkglext if building openvrml-gtkplug. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.92.2.2 retrieving revision 1.92.2.3 diff -C2 -d -r1.92.2.2 -r1.92.2.3 *** configure.ac 1 Oct 2006 05:48:14 -0000 1.92.2.2 --- configure.ac 5 Oct 2006 03:25:45 -0000 1.92.2.3 *************** *** 343,346 **** --- 343,352 ---- AC_ARG_VAR([XPIDL], [Mozilla XPCOM IDL compiler]) AC_ARG_VAR([XPIDLFLAGS], [Mozilla XPCOM IDL compiler flags]) + + if test X$enable_gtkplug != Xno; then + gtkglext_subdir=gtkglext + fi + AC_SUBST([gtkglext_subdir]) + AC_CONFIG_SUBDIRS([lib/gtkglext mozilla-plugin]) Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1310.2.28 retrieving revision 1.1310.2.29 diff -C2 -d -r1.1310.2.28 -r1.1310.2.29 *** ChangeLog 5 Oct 2006 03:15:36 -0000 1.1310.2.28 --- ChangeLog 5 Oct 2006 03:25:45 -0000 1.1310.2.29 *************** *** 1,4 **** --- 1,13 ---- 2006-10-04 Braden McDaniel <br...@en...> + Only recurse into lib/gtkglext if building openvrml-gtkplug. + + * configure.ac: Added gtkglext_subdir substitution. + * lib/Makefile.am: Add gtkglext to SUBDIRS as a configure + substitution. We don't want to recurse there if we aren't + building openvrml-gtkplug. + + 2006-10-04 Braden McDaniel <br...@en...> + * README: Updated package layout description to reflect openvrml-gtkplug. |
From: Braden M. <br...@us...> - 2006-10-05 03:25:50
|
Update of /cvsroot/openvrml/openvrml/lib In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22929/lib Modified Files: Tag: OpenVRML-0_16-BRANCH Makefile.am Log Message: Only recurse into lib/gtkglext if building openvrml-gtkplug. Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/lib/Makefile.am,v retrieving revision 1.4.4.1 retrieving revision 1.4.4.2 diff -C2 -d -r1.4.4.1 -r1.4.4.2 *** Makefile.am 1 Oct 2006 05:48:15 -0000 1.4.4.1 --- Makefile.am 5 Oct 2006 03:25:45 -0000 1.4.4.2 *************** *** 1 **** ! SUBDIRS = antlr gtkglext --- 1,2 ---- ! SUBDIRS = antlr @gtkglext_subdir@ ! DIST_SUBDIRS = antlr gtkglext |
From: Braden M. <br...@us...> - 2006-10-05 03:15:53
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18924 Modified Files: ChangeLog README Log Message: Updated package layout description to reflect openvrml-gtkplug. Index: README =================================================================== RCS file: /cvsroot/openvrml/openvrml/README,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** README 2 Oct 2006 22:12:22 -0000 1.67 --- README 5 Oct 2006 03:15:49 -0000 1.68 *************** *** 89,93 **** /models : Sample VRML models. /mozilla-plugin : Mozilla plug-in sources. ! /src : Library sources. /test : Test programs. --- 89,96 ---- /models : Sample VRML models. /mozilla-plugin : Mozilla plug-in sources. ! /src ! /libopenvrml : Runtime library sources. ! /libopenvrml-gl : OpenGL renderer library sources. ! /openvrml-gtkplug : GtkPlug component application sources. /test : Test programs. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1342 retrieving revision 1.1343 diff -C2 -d -r1.1342 -r1.1343 *** ChangeLog 4 Oct 2006 06:26:42 -0000 1.1342 --- ChangeLog 5 Oct 2006 03:15:49 -0000 1.1343 *************** *** 1,4 **** --- 1,9 ---- 2006-10-04 Braden McDaniel <br...@en...> + * README: Updated package layout description to reflect + openvrml-gtkplug. + + 2006-10-04 Braden McDaniel <br...@en...> + Added info documentation for openvrml-gtkplug. |
From: Braden M. <br...@us...> - 2006-10-05 03:15:40
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18897 Modified Files: Tag: OpenVRML-0_16-BRANCH ChangeLog README Log Message: Updated package layout description to reflect openvrml-gtkplug. Index: README =================================================================== RCS file: /cvsroot/openvrml/openvrml/README,v retrieving revision 1.65.2.2 retrieving revision 1.65.2.3 diff -C2 -d -r1.65.2.2 -r1.65.2.3 *** README 2 Oct 2006 22:12:08 -0000 1.65.2.2 --- README 5 Oct 2006 03:15:36 -0000 1.65.2.3 *************** *** 89,93 **** /models : Sample VRML models. /mozilla-plugin : Mozilla plug-in sources. ! /src : Library sources. /test : Test programs. --- 89,96 ---- /models : Sample VRML models. /mozilla-plugin : Mozilla plug-in sources. ! /src ! /libopenvrml : Runtime library sources. ! /libopenvrml-gl : OpenGL renderer library sources. ! /openvrml-gtkplug : GtkPlug component application sources. /test : Test programs. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1310.2.27 retrieving revision 1.1310.2.28 diff -C2 -d -r1.1310.2.27 -r1.1310.2.28 *** ChangeLog 4 Oct 2006 06:27:24 -0000 1.1310.2.27 --- ChangeLog 5 Oct 2006 03:15:36 -0000 1.1310.2.28 *************** *** 1,4 **** --- 1,9 ---- 2006-10-04 Braden McDaniel <br...@en...> + * README: Updated package layout description to reflect + openvrml-gtkplug. + + 2006-10-04 Braden McDaniel <br...@en...> + Added info documentation for openvrml-gtkplug. |
From: Braden M. <br...@us...> - 2006-10-04 06:27:28
|
Update of /cvsroot/openvrml/openvrml/doc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7398/doc Modified Files: Tag: OpenVRML-0_16-BRANCH .cvsignore Makefile.am Added Files: Tag: OpenVRML-0_16-BRANCH fdl.texi openvrml-gtkplug.texi Log Message: Added info documentation for openvrml-gtkplug. Index: .cvsignore =================================================================== RCS file: /cvsroot/openvrml/openvrml/doc/.cvsignore,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** .cvsignore 10 Aug 2006 02:56:17 -0000 1.4 --- .cvsignore 4 Oct 2006 06:27:24 -0000 1.4.2.1 *************** *** 1,2 **** --- 1,7 ---- + *.info Makefile Makefile.in + mdate-sh + stamp-vti + texinfo.tex + version.texi --- NEW FILE: openvrml-gtkplug.texi --- \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename openvrml-gtkplug.info @include version.texi @settitle openvrml-gtkplug @value{VERSION} @c %**end of header @copying This manual is for openvrml-gtkplug (version @value{VERSION}, @value{UPDATED}), which provides a VRML/X3D browser as a GtkPlug component that can be used in any GTK+ application. Copyright @copyright{} 2006 Braden McDaniel @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation. A copy of the license is included in the section entitled ``GNU Free Documentation License.'' @end quotation @end copying @c Define a new index for options. @defcodeindex op @c Combine everything into one index (arbitrarily chosen to be the @c concept index). @syncodeindex op cp @dircategory Miscellaneous @direntry * openvrml-gtkplug: A VRML/X3D browser component for GTK+ applications. @end direntry @titlepage @title openvrml-gtkplug @subtitle for version @value{VERSION}, @value{UPDATED} @author Braden McDaniel (@email{braden@@endoframe.com}) @page @vskip 0pt plus 1filll @insertcopying @end titlepage @contents @ifnottex @node Top @top openvrml-gtkplug This manual is for openvrml-gtkplug (version @value{VERSION}, @value{UPDATED}). @end ifnottex @menu * Overview:: General purpose and information. * Invoking openvrml-gtkplug:: How to run @code{openvrml-gtkplug}. * Servicing Requests:: How to respond to requests from the component. * Problems:: Getting help and reporting bugs. * Copying This Manual:: Copying and sharing this documentation. * Concept Index:: Index of concepts. @end menu @node Overview @chapter Overview @cindex overview @code{openvrml-gtkplug} provides a VRML/X3D browser as a GtkPlug component that can be used in any GTK+ application. @code{openvrml-gtkplug} communicates with the host application via pipes from its @code{stdout} and to its @code{stdin}. The host application is responsible for fetching network resources and sending these to the component. @code{openvrml-gtkplug} uses the OpenVRML VRML/X3D runtime. For the latest updates and other information, please visit OpenVRML on the World Wide Web at @url{http://openvrml.org}. @cindex authors @cindex McDaniel, Braden @code{openvrml-gtkplug} was written by Braden McDaniel. @node Invoking openvrml-gtkplug @chapter Invoking @code{openvrml-gtkplug} @cindex invoking @cindex options @cindex usage @cindex help The format for running the @code{openvrml-gtkplug} program is: @example openvrml-gtkplug [@var{options}] @var{gtk-socket-id} @end example @var{gtk-socket-id} is the XID of a GtkSocket. @section Options @code{openvrml-gtkplug} supports the following options: @subsection Help Options @table @option @item --help @itemx -? @opindex --help @opindex -? Show help options. @item --help-all @opindex --help-all Show all help options. @item --help-gtk @opindex --help-gtk Show GTK+ options. @end table @subsection GTK+ Options @table @option @item --class=@var{class} @opindex --class Program class as used by the window manager. @item --name=@var{name} @opindex --name Program name as used by the window manager. @item --screen=@var{screen} @opindex --screen X screen to use. @item --sync @opindex --sync Make X calls synchronous. @item --gtk-module=@var{modules} @opindex --gtk-module Load additional GTK+ modules. @item --g-fatal-warnings @opindex --g-fatal-warnings Make all warnings fatal. @end table @subsection Application Options @table @option @item --version @opindex --version Print the version information and exit. @item --display=@var{display} @opindex --display X display to use. @end table @section Invoking From Another Program In general @code{openvrml-gtkplug} is invoked from another program which establishes pipes to @code{openvrml-gtkplug}'s @code{stdin} and from its @code{stdout}. This can be done using the typical @code{fork}-@code{exec} mechanism. If you are using GLib, the function @code{g_spawn_async_with_pipes} nicely encapsulates the required logic: @example gchar * working_directory; gchar ** argv; gchar ** envp = 0; GPid * child_pid = 0; gint standard_input, standard_output; gint * standard_error = 0; GError * error = 0; gboolean succeeded; working_directory = g_get_current_dir(); argv = g_malloc(sizeof (gchar *) * 3) argv[0] = g_strdup("/usr/libexec/openvrml-gtkplug"); argv[1] = g_strdup_printf("%d", gtk_socket_id); argv[2] = 0; succeeded = g_spawn_async_with_pipes(working_directory, argv, envp, 0, 0, 0, child_pid, &standard_input, &standard_output, standard_error, &error); @end example @node Servicing Requests @chapter Servicing Requests @cindex request @cindex request channel @cindex command @cindex command channel @section Requests and Commands @code{openvrml-gtkplug} relies on the host application for fetching network resources. @code{openvrml-gtkplug} will send a @dfn{request} for a network resource via its @code{stdout}. As such, the pipe from @code{openvrml-gtkplug}'s @code{stdout} to the host application is referred to as the @dfn{request channel}. In general (and as the name implies), requests elicit some response from the host application. The pipe to @code{openvrml-gtkplug}'s @code{stdin} is used for such responses as well other @dfn{commands}. This pipe is referred to as the @dfn{command channel}. Requests and commands are terminated by an end-of-line. They take the general form: @example @var{command-name} [@var{param1} [@var{param2} ... ]] @end example @cindex get-url @section The @code{get-url} Request @code{openvrml-gtkplug} sends a @code{get-url} request to indicate to the host application that it needs a particular network resource. This request takes the following form: @example get-url @var{url} [@var{target}] @end example @table @var @item url The URL being requested. @item target The name of a window. @end table The @var{url} parameter is the URL being requested. The optional @var{target} parameter is the name of a window of the host application. If @var{target} is not meaningful to the host application, it can be ignored. The @code{get-url} request expects a response in the form of a @code{get-url-result} command. @code{openvrml-gtkplug} is unable to process the availability of the resource until it receives this command; so it should be issued as soon as possible. @section Commands @cindex get-url-result @subsection @code{get-url-result} The @code{get-url-result} command should be sent immediately in response to a @code{get-url} request. This command should indicate the basic success or failure of initiating the resource request. @strong{It is not intended to indicate a response from a server}. Rather, it should be used to indicate whether the @var{URL} can be processed at all. A URL might not be usable if it is syntactically invalid or its scheme is unsupported. This command takes the following form: @example get-url-result @var{url} @var{result} @end example @table @var @item url The URL from the @code{get-url} request. @item result An integer value. @end table The @var{url} parameter should match the URL received in the corresponding @code{get-url} request. The @var{result} is an integer value; 0 indicates success, while nonzero indicates failure. @cindex new-stream @subsection @code{new-stream} The @code{new-stream} command indicates to @code{openvrml-gtkplug} that the host application intends to begin writing data associated with a requested resource. @code{new-stream} should be sent after @code{get-url-result} has been sent for a stream and before @code{write} is sent for any of the stream data. This command takes the following form: @example new-stream @var{stream-id} @var{type} @var{url} @end example @table @var @item stream-id An integer identifier for the stream. @item type The MIME media type of the stream. @item url The URL associated with the stream. @end table The @var{stream-id} is an integer identifier for the stream. This identifier will be used subsequently by the @code{write} and @code{destroy-stream} commands to refer to the stream. The @var{type} parameter is the MIME media type of the stream. The @var{url} parameter should match the @var{url} parameter of a previously issued @code{get-url-result} command. @cindex write @subsection @code{write} The @code{write} command writes data to a stream for which @code{new-stream} has already been issued. This command takes the following form: @example write @var{stream_id} @var{offset} @var{length} @var{data} @end example @table @var @item stream-id An integer identifier for the stream. @item offset The offset from the beginning of the stream to the beginning of @var{data}. @item length The number of bytes in @var{data} @item data The stream data. @end table The @var{stream-id} parameter is an integer identifier corresponding to a stream for which @code{new-stream} has already been called (and for which @code{destroy-stream} has @emph{not} been called. @code{write} is unique among commands in that the end-of-line character does not terminate the command; rather, it marks the beginning of the @var{data} parameter. The command ends at the end of the @var{data} parameter, which is indicated by the @var{length} parameter. @code{write} may be called multiple times for the same stream. The @var{offset} parameter indicates the offset of the beginning of @var{data} with respect to the beginning of the stream (in bytes). @cindex destroy-stream @subsection @code{destroy-stream} @code{destroy-stream} should be sent for a @var{stream-id} after no more @code{write} commands will be issued for it. This command takes the following form: @example destroy-stream @var{stream-id} @end example @table @var @item stream-id An integer identifier for a stream. @end table @var{stream-id} should identify a stream for which @code{new-stream} has been sent, but for which @code{destroy-stream} has @emph{not} already been sent. @node Problems @chapter Getting Help and Reporting Bugs @cindex bug reporting @cindex problems @cindex reporting bugs @section Mailing List As part of the OpenVRML package, @code{openvrml-gtkplug} is discussed on the OpenVRML development mailing list, @email{openvrml-develop@@lists.sourceforge.net}. Questions about usage of any part of the OpenVRML package are welcome here. This mailing list permits posting only by subscribers in order to curb spam. Subscription information can be found at @url{http://lists.sourceforge.net/lists/listinfo/openvrml-develop}. @section Reporting Bugs Please report any bugs you encounter using @url{http://sourceforge.net/tracker/?func=add&group_id=7151&atid=107151, OpenVRML's SourceForge bug tracker}. @cindex checklist for bug reports Please include enough information for the maintainers to reproduce the problem. Generally speaking, that means: @itemize @bullet @item The version number of openvrml-gtkplug (which you can find by running @w{@samp{openvrml-gtkplug --version}}) and any other program(s) or manual(s) involved. @item Hardware and operating system names and versions. @item The contents of any input files necessary to reproduce the bug. @item The expected behavior and/or output. @item A description of the problem and samples of any erroneous output. @item Any unusual options you gave to @command{configure}. @item Anything else that you think would be helpful. @end itemize When in doubt whether something is needed or not, include it. It's better to include too much than to leave out something important. @section Submitting Patches @cindex patches, contributing Patches are welcome; if possible, please make them with @samp{@w{diff -u}} (@pxref{Top,, Overview, diff, Comparing and Merging Files}) and include @file{ChangeLog} entries (@pxref{Change Log,,, emacs, The GNU Emacs Manual}). Please follow the existing coding style. The preferred means of submitting a patch is using @url{OpenVRML's SourceForge Patch Manager, http://sourceforge.net/tracker/?func=add&group_id=7151&atid=307151}. @node Copying This Manual @appendix Copying This Manual @menu * GNU Free Documentation License:: License for copying this manual. @end menu @include fdl.texi @node Concept Index @unnumbered Concept Index @printindex cp @bye --- NEW FILE: fdl.texi --- @node GNU Free Documentation License @appendixsec GNU Free Documentation License @cindex FDL, GNU Free Documentation License @center Version 1.2, November 2002 @display Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display @enumerate 0 @item PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document @dfn{free} in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of ``copyleft'', which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. @item APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The ``Document'', below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as ``you''. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A ``Modified Version'' of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A ``Secondary Section'' is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The ``Invariant Sections'' are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The ``Cover Texts'' are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A ``Transparent'' copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not ``Transparent'' is called ``Opaque''. Examples of suitable formats for Transparent copies include plain @sc{ascii} without markup, Texinfo input format, La@TeX{} input format, @acronym{SGML} or @acronym{XML} using a publicly available @acronym{DTD}, and standard-conforming simple @acronym{HTML}, PostScript or @acronym{PDF} designed for human modification. Examples of transparent image formats include @acronym{PNG}, @acronym{XCF} and @acronym{JPG}. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, @acronym{SGML} or @acronym{XML} for which the @acronym{DTD} and/or processing tools are not generally available, and the machine-generated @acronym{HTML}, PostScript or @acronym{PDF} produced by some word processors for output purposes only. The ``Title Page'' means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as ``Acknowledgements'', ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' of such a section when you modify the Document means that it remains a section ``Entitled XYZ'' according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. @item VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. @item COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. @item MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: @enumerate A @item Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. @item List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. @item State on the Title page the name of the publisher of the Modified Version, as the publisher. @item Preserve all the copyright notices of the Document. @item Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. @item Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. @item Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. @item Include an unaltered copy of this License. @item Preserve the section Entitled ``History'', Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. @item Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the ``History'' section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. @item For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. @item Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. @item Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified Version. @item Do not retitle any existing section to be Entitled ``Endorsements'' or to conflict in title with any Invariant Section. @item Preserve any Warranty Disclaimers. @end enumerate If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of your Modified Version by various parties---for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. @item COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled ``History'' in the various original documents, forming one section Entitled ``History''; likewise combine any sections Entitled ``Acknowledgements'', and any sections Entitled ``Dedications''. You must delete all sections Entitled ``Endorsements.'' @item COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. @item AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. @item TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled ``Acknowledgements'', ``Dedications'', or ``History'', the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. @item TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. @item FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See @uref{http://www.gnu.org/copyleft/}. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. @end enumerate @page @appendixsubsec ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: @smallexample @group Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end group @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the ``with...Texts.'' line with this: @smallexample @group with the Invariant Sections being @var{list their titles}, with the Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. @end group @end smallexample If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. @c Local Variables: @c ispell-local-pdict: "ispell-dict" @c End: Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/doc/Makefile.am,v retrieving revision 1.34 retrieving revision 1.34.2.1 diff -C2 -d -r1.34 -r1.34.2.1 *** Makefile.am 10 Aug 2006 06:50:34 -0000 1.34 --- Makefile.am 4 Oct 2006 06:27:24 -0000 1.34.2.1 *************** *** 1,2 **** --- 1,5 ---- + info_TEXINFOS = openvrml-gtkplug.texi + openvrml_gtkplug_TEXINFOS = fdl.texi + docdir = $(datadir)/doc/@PACKAGE_TARNAME@-@PACKAGE_VERSION@ |