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
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,170 +0,0 @@
|
|
1
|
-
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2
|
-
/* vim:sw=4:sr:sta:et:sts: */
|
3
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
4
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
5
|
-
*
|
6
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
7
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
8
|
-
* the License. You may obtain a copy of the License at
|
9
|
-
* http://www.mozilla.org/MPL/
|
10
|
-
*
|
11
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
12
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
13
|
-
* for the specific language governing rights and limitations under the
|
14
|
-
* License.
|
15
|
-
*
|
16
|
-
* The Original Code is mozilla.org code.
|
17
|
-
*
|
18
|
-
* The Initial Developer of the Original Code is
|
19
|
-
* Netscape Communications Corporation.
|
20
|
-
* Portions created by the Initial Developer are Copyright (C) 1999
|
21
|
-
* the Initial Developer. All Rights Reserved.
|
22
|
-
*
|
23
|
-
* Contributor(s):
|
24
|
-
* Martijn Pieters <mj@digicool.com>
|
25
|
-
* Benjamin Smedberg <benjamin@smedbergs.us>
|
26
|
-
* Simon Bünzli <zeniko@gmail.com>
|
27
|
-
*
|
28
|
-
* Alternatively, the contents of this file may be used under the terms of
|
29
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
30
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
31
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
32
|
-
* of those above. If you wish to allow use of your version of this file only
|
33
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
34
|
-
* use your version of this file under the terms of the MPL, indicate your
|
35
|
-
* decision by deleting the provisions above and replace them with the notice
|
36
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
37
|
-
* the provisions above, a recipient may use your version of this file under
|
38
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
39
|
-
*
|
40
|
-
* ***** END LICENSE BLOCK ***** */
|
41
|
-
|
42
|
-
/*
|
43
|
-
* -jsconsole commandline handler; starts up the Error console.
|
44
|
-
*/
|
45
|
-
|
46
|
-
const nsISupports = Components.interfaces.nsISupports;
|
47
|
-
const nsICategoryManager = Components.interfaces.nsICategoryManager;
|
48
|
-
const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
|
49
|
-
const nsICommandLine = Components.interfaces.nsICommandLine;
|
50
|
-
const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler;
|
51
|
-
const nsIFactory = Components.interfaces.nsIFactory;
|
52
|
-
const nsIModule = Components.interfaces.nsIModule;
|
53
|
-
const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher;
|
54
|
-
const nsIWindowMediator = Components.interfaces.nsIWindowMediator;
|
55
|
-
|
56
|
-
/*
|
57
|
-
* Classes
|
58
|
-
*/
|
59
|
-
|
60
|
-
const jsConsoleHandler = {
|
61
|
-
/* nsISupports */
|
62
|
-
QueryInterface : function clh_QI(iid) {
|
63
|
-
if (iid.equals(nsICommandLineHandler) ||
|
64
|
-
iid.equals(nsIFactory) ||
|
65
|
-
iid.equals(nsISupports))
|
66
|
-
return this;
|
67
|
-
|
68
|
-
throw Components.results.NS_ERROR_NO_INTERFACE;
|
69
|
-
},
|
70
|
-
|
71
|
-
/* nsICommandLineHandler */
|
72
|
-
|
73
|
-
handle : function clh_handle(cmdLine) {
|
74
|
-
if (!cmdLine.handleFlag("jsconsole", false))
|
75
|
-
return;
|
76
|
-
|
77
|
-
var windowMediator = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
78
|
-
.getService(nsIWindowMediator);
|
79
|
-
var console = windowMediator.getMostRecentWindow("global:console");
|
80
|
-
if (!console) {
|
81
|
-
var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
82
|
-
.getService(nsIWindowWatcher);
|
83
|
-
wwatch.openWindow(null, "chrome://global/content/console.xul", "_blank",
|
84
|
-
"chrome,dialog=no,all", cmdLine);
|
85
|
-
} else {
|
86
|
-
// the Error console was already open
|
87
|
-
console.focus();
|
88
|
-
}
|
89
|
-
|
90
|
-
// note that since we don't prevent the default action, you'll get
|
91
|
-
// an additional application window, unless you specified another
|
92
|
-
// command line flag
|
93
|
-
},
|
94
|
-
|
95
|
-
helpInfo : " -jsconsole Open the Error console.\n",
|
96
|
-
|
97
|
-
/* nsIFactory */
|
98
|
-
|
99
|
-
createInstance : function clh_CI(outer, iid) {
|
100
|
-
if (outer != null)
|
101
|
-
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
102
|
-
|
103
|
-
return this.QueryInterface(iid);
|
104
|
-
},
|
105
|
-
|
106
|
-
lockFactory : function clh_lock(lock) {
|
107
|
-
/* no-op */
|
108
|
-
}
|
109
|
-
};
|
110
|
-
|
111
|
-
const clh_contractID = "@mozilla.org/toolkit/console-clh;1";
|
112
|
-
const clh_CID = Components.ID("{2cd0c310-e127-44d0-88fc-4435c9ab4d4b}");
|
113
|
-
const clh_category = "c-jsconsole";
|
114
|
-
|
115
|
-
const jsConsoleHandlerModule = {
|
116
|
-
/* nsISupports */
|
117
|
-
|
118
|
-
QueryInterface : function mod_QI(iid) {
|
119
|
-
if (iid.equals(nsIModule) ||
|
120
|
-
iid.equals(nsISupports))
|
121
|
-
return this;
|
122
|
-
|
123
|
-
throw Components.results.NS_ERROR_NO_INTERFACE;
|
124
|
-
},
|
125
|
-
|
126
|
-
/* nsIModule */
|
127
|
-
|
128
|
-
getClassObject : function mod_gch(compMgr, cid, iid) {
|
129
|
-
if (cid.equals(clh_CID))
|
130
|
-
return jsConsoleHandler.QueryInterface(iid);
|
131
|
-
|
132
|
-
throw Components.results.NS_ERROR_NOT_REGISTERED;
|
133
|
-
},
|
134
|
-
|
135
|
-
registerSelf : function mod_regself(compMgr, fileSpec, location, type) {
|
136
|
-
compMgr.QueryInterface(nsIComponentRegistrar);
|
137
|
-
|
138
|
-
compMgr.registerFactoryLocation(clh_CID,
|
139
|
-
"jsConsoleHandler",
|
140
|
-
clh_contractID,
|
141
|
-
fileSpec,
|
142
|
-
location,
|
143
|
-
type);
|
144
|
-
|
145
|
-
var catMan = Components.classes["@mozilla.org/categorymanager;1"]
|
146
|
-
.getService(nsICategoryManager);
|
147
|
-
catMan.addCategoryEntry("command-line-handler",
|
148
|
-
clh_category,
|
149
|
-
clh_contractID, true, true);
|
150
|
-
},
|
151
|
-
|
152
|
-
unregisterSelf : function mod_unreg(compMgr, location, type) {
|
153
|
-
compMgr.QueryInterface(nsIComponentRegistrar);
|
154
|
-
|
155
|
-
compMgr.unregisterFactoryLocation(clh_CID, location);
|
156
|
-
|
157
|
-
var catMan = Components.classes["@mozilla.org/categorymanager;1"]
|
158
|
-
.getService(nsICategoryManager);
|
159
|
-
catMan.deleteCategoryEntry("command-line-handler", clh_category);
|
160
|
-
},
|
161
|
-
|
162
|
-
canUnload : function (compMgr) {
|
163
|
-
return true;
|
164
|
-
}
|
165
|
-
};
|
166
|
-
|
167
|
-
/* module initialisation */
|
168
|
-
function NSGetModule(comMgr, fileSpec) {
|
169
|
-
return jsConsoleHandlerModule;
|
170
|
-
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,143 +0,0 @@
|
|
1
|
-
/* -*- Mode: C++; tab-width: 4; 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) 2001
|
20
|
-
* the Initial Developer. All Rights Reserved.
|
21
|
-
*
|
22
|
-
* Contributor(s):
|
23
|
-
* Conrad Carlen <ccarlen@netscape.com>
|
24
|
-
*
|
25
|
-
* Alternatively, the contents of this file may be used under the terms of
|
26
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
27
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
28
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
29
|
-
* of those above. If you wish to allow use of your version of this file only
|
30
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
31
|
-
* use your version of this file under the terms of the MPL, indicate your
|
32
|
-
* decision by deleting the provisions above and replace them with the notice
|
33
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
34
|
-
* the provisions above, a recipient may use your version of this file under
|
35
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
36
|
-
*
|
37
|
-
* ***** END LICENSE BLOCK ***** */
|
38
|
-
|
39
|
-
|
40
|
-
/* This file implements the nsCloseAllWindows component which implements
|
41
|
-
* the nsICloseAllWindows interface. Use this component when all
|
42
|
-
* windows need to be closed and confirmation to save changes is required.
|
43
|
-
*/
|
44
|
-
|
45
|
-
|
46
|
-
/* ctor
|
47
|
-
*/
|
48
|
-
function nsCloseAllWindows() {
|
49
|
-
}
|
50
|
-
|
51
|
-
nsCloseAllWindows.prototype = {
|
52
|
-
|
53
|
-
// This "class" supports nsICloseAllWindows, and nsISupports.
|
54
|
-
QueryInterface: function (iid) {
|
55
|
-
if (!iid.equals(Components.interfaces.nsICloseAllWindows) &&
|
56
|
-
!iid.equals(Components.interfaces.nsISupports)) {
|
57
|
-
throw Components.results.NS_ERROR_NO_INTERFACE;
|
58
|
-
}
|
59
|
-
return this;
|
60
|
-
},
|
61
|
-
|
62
|
-
// ---------- nsICloseAllWindows methods ----------
|
63
|
-
|
64
|
-
// closeAll: Close all open windows
|
65
|
-
closeAll: function(aAskToSave) {
|
66
|
-
|
67
|
-
var windowMediator = Components.classes['@mozilla.org/appshell/window-mediator;1'].
|
68
|
-
getService(Components.interfaces.nsIWindowMediator);
|
69
|
-
var enumerator = windowMediator.getEnumerator(null);
|
70
|
-
|
71
|
-
while (enumerator.hasMoreElements()) {
|
72
|
-
var domWindow = enumerator.getNext();
|
73
|
-
if (aAskToSave && ("tryToClose" in domWindow)) {
|
74
|
-
if (!domWindow.tryToClose())
|
75
|
-
return false;
|
76
|
-
}
|
77
|
-
domWindow.close();
|
78
|
-
};
|
79
|
-
|
80
|
-
return true;
|
81
|
-
}
|
82
|
-
}
|
83
|
-
|
84
|
-
// This Component's module implementation. All the code below is used to get this
|
85
|
-
// component registered and accessible via XPCOM.
|
86
|
-
var module = {
|
87
|
-
firstTime: true,
|
88
|
-
|
89
|
-
// registerSelf: Register this component.
|
90
|
-
registerSelf: function (compMgr, fileSpec, location, type) {
|
91
|
-
if (this.firstTime) {
|
92
|
-
this.firstTime = false;
|
93
|
-
throw Components.results.NS_ERROR_FACTORY_REGISTER_AGAIN;
|
94
|
-
}
|
95
|
-
compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
|
96
|
-
compMgr.registerFactoryLocation( this.cid,
|
97
|
-
"Close All Windows",
|
98
|
-
this.contractId,
|
99
|
-
fileSpec,
|
100
|
-
location,
|
101
|
-
type );
|
102
|
-
},
|
103
|
-
|
104
|
-
// getClassObject: Return this component's factory object.
|
105
|
-
getClassObject: function (compMgr, cid, iid) {
|
106
|
-
if (!cid.equals(this.cid)) {
|
107
|
-
throw Components.results.NS_ERROR_NO_INTERFACE;
|
108
|
-
}
|
109
|
-
|
110
|
-
if (!iid.equals(Components.interfaces.nsIFactory)) {
|
111
|
-
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
112
|
-
}
|
113
|
-
|
114
|
-
return this.factory;
|
115
|
-
},
|
116
|
-
|
117
|
-
/* CID for this class */
|
118
|
-
cid: Components.ID("{2f977d48-5485-11d4-87e2-0010a4e75ef2}"),
|
119
|
-
|
120
|
-
/* Contract ID for this class */
|
121
|
-
contractId: "@mozilla.org/appshell/closeallwindows;1",
|
122
|
-
|
123
|
-
/* factory object */
|
124
|
-
factory: {
|
125
|
-
// createInstance: Return a new nsCloseAllWindows object.
|
126
|
-
createInstance: function (outer, iid) {
|
127
|
-
if (outer != null)
|
128
|
-
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
129
|
-
|
130
|
-
return (new nsCloseAllWindows()).QueryInterface(iid);
|
131
|
-
}
|
132
|
-
},
|
133
|
-
|
134
|
-
// canUnload: n/a (returns true)
|
135
|
-
canUnload: function(compMgr) {
|
136
|
-
return true;
|
137
|
-
}
|
138
|
-
};
|
139
|
-
|
140
|
-
// NSGetModule: Return the nsIModule object.
|
141
|
-
function NSGetModule(compMgr, fileSpec) {
|
142
|
-
return module;
|
143
|
-
}
|