ogre.rb 0.1-i686-linux → 0.2-i686-linux
Sign up to get free protection for your applications and to get access to all the features.
- data/README +43 -5
- data/Rakefile +67 -165
- data/lib/application.rb +2 -1
- data/lib/application_frame_listener.rb +17 -17
- data/lib/ogre.so +0 -0
- data/lib/ruby_ois.so +0 -0
- data/ogre.rb +3 -0
- data/samples/Ogre.log +358 -257
- data/samples/cel_shading.rb +85 -0
- data/samples/grass.rb +1 -1
- data/samples/media/materials/programs/CelShading.cg +63 -0
- data/samples/media/materials/scripts/CelShading.material +68 -0
- data/samples/media/materials/textures/cel_shading_diffuse.png +0 -0
- data/samples/media/materials/textures/cel_shading_edge.png +0 -0
- data/samples/media/materials/textures/cel_shading_specular.png +0 -0
- data/samples/ogre.cfg +1 -2
- data/samples/plugins.cfg +3 -2
- data/test/ogre.cfg +10 -0
- data/{samples/navi → test}/plugins.cfg +2 -4
- data/test/test_helper.rb +67 -0
- data/test/unit/constants_test.rb +66 -0
- data/test/unit/frame_stats_proxy_test.rb +28 -0
- data/test/unit/math_test.rb +20 -0
- data/test/unit/mesh_test.rb +15 -0
- data/test/unit/methods_test.rb +98 -0
- data/test/unit/movable_object_test.rb +19 -0
- data/test/unit/name_value_pair_list_test.rb +12 -0
- data/test/unit/overlay_element_test.rb +20 -0
- data/test/unit/render_target_test.rb +11 -0
- data/test/unit/resource_test.rb +26 -0
- data/test/unit/scene_manager_test.rb +21 -0
- metadata +25 -356
- data/samples/navi/Media/NaviDemo.material +0 -60
- data/samples/navi/Media/OgreCore.zip +0 -0
- data/samples/navi/Media/cerulean.jpg +0 -0
- data/samples/navi/Media/clouds.jpg +0 -0
- data/samples/navi/Media/controlsNaviMask.png +0 -0
- data/samples/navi/Media/grass.jpg +0 -0
- data/samples/navi/Media/knot.mesh +0 -0
- data/samples/navi/Media/testNaviMask.png +0 -0
- data/samples/navi/NaviLocal/Navi.js +0 -136
- data/samples/navi/NaviLocal/buttonBg.jpg +0 -0
- data/samples/navi/NaviLocal/controls.html +0 -303
- data/samples/navi/NaviLocal/knobBg.jpg +0 -0
- data/samples/navi/NaviLocal/moo.dropdownmenu.js +0 -87
- data/samples/navi/NaviLocal/mootools.v1.1.js +0 -6964
- data/samples/navi/NaviLocal/naviLogo.html +0 -32
- data/samples/navi/NaviLocal/naviLogo.png +0 -0
- data/samples/navi/NaviLocal/pageBg.jpg +0 -0
- data/samples/navi/NaviLocal/sliderBg.jpg +0 -0
- data/samples/navi/NaviLocal/test.html +0 -5
- data/samples/navi/NaviLocal/welcome.html +0 -36
- data/samples/navi/NaviLocal/welcome.png +0 -0
- data/samples/navi/chrome/chromelist.txt +0 -597
- data/samples/navi/chrome/classic.jar +0 -0
- data/samples/navi/chrome/classic.manifest +0 -4
- data/samples/navi/chrome/comm.jar +0 -0
- data/samples/navi/chrome/comm.manifest +0 -2
- data/samples/navi/chrome/en-US.jar +0 -0
- data/samples/navi/chrome/en-US.manifest +0 -9
- data/samples/navi/chrome/toolkit.jar +0 -0
- data/samples/navi/chrome/toolkit.manifest +0 -6
- data/samples/navi/components/FeedProcessor.js +0 -1825
- data/samples/navi/components/alerts.xpt +0 -0
- data/samples/navi/components/appshell.xpt +0 -0
- data/samples/navi/components/appstartup.xpt +0 -0
- data/samples/navi/components/auth.dll +0 -0
- data/samples/navi/components/autocomplete.xpt +0 -0
- data/samples/navi/components/autoconfig.dll +0 -0
- data/samples/navi/components/autoconfig.xpt +0 -0
- data/samples/navi/components/caps.xpt +0 -0
- data/samples/navi/components/chardet.xpt +0 -0
- data/samples/navi/components/chrome.xpt +0 -0
- data/samples/navi/components/commandhandler.xpt +0 -0
- data/samples/navi/components/commandlines.xpt +0 -0
- data/samples/navi/components/composer.xpt +0 -0
- data/samples/navi/components/compreg.dat +0 -1474
- data/samples/navi/components/content_base.xpt +0 -0
- data/samples/navi/components/content_html.xpt +0 -0
- data/samples/navi/components/content_htmldoc.xpt +0 -0
- data/samples/navi/components/content_xmldoc.xpt +0 -0
- data/samples/navi/components/content_xslt.xpt +0 -0
- data/samples/navi/components/content_xtf.xpt +0 -0
- data/samples/navi/components/directory.xpt +0 -0
- data/samples/navi/components/docshell_base.xpt +0 -0
- data/samples/navi/components/dom.xpt +0 -0
- data/samples/navi/components/dom_base.xpt +0 -0
- data/samples/navi/components/dom_canvas.xpt +0 -0
- data/samples/navi/components/dom_core.xpt +0 -0
- data/samples/navi/components/dom_css.xpt +0 -0
- data/samples/navi/components/dom_events.xpt +0 -0
- data/samples/navi/components/dom_html.xpt +0 -0
- data/samples/navi/components/dom_loadsave.xpt +0 -0
- data/samples/navi/components/dom_range.xpt +0 -0
- data/samples/navi/components/dom_sidebar.xpt +0 -0
- data/samples/navi/components/dom_storage.xpt +0 -0
- data/samples/navi/components/dom_stylesheets.xpt +0 -0
- data/samples/navi/components/dom_svg.xpt +0 -0
- data/samples/navi/components/dom_traversal.xpt +0 -0
- data/samples/navi/components/dom_views.xpt +0 -0
- data/samples/navi/components/dom_xbl.xpt +0 -0
- data/samples/navi/components/dom_xpath.xpt +0 -0
- data/samples/navi/components/dom_xul.xpt +0 -0
- data/samples/navi/components/downloads.xpt +0 -0
- data/samples/navi/components/editor.xpt +0 -0
- data/samples/navi/components/embed_base.xpt +0 -0
- data/samples/navi/components/extensions.xpt +0 -0
- data/samples/navi/components/exthandler.xpt +0 -0
- data/samples/navi/components/fastfind.xpt +0 -0
- data/samples/navi/components/feeds.xpt +0 -0
- data/samples/navi/components/find.xpt +0 -0
- data/samples/navi/components/gfx.xpt +0 -0
- data/samples/navi/components/gksvgrenderer.xpt +0 -0
- data/samples/navi/components/history.xpt +0 -0
- data/samples/navi/components/htmlparser.xpt +0 -0
- data/samples/navi/components/imglib2.xpt +0 -0
- data/samples/navi/components/inspector.xpt +0 -0
- data/samples/navi/components/intl.xpt +0 -0
- data/samples/navi/components/intlcmpt.xpt +0 -0
- data/samples/navi/components/jar.xpt +0 -0
- data/samples/navi/components/jsconsole-clhandler.js +0 -170
- data/samples/navi/components/jsconsole.xpt +0 -0
- data/samples/navi/components/jsdservice.xpt +0 -0
- data/samples/navi/components/layout_base.xpt +0 -0
- data/samples/navi/components/layout_printing.xpt +0 -0
- data/samples/navi/components/layout_xul.xpt +0 -0
- data/samples/navi/components/layout_xul_tree.xpt +0 -0
- data/samples/navi/components/locale.xpt +0 -0
- data/samples/navi/components/lwbrk.xpt +0 -0
- data/samples/navi/components/mimetype.xpt +0 -0
- data/samples/navi/components/mozbrwsr.xpt +0 -0
- data/samples/navi/components/mozfind.xpt +0 -0
- data/samples/navi/components/necko.xpt +0 -0
- data/samples/navi/components/necko_about.xpt +0 -0
- data/samples/navi/components/necko_cache.xpt +0 -0
- data/samples/navi/components/necko_cookie.xpt +0 -0
- data/samples/navi/components/necko_data.xpt +0 -0
- data/samples/navi/components/necko_dns.xpt +0 -0
- data/samples/navi/components/necko_file.xpt +0 -0
- data/samples/navi/components/necko_ftp.xpt +0 -0
- data/samples/navi/components/necko_http.xpt +0 -0
- data/samples/navi/components/necko_res.xpt +0 -0
- data/samples/navi/components/necko_socket.xpt +0 -0
- data/samples/navi/components/necko_strconv.xpt +0 -0
- data/samples/navi/components/necko_viewsource.xpt +0 -0
- data/samples/navi/components/nsCloseAllWindows.js +0 -143
- data/samples/navi/components/nsDefaultCLH.js +0 -231
- data/samples/navi/components/nsDictionary.js +0 -148
- data/samples/navi/components/nsExtensionManager.js +0 -8497
- data/samples/navi/components/nsHelperAppDlg.js +0 -990
- data/samples/navi/components/nsInterfaceInfoToIDL.js +0 -590
- data/samples/navi/components/nsKillAll.js +0 -200
- data/samples/navi/components/nsPostUpdateWin.js +0 -711
- data/samples/navi/components/nsProgressDialog.js +0 -949
- data/samples/navi/components/nsProxyAutoConfig.js +0 -396
- data/samples/navi/components/nsResetPref.js +0 -175
- data/samples/navi/components/nsURLFormatter.js +0 -179
- data/samples/navi/components/nsUpdateService.js +0 -3074
- data/samples/navi/components/nsXULAppInstall.js +0 -301
- data/samples/navi/components/nsXmlRpcClient.js +0 -1038
- data/samples/navi/components/oji.xpt +0 -0
- data/samples/navi/components/passwordmgr.xpt +0 -0
- data/samples/navi/components/pipboot.xpt +0 -0
- data/samples/navi/components/pipnss.xpt +0 -0
- data/samples/navi/components/plugin.xpt +0 -0
- data/samples/navi/components/pref.xpt +0 -0
- data/samples/navi/components/prefetch.xpt +0 -0
- data/samples/navi/components/profile.xpt +0 -0
- data/samples/navi/components/progressDlg.xpt +0 -0
- data/samples/navi/components/proxyObject.xpt +0 -0
- data/samples/navi/components/rdf.xpt +0 -0
- data/samples/navi/components/satchel.xpt +0 -0
- data/samples/navi/components/saxparser.xpt +0 -0
- data/samples/navi/components/shistory.xpt +0 -0
- data/samples/navi/components/storage.xpt +0 -0
- data/samples/navi/components/toolkitprofile.xpt +0 -0
- data/samples/navi/components/transformiix.dll +0 -0
- data/samples/navi/components/txmgr.xpt +0 -0
- data/samples/navi/components/txtsvc.xpt +0 -0
- data/samples/navi/components/uconv.xpt +0 -0
- data/samples/navi/components/unicharutil.xpt +0 -0
- data/samples/navi/components/universalchardet.dll +0 -0
- data/samples/navi/components/update.xpt +0 -0
- data/samples/navi/components/uriloader.xpt +0 -0
- data/samples/navi/components/urlformatter.xpt +0 -0
- data/samples/navi/components/webBrowser_core.xpt +0 -0
- data/samples/navi/components/webbrowserpersist.xpt +0 -0
- data/samples/navi/components/webshell_idls.xpt +0 -0
- data/samples/navi/components/websrvcs.dll +0 -0
- data/samples/navi/components/websrvcs.xpt +0 -0
- data/samples/navi/components/widget.xpt +0 -0
- data/samples/navi/components/windowds.xpt +0 -0
- data/samples/navi/components/windowwatcher.xpt +0 -0
- data/samples/navi/components/xml-rpc.xpt +0 -0
- data/samples/navi/components/xmlextras.dll +0 -0
- data/samples/navi/components/xpcom_base.xpt +0 -0
- data/samples/navi/components/xpcom_components.xpt +0 -0
- data/samples/navi/components/xpcom_ds.xpt +0 -0
- data/samples/navi/components/xpcom_io.xpt +0 -0
- data/samples/navi/components/xpcom_obsolete.xpt +0 -0
- data/samples/navi/components/xpcom_thread.xpt +0 -0
- data/samples/navi/components/xpcom_xpti.xpt +0 -0
- data/samples/navi/components/xpconnect.xpt +0 -0
- data/samples/navi/components/xpinstall.xpt +0 -0
- data/samples/navi/components/xpti.dat +0 -1424
- data/samples/navi/components/xulapp.xpt +0 -0
- data/samples/navi/components/xulapp_setup.xpt +0 -0
- data/samples/navi/components/xuldoc.xpt +0 -0
- data/samples/navi/components/xulrunner.xpt +0 -0
- data/samples/navi/components/xultmpl.xpt +0 -0
- data/samples/navi/components/xulutil.dll +0 -0
- data/samples/navi/controlsNaviMask.png +0 -0
- data/samples/navi/greprefs/all.js +0 -1344
- data/samples/navi/greprefs/security-prefs.js +0 -69
- data/samples/navi/greprefs/xpinstall.js +0 -2
- data/samples/navi/navi_demo.rb +0 -207
- data/samples/navi/plugins/NPSWF32.dll +0 -0
- data/samples/navi/plugins/flashplayer.xpt +0 -0
- data/samples/navi/plugins/npnul32.dll +0 -0
- data/samples/navi/res/EditorOverride.css +0 -359
- data/samples/navi/res/Thumbs.db +0 -0
- data/samples/navi/res/arrow.gif +0 -0
- data/samples/navi/res/arrowd.gif +0 -0
- data/samples/navi/res/bloatcycle.html +0 -40
- data/samples/navi/res/broken-image.gif +0 -0
- data/samples/navi/res/charsetData.properties +0 -199
- data/samples/navi/res/charsetalias.properties +0 -517
- data/samples/navi/res/cmessage.txt +0 -1
- data/samples/navi/res/dtd/xhtml11.dtd +0 -300
- data/samples/navi/res/entityTables/html40Latin1.properties +0 -146
- data/samples/navi/res/entityTables/html40Special.properties +0 -69
- data/samples/navi/res/entityTables/html40Symbols.properties +0 -164
- data/samples/navi/res/entityTables/htmlEntityVersions.properties +0 -50
- data/samples/navi/res/entityTables/transliterate.properties +0 -2367
- data/samples/navi/res/fonts/fontEncoding.properties +0 -127
- data/samples/navi/res/fonts/fontNameMap.properties +0 -134
- data/samples/navi/res/forms.css +0 -531
- data/samples/navi/res/grabber.gif +0 -0
- data/samples/navi/res/hiddenWindow.html +0 -1
- data/samples/navi/res/html/Thumbs.db +0 -0
- data/samples/navi/res/html/gopher-audio.gif +0 -0
- data/samples/navi/res/html/gopher-binary.gif +0 -0
- data/samples/navi/res/html/gopher-find.gif +0 -0
- data/samples/navi/res/html/gopher-image.gif +0 -0
- data/samples/navi/res/html/gopher-menu.gif +0 -0
- data/samples/navi/res/html/gopher-movie.gif +0 -0
- data/samples/navi/res/html/gopher-sound.gif +0 -0
- data/samples/navi/res/html/gopher-telnet.gif +0 -0
- data/samples/navi/res/html/gopher-text.gif +0 -0
- data/samples/navi/res/html/gopher-unknown.gif +0 -0
- data/samples/navi/res/html.css +0 -478
- data/samples/navi/res/langGroups.properties +0 -236
- data/samples/navi/res/language.properties +0 -259
- data/samples/navi/res/loading-image.gif +0 -0
- data/samples/navi/res/quirk.css +0 -282
- data/samples/navi/res/samples/Anieyes.gif +0 -0
- data/samples/navi/res/samples/Thumbs.db +0 -0
- data/samples/navi/res/samples/aform.css +0 -69
- data/samples/navi/res/samples/beeptest.html +0 -18
- data/samples/navi/res/samples/bform.css +0 -45
- data/samples/navi/res/samples/bg.jpg +0 -0
- data/samples/navi/res/samples/cform.css +0 -40
- data/samples/navi/res/samples/checkboxTest.xul +0 -47
- data/samples/navi/res/samples/demoform.css +0 -97
- data/samples/navi/res/samples/find.html +0 -97
- data/samples/navi/res/samples/gear1.gif +0 -0
- data/samples/navi/res/samples/image_props.html +0 -58
- data/samples/navi/res/samples/mozform.css +0 -256
- data/samples/navi/res/samples/printsetup.html +0 -175
- data/samples/navi/res/samples/raptor.jpg +0 -0
- data/samples/navi/res/samples/rock_gra.gif +0 -0
- data/samples/navi/res/samples/scrollbarTest1.xul +0 -66
- data/samples/navi/res/samples/scrollbarTest2.xul +0 -19
- data/samples/navi/res/samples/sliderTest1.xul +0 -14
- data/samples/navi/res/samples/soundtest.html +0 -20
- data/samples/navi/res/samples/test.wav +0 -0
- data/samples/navi/res/samples/test0.html +0 -220
- data/samples/navi/res/samples/test1.html +0 -84
- data/samples/navi/res/samples/test10.html +0 -16
- data/samples/navi/res/samples/test11.html +0 -42
- data/samples/navi/res/samples/test12.html +0 -79
- data/samples/navi/res/samples/test13.html +0 -126
- data/samples/navi/res/samples/test14.html +0 -5
- data/samples/navi/res/samples/test15.html +0 -5
- data/samples/navi/res/samples/test16.html +0 -124
- data/samples/navi/res/samples/test2.html +0 -41
- data/samples/navi/res/samples/test3.html +0 -126
- data/samples/navi/res/samples/test4.html +0 -335
- data/samples/navi/res/samples/test5.html +0 -199
- data/samples/navi/res/samples/test6.html +0 -335
- data/samples/navi/res/samples/test7.html +0 -11
- data/samples/navi/res/samples/test8-1.html +0 -66
- data/samples/navi/res/samples/test8.html +0 -662
- data/samples/navi/res/samples/test8dom.html +0 -64
- data/samples/navi/res/samples/test8sca.html +0 -308
- data/samples/navi/res/samples/test8siz.html +0 -224
- data/samples/navi/res/samples/test8tab.html +0 -9
- data/samples/navi/res/samples/test9.html +0 -12
- data/samples/navi/res/samples/test9a.html +0 -39
- data/samples/navi/res/samples/test9b.html +0 -16
- data/samples/navi/res/samples/test_ed.html +0 -5
- data/samples/navi/res/samples/test_form.html +0 -34
- data/samples/navi/res/samples/test_gfx.html +0 -75
- data/samples/navi/res/samples/test_lbox.html +0 -100
- data/samples/navi/res/samples/test_pr.html +0 -87
- data/samples/navi/res/samples/test_weight.html +0 -45
- data/samples/navi/res/samples/toolbarTest1.xul +0 -51
- data/samples/navi/res/samples/treeTest1.css +0 -62
- data/samples/navi/res/samples/treeTest1.xul +0 -110
- data/samples/navi/res/samples/xulTest.css +0 -130
- data/samples/navi/res/svg.css +0 -64
- data/samples/navi/res/table-add-column-after-active.gif +0 -0
- data/samples/navi/res/table-add-column-after-hover.gif +0 -0
- data/samples/navi/res/table-add-column-after.gif +0 -0
- data/samples/navi/res/table-add-column-before-active.gif +0 -0
- data/samples/navi/res/table-add-column-before-hover.gif +0 -0
- data/samples/navi/res/table-add-column-before.gif +0 -0
- data/samples/navi/res/table-add-row-after-active.gif +0 -0
- data/samples/navi/res/table-add-row-after-hover.gif +0 -0
- data/samples/navi/res/table-add-row-after.gif +0 -0
- data/samples/navi/res/table-add-row-before-active.gif +0 -0
- data/samples/navi/res/table-add-row-before-hover.gif +0 -0
- data/samples/navi/res/table-add-row-before.gif +0 -0
- data/samples/navi/res/table-remove-column-active.gif +0 -0
- data/samples/navi/res/table-remove-column-hover.gif +0 -0
- data/samples/navi/res/table-remove-column.gif +0 -0
- data/samples/navi/res/table-remove-row-active.gif +0 -0
- data/samples/navi/res/table-remove-row-hover.gif +0 -0
- data/samples/navi/res/table-remove-row.gif +0 -0
- data/samples/navi/res/throbber/Thumbs.db +0 -0
- data/samples/navi/res/throbber/anim.gif +0 -0
- data/samples/navi/res/throbber/anims00.gif +0 -0
- data/samples/navi/res/throbber/anims01.gif +0 -0
- data/samples/navi/res/throbber/anims02.gif +0 -0
- data/samples/navi/res/throbber/anims03.gif +0 -0
- data/samples/navi/res/throbber/anims04.gif +0 -0
- data/samples/navi/res/throbber/anims05.gif +0 -0
- data/samples/navi/res/throbber/anims06.gif +0 -0
- data/samples/navi/res/throbber/anims07.gif +0 -0
- data/samples/navi/res/throbber/anims08.gif +0 -0
- data/samples/navi/res/throbber/anims09.gif +0 -0
- data/samples/navi/res/throbber/anims10.gif +0 -0
- data/samples/navi/res/throbber/anims11.gif +0 -0
- data/samples/navi/res/throbber/anims12.gif +0 -0
- data/samples/navi/res/throbber/anims13.gif +0 -0
- data/samples/navi/res/throbber/anims14.gif +0 -0
- data/samples/navi/res/throbber/anims15.gif +0 -0
- data/samples/navi/res/throbber/anims16.gif +0 -0
- data/samples/navi/res/throbber/anims17.gif +0 -0
- data/samples/navi/res/throbber/anims18.gif +0 -0
- data/samples/navi/res/throbber/anims19.gif +0 -0
- data/samples/navi/res/throbber/anims20.gif +0 -0
- data/samples/navi/res/throbber/anims21.gif +0 -0
- data/samples/navi/res/throbber/anims22.gif +0 -0
- data/samples/navi/res/throbber/anims23.gif +0 -0
- data/samples/navi/res/throbber/anims24.gif +0 -0
- data/samples/navi/res/throbber/anims25.gif +0 -0
- data/samples/navi/res/throbber/anims26.gif +0 -0
- data/samples/navi/res/throbber/anims27.gif +0 -0
- data/samples/navi/res/throbber/anims28.gif +0 -0
- data/samples/navi/res/throbber/anims29.gif +0 -0
- data/samples/navi/res/ua.css +0 -235
- data/samples/navi/res/viewer.properties +0 -1
- data/samples/navi/res/viewsource.css +0 -118
- data/samples/navi/res/wincharset.properties +0 -55
- data/samples/navi/resources.cfg +0 -14
- data/samples/navi/testNaviMask.png +0 -0
- data/samples/render_run_log.5796 +0 -891
@@ -1,590 +0,0 @@
|
|
1
|
-
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
3
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
4
|
-
*
|
5
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
6
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
7
|
-
* the License. You may obtain a copy of the License at
|
8
|
-
* http://www.mozilla.org/MPL/
|
9
|
-
*
|
10
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
11
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
12
|
-
* for the specific language governing rights and limitations under the
|
13
|
-
* License.
|
14
|
-
*
|
15
|
-
* The Original Code is mozilla.org code.
|
16
|
-
*
|
17
|
-
* The Initial Developer of the Original Code is
|
18
|
-
* Netscape Communications Corporation.
|
19
|
-
* Portions created by the Initial Developer are Copyright (C) 2002
|
20
|
-
* the Initial Developer. All Rights Reserved.
|
21
|
-
*
|
22
|
-
* Contributor(s):
|
23
|
-
*
|
24
|
-
* Alternatively, the contents of this file may be used under the terms of
|
25
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
26
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
27
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
28
|
-
* of those above. If you wish to allow use of your version of this file only
|
29
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
30
|
-
* use your version of this file under the terms of the MPL, indicate your
|
31
|
-
* decision by deleting the provisions above and replace them with the notice
|
32
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
33
|
-
* the provisions above, a recipient may use your version of this file under
|
34
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
35
|
-
*
|
36
|
-
* ***** END LICENSE BLOCK ***** */
|
37
|
-
|
38
|
-
/* The nsInterfaceInfoToIDL implementation.*/
|
39
|
-
|
40
|
-
|
41
|
-
/***************************************************************************/
|
42
|
-
// nsInterfaceInfoToIDL part...
|
43
|
-
|
44
|
-
const IInfo = new Components.Constructor("@mozilla.org/scriptableInterfaceInfo;1",
|
45
|
-
"nsIScriptableInterfaceInfo",
|
46
|
-
"init");
|
47
|
-
|
48
|
-
const nsIDataType = Components.interfaces.nsIDataType;
|
49
|
-
const nsISupports = Components.interfaces.nsISupports;
|
50
|
-
|
51
|
-
const PARAM_NAME_PREFIX = "arg";
|
52
|
-
const MISSING_INTERFACE = "@"; // flag to indicate missing interfaceinfo
|
53
|
-
|
54
|
-
// helpers...
|
55
|
-
|
56
|
-
/********************************************************/
|
57
|
-
// accumulate a string with a stream-ish abstraction
|
58
|
-
|
59
|
-
function Buffer() {
|
60
|
-
this.buffer = "";
|
61
|
-
}
|
62
|
-
|
63
|
-
Buffer.prototype = {
|
64
|
-
write : function(s) {
|
65
|
-
if(s)
|
66
|
-
this.buffer += s;
|
67
|
-
},
|
68
|
-
|
69
|
-
writeln : function(s) {
|
70
|
-
if(s)
|
71
|
-
this.buffer += s + "\n";
|
72
|
-
else
|
73
|
-
this.buffer += "\n";
|
74
|
-
}
|
75
|
-
}
|
76
|
-
|
77
|
-
/********************************************************/
|
78
|
-
|
79
|
-
/**
|
80
|
-
* takes: {xxx}
|
81
|
-
* returns: uuid(xxx)
|
82
|
-
*/
|
83
|
-
function formatID(str)
|
84
|
-
{
|
85
|
-
return "uuid("+str.substring(1,str.length-1)+")";
|
86
|
-
}
|
87
|
-
|
88
|
-
function formatConstType(type)
|
89
|
-
{
|
90
|
-
switch(type)
|
91
|
-
{
|
92
|
-
case nsIDataType.VTYPE_INT16:
|
93
|
-
return "PRInt16";
|
94
|
-
case nsIDataType.VTYPE_INT32:
|
95
|
-
return "PRInt32";
|
96
|
-
case nsIDataType.VTYPE_UINT16:
|
97
|
-
return "PRUint16";
|
98
|
-
case nsIDataType.VTYPE_UINT32:
|
99
|
-
return "PRUint32";
|
100
|
-
default:
|
101
|
-
return "!!!! bad const type !!!";
|
102
|
-
}
|
103
|
-
}
|
104
|
-
|
105
|
-
function formatTypeName(info, methodIndex, param, dimension)
|
106
|
-
{
|
107
|
-
var type = info.getTypeForParam(methodIndex, param, dimension);
|
108
|
-
|
109
|
-
switch(type.dataType)
|
110
|
-
{
|
111
|
-
case nsIDataType.VTYPE_INT8 :
|
112
|
-
return "PRInt8";
|
113
|
-
case nsIDataType.VTYPE_INT16:
|
114
|
-
return "PRInt16";
|
115
|
-
case nsIDataType.VTYPE_INT32:
|
116
|
-
return "PRInt32";
|
117
|
-
case nsIDataType.VTYPE_INT64:
|
118
|
-
return "PRInt64";
|
119
|
-
case nsIDataType.VTYPE_UINT8:
|
120
|
-
return "PRUint8";
|
121
|
-
case nsIDataType.VTYPE_UINT16:
|
122
|
-
return "PRUint16";
|
123
|
-
case nsIDataType.VTYPE_UINT32:
|
124
|
-
return "PRUint32";
|
125
|
-
case nsIDataType.VTYPE_UINT64:
|
126
|
-
return "PRUint64";
|
127
|
-
case nsIDataType.VTYPE_FLOAT:
|
128
|
-
return "float";
|
129
|
-
case nsIDataType.VTYPE_DOUBLE:
|
130
|
-
return "double";
|
131
|
-
case nsIDataType.VTYPE_BOOL:
|
132
|
-
return "PRBool";
|
133
|
-
case nsIDataType.VTYPE_CHAR:
|
134
|
-
return "char";
|
135
|
-
case nsIDataType.VTYPE_WCHAR:
|
136
|
-
return "PRUnichar";
|
137
|
-
case nsIDataType.VTYPE_VOID:
|
138
|
-
if(type.isPointer)
|
139
|
-
return "voidPtr";
|
140
|
-
return "void";
|
141
|
-
case nsIDataType.VTYPE_ID:
|
142
|
-
// order matters here...
|
143
|
-
if(type.isReference)
|
144
|
-
return "nsIDRef";
|
145
|
-
if(type.isPointer)
|
146
|
-
return "nsIDPtr";
|
147
|
-
return "nsID";
|
148
|
-
case nsIDataType.VTYPE_DOMSTRING:
|
149
|
-
return "DOMString";
|
150
|
-
case nsIDataType.VTYPE_CHAR_STR:
|
151
|
-
return "string";
|
152
|
-
case nsIDataType.VTYPE_WCHAR_STR:
|
153
|
-
return "wstring";
|
154
|
-
case nsIDataType.VTYPE_INTERFACE:
|
155
|
-
try {
|
156
|
-
return info.getInfoForParam(methodIndex, param).name;
|
157
|
-
} catch(e) {
|
158
|
-
return "/*!!! missing interface info, guessing!!!*/ nsISupports";
|
159
|
-
}
|
160
|
-
case nsIDataType.VTYPE_INTERFACE_IS:
|
161
|
-
return "nsQIResult";
|
162
|
-
case nsIDataType.VTYPE_ARRAY:
|
163
|
-
return formatTypeName(info, methodIndex, param, dimension+1);
|
164
|
-
case nsIDataType.VTYPE_STRING_SIZE_IS:
|
165
|
-
return "string";
|
166
|
-
case nsIDataType.VTYPE_WSTRING_SIZE_IS:
|
167
|
-
return "wstring";
|
168
|
-
case nsIDataType.VTYPE_UTF8STRING:
|
169
|
-
return "AUTF8String";
|
170
|
-
case nsIDataType.VTYPE_CSTRING:
|
171
|
-
return "ACString";
|
172
|
-
case nsIDataType.VTYPE_ASTRING:
|
173
|
-
return "AString";
|
174
|
-
default:
|
175
|
-
return "!!!! bad data type !!!";
|
176
|
-
}
|
177
|
-
}
|
178
|
-
|
179
|
-
function formatBracketForParam(info, methodIndex, param)
|
180
|
-
{
|
181
|
-
var type = param.type;
|
182
|
-
var str = "[";
|
183
|
-
var found = 0;
|
184
|
-
var size_is_ArgNum;
|
185
|
-
var length_is_ArgNum;
|
186
|
-
|
187
|
-
if(param.isRetval)
|
188
|
-
{
|
189
|
-
if(found++)
|
190
|
-
str += ", ";
|
191
|
-
str += "retval"
|
192
|
-
}
|
193
|
-
|
194
|
-
if(param.isShared)
|
195
|
-
{
|
196
|
-
if(found++)
|
197
|
-
str += ", ";
|
198
|
-
str += "shared"
|
199
|
-
}
|
200
|
-
|
201
|
-
if(type.isArray)
|
202
|
-
{
|
203
|
-
if(found++)
|
204
|
-
str += ", ";
|
205
|
-
str += "array"
|
206
|
-
}
|
207
|
-
|
208
|
-
if(type.dataType == nsIDataType.VTYPE_INTERFACE_IS)
|
209
|
-
{
|
210
|
-
if(found++)
|
211
|
-
str += ", ";
|
212
|
-
str += "iid_is("+
|
213
|
-
PARAM_NAME_PREFIX +
|
214
|
-
info.getInterfaceIsArgNumberForParam(methodIndex, param) + ")";
|
215
|
-
}
|
216
|
-
|
217
|
-
if(type.isArray ||
|
218
|
-
type.dataType == nsIDataType.VTYPE_STRING_SIZE_IS ||
|
219
|
-
type.dataType == nsIDataType.VTYPE_WSTRING_SIZE_IS)
|
220
|
-
{
|
221
|
-
if(found++)
|
222
|
-
str += ", ";
|
223
|
-
|
224
|
-
size_is_ArgNum =
|
225
|
-
info.getSizeIsArgNumberForParam(methodIndex, param, 0);
|
226
|
-
|
227
|
-
str += "size_is("+ PARAM_NAME_PREFIX + size_is_ArgNum + ")";
|
228
|
-
|
229
|
-
length_is_ArgNum =
|
230
|
-
info.getLengthIsArgNumberForParam(methodIndex, param, 0);
|
231
|
-
|
232
|
-
if(length_is_ArgNum != size_is_ArgNum)
|
233
|
-
{
|
234
|
-
str += ", ";
|
235
|
-
str += "length_is("+ PARAM_NAME_PREFIX + length_is_ArgNum + ")";
|
236
|
-
}
|
237
|
-
}
|
238
|
-
|
239
|
-
if(!found)
|
240
|
-
return "";
|
241
|
-
str += "] ";
|
242
|
-
return str
|
243
|
-
}
|
244
|
-
|
245
|
-
function doInterface(out, iid)
|
246
|
-
{
|
247
|
-
var i, k, t, m, m2, c, p, readonly, bracketed, paramCount, retvalTypeName;
|
248
|
-
|
249
|
-
var info = new IInfo(iid);
|
250
|
-
var parent = info.parent;
|
251
|
-
|
252
|
-
var constBaseIndex = parent ? parent.constantCount : 0;
|
253
|
-
var constTotalCount = info.constantCount;
|
254
|
-
var constLocalCount = constTotalCount - constBaseIndex;
|
255
|
-
|
256
|
-
var methodBaseIndex = parent ? parent.methodCount : 0;
|
257
|
-
var methodTotalCount = info.methodCount;
|
258
|
-
var methodLocalCount = methodTotalCount - methodBaseIndex;
|
259
|
-
|
260
|
-
|
261
|
-
// maybe recurring to emit parent declarations is not a good idea...
|
262
|
-
// if(parent)
|
263
|
-
// doInterface(parent.interfaceID);
|
264
|
-
|
265
|
-
out.writeln();
|
266
|
-
|
267
|
-
// comment out nsISupports
|
268
|
-
// if(iid.equals(nsISupports))
|
269
|
-
// out.writeln("/*\n");
|
270
|
-
|
271
|
-
out.writeln("[" + (info.isScriptable ? "scriptable, " : "") +
|
272
|
-
formatID(info.interfaceID.number) + "]");
|
273
|
-
|
274
|
-
out.writeln("interface "+ info.name +
|
275
|
-
(parent ? (" : "+parent.name) : "") + " {");
|
276
|
-
|
277
|
-
if(constLocalCount)
|
278
|
-
{
|
279
|
-
for(i = constBaseIndex; i < constTotalCount; i++)
|
280
|
-
{
|
281
|
-
c = info.getConstant(i);
|
282
|
-
out.writeln(" const " + formatConstType(c.type.dataType) + " " +
|
283
|
-
c.name + " = " + c.value + ";");
|
284
|
-
}
|
285
|
-
}
|
286
|
-
|
287
|
-
if(constLocalCount && methodLocalCount)
|
288
|
-
out.writeln();
|
289
|
-
|
290
|
-
if(methodLocalCount)
|
291
|
-
{
|
292
|
-
for(i = methodBaseIndex; i < methodTotalCount; i++)
|
293
|
-
{
|
294
|
-
m = info.getMethodInfo(i);
|
295
|
-
|
296
|
-
if(m.isNotXPCOM)
|
297
|
-
bracketed = "[notxpcom] "
|
298
|
-
else if(m.isHidden)
|
299
|
-
bracketed = "[noscript] "
|
300
|
-
else
|
301
|
-
bracketed = "";
|
302
|
-
|
303
|
-
if(m.isGetter)
|
304
|
-
{
|
305
|
-
// Is an attribute
|
306
|
-
|
307
|
-
// figure out if this is readonly
|
308
|
-
m2 = i+1 < methodTotalCount ? info.getMethodInfo(i+1) : null;
|
309
|
-
readonly = !m2 || m2.name != m.name;
|
310
|
-
|
311
|
-
out.writeln(" " + bracketed + (readonly ? "readonly " : "") +
|
312
|
-
"attribute " +
|
313
|
-
formatTypeName(info, i, m.getParam(0), 0) +
|
314
|
-
" " + m.name + ";\n");
|
315
|
-
|
316
|
-
if(!readonly)
|
317
|
-
i++; // skip the next one, we have it covered.
|
318
|
-
|
319
|
-
continue;
|
320
|
-
}
|
321
|
-
// else...
|
322
|
-
|
323
|
-
paramCount = m.paramCount;
|
324
|
-
|
325
|
-
// 'last' param is used to figure out retvalTypeName
|
326
|
-
|
327
|
-
p = paramCount ? m.getParam(paramCount-1) : null;
|
328
|
-
|
329
|
-
if(m.isNotXPCOM)
|
330
|
-
retvalTypeName = formatTypeName(info, i, m.result, 0);
|
331
|
-
else if(p && "[retval] " == formatBracketForParam(info, i, p))
|
332
|
-
{
|
333
|
-
// Check for the exact string above because anything else
|
334
|
-
// indicates that there either is no expilict retval
|
335
|
-
// or there are additional braketed attributes (meaning that
|
336
|
-
// the retval must appear in the param list and not
|
337
|
-
// preceeding the method name).
|
338
|
-
retvalTypeName = formatTypeName(info, i, p, 0);
|
339
|
-
// no need to print it in the param list
|
340
|
-
paramCount-- ;
|
341
|
-
}
|
342
|
-
else
|
343
|
-
retvalTypeName = "void";
|
344
|
-
|
345
|
-
// print method name
|
346
|
-
|
347
|
-
out.writeln(" " + bracketed + retvalTypeName + " " + m.name +
|
348
|
-
"(" + (paramCount ? "" : ");"));
|
349
|
-
|
350
|
-
// print params
|
351
|
-
|
352
|
-
for(k = 0; k < paramCount; k++)
|
353
|
-
{
|
354
|
-
p = m.getParam(k);
|
355
|
-
out.writeln(" "+
|
356
|
-
formatBracketForParam(info, i, p) +
|
357
|
-
(p.isOut ? p.isIn ? "inout " : "out " : "in ") +
|
358
|
-
formatTypeName(info, i, p, 0) + " " +
|
359
|
-
PARAM_NAME_PREFIX+k +
|
360
|
-
(k+1 == paramCount ? ");\n" : ", "));
|
361
|
-
}
|
362
|
-
}
|
363
|
-
}
|
364
|
-
|
365
|
-
out.writeln("};\n");
|
366
|
-
|
367
|
-
// comment out nsISupports
|
368
|
-
// if(iid.equals(nsISupports))
|
369
|
-
// out.writeln("\n*/\n");
|
370
|
-
}
|
371
|
-
|
372
|
-
function appendForwardDeclarations(list, info)
|
373
|
-
{
|
374
|
-
list.push(info.name);
|
375
|
-
if(info.parent)
|
376
|
-
appendForwardDeclarations(list, info.parent);
|
377
|
-
|
378
|
-
var i, k, m, p;
|
379
|
-
|
380
|
-
for(i = 0; i < info.methodCount; i++)
|
381
|
-
{
|
382
|
-
m = info.getMethodInfo(i);
|
383
|
-
|
384
|
-
for(k = 0; k < m.paramCount; k++)
|
385
|
-
{
|
386
|
-
p = m.getParam(k);
|
387
|
-
|
388
|
-
if(p.type.dataType == nsIDataType.VTYPE_INTERFACE)
|
389
|
-
{
|
390
|
-
var name;
|
391
|
-
try {
|
392
|
-
name = info.getInfoForParam(i, p).name;
|
393
|
-
} catch(e) {
|
394
|
-
name = MISSING_INTERFACE;
|
395
|
-
}
|
396
|
-
list.push(name);
|
397
|
-
}
|
398
|
-
}
|
399
|
-
}
|
400
|
-
}
|
401
|
-
|
402
|
-
function doForwardDeclarations(out, iid)
|
403
|
-
{
|
404
|
-
var i, cur, prev;
|
405
|
-
var list = [];
|
406
|
-
appendForwardDeclarations(list, new IInfo(iid));
|
407
|
-
list.sort();
|
408
|
-
|
409
|
-
out.writeln("// forward declarations...");
|
410
|
-
|
411
|
-
for(i = 0; i < list.length; i++)
|
412
|
-
{
|
413
|
-
cur = list[i];
|
414
|
-
if(cur != prev && cur != "nsISupports")
|
415
|
-
{
|
416
|
-
if(cur == MISSING_INTERFACE)
|
417
|
-
out.writeln("/*\n * !!! Unable to find details for a declared "+
|
418
|
-
"interface (name unknown)!!!\n */");
|
419
|
-
else
|
420
|
-
out.writeln("interface " + cur +";");
|
421
|
-
prev = cur;
|
422
|
-
}
|
423
|
-
}
|
424
|
-
}
|
425
|
-
|
426
|
-
function buildForwardDeclarationsList(iid)
|
427
|
-
{
|
428
|
-
var i, cur, prev;
|
429
|
-
var list = [];
|
430
|
-
var outList = [];
|
431
|
-
appendForwardDeclarations(list, new IInfo(iid));
|
432
|
-
list.sort();
|
433
|
-
|
434
|
-
for(i = 0; i < list.length; i++)
|
435
|
-
{
|
436
|
-
cur = list[i];
|
437
|
-
if(cur != prev && cur != "nsISupports")
|
438
|
-
{
|
439
|
-
if(cur != MISSING_INTERFACE)
|
440
|
-
outList.push(cur);
|
441
|
-
prev = cur;
|
442
|
-
}
|
443
|
-
}
|
444
|
-
return outList;
|
445
|
-
}
|
446
|
-
|
447
|
-
/*********************************************************/
|
448
|
-
|
449
|
-
/* Our Componenent ctor */
|
450
|
-
function nsInterfaceInfoToIDL() {}
|
451
|
-
|
452
|
-
/* decorate prototype to provide ``class'' methods and property accessors */
|
453
|
-
nsInterfaceInfoToIDL.prototype =
|
454
|
-
{
|
455
|
-
// nsIInterfaceInfoToIDL methods...
|
456
|
-
|
457
|
-
// string generateIDL(in nsIIDRef aIID,
|
458
|
-
// in PRBool withIncludes,
|
459
|
-
// in PRBool withForwardDeclarations);
|
460
|
-
generateIDL : function(aIID, withIncludes, withForwardDeclarations) {
|
461
|
-
var out = new Buffer;
|
462
|
-
out.writeln();
|
463
|
-
|
464
|
-
if(withIncludes)
|
465
|
-
{
|
466
|
-
out.writeln('#include "nsISupports.idl"');
|
467
|
-
out.writeln();
|
468
|
-
}
|
469
|
-
|
470
|
-
if(withForwardDeclarations)
|
471
|
-
{
|
472
|
-
doForwardDeclarations(out, aIID);
|
473
|
-
out.writeln("");
|
474
|
-
}
|
475
|
-
|
476
|
-
doInterface(out, aIID);
|
477
|
-
|
478
|
-
return out.buffer;
|
479
|
-
},
|
480
|
-
|
481
|
-
// void getReferencedInterfaceNames(in nsIIDRef aIID,
|
482
|
-
// out PRUint32 aArrayLength,
|
483
|
-
// [retval, array, size_is(aArrayLength)]
|
484
|
-
// out string aNames);
|
485
|
-
|
486
|
-
getReferencedInterfaceNames : function(aIID, aArrayLength) {
|
487
|
-
var list = buildForwardDeclarationsList(aIID);
|
488
|
-
aArrayLength.value = list.length;
|
489
|
-
return list;
|
490
|
-
},
|
491
|
-
|
492
|
-
// nsISupports methods...
|
493
|
-
QueryInterface: function (iid) {
|
494
|
-
if (iid.equals(Components.interfaces.nsIInterfaceInfoToIDL) ||
|
495
|
-
iid.equals(Components.interfaces.nsISupports))
|
496
|
-
return this;
|
497
|
-
|
498
|
-
Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE;
|
499
|
-
return null;
|
500
|
-
}
|
501
|
-
}
|
502
|
-
|
503
|
-
/***************************************************************************/
|
504
|
-
/***************************************************************************/
|
505
|
-
// parts specific to my use of the the generic module code...
|
506
|
-
|
507
|
-
const MODULE_NAME = "nsInterfaceInfoToIDL";
|
508
|
-
const MODULE_CONTRACT_ID = "@mozilla.org/interfaceinfotoidl;1";
|
509
|
-
const MODULE_CID = "{47d98974-a1b7-46a6-bc99-8abc374bba3f}";
|
510
|
-
const MODULE_CTOR = nsInterfaceInfoToIDL;
|
511
|
-
|
512
|
-
/***************************************************************************/
|
513
|
-
/***************************************************************************/
|
514
|
-
// generic nsIModule part...
|
515
|
-
|
516
|
-
function NSGetModule(compMgr, fileSpec) {
|
517
|
-
return new GenericModule(MODULE_NAME, MODULE_CONTRACT_ID,
|
518
|
-
MODULE_CID, MODULE_CTOR);
|
519
|
-
}
|
520
|
-
|
521
|
-
function GenericModule (name, contractID, CID, ctor) {
|
522
|
-
this.name = name;
|
523
|
-
this.contractID = contractID;
|
524
|
-
this.CID = Components.ID(CID);
|
525
|
-
this.ctor = ctor;
|
526
|
-
}
|
527
|
-
|
528
|
-
GenericModule.prototype = {
|
529
|
-
/*
|
530
|
-
* RegisterSelf is called at registration time (component installation
|
531
|
-
* or the only-until-release startup autoregistration) and is responsible
|
532
|
-
* for notifying the component manager of all components implemented in
|
533
|
-
* this module. The fileSpec, location and type parameters are mostly
|
534
|
-
* opaque, and should be passed on to the registerComponent call
|
535
|
-
* unmolested.
|
536
|
-
*/
|
537
|
-
registerSelf: function (compMgr, fileSpec, location, type) {
|
538
|
-
compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
|
539
|
-
compMgr.registerFactoryLocation(this.CID, this.name, this.contractID,
|
540
|
-
fileSpec, location, type);
|
541
|
-
},
|
542
|
-
|
543
|
-
/*
|
544
|
-
* The GetClassObject method is responsible for producing Factory and
|
545
|
-
* SingletonFactory objects (the latter are specialized for services).
|
546
|
-
*/
|
547
|
-
getClassObject: function (compMgr, cid, iid) {
|
548
|
-
if (!cid.equals(this.CID))
|
549
|
-
throw Components.results.NS_ERROR_NO_INTERFACE;
|
550
|
-
|
551
|
-
if (!iid.equals(Components.interfaces.nsIFactory))
|
552
|
-
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
553
|
-
|
554
|
-
this.myFactory.ctor = this.ctor;
|
555
|
-
return this.myFactory;
|
556
|
-
},
|
557
|
-
|
558
|
-
/* factory object */
|
559
|
-
myFactory: {
|
560
|
-
|
561
|
-
/*
|
562
|
-
* Construct an instance of the interface specified by iid, possibly
|
563
|
-
* aggregating it with the provided outer. (If you don't know what
|
564
|
-
* aggregation is all about, you don't need to. It reduces even the
|
565
|
-
* mightiest of XPCOM warriors to snivelling cowards.)
|
566
|
-
*/
|
567
|
-
createInstance: function (outer, iid) {
|
568
|
-
if (outer != null)
|
569
|
-
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
570
|
-
return (new this.ctor()).QueryInterface(iid);
|
571
|
-
}
|
572
|
-
},
|
573
|
-
|
574
|
-
/*
|
575
|
-
* The canUnload method signals that the component is about to be unloaded.
|
576
|
-
* C++ components can return false to indicate that they don't wish to be
|
577
|
-
* unloaded, but the return value from JS components' canUnload is ignored:
|
578
|
-
* mark-and-sweep will keep everything around until it's no longer in use,
|
579
|
-
* making unconditional ``unload'' safe.
|
580
|
-
*
|
581
|
-
* You still need to provide a (likely useless) canUnload method, though:
|
582
|
-
* it's part of the nsIModule interface contract, and the JS loader _will_
|
583
|
-
* call it.
|
584
|
-
*/
|
585
|
-
canUnload: function(compMgr) {
|
586
|
-
return true;
|
587
|
-
}
|
588
|
-
}
|
589
|
-
|
590
|
-
/***************************************************************************/
|