http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/js/vf2js/falconjx/bin/mxmlc ---------------------------------------------------------------------- diff --git a/vf2js/js/vf2js/falconjx/bin/mxmlc b/vf2js/js/vf2js/falconjx/bin/mxmlc deleted file mode 100755 index c868028..0000000 --- a/vf2js/js/vf2js/falconjx/bin/mxmlc +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh - -################################################################################ -## -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. -## -################################################################################ - - -# -# mxmlc shell script to launch FalconJX mxmlc.jar on OSX, Unix, or Cygwin. -# In Windows Command Prompt, use mxmlc.bat instead. -# - -SCRIPT_HOME=$(dirname "$0") -FLEX_HOME=${SCRIPT_HOME}/../../../.. -FALCON_HOME=${FLEX_HOME}/js/vf2js - -echo Using Flex SDK: $FLEX_HOME -echo Using Falcon compiler: $FALCON_HOME - -case `uname` in - CYGWIN*) - OS="Windows" - ;; - *) - OS=Unix -esac - -D32='' - -if [ $OS = "Windows" ]; then - - FALCON_HOME=`cygpath -m $FALCON_HOME` - FLEX_HOME=`cygpath -m $FLEX_HOME` - -elif [ $OS = "Unix" ]; then - - check64="`java -version 2>&1 | grep -i 64-Bit`" - isOSX="`uname | grep -i Darwin`" - javaVersion="`java -version 2>&1 | awk -F '[ ".]+' 'NR==1 {print $3 "." $4}'`" - - if [ "$isOSX" != "" -a "$HOSTTYPE" = "x86_64" -a "$check64" != "" -a "$javaVersion" = "1.6" ]; then - D32='-d32' - fi -fi - -VMARGS="-Xmx384m -Dsun.io.useCanonCaches=false " - -java $VMARGS $D32 -Dflexcompiler="$FALCON_HOME" -jar "$FLEX_HOME/js/vf2js/falconjx/lib/mxmlc.jar" -load-config="$FLEX_HOME/frameworks/flex-config.xml" -js-output-type=VF2JS "$@"
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/js/vf2js/falconjx/bin/mxmlc.bat ---------------------------------------------------------------------- diff --git a/vf2js/js/vf2js/falconjx/bin/mxmlc.bat b/vf2js/js/vf2js/falconjx/bin/mxmlc.bat deleted file mode 100644 index 950bdfa..0000000 --- a/vf2js/js/vf2js/falconjx/bin/mxmlc.bat +++ /dev/null @@ -1,31 +0,0 @@ -@echo off - -rem -rem Licensed to the Apache Software Foundation (ASF) under one or more -rem contributor license agreements. See the NOTICE file distributed with -rem this work for additional information regarding copyright ownership. -rem The ASF licenses this file to You under the Apache License, Version 2.0 -rem (the "License"); you may not use this file except in compliance with -rem the License. You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, -rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -rem See the License for the specific language governing permissions and -rem limitations under the License. -rem - -rem -rem mxmlc.bat script to launch FalconJX mxmlc.jar in Windows Command Prompt. -rem On OSX, Unix, or Cygwin, use the mxmlc shell script instead. -rem - -set FLEX_HOME=%~dp0..\..\..\.. -set FALCON_HOME=%FLEX_HOME%\js\vf2js - -echo Using Flex SDK: %FLEX_HOME% -echo Using Falcon compiler: %FALCON_HOME% - -@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m -Dflexcompiler="%FALCON_HOME%" -jar "$FLEX_HOME\js\vf2js\falconjx\lib\mxmlc.jar" -load-config="$FLEX_HOME\frameworks\flex-config.xml" -js-output-type=VF2JS -sdk-js-lib="$FLEX_HOME\frameworks\js\src" %* \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/FlexSDKToJS/FlexSDKToJS.sh ---------------------------------------------------------------------- diff --git a/vf2js/utils/FlexSDKToJS/FlexSDKToJS.sh b/vf2js/utils/FlexSDKToJS/FlexSDKToJS.sh deleted file mode 100755 index 4735f00..0000000 --- a/vf2js/utils/FlexSDKToJS/FlexSDKToJS.sh +++ /dev/null @@ -1,209 +0,0 @@ -#!/bin/sh - -ROOT="/Users/erik/Documents/ApacheFlex/git/flex-asjs/vf2js/utils/FlexSDKToJS" -OUTPUT="/Users/erik/Documents/ApacheFlex/git/flex-asjs/vf2js/frameworks/js/vf2js" - -ARGS="" -ARGS="$ARGS +env.PLAYERGLOBAL_HOME="/Users/erik/Documents/apacheFlex/dependencies/PlayerGlobal/player" " -ARGS="$ARGS +playerglobal.version=15.0 " - -ARGS="$ARGS -load-config+="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/flex-config.xml" " -ARGS="$ARGS -load-config+="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/framework/framework-config.xml" " -ARGS="$ARGS -load-config+="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/spark/compile-config.xml" " - -ARGS="$ARGS -external-library-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/libs/air/airspark.swc" " -ARGS="$ARGS -external-library-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/libs/player/15.0/playerglobal.swc" " -ARGS="$ARGS -external-library-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/libs/osmf.swc" " -ARGS="$ARGS -external-library-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/libs/textlayout.swc" " - -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/advancedgrids/src" " -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/apache/src" " -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/charts/src" " -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/core/src" " -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/experimental/src" " -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/flash-integration/src" " -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/framework/src" " -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/mx/src" " -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/rpc/src" " -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/spark/src" " -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/spark_dmv/src" " -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/sparkskins/src" " -ARGS="$ARGS -source-path="/Users/erik/Documents/ApacheFlex/git/flex-sdk/frameworks/projects/wireframe/src" " - -ARGS="$ARGS -ignore-problems=org.apache.flex.compiler.problems.DuplicateSkinStateProblem " -ARGS="$ARGS -ignore-problems=org.apache.flex.compiler.problems.DuplicateQNameInSourcePathProblem " -ARGS="$ARGS -ignore-problems=org.apache.flex.compiler.problems.NoDefinitionForSWCDependencyProblem " - -ARGS="$ARGS -js-output-type=VF2JS " -ARGS="$ARGS -keep-asdoc=false " - -ARGS="$ARGS -closure-lib="/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library" " - -ARGS="$ARGS -output=${OUTPUT} " - -java -jar "/Users/erik/Documents/ApacheFlex/git/flex-falcon/compiler.jx/lib/compc.jar" ${ARGS} - - - -./TextLayoutToJS.sh - - - -cd ${OUTPUT} -#pwd - -# Delete xClasses.js -rm ./AdvancedDataGridClasses.js -rm ./ApacheClasses.js -rm ./ChartsClasses.js -rm ./CoreClasses.js -rm ./ExperimentalClasses.js -rm ./FrameworkClasses.js -rm ./MxClasses.js -rm ./RPCClasses.js -rm ./SparkClasses.js -rm ./SparkDmvClasses.js -rm ./SparkSkinsClasses.js -rm ./WireframeClasses.js - -# Create class 'QName' -cat <<EOF > ./QName.js -/** - * @fileoverview 'QName' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('QName'); - - - -/** - * @constructor - * @struct - */ -QName = function() {}; -EOF - -# Create class 'mx.core.mx_internal' -cat <<EOF > ./mx/core/mx_internal.js -/** - * @fileoverview 'mx.core.mx_internal' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('mx.core.mx_internal'); - - - -/** - * @constructor - * @struct - */ -mx.core.mx_internal = function() {}; -EOF - -# copy org.apache.flex.utils.Language from FlexJS SDK -mkdir ./org/apache/flex/utils -cp /Users/erik/Documents/ApacheFlex/git/flex-asjs/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js ./org/apache/flex/utils/Language.js - -# copy flash.utils.IDataInput and refactor to flash.utils.IDataInput2 -cp ./flash/utils/IDataInput.js ./flash/utils/IDataInput2.js -sed -i '' -e "s/IDataInput/IDataInput2/g" ./flash/utils/IDataInput2.js - -# copy flash.utils.IDataOutput and refactor to flash.utils.IDataOutput2 -cp ./flash/utils/IDataOutput.js ./flash/utils/IDataOutput2.js -sed -i '' -e "s/IDataOutput/IDataOutput2/g" ./flash/utils/IDataOutput2.js - -# Remove 'wrong' chars from mx/utils/StringUtil.js -sed -i '' -e 's/â¨//g' ./mx/utils/StringUtil.js -sed -i '' -e 's/â©//g' ./mx/utils/StringUtil.js - -# Remove 'wrong' char from spark/components/Label.js -sed -i '' -e 's/â©//g' ./spark/components/Label.js - -# Remove 'wrong' public namespace reference from mx/styles/CSSStyleDeclaration.js -sed -i '' -e 's/public\.this\.setStyle/this\.setStyle/g' ./mx/styles/CSSStyleDeclaration.js - -# Add missing namespace to flash/geom/Vector3D.js -sed -i '' -e 's/= Vector3D/= flash.geom.Vector3D/g' ./flash/geom/Vector3D.js - -# Remove namespace from Vector type in spark/components/DataGroup.js -sed -i '' -e 's/Vector\.<mx\.core\.IVisualElement>/Vector/g' ./spark/components/DataGroup.js - -# Remove "difficult" interface reference from mx/core/UIComponent.js -sed -i '' -e 's/, mx.validators.IValidatorListener, /, /g' ./mx/core/UIComponent.js - -# Remove goog.require from spark.layouts.supportClasses.LinearLayoutVector -tr '\n' '#' < ./spark/layouts/supportClasses/LinearLayoutVector.js > ./spark/layouts/supportClasses/LinearLayoutVector.js_temp -sed -i '' -e "s/#goog.require('spark.layouts.supportClasses.Block');//g" ./spark/layouts/supportClasses/LinearLayoutVector.js_temp -tr '#' '\n' < ./spark/layouts/supportClasses/LinearLayoutVector.js_temp > ./spark/layouts/supportClasses/LinearLayoutVector.js -rm ./spark/layouts/supportClasses/LinearLayoutVector.js_temp - -# Add 'global' goog.require to mx.managers.SystemManager -tr '\n' '#' < ./mx/managers/SystemManager.js > ./mx/managers/SystemManager.js_temp - -sed -i '' -e "s/####\/\*\*/##goog.require('org.apache.flex.utils.Language');&/g" ./mx/managers/SystemManager.js_temp - -sed -i '' -e "s/####\/\*\*/##goog.require('mx.core.EmbeddedFontRegistry');&/g" ./mx/managers/SystemManager.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.styles.StyleManagerImpl');&/g" ./mx/managers/SystemManager.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.BrowserManagerImpl');&/g" ./mx/managers/SystemManager.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.CursorManagerImpl');&/g" ./mx/managers/SystemManager.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.HistoryManagerImpl');&/g" ./mx/managers/SystemManager.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.LayoutManager');&/g" ./mx/managers/SystemManager.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.PopUpManagerImpl');&/g" ./mx/managers/SystemManager.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.ToolTipManagerImpl');&/g" ./mx/managers/SystemManager.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.DragManagerImpl');&/g" ./mx/managers/SystemManager.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.core.TextFieldFactory');&/g" ./mx/managers/SystemManager.js_temp - -sed -i '' -e "s/####\/\*\*/##goog.require('Class');&/g" ./mx/managers/SystemManager.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('INT');&/g" ./mx/managers/SystemManager.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('QName');&/g" ./mx/managers/SystemManager.js_temp - -sed -i '' -e "s/####\/\*\*/##goog.require('mx.preloaders.DownloadProgressBar');&/g" ./mx/managers/SystemManager.js_temp - -sed -i '' -e "s/####\/\*\*/##goog.require('mx.managers.systemClasses.ChildManager');&/g" ./mx/managers/SystemManager.js_temp - -sed -i '' -e "s/mx\.managers\.SystemManager = function() {# /mx\.managers\.SystemManager = function() {# window['apache-flex_system-manager'] = this;#/g" ./mx/managers/SystemManager.js_temp - -tr '#' '\n' < ./mx/managers/SystemManager.js_temp > ./mx/managers/SystemManager.js -rm ./mx/managers/SystemManager.js_temp - -# Add 'missing' (?) goog.require to mx.skins.halo.HaloFocusRect -tr '\n' '#' < ./mx/skins/halo/HaloFocusRect.js > ./mx/skins/halo/HaloFocusRect.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.skins.ProgrammaticSkin');&/g" ./mx/skins/halo/HaloFocusRect.js_temp -tr '#' '\n' < ./mx/skins/halo/HaloFocusRect.js_temp > ./mx/skins/halo/HaloFocusRect.js -rm ./mx/skins/halo/HaloFocusRect.js_temp - -# Add 'missing' (?) goog.require to mx.preloaders.DownloadProgressBar -tr '\n' '#' < ./mx/preloaders/DownloadProgressBar.js > ./mx/preloaders/DownloadProgressBar.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.geom.RoundedRectangle');&/g" ./mx/preloaders/DownloadProgressBar.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.preloaders.IPreloaderDisplay');&/g" ./mx/preloaders/DownloadProgressBar.js_temp -tr '#' '\n' < ./mx/preloaders/DownloadProgressBar.js_temp > ./mx/preloaders/DownloadProgressBar.js -rm ./mx/preloaders/DownloadProgressBar.js_temp - -# Add 'missing' (?) goog.require to mx.skins.halo.ToolTipBorder -tr '\n' '#' < ./mx/skins/halo/ToolTipBorder.js > ./mx/skins/halo/ToolTipBorder.js_temp -sed -i '' -e "s/####\/\*\*/##goog.require('mx.skins.RectangularBorder');&/g" ./mx/skins/halo/ToolTipBorder.js_temp -tr '#' '\n' < ./mx/skins/halo/ToolTipBorder.js_temp > ./mx/skins/halo/ToolTipBorder.js -rm ./mx/skins/halo/ToolTipBorder.js_temp - -# Move property to below static method in mx.binding.Binding -tr '\n' '#' < ./mx/binding/Binding.js > ./mx/binding/Binding.js_temp -sed -i '' -e "s/###\/\*\*# \* @type {Object}# \*\/#mx.binding.Binding.allowedErrors = mx.binding.Binding.generateAllowedErrors();//g" ./mx/binding/Binding.js_temp -sed -i '' -e "s/ o\[2005\] = 1;# return o;#};/ o\[2005\] = 1;# return o;#};###\/\*\*# \* @type {Object}# \*\/#mx.binding.Binding.allowedErrors = mx.binding.Binding.generateAllowedErrors();/g" ./mx/binding/Binding.js_temp -tr '#' '\n' < ./mx/binding/Binding.js_temp > ./mx/binding/Binding.js -rm ./mx/binding/Binding.js_temp - - - -cd ${ROOT} -#pwd - -# create 'deps.js' for SDK + FP JS classes -./JSFlexSDKDeps.sh http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/FlexSDKToJS/JSFlexSDKDeps.sh ---------------------------------------------------------------------- diff --git a/vf2js/utils/FlexSDKToJS/JSFlexSDKDeps.sh b/vf2js/utils/FlexSDKToJS/JSFlexSDKDeps.sh deleted file mode 100755 index 325108f..0000000 --- a/vf2js/utils/FlexSDKToJS/JSFlexSDKDeps.sh +++ /dev/null @@ -1 +0,0 @@ -/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library/closure/bin/build/depswriter.py --root_with_prefix="/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library/closure/goog ../../../../../bin/js-debug/library/closure/goog" --root_with_prefix="../../frameworks/js/vf2js ../../../../../bin/js-debug" > ../../frameworks/js/sdk-deps.js http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/FlexSDKToJS/TextLayoutToJS.sh ---------------------------------------------------------------------- diff --git a/vf2js/utils/FlexSDKToJS/TextLayoutToJS.sh b/vf2js/utils/FlexSDKToJS/TextLayoutToJS.sh deleted file mode 100755 index da909e1..0000000 --- a/vf2js/utils/FlexSDKToJS/TextLayoutToJS.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -ARGS="" -ARGS="$ARGS +env.PLAYERGLOBAL_HOME="/Users/erik/Documents/apacheFlex/dependencies/PlayerGlobal/player" " -ARGS="$ARGS +playerglobal.version=15.0 " -ARGS="$ARGS +source.dir="/Users/erik/Documents/ApacheFlex/git/flex-tlf/TextLayout" " - -ARGS="$ARGS -define=CONFIG::debug,false " -ARGS="$ARGS -define=CONFIG::release,true " - -ARGS="$ARGS -load-config+="/Users/erik/Documents/ApacheFlex/git/flex-tlf/compile-config.xml" " - -ARGS="$ARGS -ignore-problems=org.apache.flex.compiler.problems.DuplicateSkinStateProblem " -ARGS="$ARGS -ignore-problems=org.apache.flex.compiler.problems.DuplicateQNameInSourcePathProblem " -ARGS="$ARGS -ignore-problems=org.apache.flex.compiler.problems.NoDefinitionForSWCDependencyProblem " - -ARGS="$ARGS -js-output-type=VF2JS " -ARGS="$ARGS -keep-asdoc=false " - -ARGS="$ARGS -closure-lib="/Users/erik/Documents/ApacheFlex/dependencies/GoogleClosure/library" " - -ARGS="$ARGS -output="/Users/erik/Documents/ApacheFlex/git/flex-asjs/vf2js/frameworks/js/vf2js" " - -java -jar "/Users/erik/Documents/ApacheFlex/git/flex-falcon/compiler.jx/lib/compc.jar" ${ARGS} http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS-app.xml ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS-app.xml b/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS-app.xml deleted file mode 100644 index efd4a3e..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS-app.xml +++ /dev/null @@ -1,232 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="no"?> -<application xmlns="http://ns.adobe.com/air/application/15.0"> - -<!-- Adobe AIR Application Descriptor File Template. - - Specifies parameters for identifying, installing, and launching AIR applications. - - xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/3.1 - The last segment of the namespace specifies the version - of the AIR runtime required for this application to run. - - minimumPatchLevel - The minimum patch level of the AIR runtime required to run - the application. Optional. ---> - - <!-- A universally unique application identifier. Must be unique across all AIR applications. - Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. --> - <id>PlayerGlobalToJS</id> - - <!-- Used as the filename for the application. Required. --> - <filename>PlayerGlobalToJS</filename> - - <!-- The name that is displayed in the AIR application installer. - May have multiple values for each language. See samples or xsd schema file. Optional. --> - <name>PlayerGlobalToJS</name> - - <!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade. - Values can also be 1-part or 2-part. It is not necessary to have a 3-part value. - An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . --> - <versionNumber>0.0.1</versionNumber> - - <!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. --> - <!-- <versionLabel></versionLabel> --> - - <!-- Description, displayed in the AIR application installer. - May have multiple values for each language. See samples or xsd schema file. Optional. --> - <!-- <description></description> --> - - <!-- Copyright information. Optional --> - <!-- <copyright></copyright> --> - - <!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 --> - <!-- <publisherID></publisherID> --> - - <!-- Settings for the application's initial window. Required. --> - <initialWindow> - <!-- The main SWF or HTML file of the application. Required. --> - <!-- Note: In Flash Builder, the SWF reference is set automatically. --> - <content>[This value will be overwritten by Flash Builder in the output app.xml]</content> - - <!-- The title of the main window. Optional. --> - <!-- <title></title> --> - - <!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. --> - <!-- <systemChrome></systemChrome> --> - - <!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. --> - <!-- <transparent></transparent> --> - - <!-- Whether the window is initially visible. Optional. Default false. --> - <!-- <visible></visible> --> - - <!-- Whether the user can minimize the window. Optional. Default true. --> - <!-- <minimizable></minimizable> --> - - <!-- Whether the user can maximize the window. Optional. Default true. --> - <!-- <maximizable></maximizable> --> - - <!-- Whether the user can resize the window. Optional. Default true. --> - <!-- <resizable></resizable> --> - - <!-- The window's initial width in pixels. Optional. --> - <!-- <width></width> --> - - <!-- The window's initial height in pixels. Optional. --> - <!-- <height></height> --> - - <!-- The window's initial x position. Optional. --> - <!-- <x></x> --> - - <!-- The window's initial y position. Optional. --> - <!-- <y></y> --> - - <!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. --> - <!-- <minSize></minSize> --> - - <!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. --> - <!-- <maxSize></maxSize> --> - - <!-- The initial aspect ratio of the app when launched (either "portrait" or "landscape"). Optional. Mobile only. Default is the natural orientation of the device --> - - <!-- <aspectRatio></aspectRatio> --> - - <!-- Whether the app will begin auto-orienting on launch. Optional. Mobile only. Default false --> - - <!-- <autoOrients></autoOrients> --> - - <!-- Whether the app launches in full screen. Optional. Mobile only. Default false --> - - <!-- <fullScreen></fullScreen> --> - - <!-- The render mode for the app (either auto, cpu, gpu, or direct). Optional. Default auto --> - - <!-- <renderMode></renderMode> --> - - <!-- Whether or not to pan when a soft keyboard is raised or lowered (either "pan" or "none"). Optional. Defaults "pan." --> - <!-- <softKeyboardBehavior></softKeyboardBehavior> --> - <autoOrients>false</autoOrients> - <fullScreen>false</fullScreen> - <visible>false</visible> - </initialWindow> - - <!-- We recommend omitting the supportedProfiles element, --> - <!-- which in turn permits your application to be deployed to all --> - <!-- devices supported by AIR. If you wish to restrict deployment --> - <!-- (i.e., to only mobile devices) then add this element and list --> - <!-- only the profiles which your application does support. --> - <!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> --> - - <!-- The subpath of the standard default installation location to use. Optional. --> - <!-- <installFolder></installFolder> --> - - <!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. --> - <!-- <programMenuFolder></programMenuFolder> --> - - <!-- The icon the system uses for the application. For at least one resolution, - specify the path to a PNG file included in the AIR package. Optional. --> - <!-- <icon> - <image16x16></image16x16> - <image32x32></image32x32> - <image36x36></image36x36> - <image48x48></image48x48> - <image57x57></image57x57> - <image72x72></image72x72> - <image114x114></image114x114> - <image128x128></image128x128> - </icon> --> - - <!-- Whether the application handles the update when a user double-clicks an update version - of the AIR file (true), or the default AIR application installer handles the update (false). - Optional. Default false. --> - <!-- <customUpdateUI></customUpdateUI> --> - - <!-- Whether the application can be launched when the user clicks a link in a web browser. - Optional. Default false. --> - <!-- <allowBrowserInvocation></allowBrowserInvocation> --> - - <!-- Listing of file types for which the application can register. Optional. --> - <!-- <fileTypes> --> - - <!-- Defines one file type. Optional. --> - <!-- <fileType> --> - - <!-- The name that the system displays for the registered file type. Required. --> - <!-- <name></name> --> - - <!-- The extension to register. Required. --> - <!-- <extension></extension> --> - - <!-- The description of the file type. Optional. --> - <!-- <description></description> --> - - <!-- The MIME content type. --> - <!-- <contentType></contentType> --> - - <!-- The icon to display for the file type. Optional. --> - <!-- <icon> - <image16x16></image16x16> - <image32x32></image32x32> - <image48x48></image48x48> - <image128x128></image128x128> - </icon> --> - - <!-- </fileType> --> - <!-- </fileTypes> --> - - <!-- iOS specific capabilities --> - <!-- <iPhone> --> - <!-- A list of plist key/value pairs to be added to the application Info.plist --> - <!-- <InfoAdditions> - <![CDATA[ - <key>UIDeviceFamily</key> - <array> - <string>1</string> - <string>2</string> - </array> - <key>UIStatusBarStyle</key> - <string>UIStatusBarStyleBlackOpaque</string> - <key>UIRequiresPersistentWiFi</key> - <string>YES</string> - ]]> - </InfoAdditions> --> - <!-- A list of plist key/value pairs to be added to the application Entitlements.plist --> - <!-- <Entitlements> - <![CDATA[ - <key>keychain-access-groups</key> - <array> - <string></string> - <string></string> - </array> - ]]> - </Entitlements> --> - <!-- Display Resolution for the app (either "standard" or "high"). Optional. Default "standard" --> - <!-- <requestedDisplayResolution></requestedDisplayResolution> --> - <!-- </iPhone> --> - - <!-- Specify Android specific tags that get passed to AndroidManifest.xml file. --> - <!--<android> --> - <!-- <manifestAdditions> - <![CDATA[ - <manifest android:installLocation="auto"> - <uses-permission android:name="android.permission.INTERNET"/> - <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> - <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> - <uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/> - <application android:enabled="true"> - <activity android:excludeFromRecents="false"> - <intent-filter> - <action android:name="android.intent.action.MAIN"/> - <category android:name="android.intent.category.LAUNCHER"/> - </intent-filter> - </activity> - </application> - </manifest> - ]]> - </manifestAdditions> --> - <!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after --> - <!-- <colorDepth></colorDepth> --> - <!-- </android> --> - <!-- End of the schema for adding the android specific tags in AndroidManifest.xml file --> - -</application> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS.mxml ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS.mxml b/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS.mxml deleted file mode 100755 index fdd52d6..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/PlayerGlobalToJS.mxml +++ /dev/null @@ -1,665 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" - xmlns:s="library://ns.adobe.com/flex/spark" - xmlns:mx="library://ns.adobe.com/flex/mx" - creationComplete="creationCompleteHandler(event)"> - - <fx:Script><![CDATA[ - - import flash.utils.Dictionary; - import flash.utils.getQualifiedClassName; - - import mx.events.FlexEvent; - import mx.utils.StringUtil; - - import nl.ixms.Utils; - import nl.ixms.enums.MemberType; - import nl.ixms.vo.Clazz; - import nl.ixms.vo.JSDoc; - - import org.as3commons.reflect.Accessor; - import org.as3commons.reflect.Constant; - import org.as3commons.reflect.Method; - import org.as3commons.reflect.Parameter; - import org.as3commons.reflect.Type; - import org.as3commons.reflect.Variable; - - include './shadowInterfaces.as'; - - - - //---------------------------------------------------------------------- - // - // Constants - // - //---------------------------------------------------------------------- - - private const ACTION_UNIMPLEMENTED:String = - 'console.log(\'VF2JS Error: call to unimplemented class member ({0})\');'; - - - - //---------------------------------------------------------------------- - // - // Properties - // - //---------------------------------------------------------------------- - - //-------------------------------------- - // catalogXML_ - //-------------------------------------- - - private var catalogXML_:XMLList; - - //-------------------------------------- - // classes_ - //-------------------------------------- - - private var classes_:Dictionary; - - //-------------------------------------- - // functions_ - //-------------------------------------- - - private var functions_:Dictionary; - - //-------------------------------------- - // outputRoot_ - //-------------------------------------- - - private var outputRoot_:File; - - - - //---------------------------------------------------------------------- - // - // Methods - // - //---------------------------------------------------------------------- - - //-------------------------------------- - // createOutputDirectory - //-------------------------------------- - - private function createOutputDirectory():void { - outputRoot_ = - new File(File.applicationDirectory.nativePath).resolvePath( - '../out'); - - if (outputRoot_.exists) { - outputRoot_.deleteDirectory(true); - } - - outputRoot_.createDirectory(); - - File.applicationDirectory.resolvePath('assets/vf2js').copyTo( - outputRoot_.resolvePath('vf2js')); - } - - //-------------------------------------- - // creationCompleteHandler - //-------------------------------------- - - private function creationCompleteHandler(event:FlexEvent):void { - var clazz:Clazz, - clsAccessor:Accessor, - clsConstant:Constant, - clsMemberName:MemberType, - clsMemberTypeNames:Array, - clsMemberType:String, - clsMemberValue:Object, - clsField:Object, - clsMembers:Dictionary, - clsType:Type, - clsVariable:Variable, - funczion:Object, - i:int, - j:int, - key:String, - m:int, - n:int, - p:int, - parameter:Parameter, - parameters:Array, - parameterNames:Array, - q:int; - - clsMemberTypeNames = [ - MemberType.STATIC_CONSTANT, - MemberType.STATIC_VARIABLE, - MemberType.STATIC_PROPERTY, - MemberType.STATIC_METHOD, - MemberType.CONSTANT, - MemberType.VARIABLE, - MemberType.PROPERTY, - MemberType.METHOD ]; - - createOutputDirectory(); - - readCatalogXML(); - - parseClasses(); - - // namespace 'classes' - functions_['mx.core.mx_internal'] = 'mx.core.mx_internal'; - functions_['mx.utils.object_proxy'] = 'mx.utils.object_proxy'; - functions_['flashx.textLayout.tlf_internal'] = 'flashx.textLayout.tlf_internal'; - - for (key in functions_) { - clazz = new Clazz(null); - - clazz.qName = key; - - if (key.split('.').length > 1) { - clazz.name = clazz.qName.substring( - clazz.qName.lastIndexOf('.') + 1, clazz.qName.length); - } else { - continue; - } - - clazz.startOutput(); - - writeClassFile(clazz); - } - - for (key in classes_) { - clazz = Clazz(classes_[key]); - - clsType = clazz.type; - if (clsType && - clsType.fullName && - clsType.fullName !== 'Object') { - - clsMembers = parseClassMembers(clazz); - - if (clazz.qName === 'int') { - clazz.qName = 'INT'; - } - clazz.startOutput(); - - // Member stubs - for (var count:int = 0, total:int = clsMemberTypeNames.length; count < total; count++) { - clsMemberName = clsMemberTypeNames[count]; - if (clsMembers[clsMemberName].length > 0) { - - clazz.addMajorBlockComment( - clsMemberName.toString().toUpperCase().replace('_', ' ')); - - for (j = 0, m = clsMembers[clsMemberName].length; j < m; j++) { - if (clsMembers[clsMemberName][j] is Constant || - clsMembers[clsMemberName][j] is Variable) { - clsField = clsMembers[clsMemberName][j]; - clsMemberType = - Utils.parseType(flash.utils.getQualifiedClassName( - clsField.type.clazz)); - - clazz.output += JSDoc.emitJSDoc( - JSDoc.FIELD, - clsField.name, - clsMemberType); - - clazz.output += - clazz.qName + - '.' + - ((clsField.isStatic) ? '' : 'prototype.') + - clsField.name; - - clsMemberValue = clsField.getValue(); - if (clsMemberValue) { - clazz.output += ' = '; - - if (clsMemberType === 'Array') { - clazz.output += '['; - for (var k:int = 0, l:int = clsMemberValue.length; k < l; k++) { - if (k > 0) { - clazz.output += ', '; - } - clazz.output += '\'' + clsMemberValue[k] + '\''; - } - clazz.output += ']'; - } else { - clazz.output += - ((clsMemberType === 'string') ? '\'' : '') + - clsMemberValue + - ((clsMemberType === 'string') ? '\'' : ''); - } - } - - clazz.output += Clazz.MEMBER_SEPARATOR; - } else if (clsMembers[clsMemberName][j] is Accessor) { - clsField = clsMembers[clsMemberName][j]; - clsMemberType = - Utils.parseType(flash.utils.getQualifiedClassName( - clsField.type.clazz)); - - clazz.output += JSDoc.emitJSDoc( - JSDoc.METHOD, - clsField.name, - '', clsMemberType); - - clazz.output += - clazz.qName + - '.' + - ((clsField.isStatic) ? '' : 'prototype.') + - 'get_' + clsField.name + ' = ' + - 'function() {\n' + - ' ' + getImplementation( - clazz, clsField, 'get_', true) + '\n' + - '}'; - - if (Accessor(clsField).writeable) { - clazz.output += Clazz.MEMBER_SEPARATOR; - - parameter = new Parameter(null, 0); - - clazz.output += JSDoc.emitJSDoc( - JSDoc.FIELD, - clsField.name); - - clazz.output += - clazz.qName + - '.' + - ((clsField.isStatic) ? '' : 'prototype.') + - 'set_' + clsField.name + ' = ' + - 'function(value) {\n' + - ' ' + getImplementation( - clazz, clsField, 'set_') + '\n' + - '}'; - } - - /* - clazz.output += JSDoc.emitJSDoc( - JSDoc.FIELD, - clsField.name, - clsMemberType); - - clazz.output += - clazz.qName + - '.' + - ((clsField.isStatic) ? '' : 'prototype.') + - clsField.name + - ';\n\n'; - - clazz.output += - 'Object.defineProperty(' + clazz.qName + ((clsField.isStatic) ? '' : '.prototype') + ', \'' + clsField.name + '\', {\n' + - ' get: function() {\n' + - ' ' + StringUtil.substitute(ACTION_UNIMPLEMENTED, [clazz.qName + '::' + clsField.name]) + '\n' + - ' }'; - if (Accessor(clsField).writeable) { - clazz.output += - ',\n set: function(value) {\n' + - ' ' + StringUtil.substitute(ACTION_UNIMPLEMENTED, [clazz.qName + '::' + clsField.name]) + '\n' + - ' }'; - } - clazz.output += - '\n})'; - */ - - clazz.output += Clazz.MEMBER_SEPARATOR; - } else if (clsMembers[clsMemberName][j] is Method) { - clsField = clsMembers[clsMemberName][j]; - - parameters = Method(clsField).parameters; - - parameterNames = []; - for (i = 0, n = parameters.length; i < n; i++) { - parameterNames.push(((parameters[i].isOptional) ? 'opt_' : '') + 'arg' + i); - } - - var returnType:String = Utils.parseType(Method(clsField).returnType.fullName); - if (returnType === 'void') { - returnType = ''; - } - - clazz.output += JSDoc.emitJSDoc( - JSDoc.METHOD, - clsField.name, - parameters, - returnType); - - clazz.output += - clazz.qName + - '.' + - ((clsField.isStatic) ? '' : 'prototype.') + - clsField.name + - ' = function(' + - parameterNames.join(', ') + - ') {'; - if (!clazz.type.isInterface) { - clazz.output += '\n ' + getImplementation( - clazz, clsField, '', - (returnType !== ''), - parameterNames.join(', ')) + '\n'; - } - clazz.output += '}'; - - clazz.output += Clazz.MEMBER_SEPARATOR; - } - } - } - } - - writeClassFile(clazz); - } - } - - this.exit(); - } - - //-------------------------------------- - // getImplementation - //-------------------------------------- - - private function getImplementation(clazz:Clazz, - clsField:Object, - prefix:String = '', - returns:Boolean = false, - parameters:String = ''):String { - var compositeClazzMembers:Array, - hasImplementation:Boolean = false, - i:int, - isStatic:Boolean, - implementation:String, - memberName:String; - - if (clazz.compositeClazz) { - if (clsField is Accessor) { - memberName = Accessor(clsField).name; - isStatic = Accessor(clsField).isStatic; - - compositeClazzMembers = clazz.compositeClazz.accessors; - - for (i = compositeClazzMembers.length - 1; i > -1; i--) { - if (compositeClazzMembers[i].name === memberName) { - hasImplementation = true; - - break; - } - } - - if (hasImplementation) { - implementation = ((returns) ? 'return ' : '') + - ((isStatic) ? clazz.compositeClazzName + '.' : 'this.$_implementation.') + - prefix + memberName + '();'; - } else { - implementation = - StringUtil.substitute(ACTION_UNIMPLEMENTED, - [clazz.qName + '::' + prefix + memberName]); - } - } else if (clsField is Method) { - memberName = Method(clsField).name; - isStatic = Method(clsField).isStatic; - - compositeClazzMembers = clazz.compositeClazz.methods; - - for (i = compositeClazzMembers.length - 1; i > -1; i--) { - if (compositeClazzMembers[i].name === memberName) { - hasImplementation = true; - - break; - } - } - - if (hasImplementation) { - implementation = ((returns) ? 'return ' : '') + - ((isStatic) ? clazz.compositeClazzName + '.' : 'this.$_implementation.') + - memberName + '(' + parameters + ');'; - } else { - implementation = - StringUtil.substitute(ACTION_UNIMPLEMENTED, - [clazz.qName + '::' + memberName]); - - if (returns) { - implementation += - '\n\n return null; // placeholder to appease gjslint'; - } - } - } - } - - return implementation; - } - - //-------------------------------------- - // parseClassMembers - //-------------------------------------- - - private function parseClassMembers(clazz:Clazz):Dictionary { - var clsField:Object, - clsFieldsArray:Array, - clsMembers:Dictionary, - clsMethod:Method, - clsMethodsArray:Array, - clsType:Type, - i:int, - n:int; - - clsMembers = new Dictionary(); - clsMembers[MemberType.STATIC_CONSTANT] = []; - clsMembers[MemberType.STATIC_VARIABLE] = []; - clsMembers[MemberType.STATIC_PROPERTY] = []; - clsMembers[MemberType.STATIC_METHOD] = []; - clsMembers[MemberType.CONSTANT] = []; - clsMembers[MemberType.VARIABLE] = []; - clsMembers[MemberType.PROPERTY] = []; - clsMembers[MemberType.METHOD] = []; - - clsType = clazz.type; - - clsFieldsArray = clsType.fields; - for (i = 0, n = clsFieldsArray.length; i < n; i++) { - clsField = clsFieldsArray[i]; - if (clsField.declaringType.name === clsType.name) { - if (clsField is Constant && clsField.name !== 'length') { - if (clsField.isStatic) { - clsMembers[MemberType.STATIC_CONSTANT].push(clsField); - } else { - clsMembers[MemberType.CONSTANT].push(clsField); - } - } else if (clsField is Variable) { - if (clsField.isStatic) { - clsMembers[MemberType.STATIC_VARIABLE].push(clsField); - } else { - clsMembers[MemberType.VARIABLE].push(clsField); - } - } else if (clsField is Accessor) { - if (clsField.isStatic) { - clsMembers[MemberType.STATIC_PROPERTY].push(clsField); - } else { - clsMembers[MemberType.PROPERTY].push(clsField); - } - } - } - } - - clsMethodsArray = clsType.methods; - for (i = 0, n = clsMethodsArray.length; i < n; i++) { - clsMethod = clsMethodsArray[i]; - if (clsMethod.declaringType.name === clsType.name) { - if (clsMethod.isStatic) { - clsMembers[MemberType.STATIC_METHOD].push(clsMethod); - } else { - clsMembers[MemberType.METHOD].push(clsMethod); - } - } - } - - return clsMembers; - } - - //-------------------------------------- - // parseClasses - //-------------------------------------- - - private function parseClasses():void { - var addClazz:Function, className:String, classType:Type, - clazz:Clazz, exclude:Boolean, excludeFunctionPackageArr:Array, - excludeTopLevelClassArr:Array, pkg:String, pkgArr:Array, i:int, - interfaceName:String, interfaceNamesArray:Array, interfaceType:Type, - isClazz:Function, j:int, jsEquivArr:Array, m:int, n:int, - namespaceArray:Array, superClassName:String, - superClassNamesArray:Array, superClassType:Type; - - addClazz = function (name:String, type:Type):void { - var result:Clazz; - - result = new Clazz(type); - result.name = type.name; - result.qName = Utils.cleanClassQName(type.fullName); - - if (excludeTopLevelClassArr.indexOf(name) === -1) { - classes_[name] = result; - } - } - - isClazz = function (clazzName:String):Boolean { - var clazzNameArr:Array, firstCharCode:Number; - - clazzNameArr = clazzName.split('.'); - if (clazzNameArr && clazzNameArr.length > 0) { - clazzName = clazzNameArr[clazzNameArr.length - 1]; - } - firstCharCode = clazzName.charCodeAt(0); - - return firstCharCode >= 65 && firstCharCode <= 90; - } - - // ToDo (erikdebruin): these classes have an JS counterpart, and we - // want to only add those members that are not - // in the JS implementation, or override those - // with a different implementation. - excludeTopLevelClassArr = [ - 'Array', 'Boolean', 'Date',/* 'Error',*/ 'EvalError', 'Function', - 'JSON', 'Math', 'Number', 'QName', 'RangeError', - 'ReferenceError', 'RegExp', 'String', 'SyntaxError', - 'TypeError' ]; - - excludeFunctionPackageArr = [ - 'avmplus', 'avm2.intrinsics.memory', 'bugzilla', - 'flash.debugger', 'flash.media', 'flash.profiler', - 'flash.sampler', 'watson' ]; - - jsEquivArr = [ - 'decodeURI', 'decodeURIComponent', 'encodeURI', - 'encodeURIComponent', 'escape', 'isFinite', - 'isNaN', 'parseFloat', 'parseInt', 'undefined', 'unescape' ]; - - classes_ = new Dictionary(); - - functions_ = new Dictionary(); - - for (i = 0, n = catalogXML_.length() - 1; i < n; i++) { - className = Utils.cleanClassQName(catalogXML_[i].@id); - try - { - if (!classes_[className]) { - classType = Type.forName(className); - if (classType && classType.fullName) { - namespaceArray = className.split('.'); - if (namespaceArray.length === 1 || - namespaceArray[0] === 'flash') { - - addClazz(className, classType); - - superClassNamesArray = classType.extendsClasses; - m = superClassNamesArray.length; - for (j = 0; j < m; j++) { - superClassName = Utils.cleanClassQName( - superClassNamesArray[j]); - if (!classes_[superClassName]) { - superClassType = Type.forName( - superClassName); - if (superClassType) { - addClazz(superClassName, - superClassType); - } - } - } - - // fetch class' interfaces - interfaceNamesArray = classType.interfaces; - m = interfaceNamesArray.length; - for (j = 0; j < m; j++) { - interfaceName = interfaceNamesArray[j]; - if (!classes_[interfaceName]) { - interfaceType = Type.forName( - interfaceName); - if (interfaceType) { - addClazz(interfaceName, - interfaceType); - } - } - } - } - } else { // "function Classes" - pkgArr = className.split('.'); - if (pkgArr.length > 1) { - pkgArr.pop(); - } - pkg = pkgArr.join('.'); - - exclude = pkg.charAt(0) === '_' || - excludeFunctionPackageArr.indexOf(pkg) > -1 || - jsEquivArr.indexOf(pkg) > -1; - - if (!isClazz(className) && !exclude) { - functions_[className] = className; - } - } - } - } - catch (err:Error) { /* eat Type.forName() exceptions */ } - } - } - - //-------------------------------------- - // readCatalogXML - //-------------------------------------- - - private function readCatalogXML():void { - var file:File, stream:FileStream, xml:XML; - - file = File.applicationDirectory.resolvePath( - 'assets/catalog_15.xml'); - - stream = new FileStream(); - stream.open(file, FileMode.READ); - xml = new XML( - stream.readUTFBytes(stream.bytesAvailable).replace( - /xmlns=".*"/, "")); - stream.close(); - - catalogXML_ = xml..script.children(); - } - - //-------------------------------------- - // writeClassFile - //-------------------------------------- - - private function writeClassFile(clazz:Clazz):void { - var file:File, - fileStream:FileStream, - clazzQName:String, - packagePath:String; - - clazzQName = clazz.qName; - - packagePath = (clazzQName.indexOf('.') > -1) ? clazzQName : ''; - packagePath = packagePath.substring(0, packagePath.lastIndexOf('.')); - packagePath = packagePath.replace(/\./g, '/'); - if (packagePath !== '') { - packagePath = packagePath + '/'; - } - - fileStream = new FileStream(); - file = outputRoot_.resolvePath(packagePath + clazz.name + '.js'); - fileStream.open(file, FileMode.WRITE); - fileStream.writeUTFBytes(clazz.output); - fileStream.close(); - } - - ]]></fx:Script> - - <fx:Declarations /> - -</s:WindowedApplication> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObject.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObject.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObject.js deleted file mode 100644 index 17805e3..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObject.js +++ /dev/null @@ -1,173 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview 'vf2js.display.DisplayObject' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.display.DisplayObject'); - -goog.require('flash.display.DisplayObject'); -goog.require('flash.display.DisplayObjectContainer'); -goog.require('flash.display.IBitmapDrawable'); -goog.require('flash.display.LoaderInfo'); -goog.require('vf2js.events.EventDispatcher'); - - - -/** - * @constructor - * @struct - * @extends {vf2js.events.EventDispatcher} - * @implements {flash.display.IBitmapDrawable} - */ -vf2js.display.DisplayObject = function() { - vf2js.display.DisplayObject.base(this, 'constructor'); -}; -goog.inherits(vf2js.display.DisplayObject, vf2js.events.EventDispatcher); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.display.DisplayObject.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'DisplayObject', qName: 'vf2js.display.DisplayObject'}], - interfaces: [flash.display.IBitmapDrawable] }; - - -//------------------------------------------------------------------------------ -// -// PROPERTIES -// -//------------------------------------------------------------------------------ - - -/** - * loaderInfo - * - * @return {flash.display.LoaderInfo} - */ -vf2js.display.DisplayObject.prototype.get_loaderInfo = function() { - return window['apache-flex_loaderInfo']; -}; - - -/** - * parent_ - * - * @type {flash.display.DisplayObjectContainer} - */ -vf2js.display.DisplayObject.prototype.parent_; - - -/** - * parent - * - * @param {flash.display.DisplayObjectContainer} value The parent container. - */ -vf2js.display.DisplayObject.prototype.set_parent = function(value) { - this.parent_ = value; -}; - - -/** - * parent - * - * @return {flash.display.DisplayObjectContainer} - */ -vf2js.display.DisplayObject.prototype.get_parent = function() { - return this.parent_ -}; - - -/** - * root - * - * @return {flash.display.DisplayObject} - */ -vf2js.display.DisplayObject.prototype.get_root = function() { - return window['apache-flex_system-manager']; -}; - - -/** - * stage - * - * @return {flash.display.Stage} - */ -vf2js.display.DisplayObject.prototype.get_stage = function() { - return window['apache-flex_stage']; -}; - - -/** - * scaleX_ - * - * @type {number} - */ -vf2js.display.DisplayObject.prototype.scaleX_; - - -/** - * scaleX - * - * @return {number} - */ -vf2js.display.DisplayObject.prototype.get_scaleX = function() { - return scaleX_; -}; - - -/** - * scaleX - * - * @param {number} value The new value. - */ -vf2js.display.DisplayObject.prototype.set_scaleX = function(value) { - this.scaleX_ = value; -}; - - -/** - * scaleY_ - * - * @type {number} - */ -vf2js.display.DisplayObject.prototype.scaleY_; - - -/** - * scaleY - * - * @return {number} - */ -vf2js.display.DisplayObject.prototype.get_scaleY = function() { - return scaleY_; -}; - - -/** - * scaleY - * - * @param {number} value The new value. - */ -vf2js.display.DisplayObject.prototype.set_scaleY = function(value) { - this.scaleY_ = value; -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObjectContainer.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObjectContainer.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObjectContainer.js deleted file mode 100644 index 5c24e8b..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/DisplayObjectContainer.js +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview 'vf2js.display.DisplayObjectContainer' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.display.DisplayObjectContainer'); - -goog.require('vf2js.display.InteractiveObject'); - - - -/** - * @constructor - * @struct - * @extends {vf2js.display.InteractiveObject} - */ -vf2js.display.DisplayObjectContainer = function() { - vf2js.display.DisplayObjectContainer.base(this, 'constructor'); - - this.children_ = []; -}; -goog.inherits(vf2js.display.DisplayObjectContainer, vf2js.display.InteractiveObject); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.display.DisplayObjectContainer.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'DisplayObjectContainer', qName: 'vf2js.display.DisplayObjectContainer'}], - interfaces: [] }; - - -//------------------------------------------------------------------------------ -// -// PROPERTIES -// -//------------------------------------------------------------------------------ - - -/** - * children_ - * - * @private - * - * @type {Array.<flash.display.DisplayObject>} - */ -vf2js.display.DisplayObjectContainer.prototype.children_; - - -//------------------------------------------------------------------------------ -// -// METHODS -// -//------------------------------------------------------------------------------ - - -/** - * addChildAt - * - * @param {flash.display.DisplayObject} arg0 Argument 0 - * @param {number} arg1 Argument 1 - * - * @return {flash.display.DisplayObject} - */ -vf2js.display.DisplayObjectContainer.prototype.addChildAt = function(arg0, arg1) { - arg0.$_implementation.set_parent(this); - - this.children_[arg1] = arg0; - - this.dispatchEvent(new flash.events.Event(flash.events.Event.ADDED)); - - return arg0; -}; - - -/** - * addChild - * - * @param {flash.display.DisplayObject} arg0 Argument 0 - * - * @return {flash.display.DisplayObject} - */ -vf2js.display.DisplayObjectContainer.prototype.addChild = function(arg0) { - arg0.$_implementation.set_parent(this); - - this.children_.push(arg0); - - this.dispatchEvent(new flash.events.Event(flash.events.Event.ADDED)); - - return arg0; -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/InteractiveObject.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/InteractiveObject.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/InteractiveObject.js deleted file mode 100644 index 211c8f3..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/InteractiveObject.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @fileoverview 'vf2jsvf2js.display.InteractiveObject' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.display.InteractiveObject'); - -goog.require('vf2js.display.DisplayObject'); - - - -/** - * @constructor - * @struct - * @extends {vf2js.display.DisplayObject} - */ -vf2js.display.InteractiveObject = function() { - vf2js.display.InteractiveObject.base(this, 'constructor'); -}; -goog.inherits(vf2js.display.InteractiveObject, vf2js.display.DisplayObject); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.display.InteractiveObject.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'InteractiveObject', qName: 'vf2js.display.InteractiveObject'}], - interfaces: [] } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/LoaderInfo.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/LoaderInfo.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/LoaderInfo.js deleted file mode 100644 index 611ae00..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/LoaderInfo.js +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview 'vf2js.display.LoaderInfo' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.display.LoaderInfo'); - -goog.require('vf2js.events.EventDispatcher'); - - - -/** - * @constructor - * @struct - * @extends {vf2js.events.EventDispatcher} - */ -vf2js.display.LoaderInfo = function() { - vf2js.display.LoaderInfo.base(this, 'constructor'); -}; -goog.inherits(vf2js.display.LoaderInfo, vf2js.events.EventDispatcher); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.display.LoaderInfo.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'LoaderInfo', qName: 'vf2js.display.LoaderInfo'}], - interfaces: [flash.events.IEventDispatcher] }; - - -//------------------------------------------------------------------------------ -// -// PROPERTIES -// -//------------------------------------------------------------------------------ - - -/** - * width - * - * @return {number} - */ -vf2js.display.LoaderInfo.prototype.get_width = function() { - return 1024; -}; - - -/** - * bytesLoaded - * - * @return {number} - */ -vf2js.display.LoaderInfo.prototype.get_bytesLoaded = function() { - return 1; -}; - - -/** - * height - * - * @return {number} - */ -vf2js.display.LoaderInfo.prototype.get_height = function() { - return 768; -}; - - -/** - * url - * - * @return {string} - */ -vf2js.display.LoaderInfo.prototype.get_url = function() { - console.log('vf2js.display.LoaderInfo.get_url'); - - return document.location.url; -}; - - -/** - * bytesTotal - * - * @return {number} - */ -vf2js.display.LoaderInfo.prototype.get_bytesTotal = function() { - return 1; -}; - - -//------------------------------------------------------------------------------ -// -// METHODS -// -//------------------------------------------------------------------------------ - - -/** - * dispatchEvent - * - * @param {Event} arg0 Argument 0 - * - * @return {boolean} - */ -vf2js.display.LoaderInfo.prototype.dispatchEvent = function(arg0) { - return vf2js.display.LoaderInfo.base(this, 'dispatchEvent', arg0); -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/MovieClip.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/MovieClip.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/MovieClip.js deleted file mode 100644 index 331ccc2..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/MovieClip.js +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview 'vf2js.display.MovieClip' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.display.MovieClip'); - -goog.require('vf2js.display.Sprite'); - - - -/** - * @constructor - * @struct - * @extends {flash.display.Sprite} - */ -vf2js.display.MovieClip = function() { - vf2js.display.MovieClip.base(this, 'constructor'); -}; -goog.inherits(vf2js.display.MovieClip, vf2js.display.Sprite); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.display.MovieClip.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'MovieClip', qName: 'vf2js.display.MovieClip'}], - interfaces: [] }; - - -//------------------------------------------------------------------------------ -// -// PROPERTIES -// -//------------------------------------------------------------------------------ - - -/** - * framesLoaded - * - * @return {number} - */ -vf2js.display.MovieClip.prototype.get_framesLoaded = function() { - return 2; -}; - - -/** - * currentFrame_ - * - * @type {number} - */ -vf2js.display.MovieClip.prototype.currentFrame_ = 1; - - -/** - * currentFrame - * - * @return {number} - */ -vf2js.display.MovieClip.prototype.get_currentFrame = function() { - return this.currentFrame_; -}; - - -/** - * totalFrames - * - * @return {number} - */ -vf2js.display.MovieClip.prototype.get_totalFrames = function() { - return 2; -}; - - -//------------------------------------------------------------------------------ -// -// METHODS -// -//------------------------------------------------------------------------------ - - -/** - * nextFrame - */ -vf2js.display.MovieClip.prototype.nextFrame = function() { - this.currentFrame_++; -}; - - -/** - * stop - */ -vf2js.display.MovieClip.prototype.stop = function() { - // DO NOTHING, WE'RE NOT ON A TIMELINE -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Sprite.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Sprite.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Sprite.js deleted file mode 100644 index c55f032..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Sprite.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @fileoverview 'vf2jsvf2js.display.InteractiveObject' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.display.Sprite'); - -goog.require('vf2js.display.DisplayObjectContainer'); - - - -/** - * @constructor - * @struct - * @extends {vf2js.display.DisplayObjectContainer} - */ -vf2js.display.Sprite = function() { - vf2js.display.Sprite.base(this, 'constructor'); -}; -goog.inherits(vf2js.display.Sprite, vf2js.display.DisplayObjectContainer); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.display.InteractiveObject.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'Sprite', qName: 'vf2js.display.Sprite'}], - interfaces: [] } http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Stage.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Stage.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Stage.js deleted file mode 100644 index 6837d83..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/display/Stage.js +++ /dev/null @@ -1,210 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview 'vf2js.display.Stage' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.display.Stage'); - -goog.require('flash.display.DisplayObjectContainer'); -goog.require('flash.display.StageAlign'); - - - -/** - * @constructor - * @struct - * @extends {flash.display.DisplayObjectContainer} - */ -vf2js.display.Stage = function() { - vf2js.display.Stage.base(this, 'constructor'); -}; -goog.inherits(vf2js.display.Stage, flash.display.DisplayObjectContainer); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.display.Stage.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'Stage', qName: 'vf2js.display.Stage'}], - interfaces: [] }; - - -//------------------------------------------------------------------------------ -// -// PROPERTIES -// -//------------------------------------------------------------------------------ - - -/** - * align_ - * - * @private - * - * @type {string} - */ -vf2js.display.Stage.prototype.align_ = flash.display.StageAlign.TOP; - - -/** - * align - * - * @return {string} - */ -vf2js.display.Stage.prototype.get_align = function() { - return this.align_; -}; - - -/** - * align - * - * @type {undefined} - */ -vf2js.display.Stage.prototype.set_align = function(value) { - this.align_ = value; -}; - - -/** - * quality_ - * - * @private - * - * @type {string} - */ -vf2js.display.Stage.prototype.quality_; - - -/** - * quality - * - * @return {string} - */ -vf2js.display.Stage.prototype.get_quality = function() { - return this.quality_; -}; - - -/** - * quality - * - * @param {string} value The new value. - */ -vf2js.display.Stage.prototype.set_quality = function(value) { - this.quality_ = value; -}; - - -/** - * scaleMode_ - * - * @private - * - * @type {string} - */ -vf2js.display.Stage.prototype.scaleMode_; - - -/** - * scaleMode - * - * @return {string} - */ -vf2js.display.Stage.prototype.get_scaleMode = function() { - return this.scaleMode_; -}; - - -/** - * scaleMode - * - * @param {string} value The new value. - */ -vf2js.display.Stage.prototype.set_scaleMode = function(value) { - this.scaleMode_ = value; -}; - - -/** - * stageHeight - * - * @return {number} - */ -vf2js.display.Stage.prototype.get_stageHeight = function() { - return 768; -}; - - -/** - * stageWidth - * - * @return {number} - */ -vf2js.display.Stage.prototype.get_stageWidth = function() { - return 1024; -}; - - -//------------------------------------------------------------------------------ -// -// METHODS -// -//------------------------------------------------------------------------------ - - -/** - * addEventListener - * - * @param {string} arg0 Argument 0 - * @param {Function} arg1 Argument 1 - * @param {boolean=} opt_arg2 Argument 2 (optional) - * @param {number=} opt_arg3 Argument 3 (optional) - * @param {boolean=} opt_arg4 Argument 4 (optional) - */ -vf2js.display.Stage.prototype.addEventListener = function(arg0, arg1, opt_arg2, opt_arg3, opt_arg4) { - vf2js.display.Stage.base(this, 'addEventListener', arg0, arg1, opt_arg2, opt_arg3, opt_arg4); -}; - - -/** - * dispatchEvent - * - * @param {Event} arg0 Argument 0 - * - * @return {boolean} - */ -vf2js.display.Stage.prototype.dispatchEvent = function(arg0) { - return vf2js.display.Stage.base(this, 'dispatchEvent', arg0); -}; - - -/** - * hasEventListener - * - * @param {string} arg0 Argument 0 - * - * @return {boolean} - */ -vf2js.display.Stage.prototype.hasEventListener = function(arg0) { - return vf2js.display.Stage.base(this, 'hasEventListener', arg0); -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/Event.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/Event.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/Event.js deleted file mode 100644 index 94f0426..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/Event.js +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview 'vf2js.events.Event' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.events.Event'); - - - -/** - * @constructor - * @struct - * @param {string} arg0 Argument 0 - * @param {boolean=} opt_arg1 Argument 1 (optional) - * @param {boolean=} opt_arg2 Argument 2 (optional) - */ -vf2js.events.Event = function(arg0, opt_arg1, opt_arg2) { - this._type = arg0; - - opt_arg1 = (opt_arg1 !== undefined) ? opt_arg1 : false; - this._bubbles = opt_arg1; - - opt_arg2 = (opt_arg2 !== undefined) ? opt_arg2 : false; - this._cancelable = opt_arg2; -}; - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.events.Event.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'Event', qName: 'vf2js.events.Event'}], - interfaces: [] }; - - -//------------------------------------------------------------------------------ -// -// PROPERTIES -// -//------------------------------------------------------------------------------ - - -/** - * _bubbles - * - * @private - * - * @type{boolean} - */ -vf2js.events.Event.prototype._bubbles; - - -/** - * bubbles - * - * @return {boolean} - */ -vf2js.events.Event.prototype.get_bubbles = function() { - return this._bubbles; -}; - - -/** - * _cancelable - * - * @private - * - * @type{boolean} - */ -vf2js.events.Event.prototype._cancelable; - - -/** - * cancelable - * - * @return {boolean} - */ -vf2js.events.Event.prototype.get_cancelable = function() { - return this._cancelable; -}; - - -/** - * _type - * - * @private - * - * @type{string} - */ -vf2js.events.Event.prototype._type; - - -/** - * type - * - * @return {string} - */ -vf2js.events.Event.prototype.get_type = function() { - return this._type; -}; - - -//------------------------------------------------------------------------------ -// -// METHODS -// -//------------------------------------------------------------------------------ - - -/** - * toString - * - * @return {string} - */ -vf2js.events.Event.prototype.toString = function() { - return '[Event type=' + this._type + ' bubbles=' + this._bubbles + ' cancelable=' + this._cancelable + ']'; -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/EventDispatcher.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/EventDispatcher.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/EventDispatcher.js deleted file mode 100644 index 01f1d32..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/EventDispatcher.js +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview 'vf2js.events.EventDispatcher' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.events.EventDispatcher'); - -goog.require('goog.events.EventTarget'); - - - -/** - * @constructor - * @struct - * @param {IEventDispatcher=} opt_arg0 Argument 0 (optional) - */ -vf2js.events.EventDispatcher = function(opt_arg0) { - this.eventTarget_ = new goog.events.EventTarget(); - - this.listeners_ = []; -}; - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.events.EventDispatcher.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'EventDispatcher', qName: 'vf2js.events.EventDispatcher'}], - interfaces: [] }; - - -//------------------------------------------------------------------------------ -// -// PROPERTIES -// -//------------------------------------------------------------------------------ - - -/** - * listeners_ - * - * @private - * - * @type {Array.<string>} - */ -vf2js.events.EventDispatcher.prototype.listeners_; - - -/** - * eventTarget_ - * - * @private - * - * @type {goog.events.EventTarget} - */ -vf2js.events.EventDispatcher.prototype.eventTarget_; - - -//------------------------------------------------------------------------------ -// -// METHODS -// -//------------------------------------------------------------------------------ - - -/** - * dispatchEvent - * - * @param {Event} arg0 Argument 0 - * - * @return {boolean} - */ -vf2js.events.EventDispatcher.prototype.dispatchEvent = function(arg0) { - console.log('$ dispatchEvent: ' + arg0.get_type()); - - return this.eventTarget_.dispatchEvent(arg0.get_type()); -}; - - -/** - * addEventListener - * - * @param {string} arg0 Argument 0 - * @param {Function} arg1 Argument 1 - * @param {boolean=} opt_arg2 Argument 2 (optional) - * @param {number=} opt_arg3 Argument 3 (optional) - * @param {boolean=} opt_arg4 Argument 4 (optional) - */ -vf2js.events.EventDispatcher.prototype.addEventListener = function(arg0, arg1, opt_arg2, opt_arg3, opt_arg4) { - console.log('Listen for event: ' + arg0); - - if (!this.hasEventListener(arg0)) { - this.listeners_.push(arg0); - - this.eventTarget_.listen(arg0, arg1); - } -}; - - -/** - * hasEventListener - * - * @param {string} arg0 Argument 0 - * - * @return {boolean} - */ -vf2js.events.EventDispatcher.prototype.hasEventListener = function(arg0) { - return this.listeners_.indexOf(arg0) > -1; -}; - - -/** - * removeEventListener - * - * @param {string} arg0 Argument 0 - * @param {Function} arg1 Argument 1 - * @param {boolean=} opt_arg2 Argument 2 (optional) - */ -vf2js.events.EventDispatcher.prototype.removeEventListener = function(arg0, arg1, opt_arg2) { - console.log('Unlisten event: ' + arg0); - - this.listeners_.splice(this.listeners_.indexOf(arg0), 1); - - this.eventTarget_.unlisten(arg0, arg1); -}; - - -/** - * toString - * - * @return {string} The string - */ -vf2js.events.EventDispatcher.prototype.toString = function() { - //return this.toString(); -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/ProgressEvent.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/ProgressEvent.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/ProgressEvent.js deleted file mode 100644 index d9c00c0..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/ProgressEvent.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview 'vf2js.events.ProgressEvent' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.events.ProgressEvent'); - -goog.require('vf2js.events.Event'); - - - -/** - * @constructor - * @struct - * @extends {vf2js.events.Event} - * @param {string} arg0 Argument 0 - * @param {boolean=} opt_arg1 Argument 1 (optional) - * @param {boolean=} opt_arg2 Argument 2 (optional) - * @param {Number=} opt_arg3 Argument 3 (optional) - * @param {Number=} opt_arg4 Argument 4 (optional) - */ -vf2js.events.ProgressEvent = function(arg0, opt_arg1, opt_arg2, opt_arg3, opt_arg4) { - vf2js.events.ProgressEvent.base(this, 'constructor', arg0, opt_arg1, opt_arg2, opt_arg3, opt_arg4); -}; -goog.inherits(vf2js.events.ProgressEvent, vf2js.events.Event); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.events.ProgressEvent.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'ProgressEvent', qName: 'vf2js.events.ProgressEvent'}], - interfaces: [] }; - - -//------------------------------------------------------------------------------ -// -// METHODS -// -//------------------------------------------------------------------------------ - - -/** - * toString - * - * @return {string} - */ -vf2js.events.ProgressEvent.prototype.toString = function() { - var /** @type {string} */ result; - - result = vf2js.events.TimerEvent.base(this, 'toString'); - result = result.replace('[Event ', '[ProgressEvent '); - result = result.replace(']', ' bytesLoaded=value bytesTotal=value]'); - - return result; -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/TimerEvent.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/TimerEvent.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/TimerEvent.js deleted file mode 100644 index 9c9da37..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/events/TimerEvent.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview 'vf2js.events.TimerEvent' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.events.TimerEvent'); - -goog.require('vf2js.events.Event'); - - - -/** - * @constructor - * @struct - * @extends {flash.events.Event} - * @param {string} arg0 Argument 0 - * @param {boolean=} opt_arg1 Argument 1 (optional) - * @param {boolean=} opt_arg2 Argument 2 (optional) - */ -vf2js.events.TimerEvent = function(arg0, opt_arg1, opt_arg2) { - vf2js.events.TimerEvent.base(this, 'constructor', arg0, opt_arg1, opt_arg2); -}; -goog.inherits(vf2js.events.TimerEvent, vf2js.events.Event); - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.events.TimerEvent.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'TimerEvent', qName: 'vf2js.events.TimerEvent'}], - interfaces: [] }; - - -//------------------------------------------------------------------------------ -// -// METHODS -// -//------------------------------------------------------------------------------ - - -/** - * toString - * - * @return {string} - */ -vf2js.events.TimerEvent.prototype.toString = function() { - var /** @type {string} */ result; - - result = vf2js.events.TimerEvent.base(this, 'toString'); - result = result.replace('[Event ', '[TimerEvent '); - - return result; -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/ApplicationDomain.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/ApplicationDomain.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/ApplicationDomain.js deleted file mode 100644 index 9e4eab4..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/ApplicationDomain.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview 'vf2js.system.ApplicationDomain' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.system.ApplicationDomain'); - - - -/** - * @constructor - * @struct - * @param {ApplicationDomain=} opt_arg0 Argument 0 (optional) - */ -vf2js.system.ApplicationDomain = function(opt_arg0) {}; - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.system.ApplicationDomain.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'ApplicationDomain', qName: 'vf2js.system.ApplicationDomain'}], - interfaces: [] }; - - -//------------------------------------------------------------------------------ -// -// METHODS -// -//------------------------------------------------------------------------------ - - -/** - * getDefinition - * - * @param {string} arg0 Argument 0 - * - * @return {Object} - */ -vf2js.system.ApplicationDomain.prototype.getDefinition = function(arg0) { - var fullName; - - fullName = arg0.replace(/::/gi, '.'); - - return eval('new ' + fullName + '()'); -}; - - -/** - * hasDefinition - * - * @param {string} arg0 Argument 0 - * - * @return {boolean} - */ -vf2js.system.ApplicationDomain.prototype.hasDefinition = function(arg0) { - return true; -}; http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8bb7b41e/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/Capabilities.js ---------------------------------------------------------------------- diff --git a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/Capabilities.js b/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/Capabilities.js deleted file mode 100644 index 4f349a8..0000000 --- a/vf2js/utils/PlayerGlobalToJS/src/assets/vf2js/system/Capabilities.js +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview 'vf2js.system.Capabilities' - * - * @author erikdebr...@apache.org (Erik de Bruin) - */ - -'use strict'; - -goog.provide('vf2js.system.Capabilities'); - - - -/** - * @constructor - * @struct - */ -vf2js.system.Capabilities = function() {}; - - -/** - * Metadata - * - * @type {Object.<string, Array.<Object>>} - */ -vf2js.system.Capabilities.prototype.FLEXJS_CLASS_INFO = - { names: [{ name: 'Capabilities', qName: 'vf2js.system.Capabilities'}], - interfaces: [] }; - - -//------------------------------------------------------------------------------ -// -// STATIC PROPERTIES -// -//------------------------------------------------------------------------------ - - -/** - * language - * - * @return {string} - */ -vf2js.system.Capabilities.get_language = function() { - return 'en'; -}; - - -/** - * playerType - * - * @return {string} - */ -vf2js.system.Capabilities.get_playerType = function() { - return 'PlugIn'; -}; - - -/** - * screenDPI - * - * @return {Number} - */ -vf2js.system.Capabilities.get_screenDPI = function() { - return 72; -}; - - -/** - * version - * - * @return {string} - */ -vf2js.system.Capabilities.get_version = function() { - return 'MAC 15,0,0,0'; -}; - - -/** - * os - * - * @return {string} - */ -vf2js.system.Capabilities.get_os = function() { - return 'Mac OS 10.9.5'; -};