{
- await Utils.asyncTreeFlatMap(makiTree, async (node: MakiObject) => {
- if (node instanceof JsScript && node.system) {
- node.system.onscriptunloading();
- }
-
- return node;
- });
-}
-
-export function gotSkinZip(zip: JSZip, store: ModernStore): Thunk {
- return async (dispatch) => {
- // unload current skin if one has been loaded
- if (store.getState().modernSkin.skinLoaded) {
- await unloadSkin(store.getState().modernSkin.makiTree);
- dispatch({ type: "SKIN_UNLOADED" });
- }
-
- const skinXml = await Utils.readXml(zip, "skin.xml");
- if (skinXml == null) {
- throw new Error("Could not find skin.xml in skin");
- }
- const rawXmlTree = await Utils.inlineIncludes(skinXml, zip);
- const xmlTree = Utils.mapTreeBreadth(
- rawXmlTree,
- (node: XmlNode, parent: XmlNode) => {
- return { ...node, uid: Utils.getId(), parent };
- }
- );
-
- dispatch(setXmlTree(xmlTree));
-
- const makiTree: MakiObject = await initialize(zip, xmlTree);
- // Execute scripts
- await Utils.asyncTreeFlatMap(makiTree, async (node: MakiObject) => {
- if (!(node instanceof JsScript)) {
- return node;
- }
- const scriptPath = node.getScriptPath();
- if (scriptPath == null) {
- return node;
- }
- if (scriptPath.endsWith("standardframe.maki")) {
- // TODO: stop ignoring standardframe
- return node;
- }
-
- // removes groupdefs from consideration (only run scripts when actually referenced by group)
- if (Utils.findParentNodeOfType(node, new Set(["groupdef"]))) {
- return node;
- }
- const scriptGroup = Utils.findParentNodeOfType(
- node,
- new Set(["group", "winampabstractionlayer", "wasabixml"])
- );
- node.system = new System(scriptGroup, store);
- const script = await Utils.readUint8array(zip, scriptPath);
- if (script == null) {
- console.warn(`Unable to find script at ${scriptPath}`);
- return node;
- }
- run({
- runtime,
- data: script,
- system: node.system,
- log: false,
- });
- return node;
- });
-
- dispatch(setMakiTree(makiTree));
- };
-}
-
-export function setVolume(volume: number): ModernAction {
- return { type: "SET_VOLUME", volume };
-}
diff --git a/packages/webamp-modern/src/App.css b/packages/webamp-modern/src/App.css
deleted file mode 100644
index 827b8978..00000000
--- a/packages/webamp-modern/src/App.css
+++ /dev/null
@@ -1,3 +0,0 @@
-#root {
- image-rendering: pixelated;
-}
diff --git a/packages/webamp-modern/src/App.js b/packages/webamp-modern/src/App.js
deleted file mode 100644
index 84cf8307..00000000
--- a/packages/webamp-modern/src/App.js
+++ /dev/null
@@ -1,128 +0,0 @@
-import React, { Suspense } from "react";
-import "./App.css";
-import * as Actions from "./Actions";
-import * as Selectors from "./Selectors";
-// import simpleSkin from "../skins/simple.wal";
-import cornerSkin from "../skins/CornerAmp_Redux.wal";
-import { useDispatch, useSelector, useStore } from "react-redux";
-import DropTarget from "./components/DropTarget";
-import { Maki } from "./MakiRenderer";
-const Dashboard = React.lazy(() => import("./Dashboard"));
-
-const skinUrls = [
- cornerSkin,
- "https://archive.org/cors/winampskin_MMD3/MMD3.wal",
- "https://archive.org/cors/winampskin_The_Official_Ford_Sync_Winamp5_Skin/The_Official_Ford_Sync_Winamp5_Skin.wal",
- "https://archive.org/cors/winampskin_Godsmack_Faceless/Godsmack_-_Faceless.wal",
- "https://archive.org/cors/winampskin_Tokyo_Drift/Tokyo_Drift.wal",
- "https://archive.org/cors/winampskin_Nebular/Nebular.wal",
- "https://archive.org/cors/winampskin_Official_Enter_the_Matrix_Skin/Enter_the_Matrix.wal",
- "https://archive.org/cors/winampskin_Reel-To-Reel_Machine_Sony_Edition/ReelToReel_Machine__Sony_Edition.wal",
- "https://archive.org/cors/winampskin_Casio-G-Shocked-V5/Casio-G-Shocked-V2.wal",
- "https://archive.org/cors/winampskin_ZDL_GOLD_STACK/ZDL_GOLD_STACK.wal",
- "https://archive.org/cors/winampskin_BLAKK/BLAKK.wal",
- "https://archive.org/cors/winampskin_Braun_CC_50/Braun_CC_50.wal",
- "https://archive.org/cors/winampskin_Walk_Hard_Winamp5_Skin/Walk_Hard_Winamp5_Skin.wal",
- "https://archive.org/cors/winampskin_Freddy_vs_Jason/Freddy_vs_Jason.wal",
- "https://archive.org/cors/winampskin_The_Official_Grind_Winamp_3_Skin/The_Official_Grind_Winamp_3_Skin.wal",
- "https://archive.org/cors/winampskin_The_KidsWB_Winamp_3_Skin/The_KidsWB_Winamp_3_Skin.wal",
- "https://archive.org/cors/winampskin_Sailor_Moon_Modern_version_1/Sailor_Moon_Modern_version_1.wal",
- "https://archive.org/cors/winampskin_Dr_Who_--_Monsters_and_Villains/Dr_Who_--_Monsters_and_Villains.wal",
- "https://archive.org/cors/winampskin_Official_Linkin_Park_Skin/Official_Linkin_Park_Skin.wal",
- "https://archive.org/cors/winampskin_Resin/Resin.wal",
- "https://archive.org/cors/winampskin_PAD/PAD.wal",
- "https://archive.org/cors/winampskin_MIPOD/MIPOD.wal",
- "https://archive.org/cors/winampskin_Ebonite_2.0/Ebonite_2_1.wal",
- "https://archive.org/cors/winampskin_Drone_v1dot1/Drone_v1.wal",
- "https://archive.org/cors/winampskin_Hoop_Life_Modern/Hoop_Life_WA3_version.wal",
- "https://archive.org/cors/winampskin_Austin_Powers_Goldmember_Skin/Official_Austin_Powers_3_Skin.wal",
- "https://archive.org/cors/winampskin_Coca_Cola_My_Coke_Music/Coca_Cola__My_Coke_Music.wal",
- "https://archive.org/cors/winampskin_Barracuda_Winamp/Barracuda_Winamp.wal",
- "https://archive.org/cors/winampskin_Nike_total_90_aerow/Nike_total_90_aerow.wal",
- "https://archive.org/cors/winampskin_Metallica_Metallica/Metallica_Metallica.wal",
- "https://archive.org/cors/winampskin_Epsilux/Epsilux.wal",
- "https://archive.org/cors/winampskin_Official_Witchblade_TV_Series_Skin/Official_Witchblade_TV_Series_Skin.wal",
- "https://archive.org/cors/winampskin_ocrana/ocrana.wal",
- "https://archive.org/cors/winampskin_Clean_AMP/Clean_AMP.wal",
- "https://archive.org/cors/winampskin_Xbox_Amp/Xbox_Amp.wal",
- "https://archive.org/cors/winampskin_Lapis_Lazuli/Lapis_Lazuli.wal",
- "https://archive.org/cors/winampskin_The_Punisher_Winamp_5_Skin/The_Punisher_Winamp_5_Skin.wal",
- "https://archive.org/cors/winampskin_The_Chronicles_of_Riddick/The_Chronicles_of_Riddick.wal",
- "https://archive.org/cors/winampskin_Official_Midnight_Club_2_skin/Official_Midnight_Club_2_skin.wal",
- "https://archive.org/cors/winampskin_Official_Torque_Winamp5_Skin/Official_Torque_Winamp5_Skin.wal",
- "https://archive.org/cors/winampskin_Official_Mad_Magazine_Skin/Official_Mad_Magazine_Skin.wal",
- "https://archive.org/cors/winampskin_PUMA_v1.08_Speed_Boot_Winamp5_Skin/PUMA_v1.08_Speed_Boot_Winamp5_Skin.wal",
- "https://archive.org/cors/winampskin_EMP/EMP.wal",
- "https://archive.org/cors/winampskin_Devay/Devay.wal",
-];
-
-function getSkinUrlFromQueryParams() {
- const searchParams = new URLSearchParams(window.location.search);
- return searchParams.get("skinUrl");
-}
-
-function setSkinUrlToQueryParams(skinUrl) {
- const searchParams = new URLSearchParams(window.location.search);
- searchParams.set("skinUrl", skinUrl);
- const newRelativePathQuery = `${
- window.location.pathname
- }?${searchParams.toString()}`;
- window.history.pushState(null, "", newRelativePathQuery);
-}
-
-function Loading() {
- return Loading...
;
-}
-
-function Modern() {
- const dispatch = useDispatch();
- const store = useStore();
- const root = useSelector(Selectors.getMakiTree);
- const [skinUrl, setSkinUrl] = React.useState(null);
- React.useEffect(() => {
- const defaultSkinUrl = getSkinUrlFromQueryParams() || skinUrls[0];
- setSkinUrl(defaultSkinUrl);
- dispatch(Actions.gotSkinUrl(defaultSkinUrl, store));
- }, [store, dispatch]);
- if (root == null) {
- return ;
- }
- return (
-
- {
- dispatch(Actions.gotSkinBlob(e.dataTransfer.files[0], store));
- }}
- >
-
-
-
-
- );
-}
-function App() {
- return (
- }>
- {window.location.pathname.includes("ready") ? : }
-
- );
-}
-
-export default App;
diff --git a/packages/webamp-modern/src/Dashboard.js b/packages/webamp-modern/src/Dashboard.js
deleted file mode 100644
index 255cd9de..00000000
--- a/packages/webamp-modern/src/Dashboard.js
+++ /dev/null
@@ -1,178 +0,0 @@
-import React from "react";
-import { objects } from "./maki-interpreter/objects";
-import snapshotString from "./__tests__/__snapshots__/objects.test.js.snap";
-import methodData from "../resources/maki-skin-data.json";
-
-const methodsSting =
- snapshotString["Maki classes Track unimplemented methods 1"];
-
-const unimplemented = new Set(
- methodsSting.substring(1, methodsSting.length - 2).split("\n")
-);
-
-const GREEN = "rgba(0, 255, 0, 0.2)";
-const RED = "rgba(255, 0, 0, 0.2)";
-
-let METHOD_COUNT = 0;
-let IMPLEMENTED_METHOD_COUNT = 0;
-
-const normalizedMethods = [];
-Object.keys(objects).forEach((key) => {
- const makiObject = objects[key];
- makiObject.functions.forEach((method) => {
- METHOD_COUNT++;
- const normalizedName = `${makiObject.name}.${method.name.toLowerCase()}`;
- const implemented = !unimplemented.has(normalizedName);
- if (implemented) {
- IMPLEMENTED_METHOD_COUNT++;
- }
- const foundInSkins = methodData.foundInSkins[normalizedName] || 0;
- const totalCalls = methodData.totalCalls[normalizedName] || 0;
- normalizedMethods.push({
- className: makiObject.name,
- totalCalls,
- foundInSkins,
- methodName: method.name,
- normalizedName,
- implemented,
- });
- });
-});
-
-const foundMethods = normalizedMethods.filter(
- (method) => method.foundInSkins > 0
-);
-
-function PercentBox({ number, total, label }) {
- const percent = total === 0 ? 1 : number / total;
-
- return (
-
-
- {Math.round(percent * 100)}%
-
-
-
-
- {label}
- {" "}
-
- ({number}/{total})
-
-
-
- );
-}
-
-export default function () {
- const [searchQuery, setSearchQuery] = React.useState("");
- const [sortKey, setSortKey] = React.useState("totalCalls");
- const [sortDirection, setSortDirection] = React.useState("ASC");
- function setOrToggleSort(key) {
- if (sortKey === key) {
- setSortDirection((dir) => (dir === "ASC" ? "DESC" : "ASC"));
- } else {
- setSortKey(key);
- }
- }
-
- const sortAscending = (a, b) => (b[sortKey] > a[sortKey] ? 1 : -1);
- const sortDecending = (a, b) => (b[sortKey] < a[sortKey] ? 1 : -1);
- const sortFunction = sortDirection === "ASC" ? sortAscending : sortDecending;
-
- let filterFunction = () => true;
- if (searchQuery) {
- const normalizedQuery = searchQuery.toLowerCase();
-
- filterFunction = (method) => {
- return method.normalizedName.toLowerCase().includes(normalizedQuery);
- };
- }
- return (
-
-
Are Modern Skins Ready Yet?
-
-
method.implemented).length}
- total={foundMethods.length}
- label="Used Methods"
- />
- setSearchQuery(e.target.value)}
- />
-
-
-
- | setOrToggleSort("implemented")}>Status |
- setOrToggleSort("className")}>Class |
- setOrToggleSort("methodName")}>Method Name |
- setOrToggleSort("foundInSkins")}>
- Found In Skins
- |
- setOrToggleSort("totalCalls")}>Total Calls |
-
-
-
- {normalizedMethods
- .sort(sortFunction)
- .filter(filterFunction)
- .map(
- ({
- className,
- methodName,
- foundInSkins,
- totalCalls,
- implemented,
- }) => {
- return (
-
- |
-
- |
- {className} |
- {methodName} |
- {foundInSkins} |
- {totalCalls} |
-
- );
- }
- )}
-
-
-
- );
-}
diff --git a/packages/webamp-modern/src/Emitter.ts b/packages/webamp-modern/src/Emitter.ts
deleted file mode 100644
index 49f29431..00000000
--- a/packages/webamp-modern/src/Emitter.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-// TODO: Merge with the Webamp emitter
-export default class Emitter {
- _hooks: { [eventName: string]: Array<(...args: any[]) => void> };
- _globalHooks: Array<(eventName: string, ...args: any[]) => void>;
- constructor() {
- this._hooks = {};
- // TODO: Rename this property
- this._globalHooks = [];
- }
-
- listen(eventName: string, cb: (...args: any[]) => void) {
- if (this._hooks[eventName] == null) {
- this._hooks[eventName] = [];
- }
- this._hooks[eventName].push(cb);
- return () => {
- this._hooks[eventName] = this._hooks[eventName].filter(
- (hookCb) => hookCb !== cb
- );
- };
- }
-
- trigger(eventName: string, ...args: any[]) {
- this._globalHooks.map((cb) => cb(eventName, ...args));
- if (this._hooks[eventName] == null) {
- return;
- }
- this._hooks[eventName].map((cb) => cb(...args));
- }
-
- listenToAll(cb: (eventName: string, ...args: any[]) => void) {
- this._globalHooks.push(cb);
- return () => {
- this._globalHooks = this._globalHooks.filter((hookCb) => hookCb !== cb);
- };
- }
-
- dispose() {
- // Note: This will cause any future trigger or hook to cause a runtime error.
- this._hooks = {};
- this._globalHooks = [];
- }
-}
diff --git a/packages/webamp-modern/src/MakiRenderer.js b/packages/webamp-modern/src/MakiRenderer.js
deleted file mode 100644
index 22f531e2..00000000
--- a/packages/webamp-modern/src/MakiRenderer.js
+++ /dev/null
@@ -1,585 +0,0 @@
-import React, { useEffect, useReducer } from "react";
-import "./App.css";
-import * as Utils from "./utils";
-
-function useJsUpdates(makiObject) {
- const [, forceUpdate] = useReducer((x) => x + 1, 0);
- useEffect(() => makiObject.js_listen("js_update", forceUpdate));
-}
-
-function handleMouseEventDispatch(makiObject, event, eventName) {
- event.stopPropagation();
-
- // In order to properly calculate the x/y coordinates like MAKI does we need
- // to find the container element and calculate based off of that
- const container = Utils.findParentOrCurrentNodeOfType(
- makiObject,
- new Set(["container"])
- );
- const clientX = event.clientX;
- const clientY = event.clientY;
- const x = clientX - (Number(container.attributes.x) || 0);
- const y = clientY - (Number(container.attributes.y) || 0);
- makiObject.js_trigger(eventName, x, y);
-
- if (event.nativeEvent.type === "mousedown") {
- // We need to persist the react event so we can access the target
- event.persist();
- document.addEventListener("mouseup", function globalMouseUp(ev) {
- document.removeEventListener("mouseup", globalMouseUp);
- // Create an object that looks and acts like an event, but has mixed
- // properties from original mousedown event and new mouseup event
- const fakeEvent = {
- target: event.target,
- clientX: ev.clientX,
- clientY: ev.clientY,
- nativeEvent: {
- type: "mouseup",
- },
- stopPropagation: ev.stopPropagation.bind(ev),
- };
- handleMouseEventDispatch(
- makiObject,
- fakeEvent,
- eventName === "onLeftButtonDown" ? "onLeftButtonUp" : "onRightButtonUp"
- );
- });
- }
-}
-
-function handleMouseButtonEventDispatch(
- makiObject,
- event,
- leftEventName,
- rightEventName
-) {
- handleMouseEventDispatch(
- makiObject,
- event,
- event.button === 2 ? rightEventName : leftEventName
- );
-}
-
-function GuiObjectEvents({ makiObject, children }) {
- const { alpha, ghost } = makiObject.attributes;
- if (!makiObject.isvisible()) {
- return null;
- }
-
- return (
-
- handleMouseButtonEventDispatch(
- makiObject,
- e,
- "onLeftButtonDown",
- "onRightButtonDown"
- )
- }
- onDoubleClick={(e) =>
- handleMouseButtonEventDispatch(
- makiObject,
- e,
- "onLeftButtonDblClk",
- "onRightButtonDblClk"
- )
- }
- onMouseMove={(e) =>
- handleMouseEventDispatch(makiObject, e, "onMouseMove")
- }
- onMouseEnter={(e) =>
- handleMouseEventDispatch(makiObject, e, "onEnterArea")
- }
- onMouseLeave={(e) =>
- handleMouseEventDispatch(makiObject, e, "onLeaveArea")
- }
- onDragEnter={() => makiObject.js_trigger("onDragEnter")}
- onDragLeave={() => makiObject.js_trigger("onDragLeave")}
- onDragOver={(e) => handleMouseEventDispatch(makiObject, e, "onDragOver")}
- onKeyUp={(e) => makiObject.js_trigger("onKeyUp", e.keyCode)}
- onKeyDown={(e) => makiObject.js_trigger("onKeyDown", e.keyCode)}
- onContextMenu={(e) => {
- e.preventDefault();
- return false;
- }}
- style={{
- opacity: alpha == null ? 1 : alpha / 255,
- pointerEvents: ghost ? "none" : null,
- }}
- >
- {children}
-
- );
-}
-
-function Container({ makiObject }) {
- const { id, default_x, default_y, default_visible } = makiObject.attributes;
-
- const style = {
- position: "absolute",
- };
- if (default_x !== undefined) {
- style.left = Number(default_x);
- }
- if (default_y !== undefined) {
- style.top = Number(default_y);
- }
- if (default_visible !== undefined) {
- style.display = default_visible ? "block" : "none";
- }
-
- const layout = makiObject.getcurlayout();
- if (layout == null) {
- return null;
- }
-
- return (
-
-
-
- );
-}
-
-function Layout({ makiObject }) {
- const {
- id,
- js_assets,
- background,
- // desktopalpha,
- drawBackground,
- x,
- y,
- w,
- h,
- minimum_h,
- maximum_h,
- minimum_w,
- maximum_w,
- // droptarget,
- } = makiObject.attributes;
- if (drawBackground && background == null) {
- console.warn("Got a Layout without a background. Rendering null", id);
- return null;
- }
-
- if (drawBackground) {
- const image = js_assets.background;
- if (image == null) {
- console.warn(
- "Unable to find image to render. Rendering null",
- background
- );
- return null;
- }
-
- return (
-
-
-
-
-
- );
- }
-
- const params = {};
- if (x !== undefined) {
- params.left = Number(x);
- }
- if (y !== undefined) {
- params.top = Number(y);
- }
- if (w !== undefined) {
- params.width = Number(w);
- params.overflow = "hidden";
- }
- if (h !== undefined) {
- params.height = Number(h);
- params.overflow = "hidden";
- }
-
- return (
-
-
-
-
-
- );
-}
-
-function Layer({ makiObject }) {
- const { id, js_assets, image, x, y, w, h } = makiObject.attributes;
- if (image == null) {
- console.warn("Got an Layer without an image. Rendering null", id);
- return null;
- }
- const img = js_assets.image;
- if (img == null) {
- console.warn("Unable to find image to render. Rendering null", image);
- return null;
- }
- const params = {};
- if (x !== undefined) {
- params.left = Number(x);
- }
- if (y !== undefined) {
- params.top = Number(y);
- }
- if (img.x !== undefined) {
- params.backgroundPositionX = -Number(img.x);
- }
- if (img.y !== undefined) {
- params.backgroundPositionY = -Number(img.y);
- }
- if (w !== undefined) {
- params.width = Number(w);
- } else if (img.w !== undefined) {
- params.width = Number(img.w);
- }
- if (h !== undefined) {
- params.height = Number(h);
- } else if (img.h !== undefined) {
- params.height = Number(img.h);
- }
- if (img.imgUrl !== undefined) {
- params.backgroundImage = `url(${img.imgUrl}`;
- }
- return (
-
-
-
-
-
- );
-}
-
-function animatedLayerOffsetAndSize(
- frameNum,
- frameSize,
- layerSize,
- imgSize,
- imgOffset
-) {
- let size, offset;
- if (frameSize !== undefined) {
- size = Number(frameSize);
- offset = -Number(frameSize) * frameNum;
- } else if (layerSize !== undefined) {
- size = Number(layerSize);
- offset = -Number(layerSize) * frameNum;
- } else {
- if (imgSize !== undefined) {
- size = Number(imgSize);
- }
- if (imgOffset !== undefined) {
- offset = -Number(imgOffset);
- }
- }
- return { offset, size };
-}
-
-function AnimatedLayer({ makiObject }) {
- const { id, js_assets, x, y, w, h, framewidth, frameheight } =
- makiObject.attributes;
- const img = js_assets.image;
- if (img == null) {
- console.warn("Got an AnimatedLayer without an image. Rendering null", id);
- return null;
- }
-
- const frameNum = makiObject.getcurframe();
-
- let style = {};
- if (x !== undefined) {
- style.left = Number(x);
- }
- if (y !== undefined) {
- style.top = Number(y);
- }
-
- const { offset: backgroundPositionX, size: width } =
- animatedLayerOffsetAndSize(frameNum, framewidth, w, img.w, img.x);
- const { offset: backgroundPositionY, size: height } =
- animatedLayerOffsetAndSize(frameNum, frameheight, h, img.h, img.y);
- style = { ...style, width, height, backgroundPositionX, backgroundPositionY };
-
- if (img.imgUrl !== undefined) {
- style.backgroundImage = `url(${img.imgUrl}`;
- }
-
- return (
-
-
-
-
-
- );
-}
-
-function Button({ makiObject }) {
- const {
- id,
- js_assets,
- // image,
- // action,
- x,
- y,
- downImage,
- tooltip,
- ghost,
- } = makiObject.attributes;
- const [down, setDown] = React.useState(false);
- // TODO: These seem to be switching too fast
- const img = down && downImage ? js_assets.downimage : js_assets.image;
- if (img == null) {
- console.warn("Got a Button without a img. Rendering null", id);
- return null;
- }
-
- return (
-
- {
- setDown(true);
- document.addEventListener("mouseup", () => {
- // TODO: This could be unmounted
- setDown(false);
- });
- }}
- onClick={(e) => {
- if (e.button === 2) {
- makiObject.js_trigger("onRightClick");
- } else {
- makiObject.js_trigger("onLeftClick");
- }
- }}
- title={tooltip}
- style={{
- position: "absolute",
- top: Number(y),
- left: Number(x),
- backgroundPositionX: -Number(img.x),
- backgroundPositionY: -Number(img.y),
- width: Number(img.w),
- height: Number(img.h),
- backgroundImage: `url(${img.imgUrl})`,
- pointerEvents: ghost ? "none" : null,
- }}
- >
-
-
-
- );
-}
-
-function Popupmenu({ makiObject }) {
- const { id, x, y } = makiObject.attributes;
-
- const children = makiObject.js_getCommands().map((item) => {
- if (item.id === "seperator") {
- return ;
- }
- return (
- {
- makiObject.js_selectCommand(item.id);
- }}
- >
- {item.name}
-
- );
- });
- // TODO: Actually properly style element
- return (
-
- );
-}
-
-function ToggleButton({ makiObject }) {
- return ;
-}
-
-function Group({ makiObject }) {
- const { id, x, y } = makiObject.attributes;
- const style = {
- position: "absolute",
- };
- if (x !== undefined) {
- style.left = Number(x);
- }
- if (y !== undefined) {
- style.top = Number(y);
- }
- return (
-
-
-
-
-
- );
-}
-
-function Text({ makiObject }) {
- const {
- id,
- display,
- // ticker,
- // antialias,
- x,
- y,
- w,
- h,
- font,
- fontsize,
- color,
- align,
- } = makiObject.attributes;
- const params = {};
- if (x !== undefined) {
- params.left = Number(x);
- }
- if (y !== undefined) {
- params.top = Number(y);
- }
- if (w !== undefined) {
- params.width = Number(w);
- }
- if (h !== undefined) {
- params.height = Number(h);
- }
- if (color !== undefined) {
- params.color = `rgb(${color})`;
- }
- if (fontsize !== undefined) {
- params.fontSize = `${fontsize}px`;
- }
- if (align !== undefined) {
- params.textAlign = align;
- }
- // display is actually a keyword that is looked up in some sort of map
- // e.g. songname, time
- const nodeText = display;
- let fontFamily;
- if (font) {
- const js_attributes = makiObject.js_fontLookup(font.toLowerCase());
- fontFamily = js_attributes == null ? null : js_attributes.fontFamily;
- }
- const style = {
- position: "absolute",
- userSelect: "none",
- MozUserSelect: "none",
- ...params,
- fontFamily,
- };
-
- return (
-
-
- {nodeText}
-
-
-
- );
-}
-
-const NODE_NAME_TO_COMPONENT = {
- container: Container,
- layout: Layout,
- layer: Layer,
- button: Button,
- togglebutton: ToggleButton,
- group: Group,
- popupmenu: Popupmenu,
- text: Text,
- animatedlayer: AnimatedLayer,
-};
-
-function DummyComponent({ makiObject }) {
- console.warn("Unknown makiObject type", makiObject.name);
- return ;
-}
-
-function MakiChildren({ makiObject }) {
- return makiObject
- .js_getChildren()
- .map((childMakiObject, i) => );
-}
-
-// Given a Maki object, pick which component to use, and render it.
-export const Maki = React.memo(({ makiObject }) => {
- useJsUpdates(makiObject);
- let { name } = makiObject;
- if (name == null) {
- // name is null is likely a comment
- return null;
- }
- name = name.toLowerCase();
-
- if (
- name === "groupdef" ||
- name === "elements" ||
- name === "gammaset" ||
- name === "scripts" ||
- name === "script" ||
- name === "skininfo"
- ) {
- // these nodes dont need to be rendered
- return null;
- }
- const Component = NODE_NAME_TO_COMPONENT[name] || DummyComponent;
- return ;
-});
diff --git a/packages/webamp-modern/src/Selectors.ts b/packages/webamp-modern/src/Selectors.ts
deleted file mode 100644
index 89de911f..00000000
--- a/packages/webamp-modern/src/Selectors.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { ModernAppState, MakiTree } from "./types";
-
-export function getMakiTree(state: ModernAppState): MakiTree | null {
- return state.modernSkin.makiTree;
-}
-
-export function getVolume(state: ModernAppState): number {
- return state.modernSkin.volume;
-}
-
-export function getRightVUMeter(state: ModernAppState): number {
- return state.modernSkin.rightVUMeter;
-}
-
-export function getLeftVUMeter(state: ModernAppState): number {
- return state.modernSkin.leftVUMeter;
-}
diff --git a/packages/webamp-modern-2/src/UIRoot.ts b/packages/webamp-modern/src/UIRoot.ts
similarity index 94%
rename from packages/webamp-modern-2/src/UIRoot.ts
rename to packages/webamp-modern/src/UIRoot.ts
index 05701d1a..872196be 100644
--- a/packages/webamp-modern-2/src/UIRoot.ts
+++ b/packages/webamp-modern/src/UIRoot.ts
@@ -275,6 +275,27 @@ export class UIRoot {
return found ?? null;
}
+ loadTrueTypeFonts() {
+ const cssRules = [];
+ const truetypeFonts: TrueTypeFont[] = this._fonts.filter(
+ (font) => font instanceof TrueTypeFont
+ ) as TrueTypeFont[];
+ for (const ttf of truetypeFonts) {
+ if(!ttf.hasUrl()) {
+ continue; // some dummy ttf (eg Arial) doesn't has url.
+ }
+ // src: url(data:font/truetype;charset=utf-8;base64,${ttf.getBase64()}) format('truetype');
+ cssRules.push(`@font-face {
+ font-family: '${ttf.getId()}';
+ src: url(${ttf.getBase64()}) format('truetype');
+ font-weight: normal;
+ font-style: normal;
+ }`)
+ }
+ const cssEl = document.getElementById("truetypefont-css");
+ cssEl.textContent = cssRules.join("\n");
+ }
+
dispatch(action: string, param: string | null, actionTarget: string | null) {
switch (action.toLowerCase()) {
case "play":
diff --git a/packages/webamp-modern/src/__tests__/__snapshots__/objects.test.js.snap b/packages/webamp-modern/src/__tests__/__snapshots__/objects.test.js.snap
deleted file mode 100644
index 774ea283..00000000
--- a/packages/webamp-modern/src/__tests__/__snapshots__/objects.test.js.snap
+++ /dev/null
@@ -1,604 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Maki classes Track unimplemented methods 1`] = `
-"System.getparam
-System.getskinname
-System.getplayitemstring
-System.geteq
-System.geteqband
-System.geteqpreamp
-System.getstatus
-System.messagebox
-System.getplayitemlength
-System.seekto
-System.newdynamiccontainer
-System.newgroup
-System.newgroupaslayout
-System.getnumcontainers
-System.enumcontainer
-System.getwac
-System.getplayitemmetadatastring
-System.getplayitemdisplaytitle
-System.getextfamily
-System.playfile
-System.play
-System.stop
-System.pause
-System.next
-System.previous
-System.eject
-System.getposition
-System.seteqband
-System.seteqpreamp
-System.seteq
-System.removepath
-System.getpath
-System.getextension
-System.setpublicstring
-System.setpublicint
-System.getpublicstring
-System.getpublicint
-System.getviewportwidthfrompoint
-System.getviewportheightfrompoint
-System.getviewportleft
-System.getviewportleftfrompoint
-System.getviewporttop
-System.getviewporttopfrompoint
-System.debugstring
-System.ddesend
-System.onlookforcomponent
-System.getcurappleft
-System.getcurapptop
-System.getcurappwidth
-System.getcurappheight
-System.isappactive
-System.switchskin
-System.isloadingskin
-System.lockui
-System.unlockui
-System.getmainbrowser
-System.popmainbrowser
-System.navigateurl
-System.isobjectvalid
-System.setmenutransparency
-System.ongetcancelcomponent
-System.iskeydown
-System.setclipboardtext
-System.selectfile
-System.systemmenu
-System.windowmenu
-System.triggeraction
-System.showwindow
-System.hidewindow
-System.hidenamedwindow
-System.isnamedwindowvisible
-System.setatom
-System.getatom
-System.invokedebugger
-System.isvideo
-System.isvideofullscreen
-System.getidealvideowidth
-System.getidealvideoheight
-System.isminimized
-System.minimizeapplication
-System.restoreapplication
-System.activateapplication
-System.getplaylistlength
-System.getplaylistindex
-System.isdesktopalphaavailable
-System.istransparencyavailable
-System.getsonginfotext
-System.getvisband
-System.onviewportchanged
-System.onurlchange
-System.oneqfreqchanged
-System.enumembedguid
-System.getmetadatastring
-System.getcurrenttrackrating
-System.oncurrenttrackrated
-System.setcurrenttrackrating
-System.getdecodername
-System.getalbumart
-System.downloadmedia
-System.downloadurl
-System.ondownloadfinished
-System.getdownloadpath
-System.setdownloadpath
-System.enqueuefile
-System.urldecode
-System.parseatf
-System.log10
-System.ln
-System.getviewportwidthfromguiobject
-System.getmonitorwidth
-System.getmonitorwidthfrompoint
-System.getmonitorwidthfromguiobject
-System.onmousemove
-System.getviewportheightfromguiobject
-System.getmonitorheight
-System.getmonitorheightfrompoint
-System.getmonitorheightfromguiobject
-System.getmonitorleft
-System.getmonitorleftfromguiobject
-System.getmonitorleftfrompoint
-System.getmonitortop
-System.getmonitortopfromguiobject
-System.getmonitortopfrompoint
-System.getviewportleftfromguiobject
-System.getviewporttopfromguiobject
-System.navigateurlbrowser
-System.onopenurl
-System.translate
-System.getstring
-System.getlanguageid
-System.selectfolder
-System.hasvideosupport
-System.clearplaylist
-System.getsonginfotexttranslated
-System.iswa2componentvisible
-System.hidewa2component
-System.isproversion
-System.getwinampversion
-System.getbuildnumber
-System.getfilesize
-Wac.getguid
-Wac.getname
-Wac.sendcommand
-Wac.show
-Wac.hide
-Wac.isvisible
-Wac.onnotify
-Wac.setstatusbar
-Wac.getstatusbar
-Map.loadmap
-Map.getwidth
-Map.getheight
-Map.getvalue
-Map.inregion
-Map.getregion
-Map.getargbvalue
-Region.loadfrommap
-Region.offset
-Region.add
-Region.sub
-Region.stretch
-Region.copy
-Region.loadfrombitmap
-Region.getboundingboxx
-Region.getboundingboxy
-Region.getboundingboxw
-Region.getboundingboxh
-Timer.getskipped
-Group.getnumobjects
-Group.enumobject
-Group.islayout
-GuiObject.getalpha
-GuiObject.setenabled
-GuiObject.getenabled
-GuiObject.ismouseover
-GuiObject.reversetarget
-GuiObject.isgoingtotarget
-GuiObject.bringtofront
-GuiObject.bringtoback
-GuiObject.bringabove
-GuiObject.bringbelow
-GuiObject.getguix
-GuiObject.getguiy
-GuiObject.getguiw
-GuiObject.getguih
-GuiObject.getguirelatx
-GuiObject.getguirelaty
-GuiObject.getguirelatw
-GuiObject.getguirelath
-GuiObject.isactive
-GuiObject.gettopparent
-GuiObject.runmodal
-GuiObject.endmodal
-GuiObject.findobjectxy
-GuiObject.getname
-GuiObject.clienttoscreenx
-GuiObject.clienttoscreeny
-GuiObject.clienttoscreenw
-GuiObject.clienttoscreenh
-GuiObject.screentoclientx
-GuiObject.screentoclienty
-GuiObject.screentoclientw
-GuiObject.screentoclienth
-GuiObject.getautowidth
-GuiObject.getautoheight
-GuiObject.setfocus
-GuiObject.ismouseoverrect
-GuiObject.getinterface
-GuiObject.sendaction
-GuiObject.onaction
-GuiObject.onmousewheelup
-GuiObject.onmousewheeldown
-GuiObject.ondragenter
-GuiObject.ondragover
-GuiObject.ondragleave
-Button.setactivated
-Button.getactivated
-Button.setactivatednocallback
-AnimatedLayer.ispaused
-AnimatedLayer.isstopped
-AnimatedLayer.getdirection
-AnimatedLayer.setrealtime
-ToggleButton.getcurcfgval
-PopupMenu.checkcommand
-PopupMenu.addsubmenu
-PopupMenu.popatxy
-PopupMenu.getnumcommands
-PopupMenu.disablecommand
-Container.getnumlayouts
-Container.enumlayout
-Container.switchtolayout
-Container.close
-Container.toggle
-Container.isdynamic
-Container.setname
-Container.getcurlayout
-Container.getname
-Container.getguid
-Container.onaddcontent
-Layout.getscale
-Layout.setscale
-Layout.setdesktopalpha
-Layout.getdesktopalpha
-Layout.center
-Layout.snapadjust
-Layout.getsnapadjusttop
-Layout.getsnapadjustright
-Layout.getsnapadjustleft
-Layout.getsnapadjustbottom
-Layout.setredrawonresize
-Layout.beforeredock
-Layout.redock
-Layout.istransparencysafe
-Layout.islayoutanimationsafe
-List.finditem2
-Layer.setregion
-Layer.setregionfrommap
-Layer.fx_oninit
-Layer.fx_onframe
-Layer.fx_ongetpixelr
-Layer.fx_ongetpixeld
-Layer.fx_ongetpixelx
-Layer.fx_ongetpixely
-Layer.fx_ongetpixela
-Layer.fx_setenabled
-Layer.fx_getenabled
-Layer.fx_setwrap
-Layer.fx_getwrap
-Layer.fx_setrect
-Layer.fx_getrect
-Layer.fx_setbgfx
-Layer.fx_getbgfx
-Layer.fx_setclear
-Layer.fx_getclear
-Layer.fx_setspeed
-Layer.fx_getspeed
-Layer.fx_setrealtime
-Layer.fx_getrealtime
-Layer.fx_setlocalized
-Layer.fx_getlocalized
-Layer.fx_setbilinear
-Layer.fx_getbilinear
-Layer.fx_setalphamode
-Layer.fx_getalphamode
-Layer.fx_setgridsize
-Layer.fx_update
-Layer.fx_restart
-Layer.isinvalid
-Text.setalternatetext
-Text.settext
-Text.gettext
-Text.gettextwidth
-WindowHolder.getguid
-WindowHolder.getwac
-WindowHolder.setregionfrommap
-WindowHolder.setregion
-WindowHolder.setacceptwac
-WindowHolder.getcontent
-WindowHolder.getcomponentname
-ComponentBucket.getmaxheight
-ComponentBucket.getmaxwidth
-ComponentBucket.setscroll
-ComponentBucket.getscroll
-ComponentBucket.getnumchildren
-ComponentBucket.enumchildren
-Edit.settext
-Edit.setautoenter
-Edit.getautoenter
-Edit.gettext
-Edit.selectall
-Edit.enter
-Edit.setidleenabled
-Edit.getidleenabled
-Slider.getposition
-Slider.setposition
-Slider.lock
-Slider.unlock
-Vis.setmode
-Vis.setrealtime
-Vis.getrealtime
-Vis.getmode
-Vis.nextmode
-Browser.navigateurl
-Browser.back
-Browser.forward
-Browser.stop
-Browser.refresh
-Browser.home
-Browser.settargetname
-Browser.ondocumentready
-Browser.getdocumenttitle
-Browser.onnavigateerror
-Browser.setcancelieerrorpage
-Browser.scrape
-Browser.onmedialink
-GroupList.instantiate
-GroupList.getnumitems
-GroupList.enumitem
-GroupList.removeall
-GroupList.scrolltopercent
-GroupList.setredraw
-CfgGroup.cfggetint
-CfgGroup.cfgsetint
-CfgGroup.cfggetstring
-CfgGroup.cfggetfloat
-CfgGroup.cfgsetfloat
-CfgGroup.cfgsetstring
-CfgGroup.cfggetguid
-CfgGroup.cfggetname
-MouseRedir.setredirection
-MouseRedir.getredirection
-MouseRedir.setregionfrommap
-MouseRedir.setregion
-DropDownList.getitemselected
-DropDownList.setlistheight
-DropDownList.openlist
-DropDownList.closelist
-DropDownList.setitems
-DropDownList.additem
-DropDownList.delitem
-DropDownList.finditem
-DropDownList.getnumitems
-DropDownList.selectitem
-DropDownList.getitemtext
-DropDownList.getselected
-DropDownList.getselectedtext
-DropDownList.getcustomtext
-DropDownList.deleteallitems
-DropDownList.setnoitemtext
-LayoutStatus.callme
-TabSheet.getcurpage
-TabSheet.setcurpage
-GuiList.getnumitems
-GuiList.getwantautodeselect
-GuiList.setwantautodeselect
-GuiList.setautosort
-GuiList.next
-GuiList.selectcurrent
-GuiList.selectfirstentry
-GuiList.previous
-GuiList.pagedown
-GuiList.pageup
-GuiList.home
-GuiList.end
-GuiList.reset
-GuiList.addcolumn
-GuiList.getnumcolumns
-GuiList.getcolumnwidth
-GuiList.setcolumnwidth
-GuiList.getcolumnlabel
-GuiList.setcolumnlabel
-GuiList.getcolumnnumeric
-GuiList.setcolumndynamic
-GuiList.iscolumndynamic
-GuiList.setminimumsize
-GuiList.additem
-GuiList.insertitem
-GuiList.getlastaddeditempos
-GuiList.setsubitem
-GuiList.deleteallitems
-GuiList.deletebypos
-GuiList.getitemlabel
-GuiList.setitemlabel
-GuiList.getitemselected
-GuiList.isitemfocused
-GuiList.getitemfocused
-GuiList.setitemfocused
-GuiList.ensureitemvisible
-GuiList.invalidatecolumns
-GuiList.scrollabsolute
-GuiList.scrollrelative
-GuiList.scrollleft
-GuiList.scrollright
-GuiList.scrollup
-GuiList.scrolldown
-GuiList.getsubitemtext
-GuiList.getfirstitemselected
-GuiList.getnextitemselected
-GuiList.selectall
-GuiList.deselectall
-GuiList.invertselection
-GuiList.invalidateitem
-GuiList.getfirstitemvisible
-GuiList.getlastitemvisible
-GuiList.setfontsize
-GuiList.getfontsize
-GuiList.jumptonext
-GuiList.scrolltoitem
-GuiList.resort
-GuiList.getsortdirection
-GuiList.getsortcolumn
-GuiList.setsortcolumn
-GuiList.setsortdirection
-GuiList.getitemcount
-GuiList.setselectionstart
-GuiList.setselectionend
-GuiList.setselected
-GuiList.toggleselection
-GuiList.getheaderheight
-GuiList.getpreventmultipleselection
-GuiList.setpreventmultipleselection
-GuiList.moveitem
-GuiList.onrightclick
-GuiList.oncolumndblclick
-GuiList.oncolumnlabelclick
-GuiList.setitemicon
-GuiList.getitemicon
-GuiList.setshowicons
-GuiList.getshowicons
-GuiList.seticonwidth
-GuiList.seticonheight
-GuiList.geticonwidth
-GuiList.geticonheight
-GuiList.oniconleftclick
-GuiTree.onwantautocontextmenu
-GuiTree.onmousewheelup
-GuiTree.onmousewheeldown
-GuiTree.oncontextmenu
-GuiTree.onchar
-GuiTree.getnumrootitems
-GuiTree.enumrootitem
-GuiTree.jumptonext
-GuiTree.ensureitemvisible
-GuiTree.getcontentswidth
-GuiTree.getcontentsheight
-GuiTree.addtreeitem
-GuiTree.removetreeitem
-GuiTree.movetreeitem
-GuiTree.deleteallitems
-GuiTree.expanditem
-GuiTree.expanditemdeferred
-GuiTree.collapseitem
-GuiTree.collapseitemdeferred
-GuiTree.selectitem
-GuiTree.selectitemdeferred
-GuiTree.delitemdeferred
-GuiTree.hiliteitem
-GuiTree.unhiliteitem
-GuiTree.getcuritem
-GuiTree.hittest
-GuiTree.edititemlabel
-GuiTree.canceleditlabel
-GuiTree.setautoedit
-GuiTree.getautoedit
-GuiTree.getbylabel
-GuiTree.setsorted
-GuiTree.getsorted
-GuiTree.sorttreeitems
-GuiTree.getsibling
-GuiTree.setautocollapse
-GuiTree.setfontsize
-GuiTree.getfontsize
-GuiTree.getnumvisiblechilditems
-GuiTree.getnumvisibleitems
-GuiTree.enumvisibleitems
-GuiTree.enumvisiblechilditems
-GuiTree.enumallitems
-GuiTree.getitemrectx
-GuiTree.getitemrecty
-GuiTree.getitemrectw
-GuiTree.getitemrecth
-GuiTree.getitemfrompoint
-TreeItem.getnumchildren
-TreeItem.setlabel
-TreeItem.getlabel
-TreeItem.ensurevisible
-TreeItem.getnthchild
-TreeItem.getchild
-TreeItem.getchildsibling
-TreeItem.getsibling
-TreeItem.getparent
-TreeItem.editlabel
-TreeItem.hassubitems
-TreeItem.setsorted
-TreeItem.setchildtab
-TreeItem.issorted
-TreeItem.iscollapsed
-TreeItem.isexpanded
-TreeItem.invalidate
-TreeItem.isselected
-TreeItem.ishilited
-TreeItem.sethilited
-TreeItem.collapse
-TreeItem.expand
-TreeItem.gettree
-MenuButton.openmenu
-MenuButton.closemenu
-CheckBox.setchecked
-CheckBox.ischecked
-CheckBox.settext
-CheckBox.gettext
-Config.newitem
-Config.getitem
-Config.getitembyguid
-ConfigItem.getattribute
-ConfigItem.newattribute
-ConfigItem.getguid
-ConfigItem.getname
-ConfigAttribute.setdata
-ConfigAttribute.getdata
-ConfigAttribute.getparentitem
-ConfigAttribute.getattributename
-PlDir.showcurrentlyplayingentry
-PlDir.getnumitems
-PlDir.getitemname
-PlDir.refresh
-PlDir.renameitem
-PlDir.enqueueitem
-PlDir.playitem
-FeedWatcher.setfeed
-FeedWatcher.releasefeed
-FeedWatcher.onfeedchange
-Form.getcontentsheight
-Form.newcell
-Form.nextrow
-Form.deleteall
-Frame.getposition
-Frame.setposition
-Frame.onsetposition
-PlEdit.getnumtracks
-PlEdit.getcurrentindex
-PlEdit.getnumselectedtracks
-PlEdit.getnextselectedtrack
-PlEdit.showcurrentlyplayingtrack
-PlEdit.showtrack
-PlEdit.enqueuefile
-PlEdit.clear
-PlEdit.removetrack
-PlEdit.swaptracks
-PlEdit.moveup
-PlEdit.movedown
-PlEdit.moveto
-PlEdit.playtrack
-PlEdit.getrating
-PlEdit.setrating
-PlEdit.gettitle
-PlEdit.getlength
-PlEdit.getmetadata
-PlEdit.getfilename
-PlEdit.onpleditmodified
-AlbumArtLayer.refresh
-AlbumArtLayer.isloading
-AlbumArtLayer.onalbumartloaded
-BitList.getitem
-BitList.setitem
-BitList.setsize
-BitList.getsize
-Menu.setmenugroup
-Menu.getmenugroup
-Menu.setmenu
-Menu.getmenu
-Menu.spawnmenu
-Menu.cancelmenu
-Menu.setnormalid
-Menu.setdownid
-Menu.sethoverid
-Menu.onopenmenu
-Menu.onclosemenu
-Menu.nextmenu
-Menu.previousmenu"
-`;
diff --git a/packages/webamp-modern/src/__tests__/__snapshots__/utils.test.js.snap b/packages/webamp-modern/src/__tests__/__snapshots__/utils.test.js.snap
deleted file mode 100644
index 2ddf32ae..00000000
--- a/packages/webamp-modern/src/__tests__/__snapshots__/utils.test.js.snap
+++ /dev/null
@@ -1,4152 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`inlineIncludes inlines the contents of included files as children of the include node 1`] = `
-Object {
- "children": Array [
- Object {
- "attributes": Object {
- "version": "1.35",
- },
- "children": Array [
- Object {
- "children": Array [
- Object {
- "children": Array [
- Object {
- "text": "1.0",
- "type": "text",
- },
- ],
- "name": "version",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "text": "CornerAmp Redux",
- "type": "text",
- },
- ],
- "name": "name",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "text": "9 of Nine, Evil Pumpkin, RazorZero",
- "type": "text",
- },
- ],
- "name": "author",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "text": "Updated for Winamp 5 by Ariszló",
- "type": "text",
- },
- ],
- "name": "comment",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "text": "ariszlo@gmail.com",
- "type": "text",
- },
- ],
- "name": "email",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "text": "http://ariszlo.deviantart.com",
- "type": "text",
- },
- ],
- "name": "homepage",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "text": "skinshot.png",
- "type": "text",
- },
- ],
- "name": "screenshot",
- "type": "element",
- },
- ],
- "name": "skininfo",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "comment": " Right-Click Menu ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Backgrounds",
- "id": "wasabi.popupmenu.background.selected",
- "value": "67,67,77",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "comment": " Generic Trees ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Display Fonts",
- "id": "wasabi.tree.text",
- "value": "196,255,196",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "comment": " Generic Lists ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Display Fonts",
- "id": "wasabi.list.text",
- "value": "196,255,196",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Display Backgrounds",
- "id": "wasabi.list.background",
- "value": "0,0,0",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Text",
- "id": "wasabi.list.text.selected",
- "value": "255,255,255",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Text Backgrounds",
- "id": "wasabi.list.text.selected.background",
- "value": "0,0,128",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Text",
- "id": "wasabi.list.text.current",
- "value": "255,255,255",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Backgrounds",
- "id": "wasabi.list.column.background",
- "value": "102,102,102",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Backgrounds",
- "id": "wasabi.list.column.frame.top",
- "value": "192,192,192",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Backgrounds",
- "id": "wasabi.list.column.frame.middle",
- "value": "128,128,128",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Backgrounds",
- "id": "wasabi.list.column.frame.bottom",
- "value": "64,64,64",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Backgrounds",
- "id": "wasabi.list.column.empty",
- "value": "64,64,64",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Text",
- "id": "wasabi.list.column.separator",
- "value": "128,128,128",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "comment": " edit wnds ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Backgrounds",
- "id": "wasabi.window.background",
- "value": "128,128,128",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Text",
- "id": "wasabi.window.text",
- "value": "255,255,255",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Backgrounds",
- "id": "wasabi.border.sunken",
- "value": "192,192,192",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Backgrounds",
- "id": "wasabi.scrollbar.foreground",
- "value": "128,128,128",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Backgrounds",
- "id": "wasabi.scrollbar.background",
- "value": "128,128,128",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Backgrounds",
- "id": "wasabi.scrollbar.foreground.inverted",
- "value": "128,128,128",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Backgrounds",
- "id": "wasabi.scrollbar.background.inverted",
- "value": "128,128,128",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "comment": " Item Lists, Lists with playable items ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Display Fonts",
- "id": "wasabi.itemlist.outline.current",
- "value": "255,255,0",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Display Fonts",
- "id": "wasabi.itemlist.outline.focus",
- "value": "0,128,128",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Text Backgrounds",
- "id": "wasabi.itemlist.selborder",
- "value": "64,64,196",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "comment": " Buttons ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Button Fonts",
- "id": "wasabi.button.text",
- "value": "0,0,0",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Button Fonts",
- "id": "wasabi.button.hiliteText",
- "value": "255,255,255",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Button Fonts",
- "id": "wasabi.button.dimmedText",
- "value": "64,64,64",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "comment": " Components ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Titlebar Font",
- "id": "wasabi.component.title.foreground",
- "value": "255,255,255",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "comment": " Tabsheet ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Text",
- "id": "wasabi.tabsheet.activetext",
- "value": "255,255,255",
- },
- "name": "color",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "gammagroup": "Text",
- "id": "wasabi.tabsheet.inactivetext",
- "value": "200,200,200",
- },
- "name": "color",
- "type": "element",
- },
- ],
- "name": "elements",
- "type": "element",
- },
- Object {
- "comment": " =======================================================================================================
-
- This file implements the following objects :
-
- - Wasabi:StandardFrame:Status
- - Wasabi:StandardFrame:NoStatus
- - Wasabi:StandardFrame:Modal
- - Wasabi:StandardFrame:Static
-
- Available parameters :
-
- padtitleleft : resizes the title from the left by the specified amount of pixels
- padtitleright : resizes the title from the right by the specified amount of pixels
- content : tells the object which group to instantiate in its client area
-
-======================================================================================================== ",
- "type": "comment",
- },
- Object {
- "children": Array [
- Object {
- "comment": " Base Texture ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "file": "window/background.png",
- "gammagroup": "Backgrounds",
- "id": "wasabi.basetexture",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "comment": " Studio Buttons ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "2",
- "id": "wasabi.button.top.left",
- "w": "2",
- "x": "0",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "2",
- "id": "wasabi.button.top",
- "w": "25",
- "x": "3",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "2",
- "id": "wasabi.button.top.right",
- "w": "2",
- "x": "29",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "25",
- "id": "wasabi.button.left",
- "w": "2",
- "x": "0",
- "y": "3",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "25",
- "id": "wasabi.button.center",
- "w": "25",
- "x": "3",
- "y": "3",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "25",
- "id": "wasabi.button.right",
- "w": "2",
- "x": "29",
- "y": "3",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "2",
- "id": "wasabi.button.bottom.left",
- "w": "2",
- "x": "0",
- "y": "29",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "2",
- "id": "wasabi.button.bottom",
- "w": "25",
- "x": "3",
- "y": "29",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "2",
- "id": "wasabi.button.bottom.right",
- "w": "2",
- "x": "29",
- "y": "29",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "2",
- "id": "wasabi.button.pressed.top.left",
- "w": "2",
- "x": "32",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "2",
- "id": "wasabi.button.pressed.top",
- "w": "25",
- "x": "35",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "2",
- "id": "wasabi.button.pressed.top.right",
- "w": "2",
- "x": "61",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "25",
- "id": "wasabi.button.pressed.left",
- "w": "2",
- "x": "32",
- "y": "3",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "25",
- "id": "wasabi.button.pressed.center",
- "w": "25",
- "x": "35",
- "y": "3",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "25",
- "id": "wasabi.button.pressed.right",
- "w": "2",
- "x": "61",
- "y": "3",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "2",
- "id": "wasabi.button.pressed.bottom.left",
- "w": "2",
- "x": "32",
- "y": "29",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "2",
- "id": "wasabi.button.pressed.bottom",
- "w": "25",
- "x": "35",
- "y": "29",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "2",
- "id": "wasabi.button.pressed.bottom.right",
- "w": "2",
- "x": "61",
- "y": "29",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "comment": " wasabi.button.middle = wasabi.button.center ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "25",
- "id": "wasabi.button.middle",
- "w": "25",
- "x": "3",
- "y": "3",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Buttons",
- "h": "25",
- "id": "wasabi.button.pressed.middle",
- "w": "25",
- "x": "35",
- "y": "3",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "comment": " Scaler ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "file": "window/studio-elements.png",
- "gammagroup": "Backgrounds",
- "h": "12",
- "id": "wasabi.frame.resizer",
- "w": "12",
- "x": "64",
- "y": "19",
- },
- "name": "bitmap",
- "type": "element",
- },
- ],
- "name": "elements",
- "type": "element",
- },
- Object {
- "comment": " =======================================================================================================
-
- This group serves as a template for all the Wasabi:StandardFrame objects
-
-======================================================================================================== ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "id": "wasabi.frame.layout",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "id": "window.top.left",
- "image": "wasabi.frame.top.left",
- "resize": "topleft",
- "x": "0",
- "y": "0",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.top",
- "image": "wasabi.frame.top",
- "relatw": "1",
- "resize": "top",
- "w": "-30",
- "x": "15",
- "y": "0",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.top.right",
- "image": "wasabi.frame.top.right",
- "relatx": "1",
- "resize": "topright",
- "x": "-15",
- "y": "0",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "h": "0",
- "id": "window.left",
- "image": "wasabi.frame.left",
- "relath": "1",
- "resize": "left",
- "x": "0",
- "y": "15",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "h": "0",
- "id": "window.right",
- "image": "wasabi.frame.right",
- "relath": "1",
- "relatx": "1",
- "resize": "right",
- "x": "-5",
- "y": "15",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "h": "-10",
- "id": "window.resize.disabler",
- "relath": "1",
- "relatw": "1",
- "w": "-10",
- "x": "5",
- "y": "5",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "bg": "0",
- "h": "9",
- "id": "sysmenu.status",
- "includeonly": "{system}",
- "w": "14",
- "x": "5",
- "y": "3",
- },
- "name": "LayoutStatus",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "target": "sysmenu.status",
- },
- "name": "hideobject",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "sysmenu",
- "activeAlpha": "0",
- "downImage": "wasabi.button.sysmenu",
- "id": "mainmenu.inactive",
- "image": "wasabi.button.sysmenu.pressed",
- "tooltip": "Main Menu",
- "x": "5",
- "y": "3",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "sysmenu",
- "downImage": "wasabi.button.sysmenu.pressed",
- "id": "mainmenu",
- "image": "wasabi.button.sysmenu",
- "inactiveAlpha": "0",
- "tooltip": "Main Menu",
- "x": "5",
- "y": "3",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "CLOSE",
- "activeAlpha": "0",
- "downImage": "wasabi.button.close",
- "id": "Close.inactive",
- "image": "wasabi.button.close.pressed",
- "relatx": "1",
- "tooltip": "Close Window",
- "x": "-18",
- "y": "3",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "CLOSE",
- "downImage": "wasabi.button.close.pressed",
- "id": "Close",
- "image": "wasabi.button.close",
- "inactiveAlpha": "0",
- "relatx": "1",
- "tooltip": "Close Window",
- "x": "-18",
- "y": "3",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "h": "11",
- "id": "wasabi.titlebar",
- "relatw": "1",
- "w": "-42",
- "x": "22",
- "y": "2",
- },
- "name": "Wasabi:TitleBar",
- "type": "element",
- },
- ],
- "name": "groupdef",
- "type": "element",
- },
- Object {
- "comment": " =======================================================================================================
-
- implementation
-
-======================================================================================================== ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "background": "wasabi.frame.basetexture",
- "id": "wasabi.standardframe.statusbar",
- "sysregion": "1",
- "xuitag": "Wasabi:StandardFrame:Status",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "h": "-21",
- "id": "wasabi.frame.layout",
- "relath": "1",
- "relatw": "1",
- "w": "0",
- "x": "0",
- "y": "0",
- },
- "name": "group",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.bottom.left.top",
- "image": "wasabi.frame.bottom.left.top",
- "relaty": "1",
- "resize": "bottomleft",
- "x": "0",
- "y": "-21",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "h": "17",
- "id": "window.bottom.left",
- "image": "wasabi.frame.bottom.left",
- "relaty": "1",
- "resize": "bottomleft",
- "x": "0",
- "y": "-19",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.bottom.left.bottom",
- "image": "wasabi.frame.bottom.left.bottom",
- "relaty": "1",
- "resize": "bottomleft",
- "x": "0",
- "y": "-2",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.bottom.top",
- "image": "wasabi.frame.bottom.top",
- "relatw": "1",
- "relaty": "1",
- "w": "-30",
- "x": "15",
- "y": "-21",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "h": "17",
- "id": "window.bottom",
- "image": "wasabi.frame.bottom",
- "relatw": "1",
- "relaty": "1",
- "resize": "bottom",
- "w": "-30",
- "x": "15",
- "y": "-19",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.bottom.bottom",
- "image": "wasabi.frame.bottom.bottom",
- "relatw": "1",
- "relaty": "1",
- "resize": "bottom",
- "w": "-30",
- "x": "15",
- "y": "-2",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.bottom.right.top",
- "image": "wasabi.frame.bottom.right.top",
- "relatx": "1",
- "relaty": "1",
- "resize": "bottomright",
- "x": "-15",
- "y": "-21",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "h": "17",
- "id": "window.bottom.right",
- "image": "wasabi.frame.bottom.right",
- "relatx": "1",
- "relaty": "1",
- "resize": "bottomright",
- "x": "-15",
- "y": "-19",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.bottom.right.bottom",
- "image": "wasabi.frame.bottom.right.bottom",
- "relatx": "1",
- "relaty": "1",
- "resize": "bottomright",
- "x": "-15",
- "y": "-2",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.resizer",
- "image": "wasabi.frame.resizer",
- "relatx": "1",
- "relaty": "1",
- "resize": "bottomright",
- "scale": "bottomright",
- "x": "-16",
- "y": "-16",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "exclude": "{system}",
- "h": "17",
- "id": "standardframe.layoutstatus",
- "relatw": "1",
- "relaty": "1",
- "w": "-23",
- "x": "4",
- "y": "-19",
- },
- "name": "LayoutStatus",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "scripts/standardframe.maki",
- "id": "standardframe.script",
- "param": "5,15,-10,-36,0,0,1,1",
- },
- "name": "script",
- "type": "element",
- },
- ],
- "name": "groupdef",
- "type": "element",
- },
- Object {
- "comment": " =======================================================================================================
-
- implementation
-
-======================================================================================================== ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "background": "wasabi.frame.basetexture",
- "id": "wasabi.standardframe.nostatusbar",
- "sysregion": "1",
- "xuitag": "Wasabi:StandardFrame:NoStatus",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "h": "-5",
- "id": "wasabi.frame.layout",
- "relath": "1",
- "relatw": "1",
- "w": "0",
- "x": "0",
- "y": "0",
- },
- "name": "group",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.bottom.left.top",
- "image": "wasabi.frame.bottom.left.top",
- "relaty": "1",
- "resize": "bottomleft",
- "x": "0",
- "y": "-5",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "h": "1",
- "id": "window.bottom.left",
- "image": "wasabi.frame.bottom.left",
- "relaty": "1",
- "resize": "bottomleft",
- "x": "0",
- "y": "-3",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.bottom.left.bottom",
- "image": "wasabi.frame.bottom.left.bottom",
- "relaty": "1",
- "resize": "bottomleft",
- "x": "0",
- "y": "-2",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.bottom.top",
- "image": "wasabi.frame.bottom.top",
- "relatw": "1",
- "relaty": "1",
- "w": "-30",
- "x": "15",
- "y": "-5",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "h": "1",
- "id": "window.bottom",
- "image": "wasabi.frame.bottom",
- "relatw": "1",
- "relaty": "1",
- "resize": "bottom",
- "w": "-30",
- "x": "15",
- "y": "-3",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.bottom.bottom",
- "image": "wasabi.frame.bottom.bottom",
- "relatw": "1",
- "relaty": "1",
- "resize": "bottom",
- "w": "-30",
- "x": "15",
- "y": "-2",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.bottom.right.top",
- "image": "wasabi.frame.bottom.right.top",
- "relatx": "1",
- "relaty": "1",
- "resize": "bottomright",
- "x": "-15",
- "y": "-5",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "h": "1",
- "id": "window.bottom.right",
- "image": "wasabi.frame.bottom.right",
- "relatx": "1",
- "relaty": "1",
- "resize": "bottomright",
- "x": "-15",
- "y": "-3",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "window.bottom.right.bottom",
- "image": "wasabi.frame.bottom.right.bottom",
- "relatx": "1",
- "relaty": "1",
- "resize": "bottomright",
- "x": "-15",
- "y": "-2",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "scripts/standardframe.maki",
- "id": "standardframe.script",
- "param": "5,15,-10,-20,0,0,1,1",
- },
- "name": "script",
- "type": "element",
- },
- ],
- "name": "groupdef",
- "type": "element",
- },
- Object {
- "comment": " =======================================================================================================
-
- implementation
-
-======================================================================================================== ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "id": "wasabi.standardframe.modal",
- "inherit_group": "wasabi.standardframe.nostatusbar",
- "sysregion": "1",
- "xuitag": "Wasabi:StandardFrame:Modal",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "h": "-20",
- "id": "wasabi.panel",
- "relath": "1",
- "relatw": "1",
- "w": "-10",
- "x": "5",
- "y": "15",
- },
- "name": "group",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "target": "controlmenu;controlmenu.inactive",
- },
- "name": "hideobject",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "relatw": "1",
- "target": "wasabi.titlebar",
- "w": "-24",
- "x": "4",
- },
- "name": "sendparams",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "resize": "0",
- "target": "window.top.left;window.top;window.top.right;window.left;window.right;window.bottom.left.top;window.bottom.left;window.bottom.left.bottom;window.bottom.top;window.bottom;window.bottom.bottom;window.bottom.right.top;window.bottom.right;window.bottom.right.bottom",
- },
- "name": "sendparams",
- "type": "element",
- },
- ],
- "name": "groupdef",
- "type": "element",
- },
- Object {
- "comment": " =======================================================================================================
-
- implementation
-
-======================================================================================================== ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "id": "wasabi.standardframe.static",
- "inherit_group": "wasabi.standardframe.nostatusbar",
- "sysregion": "1",
- "xuitag": "Wasabi:StandardFrame:Static",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "h": "-20",
- "id": "wasabi.panel",
- "relath": "1",
- "relatw": "1",
- "w": "-10",
- "x": "5",
- "y": "15",
- },
- "name": "group",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "resize": "0",
- "target": "window.top.left;window.top;window.top.right;window.left;window.right;window.bottom.left.top;window.bottom.left;window.bottom.left.bottom;window.bottom.top;window.bottom;window.bottom.bottom;window.bottom.right.top;window.bottom.right;window.bottom.right.bottom",
- },
- "name": "sendparams",
- "type": "element",
- },
- Object {
- "comment": " ",
- "type": "comment",
- },
- ],
- "name": "groupdef",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "attributes": Object {
- "file": "player/textmask1.png",
- "gammagroup": "CornerAmp",
- "id": "mask1",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/textmask2.png",
- "gammagroup": "CornerAmp",
- "id": "mask2",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/textmask3.png",
- "gammagroup": "CornerAmp",
- "id": "mask3",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/textmask4.png",
- "gammagroup": "CornerAmp",
- "id": "mask4",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/titletopleft.png",
- "id": "title1",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/titletopright.png",
- "id": "title2",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/titledownleft.png",
- "id": "title3",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/titledownright.png",
- "id": "title4",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/background-LU.png",
- "gammagroup": "CornerAmp",
- "id": "player.bg",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/background-RU.png",
- "gammagroup": "CornerAmp",
- "id": "player.bg5",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/background-LD.png",
- "gammagroup": "CornerAmp",
- "id": "player.bg6",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/background-RD.png",
- "gammagroup": "CornerAmp",
- "id": "player.bg7",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/main1.png",
- "gammagroup": "CornerAmp",
- "id": "player.bg1",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/main2.png",
- "gammagroup": "CornerAmp",
- "id": "player.bg2",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/main3.png",
- "gammagroup": "CornerAmp",
- "id": "player.bg3",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/main4.png",
- "gammagroup": "CornerAmp",
- "id": "player.bg4",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/buttons.png",
- "gammagroup": "CornerAmp",
- "h": "39",
- "id": "player.button.previous",
- "w": "39",
- "x": "40",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/buttons.png",
- "gammagroup": "CornerAmp",
- "h": "39",
- "id": "player.button.previous.pressed",
- "w": "39",
- "x": "40",
- "y": "40",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/buttons.png",
- "gammagroup": "CornerAmp",
- "h": "39",
- "id": "player.button.next",
- "w": "39",
- "x": "79",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/buttons.png",
- "gammagroup": "CornerAmp",
- "h": "39",
- "id": "player.button.next.pressed",
- "w": "39",
- "x": "79",
- "y": "40",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/buttons.png",
- "gammagroup": "CornerAmp",
- "h": "39",
- "id": "player.button.play",
- "w": "39",
- "x": "118",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/buttons.png",
- "gammagroup": "CornerAmp",
- "h": "39",
- "id": "player.button.play.pressed",
- "w": "39",
- "x": "118",
- "y": "40",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/buttons.png",
- "gammagroup": "CornerAmp",
- "h": "39",
- "id": "player.button.pause",
- "w": "39",
- "x": "157",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/buttons.png",
- "gammagroup": "CornerAmp",
- "h": "39",
- "id": "player.button.pause.pressed",
- "w": "39",
- "x": "157",
- "y": "40",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/buttons.png",
- "gammagroup": "CornerAmp",
- "h": "39",
- "id": "player.button.stop",
- "w": "39",
- "x": "0",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/buttons.png",
- "gammagroup": "CornerAmp",
- "h": "39",
- "id": "player.button.stop.pressed",
- "w": "39",
- "x": "0",
- "y": "40",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/buttons.png",
- "gammagroup": "CornerAmp",
- "h": "39",
- "id": "player.button.eject",
- "w": "39",
- "x": "196",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/buttons.png",
- "gammagroup": "CornerAmp",
- "h": "39",
- "id": "player.button.eject.pressed",
- "w": "39",
- "x": "196",
- "y": "40",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "14",
- "id": "player.toggler.crossfade.disabled",
- "w": "32",
- "x": "78",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "14",
- "id": "player.toggler.crossfade.pressed",
- "w": "32",
- "x": "78",
- "y": "15",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "14",
- "id": "player.toggler.crossfade.enabled",
- "w": "32",
- "x": "78",
- "y": "30",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "16",
- "id": "player.toggler.shuffle.disabled",
- "w": "28",
- "x": "109",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "16",
- "id": "player.toggler.shuffle.pressed",
- "w": "28",
- "x": "109",
- "y": "15",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "16",
- "id": "player.toggler.shuffle.enabled",
- "w": "28",
- "x": "109",
- "y": "30",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "30",
- "id": "player.toggler.repeat.disabled",
- "w": "72",
- "x": "0",
- "y": "58",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "30",
- "id": "player.toggler.repeat.pressed",
- "w": "72",
- "x": "0",
- "y": "88",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "30",
- "id": "player.toggler.repeat.enabled",
- "w": "72",
- "x": "0",
- "y": "118",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "14",
- "id": "player.switch.ml.disabled",
- "w": "27",
- "x": "25",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "14",
- "id": "player.switch.ml.pressed",
- "w": "27",
- "x": "25",
- "y": "15",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "14",
- "id": "player.switch.ml.enabled",
- "w": "27",
- "x": "25",
- "y": "30",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "15",
- "id": "player.switch.eq.disabled",
- "w": "26",
- "x": "0",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "15",
- "id": "player.switch.eq.pressed",
- "w": "26",
- "x": "0",
- "y": "15",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "15",
- "id": "player.switch.eq.enabled",
- "w": "26",
- "x": "0",
- "y": "30",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "14",
- "id": "player.switch.playlist.disabled",
- "w": "28",
- "x": "51",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "14",
- "id": "player.switch.playlist.pressed",
- "w": "28",
- "x": "51",
- "y": "15",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "14",
- "id": "player.switch.playlist.enabled",
- "w": "28",
- "x": "51",
- "y": "30",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "5",
- "id": "player.status.stop",
- "w": "5",
- "x": "186",
- "y": "3",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "5",
- "id": "player.status.pause",
- "w": "5",
- "x": "186",
- "y": "8",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "5",
- "id": "player.status.play",
- "w": "5",
- "x": "186",
- "y": "13",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "10",
- "id": "player.seek",
- "w": "151",
- "x": "0",
- "y": "46",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "1",
- "id": "player.seek.full",
- "w": "151",
- "x": "0",
- "y": "57",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/volume.png",
- "gammagroup": "CornerAmp",
- "id": "player.volume",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "player/toggles.png",
- "gammagroup": "CornerAmp",
- "h": "2",
- "id": "player.volume.thumb",
- "w": "7",
- "x": "184",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "pixel.ttf",
- "id": "pixel",
- },
- "name": "truetypefont",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "lucon.ttf",
- "id": "lucon",
- },
- "name": "truetypefont",
- "type": "element",
- },
- ],
- "name": "elements",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "default_visible": "1",
- "default_x": "0",
- "default_y": "0",
- "id": "Main",
- "name": "Main Window",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "background": "player.bg",
- "desktopalpha": "1",
- "drawbackground": "0",
- "droptarget": "pldr",
- "id": "normal",
- "maximum_h": "228",
- "maximum_w": "246",
- "minimum_h": "228",
- "minimum_w": "246",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "id": "main1",
- "image": "player.bg1",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "main2",
- "image": "player.bg2",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "main3",
- "image": "player.bg3",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "main4",
- "image": "player.bg4",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Title1",
- "image": "Title1",
- "move": "0",
- "x": "0",
- "y": "92",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Title2",
- "image": "Title2",
- "move": "0",
- "x": "180",
- "y": "92",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Title3",
- "image": "Title3",
- "move": "0",
- "x": "0",
- "y": "42",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Title4",
- "image": "Title4",
- "move": "0",
- "x": "181",
- "y": "35",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "PREV",
- "downImage": "player.button.previous.pressed",
- "id": "Previous",
- "image": "player.button.previous",
- "tooltip": "Previous",
- "x": "13",
- "y": "183",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "PLAY",
- "downImage": "player.button.play.pressed",
- "id": "Play",
- "image": "player.button.play",
- "tooltip": "Play",
- "x": "37",
- "y": "142",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "PAUSE",
- "downImage": "player.button.pause.pressed",
- "id": "Pause",
- "image": "player.button.pause",
- "tooltip": "Pause",
- "x": "66",
- "y": "102",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "STOP",
- "downImage": "player.button.stop.pressed",
- "id": "Stop",
- "image": "player.button.stop",
- "tooltip": "Stop",
- "x": "104",
- "y": "65",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "NEXT",
- "downImage": "player.button.next.pressed",
- "id": "Next",
- "image": "player.button.next",
- "tooltip": "Next",
- "x": "148",
- "y": "36",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "EJECT",
- "downImage": "player.button.eject.pressed",
- "id": "Eject",
- "image": "player.button.eject",
- "tooltip": "Eject",
- "x": "198",
- "y": "14",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "activeImage": "player.toggler.repeat.enabled",
- "cfgattrib": "{45F3F7C1-A6F3-4EE6-A15E-125E92FC3F8D};Repeat",
- "cfgval": "2",
- "downImage": "player.toggler.repeat.pressed",
- "id": "Repeat",
- "image": "player.toggler.repeat.disabled",
- "tooltip": "Repeat",
- "x": "136",
- "y": "-15",
- },
- "name": "togglebutton",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "activeImage": "player.toggler.crossfade.enabled",
- "cfgattrib": "{FC3EAF78-C66E-4ED2-A0AA-1494DFCC13FF};Enable crossfading",
- "downImage": "player.toggler.crossfade.pressed",
- "id": "Crossfade",
- "image": "player.toggler.crossfade.disabled",
- "tooltip": "Crossfade",
- "x": "78",
- "y": "-1",
- },
- "name": "togglebutton",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "activeImage": "player.toggler.shuffle.enabled",
- "cfgattrib": "{45F3F7C1-A6F3-4EE6-A15E-125E92FC3F8D};Shuffle",
- "downImage": "player.toggler.shuffle.pressed",
- "id": "Shuffle",
- "image": "player.toggler.shuffle.disabled",
- "tooltip": "Shuffle",
- "x": "109",
- "y": "-1",
- },
- "name": "togglebutton",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "TOGGLE",
- "activeImage": "player.switch.eq.enabled",
- "downImage": "player.switch.eq.pressed",
- "id": "eq",
- "image": "player.switch.eq.disabled",
- "param": "eq",
- "tooltip": "Toggle Equalizer",
- "x": "0",
- "y": "-1",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "TOGGLE",
- "activeImage": "player.switch.ml.enabled",
- "downImage": "player.switch.ml.pressed",
- "id": "ml",
- "image": "player.switch.ml.disabled",
- "param": "guid:ml",
- "tooltip": "Toggle Music Library",
- "x": "25",
- "y": "-1",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "TOGGLE",
- "activeImage": "player.switch.playlist.enabled",
- "downImage": "player.switch.playlist.pressed",
- "id": "pl",
- "image": "player.switch.playlist.disabled",
- "param": "guid:pl",
- "tooltip": "Toggle Playlist Editor",
- "x": "51",
- "y": "-1",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "comment": " Timer ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "align": "center",
- "antialias": "1",
- "color": "0,0,0",
- "display": "time",
- "font": "Pixel",
- "fontsize": "28",
- "h": "28",
- "id": "Timer",
- "timecolonwidth": "9",
- "w": "65",
- "x": "10",
- "y": "63",
- },
- "name": "text",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "align": "center",
- "antialias": "1",
- "color": "0,0,0",
- "default": "",
- "display": "songname",
- "font": "lucon",
- "fontsize": "16",
- "h": "16",
- "id": "songticker",
- "showlen": "1",
- "sysregion": "1",
- "ticker": "1",
- "w": "136",
- "x": "2",
- "y": "26",
- },
- "name": "text",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "align": "center",
- "antialias": "1",
- "color": "0,0,0",
- "default": "",
- "display": "songinfo",
- "font": "Lucon",
- "fontsize": "13",
- "h": "13",
- "id": "songticker2",
- "ticker": "1",
- "w": "120",
- "x": "2",
- "y": "42",
- },
- "name": "text",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "h": "5",
- "id": "status",
- "pauseBitmap": "player.status.pause",
- "playBitmap": "player.status.play",
- "stopBitmap": "player.status.stop",
- "w": "5",
- "x": "3",
- "y": "81",
- },
- "name": "status",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "Ghost": "0",
- "id": "volume1",
- "image": "player.volume",
- "move": "0",
- "x": "3",
- "y": "95",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "Ghost": "1",
- "id": "volumethumb",
- "image": "player.volume.thumb",
- "move": "0",
- "x": "3",
- "y": "95",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "Ghost": "0",
- "id": "seek1",
- "image": "player.seek",
- "move": "0",
- "x": "3",
- "y": "16",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "Ghost": "1",
- "id": "seekfull",
- "image": "player.seek.full",
- "move": "0",
- "x": "3",
- "y": "21",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "Action": "SEEK",
- "h": "0",
- "id": "HiddenSeek",
- "w": "100",
- "x": "150",
- "y": "0",
- },
- "name": "Slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "Action": "VOLUME",
- "h": "0",
- "id": "HiddenVolume",
- "w": "100",
- "x": "150",
- "y": "0",
- },
- "name": "Slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "Ghost": "1",
- "id": "mask1",
- "image": "mask1",
- "move": "1",
- "sysregion": "1",
- "x": "105",
- "y": "26",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "Ghost": "1",
- "id": "mask2",
- "image": "mask2",
- "move": "1",
- "sysregion": "1",
- "x": "77",
- "y": "26",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "Ghost": "1",
- "id": "mask3",
- "image": "mask3",
- "move": "1",
- "sysregion": "1",
- "x": "105",
- "y": "171",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "Ghost": "1",
- "id": "mask4",
- "image": "mask4",
- "move": "1",
- "sysregion": "1",
- "x": "77",
- "y": "171",
- },
- "name": "layer",
- "type": "element",
- },
- ],
- "name": "layout",
- "type": "element",
- },
- ],
- "name": "container",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "attributes": Object {
- "file": "scripts/corner.maki",
- "id": "corneramp",
- },
- "name": "script",
- "type": "element",
- },
- ],
- "name": "scripts",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "component": "guid:{45F3F7C1-A6F3-4ee6-A15E-125E92FC3F8D}",
- "default_visible": "0",
- "default_y": "250",
- "id": "Pledit",
- "name": "Playlist Editor",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "id": "pledit.content.group",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "autoclose": "1",
- "autoopen": "1",
- "h": "0",
- "noshowcmdbar": "1",
- "param": "guid:{45F3F7C1-A6F3-4ee6-A15E-125E92FC3F8D}",
- "relath": "1",
- "relatw": "1",
- "w": "0",
- "x": "0",
- "y": "0",
- },
- "name": "component",
- "type": "element",
- },
- ],
- "name": "groupdef",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "default_h": "200",
- "default_w": "320",
- "id": "normal",
- "minimum_h": "116",
- "minimum_w": "275",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "content": "pledit.content.group",
- "h": "0",
- "relath": "1",
- "relatw": "1",
- "w": "0",
- "x": "0",
- "y": "0",
- },
- "name": "Wasabi:StandardFrame:Status",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "align": "center",
- "display": "PE_Info",
- "font": "wasabi.font.default",
- "h": "10",
- "id": "PLTime",
- "relatw": "1",
- "relaty": "1",
- "valign": "top",
- "w": "-162",
- "x": "116",
- "y": "-14",
- },
- "name": "text",
- "type": "element",
- },
- ],
- "name": "layout",
- "type": "element",
- },
- ],
- "name": "container",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "component": "guid:{F0816D7B-FFFC-4343-80F2-E8199AA15CC3}",
- "default_visible": "0",
- "dynamic": "1",
- "id": "Video",
- "name": "Video",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "id": "video.content.group",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "disableanimatedrects": "1",
- "h": "0",
- "noshowcmdbar": "1",
- "param": "guid:{F0816D7B-FFFC-4343-80F2-E8199AA15CC3}",
- "relath": "1",
- "relatw": "1",
- "w": "0",
- "x": "0",
- "y": "0",
- },
- "name": "component",
- "type": "element",
- },
- ],
- "name": "groupdef",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "default_h": "200",
- "default_w": "320",
- "droptarget": "pldr",
- "id": "normal",
- "minimum_h": "116",
- "minimum_w": "275",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "content": "video.content.group",
- "h": "0",
- "relath": "1",
- "relatw": "1",
- "w": "0",
- "x": "0",
- "y": "0",
- },
- "name": "Wasabi:StandardFrame:Status",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "align": "center",
- "display": "VID_Info",
- "font": "wasabi.font.default",
- "h": "10",
- "id": "VIDInfo",
- "relatw": "1",
- "relaty": "1",
- "valign": "top",
- "w": "-178",
- "x": "127",
- "y": "-14",
- },
- "name": "text",
- "type": "element",
- },
- ],
- "name": "layout",
- "type": "element",
- },
- ],
- "name": "container",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "attributes": Object {
- "file": "equalizer/equalizer-placeholder.png",
- "id": "eq.placeholder",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "equalizer/eq-buttons.png",
- "gammagroup": "Buttons",
- "h": "11",
- "id": "eq.switch.on.disabled",
- "w": "23",
- "x": "0",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "equalizer/eq-buttons.png",
- "gammagroup": "Buttons",
- "h": "11",
- "id": "eq.switch.on.pressed",
- "w": "23",
- "x": "0",
- "y": "12",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "equalizer/eq-buttons.png",
- "gammagroup": "Buttons",
- "h": "11",
- "id": "eq.switch.on.enabled",
- "w": "23",
- "x": "0",
- "y": "24",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "equalizer/eq-buttons.png",
- "gammagroup": "Buttons",
- "h": "11",
- "id": "eq.switch.auto.disabled",
- "w": "31",
- "x": "24",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "equalizer/eq-buttons.png",
- "gammagroup": "Buttons",
- "h": "11",
- "id": "eq.switch.auto.pressed",
- "w": "31",
- "x": "24",
- "y": "12",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "equalizer/eq-buttons.png",
- "gammagroup": "Buttons",
- "h": "11",
- "id": "eq.switch.auto.enabled",
- "w": "31",
- "x": "24",
- "y": "24",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "equalizer/eq-buttons.png",
- "gammagroup": "Buttons",
- "h": "11",
- "id": "eq.button.presets",
- "w": "41",
- "x": "56",
- "y": "0",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "equalizer/eq-buttons.png",
- "gammagroup": "Buttons",
- "h": "11",
- "id": "eq.button.presets.pressed",
- "w": "41",
- "x": "56",
- "y": "12",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "equalizer/eq-buttons.png",
- "gammagroup": "Buttons",
- "h": "12",
- "id": "eq.slider.button",
- "w": "16",
- "x": "56",
- "y": "24",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "equalizer/eq-buttons.png",
- "gammagroup": "Buttons",
- "h": "12",
- "id": "eq.slider.button.pressed",
- "w": "16",
- "x": "56",
- "y": "37",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "equalizer/eq-buttons.png",
- "gammagroup": "Buttons",
- "h": "13",
- "id": "eq.slider.horizontal.button",
- "w": "17",
- "x": "0",
- "y": "36",
- },
- "name": "bitmap",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "equalizer/eq-buttons.png",
- "gammagroup": "Buttons",
- "h": "13",
- "id": "eq.slider.horizontal.button.pressed",
- "w": "17",
- "x": "18",
- "y": "36",
- },
- "name": "bitmap",
- "type": "element",
- },
- ],
- "name": "elements",
- "type": "element",
- },
- Object {
- "comment": "groupdef id=\\"eq.content.group\\" name=\\"Equalizer\\" inherit_group=\\"wasabi.panel\\"",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "id": "eq.content.group",
- "inherit_group": "wasabi.panel",
- },
- "children": Array [
- Object {
- "comment": "layer x=\\"0\\" y=\\"0\\" w=\\"0\\" h=\\"0\\" relatw=\\"1\\" relath=\\"1\\"/",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "id": "placeholder",
- "image": "eq.placeholder",
- "x": "9",
- "y": "3",
- },
- "name": "layer",
- "type": "element",
- },
- Object {
- "comment": " The spline display ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "colorbottom": "80,40,60",
- "colormiddle": "255,192,255",
- "colorpreamp": "128,128,128",
- "colortop": "60,80,40",
- "gamma": "192",
- "h": "15",
- "id": "spline",
- "w": "115",
- "x": "80",
- "y": "5",
- },
- "name": "eqvis",
- "type": "element",
- },
- Object {
- "comment": " Switches ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "action": "EQ_TOGGLE",
- "activeImage": "eq.switch.on.enabled",
- "downImage": "eq.switch.on.pressed",
- "id": "toggle",
- "image": "eq.switch.on.disabled",
- "tooltip": "Toggle Equalizer On/Off",
- "x": "10",
- "y": "7",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "EQ_AUTO",
- "activeImage": "eq.switch.auto.enabled",
- "downImage": "eq.switch.auto.pressed",
- "id": "auto",
- "image": "eq.switch.auto.disabled",
- "tooltip": "Toggle Equalizer Automatic Processing",
- "x": "37",
- "y": "7",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "MENU",
- "downImage": "eq.button.presets.pressed",
- "id": "presets",
- "image": "eq.button.presets",
- "param": "presets",
- "tooltip": "Manage Equalizer Presets",
- "x": "211",
- "y": "7",
- },
- "name": "button",
- "type": "element",
- },
- Object {
- "comment": " Sliders ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "action": "EQ_PREAMP",
- "downThumb": "eq.slider.button.pressed",
- "h": "64",
- "id": "preamp",
- "orientation": "vertical",
- "thumb": "eq.slider.button",
- "w": "18",
- "x": "13",
- "y": "24",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "EQ_BAND",
- "downThumb": "eq.slider.button.pressed",
- "h": "64",
- "id": "eq1",
- "orientation": "vertical",
- "param": "1",
- "thumb": "eq.slider.button",
- "w": "18",
- "x": "71",
- "y": "24",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "EQ_BAND",
- "downThumb": "eq.slider.button.pressed",
- "h": "64",
- "id": "eq2",
- "orientation": "vertical",
- "param": "2",
- "thumb": "eq.slider.button",
- "w": "18",
- "x": "89",
- "y": "24",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "EQ_BAND",
- "downThumb": "eq.slider.button.pressed",
- "h": "64",
- "id": "eq3",
- "orientation": "vertical",
- "param": "3",
- "thumb": "eq.slider.button",
- "w": "18",
- "x": "107",
- "y": "24",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "EQ_BAND",
- "downThumb": "eq.slider.button.pressed",
- "h": "64",
- "id": "eq4",
- "orientation": "vertical",
- "param": "4",
- "thumb": "eq.slider.button",
- "w": "18",
- "x": "125",
- "y": "24",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "EQ_BAND",
- "downThumb": "eq.slider.button.pressed",
- "h": "64",
- "id": "eq5",
- "orientation": "vertical",
- "param": "5",
- "thumb": "eq.slider.button",
- "w": "18",
- "x": "143",
- "y": "24",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "EQ_BAND",
- "downThumb": "eq.slider.button.pressed",
- "h": "64",
- "id": "eq6",
- "orientation": "vertical",
- "param": "6",
- "thumb": "eq.slider.button",
- "w": "18",
- "x": "161",
- "y": "24",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "EQ_BAND",
- "downThumb": "eq.slider.button.pressed",
- "h": "64",
- "id": "eq7",
- "orientation": "vertical",
- "param": "7",
- "thumb": "eq.slider.button",
- "w": "18",
- "x": "179",
- "y": "24",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "EQ_BAND",
- "downThumb": "eq.slider.button.pressed",
- "h": "64",
- "id": "eq8",
- "orientation": "vertical",
- "param": "8",
- "thumb": "eq.slider.button",
- "w": "18",
- "x": "197",
- "y": "24",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "EQ_BAND",
- "downThumb": "eq.slider.button.pressed",
- "h": "64",
- "id": "eq9",
- "orientation": "vertical",
- "param": "9",
- "thumb": "eq.slider.button",
- "w": "18",
- "x": "215",
- "y": "24",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "EQ_BAND",
- "downThumb": "eq.slider.button.pressed",
- "h": "64",
- "id": "eq10",
- "orientation": "vertical",
- "param": "10",
- "thumb": "eq.slider.button",
- "w": "18",
- "x": "233",
- "y": "24",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "comment": " Balance and Crossfade ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "action": "PAN",
- "downThumb": "eq.slider.horizontal.button.pressed",
- "h": "13",
- "id": "Balance",
- "thumb": "eq.slider.horizontal.button",
- "tooltip": "Balance",
- "w": "79",
- "x": "39",
- "y": "105",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "cfgattrib": "{F1239F09-8CC6-4081-8519-C2AE99FCB14C};Crossfade time",
- "downThumb": "eq.slider.horizontal.button.pressed",
- "h": "13",
- "high": "20",
- "id": "Crossfade",
- "thumb": "eq.slider.horizontal.button",
- "tooltip": "Crossfade Fade Duration",
- "w": "79",
- "x": "148",
- "y": "105",
- },
- "name": "slider",
- "type": "element",
- },
- Object {
- "comment": " Scaler ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "id": "Scaler",
- "image": "wasabi.frame.resizer",
- "relatx": "1",
- "relaty": "1",
- "scale": "bottomright",
- "tooltip": "Drag to scale",
- "x": "-15",
- "y": "-15",
- },
- "name": "layer",
- "type": "element",
- },
- ],
- "name": "groupdef",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "default_visible": "0",
- "default_x": "365",
- "default_y": "250",
- "id": "eq",
- "name": "Equalizer",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "id": "normal",
- "maximum_h": "145",
- "maximum_w": "275",
- "minimum_h": "145",
- "minimum_w": "275",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "content": "eq.content.group",
- "h": "0",
- "relath": "1",
- "relatw": "1",
- "w": "0",
- "x": "0",
- "y": "0",
- },
- "name": "Wasabi:StandardFrame:NoStatus",
- "type": "element",
- },
- ],
- "name": "layout",
- "type": "element",
- },
- ],
- "name": "container",
- "type": "element",
- },
- Object {
- "comment": " Gamma sets ",
- "type": "comment",
- },
- Object {
- "attributes": Object {
- "id": "Default",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "id": "CornerAmp",
- "value": "-100,200,750",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Backgrounds",
- "value": "-400,-400,100",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Buttons",
- "value": "400,200,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Thinger icons",
- "value": "2016,4072,2016",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Menus",
- "value": "1000,1000,1000",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Titlebars",
- "value": "2048,1024,-1024",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "boost": "1",
- "id": "Playback Status Symbols",
- "value": "1000,3500,1000",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Titlebar Font",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Button Fonts",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Display Fonts",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Text Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Tree Color",
- "value": "1000,2000,1000",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Display Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Scrollbar Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Scrollbar Buttons",
- "value": "400,200,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Text",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- ],
- "name": "gammaset",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Blue",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "id": "CornerAmp",
- "value": "-750,-500,1500",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Backgrounds",
- "value": "0,300,1700",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Buttons",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Thinger icons",
- "value": "2000,2000,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Menus",
- "value": "0,300,1700",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Titlebars",
- "value": "2048,1024,-1024",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "boost": "1",
- "id": "Playback Status Symbols",
- "value": "2000,2000,-500",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Titlebar Font",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Button Fonts",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Display Fonts",
- "value": "2000,2000,-500",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Text Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Tree Color",
- "value": "2000,2000,-500",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Display Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Scrollbar Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Scrollbar Buttons",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Text",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- ],
- "name": "gammaset",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Green",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "id": "CornerAmp",
- "value": "-750,750,-1000",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Backgrounds",
- "value": "300,1700,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Buttons",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Thinger icons",
- "value": "300,1700,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Menus",
- "value": "300,1700,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Titlebars",
- "value": "2048,1024,-1024",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "boost": "1",
- "id": "Playback Status Symbols",
- "value": "300,1700,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Titlebar Font",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Button Fonts",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Display Fonts",
- "value": "300,1700,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Text Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Tree Color",
- "value": "300,1700,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Display Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Scrollbar Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Scrollbar Buttons",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Text",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- ],
- "name": "gammaset",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Grey",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "id": "CornerAmp",
- "value": "-650,-700,-200",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Buttons",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Thinger icons",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Menus",
- "value": "1000,1000,1000",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Titlebars",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "boost": "1",
- "id": "Playback Status Symbols",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Titlebar Font",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Button Fonts",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Display Fonts",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Text Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Tree Color",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Display Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Scrollbar Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Scrollbar Buttons",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Text",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- ],
- "name": "gammaset",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Red",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "id": "CornerAmp",
- "value": "1000,-750,-1000",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Backgrounds",
- "value": "1700,300,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Buttons",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Thinger icons",
- "value": "1700,300,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Menus",
- "value": "1700,300,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Titlebars",
- "value": "2048,1024,-1024",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "boost": "1",
- "id": "Playback Status Symbols",
- "value": "1700,300,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Titlebar Font",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Button Fonts",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Display Fonts",
- "value": "1700,300,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Text Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Tree Color",
- "value": "1700,300,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Display Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Scrollbar Backgrounds",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Scrollbar Buttons",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "Text",
- "value": "0,0,0",
- },
- "name": "gammagroup",
- "type": "element",
- },
- ],
- "name": "gammaset",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "default_visible": "0",
- "id": "colorthemes",
- "name": "Color Themes",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "id": "themes",
- "name": "Themes",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "h": "-24",
- "id": "color.list",
- "nocolheader": "1",
- "relath": "1",
- "relatw": "1",
- "w": "-4",
- "x": "2",
- "y": "2",
- },
- "name": "ColorThemes:List",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "colorthemes_switch",
- "action_target": "color.list",
- "h": "19",
- "id": "Switch",
- "relatw": "%",
- "relaty": "1",
- "text": "Switch",
- "w": "50",
- "x": "0",
- "y": "-20",
- },
- "name": "Wasabi:Button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "colorthemes_previous",
- "action_target": "color.list",
- "h": "19",
- "id": "Previous",
- "relatw": "%",
- "relatx": "%",
- "relaty": "1",
- "text": "Previous",
- "w": "25",
- "x": "50",
- "y": "-20",
- },
- "name": "Wasabi:Button",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "action": "colorthemes_next",
- "action_target": "color.list",
- "h": "19",
- "id": "Next",
- "relatw": "%",
- "relatx": "%",
- "relaty": "1",
- "text": "Next",
- "w": "25",
- "x": "75",
- "y": "-20",
- },
- "name": "Wasabi:Button",
- "type": "element",
- },
- ],
- "name": "groupdef",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "id": "normal",
- "maximum_h": "138",
- "maximum_w": "275",
- "minimum_h": "138",
- "minimum_w": "275",
- },
- "children": Array [
- Object {
- "attributes": Object {
- "content": "themes",
- "h": "0",
- "relath": "1",
- "relatw": "1",
- "w": "0",
- "x": "0",
- "y": "0",
- },
- "name": "Wasabi:StandardFrame:NoStatus",
- "type": "element",
- },
- ],
- "name": "layout",
- "type": "element",
- },
- ],
- "name": "container",
- "type": "element",
- },
- Object {
- "comment": " CornerAmp has never had the thinger but you can add it if you like:
-
- ",
- "type": "comment",
- },
- ],
- "name": "WasabiXML",
- "type": "element",
- },
- ],
- "declaration": Object {
- "attributes": Object {
- "encoding": "UTF-8",
- "standalone": "yes",
- "version": "1.0",
- },
- },
-}
-`;
-
-exports[`readXml gets a file independent of case 1`] = `
-Object {
- "children": Array [
- Object {
- "attributes": Object {
- "version": "1.35",
- },
- "children": Array [
- Object {
- "children": Array [
- Object {
- "children": Array [
- Object {
- "text": "1.0",
- "type": "text",
- },
- ],
- "name": "version",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "text": "CornerAmp Redux",
- "type": "text",
- },
- ],
- "name": "name",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "text": "9 of Nine, Evil Pumpkin, RazorZero",
- "type": "text",
- },
- ],
- "name": "author",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "text": "Updated for Winamp 5 by Ariszló",
- "type": "text",
- },
- ],
- "name": "comment",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "text": "ariszlo@gmail.com",
- "type": "text",
- },
- ],
- "name": "email",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "text": "http://ariszlo.deviantart.com",
- "type": "text",
- },
- ],
- "name": "homepage",
- "type": "element",
- },
- Object {
- "children": Array [
- Object {
- "text": "skinshot.png",
- "type": "text",
- },
- ],
- "name": "screenshot",
- "type": "element",
- },
- ],
- "name": "skininfo",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "xml/system-colors.xml",
- },
- "name": "include",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "xml/standardframe.xml",
- },
- "name": "include",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "xml/player.xml",
- },
- "name": "include",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "xml/pledit.xml",
- },
- "name": "include",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "xml/video.xml",
- },
- "name": "include",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "xml/eq.xml",
- },
- "name": "include",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "xml/color-presets.xml",
- },
- "name": "include",
- "type": "element",
- },
- Object {
- "attributes": Object {
- "file": "xml/color-themes.xml",
- },
- "name": "include",
- "type": "element",
- },
- Object {
- "comment": " CornerAmp has never had the thinger but you can add it if you like:
-
- ",
- "type": "comment",
- },
- ],
- "name": "WasabiXML",
- "type": "element",
- },
- ],
- "declaration": Object {
- "attributes": Object {
- "encoding": "UTF-8",
- "standalone": "yes",
- "version": "1.0",
- },
- },
-}
-`;
diff --git a/packages/webamp-modern/src/__tests__/integration.test.js b/packages/webamp-modern/src/__tests__/integration.test.js
deleted file mode 100644
index 31213f1e..00000000
--- a/packages/webamp-modern/src/__tests__/integration.test.js
+++ /dev/null
@@ -1,104 +0,0 @@
-import path from "path";
-import fs from "fs";
-import JSZip from "jszip";
-import { create } from "../store";
-import * as Actions from "../Actions";
-import * as Utils from "../utils";
-import System from "../runtime/System";
-
-test("sameObject", async () => {
- const messages = await runSkin("sameObject");
-
- expect(messages).toEqual([
- ["empty object equal each other", "Success", 0, ""],
- ["same object equal each other", "Success", 0, ""],
- ["different objects do not equal each other", "Success", 0, ""],
- ]);
-});
-
-test("simpleClick", async () => {
- const messages = await runSkin("simpleClick");
-
- expect(messages).toEqual([
- ["onScriptLoaded", "Success", 0, ""],
- ["play_button.onLeftClick", "Success", 0, ""],
- ]);
-});
-
-// Adapted from https://github.com/Stuk/jszip/issues/386#issuecomment-510802546
-function buildZipFromDirectory(dir, zip, root) {
- const list = fs.readdirSync(dir);
-
- for (let file of list) {
- file = path.resolve(dir, file);
- const stat = fs.statSync(file);
- if (stat && stat.isDirectory()) {
- buildZipFromDirectory(file, zip, root);
- } else {
- const filedata = fs.readFileSync(file);
- zip.file(path.relative(root, file), filedata);
- }
- }
-}
-
-// Returns a promise that resolves when the state of a Redux store matches the
-// given predicate
-function isInState(store, predicate) {
- return new Promise((resolve) => {
- const unsubscribe = store.subscribe(() => {
- if (predicate(store.getState())) {
- resolve();
- unsubscribe();
- }
- });
- });
-}
-
-// Given a skin directory in `resources/testSkins/` loads it and returns
-// an array representing all the calls to System.messagebox.
-async function runSkin(skinDirectory) {
- const skinDirectoryPath = path.join(
- __dirname,
- "../../resources/testSkins/",
- skinDirectory
- );
- const zip = new JSZip();
- buildZipFromDirectory(skinDirectoryPath, zip, skinDirectoryPath);
-
- /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
- function fakeMessageBox(a, b, c, d) {
- // This function has four fake arguments because we check the arity of the
- // method in the VM to determine how many values to pop off the stack.
- }
- expect(fakeMessageBox.length).toBe(System.prototype.messagebox.length);
-
- const mockMessageBox = jest.fn(fakeMessageBox);
- System.prototype.messagebox = mockMessageBox;
-
- const store = create();
- store.dispatch(Actions.gotSkinZip(zip, store));
- await isInState(store, (state) => state.modernSkin.skinLoaded);
-
- return mockMessageBox.mock.calls;
-}
-
-// Mock out some utility functions which depend upon browser APIs which are not
-// supported by JSDOM.
-
-/* eslint-disable import/namespace */
-
-Utils.getSizeFromUrl = jest.fn(() => {
- // TODO: Actually compute this. Perhaps with https://www.npmjs.com/package/image-size
- // It will likely require converting data URIs generted by getUrlFromBlob into a buffer.
- return { width: 0, height: 0 };
-});
-Utils.getUrlFromBlob = jest.fn((blob) => {
- return new Promise((resolve) => {
- const reader = new FileReader();
- reader.onload = function (e) {
- resolve(e.target.result);
- };
- // TODO: Preserve the mimetype of these files
- reader.readAsDataURL(blob);
- });
-});
diff --git a/packages/webamp-modern/src/__tests__/objects.test.js b/packages/webamp-modern/src/__tests__/objects.test.js
deleted file mode 100644
index c2ecec9a..00000000
--- a/packages/webamp-modern/src/__tests__/objects.test.js
+++ /dev/null
@@ -1,125 +0,0 @@
-import { getClass, getFormattedId, objects } from "../maki-interpreter/objects";
-import runtime from "../runtime";
-
-test("getFormattedId() is reversable", () => {
- Object.keys(runtime).forEach((id) => {
- const formattedId = getFormattedId(id);
- const inverse = getFormattedId(formattedId);
- expect(inverse).toBe(id);
- });
- Object.keys(objects)
- .map((id) => id.toLowerCase())
- .forEach((id) => {
- const formattedId = getFormattedId(id);
- const inverse = getFormattedId(formattedId);
- expect(inverse).toBe(id);
- });
-});
-
-const getMakiMethods = (obj) =>
- Object.getOwnPropertyNames(obj).filter((name) => {
- return (
- typeof obj[name] === "function" &&
- !name.startsWith("js_") &&
- !name.startsWith("_") &&
- name !== "constructor"
- );
- });
-
-for (const [key, Klass] of Object.entries(runtime)) {
- const obj = getClass(key);
- describe(`${obj.name}`, () => {
- test("implements getclassname()", () => {
- expect(Klass.prototype.getclassname()).toBe(obj.name);
- });
- test("has the correct parent", () => {
- const Parent = Object.getPrototypeOf(Klass);
- if (Klass.prototype.getclassname() === "Object") {
- expect(Parent.prototype).toBe(undefined);
- return;
- }
- expect(Parent.prototype.getclassname()).toBe(obj.parent);
- });
- describe("methods have the correct arity", () => {
- obj.functions.forEach((func) => {
- const methodName = func.name.toLowerCase();
- // Once all methods are implemented this check can be removed.
- // For now we have a separate test which checks that we haven't
- // regressed on the methods we've implemented.
- const hasMethodOnSelf = Klass.prototype.hasOwnProperty(methodName);
- test(`Has the method ${obj.name}.${func.name}`, () => {
- expect(hasMethodOnSelf).toBe(true);
- });
- if (!hasMethodOnSelf) {
- return;
- }
- const actual = Klass.prototype[func.name.toLowerCase()].length;
- test(`${obj.name}.${func.name} has an arity of ${actual}`, () => {
- expect(func.parameters.length).toBe(actual);
- });
- });
- });
- });
-}
-
-describe("Maki classes", () => {
- const runtimeMethods = new Set();
- const unimplementedRuntimeMethods = new Set();
- const objectMethods = new Set();
- for (const [key, Klass] of Object.entries(runtime)) {
- const obj = getClass(key);
- getMakiMethods(Klass.prototype).forEach((methodName) => {
- runtimeMethods.add(`${obj.name}.${methodName}`);
- const methodSource = Klass.prototype[methodName].toString();
- if (methodSource.includes("unimplementedWarning")) {
- unimplementedRuntimeMethods.add(`${obj.name}.${methodName}`);
- }
- });
- obj.functions.forEach((func) => {
- objectMethods.add(`${obj.name}.${func.name.toLowerCase()}`);
- });
- }
-
- test("All classes are implemented", () => {
- const getName = (Klass) => Klass.prototype.getclassname();
- const actualNames = Object.keys(runtime).map(
- (id) => `${getName(runtime[id])} (${id})`
- );
- const expectedNames = Object.keys(objects).map(
- (id) => `${objects[id].name} (${getFormattedId(id)})`
- );
- expect(new Set(actualNames)).toEqual(new Set(expectedNames));
- });
-
- test("have no extra methods", () => {
- // getclassname _should_ be implemented on Object and let each class inherit
- // it. However it's far easier to implement it on each class directly, so
- // we'll allow that.
- function isntGetClassname(method) {
- return !/\.getclassname$/.test(method);
- }
-
- function isntMakiMethod(method) {
- return !objectMethods.has(method);
- }
-
- const extra = [...runtimeMethods]
- .filter(isntMakiMethod)
- .filter(isntGetClassname);
-
- expect(extra).toEqual([]);
- });
-
- test("There are no missing methods", () => {
- const missing = [...objectMethods].filter((x) => !runtimeMethods.has(x));
-
- expect(missing).toEqual([]);
- });
-
- test("Track unimplemented methods", () => {
- // Write this as a newline delineated string to make it easier to other
- // tools to extract from the `.snap` file.
- const expected = Array.from(unimplementedRuntimeMethods).join("\n");
- expect(expected).toMatchSnapshot();
- });
-});
diff --git a/packages/webamp-modern/src/__tests__/parser.test.js b/packages/webamp-modern/src/__tests__/parser.test.js
deleted file mode 100644
index 1455ccac..00000000
--- a/packages/webamp-modern/src/__tests__/parser.test.js
+++ /dev/null
@@ -1,235 +0,0 @@
-import { readFileSync } from "fs";
-import { join } from "path";
-import parse from "../maki-interpreter/parser";
-import { getClass } from "../maki-interpreter/objects";
-import { VERSIONS } from "./testConstants";
-
-function parseFile(relativePath) {
- const buffer = readFileSync(join(__dirname, relativePath));
- return parse(buffer);
-}
-
-describe("can parse without crashing", () => {
- const versions = [
- // VERSIONS.WINAMP_3_ALPHA,
- VERSIONS.WINAMP_3_BETA,
- VERSIONS.WINAMP_3_FULL,
- VERSIONS.WINAMP_5_02,
- VERSIONS.WINAMP_5_66,
- ];
-
- const scripts = [
- "hello_world.maki",
- "basicTests.maki",
- "simpleFunctions.maki",
- ];
-
- scripts.forEach((script) => {
- describe(`script ${script}`, () => {
- versions.forEach((version) => {
- test(`compiled with compiler version ${version}`, () => {
- expect(() => {
- parseFile(`../../resources/maki_compiler/${version}/${script}`);
- }).not.toThrow();
- });
- });
- });
- });
-});
-
-describe.skip("regressions", () => {
- describe("https://github.com/captbaritone/webamp/issues/898", () => {
- test("minimal", () => {
- parseFile("../../resources/fixtures/issue_898/minimal.maki");
- });
- test("real world", () => {});
- });
- describe.skip("foo", () => {
- test("CproTabs", () => {
- parseFile("../../resources/fixtures/foo/CproTabs.maki");
- });
- });
-});
-
-describe("standardframe.maki", () => {
- let maki;
- beforeEach(() => {
- maki = parseFile("../../resources/fixtures/standardframe.maki");
- });
-
- test("can read magic", () => {
- expect(maki.magic).toBe("FG");
- });
-
- test("can read classes", () => {
- expect(maki.classes.map((klass) => getClass(klass).name)).toEqual([
- "Object",
- "System",
- "Container",
- "Wac",
- "List",
- "Map",
- "PopupMenu",
- "Region",
- "Timer",
- "GuiObject",
- "Group",
- "Layout",
- "WindowHolder",
- "ComponentBucket",
- "Edit",
- "Slider",
- "Vis",
- "Browser",
- "EqVis",
- "Status",
- "Text",
- "Title",
- "Layer",
- "Button",
- "AnimatedLayer",
- "ToggleButton",
- "GroupList",
- "CfgGroup",
- "QueryList",
- "MouseRedir",
- "DropDownList",
- "LayoutStatus",
- "TabSheet",
- ]);
- });
-
- test("can read methods", () => {
- expect(maki.methods.map((func) => func.name)).toEqual([
- "onScriptLoaded",
- "getScriptGroup",
- "getParam",
- "getToken",
- "onSetXuiParam",
- "findObject",
- "setXmlParam",
- "setXmlParam",
- "messagebox",
- "onNotify",
- "newGroup",
- "init",
- ]);
- expect(maki.methods.every((func) => func.typeOffset != null)).toBe(true);
- });
-
- test("can read variables", () => {
- expect(maki.variables.length).toBe(56);
- expect(
- maki.variables.map((variable) => {
- const { typeName, type } = variable;
- if (typeName === "OBJECT") {
- return type;
- }
- return typeName;
- })
- ).toMatchInlineSnapshot(`
-Array [
- "d6f50f6449b793fa66baf193983eaeef",
- "INT",
- "45be95e5419120725fbb5c93fd17f1f9",
- "45be95e5419120725fbb5c93fd17f1f9",
- "45be95e5419120725fbb5c93fd17f1f9",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "5ab9fa1545579a7d5765c8aba97cc6a6",
- "698eddcd4fec8f1e44f9129b45ff09f9",
- "STRING",
- "STRING",
- "INT",
- "INT",
- "INT",
- "INT",
- "INT",
- "INT",
- "INT",
- "INT",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "INT",
- "INT",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
- "STRING",
-]
-`);
- maki.variables.forEach((variable) => {
- expect(variable.type).not.toBe(undefined);
- });
- });
-
- test("can read bindings", () => {
- expect(maki.bindings).toEqual([
- { variableOffset: 0, commandOffset: 0, methodOffset: 0 },
- { variableOffset: 0, commandOffset: 76, methodOffset: 4 },
- { variableOffset: 2, commandOffset: 143, methodOffset: 9 },
- ]);
- });
-
- // [opcode, size] as output by the Perl decompiler
- // TODO: Get rid of the size values here, they are not used any more
- // prettier-ignore
- const expectedCommands = [1, 1, 24, 48, 2, 1, 1, 24, 48, 2, 1, 1, 1, 1, 1, 24, 48, 2,
- 1, 1, 1, 1, 1, 24, 48, 2, 1, 1, 1, 1, 1, 24, 48, 2, 1, 1, 1, 1, 1, 24, 48, 2, 1, 1,
- 1, 1, 1, 24, 48, 2, 1, 1, 1, 1, 1, 24, 48, 2, 1, 1, 1, 1, 1, 24, 48, 2, 1, 1, 1, 1,
- 1, 24, 48, 2, 1, 33, 3, 3, 1, 1, 8, 16, 1, 25, 2, 1, 1, 1, 24, 48, 2, 1, 1, 9, 16, 1,
- 1, 1, 24, 48, 2, 1, 1, 8, 1, 1, 8, 81, 16, 1, 1, 9, 16, 1, 1, 1, 24, 2, 1, 1, 8, 16, 1,
- 1, 9, 16, 1, 1, 1, 64, 1, 24, 2, 18, 1, 1, 1, 1, 1, 24, 2, 1, 33, 3, 3, 3, 3, 1, 1, 1,
- 1, 1, 24, 48, 2, 1, 1, 1, 1, 1, 24, 48, 2, 1, 1, 8, 1, 1, 8, 81, 1, 1, 8, 81, 1, 1, 8,
- 81, 16, 1, 1, 1, 24, 2, 1, 33, 3, 1, 1, 1, 24, 48, 2, 1, 1, 8, 16, 1, 1, 1, 1, 1, 1, 64,
- 1, 64, 24, 2, 1, 33, 1, 1, 1, 24, 2, 1, 1, 1, 24, 2, 1, 1, 1, 24, 2, 1, 1, 1, 24, 2, 1, 1,
- 1, 24, 2, 1, 1, 1, 24, 2, 1, 1, 1, 24, 2, 1, 1, 1, 24, 2, 1, 1, 24, 2, 1, 33,
- ];
-
- test("can read commands", () => {
- maki.commands.forEach((command, i) => {
- const expectedOpcode = expectedCommands[i];
- if (expectedOpcode !== command.opcode) {
- throw new Error(
- `Command ${i} reported opcode ${command.opcode}. Expected ${expectedOpcode}`
- );
- }
- });
- expect(maki.commands.length).toBe(expectedCommands.length);
- });
-
- // I don't know what either of these actually are.
- test("extracts version info", () => {
- expect(maki.version).toBe(1027);
- expect(maki.extraVersion).toBe(23);
- });
-});
diff --git a/packages/webamp-modern/src/__tests__/testConstants.js b/packages/webamp-modern/src/__tests__/testConstants.js
deleted file mode 100644
index 55d983f7..00000000
--- a/packages/webamp-modern/src/__tests__/testConstants.js
+++ /dev/null
@@ -1,7 +0,0 @@
-export const VERSIONS = {
- WINAMP_3_ALPHA: "v1.1.0.a9 (Winamp 3 alpha 8r)",
- WINAMP_3_BETA: "v1.1.1.b3 (Winamp 3.0 build 488d)",
- WINAMP_3_FULL: "v1.1.1.b3 (Winamp 3.0 full)",
- WINAMP_5_02: "v1.1.13 (Winamp 5.02)",
- WINAMP_5_66: "v1.2.0 (Winamp 5.66)",
-};
diff --git a/packages/webamp-modern/src/__tests__/utils.test.js b/packages/webamp-modern/src/__tests__/utils.test.js
deleted file mode 100644
index 7bf4ad35..00000000
--- a/packages/webamp-modern/src/__tests__/utils.test.js
+++ /dev/null
@@ -1,151 +0,0 @@
-import * as Utils from "../utils";
-import JSZip from "jszip";
-import { promises as fsPromises } from "fs";
-import path from "path";
-
-async function getSkinZip() {
- const skinBuffer = await fsPromises.readFile(
- path.join(__dirname, "../../skins/CornerAmp_Redux.wal")
- );
- return JSZip.loadAsync(skinBuffer);
-}
-
-describe("getCaseInsensitiveFile", () => {
- it("gets a file independent of case", async () => {
- const zip = await getSkinZip();
- expect(Utils.getCaseInsensitveFile(zip, "SkIn.XmL")).not.toEqual(null);
- });
-});
-
-describe("readXml", () => {
- it("gets a file independent of case", async () => {
- const zip = await getSkinZip();
- const xml = await Utils.readXml(zip, "SkIn.XmL");
- expect(xml).toMatchSnapshot();
- });
-});
-
-describe("inlineIncludes", () => {
- test("asyncTreeFlatMap", async () => {
- const playerElements = {
- name: "player-elements",
- children: [{ name: "player-elements-child" }],
- };
- const playerNormal = {
- name: "player-normal",
- children: [{ name: "player-normal-child" }],
- };
- const player = {
- name: "player",
- children: [
- {
- name: "player-elements-include",
- include: playerElements,
- },
- {
- name: "main-container",
- children: [
- {
- name: "player-normal-include",
- include: playerNormal,
- },
- ],
- },
- ],
- };
-
- const xml = {
- name: "root",
- children: [{ name: "meta" }, { name: "include player", include: player }],
- };
-
- function resolveInclude(node) {
- if (node.include) {
- return node.include.children;
- }
- return node;
- }
- const resolved = await Utils.asyncTreeFlatMap(xml, resolveInclude);
- expect(resolved).toEqual({
- name: "root",
- children: [
- { name: "meta" },
- { name: "player-elements-child" },
- { name: "main-container", children: [{ name: "player-normal-child" }] },
- ],
- });
- });
-
- test("inlines the contents of included files as children of the include node", async () => {
- const zip = await getSkinZip();
- const originalFile = zip.file;
- zip.file = jest.fn((filePath) => originalFile.call(zip, filePath));
-
- const xml = await Utils.readXml(zip, "SkIn.XmL");
- const resolvedXml = await Utils.inlineIncludes(xml, zip);
- expect(resolvedXml).toMatchSnapshot();
- expect(zip.file.mock.calls.map((args) => args[0])).toMatchInlineSnapshot(`
-Array [
- /SkIn\\.XmL/i,
- /xml\\\\/system-colors\\.xml/i,
- /xml\\\\/standardframe\\.xml/i,
- /xml\\\\/player\\.xml/i,
- /xml\\\\/pledit\\.xml/i,
- /xml\\\\/video\\.xml/i,
- /xml\\\\/eq\\.xml/i,
- /xml\\\\/color-presets\\.xml/i,
- /xml\\\\/color-themes\\.xml/i,
- /studio-elements\\.xml/i,
- /player-elements\\.xml/i,
- /player-normal\\.xml/i,
-]
-`);
- });
-});
-
-describe("asyncFlatMap", () => {
- test("recurses", async () => {
- const start = ["parent", ["child", ["grandchild"], "sibling"], "partner"];
- expect(await Utils.asyncFlatMap(start, (v) => Promise.resolve(v))).toEqual([
- "parent",
- "child",
- "grandchild",
- "sibling",
- "partner",
- ]);
- });
-});
-
-describe("asyncTreeFlatMap", () => {
- test("encounters children first", async () => {
- const mapper = jest.fn(async (node) => {
- if (node.replaceWithChildren) {
- return node.children;
- }
- return { ...node, name: node.name.toLowerCase() };
- });
-
- const start = {
- name: "A",
- children: [
- { name: "B" },
- {
- name: "C",
- children: [
- { name: "E" },
- { name: "F", replaceWithChildren: true, children: [{ name: "G" }] },
- ],
- replaceWithChildren: true,
- },
- { name: "D" },
- ],
- };
- expect(await Utils.asyncTreeFlatMap(start, mapper)).toEqual({
- name: "A",
- children: [{ name: "b" }, { name: "e" }, { name: "g" }, { name: "d" }],
- });
-
- const callOrder = mapper.mock.calls.map((args) => args[0].name);
- expect(callOrder).toEqual(["B", "C", "D", "E", "F", "G"]);
- });
-});
diff --git a/packages/webamp-modern/src/__tests__/virtualMachine.test.js b/packages/webamp-modern/src/__tests__/virtualMachine.test.js
deleted file mode 100644
index 9b442cc4..00000000
--- a/packages/webamp-modern/src/__tests__/virtualMachine.test.js
+++ /dev/null
@@ -1,101 +0,0 @@
-import path from "path";
-import { run } from "../maki-interpreter/virtualMachine";
-import runtime from "../runtime";
-import System from "../runtime/System";
-import fs from "fs";
-
-function runScript(filePath) {
- const scriptFullPath = path.join(
- __dirname,
- "../../resources/maki_compiler/v1.2.0 (Winamp 5.66)",
- filePath
- );
-
- const program = fs.readFileSync(scriptFullPath);
-
- /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
- function fakeMessageBox(a, b, c, d) {
- // This function has four fake arguments because we check the arity of the
- // method in the VM to determine how many values to pop off the stack.
- }
- expect(fakeMessageBox.length).toBe(System.prototype.messagebox.length);
-
- const mockMessageBox = jest.fn(fakeMessageBox);
- System.prototype.messagebox = mockMessageBox;
-
- const system = new System();
-
- run({ runtime, data: program, system });
-
- return mockMessageBox.mock.calls
- .map(([assertion, result]) => `${result}: ${assertion}`)
- .join("\n");
-}
-
-test.skip("basicTests", () => {
- expect(runScript("basicTests.maki")).toMatchInlineSnapshot(`
-"Success: 2 + 2 = 4
-Success: 2.2 + 2.2 = 4.4
-Success: 4 + 4.4 = 4.4 + 4 (not implict casting)
-Success: #t + #t = 2
-Success: 3 - 2 = 1
-Success: 3 - -2 = 5
-Success: 3.5 - 2 = 1.5
-Success: 2 * 3 = 6
-Success: 2 * 1.5 = 3
-Success: #t * 3 = 3
-Success: #f * 3 = 0
-Success: #t * 0.25 = 0.25
-Success: 0.25 * #t = 0.25
-Success: #f * 0.25 = 0
-Success: 6 / 3 = 2
-Success: 3 / 2 = 1.5
-Success: 5 % 2 = 1
-Success: 5.5 % 2 = 1 (implict casting)
-Success: 3 & 2 = 2
-Success: 3 | 2 = 3
-Success: 2 << 1 = 4
-Success: 4 >> 1 = 2
-Success: 2.5 << 1 = 4 (implict casting)
-Success: 4.5 >> 1 = 2 (implict casting)
-Success: 1 != 2
-Success: 1 < 2
-Success: 2 > 1
-Success: [int] 4 = [float] 4.4 (autocasting types)
-Success: ! [float] 4.4 = [int] 4 (not autocasting types)
-Success: [float] 4.4 != [int] 4 (not autocasting types)
-Success: ! [int] 4 != [float] 4.4 (autocasting types)
-Success: [int] 4 <= [float] 4.4 (autocasting types)
-Success: [int] 4 >= [float] 4.4 (autocasting types)
-Success: ! [float] 4.4 <= [int] 4 (not autocasting types)
-Success: [float] 4.4 >= [int] 4 (not autocasting types)
-Success: ! [int] 4 < [float] 4.4 (autocasting types)
-Success: ! [float] 4.4 < [int] 4 (not autocasting types)
-Success: ! [int] 4 > [float] 4.4 (autocasting types)
-Success: [float] 4.4 > [int] 4 (not autocasting types)
-Success: 1++ = 1
-Success: 1++ (after incremeent) = 2
-Success: 2-- = 2
-Success: 2-- (after decrement) = 1
-Success: ++1 = 2
-Success: !#f
-Success: !0
-Success: !1 == #f
-Success: 1 == #t
-Success: 0 == #f
-Success: #t && #t
-Success: !(#t && #f)
-Success: !(#f && #f)
-Success: #t || #t
-Success: #t || #f
-Success: #f || #t
-Success: !(#f || #f)
-Success: #t || ++n (doesn't short circuit)
-Success: !(#f && ++ n) (doesn't short circuit)"
-`);
-});
-test("hello_world", () => {
- expect(runScript("hello_world.maki")).toMatchInlineSnapshot(
- `"Hello Title: Hello World"`
- );
-});
diff --git a/packages/webamp-modern-2/src/clip_path.html b/packages/webamp-modern/src/clip_path.html
similarity index 100%
rename from packages/webamp-modern-2/src/clip_path.html
rename to packages/webamp-modern/src/clip_path.html
diff --git a/packages/webamp-modern-2/src/clip_path.ts b/packages/webamp-modern/src/clip_path.ts
similarity index 100%
rename from packages/webamp-modern-2/src/clip_path.ts
rename to packages/webamp-modern/src/clip_path.ts
diff --git a/packages/webamp-modern/src/components/DropTarget.tsx b/packages/webamp-modern/src/components/DropTarget.tsx
deleted file mode 100644
index 9e7e9f5f..00000000
--- a/packages/webamp-modern/src/components/DropTarget.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-import React, { useCallback } from "react";
-
-interface Coord {
- x: number;
- y: number;
-}
-
-interface Props extends React.HTMLAttributes {
- handleDrop(e: React.DragEvent, coord: Coord): void;
-}
-
-function supress(e: React.DragEvent) {
- e.stopPropagation();
- e.preventDefault();
- e.dataTransfer.dropEffect = "link";
- e.dataTransfer.effectAllowed = "link";
-}
-
-const DropTarget = (props: Props) => {
- const {
- // eslint-disable-next-line no-shadow, no-unused-vars
- handleDrop,
- ...passThroughProps
- } = props;
-
- const onDrop = useCallback(
- (e: React.DragEvent) => {
- supress(e);
- // TODO: We could probably move this coordinate logic into the playlist.
- // I think that's the only place it gets used.
- const { currentTarget } = e;
- if (!(currentTarget instanceof Element)) {
- return;
- }
-
- const { left: x, top: y } = currentTarget.getBoundingClientRect();
- handleDrop(e, { x, y });
- },
- [handleDrop]
- );
- return (
-
- );
-};
-
-export default DropTarget;
diff --git a/packages/webamp-modern-2/src/dropTarget.ts b/packages/webamp-modern/src/dropTarget.ts
similarity index 100%
rename from packages/webamp-modern-2/src/dropTarget.ts
rename to packages/webamp-modern/src/dropTarget.ts
diff --git a/packages/webamp-modern/src/index.css b/packages/webamp-modern/src/index.css
deleted file mode 100644
index 4a1df4db..00000000
--- a/packages/webamp-modern/src/index.css
+++ /dev/null
@@ -1,13 +0,0 @@
-body {
- margin: 0;
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
- "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
- sans-serif;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-code {
- font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
- monospace;
-}
diff --git a/packages/webamp-modern-2/src/index.html b/packages/webamp-modern/src/index.html
similarity index 99%
rename from packages/webamp-modern-2/src/index.html
rename to packages/webamp-modern/src/index.html
index b62de132..2b4b3f59 100644
--- a/packages/webamp-modern-2/src/index.html
+++ b/packages/webamp-modern/src/index.html
@@ -251,6 +251,7 @@
}
+
Downloading JavaScript...
diff --git a/packages/webamp-modern/src/index.js b/packages/webamp-modern/src/index.js
deleted file mode 100644
index 09da3f17..00000000
--- a/packages/webamp-modern/src/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import React from "react";
-import ReactDOM from "react-dom";
-import { Provider } from "react-redux";
-import "./index.css";
-import App from "./App";
-import { create } from "./store";
-
-const store = create();
-
-ReactDOM.render(
-
-
- ,
- document.getElementById("root")
-);
diff --git a/packages/webamp-modern-2/src/index.ts b/packages/webamp-modern/src/index.ts
similarity index 99%
rename from packages/webamp-modern-2/src/index.ts
rename to packages/webamp-modern/src/index.ts
index 87a80c81..88553011 100644
--- a/packages/webamp-modern-2/src/index.ts
+++ b/packages/webamp-modern/src/index.ts
@@ -47,6 +47,8 @@ async function loadSkin(skinData: Blob) {
// This is always the same as the global singleton.
const uiRoot = await parser.parse();
+ uiRoot.loadTrueTypeFonts();
+
const start = performance.now();
uiRoot.enableDefaultGammaSet();
const end = performance.now();
diff --git a/packages/webamp-modern/src/initialize.js b/packages/webamp-modern/src/initialize.js
deleted file mode 100644
index 846c0c90..00000000
--- a/packages/webamp-modern/src/initialize.js
+++ /dev/null
@@ -1,254 +0,0 @@
-import * as Utils from "./utils";
-import MakiObject from "./runtime/MakiObject";
-import GuiObject from "./runtime/GuiObject";
-import JsWinampAbstractionLayer from "./runtime/JsWinampAbstractionLayer";
-import Layout from "./runtime/Layout";
-import Layer from "./runtime/Layer";
-import Container from "./runtime/Container";
-import JsScript from "./runtime/JsScript";
-import JsElements from "./runtime/JsElements";
-import JsGammaSet from "./runtime/JsGammaSet";
-import JsGroupDef from "./runtime/JsGroupDef";
-import Group from "./runtime/Group";
-import Button from "./runtime/Button";
-import ToggleButton from "./runtime/ToggleButton";
-import Text from "./runtime/Text";
-import Status from "./runtime/Status";
-import Slider from "./runtime/Slider";
-import Vis from "./runtime/Vis";
-import EqVis from "./runtime/EqVis";
-import AnimatedLayer from "./runtime/AnimatedLayer";
-import WindowHolder from "./runtime/WindowHolder";
-
-async function prepareMakiImage(node, zip, file) {
- let { h, w } = node.attributes;
- // TODO: Escape file for regex
- const img = Utils.getCaseInsensitveFile(zip, file);
- if (img === undefined) {
- return {};
- }
- const imgBlob = await img.async("blob");
- const imgUrl = await Utils.getUrlFromBlob(imgBlob);
- if (w === undefined || h === undefined) {
- const { width, height } = await Utils.getSizeFromUrl(imgUrl);
- w = width;
- h = height;
- }
-
- return {
- h,
- w,
- imgUrl,
- };
-}
-
-const noop = (node, parent) => new GuiObject(node, parent);
-
-const parsers = {
- groupdef: (node, parent) => new JsGroupDef(node, parent),
- skininfo: noop,
- guiobject: noop,
- version: noop,
- name: noop,
- comment: noop,
- syscmds: noop,
- author: noop,
- email: noop,
- homepage: noop,
- screenshot: noop,
- container: (node, parent) => new Container(node, parent),
- scripts: noop,
- gammaset: (node, parent) => new JsGammaSet(node, parent),
- color: noop,
- layer: (node, parent) => new Layer(node, parent),
- layoutstatus: noop,
- hideobject: noop,
- button: (node, parent) => new Button(node, parent),
- group: (node, parent) => new Group(node, parent),
- layout: (node, parent) => new Layout(node, parent),
- sendparams: noop,
- elements: (node, parent) => new JsElements(node, parent),
- bitmap: noop,
- eqvis: (node, parent) => new EqVis(node, parent),
- slider: (node, parent) => new Slider(node, parent),
- gammagroup: noop,
- truetypefont: async (node, parent, zip) => {
- const { file } = node.attributes;
- const font = Utils.getCaseInsensitveFile(zip, file);
- if (!font) {
- console.warn(`Unable to find font file ${file}`);
- return new MakiObject(node, parent);
- }
- const fontBlob = await font.async("blob");
- const fontUrl = await Utils.getUrlFromBlob(fontBlob);
- const fontFamily = `font-${Utils.getId()}-${file.replace(/\./, "_")}`;
- try {
- await Utils.loadFont(fontUrl, fontFamily);
- } catch {
- console.warn(`Failed to load font ${fontFamily}`);
- return new MakiObject(node, parent);
- }
- return new MakiObject(node, parent, { fontFamily });
- },
- component: (node, parent) => new WindowHolder(node, parent),
- text: (node, parent) => new Text(node, parent),
- togglebutton: (node, parent) => new ToggleButton(node, parent),
- status: (node, parent) => new Status(node, parent),
- bitmapfont: noop,
- vis: (node, parent) => new Vis(node, parent),
- "wasabi:titlebar": noop,
- "colorthemes:list": noop,
- "wasabi:standardframe:status": noop,
- "wasabi:standardframe:nostatus": noop,
- "wasabi:button": noop,
- accelerators: noop,
- accelerator: noop,
- cursor: noop,
- elementalias: noop,
- grid: noop,
- rect: noop,
- animatedlayer: (node, parent) => new AnimatedLayer(node, parent),
- nstatesbutton: noop,
- songticker: noop,
- menu: noop,
- albumart: noop,
- playlistplus: noop,
- script: (node, parent) => new JsScript(node, parent),
-};
-
-async function parseChildren(node, children, zip) {
- if (node.type === "comment") {
- return;
- }
- if (node.name == null) {
- console.error(node);
- throw new Error("Unknown node");
- }
-
- const resolvedChildren = await Promise.all(
- children.map(async (child) => {
- if (child.type === "comment") {
- return;
- }
- if (child.type === "text") {
- // TODO: Handle text
- return new MakiObject({ ...child }, node, undefined);
- }
- if (child.name == null) {
- console.error(child);
- throw new Error("Unknown node");
- }
- const childName = child.name.toLowerCase();
- if (childName == null) {
- console.error(node);
- throw new Error("Unknown node");
- }
-
- let childParser = parsers[childName];
- if (childParser == null) {
- console.warn(`Missing parser in initialize for ${childName}`);
- childParser = noop;
- }
- const parsedChild = await childParser(child, node, zip);
- child.maki = parsedChild;
- if (child.children != null && child.children.length > 0) {
- await parseChildren(parsedChild, child.children, zip);
- }
- return parsedChild;
- })
- );
- // remove comments other trimmed nodes
- const filteredChildren = resolvedChildren.filter(
- (item) => item !== undefined
- );
-
- node.js_addChildren(filteredChildren);
-}
-
-async function nodeImageLookup(node, root, zip) {
- const imageAttributes = Utils.imageAttributesFromNode(node);
- if (!imageAttributes || imageAttributes.length === 0) {
- return;
- }
- if (!node.attributes.js_assets) {
- node.attributes.js_assets = {};
- }
- await Promise.all(
- imageAttributes.map(async (attribute) => {
- const image = node.attributes[attribute];
- if (!image || !Utils.isString(image)) {
- return;
- }
- let img;
- if (image.endsWith(".png")) {
- img = await prepareMakiImage(node, zip, image);
- } else {
- const elementNode = Utils.findXmlElementById(node, image, root);
- if (elementNode) {
- img = await prepareMakiImage(
- elementNode,
- zip,
- elementNode.attributes.file
- );
-
- const { x, y } = elementNode.attributes;
- img.x = x !== undefined ? x : 0;
- img.y = y !== undefined ? y : 0;
- } else {
- console.warn("Unable to find image:", image);
- }
- }
- node.attributes.js_assets[attribute.toLowerCase()] = img;
- })
- );
-}
-
-async function applyImageLookups(root, zip) {
- await Utils.asyncTreeFlatMap(root, async (node) => {
- await nodeImageLookup(node, root, zip);
- return node;
- });
-}
-
-async function applyGroupDefs(root) {
- await Utils.asyncTreeFlatMap(root, async (node) => {
- switch (node.name) {
- case "group": {
- if (!node.children || node.children.length === 0) {
- const groupdef = node.js_groupdefLookup(node.attributes.id);
- if (!groupdef) {
- console.warn(
- "Unable to find groupdef. Rendering null",
- node.attributes.id
- );
- return {};
- }
- node.children = groupdef.children;
- // Do we need to copy the items instead of just changing the parent?
- node.children.forEach((item) => {
- item.parent = node;
- });
- node.attributes = {
- ...node.attributes,
- ...groupdef.attributes,
- };
- }
- return {};
- }
- default: {
- return node;
- }
- }
- });
-}
-
-async function initialize(zip, skinXml) {
- const xmlRoot = skinXml.children[0];
- await applyImageLookups(xmlRoot, zip);
- const root = new JsWinampAbstractionLayer(xmlRoot, null, undefined);
- await parseChildren(root, xmlRoot.children, zip);
- await applyGroupDefs(root);
- return root;
-}
-
-export default initialize;
diff --git a/packages/webamp-modern/src/initializeStateTree.ts b/packages/webamp-modern/src/initializeStateTree.ts
deleted file mode 100644
index 4b95f25d..00000000
--- a/packages/webamp-modern/src/initializeStateTree.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { XmlTree } from "./types";
-
-export default async function initializeStateTree(
- xmlTree: XmlTree
-): Promise {
- return xmlTree;
-}
diff --git a/packages/webamp-modern/src/logo.svg b/packages/webamp-modern/src/logo.svg
deleted file mode 100644
index 6b60c104..00000000
--- a/packages/webamp-modern/src/logo.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/packages/webamp-modern/src/maki-interpreter/constants.js b/packages/webamp-modern/src/maki-interpreter/constants.js
deleted file mode 100644
index 3354f0c5..00000000
--- a/packages/webamp-modern/src/maki-interpreter/constants.js
+++ /dev/null
@@ -1,79 +0,0 @@
-const COMMANDS = {
- 1: { name: "push", short: "", arg: "var", in: "0", out: "1" },
- 2: { name: "pop", short: "pop", in: "1", out: "0" },
- 3: {
- name: "popTo",
- short: "popTo",
- arg: "var",
- in: "0",
- out: "0",
- // note in fact popTo takes one
- // argument but it is not visible to the parser because popTo
- // is always at the start of a function
- },
- 8: { name: "eq", short: "==", in: "2", out: "1" },
- 9: { name: "heq", short: "!=", in: "2", out: "1" },
- 10: { name: "gt", short: ">", in: "2", out: "1" },
- 11: { name: "gtq", short: ">=", in: "2", out: "1" },
- 12: { name: "le", short: "<", in: "2", out: "1" },
- 13: { name: "leq", short: "<=", in: "2", out: "1" },
-
- 16: { name: "jumpIf", short: "if", arg: "line", in: "1", out: "0" },
- 17: { name: "jumpIfNot", arg: "line", in: "1", out: "0" },
- 18: { name: "jump", arg: "line", in: "0", out: "0" },
-
- 24: { name: "call", arg: "objFunc", in: "0", out: "1" },
- 25: { name: "callGlobal", arg: "func", in: "0", out: "1" },
-
- 33: {
- name: "ret",
- short: "return",
- in: "1",
- out: "0", // note: we claim that return
- // pops one argument from the stack, which ist not the full truth.
- },
-
- 40: { name: "complete", short: "complete", in: "0", out: "0" },
-
- 48: { name: "mov", short: "=", in: "2", out: "1" },
-
- 56: { name: "postinc", short: "++", post: 1, in: "1", out: "1" },
- 57: { name: "postdec", short: "--", post: 1, in: "1", out: "1" },
- 58: { name: "preinc", short: "++", in: "1", out: "1" },
- 59: { name: "predec", short: "--", in: "1", out: "1" },
-
- 64: { name: "add", short: "+", in: "2", out: "1" },
- 65: { name: "sub", short: "-", in: "2", out: "1" },
- 66: { name: "mul", short: "*", in: "2", out: "1" },
- 67: { name: "div", short: "/", in: "2", out: "1" },
- 68: { name: "mod", short: "%", in: "2", out: "1" },
-
- 72: { name: "and", short: "&", in: "2", out: "1" },
- 73: { name: "or", short: "|", in: "2", out: "1" },
- 74: { name: "not", short: "!", in: "1", out: "1" },
- 76: { name: "negative", short: "-", in: "1", out: "1" },
-
- 80: { name: "logAnd", short: "&&", in: "2", out: "1" },
- 81: { name: "logOr", short: "||", in: "2", out: "1" },
-
- // The decompiler has these next two as 90 and 91.
- 88: { name: "lshift", short: "<<", in: "2", out: "1" },
- 89: { name: "rshift", short: ">>", in: "2", out: "1" },
-
- 90: { name: "lshift", short: "<<", in: "2", out: "1" },
- 91: { name: "rshift", short: ">>", in: "2", out: "1" },
-
- 96: { name: "new", arg: "obj", in: "0", out: "1" },
- 97: { name: "delete", short: "delete", in: "1", out: "1" },
-
- 112: { name: "strangeCall", arg: "objFunc", in: "0", out: "1" },
-
- // Mystery opcode
- // "255": { name: "MYSTERY", short: "WAT", in: "0", out: "0" },
-
- 300: { name: "blockStart", short: "{", in: "0", out: "0" },
-
- 301: { name: "blockEnd", short: "}", in: "0", out: "0" },
-};
-
-module.exports = { COMMANDS };
diff --git a/packages/webamp-modern/src/maki-interpreter/interpreter.js b/packages/webamp-modern/src/maki-interpreter/interpreter.js
deleted file mode 100644
index f9384fee..00000000
--- a/packages/webamp-modern/src/maki-interpreter/interpreter.js
+++ /dev/null
@@ -1,360 +0,0 @@
-import Variable from "./variable";
-import { isPromise, unimplementedWarning } from "../utils";
-
-export function interpret(start, program) {
- const interpreter = new Interpreter(program);
- return interpreter.interpret(start);
-}
-
-class Interpreter {
- constructor(program) {
- const { commands, methods, variables, classes } = program;
- this.commands = commands;
- this.methods = methods;
- this.variables = variables;
- this.classes = classes;
-
- this.stack = [];
- this.callStack = [];
- }
-
- interpret(start) {
- // Instruction Pointer
- let ip = start;
- while (ip < this.commands.length) {
- const command = this.commands[ip];
-
- switch (command.opcode) {
- // push
- case 1: {
- const offsetIntoVariables = command.arg;
- this.stack.push(this.variables[offsetIntoVariables]);
- break;
- }
- // pop
- case 2: {
- this.stack.pop();
- break;
- }
- // popTo
- case 3: {
- const aValue = this.popStackValue();
- const offsetIntoVariables = command.arg;
- const toVar = this.variables[offsetIntoVariables];
- toVar.setValue(aValue);
- break;
- }
- // ==
- case 8: {
- const a = this.stack.pop();
- const b = this.stack.pop();
- switch (a.type) {
- case "INT":
- case "FLOAT":
- case "DOUBLE":
- case "BOOLEAN": {
- break;
- }
- case "STRING": {
- break;
- }
- default:
- throw new Error(`Unexpected type: ${a}`);
- }
- let aValue = this.getValue(a);
- const bValue = this.getValue(b);
-
- aValue = this.coerceTypes__DEPRECATED(a, b);
- const result = Variable.newInt(bValue === aValue);
- this.stack.push(result);
- break;
- }
- // !=
- case 9: {
- this.twoArgCoercingOperator((b, a) => b !== a);
- break;
- }
- // >
- case 10: {
- this.twoArgCoercingOperator((b, a) => b > a);
- break;
- }
- // >=
- case 11: {
- this.twoArgCoercingOperator((b, a) => b >= a);
- break;
- }
- // <
- case 12: {
- this.twoArgCoercingOperator((b, a) => b < a);
- break;
- }
- // <=
- case 13: {
- this.twoArgCoercingOperator((b, a) => b <= a);
- break;
- }
- // jumpIf
- case 16: {
- const value = this.popStackValue();
- // This seems backwards. Seems like we're doing a "jump if not"
- if (value) {
- break;
- }
- ip = command.arg - 1;
- break;
- }
- // jumpIfNot
- case 17: {
- const value = this.popStackValue();
- // This seems backwards. Same as above
- if (!value) {
- break;
- }
- ip = command.arg - 1;
- break;
- }
- // jump
- case 18: {
- ip = command.arg - 1;
- break;
- }
- // call
- // strangeCall (seems to behave just like regular call)
- case 24:
- case 112: {
- const methodOffset = command.arg;
- const method = this.methods[methodOffset];
- let methodName = method.name;
- const classesOffset = method.typeOffset;
- methodName = methodName.toLowerCase();
-
- const klass = this.classes[classesOffset];
- if (!klass) {
- throw new Error("Need to add a missing class to runtime");
- }
- // This is a bit awkward. Because the variables are stored on the stack
- // before the object, we have to find the number of arguments without
- // actually having access to the object instance.
- if (!klass.prototype[methodName]) {
- throw new Error(
- `Need to add missing function (${methodName}) to ${klass.name}`
- );
- }
- let argCount = klass.prototype[methodName].length;
-
- const methodArgs = [];
- while (argCount--) {
- const aValue = this.popStackValue();
- methodArgs.push(aValue);
- }
- const obj = this.popStackValue();
- let value = obj[methodName](...methodArgs);
- if (isPromise(value)) {
- throw new Error("Did not expect maki method to return promise");
- }
- if (value === null) {
- // variables[1] holds global NULL value
- value = this.variables[1];
- }
- this.stack.push(value);
- break;
- }
- // callGlobal
- case 25: {
- this.callStack.push(ip);
- const offset = command.arg;
-
- ip = offset - 1; // -1 because we ++ after the switch
- break;
- }
- // return
- case 33: {
- ip = this.callStack.pop();
- // TODO: Stack protection?
- break;
- }
- // complete
- case 40: {
- // noop for now
- unimplementedWarning("OPCODE: complete");
- break;
- }
- // mov
- case 48: {
- const a = this.stack.pop();
- const b = this.stack.pop();
- let aValue = a instanceof Variable ? a.getValue() : a;
- if (b.type === "INT") {
- aValue = Math.floor(aValue);
- }
- b.setValue(aValue);
- this.stack.push(aValue);
- break;
- }
- // postinc
- case 56: {
- const a = this.stack.pop();
- const aValue = a.getValue();
- a.setValue(aValue + 1);
- this.stack.push(aValue);
- break;
- }
- // postdec
- case 57: {
- const a = this.stack.pop();
- const aValue = a.getValue();
- a.setValue(aValue - 1);
- this.stack.push(aValue);
- break;
- }
- // preinc
- case 58: {
- const a = this.stack.pop();
- const aValue = a.getValue() + 1;
- a.setValue(aValue);
- this.stack.push(aValue);
- break;
- }
- // predec
- case 59: {
- const a = this.stack.pop();
- const aValue = a.getValue() - 1;
- a.setValue(aValue);
- this.stack.push(aValue);
- break;
- }
- // + (add)
- case 64: {
- this.twoArgOperator((b, a) => b + a);
- break;
- }
- // - (subtract)
- case 65: {
- this.twoArgOperator((b, a) => b - a);
- break;
- }
- // * (multiply)
- case 66: {
- this.twoArgOperator((b, a) => b * a);
- break;
- }
- // / (divide)
- case 67: {
- this.twoArgOperator((b, a) => b / a);
- break;
- }
- // % (mod)
- case 68: {
- const a = this.stack.pop();
- const b = this.stack.pop();
- const aValue = a instanceof Variable ? a.getValue() : a;
- let bValue = b instanceof Variable ? b.getValue() : b;
- // Need to coerce LHS if not int, RHS is always int (enforced by compiler)
- if (b.type === "FLOAT" || b.type === "DOUBLE") {
- bValue = Math.floor(bValue);
- }
- this.stack.push(bValue % aValue);
- break;
- }
- // & (binary and)
- case 72: {
- this.twoArgOperator((b, a) => b & a);
- break;
- }
- // | (binary or)
- case 73: {
- this.twoArgOperator((b, a) => b | a);
- break;
- }
- // ! (not)
- case 74: {
- const aValue = this.popStackValue();
- this.stack.push(aValue ? 0 : 1);
- break;
- }
- // - (negative)
- case 76: {
- const aValue = this.popStackValue();
- this.stack.push(-aValue);
- break;
- }
- // logAnd (&&)
- case 80: {
- this.twoArgOperator((b, a) => b && a);
- break;
- }
- // logOr ||
- case 81: {
- this.twoArgOperator((b, a) => b || a);
- break;
- }
- // <<
- case 88: {
- this.twoArgOperator((b, a) => b << a);
- break;
- }
- // >>
- case 89: {
- this.twoArgOperator((b, a) => b >> a);
- break;
- }
- // new
- case 96: {
- const classesOffset = command.arg;
- const Klass = this.classes[classesOffset];
- const system = this.variables[0].getValue();
- const klassInst = new Klass(null, system.getscriptgroup());
- this.stack.push(klassInst);
- break;
- }
- // delete
- case 97: {
- const aValue = this.popStackValue();
- aValue.js_delete();
- break;
- }
- default:
- throw new Error(`Unhandled opcode ${command.opcode}`);
- }
-
- ip++;
- }
- }
-
- getValue(v) {
- return v instanceof Variable ? v.getValue() : v;
- }
-
- popStackValue() {
- const v = this.stack.pop();
- return this.getValue(v);
- }
-
- twoArgCoercingOperator(operator) {
- const a = this.stack.pop();
- const b = this.stack.pop();
- let aValue = this.getValue(a);
- const bValue = this.getValue(b);
-
- aValue = this.coerceTypes__DEPRECATED(a, b);
- this.stack.push(operator(bValue, aValue));
- }
-
- twoArgOperator(operator) {
- const aValue = this.popStackValue();
- const bValue = this.popStackValue();
-
- this.stack.push(operator(bValue, aValue));
- }
-
- coerceTypes__DEPRECATED(var1, var2) {
- if (var2.type === "INT") {
- if (var1.type === "FLOAT" || var1.type === "DOUBLE") {
- return Math.floor(this.getValue(var1));
- }
- }
-
- return this.getValue(var1);
- }
-}
diff --git a/packages/webamp-modern/src/maki-interpreter/objectData/config.json b/packages/webamp-modern/src/maki-interpreter/objectData/config.json
deleted file mode 100644
index 9c70d82b..00000000
--- a/packages/webamp-modern/src/maki-interpreter/objectData/config.json
+++ /dev/null
@@ -1,123 +0,0 @@
-{
- "593DBA22D0774976B952F4713655400B": {
- "parent": "Object",
- "functions": [
- {
- "result": "ConfigItem",
- "name": "getItem",
- "parameters": [
- [
- "String",
- "item_name"
- ]
- ]
- },
- {
- "result": "ConfigItem",
- "name": "getItemByGuid",
- "parameters": [
- [
- "String",
- "item_guid"
- ]
- ]
- },
- {
- "result": "ConfigItem",
- "name": "newItem",
- "parameters": [
- [
- "String",
- "item_name"
- ],
- [
- "String",
- "item_guid"
- ]
- ]
- }
- ],
- "name": "Config"
- },
- "D40302823AAB4d87878D12326FADFCD5": {
- "parent": "Object",
- "functions": [
- {
- "result": "ConfigAttribute",
- "name": "getAttribute",
- "parameters": [
- [
- "String",
- "attr_name"
- ]
- ]
- },
- {
- "result": "ConfigAttribute",
- "name": "newAttribute",
- "parameters": [
- [
- "String",
- "attr_name"
- ],
- [
- "String",
- "default_value"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getGuid",
- "parameters": [
- [
- "String",
- "attr_name"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getName",
- "parameters": []
- }
- ],
- "name": "ConfigItem"
- },
- "24DEC283B76E4a368CCC9E24C46B6C73": {
- "parent": "Object",
- "functions": [
- {
- "result": "",
- "name": "setData",
- "parameters": [
- [
- "String",
- "value"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getData",
- "parameters": []
- },
- {
- "result": "",
- "name": "onDataChanged",
- "parameters": []
- },
- {
- "result": "ConfigItem",
- "name": "getParentItem",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getAttributeName",
- "parameters": []
- }
- ],
- "name": "ConfigAttribute"
- }
-}
\ No newline at end of file
diff --git a/packages/webamp-modern/src/maki-interpreter/objectData/pldir.json b/packages/webamp-modern/src/maki-interpreter/objectData/pldir.json
deleted file mode 100644
index d96969fa..00000000
--- a/packages/webamp-modern/src/maki-interpreter/objectData/pldir.json
+++ /dev/null
@@ -1,269 +0,0 @@
-{
- "345BEEBC0229492190BE6CB6A49A79D9": {
- "parent": "Object",
- "functions": [
- {
- "result": "int",
- "name": "getNumTracks",
- "parameters": []
- },
- {
- "result": "int",
- "name": "getCurrentIndex",
- "parameters": []
- },
- {
- "result": "int",
- "name": "getNumSelectedTracks",
- "parameters": []
- },
- {
- "result": "int",
- "name": "getNextSelectedTrack",
- "parameters": [
- [
- "int",
- "i"
- ]
- ]
- },
- {
- "result": "",
- "name": "showCurrentlyPlayingTrack",
- "parameters": []
- },
- {
- "result": "",
- "name": "showTrack",
- "parameters": [
- [
- "int",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "enqueueFile",
- "parameters": [
- [
- "string",
- "file"
- ]
- ]
- },
- {
- "result": "",
- "name": "clear",
- "parameters": []
- },
- {
- "result": "",
- "name": "removeTrack",
- "parameters": [
- [
- "int",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "swapTracks",
- "parameters": [
- [
- "int",
- "item1"
- ],
- [
- "int",
- "item2"
- ]
- ]
- },
- {
- "result": "",
- "name": "moveUp",
- "parameters": [
- [
- "int",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "moveDown",
- "parameters": [
- [
- "int",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "moveTo",
- "parameters": [
- [
- "int",
- "item"
- ],
- [
- "int",
- "pos"
- ]
- ]
- },
- {
- "result": "",
- "name": "playTrack",
- "parameters": [
- [
- "int",
- "item"
- ]
- ]
- },
- {
- "result": "int",
- "name": "getRating",
- "parameters": [
- [
- "int",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "setRating",
- "parameters": [
- [
- "int",
- "item"
- ],
- [
- "int",
- "rating"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getTitle",
- "parameters": [
- [
- "int",
- "item"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getLength",
- "parameters": [
- [
- "int",
- "item"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getMetaData",
- "parameters": [
- [
- "int",
- "item"
- ],
- [
- "String",
- "metadatastring"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getFileName",
- "parameters": [
- [
- "int",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "onPleditModified",
- "parameters": []
- }
- ],
- "name": "PlEdit"
- },
- "61A7ABAD7D7941f6B1D0E1808603A4F4": {
- "parent": "Object",
- "functions": [
- {
- "result": "int",
- "name": "getNumItems",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getItemName",
- "parameters": [
- [
- "int",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "showCurrentlyPlayingEntry",
- "parameters": []
- },
- {
- "result": "",
- "name": "refresh",
- "parameters": []
- },
- {
- "result": "",
- "name": "renameItem",
- "parameters": [
- [
- "int",
- "item"
- ],
- [
- "String",
- "name"
- ]
- ]
- },
- {
- "result": "",
- "name": "enqueueItem",
- "parameters": [
- [
- "int",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "playItem",
- "parameters": [
- [
- "int",
- "item"
- ]
- ]
- }
- ],
- "name": "PlDir"
- }
-}
\ No newline at end of file
diff --git a/packages/webamp-modern/src/maki-interpreter/objectData/std.json b/packages/webamp-modern/src/maki-interpreter/objectData/std.json
deleted file mode 100644
index 3b71bd72..00000000
--- a/packages/webamp-modern/src/maki-interpreter/objectData/std.json
+++ /dev/null
@@ -1,7243 +0,0 @@
-{
- "516549710D874a5191E3A6B53235F3E7": {
- "parent": "@{00000000-0000-0000-0000-000000000000}@",
- "functions": [
- {
- "result": "String",
- "name": "getClassName",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getId",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "onNotify",
- "parameters": [
- [
- "String",
- "command"
- ],
- [
- "String",
- "param"
- ],
- [
- "int",
- "a"
- ],
- [
- "int",
- "b"
- ]
- ]
- }
- ],
- "name": "Object"
- },
- "D6F50F6493FA49b793F1BA66EFAE3E98": {
- "parent": "Object",
- "functions": [
- {
- "result": "",
- "name": "onScriptLoaded",
- "parameters": []
- },
- {
- "result": "",
- "name": "onScriptUnloading",
- "parameters": []
- },
- {
- "result": "",
- "name": "onQuit",
- "parameters": []
- },
- {
- "result": "",
- "name": "onSetXuiParam",
- "parameters": [
- [
- "String",
- "param"
- ],
- [
- "String",
- "value"
- ]
- ]
- },
- {
- "result": "",
- "name": "onKeyDown",
- "parameters": [
- [
- "String",
- "key"
- ]
- ]
- },
- {
- "result": "",
- "name": "onAccelerator",
- "parameters": [
- [
- "String",
- "action"
- ],
- [
- "String",
- "section"
- ],
- [
- "String",
- "key"
- ]
- ]
- },
- {
- "result": "",
- "name": "onCreateLayout",
- "parameters": [
- [
- "Layout",
- "_layout"
- ]
- ]
- },
- {
- "result": "",
- "name": "onShowLayout",
- "parameters": [
- [
- "Layout",
- "_layout"
- ]
- ]
- },
- {
- "result": "",
- "name": "onHideLayout",
- "parameters": [
- [
- "Layout",
- "_layout"
- ]
- ]
- },
- {
- "result": "",
- "name": "onViewPortChanged",
- "parameters": [
- [
- "int",
- "width"
- ],
- [
- "int",
- "height"
- ]
- ]
- },
- {
- "result": "",
- "name": "onStop",
- "parameters": []
- },
- {
- "result": "",
- "name": "onPlay",
- "parameters": []
- },
- {
- "result": "",
- "name": "onPause",
- "parameters": []
- },
- {
- "result": "",
- "name": "onResume",
- "parameters": []
- },
- {
- "result": "",
- "name": "onTitleChange",
- "parameters": [
- [
- "String",
- "newtitle"
- ]
- ]
- },
- {
- "result": "",
- "name": "onTitle2Change",
- "parameters": [
- [
- "String",
- "newtitle2"
- ]
- ]
- },
- {
- "result": "",
- "name": "onUrlChange",
- "parameters": [
- [
- "String",
- "url"
- ]
- ]
- },
- {
- "result": "",
- "name": "onInfoChange",
- "parameters": [
- [
- "String",
- "info"
- ]
- ]
- },
- {
- "result": "",
- "name": "onStatusMsg",
- "parameters": [
- [
- "String",
- "msg"
- ]
- ]
- },
- {
- "result": "",
- "name": "onEqBandChanged",
- "parameters": [
- [
- "int",
- "band"
- ],
- [
- "int",
- "newvalue"
- ]
- ]
- },
- {
- "result": "",
- "name": "onEqPreampChanged",
- "parameters": [
- [
- "int",
- "newvalue"
- ]
- ]
- },
- {
- "result": "",
- "name": "onEqChanged",
- "parameters": [
- [
- "int",
- "newstatus"
- ]
- ]
- },
- {
- "result": "",
- "name": "onEqFreqChanged",
- "parameters": [
- [
- "int",
- "isiso"
- ]
- ]
- },
- {
- "result": "",
- "name": "onVolumeChanged",
- "parameters": [
- [
- "int",
- "newvol"
- ]
- ]
- },
- {
- "result": "",
- "name": "onSeek",
- "parameters": [
- [
- "int",
- "newpos"
- ]
- ]
- },
- {
- "result": "Container",
- "name": "getContainer",
- "parameters": [
- [
- "String",
- "container_id"
- ]
- ]
- },
- {
- "result": "Container",
- "name": "newDynamicContainer",
- "parameters": [
- [
- "String",
- "container_id"
- ]
- ]
- },
- {
- "result": "Group",
- "name": "newGroup",
- "parameters": [
- [
- "String",
- "group_id"
- ]
- ]
- },
- {
- "result": "Layout",
- "name": "newGroupAsLayout",
- "parameters": [
- [
- "String",
- "group_id"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getNumContainers",
- "parameters": []
- },
- {
- "result": "Container",
- "name": "enumContainer",
- "parameters": [
- [
- "Int",
- "num"
- ]
- ]
- },
- {
- "result": "String",
- "name": "enumEmbedGUID",
- "parameters": [
- [
- "int",
- "num"
- ]
- ]
- },
- {
- "result": "Wac",
- "name": "getWac",
- "parameters": [
- [
- "String",
- "wac_guid"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "messageBox",
- "parameters": [
- [
- "String",
- "message"
- ],
- [
- "String",
- "msgtitle"
- ],
- [
- "Int",
- "flag"
- ],
- [
- "String",
- "notanymore_id"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getPlayItemString",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getPlayItemLength",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getPlayItemMetaDataString",
- "parameters": [
- [
- "String",
- "metadataname"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getMetaDataString",
- "parameters": [
- [
- "String",
- "filename"
- ],
- [
- "String",
- "metadataname"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getPlayItemDisplayTitle",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getCurrentTrackRating",
- "parameters": []
- },
- {
- "result": "",
- "name": "onCurrentTrackRated",
- "parameters": [
- [
- "int",
- "rating"
- ]
- ]
- },
- {
- "result": "",
- "name": "setCurrentTrackRating",
- "parameters": [
- [
- "int",
- "rating"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getExtFamily",
- "parameters": [
- [
- "String",
- "ext"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getDecoderName",
- "parameters": [
- [
- "string",
- "playitem"
- ]
- ]
- },
- {
- "result": "",
- "name": "playFile",
- "parameters": [
- [
- "String",
- "playitem"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getAlbumArt",
- "parameters": [
- [
- "String",
- "playitem"
- ]
- ]
- },
- {
- "result": "",
- "name": "downloadMedia",
- "parameters": [
- [
- "String",
- "url"
- ],
- [
- "String",
- "destinationPath"
- ],
- [
- "boolean",
- "wantAddToML"
- ],
- [
- "boolean",
- "notifyDownloadsList"
- ]
- ]
- },
- {
- "result": "",
- "name": "downloadURL",
- "parameters": [
- [
- "String",
- "url"
- ],
- [
- "String",
- "destination_filename"
- ],
- [
- "String",
- "progress_dialog_title"
- ]
- ]
- },
- {
- "result": "",
- "name": "onDownloadFinished",
- "parameters": [
- [
- "String",
- "url"
- ],
- [
- "boolean",
- "success"
- ],
- [
- "String",
- "filename"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getDownloadPath",
- "parameters": []
- },
- {
- "result": "",
- "name": "setDownloadPath",
- "parameters": [
- [
- "String",
- "new_path"
- ]
- ]
- },
- {
- "result": "",
- "name": "enqueueFile",
- "parameters": [
- [
- "String",
- "playitem"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getLeftVuMeter",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getRightVuMeter",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getVolume",
- "parameters": []
- },
- {
- "result": "",
- "name": "setVolume",
- "parameters": [
- [
- "Int",
- "vol"
- ]
- ]
- },
- {
- "result": "",
- "name": "play",
- "parameters": []
- },
- {
- "result": "",
- "name": "stop",
- "parameters": []
- },
- {
- "result": "",
- "name": "pause",
- "parameters": []
- },
- {
- "result": "",
- "name": "next",
- "parameters": []
- },
- {
- "result": "",
- "name": "previous",
- "parameters": []
- },
- {
- "result": "",
- "name": "eject",
- "parameters": []
- },
- {
- "result": "",
- "name": "seekTo",
- "parameters": [
- [
- "Int",
- "pos"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getPosition",
- "parameters": []
- },
- {
- "result": "",
- "name": "setEqBand",
- "parameters": [
- [
- "int",
- "band"
- ],
- [
- "Int",
- "value"
- ]
- ]
- },
- {
- "result": "",
- "name": "setEqPreamp",
- "parameters": [
- [
- "Int",
- "value"
- ]
- ]
- },
- {
- "result": "",
- "name": "setEq",
- "parameters": [
- [
- "Int",
- "onoff"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getEqBand",
- "parameters": [
- [
- "int",
- "band"
- ]
- ]
- },
- {
- "result": "int",
- "name": "getEqPreamp",
- "parameters": []
- },
- {
- "result": "int",
- "name": "getEq",
- "parameters": []
- },
- {
- "result": "int",
- "name": "getMousePosX",
- "parameters": []
- },
- {
- "result": "int",
- "name": "getMousePosY",
- "parameters": []
- },
- {
- "result": "String",
- "name": "integerToString",
- "parameters": [
- [
- "Int",
- "value"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "StringToInteger",
- "parameters": [
- [
- "String",
- "str"
- ]
- ]
- },
- {
- "result": "String",
- "name": "floatToString",
- "parameters": [
- [
- "float",
- "value"
- ],
- [
- "int",
- "ndigits"
- ]
- ]
- },
- {
- "result": "Float",
- "name": "stringToFloat",
- "parameters": [
- [
- "String",
- "str"
- ]
- ]
- },
- {
- "result": "String",
- "name": "integerToLongTime",
- "parameters": [
- [
- "Int",
- "value"
- ]
- ]
- },
- {
- "result": "String",
- "name": "integerToTime",
- "parameters": [
- [
- "Int",
- "value"
- ]
- ]
- },
- {
- "result": "String",
- "name": "dateToTime",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "String",
- "name": "dateToLongTime",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "String",
- "name": "formatDate",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "String",
- "name": "formatLongDate",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getDateYear",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getDateMonth",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getDateDay",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getDateDow",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getDateDoy",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getDateHour",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getDateMin",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getDateSec",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getDateDst",
- "parameters": [
- [
- "Int",
- "datetime"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getDate",
- "parameters": []
- },
- {
- "result": "String",
- "name": "strmid",
- "parameters": [
- [
- "String",
- "str"
- ],
- [
- "Int",
- "start"
- ],
- [
- "Int",
- "len"
- ]
- ]
- },
- {
- "result": "String",
- "name": "strleft",
- "parameters": [
- [
- "string",
- "str"
- ],
- [
- "int",
- "nchars"
- ]
- ]
- },
- {
- "result": "string",
- "name": "strright",
- "parameters": [
- [
- "string",
- "str"
- ],
- [
- "int",
- "nchars"
- ]
- ]
- },
- {
- "result": "int",
- "name": "strsearch",
- "parameters": [
- [
- "string",
- "str"
- ],
- [
- "string",
- "substr"
- ]
- ]
- },
- {
- "result": "int",
- "name": "strlen",
- "parameters": [
- [
- "string",
- "str"
- ]
- ]
- },
- {
- "result": "string",
- "name": "strupper",
- "parameters": [
- [
- "string",
- "str"
- ]
- ]
- },
- {
- "result": "string",
- "name": "strlower",
- "parameters": [
- [
- "string",
- "str"
- ]
- ]
- },
- {
- "result": "string",
- "name": "urlEncode",
- "parameters": [
- [
- "string",
- "url"
- ]
- ]
- },
- {
- "result": "string",
- "name": "urlDecode",
- "parameters": [
- [
- "string",
- "url"
- ]
- ]
- },
- {
- "result": "string",
- "name": "parseATF",
- "parameters": [
- [
- "string",
- "topass"
- ]
- ]
- },
- {
- "result": "string",
- "name": "removePath",
- "parameters": [
- [
- "string",
- "str"
- ]
- ]
- },
- {
- "result": "string",
- "name": "getPath",
- "parameters": [
- [
- "string",
- "str"
- ]
- ]
- },
- {
- "result": "string",
- "name": "getExtension",
- "parameters": [
- [
- "string",
- "str"
- ]
- ]
- },
- {
- "result": "string",
- "name": "getToken",
- "parameters": [
- [
- "string",
- "str"
- ],
- [
- "string",
- "separator"
- ],
- [
- "int",
- "tokennum"
- ]
- ]
- },
- {
- "result": "double",
- "name": "sin",
- "parameters": [
- [
- "double",
- "value"
- ]
- ]
- },
- {
- "result": "double",
- "name": "cos",
- "parameters": [
- [
- "double",
- "value"
- ]
- ]
- },
- {
- "result": "double",
- "name": "tan",
- "parameters": [
- [
- "double",
- "value"
- ]
- ]
- },
- {
- "result": "double",
- "name": "asin",
- "parameters": [
- [
- "double",
- "value"
- ]
- ]
- },
- {
- "result": "double",
- "name": "acos",
- "parameters": [
- [
- "double",
- "value"
- ]
- ]
- },
- {
- "result": "double",
- "name": "atan",
- "parameters": [
- [
- "double",
- "value"
- ]
- ]
- },
- {
- "result": "double",
- "name": "atan2",
- "parameters": [
- [
- "double",
- "y"
- ],
- [
- "double",
- "x"
- ]
- ]
- },
- {
- "result": "double",
- "name": "pow",
- "parameters": [
- [
- "double",
- "value"
- ],
- [
- "double",
- "pvalue"
- ]
- ]
- },
- {
- "result": "double",
- "name": "sqr",
- "parameters": [
- [
- "double",
- "value"
- ]
- ]
- },
- {
- "result": "double",
- "name": "log10",
- "parameters": [
- [
- "double",
- "value"
- ]
- ]
- },
- {
- "result": "double",
- "name": "ln",
- "parameters": [
- [
- "double",
- "value"
- ]
- ]
- },
- {
- "result": "double",
- "name": "sqrt",
- "parameters": [
- [
- "double",
- "value"
- ]
- ]
- },
- {
- "result": "int",
- "name": "random",
- "parameters": [
- [
- "int",
- "max"
- ]
- ]
- },
- {
- "result": "",
- "name": "setPrivateString",
- "parameters": [
- [
- "string",
- "section"
- ],
- [
- "string",
- "item"
- ],
- [
- "string",
- "value"
- ]
- ]
- },
- {
- "result": "",
- "name": "setPrivateInt",
- "parameters": [
- [
- "string",
- "section"
- ],
- [
- "string",
- "item"
- ],
- [
- "int",
- "value"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getPrivateString",
- "parameters": [
- [
- "String",
- "section"
- ],
- [
- "String",
- "item"
- ],
- [
- "String",
- "defvalue"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getPrivateInt",
- "parameters": [
- [
- "String",
- "section"
- ],
- [
- "String",
- "item"
- ],
- [
- "Int",
- "defvalue"
- ]
- ]
- },
- {
- "result": "",
- "name": "setPublicString",
- "parameters": [
- [
- "String",
- "item"
- ],
- [
- "String",
- "value"
- ]
- ]
- },
- {
- "result": "",
- "name": "setPublicInt",
- "parameters": [
- [
- "String",
- "item"
- ],
- [
- "Int",
- "value"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getPublicString",
- "parameters": [
- [
- "String",
- "item"
- ],
- [
- "String",
- "defvalue"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getPublicInt",
- "parameters": [
- [
- "String",
- "item"
- ],
- [
- "Int",
- "defvalue"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getParam",
- "parameters": []
- },
- {
- "result": "Group",
- "name": "getScriptGroup",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getViewportWidth",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getViewportWidthFromGuiObject",
- "parameters": [
- [
- "GuiObject",
- "g"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getViewportWidthFromPoint",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getMonitorWidth",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getMonitorWidthFromPoint",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getMonitorWidthFromGuiObject",
- "parameters": [
- [
- "GuiObject",
- "g"
- ]
- ]
- },
- {
- "result": "",
- "name": "onMouseMove",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getViewportHeight",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getViewportHeightFromGuiObject",
- "parameters": [
- [
- "GuiObject",
- "g"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getViewportHeightFromPoint",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getMonitorHeight",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getMonitorHeightFromPoint",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getMonitorHeightFromGuiObject",
- "parameters": [
- [
- "GuiObject",
- "g"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getMonitorLeft",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getMonitorLeftFromGuiObject",
- "parameters": [
- [
- "GuiObject",
- "g"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getMonitorLeftFromPoint",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getMonitorTop",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getMonitorTopFromGuiObject",
- "parameters": [
- [
- "GuiObject",
- "g"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getMonitorTopFromPoint",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getViewportLeft",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getViewportLeftFromGuiObject",
- "parameters": [
- [
- "GuiObject",
- "g"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getViewportLeftFromPoint",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getViewportTop",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getViewportTopFromGuiObject",
- "parameters": [
- [
- "GuiObject",
- "g"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getViewportTopFromPoint",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "debugString",
- "parameters": [
- [
- "String",
- "str"
- ],
- [
- "Int",
- "severity"
- ]
- ]
- },
- {
- "result": "",
- "name": "ddeSend",
- "parameters": [
- [
- "String",
- "application"
- ],
- [
- "String",
- "command"
- ],
- [
- "Int",
- "mininterval"
- ]
- ]
- },
- {
- "result": "WindowHolder",
- "name": "onLookForComponent",
- "parameters": [
- [
- "String",
- "guid"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getCurAppLeft",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getCurAppTop",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getCurAppWidth",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getCurAppHeight",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "isAppActive",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getSkinName",
- "parameters": []
- },
- {
- "result": "",
- "name": "switchSkin",
- "parameters": [
- [
- "String",
- "skinname"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "isLoadingSkin",
- "parameters": []
- },
- {
- "result": "",
- "name": "lockUI",
- "parameters": []
- },
- {
- "result": "",
- "name": "unlockUI",
- "parameters": []
- },
- {
- "result": "Browser",
- "name": "getMainBrowser",
- "parameters": []
- },
- {
- "result": "",
- "name": "popMainBrowser",
- "parameters": []
- },
- {
- "result": "",
- "name": "navigateUrl",
- "parameters": [
- [
- "String",
- "url"
- ]
- ]
- },
- {
- "result": "",
- "name": "navigateUrlBrowser",
- "parameters": [
- [
- "String",
- "url"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "onOpenURL",
- "parameters": [
- [
- "string",
- "url"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "isObjectValid",
- "parameters": [
- [
- "Object",
- "o"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "integer",
- "parameters": [
- [
- "Double",
- "d"
- ]
- ]
- },
- {
- "result": "Double",
- "name": "frac",
- "parameters": [
- [
- "Double",
- "d"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getTimeOfDay",
- "parameters": []
- },
- {
- "result": "",
- "name": "setMenuTransparency",
- "parameters": [
- [
- "int",
- "alphavalue"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "onGetCancelComponent",
- "parameters": [
- [
- "String",
- "guid"
- ],
- [
- "boolean",
- "goingvisible"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getStatus",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "isKeyDown",
- "parameters": [
- [
- "int",
- "vk_code"
- ]
- ]
- },
- {
- "result": "",
- "name": "setClipboardText",
- "parameters": [
- [
- "String",
- "_text"
- ]
- ]
- },
- {
- "result": "String",
- "name": "Chr",
- "parameters": [
- [
- "Int",
- "charnum"
- ]
- ]
- },
- {
- "result": "String",
- "name": "translate",
- "parameters": [
- [
- "String",
- "str"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getString",
- "parameters": [
- [
- "String",
- "table"
- ],
- [
- "int",
- "id"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getLanguageId",
- "parameters": []
- },
- {
- "result": "String",
- "name": "selectFile",
- "parameters": [
- [
- "String",
- "extlist"
- ],
- [
- "String",
- "id"
- ],
- [
- "String",
- "prev_filename"
- ]
- ]
- },
- {
- "result": "String",
- "name": "selectFolder",
- "parameters": [
- [
- "String",
- "wnd_title"
- ],
- [
- "String",
- "wnd_info"
- ],
- [
- "String",
- "default_path"
- ]
- ]
- },
- {
- "result": "",
- "name": "systemMenu",
- "parameters": []
- },
- {
- "result": "",
- "name": "windowMenu",
- "parameters": []
- },
- {
- "result": "",
- "name": "triggerAction",
- "parameters": [
- [
- "GuiObject",
- "context"
- ],
- [
- "String",
- "actionname"
- ],
- [
- "String",
- "actionparam"
- ]
- ]
- },
- {
- "result": "GuiObject",
- "name": "showWindow",
- "parameters": [
- [
- "String",
- "guidorgroupid"
- ],
- [
- "String",
- "preferedcontainer"
- ],
- [
- "Boolean",
- "transient"
- ]
- ]
- },
- {
- "result": "",
- "name": "hideWindow",
- "parameters": [
- [
- "GuiObject",
- "hw"
- ]
- ]
- },
- {
- "result": "",
- "name": "hideNamedWindow",
- "parameters": [
- [
- "String",
- "guidorgroup"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "isNamedWindowVisible",
- "parameters": [
- [
- "String",
- "guidorgroup"
- ]
- ]
- },
- {
- "result": "",
- "name": "setAtom",
- "parameters": [
- [
- "String",
- "atomname"
- ],
- [
- "Object",
- "object"
- ]
- ]
- },
- {
- "result": "Object",
- "name": "getAtom",
- "parameters": [
- [
- "String",
- "atomname"
- ]
- ]
- },
- {
- "result": "",
- "name": "invokeDebugger",
- "parameters": []
- },
- {
- "result": "int",
- "name": "hasVideoSupport",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "isVideo",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "isVideoFullscreen",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getIdealVideoWidth",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getIdealVideoHeight",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "isMinimized",
- "parameters": []
- },
- {
- "result": "",
- "name": "minimizeApplication",
- "parameters": []
- },
- {
- "result": "",
- "name": "restoreApplication",
- "parameters": []
- },
- {
- "result": "",
- "name": "activateApplication",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getPlaylistLength",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getPlaylistIndex",
- "parameters": []
- },
- {
- "result": "",
- "name": "clearPlaylist",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "isDesktopAlphaAvailable",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "isTransparencyAvailable",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "onShowNotification",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getSongInfoText",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getSongInfoTextTranslated",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getVisBand",
- "parameters": [
- [
- "int",
- "channel"
- ],
- [
- "int",
- "band"
- ]
- ]
- },
- {
- "result": "Double",
- "name": "getRuntimeVersion",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "isWa2ComponentVisible",
- "parameters": [
- [
- "String",
- "guid"
- ]
- ]
- },
- {
- "result": "",
- "name": "hideWa2Component",
- "parameters": [
- [
- "String",
- "guid"
- ]
- ]
- },
- {
- "result": "boolean",
- "name": "isProVersion",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getWinampVersion",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getBuildNumber",
- "parameters": []
- },
- {
- "result": "int",
- "name": "getFileSize",
- "parameters": [
- [
- "String",
- "fullfilename"
- ]
- ]
- }
- ],
- "name": "System"
- },
- "E90DC47B840D4ae7B02C040BD275F7FC": {
- "parent": "Object",
- "functions": [
- {
- "result": "",
- "name": "onSwitchToLayout",
- "parameters": [
- [
- "Layout",
- "newlayout"
- ]
- ]
- },
- {
- "result": "",
- "name": "onBeforeSwitchToLayout",
- "parameters": [
- [
- "Layout",
- "oldlayout"
- ],
- [
- "Layout",
- "newlayout"
- ]
- ]
- },
- {
- "result": "",
- "name": "setXmlParam",
- "parameters": [
- [
- "String",
- "param"
- ],
- [
- "String",
- "value"
- ]
- ]
- },
- {
- "result": "",
- "name": "onHideLayout",
- "parameters": [
- [
- "Layout",
- "_layout"
- ]
- ]
- },
- {
- "result": "",
- "name": "onShowLayout",
- "parameters": [
- [
- "Layout",
- "_layout"
- ]
- ]
- },
- {
- "result": "Layout",
- "name": "getLayout",
- "parameters": [
- [
- "String",
- "layout_id"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getNumLayouts",
- "parameters": []
- },
- {
- "result": "Layout",
- "name": "enumLayout",
- "parameters": [
- [
- "Int",
- "num"
- ]
- ]
- },
- {
- "result": "",
- "name": "switchToLayout",
- "parameters": [
- [
- "String",
- "layout_id"
- ]
- ]
- },
- {
- "result": "",
- "name": "show",
- "parameters": []
- },
- {
- "result": "",
- "name": "hide",
- "parameters": []
- },
- {
- "result": "",
- "name": "close",
- "parameters": []
- },
- {
- "result": "",
- "name": "toggle",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "isDynamic",
- "parameters": []
- },
- {
- "result": "",
- "name": "setName",
- "parameters": [
- [
- "String",
- "name"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getName",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getGuid",
- "parameters": []
- },
- {
- "result": "Layout",
- "name": "getCurLayout",
- "parameters": []
- },
- {
- "result": "",
- "name": "onAddContent",
- "parameters": [
- [
- "GuiObject",
- "wnd"
- ],
- [
- "String",
- "id"
- ],
- [
- "String",
- "guid"
- ]
- ]
- }
- ],
- "name": "Container"
- },
- "00C074A0FEA249a0BE8DFABBDB161640": {
- "parent": "Object",
- "functions": [
- {
- "result": "String",
- "name": "getGuid",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getName",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "sendCommand",
- "parameters": [
- [
- "String",
- "cmd"
- ],
- [
- "Int",
- "param1"
- ],
- [
- "Int",
- "param2"
- ],
- [
- "String",
- "param3"
- ]
- ]
- },
- {
- "result": "",
- "name": "show",
- "parameters": []
- },
- {
- "result": "",
- "name": "hide",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "isVisible",
- "parameters": []
- },
- {
- "result": "",
- "name": "onNotify",
- "parameters": [
- [
- "String",
- "notifstr"
- ],
- [
- "Int",
- "a"
- ],
- [
- "Int",
- "b"
- ]
- ]
- },
- {
- "result": "",
- "name": "onShow",
- "parameters": []
- },
- {
- "result": "",
- "name": "onHide",
- "parameters": []
- },
- {
- "result": "",
- "name": "setStatusBar",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "getStatusBar",
- "parameters": []
- }
- ],
- "name": "Wac"
- },
- "B2023AB5434D4ba1BEAE59637503F3C6": {
- "parent": "Object",
- "functions": [
- {
- "result": "",
- "name": "addItem",
- "parameters": [
- [
- "Any",
- "_object"
- ]
- ]
- },
- {
- "result": "",
- "name": "removeItem",
- "parameters": [
- [
- "int",
- "pos"
- ]
- ]
- },
- {
- "result": "Any",
- "name": "enumItem",
- "parameters": [
- [
- "int",
- "pos"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "findItem",
- "parameters": [
- [
- "Any",
- "_object"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "findItem2",
- "parameters": [
- [
- "Any",
- "_object"
- ],
- [
- "int",
- "startItem"
- ]
- ]
- },
- {
- "result": "int",
- "name": "getNumItems",
- "parameters": []
- },
- {
- "result": "",
- "name": "removeAll",
- "parameters": []
- }
- ],
- "name": "List"
- },
- "87C65778E74349fe85F909CC532AFD56": {
- "parent": "Object",
- "functions": [
- {
- "result": "boolean",
- "name": "getItem",
- "parameters": [
- [
- "int",
- "n"
- ]
- ]
- },
- {
- "result": "",
- "name": "setItem",
- "parameters": [
- [
- "int",
- "n"
- ],
- [
- "boolean",
- "val"
- ]
- ]
- },
- {
- "result": "",
- "name": "setSize",
- "parameters": [
- [
- "int",
- "s"
- ]
- ]
- },
- {
- "result": "int",
- "name": "getSize",
- "parameters": []
- }
- ],
- "name": "BitList"
- },
- "38603665461B42a7AA75D83F6667BF73": {
- "parent": "Object",
- "functions": [
- {
- "result": "Int",
- "name": "getValue",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getARGBValue",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ],
- [
- "int",
- "channel"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "inRegion",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "loadMap",
- "parameters": [
- [
- "String",
- "bitmapid"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getWidth",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getHeight",
- "parameters": []
- },
- {
- "result": "Region",
- "name": "getRegion",
- "parameters": []
- }
- ],
- "name": "Map"
- },
- "F4787AF4B2BB4ef79CFBE74BA9BEA88D": {
- "parent": "Object",
- "functions": [
- {
- "result": "",
- "name": "addSubMenu",
- "parameters": [
- [
- "PopupMenu",
- "submenu"
- ],
- [
- "String",
- "submenutext"
- ]
- ]
- },
- {
- "result": "",
- "name": "addCommand",
- "parameters": [
- [
- "String",
- "cmdtxt"
- ],
- [
- "Int",
- "cmd_id"
- ],
- [
- "Boolean",
- "checked"
- ],
- [
- "Boolean",
- "disabled"
- ]
- ]
- },
- {
- "result": "",
- "name": "addSeparator",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "popAtXY",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "popAtMouse",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getNumCommands",
- "parameters": []
- },
- {
- "result": "",
- "name": "checkCommand",
- "parameters": [
- [
- "int",
- "cmd_id"
- ],
- [
- "boolean",
- "check"
- ]
- ]
- },
- {
- "result": "",
- "name": "disableCommand",
- "parameters": [
- [
- "int",
- "cmd_id"
- ],
- [
- "boolean",
- "disable"
- ]
- ]
- }
- ],
- "name": "PopupMenu"
- },
- "3A370C023CBF439f84F186885BCF1E36": {
- "parent": "Object",
- "functions": [
- {
- "result": "",
- "name": "add",
- "parameters": [
- [
- "Region",
- "reg"
- ]
- ]
- },
- {
- "result": "",
- "name": "sub",
- "parameters": [
- [
- "Region",
- "reg"
- ]
- ]
- },
- {
- "result": "",
- "name": "offset",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "stretch",
- "parameters": [
- [
- "double",
- "r"
- ]
- ]
- },
- {
- "result": "",
- "name": "copy",
- "parameters": [
- [
- "Region",
- "reg"
- ]
- ]
- },
- {
- "result": "",
- "name": "loadFromMap",
- "parameters": [
- [
- "Map",
- "regionmap"
- ],
- [
- "Int",
- "threshold"
- ],
- [
- "Boolean",
- "reversed"
- ]
- ]
- },
- {
- "result": "",
- "name": "loadFromBitmap",
- "parameters": [
- [
- "String",
- "bitmapid"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getBoundingBoxX",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getBoundingBoxY",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getBoundingBoxW",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getBoundingBoxH",
- "parameters": []
- }
- ],
- "name": "Region"
- },
- "5D0C5BB67DE14b1fA70F8D1659941941": {
- "parent": "Object",
- "functions": [
- {
- "result": "",
- "name": "onTimer",
- "parameters": []
- },
- {
- "result": "",
- "name": "setDelay",
- "parameters": [
- [
- "int",
- "millisec"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getDelay",
- "parameters": []
- },
- {
- "result": "",
- "name": "start",
- "parameters": []
- },
- {
- "result": "",
- "name": "stop",
- "parameters": []
- },
- {
- "result": "",
- "name": "isRunning",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getSkipped",
- "parameters": []
- }
- ],
- "name": "Timer"
- },
- "A5376FA14E94411a83F605EC5EEA5F0A": {
- "parent": "Object",
- "functions": [
- {
- "result": "Int",
- "name": "setFeed",
- "parameters": [
- [
- "String",
- "feed_id"
- ]
- ]
- },
- {
- "result": "",
- "name": "releaseFeed",
- "parameters": []
- },
- {
- "result": "",
- "name": "onFeedChange",
- "parameters": [
- [
- "String",
- "new_feeddata"
- ]
- ]
- }
- ],
- "name": "FeedWatcher"
- },
- "4EE3E199C6364bec97CD78BC9C8628B0": {
- "parent": "Object",
- "functions": [
- {
- "result": "",
- "name": "show",
- "parameters": []
- },
- {
- "result": "",
- "name": "hide",
- "parameters": []
- },
- {
- "result": "int",
- "name": "isVisible",
- "parameters": []
- },
- {
- "result": "",
- "name": "onSetVisible",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "",
- "name": "setAlpha",
- "parameters": [
- [
- "int",
- "alpha"
- ]
- ]
- },
- {
- "result": "int",
- "name": "getAlpha",
- "parameters": []
- },
- {
- "result": "",
- "name": "onLeftButtonUp",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "onLeftButtonDown",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "onRightButtonUp",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "onRightButtonDown",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "onRightButtonDblClk",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "onLeftButtonDblClk",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "int",
- "name": "onMouseWheelUp",
- "parameters": [
- [
- "int",
- "clicked"
- ],
- [
- "int",
- "lines"
- ]
- ]
- },
- {
- "result": "int",
- "name": "onMouseWheelDown",
- "parameters": [
- [
- "int",
- "clicked"
- ],
- [
- "int",
- "lines"
- ]
- ]
- },
- {
- "result": "",
- "name": "onMouseMove",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "onEnterArea",
- "parameters": []
- },
- {
- "result": "",
- "name": "onLeaveArea",
- "parameters": []
- },
- {
- "result": "",
- "name": "setEnabled",
- "parameters": [
- [
- "boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "boolean",
- "name": "getEnabled",
- "parameters": []
- },
- {
- "result": "",
- "name": "onEnable",
- "parameters": [
- [
- "boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "",
- "name": "resize",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ],
- [
- "int",
- "w"
- ],
- [
- "int",
- "h"
- ]
- ]
- },
- {
- "result": "",
- "name": "onResize",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ],
- [
- "int",
- "w"
- ],
- [
- "int",
- "h"
- ]
- ]
- },
- {
- "result": "boolean",
- "name": "isMouseOver",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "int",
- "name": "getLeft",
- "parameters": []
- },
- {
- "result": "int",
- "name": "getTop",
- "parameters": []
- },
- {
- "result": "int",
- "name": "getWidth",
- "parameters": []
- },
- {
- "result": "int",
- "name": "getHeight",
- "parameters": []
- },
- {
- "result": "",
- "name": "setTargetX",
- "parameters": [
- [
- "int",
- "x"
- ]
- ]
- },
- {
- "result": "",
- "name": "setTargetY",
- "parameters": [
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "setTargetW",
- "parameters": [
- [
- "int",
- "w"
- ]
- ]
- },
- {
- "result": "",
- "name": "setTargetH",
- "parameters": [
- [
- "int",
- "r"
- ]
- ]
- },
- {
- "result": "",
- "name": "setTargetA",
- "parameters": [
- [
- "int",
- "alpha"
- ]
- ]
- },
- {
- "result": "",
- "name": "setTargetSpeed",
- "parameters": [
- [
- "float",
- "insecond"
- ]
- ]
- },
- {
- "result": "",
- "name": "gotoTarget",
- "parameters": []
- },
- {
- "result": "",
- "name": "onTargetReached",
- "parameters": []
- },
- {
- "result": "",
- "name": "cancelTarget",
- "parameters": []
- },
- {
- "result": "",
- "name": "reverseTarget",
- "parameters": [
- [
- "int",
- "reverse"
- ]
- ]
- },
- {
- "result": "",
- "name": "onStartup",
- "parameters": []
- },
- {
- "result": "boolean",
- "name": "isGoingToTarget",
- "parameters": []
- },
- {
- "result": "",
- "name": "setXmlParam",
- "parameters": [
- [
- "String",
- "param"
- ],
- [
- "String",
- "value"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getXmlParam",
- "parameters": [
- [
- "String",
- "param"
- ]
- ]
- },
- {
- "result": "",
- "name": "init",
- "parameters": [
- [
- "Group",
- "parent"
- ]
- ]
- },
- {
- "result": "",
- "name": "bringToFront",
- "parameters": []
- },
- {
- "result": "",
- "name": "bringToBack",
- "parameters": []
- },
- {
- "result": "",
- "name": "bringAbove",
- "parameters": [
- [
- "GuiObject",
- "guiobj"
- ]
- ]
- },
- {
- "result": "",
- "name": "bringBelow",
- "parameters": [
- [
- "GuiObject",
- "guiobj"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getGuiX",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getGuiY",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getGuiW",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getGuiH",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getGuiRelatX",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getGuiRelatY",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getGuiRelatW",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getGuiRelatH",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "isActive",
- "parameters": []
- },
- {
- "result": "GuiObject",
- "name": "getParent",
- "parameters": []
- },
- {
- "result": "Layout",
- "name": "getParentLayout",
- "parameters": []
- },
- {
- "result": "GuiObject",
- "name": "getTopParent",
- "parameters": []
- },
- {
- "result": "int",
- "name": "runModal",
- "parameters": []
- },
- {
- "result": "",
- "name": "endModal",
- "parameters": [
- [
- "int",
- "retcode"
- ]
- ]
- },
- {
- "result": "GuiObject",
- "name": "findObject",
- "parameters": [
- [
- "String",
- "id"
- ]
- ]
- },
- {
- "result": "GuiObject",
- "name": "findObjectXY",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getName",
- "parameters": []
- },
- {
- "result": "int",
- "name": "clientToScreenX",
- "parameters": [
- [
- "int",
- "x"
- ]
- ]
- },
- {
- "result": "int",
- "name": "clientToScreenY",
- "parameters": [
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "int",
- "name": "clientToScreenW",
- "parameters": [
- [
- "int",
- "w"
- ]
- ]
- },
- {
- "result": "int",
- "name": "clientToScreenH",
- "parameters": [
- [
- "int",
- "h"
- ]
- ]
- },
- {
- "result": "int",
- "name": "screenToClientX",
- "parameters": [
- [
- "int",
- "x"
- ]
- ]
- },
- {
- "result": "int",
- "name": "screenToClientY",
- "parameters": [
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "int",
- "name": "screenToClientW",
- "parameters": [
- [
- "int",
- "w"
- ]
- ]
- },
- {
- "result": "int",
- "name": "screenToClientH",
- "parameters": [
- [
- "int",
- "h"
- ]
- ]
- },
- {
- "result": "int",
- "name": "getAutoWidth",
- "parameters": []
- },
- {
- "result": "int",
- "name": "getAutoHeight",
- "parameters": []
- },
- {
- "result": "",
- "name": "setFocus",
- "parameters": []
- },
- {
- "result": "",
- "name": "onChar",
- "parameters": [
- [
- "String",
- "c"
- ]
- ]
- },
- {
- "result": "",
- "name": "onAccelerator",
- "parameters": [
- [
- "String",
- "accel"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "isMouseOverRect",
- "parameters": []
- },
- {
- "result": "Object",
- "name": "getInterface",
- "parameters": [
- [
- "String",
- "interface_guid"
- ]
- ]
- },
- {
- "result": "",
- "name": "onDragEnter",
- "parameters": []
- },
- {
- "result": "",
- "name": "onDragOver",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "onDragLeave",
- "parameters": []
- },
- {
- "result": "",
- "name": "onKeyDown",
- "parameters": [
- [
- "int",
- "vk_code"
- ]
- ]
- },
- {
- "result": "",
- "name": "onKeyUp",
- "parameters": [
- [
- "int",
- "vk_code"
- ]
- ]
- },
- {
- "result": "",
- "name": "onGetFocus",
- "parameters": []
- },
- {
- "result": "",
- "name": "onKillFocus",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "sendAction",
- "parameters": [
- [
- "String",
- "action"
- ],
- [
- "String",
- "param"
- ],
- [
- "Int",
- "x"
- ],
- [
- "int",
- "y"
- ],
- [
- "int",
- "p1"
- ],
- [
- "int",
- "p2"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "onAction",
- "parameters": [
- [
- "String",
- "action"
- ],
- [
- "String",
- "param"
- ],
- [
- "Int",
- "x"
- ],
- [
- "int",
- "y"
- ],
- [
- "int",
- "p1"
- ],
- [
- "int",
- "p2"
- ],
- [
- "GuiObject",
- "source"
- ]
- ]
- }
- ],
- "name": "GuiObject"
- },
- "45BE95E520724191935CBB5FF9F117FD": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "GuiObject",
- "name": "getObject",
- "parameters": [
- [
- "String",
- "object_id"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getNumObjects",
- "parameters": []
- },
- {
- "result": "GuiObject",
- "name": "enumObject",
- "parameters": [
- [
- "Int",
- "num"
- ]
- ]
- },
- {
- "result": "",
- "name": "onCreateObject",
- "parameters": [
- [
- "GuiObject",
- "newobj"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getMousePosX",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getMousePosY",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "isLayout",
- "parameters": []
- }
- ],
- "name": "Group"
- },
- "60906D4E537E482eB004CC9461885672": {
- "parent": "Group",
- "functions": [
- {
- "result": "",
- "name": "onDock",
- "parameters": [
- [
- "int",
- "side"
- ]
- ]
- },
- {
- "result": "",
- "name": "onUndock",
- "parameters": []
- },
- {
- "result": "",
- "name": "onScale",
- "parameters": [
- [
- "Double",
- "newscalevalue"
- ]
- ]
- },
- {
- "result": "Double",
- "name": "getScale",
- "parameters": []
- },
- {
- "result": "",
- "name": "setScale",
- "parameters": [
- [
- "Double",
- "scalevalue"
- ]
- ]
- },
- {
- "result": "",
- "name": "setDesktopAlpha",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "getDesktopAlpha",
- "parameters": []
- },
- {
- "result": "Container",
- "name": "getContainer",
- "parameters": []
- },
- {
- "result": "",
- "name": "center",
- "parameters": []
- },
- {
- "result": "",
- "name": "onMove",
- "parameters": []
- },
- {
- "result": "",
- "name": "onEndMove",
- "parameters": []
- },
- {
- "result": "",
- "name": "onUserResize",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ],
- [
- "int",
- "w"
- ],
- [
- "int",
- "h"
- ]
- ]
- },
- {
- "result": "",
- "name": "snapAdjust",
- "parameters": [
- [
- "int",
- "left"
- ],
- [
- "int",
- "top"
- ],
- [
- "int",
- "right"
- ],
- [
- "int",
- "bottom"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getSnapAdjustTop",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getSnapAdjustRight",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getSnapAdjustLeft",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getSnapAdjustBottom",
- "parameters": []
- },
- {
- "result": "",
- "name": "setRedrawOnResize",
- "parameters": [
- [
- "int",
- "wantredrawonresize"
- ]
- ]
- },
- {
- "result": "",
- "name": "beforeRedock",
- "parameters": []
- },
- {
- "result": "",
- "name": "redock",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "isTransparencySafe",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "isLayoutAnimationSafe",
- "parameters": []
- },
- {
- "result": "",
- "name": "onMouseEnterLayout",
- "parameters": []
- },
- {
- "result": "",
- "name": "onMouseLeaveLayout",
- "parameters": []
- },
- {
- "result": "",
- "name": "onSnapAdjustChanged",
- "parameters": []
- }
- ],
- "name": "Layout"
- },
- "403ABCC06F224bd68BA410C829932547": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "setRegionFromMap",
- "parameters": [
- [
- "Map",
- "regionmap"
- ],
- [
- "Int",
- "threshold"
- ],
- [
- "Boolean",
- "reverse"
- ]
- ]
- },
- {
- "result": "",
- "name": "setRegion",
- "parameters": [
- [
- "Region",
- "reg"
- ]
- ]
- },
- {
- "result": "GuiObject",
- "name": "getContent",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getGuid",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getComponentName",
- "parameters": []
- },
- {
- "result": "",
- "name": "onGetWac",
- "parameters": [
- [
- "Wac",
- "wacobj"
- ]
- ]
- },
- {
- "result": "",
- "name": "onGiveUpWac",
- "parameters": [
- [
- "Wac",
- "wacobj"
- ]
- ]
- },
- {
- "result": "Wac",
- "name": "getWac",
- "parameters": []
- },
- {
- "result": "",
- "name": "setAcceptWac",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- }
- ],
- "name": "WindowHolder"
- },
- "97AA3E4DF4D04fa8817B0AF22A454983": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "Int",
- "name": "getMaxHeight",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getMaxWidth",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "setScroll",
- "parameters": [
- [
- "int",
- "x"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getScroll",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getNumChildren",
- "parameters": []
- },
- {
- "result": "GuiObject",
- "name": "enumChildren",
- "parameters": [
- [
- "int",
- "n"
- ]
- ]
- }
- ],
- "name": "ComponentBucket"
- },
- "64E4BBFA81F449d9B0C0A85B2EC3BCFD": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "onEnter",
- "parameters": []
- },
- {
- "result": "",
- "name": "onAbort",
- "parameters": []
- },
- {
- "result": "",
- "name": "onIdleEditUpdate",
- "parameters": []
- },
- {
- "result": "",
- "name": "onEditUpdate",
- "parameters": []
- },
- {
- "result": "",
- "name": "setText",
- "parameters": [
- [
- "String",
- "txt"
- ]
- ]
- },
- {
- "result": "",
- "name": "setAutoEnter",
- "parameters": [
- [
- "boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getAutoEnter",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getText",
- "parameters": []
- },
- {
- "result": "",
- "name": "selectAll",
- "parameters": []
- },
- {
- "result": "",
- "name": "enter",
- "parameters": []
- },
- {
- "result": "",
- "name": "setIdleEnabled",
- "parameters": [
- [
- "boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getIdleEnabled",
- "parameters": []
- }
- ],
- "name": "Edit"
- },
- "62B65E3F375E408d8DEA76814AB91B77": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "onSetPosition",
- "parameters": [
- [
- "int",
- "newpos"
- ]
- ]
- },
- {
- "result": "",
- "name": "onPostedPosition",
- "parameters": [
- [
- "int",
- "newpos"
- ]
- ]
- },
- {
- "result": "",
- "name": "onSetFinalPosition",
- "parameters": [
- [
- "int",
- "pos"
- ]
- ]
- },
- {
- "result": "",
- "name": "setPosition",
- "parameters": [
- [
- "int",
- "pos"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getPosition",
- "parameters": []
- },
- {
- "result": "",
- "name": "lock",
- "parameters": []
- },
- {
- "result": "",
- "name": "unlock",
- "parameters": []
- }
- ],
- "name": "Slider"
- },
- "CE4F97BE77B04e199956D49833C96C27": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "onFrame",
- "parameters": []
- },
- {
- "result": "",
- "name": "setRealtime",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "getRealtime",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getMode",
- "parameters": []
- },
- {
- "result": "",
- "name": "setMode",
- "parameters": [
- [
- "Int",
- "mode"
- ]
- ]
- },
- {
- "result": "",
- "name": "nextMode",
- "parameters": []
- }
- ],
- "name": "Vis"
- },
- "A8C2200D51EB4b2aBA7F5D4BC65D4C71": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "navigateUrl",
- "parameters": [
- [
- "String",
- "url"
- ]
- ]
- },
- {
- "result": "",
- "name": "back",
- "parameters": []
- },
- {
- "result": "",
- "name": "forward",
- "parameters": []
- },
- {
- "result": "",
- "name": "stop",
- "parameters": []
- },
- {
- "result": "",
- "name": "refresh",
- "parameters": []
- },
- {
- "result": "",
- "name": "home",
- "parameters": []
- },
- {
- "result": "",
- "name": "setTargetName",
- "parameters": [
- [
- "String",
- "targetname"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "onBeforeNavigate",
- "parameters": [
- [
- "String",
- "url"
- ],
- [
- "Int",
- "flags"
- ],
- [
- "String",
- "targetframename"
- ]
- ]
- },
- {
- "result": "",
- "name": "onDocumentComplete",
- "parameters": [
- [
- "String",
- "url"
- ]
- ]
- },
- {
- "result": "",
- "name": "onDocumentReady",
- "parameters": [
- [
- "String",
- "url"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getDocumentTitle",
- "parameters": []
- },
- {
- "result": "",
- "name": "onNavigateError",
- "parameters": [
- [
- "String",
- "url"
- ],
- [
- "int",
- "code"
- ]
- ]
- },
- {
- "result": "",
- "name": "setCancelIEErrorPage",
- "parameters": [
- [
- "boolean",
- "cancel"
- ]
- ]
- },
- {
- "result": "",
- "name": "scrape",
- "parameters": []
- },
- {
- "result": "string",
- "name": "onMediaLink",
- "parameters": [
- [
- "string",
- "url"
- ]
- ]
- }
- ],
- "name": "Browser"
- },
- "8D1EBA38489E483eB9608D1F43C5C405": {
- "parent": "GuiObject",
- "functions": [],
- "name": "EqVis"
- },
- "0F08C940AF394b2380F3B8C48F7EBB59": {
- "parent": "GuiObject",
- "functions": [],
- "name": "Status"
- },
- "EFAA8672310E41faB7DC85A9525BCB4B": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "setText",
- "parameters": [
- [
- "String",
- "txt"
- ]
- ]
- },
- {
- "result": "",
- "name": "setAlternateText",
- "parameters": [
- [
- "String",
- "txt"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getText",
- "parameters": []
- },
- {
- "result": "int",
- "name": "getTextWidth",
- "parameters": []
- },
- {
- "result": "",
- "name": "onTextChanged",
- "parameters": [
- [
- "String",
- "newtxt"
- ]
- ]
- }
- ],
- "name": "Text"
- },
- "7DFD324437514e7cBF4082AE5F3ADC33": {
- "parent": "GuiObject",
- "functions": [],
- "name": "Title"
- },
- "5AB9FA159A7D4557ABC86557A6C67CA9": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "onBeginResize",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ],
- [
- "int",
- "w"
- ],
- [
- "int",
- "h"
- ]
- ]
- },
- {
- "result": "",
- "name": "onEndResize",
- "parameters": [
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ],
- [
- "int",
- "w"
- ],
- [
- "int",
- "h"
- ]
- ]
- },
- {
- "result": "",
- "name": "fx_onInit",
- "parameters": []
- },
- {
- "result": "",
- "name": "fx_onFrame",
- "parameters": []
- },
- {
- "result": "Double",
- "name": "fx_onGetPixelR",
- "parameters": [
- [
- "double",
- "r"
- ],
- [
- "double",
- "d"
- ],
- [
- "double",
- "x"
- ],
- [
- "double",
- "y"
- ]
- ]
- },
- {
- "result": "Double",
- "name": "fx_onGetPixelD",
- "parameters": [
- [
- "double",
- "r"
- ],
- [
- "double",
- "d"
- ],
- [
- "double",
- "x"
- ],
- [
- "double",
- "y"
- ]
- ]
- },
- {
- "result": "Double",
- "name": "fx_onGetPixelX",
- "parameters": [
- [
- "double",
- "r"
- ],
- [
- "double",
- "d"
- ],
- [
- "double",
- "x"
- ],
- [
- "double",
- "y"
- ]
- ]
- },
- {
- "result": "Double",
- "name": "fx_onGetPixelY",
- "parameters": [
- [
- "double",
- "r"
- ],
- [
- "double",
- "d"
- ],
- [
- "double",
- "x"
- ],
- [
- "double",
- "y"
- ]
- ]
- },
- {
- "result": "Double",
- "name": "fx_onGetPixelA",
- "parameters": [
- [
- "double",
- "r"
- ],
- [
- "double",
- "d"
- ],
- [
- "double",
- "x"
- ],
- [
- "double",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "setRegionFromMap",
- "parameters": [
- [
- "Map",
- "regionmap"
- ],
- [
- "int",
- "threshold"
- ],
- [
- "boolean",
- "reverse"
- ]
- ]
- },
- {
- "result": "",
- "name": "setRegion",
- "parameters": [
- [
- "Region",
- "reg"
- ]
- ]
- },
- {
- "result": "",
- "name": "fx_setEnabled",
- "parameters": [
- [
- "boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "fx_getEnabled",
- "parameters": []
- },
- {
- "result": "",
- "name": "fx_setWrap",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "fx_getWrap",
- "parameters": []
- },
- {
- "result": "",
- "name": "fx_setRect",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "fx_getRect",
- "parameters": []
- },
- {
- "result": "",
- "name": "fx_setBgFx",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "fx_getBgFx",
- "parameters": []
- },
- {
- "result": "",
- "name": "fx_setClear",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "fx_getClear",
- "parameters": []
- },
- {
- "result": "",
- "name": "fx_setSpeed",
- "parameters": [
- [
- "Int",
- "msperframe"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "fx_getSpeed",
- "parameters": []
- },
- {
- "result": "",
- "name": "fx_setRealtime",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "fx_getRealtime",
- "parameters": []
- },
- {
- "result": "",
- "name": "fx_setLocalized",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "fx_getLocalized",
- "parameters": []
- },
- {
- "result": "",
- "name": "fx_setBilinear",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "fx_getBilinear",
- "parameters": []
- },
- {
- "result": "",
- "name": "fx_setAlphaMode",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "fx_getAlphaMode",
- "parameters": []
- },
- {
- "result": "",
- "name": "fx_setGridSize",
- "parameters": [
- [
- "Int",
- "x"
- ],
- [
- "Int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "fx_update",
- "parameters": []
- },
- {
- "result": "",
- "name": "fx_restart",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "isInvalid",
- "parameters": []
- }
- ],
- "name": "Layer"
- },
- "698EDDCD8F1E4fec9B12F944F909FF45": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "onActivate",
- "parameters": [
- [
- "int",
- "activated"
- ]
- ]
- },
- {
- "result": "",
- "name": "onLeftClick",
- "parameters": []
- },
- {
- "result": "",
- "name": "onRightClick",
- "parameters": []
- },
- {
- "result": "",
- "name": "setActivated",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "",
- "name": "setActivatedNoCallback",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "Boolean",
- "name": "getActivated",
- "parameters": []
- },
- {
- "result": "",
- "name": "leftClick",
- "parameters": []
- },
- {
- "result": "",
- "name": "rightClick",
- "parameters": []
- }
- ],
- "name": "Button"
- },
- "6B64CD275A264c4b8C59E6A70CF6493A": {
- "parent": "Layer",
- "functions": [
- {
- "result": "",
- "name": "onPlay",
- "parameters": []
- },
- {
- "result": "",
- "name": "onPause",
- "parameters": []
- },
- {
- "result": "",
- "name": "onResume",
- "parameters": []
- },
- {
- "result": "",
- "name": "onStop",
- "parameters": []
- },
- {
- "result": "",
- "name": "onFrame",
- "parameters": [
- [
- "Int",
- "framenum"
- ]
- ]
- },
- {
- "result": "",
- "name": "setSpeed",
- "parameters": [
- [
- "Int",
- "msperframe"
- ]
- ]
- },
- {
- "result": "",
- "name": "gotoFrame",
- "parameters": [
- [
- "int",
- "framenum"
- ]
- ]
- },
- {
- "result": "",
- "name": "setStartFrame",
- "parameters": [
- [
- "Int",
- "framenum"
- ]
- ]
- },
- {
- "result": "",
- "name": "setEndFrame",
- "parameters": [
- [
- "int",
- "framenum"
- ]
- ]
- },
- {
- "result": "",
- "name": "setAutoReplay",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "",
- "name": "play",
- "parameters": []
- },
- {
- "result": "",
- "name": "stop",
- "parameters": []
- },
- {
- "result": "",
- "name": "pause",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "isPlaying",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "isPaused",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "isStopped",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getStartFrame",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getEndFrame",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getLength",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getDirection",
- "parameters": []
- },
- {
- "result": "Boolean",
- "name": "getAutoReplay",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getCurFrame",
- "parameters": []
- },
- {
- "result": "",
- "name": "setRealtime",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- }
- ],
- "name": "AnimatedLayer"
- },
- "6DCB05E48AC448c2B19349F0910EF54A": {
- "parent": "Layer",
- "functions": [
- {
- "result": "",
- "name": "refresh",
- "parameters": []
- },
- {
- "result": "",
- "name": "isLoading",
- "parameters": []
- },
- {
- "result": "",
- "name": "onAlbumArtLoaded",
- "parameters": [
- [
- "boolean",
- "success"
- ]
- ]
- }
- ],
- "name": "AlbumArtLayer"
- },
- "B4DCCFFF81FE4bcc961B720FD5BE0FFF": {
- "parent": "Button",
- "functions": [
- {
- "result": "",
- "name": "onToggle",
- "parameters": [
- [
- "Boolean",
- "onoff"
- ]
- ]
- },
- {
- "result": "int",
- "name": "getCurCfgVal",
- "parameters": []
- }
- ],
- "name": "ToggleButton"
- },
- "01E28CE1B05911d5979FE4DE6F51760A": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "Group",
- "name": "instantiate",
- "parameters": [
- [
- "String",
- "group_id"
- ],
- [
- "int",
- "num_groups"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getNumItems",
- "parameters": []
- },
- {
- "result": "Group",
- "name": "enumItem",
- "parameters": [
- [
- "int",
- "num"
- ]
- ]
- },
- {
- "result": "",
- "name": "removeAll",
- "parameters": []
- },
- {
- "result": "",
- "name": "scrollToPercent",
- "parameters": [
- [
- "Int",
- "percent"
- ]
- ]
- },
- {
- "result": "",
- "name": "setRedraw",
- "parameters": [
- [
- "int",
- "redraw"
- ]
- ]
- }
- ],
- "name": "GroupList"
- },
- "80F0F8BD1BA542a6A0933236A00C8D4A": {
- "parent": "Group",
- "functions": [
- {
- "result": "Int",
- "name": "cfgGetInt",
- "parameters": []
- },
- {
- "result": "",
- "name": "cfgSetInt",
- "parameters": [
- [
- "Int",
- "intvalue"
- ]
- ]
- },
- {
- "result": "String",
- "name": "cfgGetString",
- "parameters": []
- },
- {
- "result": "Float",
- "name": "cfgGetFloat",
- "parameters": []
- },
- {
- "result": "",
- "name": "cfgSetFloat",
- "parameters": [
- [
- "Float",
- "floatvalue"
- ]
- ]
- },
- {
- "result": "",
- "name": "cfgSetString",
- "parameters": [
- [
- "String",
- "strvalue"
- ]
- ]
- },
- {
- "result": "",
- "name": "onCfgChanged",
- "parameters": []
- },
- {
- "result": "String",
- "name": "cfgGetGuid",
- "parameters": []
- },
- {
- "result": "String",
- "name": "cfgGetName",
- "parameters": []
- }
- ],
- "name": "CfgGroup"
- },
- "CDCB785D81F242538F0561B872283CFA": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "onResetQuery",
- "parameters": []
- }
- ],
- "name": "QueryList"
- },
- "9B2E341B6C9840fa8B850C1B6EE89405": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "setRedirection",
- "parameters": [
- [
- "GuiObject",
- "o"
- ]
- ]
- },
- {
- "result": "GuiObject",
- "name": "getRedirection",
- "parameters": []
- },
- {
- "result": "",
- "name": "setRegionFromMap",
- "parameters": [
- [
- "Map",
- "regionmap"
- ],
- [
- "Int",
- "threshold"
- ],
- [
- "Boolean",
- "reverse"
- ]
- ]
- },
- {
- "result": "",
- "name": "setRegion",
- "parameters": [
- [
- "Region",
- "reg"
- ]
- ]
- }
- ],
- "name": "MouseRedir"
- },
- "36D59B7103FD4af897950502B7DB267A": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "String",
- "name": "getItemSelected",
- "parameters": []
- },
- {
- "result": "",
- "name": "onSelect",
- "parameters": [
- [
- "Int",
- "id"
- ],
- [
- "Int",
- "hover"
- ]
- ]
- },
- {
- "result": "",
- "name": "setListHeight",
- "parameters": [
- [
- "Int",
- "h"
- ]
- ]
- },
- {
- "result": "",
- "name": "openList",
- "parameters": []
- },
- {
- "result": "",
- "name": "closeList",
- "parameters": []
- },
- {
- "result": "",
- "name": "setItems",
- "parameters": [
- [
- "String",
- "lotsofitems"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "addItem",
- "parameters": [
- [
- "String",
- "_text"
- ]
- ]
- },
- {
- "result": "",
- "name": "delItem",
- "parameters": [
- [
- "Int",
- "id"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "findItem",
- "parameters": [
- [
- "String",
- "_text"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getNumItems",
- "parameters": []
- },
- {
- "result": "",
- "name": "selectItem",
- "parameters": [
- [
- "Int",
- "id"
- ],
- [
- "Int",
- "hover"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getItemText",
- "parameters": [
- [
- "Int",
- "id"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getSelected",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getSelectedText",
- "parameters": []
- },
- {
- "result": "String",
- "name": "getCustomText",
- "parameters": []
- },
- {
- "result": "",
- "name": "deleteAllItems",
- "parameters": []
- },
- {
- "result": "",
- "name": "setNoItemText",
- "parameters": [
- [
- "String",
- "txt"
- ]
- ]
- }
- ],
- "name": "DropDownList"
- },
- "7FD5F210ACC448dfA6A05451576CDC76": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "callme",
- "parameters": [
- [
- "String",
- "str"
- ]
- ]
- }
- ],
- "name": "LayoutStatus"
- },
- "B5BAA53505B34dcbADC1E618D28F6896": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "Int",
- "name": "getCurPage",
- "parameters": []
- },
- {
- "result": "",
- "name": "setCurPage",
- "parameters": [
- [
- "Int",
- "a"
- ]
- ]
- }
- ],
- "name": "TabSheet"
- },
- "6129FEC1DAB74d51916501CA0C1B70DB": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "Int",
- "name": "addColumn",
- "parameters": [
- [
- "String",
- "name"
- ],
- [
- "Int",
- "width"
- ],
- [
- "Int",
- "numeric"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getNumColumns",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getColumnWidth",
- "parameters": [
- [
- "Int",
- "column"
- ]
- ]
- },
- {
- "result": "",
- "name": "setColumnWidth",
- "parameters": [
- [
- "Int",
- "column"
- ],
- [
- "Int",
- "newwidth"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getColumnLabel",
- "parameters": [
- [
- "Int",
- "column"
- ]
- ]
- },
- {
- "result": "",
- "name": "setColumnLabel",
- "parameters": [
- [
- "Int",
- "column"
- ],
- [
- "String",
- "newlabel"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getColumnNumeric",
- "parameters": [
- [
- "Int",
- "column"
- ]
- ]
- },
- {
- "result": "",
- "name": "setColumnDynamic",
- "parameters": [
- [
- "Int",
- "column"
- ],
- [
- "Int",
- "isdynamic"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "isColumnDynamic",
- "parameters": [
- [
- "Int",
- "column"
- ]
- ]
- },
- {
- "result": "",
- "name": "invalidateColumns",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getNumItems",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getItemCount",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "addItem",
- "parameters": [
- [
- "String",
- "label"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "insertItem",
- "parameters": [
- [
- "Int",
- "pos"
- ],
- [
- "String",
- "label"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getLastAddedItemPos",
- "parameters": []
- },
- {
- "result": "",
- "name": "setSubItem",
- "parameters": [
- [
- "Int",
- "pos"
- ],
- [
- "Int",
- "subpos"
- ],
- [
- "String",
- "txt"
- ]
- ]
- },
- {
- "result": "",
- "name": "deleteAllItems",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "deleteByPos",
- "parameters": [
- [
- "Int",
- "pos"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getItemLabel",
- "parameters": [
- [
- "Int",
- "pos"
- ],
- [
- "Int",
- "subpos"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getSubitemText",
- "parameters": [
- [
- "Int",
- "pos"
- ],
- [
- "Int",
- "subpos"
- ]
- ]
- },
- {
- "result": "",
- "name": "setItemLabel",
- "parameters": [
- [
- "Int",
- "pos"
- ],
- [
- "String",
- "_text"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "invalidateItem",
- "parameters": [
- [
- "Int",
- "pos"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getFirstItemVisible",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getLastItemVisible",
- "parameters": []
- },
- {
- "result": "",
- "name": "setItemIcon",
- "parameters": [
- [
- "Int",
- "pos"
- ],
- [
- "String",
- "bitmapId"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getItemIcon",
- "parameters": [
- [
- "Int",
- "pos"
- ]
- ]
- },
- {
- "result": "",
- "name": "setMinimumSize",
- "parameters": [
- [
- "Int",
- "size"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getWantAutoDeselect",
- "parameters": []
- },
- {
- "result": "",
- "name": "setWantAutoDeselect",
- "parameters": [
- [
- "Int",
- "want"
- ]
- ]
- },
- {
- "result": "",
- "name": "onSetVisible",
- "parameters": [
- [
- "Int",
- "show"
- ]
- ]
- },
- {
- "result": "",
- "name": "setAutoSort",
- "parameters": [
- [
- "Int",
- "dosort"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "setFontSize",
- "parameters": [
- [
- "Int",
- "size"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getFontSize",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getHeaderHeight",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getPreventMultipleSelection",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "setPreventMultipleSelection",
- "parameters": [
- [
- "Int",
- "val"
- ]
- ]
- },
- {
- "result": "",
- "name": "setShowIcons",
- "parameters": [
- [
- "int",
- "showThem"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getShowIcons",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "setIconWidth",
- "parameters": [
- [
- "int",
- "width"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "setIconHeight",
- "parameters": [
- [
- "int",
- "width"
- ]
- ]
- },
- {
- "result": "",
- "name": "getIconWidth",
- "parameters": []
- },
- {
- "result": "",
- "name": "getIconHeight",
- "parameters": []
- },
- {
- "result": "",
- "name": "next",
- "parameters": []
- },
- {
- "result": "",
- "name": "previous",
- "parameters": []
- },
- {
- "result": "",
- "name": "pagedown",
- "parameters": []
- },
- {
- "result": "",
- "name": "pageup",
- "parameters": []
- },
- {
- "result": "",
- "name": "home",
- "parameters": []
- },
- {
- "result": "",
- "name": "end",
- "parameters": []
- },
- {
- "result": "",
- "name": "reset",
- "parameters": []
- },
- {
- "result": "",
- "name": "ensureItemVisible",
- "parameters": [
- [
- "Int",
- "pos"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "scrollAbsolute",
- "parameters": [
- [
- "Int",
- "x"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "scrollRelative",
- "parameters": [
- [
- "Int",
- "x"
- ]
- ]
- },
- {
- "result": "",
- "name": "scrollLeft",
- "parameters": [
- [
- "Int",
- "lines"
- ]
- ]
- },
- {
- "result": "",
- "name": "scrollRight",
- "parameters": [
- [
- "Int",
- "lines"
- ]
- ]
- },
- {
- "result": "",
- "name": "scrollUp",
- "parameters": [
- [
- "Int",
- "lines"
- ]
- ]
- },
- {
- "result": "",
- "name": "scrollDown",
- "parameters": [
- [
- "Int",
- "lines"
- ]
- ]
- },
- {
- "result": "",
- "name": "jumpToNext",
- "parameters": [
- [
- "Int",
- "c"
- ]
- ]
- },
- {
- "result": "",
- "name": "scrollToItem",
- "parameters": [
- [
- "Int",
- "pos"
- ]
- ]
- },
- {
- "result": "",
- "name": "selectCurrent",
- "parameters": []
- },
- {
- "result": "",
- "name": "selectFirstEntry",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getItemSelected",
- "parameters": [
- [
- "Int",
- "pos"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "isItemFocused",
- "parameters": [
- [
- "Int",
- "pos"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getItemFocused",
- "parameters": []
- },
- {
- "result": "",
- "name": "setItemFocused",
- "parameters": [
- [
- "Int",
- "pos"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getFirstItemSelected",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getNextItemSelected",
- "parameters": [
- [
- "Int",
- "lastpos"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "selectAll",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "deselectAll",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "invertSelection",
- "parameters": []
- },
- {
- "result": "",
- "name": "setSelectionStart",
- "parameters": [
- [
- "Int",
- "pos"
- ]
- ]
- },
- {
- "result": "",
- "name": "setSelectionEnd",
- "parameters": [
- [
- "Int",
- "pos"
- ]
- ]
- },
- {
- "result": "",
- "name": "setSelected",
- "parameters": [
- [
- "Int",
- "pos"
- ],
- [
- "Int",
- "selected"
- ]
- ]
- },
- {
- "result": "",
- "name": "toggleSelection",
- "parameters": [
- [
- "Int",
- "pos"
- ],
- [
- "Int",
- "setfocus"
- ]
- ]
- },
- {
- "result": "",
- "name": "resort",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getSortDirection",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getSortColumn",
- "parameters": []
- },
- {
- "result": "",
- "name": "setSortColumn",
- "parameters": [
- [
- "Int",
- "col"
- ]
- ]
- },
- {
- "result": "",
- "name": "setSortDirection",
- "parameters": [
- [
- "Int",
- "dir"
- ]
- ]
- },
- {
- "result": "",
- "name": "moveItem",
- "parameters": [
- [
- "Int",
- "from"
- ],
- [
- "Int",
- "to"
- ]
- ]
- },
- {
- "result": "",
- "name": "onSelectAll",
- "parameters": []
- },
- {
- "result": "",
- "name": "onDelete",
- "parameters": []
- },
- {
- "result": "",
- "name": "onDoubleClick",
- "parameters": [
- [
- "Int",
- "itemnum"
- ]
- ]
- },
- {
- "result": "",
- "name": "onLeftClick",
- "parameters": [
- [
- "Int",
- "itemnum"
- ]
- ]
- },
- {
- "result": "",
- "name": "onSecondLeftClick",
- "parameters": [
- [
- "Int",
- "itemnum"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "onRightClick",
- "parameters": [
- [
- "Int",
- "itemnum"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "onColumnDblClick",
- "parameters": [
- [
- "Int",
- "col"
- ],
- [
- "Int",
- "x"
- ],
- [
- "Int",
- "y"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "onColumnLabelClick",
- "parameters": [
- [
- "Int",
- "col"
- ],
- [
- "Int",
- "x"
- ],
- [
- "Int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "onItemSelection",
- "parameters": [
- [
- "Int",
- "itemnum"
- ],
- [
- "Int",
- "selected"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "onIconLeftClick",
- "parameters": [
- [
- "int",
- "itemnum"
- ],
- [
- "int",
- "x"
- ],
- [
- "int",
- "y"
- ]
- ]
- }
- ],
- "name": "GuiList"
- },
- "D59514F7ED3645e8980F3F4EA0522CD9": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "Int",
- "name": "onWantAutoContextMenu",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "onMouseWheelUp",
- "parameters": [
- [
- "Int",
- "clicked"
- ],
- [
- "Int",
- "lines"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "onMouseWheelDown",
- "parameters": [
- [
- "Int",
- "clicked"
- ],
- [
- "Int",
- "lines"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "onContextMenu",
- "parameters": [
- [
- "Int",
- "x"
- ],
- [
- "Int",
- "y"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "onChar",
- "parameters": [
- [
- "Int",
- "c"
- ]
- ]
- },
- {
- "result": "",
- "name": "onItemRecvDrop",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "onLabelChange",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "onItemSelected",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "onItemDeselected",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getNumRootItems",
- "parameters": []
- },
- {
- "result": "TreeItem",
- "name": "enumRootItem",
- "parameters": [
- [
- "Int",
- "which"
- ]
- ]
- },
- {
- "result": "",
- "name": "jumpToNext",
- "parameters": [
- [
- "Int",
- "c"
- ]
- ]
- },
- {
- "result": "",
- "name": "ensureItemVisible",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getContentsWidth",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getContentsHeight",
- "parameters": []
- },
- {
- "result": "TreeItem",
- "name": "addTreeItem",
- "parameters": [
- [
- "TreeItem",
- "item"
- ],
- [
- "TreeItem",
- "par"
- ],
- [
- "Int",
- "sorted"
- ],
- [
- "Int",
- "haschildtab"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "removeTreeItem",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "moveTreeItem",
- "parameters": [
- [
- "TreeItem",
- "item"
- ],
- [
- "TreeItem",
- "newparent"
- ]
- ]
- },
- {
- "result": "",
- "name": "deleteAllItems",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "expandItem",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "expandItemDeferred",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "collapseItem",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "collapseItemDeferred",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "selectItem",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "selectItemDeferred",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "delItemDeferred",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "hiliteItem",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "unhiliteItem",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "TreeItem",
- "name": "getCurItem",
- "parameters": []
- },
- {
- "result": "TreeItem",
- "name": "hitTest",
- "parameters": [
- [
- "Int",
- "x"
- ],
- [
- "Int",
- "y"
- ]
- ]
- },
- {
- "result": "",
- "name": "editItemLabel",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "cancelEditLabel",
- "parameters": [
- [
- "Int",
- "destroyit"
- ]
- ]
- },
- {
- "result": "",
- "name": "setAutoEdit",
- "parameters": [
- [
- "Int",
- "ae"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getAutoEdit",
- "parameters": []
- },
- {
- "result": "TreeItem",
- "name": "getByLabel",
- "parameters": [
- [
- "TreeItem",
- "item"
- ],
- [
- "String",
- "name"
- ]
- ]
- },
- {
- "result": "",
- "name": "setSorted",
- "parameters": [
- [
- "Int",
- "dosort"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getSorted",
- "parameters": []
- },
- {
- "result": "",
- "name": "sortTreeItems",
- "parameters": []
- },
- {
- "result": "TreeItem",
- "name": "getSibling",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "setAutoCollapse",
- "parameters": [
- [
- "Int",
- "doautocollapse"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "setFontSize",
- "parameters": [
- [
- "Int",
- "newsize"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getFontSize",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "getNumVisibleChildItems",
- "parameters": [
- [
- "TreeItem",
- "c"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getNumVisibleItems",
- "parameters": []
- },
- {
- "result": "TreeItem",
- "name": "enumVisibleItems",
- "parameters": [
- [
- "Int",
- "n"
- ]
- ]
- },
- {
- "result": "TreeItem",
- "name": "enumVisibleChildItems",
- "parameters": [
- [
- "TreeItem",
- "c"
- ],
- [
- "Int",
- "n"
- ]
- ]
- },
- {
- "result": "TreeItem",
- "name": "enumAllItems",
- "parameters": [
- [
- "Int",
- "n"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getItemRectX",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getItemRectY",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getItemRectW",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "getItemRectH",
- "parameters": [
- [
- "TreeItem",
- "item"
- ]
- ]
- },
- {
- "result": "TreeItem",
- "name": "getItemFromPoint",
- "parameters": [
- [
- "Int",
- "x"
- ],
- [
- "Int",
- "y"
- ]
- ]
- }
- ],
- "name": "GuiTree"
- },
- "9B3B4B82667A420e8FFC794115809C02": {
- "parent": "Object",
- "functions": [
- {
- "result": "Int",
- "name": "getNumChildren",
- "parameters": []
- },
- {
- "result": "",
- "name": "setLabel",
- "parameters": [
- [
- "String",
- "label"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getLabel",
- "parameters": []
- },
- {
- "result": "",
- "name": "ensureVisible",
- "parameters": []
- },
- {
- "result": "TreeItem",
- "name": "getNthChild",
- "parameters": [
- [
- "Int",
- "nth"
- ]
- ]
- },
- {
- "result": "TreeItem",
- "name": "getChild",
- "parameters": []
- },
- {
- "result": "TreeItem",
- "name": "getChildSibling",
- "parameters": [
- [
- "TreeItem",
- "_item"
- ]
- ]
- },
- {
- "result": "TreeItem",
- "name": "getSibling",
- "parameters": []
- },
- {
- "result": "TreeItem",
- "name": "getParent",
- "parameters": []
- },
- {
- "result": "",
- "name": "editLabel",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "hasSubItems",
- "parameters": []
- },
- {
- "result": "",
- "name": "setSorted",
- "parameters": [
- [
- "Int",
- "issorted"
- ]
- ]
- },
- {
- "result": "",
- "name": "setChildTab",
- "parameters": [
- [
- "Int",
- "haschildtab"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "isSorted",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "isCollapsed",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "isExpanded",
- "parameters": []
- },
- {
- "result": "",
- "name": "invalidate",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "isSelected",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "isHilited",
- "parameters": []
- },
- {
- "result": "",
- "name": "setHilited",
- "parameters": [
- [
- "Int",
- "ishilited"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "collapse",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "expand",
- "parameters": []
- },
- {
- "result": "GuiTree",
- "name": "getTree",
- "parameters": []
- },
- {
- "result": "",
- "name": "onTreeAdd",
- "parameters": []
- },
- {
- "result": "",
- "name": "onTreeRemove",
- "parameters": []
- },
- {
- "result": "",
- "name": "onSelect",
- "parameters": []
- },
- {
- "result": "",
- "name": "onDeselect",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "onLeftDoubleClick",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "onRightDoubleClick",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "onChar",
- "parameters": [
- [
- "Int",
- "key"
- ]
- ]
- },
- {
- "result": "",
- "name": "onExpand",
- "parameters": []
- },
- {
- "result": "",
- "name": "onCollapse",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "onBeginLabelEdit",
- "parameters": []
- },
- {
- "result": "Int",
- "name": "onEndLabelEdit",
- "parameters": [
- [
- "String",
- "newlabel"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "onContextMenu",
- "parameters": [
- [
- "Int",
- "x"
- ],
- [
- "Int",
- "y"
- ]
- ]
- }
- ],
- "name": "TreeItem"
- },
- "1D8631C880D047929F98BD5D36B49136": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "onOpenMenu",
- "parameters": []
- },
- {
- "result": "",
- "name": "onCloseMenu",
- "parameters": []
- },
- {
- "result": "",
- "name": "onSelectItem",
- "parameters": [
- [
- "String",
- "item"
- ]
- ]
- },
- {
- "result": "",
- "name": "openMenu",
- "parameters": []
- },
- {
- "result": "",
- "name": "closeMenu",
- "parameters": []
- }
- ],
- "name": "MenuButton"
- },
- "C7ED319953194798986360B15A298CAA": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "onToggle",
- "parameters": [
- [
- "int",
- "newstate"
- ]
- ]
- },
- {
- "result": "",
- "name": "setChecked",
- "parameters": [
- [
- "int",
- "checked"
- ]
- ]
- },
- {
- "result": "Int",
- "name": "isChecked",
- "parameters": []
- },
- {
- "result": "",
- "name": "setText",
- "parameters": [
- [
- "String",
- "txt"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getText",
- "parameters": []
- }
- ],
- "name": "CheckBox"
- },
- "2D2D1376BE0A4CB9BC0C57E6E4C999F5": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "Int",
- "name": "getContentsHeight",
- "parameters": []
- },
- {
- "result": "",
- "name": "newCell",
- "parameters": [
- [
- "String",
- "groupname"
- ]
- ]
- },
- {
- "result": "",
- "name": "nextRow",
- "parameters": []
- },
- {
- "result": "",
- "name": "deleteAll",
- "parameters": []
- }
- ],
- "name": "Form"
- },
- "E2BBC14D84F64173BDB3B2EB2F665550": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "Int",
- "name": "getPosition",
- "parameters": []
- },
- {
- "result": "",
- "name": "setPosition",
- "parameters": [
- [
- "Int",
- "position"
- ]
- ]
- },
- {
- "result": "",
- "name": "onSetPosition",
- "parameters": [
- [
- "Int",
- "position"
- ]
- ]
- }
- ],
- "name": "Frame"
- },
- "73C00594961F401B9B1B672427AC4165": {
- "parent": "GuiObject",
- "functions": [
- {
- "result": "",
- "name": "setMenuGroup",
- "parameters": [
- [
- "String",
- "groupId"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getMenuGroup",
- "parameters": []
- },
- {
- "result": "",
- "name": "setMenu",
- "parameters": [
- [
- "String",
- "menuId"
- ]
- ]
- },
- {
- "result": "String",
- "name": "getMenu",
- "parameters": []
- },
- {
- "result": "",
- "name": "spawnMenu",
- "parameters": [
- [
- "int",
- "monitor"
- ]
- ]
- },
- {
- "result": "",
- "name": "cancelMenu",
- "parameters": []
- },
- {
- "result": "",
- "name": "setNormalId",
- "parameters": [
- [
- "String",
- "id"
- ]
- ]
- },
- {
- "result": "",
- "name": "setDownId",
- "parameters": [
- [
- "String",
- "id"
- ]
- ]
- },
- {
- "result": "",
- "name": "setHoverId",
- "parameters": [
- [
- "String",
- "id"
- ]
- ]
- },
- {
- "result": "",
- "name": "onOpenMenu",
- "parameters": []
- },
- {
- "result": "",
- "name": "onCloseMenu",
- "parameters": []
- },
- {
- "result": "",
- "name": "nextMenu",
- "parameters": []
- },
- {
- "result": "",
- "name": "previousMenu",
- "parameters": []
- }
- ],
- "name": "Menu"
- }
-}
\ No newline at end of file
diff --git a/packages/webamp-modern/src/maki-interpreter/objectData/stdPatched.js b/packages/webamp-modern/src/maki-interpreter/objectData/stdPatched.js
deleted file mode 100644
index f5239c49..00000000
--- a/packages/webamp-modern/src/maki-interpreter/objectData/stdPatched.js
+++ /dev/null
@@ -1,63 +0,0 @@
-const std = require("./std.json");
-
-const NAME_TO_DEF = {};
-
-Object.values(std).forEach((value) => {
- NAME_TO_DEF[value.name] = value;
-});
-
-function getMethod(className, methodName) {
- return NAME_TO_DEF[className].functions.find(({ name }) => {
- return name === methodName;
- });
-}
-
-// Between myself and the author of the decompiler, a number of manual tweaks
-// have been made to our current object definitions. This function recreates
-// those tweaks so we can have an apples to apples comparison.
-
-/*
- * From object.js
- *
- * > The std.mi has this set as void, but we checked in Winamp and confirmed it
- * > returns 0/1
- */
-getMethod("Timer", "isRunning").result = "boolean";
-
-/*
- * From Object.pm
- *
- * > note, std.mi does not have this parameter!
- */
-getMethod("ToggleButton", "onToggle").parameters[0][1] = "onoff";
-
-// Some methods are not compatible with the type signature of their parent class
-getMethod("GuiTree", "onChar").parameters[0][0] = "string";
-getMethod("GuiList", "onSetVisible").parameters[0][0] = "boolean";
-
-// I'm not sure how to get these to match
-getMethod("Wac", "onNotify").parameters = getMethod(
- "Object",
- "onNotify"
-).parameters;
-getMethod("Wac", "onNotify").result = "int";
-
-/*
-
-Here's the error we get without that patch:
-
-__generated__/makiInterfaces.ts:254:18 - error TS2430: Interface 'Wac' incorrectly extends interface 'MakiObject'.
- Types of property 'onnotify' are incompatible.
- Type '(notifstr: string, a: number, b: number) => void' is not assignable to type '(command: string, param: string, a: number, b: number) => number'.
- Types of parameters 'a' and 'param' are incompatible.
- Type 'string' is not assignable to type 'number'.
-
-254 export interface Wac extends MakiObject {
- ~~~
-
-
-Found 1 error.
-
- */
-
-module.exports = std;
diff --git a/packages/webamp-modern/src/maki-interpreter/objects.js b/packages/webamp-modern/src/maki-interpreter/objects.js
deleted file mode 100644
index 21e7aa70..00000000
--- a/packages/webamp-modern/src/maki-interpreter/objects.js
+++ /dev/null
@@ -1,78 +0,0 @@
-const stdPatched = require("./objectData/stdPatched");
-const pldir = require("./objectData/pldir.json");
-const config = require("./objectData/config.json");
-
-const objects = { ...stdPatched, ...pldir, ...config };
-
-// TODO: We could probably just fix the keys used in this file to already be normalized
-// We might even want to normalize the to match the formatting we get out the file. That could
-// avoid the awkward regex inside `getClass()`.
-const normalizedObjects = {};
-Object.keys(objects).forEach((key) => {
- normalizedObjects[key.toLowerCase()] = objects[key];
-});
-
-const objectsByName = {};
-Object.values(objects).forEach((object) => {
- objectsByName[object.name] = object;
-});
-
-Object.values(normalizedObjects).forEach((object) => {
- const parentClass = objectsByName[object.parent];
- if (parentClass == null) {
- if (object.parent === "@{00000000-0000-0000-0000-000000000000}@") {
- } else {
- throw new Error(`Could not find parent class named ${object.parent}`);
- }
- }
- object.parentClass = parentClass;
-});
-
-function getFormattedId(id) {
- // https://en.wikipedia.org/wiki/Universally_unique_identifier#Encoding
- const formattedId = id.replace(
- /(........)(....)(....)(..)(..)(..)(..)(..)(..)(..)(..)/,
- "$1$3$2$7$6$5$4$11$10$9$8"
- );
- return formattedId.toLowerCase();
-}
-
-function getClass(id) {
- return normalizedObjects[getFormattedId(id)];
-}
-
-function getObjectFunction(klass, functionName) {
- const method = klass.functions.find((func) => {
- // TODO: This could probably be normalized at load time, or evern sooner.
- return func.name.toLowerCase() === functionName.toLowerCase();
- });
- if (method != null) {
- return method;
- }
- if (klass.parentClass == null) {
- throw new Error(`Could not find method ${functionName} on ${klass.name}.`);
- }
- return getObjectFunction(klass.parentClass, functionName);
-}
-
-function getFunctionObject(klass, functionName) {
- const method = klass.functions.find((func) => {
- // TODO: This could probably be normalized at load time, or evern sooner.
- return func.name.toLowerCase() === functionName.toLowerCase();
- });
- if (method != null) {
- return klass;
- }
- if (klass.parentClass == null) {
- throw new Error(`Could not find method ${functionName} on ${klass.name}.`);
- }
- return getFunctionObject(klass.parentClass, functionName);
-}
-
-module.exports = {
- objects,
- getFormattedId,
- getClass,
- getObjectFunction,
- getFunctionObject,
-};
diff --git a/packages/webamp-modern/src/maki-interpreter/parser.js b/packages/webamp-modern/src/maki-interpreter/parser.js
deleted file mode 100644
index f0994c2a..00000000
--- a/packages/webamp-modern/src/maki-interpreter/parser.js
+++ /dev/null
@@ -1,359 +0,0 @@
-import { COMMANDS } from "./constants";
-import Variable from "./variable";
-const MAGIC = "FG";
-
-const PRIMITIVE_TYPES = {
- 5: "BOOLEAN",
- 2: "INT",
- 3: "FLOAT",
- 4: "DOUBLE",
- 6: "STRING",
-};
-
-// TODO: Don't depend upon COMMANDS
-function opcodeToArgType(opcode) {
- const command = COMMANDS[opcode];
- if (command == null) {
- throw new Error(`Unknown opcode ${opcode}`);
- }
-
- switch (command.arg) {
- case "func":
- case "line":
- return "COMMAND_OFFSET";
- case "var":
- case "objFunc":
- case "obj":
- return "VARIABLE_OFFSET";
- default:
- return "NONE";
- }
-}
-
-// Holds a buffer and a pointer. Consumers can consume bytesoff the end of the
-// file. When we want to run in the browser, we can refactor this class to use a
-// typed array: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays
-class MakiFile {
- constructor(data) {
- this._arr = new Uint8Array(data);
- this._i = 0;
- }
-
- readInt32LE() {
- const offset = this._i >>> 0;
- this._i += 4;
-
- return (
- this._arr[offset] |
- (this._arr[offset + 1] << 8) |
- (this._arr[offset + 2] << 16) |
- (this._arr[offset + 3] << 24)
- );
- }
-
- readUInt32LE() {
- const int = this.peekUInt32LE();
- this._i += 4;
- return int;
- }
-
- peekUInt32LE() {
- const offset = this._i >>> 0;
-
- return (
- (this._arr[offset] |
- (this._arr[offset + 1] << 8) |
- (this._arr[offset + 2] << 16)) +
- this._arr[offset + 3] * 0x1000000
- );
- }
-
- readUInt16LE() {
- const offset = this._i >>> 0;
- this._i += 2;
- return this._arr[offset] | (this._arr[offset + 1] << 8);
- }
-
- readUInt8() {
- const int = this._arr[this._i];
- this._i++;
- return int;
- }
-
- readStringOfLength(length) {
- let ret = "";
- const end = Math.min(this._arr.length, this._i + length);
-
- for (let i = this._i; i < end; ++i) {
- ret += String.fromCharCode(this._arr[i]);
- }
- this._i += length;
- return ret;
- }
-
- readString() {
- return this.readStringOfLength(this.readUInt16LE());
- }
-
- getPosition() {
- return this._i;
- }
-}
-
-function readMagic(makiFile) {
- const magic = makiFile.readStringOfLength(MAGIC.length);
- if (magic !== MAGIC) {
- throw new Error(
- `Magic "${magic}" does not mach "${MAGIC}". Is this a maki file?`
- );
- }
- return magic;
-}
-
-function readVersion(makiFile) {
- // No idea what we're actually expecting here.
- return makiFile.readUInt16LE();
-}
-
-function readClasses(makiFile) {
- let count = makiFile.readUInt32LE();
- const classes = [];
- while (count--) {
- let identifier = "";
- let chunks = 4;
- while (chunks--) {
- identifier += makiFile.readUInt32LE().toString(16).padStart(8, "0");
- }
- classes.push(identifier);
- }
- return classes;
-}
-
-function readMethods(makiFile) {
- let count = makiFile.readUInt32LE();
- const methods = [];
- while (count--) {
- const classCode = makiFile.readUInt16LE();
- // Offset into our parsed types
- const typeOffset = classCode & 0xff;
- // This is probably the second half of a uint32
- makiFile.readUInt16LE();
- const name = makiFile.readString();
- methods.push({ name, typeOffset });
- }
- return methods;
-}
-
-function readVariables({ makiFile, classes }) {
- let count = makiFile.readUInt32LE();
- const variables = [];
- while (count--) {
- const typeOffset = makiFile.readUInt8();
- const object = makiFile.readUInt8();
- const subClass = makiFile.readUInt16LE();
- const uinit1 = makiFile.readUInt16LE();
- const uinit2 = makiFile.readUInt16LE();
- makiFile.readUInt16LE(); // uinit3
- makiFile.readUInt16LE(); //uinit4
- const global = makiFile.readUInt8();
- makiFile.readUInt8(); // system
-
- if (subClass) {
- const variable = variables[typeOffset];
- if (variable == null) {
- throw new Error("Invalid type");
- }
- variables.push(
- new Variable({ type: variable, typeName: "SUBCLASS", global: !!global })
- );
- } else if (object) {
- const klass = classes[typeOffset];
- if (klass == null) {
- throw new Error("Invalid type");
- }
- variables.push(
- new Variable({ type: klass, typeName: "OBJECT", global: !!global })
- );
- } else {
- const typeName = PRIMITIVE_TYPES[typeOffset];
- if (typeName == null) {
- throw new Error("Invalid type");
- }
- let value = null;
-
- switch (typeName) {
- // BOOLEAN
- case PRIMITIVE_TYPES[5]:
- value = uinit1;
- break;
- // INT
- case PRIMITIVE_TYPES[2]:
- value = uinit1;
- break;
- case PRIMITIVE_TYPES[3]:
- case PRIMITIVE_TYPES[4]:
- const exponent = (uinit2 & 0xff80) >> 7;
- const mantisse = ((0x80 | (uinit2 & 0x7f)) << 16) | uinit1;
- value = mantisse * 2.0 ** (exponent - 0x96);
- break;
- case PRIMITIVE_TYPES[6]:
- // This will likely get set by constants later on.
- break;
- default:
- throw new Error("Invalid primitive type");
- }
- const variable = new Variable({
- type: typeName,
- typeName,
- global: !!global,
- });
- variable.setValue(value);
- variables.push(variable);
- }
- }
- return variables;
-}
-
-function readConstants({ makiFile, variables }) {
- let count = makiFile.readUInt32LE();
- while (count--) {
- const i = makiFile.readUInt32LE();
- const variable = variables[i];
- // TODO: Assert this is of type string.
- const value = makiFile.readString();
- // TODO: Don't mutate
- variable.setValue(value);
- }
-}
-
-function readBindings(makiFile) {
- let count = makiFile.readUInt32LE();
- const bindings = [];
- while (count--) {
- const variableOffset = makiFile.readUInt32LE();
- const methodOffset = makiFile.readUInt32LE();
- const binaryOffset = makiFile.readUInt32LE();
- bindings.push({ variableOffset, binaryOffset, methodOffset });
- }
- return bindings;
-}
-
-function decodeCode({ makiFile }) {
- const length = makiFile.readUInt32LE();
- const start = makiFile.getPosition();
-
- const commands = [];
- while (makiFile.getPosition() < start + length) {
- commands.push(parseComand({ start, makiFile, length }));
- }
-
- return commands;
-}
-
-// TODO: Refactor this to consume bytes directly off the end of MakiFile
-function parseComand({ start, makiFile, length }) {
- const pos = makiFile.getPosition() - start;
- const opcode = makiFile.readUInt8();
- const command = {
- offset: pos,
- start,
- opcode,
- arg: null,
- argType: opcodeToArgType(opcode),
- };
-
- if (command.argType === "NONE") {
- return command;
- }
-
- let arg = null;
- switch (command.argType) {
- case "COMMAND_OFFSET":
- // Note in the perl code here: "todo, something strange going on here..."
- arg = makiFile.readInt32LE() + 5 + pos;
- break;
- case "VARIABLE_OFFSET":
- arg = makiFile.readUInt32LE();
- break;
- default:
- throw new Error("Invalid argType");
- }
-
- command.arg = arg;
-
- // From perl: look forward for a stack protection block
- // (why do I have to look FORWARD. stupid nullsoft)
- if (
- // Is there another UInt32 to read?
- length > pos + 5 + 4 &&
- makiFile.peekUInt32LE() >= 0xffff0000 &&
- makiFile.peekUInt32LE() <= 0xffff000f
- ) {
- command.foo = true;
- command.stackProtection = makiFile.readUInt32LE();
- }
-
- // TODO: What even is this?
- if (opcode === 112 /* strangeCall */) {
- makiFile.readUInt8();
- }
- return command;
-}
-
-function parse(data) {
- const makiFile = new MakiFile(data);
-
- const magic = readMagic(makiFile);
- // TODO: What format is this? Does it even change between compiler versions?
- // Maybe it's the std.mi version?
- const version = readVersion(makiFile);
- // Not sure what we are skipping over here. Just some UInt 32.
- // Maybe it's additional version info?
- const extraVersion = makiFile.readUInt32LE();
- const classes = readClasses(makiFile);
- const methods = readMethods(makiFile);
- const variables = readVariables({ makiFile, classes });
- readConstants({ makiFile, variables });
- const bindings = readBindings(makiFile);
- const commands = decodeCode({ makiFile });
-
- // TODO: Assert that we are at the end of the maki file
-
- // Map binary offsets to command indexes.
- // Some bindings/functions ask us to jump to a place in the binary data and
- // start executing. However, we want to do all the parsing up front, and just
- // return a list of commands. This map allows anything that mentions a binary
- // offset to find the command they should jump to.
- const offsetToCommand = {};
- commands.forEach((command, i) => {
- if (command.offset != null) {
- offsetToCommand[command.offset] = i;
- }
- });
-
- const resolvedBindings = bindings.map((binding) => {
- return Object.assign({}, binding, {
- commandOffset: offsetToCommand[binding.binaryOffset],
- binaryOffset: undefined,
- });
- });
-
- const resolvedCommands = commands.map((command) => {
- if (command.argType === "COMMAND_OFFSET") {
- return Object.assign({}, command, { arg: offsetToCommand[command.arg] });
- }
- return command;
- });
- return {
- magic,
- classes,
- methods,
- variables,
- bindings: resolvedBindings,
- commands: resolvedCommands,
- version,
- extraVersion,
- };
-}
-
-export default parse;
diff --git a/packages/webamp-modern/src/maki-interpreter/prettyPrinter.js b/packages/webamp-modern/src/maki-interpreter/prettyPrinter.js
deleted file mode 100644
index 60201a27..00000000
--- a/packages/webamp-modern/src/maki-interpreter/prettyPrinter.js
+++ /dev/null
@@ -1,55 +0,0 @@
-import Variable from "./variable";
-import runtime from "../runtime";
-
-// Debug utility to pretty print a value/variable
-function printValue(value) {
- if (!(value instanceof Variable)) {
- return value;
- }
- const variable = value;
- let type = "UNKOWN";
- switch (variable.typeName) {
- case "OBJECT":
- const obj = runtime[variable.type];
- if (obj == null) {
- type = "Unknown object";
- } else {
- type = obj.getclassname();
- }
- break;
- case "STRING":
- const str = variable.getValue();
- type = `STRING(${str})`;
- break;
- case "INT":
- type = "INT";
- break;
- case "FLOAT":
- type = "FLOAT";
- break;
- case "DOUBLE":
- type = "DOUBLE";
- break;
- case "BOOLEAN":
- type = "BOOLEAN";
- break;
- default:
- throw new Error(`Unknown variable type ${variable.typeName}`);
- }
- return `Variable(${type})`;
-}
-
-function printCommand({ i, command, stack, variables }) {
- console.log(
- `${i} (${command.start} + ${command.offset})`,
- command.command.name.toUpperCase(),
- command.opcode,
- printValue(variables[command.arg])
- );
- stack.forEach((value, j) => {
- const name = printValue(value, { runtime });
- console.log(" ", j + 1, name);
- });
-}
-
-export default { printCommand };
diff --git a/packages/webamp-modern/src/maki-interpreter/readme.md b/packages/webamp-modern/src/maki-interpreter/readme.md
deleted file mode 100644
index 16a609e9..00000000
--- a/packages/webamp-modern/src/maki-interpreter/readme.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# Maki Interpreter
-
-This interpreter is part of our broader experiment in getting "modern" Winamp skins working in the browser. For more information about the project read the [Modern Winamp Skins Readme](../../README.md).
-
-Maki is a compiled language, so this interpreter parses/evaluates the compiled byte code. Most of the hard work of figuring out how to write the parser has already been done as part of Ralf Engels' [Maki Decompiler](http://www.rengels.de/maki_decompiler/).
-
-## Architecture
-
-- [Parser](./parser.js): Given a Blob containing the binary data of a `.maki` file, returns a JSON serializeable representation of the script.
-- [Runtime](../runtime/index.ts): A JavaScript object mapping class' unique ids to JavaScript implementations of those classes.
-- [Interpreter](./interpreter.js): Given a parsed `.maki` file, and a command offset, exectues the `.maki` script starting at that command, and returing the value returned from executing that function.
-- [Virtual Machine](./virtualMachine.js): This ties all of the above pieces together. Given a Buffer containing a `.maki` script, a Runtime, and an instance of `System`, it parses the `.maki` file, and then binds the runtime into the parsed `.maki` program. This consists of populating the `System` variable, and binding the class ids defined in the script to the actual JavaScript implementations of those classes. Finally it kicks off execution by triggering `System.onScriptLoaded()`.
-
-## Structure of a `.maki` file
-
-The bytecode contained in a .maki file takes the following form (I think. I'm still trying to grock it). These are my notes trying to write down what I understand so far. Most of this was infered from reading the
-
-1. The "magic" string "FG". This might be some kind attempt to validate that this is realy a `.maki` file?
-2. A version number (which we currently ignore)
-3. Some 32 bit something. We ignore this.
-4. Types
- 1. A 32 bit number defines how many types there are.
- 2. Each type consists of four 32 bit numbers.
-5. Function names
- 1. A 32 bit number defines how many function names there are.
- 2. Each funtion name consists of a 16 bit class code
- 3. A 16 bit "dummy" (not sure what this is) and a name.
- 4. The name is defined by a 16 bit number showing how long the name is, followed by that many ascii bytes.
-6. Variables
- 1. A 32 bit number defines how many variables there are.
- 2. Each variable consists of:
- 3. A byte of what "type" it is.
- 4. A byte of what object it refers to.
- 5. 16 bits of what subclass it refers to.
- 6. Four uinits (what are those?) each 16 bits long.
- 7. A byte representing "global" (what? Maybe a boolean?)
- 8. A byte representing "syste" (What? Maybe a boolean?)
-7. Constants
- 1. A 32 bit number defines how many constants there are.
- 2. Each constant consists of:
- 3. A 32 bit number representing its number (is this just an ID?)
- 4. The value is defined by a 16 bit number showing how long the name is, followed by that many ascii bytes.
-8. Functions
- 1. A 32 bit number defines how many functions there are.
- 2. Each constant consists of:
- 3. A 32 bit number representing its variable number (is this just an ID?)
- 4. A 32 bit number representing its function number (is this just an ID?)
- 5. A 32 bit number representing its offset (offset into what?)
-9. Function Code
- 1. A 32 bit number defines how many commands there are.
- 2. Each command consists of:
- 3. A byte representing that command's opcode
- 4.
diff --git a/packages/webamp-modern/src/maki-interpreter/tools/build-typescript-interfaces.js b/packages/webamp-modern/src/maki-interpreter/tools/build-typescript-interfaces.js
deleted file mode 100644
index c618ce90..00000000
--- a/packages/webamp-modern/src/maki-interpreter/tools/build-typescript-interfaces.js
+++ /dev/null
@@ -1,65 +0,0 @@
-const objectData = require("../objectData/stdPatched");
-
-const makiObjectNames = new Set(
- Object.values(objectData).map((obj) => obj.name)
-);
-
-const BASE_OBJECT = "@{00000000-0000-0000-0000-000000000000}@";
-
-function mapType(makiType) {
- switch (makiType) {
- case "Object":
- return "IMakiObject";
- case "Map":
- return "IMakiMap";
- }
- if (makiObjectNames.has(makiType)) {
- return `I${makiType}`;
- }
-
- const lowerCaseType = makiType.toLowerCase();
- switch (lowerCaseType) {
- case "":
- return "void";
- case "string":
- return "string";
- case "int":
- case "float":
- case "double":
- return "number";
- case "boolean":
- return "boolean";
- case "any":
- return "any";
- }
-
- throw new Error(`Unhandled Maki type "${makiType}"`);
-}
-
-function argumentTypeForParameter(param) {
- const [type, name] = param;
- return `${name}: ${mapType(type)}`;
-}
-
-function methodTypeForFunction(func) {
- const args = func.parameters.map(argumentTypeForParameter).join(", ");
- return `${func.name.toLowerCase()}(${args}): ${mapType(func.result)};`;
-}
-
-function interfaceForObject(object) {
- const methods = object.functions.map(methodTypeForFunction);
- let ext = "";
- if (object.parent && object.parent !== BASE_OBJECT) {
- const parentType = mapType(object.parent);
- ext = ` extends ${parentType}`;
- }
- return `export interface ${mapType(object.name)}${ext} {
-${methods.map((method) => ` ${method}`).join("\n")}
-}`;
-}
-
-const interfaceFile = Object.values(objectData)
- .map(interfaceForObject)
- .join("\n\n");
-
-console.log(interfaceFile);
diff --git a/packages/webamp-modern/src/maki-interpreter/tools/extract-attributes.js b/packages/webamp-modern/src/maki-interpreter/tools/extract-attributes.js
deleted file mode 100755
index 0d4a121c..00000000
--- a/packages/webamp-modern/src/maki-interpreter/tools/extract-attributes.js
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/usr/bin/env node
-
-const fs = require("fs");
-const path = require("path");
-const JSZip = require("jszip");
-const Utils = require("../../utils");
-const glob = require("glob");
-
-function findWals(parentDir) {
- return new Promise((resolve, reject) => {
- glob("**/cPro2_Aluminum_1_1.wal", { cwd: parentDir }, (err, files) => {
- if (err) {
- return reject(err);
- }
- resolve(files.map((filePath) => path.join(parentDir, filePath)));
- });
- });
-}
-
-function sumCountObjects(obj1, obj2) {
- return Object.keys(obj2).reduce((summaryObj, key) => {
- if (summaryObj[key] == null) {
- summaryObj[key] = obj2[key];
- } else {
- summaryObj[key] += obj2[key];
- }
- return summaryObj;
- }, Object.assign({}, obj1));
-}
-
-async function getAttributeDataFromWal(absolutePath) {
- const buffer = fs.readFileSync(absolutePath);
- const zip = await JSZip.loadAsync(buffer);
- const skinXml = await Utils.readXml(zip, "skin.xml");
- if (skinXml == null) {
- return [];
- }
- const rawXmlTree = await Utils.inlineIncludes(skinXml, zip);
-
- const nodeTypes = [];
- Utils.mapTreeBreadth(rawXmlTree, (node) => {
- if (node.type === "element") {
- nodeTypes.push({
- name: node.name.toLowerCase(),
- attributes:
- node.attributes == null
- ? []
- : Object.keys(node.attributes).map((attr) => attr.toLowerCase()),
- });
- }
- return node;
- });
- return nodeTypes;
-}
-
-async function main(parentDir) {
- const errors = [];
- const paths = await findWals(parentDir);
- const attributeData = [];
-
- // Originally we moved to doing one skin at a time because we thougth it was
- // causing memory issues, now we know it's not, but it's still faster to do
- // one at a time for some reason. ¯\_(ツ)_/¯
- for (const walPath of paths) {
- try {
- console.error(`Working on ${walPath}`);
- attributeData.push(...(await getAttributeDataFromWal(walPath)));
- } catch (e) {
- const errorLine = e.toString().split("\n")[0];
- errors.push({ [errorLine]: 1 });
- // TODO: Investigate these.
- console.error(`Error getting call data from ${walPath}`, e);
- }
- }
-
- const summary = attributeData.reduce((sum, attrs) => {
- if (sum[attrs.name] == null) {
- sum[attrs.name] = {
- count: 0,
- attributes: {},
- };
- }
- sum[attrs.name].count++;
- const nodeAttrs = sum[attrs.name].attributes;
- attrs.attributes.forEach((attr) => {
- if (nodeAttrs[attr] == null) {
- nodeAttrs[attr] = 1;
- } else {
- nodeAttrs[attr]++;
- }
- });
- return sum;
- }, {});
-
- if (errors.length) {
- console.error(JSON.stringify(errors.reduce(sumCountObjects, {}), null, 2));
- }
- console.log(JSON.stringify(summary, null, 2));
-}
-
-main("/Volumes/Mobile Backup/skins/skins/random/Winamp Skins/Skins/");
diff --git a/packages/webamp-modern/src/maki-interpreter/tools/extract-functions.js b/packages/webamp-modern/src/maki-interpreter/tools/extract-functions.js
deleted file mode 100755
index e7049a74..00000000
--- a/packages/webamp-modern/src/maki-interpreter/tools/extract-functions.js
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/usr/bin/env node
-
-const fs = require("fs");
-const path = require("path");
-const parse = require("../parser").default;
-const JSZip = require("jszip");
-const { getClass, getFunctionObject, getFormattedId } = require("../objects");
-const glob = require("glob");
-
-const CALL_OPCODES = new Set([24, 112]);
-const SKIN_FILENAME_BLACKLIST = new Set(["Fuzzy_Muffins.wal"]);
-
-function findWals(parentDir) {
- return new Promise((resolve, reject) => {
- glob("**/*.wal", { cwd: parentDir }, (err, files) => {
- if (err) {
- return reject(err);
- }
- resolve(files.map((filePath) => path.join(parentDir, filePath)));
- });
- });
-}
-
-function sumCountObjects(obj1, obj2) {
- return Object.keys(obj2).reduce((summaryObj, key) => {
- if (summaryObj[key] == null) {
- summaryObj[key] = obj2[key];
- } else {
- summaryObj[key] += obj2[key];
- }
- return summaryObj;
- }, Object.assign({}, obj1));
-}
-
-async function getCallCountsFromWal(absolutePath) {
- const buffer = fs.readFileSync(absolutePath);
- const zip = await JSZip.loadAsync(buffer);
- const files = zip.file(/\.maki$/);
- const buffers = await Promise.all(
- files.map((file) => file.async("nodebuffer"))
- );
- return buffers.map(getCallCountsFromMaki).reduce(sumCountObjects, {});
-}
-
-function getCallCountsFromMaki(buffer) {
- const maki = parse(buffer);
- return maki.commands
- .filter((command) => CALL_OPCODES.has(command.opcode))
- .map((command) => {
- const method = maki.methods[command.arg];
- const classId = maki.classes[method.typeOffset];
- const klass = getClass(classId);
- if (klass == null) {
- throw new Error(
- `Unknown class ID: ${getFormattedId(classId)} aka ${classId} (raw)`
- );
- }
- const parentClass = getFunctionObject(klass, method.name);
- return `${parentClass.name}.${method.name.toLowerCase()}`;
- })
- .map((methodName) => ({ [methodName]: 1 }))
- .reduce(sumCountObjects, {});
-}
-
-function setObjectValuesToOne(obj) {
- const newObj = {};
- Object.keys(obj).forEach((key) => {
- if (obj[key] != null) {
- newObj[key] = 1;
- }
- });
-
- return newObj;
-}
-
-async function main(parentDir) {
- const errors = [];
- const paths = await findWals(parentDir);
- const callCounts = [];
-
- // Originally we moved to doing one skin at a time because we thougth it was
- // causing memory issues, now we know it's not, but it's still faster to do
- // one at a time for some reason. ¯\_(ツ)_/¯
- for (const walPath of paths) {
- try {
- const fileName = path.basename(walPath);
- if (SKIN_FILENAME_BLACKLIST.has(fileName)) {
- continue;
- }
- console.error(`Working on ${walPath}`);
- callCounts.push(await getCallCountsFromWal(walPath));
- } catch (e) {
- const errorLine = e.toString().split("\n")[0];
- errors.push({ [errorLine]: 1 });
- // TODO: Investigate these.
- console.error(`Error getting calld data from ${walPath}`, e);
- }
- }
- const totalCalls = callCounts.reduce(sumCountObjects);
- const foundInSkins = callCounts
- .map(setObjectValuesToOne)
- .reduce(sumCountObjects);
-
- if (errors.length) {
- console.error(JSON.stringify(errors.reduce(sumCountObjects, {}), null, 2));
- }
- const result = { totalCalls, foundInSkins };
- console.log(JSON.stringify(result, null, 2));
-}
-
-main("/Volumes/Mobile Backup/skins/skins/");
diff --git a/packages/webamp-modern/src/maki-interpreter/tools/extract-maki-files.js b/packages/webamp-modern/src/maki-interpreter/tools/extract-maki-files.js
deleted file mode 100755
index 0dc117a1..00000000
--- a/packages/webamp-modern/src/maki-interpreter/tools/extract-maki-files.js
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env node
-
-const path = require("path");
-const fs = require("fs");
-const JSZip = require("jszip");
-const glob = require("glob");
-
-function findWals(parentDir) {
- return new Promise((resolve, reject) => {
- // options is optional
- glob("**/*.wal", { cwd: parentDir }, (err, files) => {
- if (err) {
- return reject(err);
- }
- resolve(files);
- });
- });
-}
-
-async function main(skinPath) {
- // Find all the .wal files in the path recursively
- const wals = await findWals(skinPath);
- const zips = await Promise.all(
- wals.map(async (skin) => {
- const walPath = path.join(skinPath, skin);
-
- const buffer = fs.readFileSync(walPath);
- const zip = await JSZip.loadAsync(buffer);
- const makis = await Promise.all(
- zip.file(/\.maki$/i).map(async (file) => {
- return {
- name: file.name,
- buffer: await file.async("nodebuffer"),
- };
- })
- );
- return {
- path: walPath,
- makis,
- };
- })
- );
- console.log(zips);
- // For each skin
- // extract it
- // find all `.maki` files
- // get its md5
- //
- // create a directory for its
- // For each sk
-}
-
-main("/Volumes/Mobile Backup/skins/skins/dump/Compact-Utility");
diff --git a/packages/webamp-modern/src/maki-interpreter/tools/extract-object-types.js b/packages/webamp-modern/src/maki-interpreter/tools/extract-object-types.js
deleted file mode 100644
index ed8faaee..00000000
--- a/packages/webamp-modern/src/maki-interpreter/tools/extract-object-types.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import { parseFile } from "./parse-mi";
-import path from "path";
-import fs from "fs";
-
-const compilers = path.join(__dirname, "../../../resources/maki_compiler/");
-
-const lib566 = path.join(compilers, "v1.2.0 (Winamp 5.66)/lib/");
-
-const files = {
- pldir: path.join(lib566, "pldir.mi"),
- config: path.join(lib566, "config.mi"),
- std: path.join(lib566, "std.mi"),
-};
-
-Object.keys(files).forEach((name) => {
- const sourcePath = files[name];
- const types = parseFile(sourcePath);
- const destinationPath = path.join(__dirname, `../objectData/${name}.json`);
-
- fs.writeFileSync(destinationPath, JSON.stringify(types, null, 2));
-});
diff --git a/packages/webamp-modern/src/maki-interpreter/tools/parse-mi.js b/packages/webamp-modern/src/maki-interpreter/tools/parse-mi.js
deleted file mode 100644
index ef1fb717..00000000
--- a/packages/webamp-modern/src/maki-interpreter/tools/parse-mi.js
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * Based on extract_objects.pl from Ralf Engels Maki decompiler
- */
-
-const fs = require("fs");
-
-function parseFile(filePath) {
- const mi = fs.readFileSync(filePath, "utf8");
- const lines = mi.split("\n");
-
- const objects = {};
- lines.forEach((line, lineNumber) => {
- const classDefinitionMatch =
- /\s*extern\s+class\s*\@\{(........\s?-\s?....\s?-\s?....\s?-\s?....\s?-\s?............)\}\s*\@\s*(.*?)\s+(.*?);/.exec(
- line
- );
- if (classDefinitionMatch) {
- const id = classDefinitionMatch[1].replace(/[-\s]/g, "");
- const parent = classDefinitionMatch[2];
- const name = classDefinitionMatch[3]
- .replace(/^_predecl /, "")
- .replace(/^&/, "");
- objects[name.toLowerCase()] = { id, name, parent, functions: [] };
- }
-
- const methodMatch = /\s*extern(\s+.*)?\s+(.*)\.(.*)\((.*)\);/.exec(line);
-
- if (methodMatch) {
- const result = methodMatch[1] == null ? "" : methodMatch[1].trim();
- const className = methodMatch[2].toLowerCase();
- const name = methodMatch[3].trim();
- const rawArgs = methodMatch[4].split(/\s*,\s*/);
- const parameters = rawArgs.filter(Boolean).map((rawArg) => {
- const argMatch = /^\s*(.*\s+)?(.*)\s*/.exec(rawArg);
- if (argMatch == null) {
- throw new Error(`Could not find args in ${rawArg} in ${line}`);
- }
- const type = argMatch[1];
- if (type == null) {
- // console.warn(`Could not find args name in ${fileName}:${lineNum} "${line}"`);
- return [argMatch[2], "unknown_arg_name"];
- }
- return [type.trim(), argMatch[2]];
- });
- if (objects[className] == null) {
- throw new Error(
- `"${className} not defined in ${filePath}:${lineNumber}. I have ${JSON.stringify(
- Object.keys(objects)
- )}`
- );
- }
- objects[className].functions.push({ result, name, parameters });
- }
- });
-
- const objectIds = {};
- Object.keys(objects).forEach((normalizedName) => {
- const { id, parent, functions, name } = objects[normalizedName];
- objectIds[id] = { parent, functions, name };
- });
-
- return objectIds;
-}
-
-module.exports = { parseFile };
diff --git a/packages/webamp-modern/src/maki-interpreter/tools/parse-mi.test.js b/packages/webamp-modern/src/maki-interpreter/tools/parse-mi.test.js
deleted file mode 100644
index d70457a7..00000000
--- a/packages/webamp-modern/src/maki-interpreter/tools/parse-mi.test.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import std from "../objectData/std.json";
-import config from "../objectData/config.json";
-import pldir from "../objectData/pldir.json";
-import { parseFile } from "../tools/parse-mi";
-import path from "path";
-
-/**
- * This file basically ensures that `yarn extract-object-types` has been run.
- */
-
-const compilers = path.join(__dirname, "../../../resources/maki_compiler/");
-
-const lib566 = path.join(compilers, "v1.2.0 (Winamp 5.66)/lib/");
-
-test("std.mi", () => {
- const parsedObjects = parseFile(path.join(lib566, "std.mi"));
- expect(parsedObjects).toEqual(std);
-});
-
-test("config.mi", () => {
- const parsedObjects = parseFile(path.join(lib566, "config.mi"));
- expect(parsedObjects).toEqual(config);
-});
-
-test("pldir.mi", () => {
- const parsedObjects = parseFile(path.join(lib566, "pldir.mi"));
- expect(parsedObjects).toEqual(pldir);
-});
diff --git a/packages/webamp-modern/src/maki-interpreter/variable.js b/packages/webamp-modern/src/maki-interpreter/variable.js
deleted file mode 100644
index 01ad7772..00000000
--- a/packages/webamp-modern/src/maki-interpreter/variable.js
+++ /dev/null
@@ -1,52 +0,0 @@
-import Emitter from "../Emitter";
-
-class Variable {
- constructor({ type, typeName, global }) {
- this.type = type;
- this.typeName = typeName;
- this.global = global;
- this._emitter = new Emitter();
- this._unsubscribeFromValue = null;
- }
-
- getValue() {
- return this._value;
- }
-
- setValue(value) {
- if (this._unsubscribeFromValue != null) {
- this._unsubscribeFromValue();
- }
- if (this.global && this.typeName === "OBJECT" && value !== 0) {
- this._unsubscribeFromValue = value.js_listenToAll(
- (eventName, ...args) => {
- this._emitter.trigger(eventName.toLowerCase(), ...args);
- }
- );
- }
- this._value = value;
- }
-
- hook(eventName, cb) {
- this._emitter.listen(eventName.toLowerCase(), cb);
- }
-
- dispose() {
- if (this._unsubscribeFromValue) {
- this._unsubscribeFromValue();
- }
- this._emitter.dispose();
- }
-
- static newInt(value) {
- const result = new Variable({
- type: "INT",
- typeName: "WHAT",
- global: false,
- });
- result.setValue(value);
- return result;
- }
-}
-
-export default Variable;
diff --git a/packages/webamp-modern/src/maki-interpreter/virtualMachine.js b/packages/webamp-modern/src/maki-interpreter/virtualMachine.js
deleted file mode 100644
index a64d5b4d..00000000
--- a/packages/webamp-modern/src/maki-interpreter/virtualMachine.js
+++ /dev/null
@@ -1,40 +0,0 @@
-import parse from "./parser";
-import { getClass, getFormattedId } from "./objects";
-import { interpret } from "./interpreter";
-
-export function run({ runtime, data, system, log }) {
- const program = parse(data);
-
- // Replace class hashes with actual JavaScript classes from the runtime
- program.classes = program.classes.map((hash) => {
- const resolved = runtime[hash];
- if (resolved == null && log) {
- const klass = getClass(hash);
- console.warn(
- `Class missing from runtime: ${hash}`,
- klass == null
- ? `(formatted ID: ${getFormattedId(hash)})`
- : `expected ${klass.name}`
- );
- }
- return resolved;
- });
-
- // Bind top level hooks.
- program.bindings.forEach((binding) => {
- const { commandOffset, variableOffset, methodOffset } = binding;
- const variable = program.variables[variableOffset];
- const method = program.methods[methodOffset];
- // const logger = log ? printCommand : logger;
- // TODO: Handle disposing of this.
- // TODO: Handle passing in variables.
- variable.hook(method.name, (...args) => {
- interpret(commandOffset, program, args.reverse());
- });
- });
-
- // Set the System global
- // TODO: We could confirm that this variable has the "system" flag set.
- program.variables[0].setValue(system);
- system.onscriptloaded();
-}
diff --git a/packages/webamp-modern-2/src/maki/MakiFile.ts b/packages/webamp-modern/src/maki/MakiFile.ts
similarity index 100%
rename from packages/webamp-modern-2/src/maki/MakiFile.ts
rename to packages/webamp-modern/src/maki/MakiFile.ts
diff --git a/packages/webamp-modern-2/src/maki/__tests__/MockSystem.ts b/packages/webamp-modern/src/maki/__tests__/MockSystem.ts
similarity index 100%
rename from packages/webamp-modern-2/src/maki/__tests__/MockSystem.ts
rename to packages/webamp-modern/src/maki/__tests__/MockSystem.ts
diff --git a/packages/webamp-modern-2/src/maki/__tests__/fixtures/TestBedSkin/images/main-bg-shadow.png b/packages/webamp-modern/src/maki/__tests__/fixtures/TestBedSkin/images/main-bg-shadow.png
similarity index 100%
rename from packages/webamp-modern-2/src/maki/__tests__/fixtures/TestBedSkin/images/main-bg-shadow.png
rename to packages/webamp-modern/src/maki/__tests__/fixtures/TestBedSkin/images/main-bg-shadow.png
diff --git a/packages/webamp-modern-2/src/maki/__tests__/fixtures/TestBedSkin/scripts/assertions.m b/packages/webamp-modern/src/maki/__tests__/fixtures/TestBedSkin/scripts/assertions.m
similarity index 100%
rename from packages/webamp-modern-2/src/maki/__tests__/fixtures/TestBedSkin/scripts/assertions.m
rename to packages/webamp-modern/src/maki/__tests__/fixtures/TestBedSkin/scripts/assertions.m
diff --git a/packages/webamp-modern-2/src/maki/__tests__/fixtures/TestBedSkin/scripts/assertions.maki b/packages/webamp-modern/src/maki/__tests__/fixtures/TestBedSkin/scripts/assertions.maki
similarity index 100%
rename from packages/webamp-modern-2/src/maki/__tests__/fixtures/TestBedSkin/scripts/assertions.maki
rename to packages/webamp-modern/src/maki/__tests__/fixtures/TestBedSkin/scripts/assertions.maki
diff --git a/packages/webamp-modern-2/src/maki/__tests__/fixtures/TestBedSkin/scripts/lib/std.mi b/packages/webamp-modern/src/maki/__tests__/fixtures/TestBedSkin/scripts/lib/std.mi
similarity index 100%
rename from packages/webamp-modern-2/src/maki/__tests__/fixtures/TestBedSkin/scripts/lib/std.mi
rename to packages/webamp-modern/src/maki/__tests__/fixtures/TestBedSkin/scripts/lib/std.mi
diff --git a/packages/webamp-modern-2/src/maki/__tests__/fixtures/TestBedSkin/skin.xml b/packages/webamp-modern/src/maki/__tests__/fixtures/TestBedSkin/skin.xml
similarity index 100%
rename from packages/webamp-modern-2/src/maki/__tests__/fixtures/TestBedSkin/skin.xml
rename to packages/webamp-modern/src/maki/__tests__/fixtures/TestBedSkin/skin.xml
diff --git a/packages/webamp-modern-2/src/maki/__tests__/makiFixture.test.ts b/packages/webamp-modern/src/maki/__tests__/makiFixture.test.ts
similarity index 100%
rename from packages/webamp-modern-2/src/maki/__tests__/makiFixture.test.ts
rename to packages/webamp-modern/src/maki/__tests__/makiFixture.test.ts
diff --git a/packages/webamp-modern-2/src/maki/constants.ts b/packages/webamp-modern/src/maki/constants.ts
similarity index 100%
rename from packages/webamp-modern-2/src/maki/constants.ts
rename to packages/webamp-modern/src/maki/constants.ts
diff --git a/packages/webamp-modern-2/src/maki/interpreter.ts b/packages/webamp-modern/src/maki/interpreter.ts
similarity index 100%
rename from packages/webamp-modern-2/src/maki/interpreter.ts
rename to packages/webamp-modern/src/maki/interpreter.ts
diff --git a/packages/webamp-modern/src/maki/objectData/application.json b/packages/webamp-modern/src/maki/objectData/application.json
new file mode 100644
index 00000000..ec1a4f31
--- /dev/null
+++ b/packages/webamp-modern/src/maki/objectData/application.json
@@ -0,0 +1,78 @@
+{
+ "B8E867B027154da7A5BA53DBA1FCFEAC": {
+ "parent": "Object",
+ "functions": [
+ {
+ "result": "String",
+ "name": "GetApplicationName",
+ "parameters": []
+ },
+ {
+ "result": "String",
+ "name": "GetVersionString",
+ "parameters": []
+ },
+ {
+ "result": "String",
+ "name": "GetVersionNumberString",
+ "parameters": []
+ },
+ {
+ "result": "int",
+ "name": "GetBuildNumber",
+ "parameters": []
+ },
+ {
+ "result": "String",
+ "name": "GetGUID",
+ "parameters": []
+ },
+ {
+ "result": "String",
+ "name": "GetCommandLine",
+ "parameters": []
+ },
+ {
+ "result": "",
+ "name": "Shutdown",
+ "parameters": []
+ },
+ {
+ "result": "",
+ "name": "CancelShutdown",
+ "parameters": []
+ },
+ {
+ "result": "boolean",
+ "name": "IsShuttingDown",
+ "parameters": []
+ },
+ {
+ "result": "String",
+ "name": "GetApplicationPath",
+ "parameters": []
+ },
+ {
+ "result": "String",
+ "name": "GetSettingsPath",
+ "parameters": []
+ },
+ {
+ "result": "String",
+ "name": "GetWorkingPath",
+ "parameters": []
+ },
+ {
+ "result": "",
+ "name": "SetWorkingPath",
+ "parameters": [
+ [
+ "String",
+ "working_path"
+ ]
+ ]
+ }
+ ],
+ "name": "Application"
+ }
+}
\ No newline at end of file
diff --git a/packages/webamp-modern-2/objectData/config.json b/packages/webamp-modern/src/maki/objectData/config.json
similarity index 100%
rename from packages/webamp-modern-2/objectData/config.json
rename to packages/webamp-modern/src/maki/objectData/config.json
diff --git a/packages/webamp-modern-2/objectData/pldir.json b/packages/webamp-modern/src/maki/objectData/pldir.json
similarity index 100%
rename from packages/webamp-modern-2/objectData/pldir.json
rename to packages/webamp-modern/src/maki/objectData/pldir.json
diff --git a/packages/webamp-modern-2/objectData/std.json b/packages/webamp-modern/src/maki/objectData/std.json
similarity index 100%
rename from packages/webamp-modern-2/objectData/std.json
rename to packages/webamp-modern/src/maki/objectData/std.json
diff --git a/packages/webamp-modern-2/src/maki/objectData/stdPatched.ts b/packages/webamp-modern/src/maki/objectData/stdPatched.ts
similarity index 100%
rename from packages/webamp-modern-2/src/maki/objectData/stdPatched.ts
rename to packages/webamp-modern/src/maki/objectData/stdPatched.ts
diff --git a/packages/webamp-modern-2/src/maki/objectData/winampconfig.json b/packages/webamp-modern/src/maki/objectData/winampconfig.json
similarity index 95%
rename from packages/webamp-modern-2/src/maki/objectData/winampconfig.json
rename to packages/webamp-modern/src/maki/objectData/winampconfig.json
index 0ec8fc5e..83134ac6 100644
--- a/packages/webamp-modern-2/src/maki/objectData/winampconfig.json
+++ b/packages/webamp-modern/src/maki/objectData/winampconfig.json
@@ -1,6 +1,5 @@
{
"B2AD3F2B31ED4e31BC6DE9951CD555BB": {
- "name": "WinampConfig",
"parent": "Object",
"functions": [
{
@@ -13,10 +12,10 @@
]
]
}
- ]
+ ],
+ "name": "WinampConfig"
},
"FC17844EC72B4518A068A8F930A5BA80": {
- "name": "WinampConfigGroup",
"parent": "Object",
"functions": [
{
@@ -83,6 +82,7 @@
]
]
}
- ]
+ ],
+ "name": "WinampConfigGroup"
}
}
\ No newline at end of file
diff --git a/packages/webamp-modern-2/src/maki/objects.ts b/packages/webamp-modern/src/maki/objects.ts
similarity index 100%
rename from packages/webamp-modern-2/src/maki/objects.ts
rename to packages/webamp-modern/src/maki/objects.ts
diff --git a/packages/webamp-modern-2/src/maki/parser.ts b/packages/webamp-modern/src/maki/parser.ts
similarity index 100%
rename from packages/webamp-modern-2/src/maki/parser.ts
rename to packages/webamp-modern/src/maki/parser.ts
diff --git a/packages/webamp-modern-2/src/maki/readme.md b/packages/webamp-modern/src/maki/readme.md
similarity index 100%
rename from packages/webamp-modern-2/src/maki/readme.md
rename to packages/webamp-modern/src/maki/readme.md
diff --git a/packages/webamp-modern-2/src/maki/v.ts b/packages/webamp-modern/src/maki/v.ts
similarity index 100%
rename from packages/webamp-modern-2/src/maki/v.ts
rename to packages/webamp-modern/src/maki/v.ts
diff --git a/packages/webamp-modern-2/src/maki/virtualMachine.js b/packages/webamp-modern/src/maki/virtualMachine.js
similarity index 100%
rename from packages/webamp-modern-2/src/maki/virtualMachine.js
rename to packages/webamp-modern/src/maki/virtualMachine.js
diff --git a/packages/webamp-modern-2/src/progress.html b/packages/webamp-modern/src/progress.html
similarity index 100%
rename from packages/webamp-modern-2/src/progress.html
rename to packages/webamp-modern/src/progress.html
diff --git a/packages/webamp-modern-2/src/progress.ts b/packages/webamp-modern/src/progress.ts
similarity index 100%
rename from packages/webamp-modern-2/src/progress.ts
rename to packages/webamp-modern/src/progress.ts
diff --git a/packages/webamp-modern/src/runtime/.eslintrc b/packages/webamp-modern/src/runtime/.eslintrc
deleted file mode 100644
index a7abc157..00000000
--- a/packages/webamp-modern/src/runtime/.eslintrc
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "rules": {
- // TODO: Turn these all back on
- // For now we want to be able to define maki method arguments even though we don't use them.
- "@typescript-eslint/no-unused-vars": "off"
- }
-}
diff --git a/packages/webamp-modern/src/runtime/AlbumArtLayer.ts b/packages/webamp-modern/src/runtime/AlbumArtLayer.ts
deleted file mode 100644
index 5c231beb..00000000
--- a/packages/webamp-modern/src/runtime/AlbumArtLayer.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { unimplementedWarning } from "../utils";
-import Layer from "./Layer";
-
-class AlbumArtLayer extends Layer {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "AlbumArtLayer";
- }
-
- refresh(): void {
- return unimplementedWarning("refresh");
- }
-
- isloading(): void {
- return unimplementedWarning("isloading");
- }
-
- onalbumartloaded(success: boolean): void {
- return unimplementedWarning("onalbumartloaded");
- }
-}
-
-export default AlbumArtLayer;
diff --git a/packages/webamp-modern/src/runtime/AnimatedLayer.ts b/packages/webamp-modern/src/runtime/AnimatedLayer.ts
deleted file mode 100644
index 3fe25033..00000000
--- a/packages/webamp-modern/src/runtime/AnimatedLayer.ts
+++ /dev/null
@@ -1,260 +0,0 @@
-import Layer from "./Layer";
-import { unimplementedWarning } from "../utils";
-import { XmlNode } from "../types";
-import MakiObject from "./MakiObject";
-
-// Eventually we will want to type the attributes for each MakiObject. To do
-// that we will need patterns and utilities that make it easy. This is a first
-// stab at a pattern with a few utility functions. The idea is that the
-// attributes we expect are all typed as optional strings, since I think all XML
-// attributes are optional. Then we have utility functions which handle type
-// coersion with default values.
-//
-// My goal is that the XML attributes parsed in
-// the constructor and pulled into typed local properties.
-type JSImage = {
- imgUrl: string;
- h: number;
- w: number;
- x: number;
- y: number;
-};
-
-type Attributes = {
- js_assets: {
- image: JSImage;
- };
- end?: string;
- frameheight?: string;
- framewidth?: string;
- autoplay?: string;
- autoreplay?: string;
- start?: string;
- speed?: string;
- h?: string;
- w?: string;
-};
-
-function getNumber(attr: string | undefined, fallback: number): number {
- return attr === undefined ? fallback : Number(attr);
-}
-
-function getBoolean(attr: string | undefined, fallback: boolean): boolean {
- // TODO: Check if there are othe values that parse as `true`, there probably are.
- return attr === undefined ? fallback : attr === "1";
-}
-
-class AnimatedLayer extends Layer {
- _typedAttributes: Attributes;
- _playing: boolean;
- _autoReplay: boolean;
- _start: number;
- _end: number;
- _speed: number;
- _frameNum: number;
- _animationStartTime: number;
- _animationCancelID: number | null;
-
- constructor(node: XmlNode, parent: MakiObject, annotations: Object = {}) {
- super(node, parent, annotations);
- // @ts-ignore For now MakiObject defines a much-too-generic version of
- // attributes. Eventually we will want to be able to define the XML node we
- // expect locally. For now we will just cheat.
- this._typedAttributes = this.attributes;
- const { autoplay, autoreplay, start, speed } = this._typedAttributes;
-
- // Default values from http://wiki.winamp.com/wiki/XML_GUI_Objects#.3Canimatedlayer.2F.3E
- this._playing = getBoolean(autoplay, false);
- this._autoReplay = getBoolean(autoreplay, true);
- this._frameNum = getNumber(start, 0);
- this._start = getNumber(start, 0);
- this._speed = getNumber(speed, 200);
- this._end = this._initializeEnd();
-
- this._animationStartTime = 0;
- this._animationCancelID = null;
-
- this._setupAnimationLoop();
- }
-
- _initializeEnd(): number {
- const { end, js_assets, frameheight, framewidth, w, h } =
- this._typedAttributes;
-
- if (end != null) {
- return getNumber(end, 0);
- }
-
- const { image } = js_assets;
- if (!image) {
- console.warn("Could not find js_assets image");
- return 0;
- }
-
- const typedFrameHeight = getNumber(frameheight, 0);
- const typedFrameWidth = getNumber(framewidth, 0);
-
- if (typedFrameHeight !== 0) {
- return Math.ceil(image.h / typedFrameHeight);
- } else if (typedFrameWidth !== 0) {
- return Math.ceil(image.w / typedFrameWidth);
- }
- // In the general case where we don't have a frameheight/framewidth and
- // the start/end are not both set, we calculate the end frame by
- // calculating the end in both directions and picking the longer repeat length
- const width = getNumber(w, image.w);
- const height = getNumber(h, image.h);
- return Math.max(Math.ceil(image.w / width), Math.ceil(image.h / height));
- }
-
- _animationLoop() {
- this._animationCancelID = window.requestAnimationFrame(() => {
- const currentTime = window.performance.now();
- if (currentTime > this._animationStartTime + this._speed) {
- this._animationStartTime = currentTime;
- this.js_trigger("js_framechange");
- } else {
- this._animationLoop();
- }
- });
- }
-
- _setupAnimationLoop() {
- this.js_listen("js_framechange", () => {
- this._frameNum += 1;
- if (this._frameNum > this.getendframe()) {
- this._frameNum = this.getstartframe();
- if (!this._autoReplay) {
- return;
- }
- }
- this.js_trigger("js_update");
-
- if (this._playing) {
- this._animationLoop();
- }
- });
-
- if (this._playing) {
- this.js_trigger("js_framechange");
- }
- }
-
- js_delete() {
- if (this._animationCancelID != null) {
- window.cancelAnimationFrame(this._animationCancelID);
- }
- super.js_delete();
- }
-
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname(): string {
- return "AnimatedLayer";
- }
-
- play(): void {
- // TODO: do we need to trigger something for `onplay`/`onresume` events?
- this._playing = true;
- this.js_trigger("js_framechange");
- }
-
- pause(): void {
- // TODO: do we need to trigger something for `onpause` events?
- this._playing = false;
- }
-
- stop(): void {
- // TODO: do we need to trigger something for `onstop` events?
- this._playing = false;
- this._frameNum = this.getstartframe();
- }
-
- setspeed(msperframe: number): void {
- this._speed = msperframe;
- }
-
- gotoframe(framenum: number): void {
- this._frameNum = framenum;
- this.js_trigger("js_update");
- }
-
- getlength(): number {
- return this.getendframe() - this.getstartframe();
- }
-
- onplay(): void {
- this.js_trigger("onPlay");
- }
-
- onpause(): void {
- this.js_trigger("onPause");
- }
-
- onresume(): void {
- this.js_trigger("onResume");
- }
-
- onstop(): void {
- this.js_trigger("onStop");
- }
-
- onframe(framenum: number): void {
- this.js_trigger("onFrame", framenum);
- }
-
- setstartframe(framenum: number): void {
- this._start = framenum;
- }
-
- setendframe(framenum: number): void {
- this.attributes.end = framenum;
- }
-
- setautoreplay(onoff: boolean): void {
- // TODO: should this trigger the animation if it isn't currently runnnig?
- this._autoReplay = onoff;
- }
-
- isplaying(): boolean {
- return this._playing;
- }
-
- ispaused(): boolean {
- return unimplementedWarning("ispaused");
- }
-
- isstopped(): boolean {
- return unimplementedWarning("isstopped");
- }
-
- getstartframe(): number {
- return this._start;
- }
-
- getendframe(): number {
- return this._end;
- }
-
- getdirection(): number {
- return unimplementedWarning("getdirection");
- }
-
- getautoreplay(): boolean {
- return this._autoReplay;
- }
-
- getcurframe(): number {
- return this._frameNum;
- }
-
- setrealtime(onoff: boolean): void {
- return unimplementedWarning("setrealtime");
- }
-}
-
-export default AnimatedLayer;
diff --git a/packages/webamp-modern/src/runtime/BitList.ts b/packages/webamp-modern/src/runtime/BitList.ts
deleted file mode 100644
index 38b2c65c..00000000
--- a/packages/webamp-modern/src/runtime/BitList.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { unimplementedWarning } from "../utils";
-import MakiObject from "./MakiObject";
-
-class BitList extends MakiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "BitList";
- }
-
- getitem(n: number): boolean {
- return unimplementedWarning("getitem");
- }
-
- setitem(n: number, val: boolean): void {
- return unimplementedWarning("setitem");
- }
-
- setsize(s: number): void {
- return unimplementedWarning("setsize");
- }
-
- getsize(): number {
- return unimplementedWarning("getsize");
- }
-}
-
-export default BitList;
diff --git a/packages/webamp-modern/src/runtime/Browser.ts b/packages/webamp-modern/src/runtime/Browser.ts
deleted file mode 100644
index b327317c..00000000
--- a/packages/webamp-modern/src/runtime/Browser.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class Browser extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Browser";
- }
-
- navigateurl(url: string): void {
- return unimplementedWarning("navigateurl");
- }
-
- back(): void {
- return unimplementedWarning("back");
- }
-
- forward(): void {
- return unimplementedWarning("forward");
- }
-
- stop(): void {
- return unimplementedWarning("stop");
- }
-
- refresh(): void {
- return unimplementedWarning("refresh");
- }
-
- home(): void {
- return unimplementedWarning("home");
- }
-
- settargetname(targetname: string): void {
- return unimplementedWarning("settargetname");
- }
-
- onbeforenavigate(url: string, flags: number, targetframename: string): void {
- this.js_trigger("onBeforeNavigate", url, flags, targetframename);
- }
-
- ondocumentcomplete(url: string): void {
- this.js_trigger("onDocumentComplete", url);
- }
-
- ondocumentready(url: string): void {
- return unimplementedWarning("ondocumentready");
- }
-
- getdocumenttitle(): string {
- return unimplementedWarning("getdocumenttitle");
- }
-
- onnavigateerror(url: string, code: number): void {
- return unimplementedWarning("onnavigateerror");
- }
-
- setcancelieerrorpage(cancel: boolean): void {
- return unimplementedWarning("setcancelieerrorpage");
- }
-
- scrape(): void {
- return unimplementedWarning("scrape");
- }
-
- onmedialink(url: string): string {
- return unimplementedWarning("onmedialink");
- }
-}
-
-export default Browser;
diff --git a/packages/webamp-modern/src/runtime/Button.ts b/packages/webamp-modern/src/runtime/Button.ts
deleted file mode 100644
index ac81c9ed..00000000
--- a/packages/webamp-modern/src/runtime/Button.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class Button extends GuiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Button";
- }
-
- leftclick(): void {
- this.js_trigger("onLeftClick");
- }
-
- rightclick(): void {
- this.js_trigger("onRightClick");
- }
-
- onactivate(activated: number): void {
- this.js_trigger("onActivate", activated);
- }
-
- setactivated(onoff: boolean): void {
- return unimplementedWarning("setactivated");
- }
-
- getactivated(): boolean {
- unimplementedWarning("getactivated");
- return false;
- }
-
- onleftclick(): void {
- this.js_trigger("onLeftClick");
- }
-
- onrightclick(): void {
- this.js_trigger("onRightClick");
- }
-
- setactivatednocallback(onoff: boolean): void {
- return unimplementedWarning("setactivatednocallback");
- }
-}
-
-export default Button;
diff --git a/packages/webamp-modern/src/runtime/CfgGroup.ts b/packages/webamp-modern/src/runtime/CfgGroup.ts
deleted file mode 100644
index 75fd3a12..00000000
--- a/packages/webamp-modern/src/runtime/CfgGroup.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import Group from "./Group";
-import { unimplementedWarning } from "../utils";
-
-class CfgGroup extends Group {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "CfgGroup";
- }
-
- cfggetint(): number {
- return unimplementedWarning("cfggetint");
- }
-
- cfgsetint(intvalue: number): void {
- return unimplementedWarning("cfgsetint");
- }
-
- cfggetstring(): string {
- return unimplementedWarning("cfggetstring");
- }
-
- cfggetfloat(): number {
- return unimplementedWarning("cfggetfloat");
- }
-
- cfgsetfloat(floatvalue: number): void {
- return unimplementedWarning("cfgsetfloat");
- }
-
- cfgsetstring(strvalue: string): void {
- return unimplementedWarning("cfgsetstring");
- }
-
- oncfgchanged(): void {
- this.js_trigger("onCfgChanged");
- }
-
- cfggetguid(): string {
- return unimplementedWarning("cfggetguid");
- }
-
- cfggetname(): string {
- return unimplementedWarning("cfggetname");
- }
-}
-
-export default CfgGroup;
diff --git a/packages/webamp-modern/src/runtime/CheckBox.ts b/packages/webamp-modern/src/runtime/CheckBox.ts
deleted file mode 100644
index ea5a5caf..00000000
--- a/packages/webamp-modern/src/runtime/CheckBox.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class CheckBox extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "CheckBox";
- }
-
- ontoggle(newstate: number): void {
- this.js_trigger("onToggle", newstate);
- }
-
- setchecked(checked: number): void {
- return unimplementedWarning("setchecked");
- }
-
- ischecked(): number {
- return unimplementedWarning("ischecked");
- }
-
- settext(txt: string): void {
- return unimplementedWarning("settext");
- }
-
- gettext(): string {
- return unimplementedWarning("gettext");
- }
-}
-
-export default CheckBox;
diff --git a/packages/webamp-modern/src/runtime/ComponentBucket.ts b/packages/webamp-modern/src/runtime/ComponentBucket.ts
deleted file mode 100644
index b0926dce..00000000
--- a/packages/webamp-modern/src/runtime/ComponentBucket.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class ComponentBucket extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "ComponentBucket";
- }
-
- getmaxheight(): number {
- return unimplementedWarning("getmaxheight");
- }
-
- getmaxwidth(): number {
- return unimplementedWarning("getmaxwidth");
- }
-
- setscroll(x: number): number {
- return unimplementedWarning("setscroll");
- }
-
- getscroll(): number {
- return unimplementedWarning("getscroll");
- }
-
- getnumchildren(): number {
- return unimplementedWarning("getnumchildren");
- }
-
- enumchildren(n: number) {
- return unimplementedWarning("enumchildren");
- }
-}
-
-export default ComponentBucket;
diff --git a/packages/webamp-modern/src/runtime/Config.ts b/packages/webamp-modern/src/runtime/Config.ts
deleted file mode 100644
index 15caad1e..00000000
--- a/packages/webamp-modern/src/runtime/Config.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import MakiObject from "./MakiObject";
-import ConfigItem from "./ConfigItem";
-import { unimplementedWarning } from "../utils";
-
-class Config extends MakiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Config";
- }
-
- newitem(item_name: string, item_guid: string) {
- unimplementedWarning("newitem");
- // @ts-ignore Currently ConfigItem has no XMLNode which is busted, but
- // should change once we get better machanisms for adding children to a
- // mutable XML state tree.
- return new ConfigItem(null, this);
- }
-
- getitem(item_name: string) {
- return unimplementedWarning("getitem");
- }
-
- getitembyguid(item_guid: string) {
- return unimplementedWarning("getitembyguid");
- }
-}
-
-export default Config;
diff --git a/packages/webamp-modern/src/runtime/ConfigAttribute.ts b/packages/webamp-modern/src/runtime/ConfigAttribute.ts
deleted file mode 100644
index 559cc205..00000000
--- a/packages/webamp-modern/src/runtime/ConfigAttribute.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import MakiObject from "./MakiObject";
-import { unimplementedWarning } from "../utils";
-
-class ConfigAttribute extends MakiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "ConfigAttribute";
- }
-
- setdata(value: string): void {
- return unimplementedWarning("setdata");
- }
-
- getdata(): string {
- return unimplementedWarning("getdata");
- }
-
- ondatachanged(): void {
- this.js_trigger("onDataChanged");
- }
-
- getparentitem() {
- return unimplementedWarning("getparentitem");
- }
-
- getattributename(): string {
- return unimplementedWarning("getattributename");
- }
-}
-
-export default ConfigAttribute;
diff --git a/packages/webamp-modern/src/runtime/ConfigItem.ts b/packages/webamp-modern/src/runtime/ConfigItem.ts
deleted file mode 100644
index ea46502b..00000000
--- a/packages/webamp-modern/src/runtime/ConfigItem.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import MakiObject from "./MakiObject";
-import { unimplementedWarning } from "../utils";
-
-class ConfigItem extends MakiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "ConfigItem";
- }
-
- getattribute(attr_name: string) {
- return unimplementedWarning("getattribute");
- }
-
- newattribute(attr_name: string, default_val: string) {
- return unimplementedWarning("newattribute");
- }
-
- getguid(attr_name: string): string {
- return unimplementedWarning("getguid");
- }
-
- getname(): string {
- return unimplementedWarning("getname");
- }
-}
-
-export default ConfigItem;
diff --git a/packages/webamp-modern/src/runtime/Container.ts b/packages/webamp-modern/src/runtime/Container.ts
deleted file mode 100644
index 1783fcbc..00000000
--- a/packages/webamp-modern/src/runtime/Container.ts
+++ /dev/null
@@ -1,110 +0,0 @@
-import MakiObject from "./MakiObject";
-import GuiObject from "./GuiObject";
-import { findDescendantByTypeAndId, unimplementedWarning } from "../utils";
-import { XmlNode } from "../types";
-import Layout from "./Layout";
-
-class Container extends MakiObject {
- visible: boolean;
- constructor(node: XmlNode, parent: MakiObject, annotations: Object = {}) {
- super(node, parent, annotations);
-
- this.visible = true;
- }
-
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Container";
- }
-
- show(): void {
- this.visible = true;
- this.js_trigger("js_update");
- }
-
- hide(): void {
- this.visible = false;
- this.js_trigger("js_update");
- }
-
- setxmlparam(param: string, value: string): void {
- this.attributes[param] = value;
- this.js_trigger("js_update");
- }
-
- getlayout(id: string) {
- const self: MakiObject = this;
- return findDescendantByTypeAndId(self, "layout", id);
- }
-
- onswitchtolayout(newlayout: Layout): void {
- this.js_trigger("onSwitchToLayout", newlayout);
- }
-
- onbeforeswitchtolayout(oldlayout: Layout, newlayout: Layout): void {
- this.js_trigger("onBeforeSwitchToLayout", oldlayout, newlayout);
- }
-
- onhidelayout(_layout: Layout): void {
- this.js_trigger("onHideLayout", _layout);
- }
-
- onshowlayout(_layout: Layout): void {
- this.js_trigger("onShowLayout", _layout);
- }
-
- getnumlayouts(): number {
- return unimplementedWarning("getnumlayouts");
- }
-
- enumlayout(num: number) {
- return unimplementedWarning("enumlayout");
- }
-
- switchtolayout(layout_id: string): void {
- return unimplementedWarning("switchtolayout");
- }
-
- close(): void {
- return unimplementedWarning("close");
- }
-
- toggle(): void {
- return unimplementedWarning("toggle");
- }
-
- isdynamic(): number {
- return unimplementedWarning("isdynamic");
- }
-
- setname(name: string): void {
- return unimplementedWarning("setname");
- }
-
- getcurlayout() {
- unimplementedWarning("getcurlayout");
- // TODO: For now we just always show the first layout. I think that's the default.
- return this.js_getChildren().find((childNode) => {
- return childNode.getclassname() === "Layout";
- });
- }
-
- getname(): string {
- return unimplementedWarning("getname");
- }
-
- getguid(): string {
- return unimplementedWarning("getguid");
- }
-
- onaddcontent(wnd: GuiObject, id: string, guid: string): void {
- return unimplementedWarning("onaddcontent");
- }
-}
-
-export default Container;
diff --git a/packages/webamp-modern/src/runtime/DropDownList.ts b/packages/webamp-modern/src/runtime/DropDownList.ts
deleted file mode 100644
index 13b707d6..00000000
--- a/packages/webamp-modern/src/runtime/DropDownList.ts
+++ /dev/null
@@ -1,84 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class DropDownList extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "DropDownList";
- }
-
- getitemselected(): string {
- return unimplementedWarning("getitemselected");
- }
-
- onselect(id: number, hover: number): void {
- this.js_trigger("onSelect", id, hover);
- }
-
- setlistheight(h: number): void {
- return unimplementedWarning("setlistheight");
- }
-
- openlist(): void {
- return unimplementedWarning("openlist");
- }
-
- closelist(): void {
- return unimplementedWarning("closelist");
- }
-
- setitems(lotsofitems: string): void {
- return unimplementedWarning("setitems");
- }
-
- additem(_text: string): number {
- return unimplementedWarning("additem");
- }
-
- delitem(id: number): void {
- return unimplementedWarning("delitem");
- }
-
- finditem(_text: string): number {
- return unimplementedWarning("finditem");
- }
-
- getnumitems(): number {
- return unimplementedWarning("getnumitems");
- }
-
- selectitem(id: number, hover: number): void {
- return unimplementedWarning("selectitem");
- }
-
- getitemtext(id: number): string {
- return unimplementedWarning("getitemtext");
- }
-
- getselected(): number {
- return unimplementedWarning("getselected");
- }
-
- getselectedtext(): string {
- return unimplementedWarning("getselectedtext");
- }
-
- getcustomtext(): string {
- return unimplementedWarning("getcustomtext");
- }
-
- deleteallitems(): void {
- return unimplementedWarning("deleteallitems");
- }
-
- setnoitemtext(txt: string): void {
- return unimplementedWarning("setnoitemtext");
- }
-}
-
-export default DropDownList;
diff --git a/packages/webamp-modern/src/runtime/Edit.ts b/packages/webamp-modern/src/runtime/Edit.ts
deleted file mode 100644
index 4b9b639a..00000000
--- a/packages/webamp-modern/src/runtime/Edit.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class Edit extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Edit";
- }
-
- onenter(): void {
- this.js_trigger("onEnter");
- }
-
- onabort(): void {
- this.js_trigger("onAbort");
- }
-
- onidleeditupdate(): void {
- this.js_trigger("onIdleEditUpdate");
- }
-
- oneditupdate(): void {
- this.js_trigger("onEditUpdate");
- }
-
- settext(txt: string): void {
- return unimplementedWarning("settext");
- }
-
- setautoenter(onoff: boolean): void {
- return unimplementedWarning("setautoenter");
- }
-
- getautoenter(): number {
- return unimplementedWarning("getautoenter");
- }
-
- gettext(): string {
- return unimplementedWarning("gettext");
- }
-
- selectall(): void {
- return unimplementedWarning("selectall");
- }
-
- enter(): void {
- return unimplementedWarning("enter");
- }
-
- setidleenabled(onoff: boolean): void {
- return unimplementedWarning("setidleenabled");
- }
-
- getidleenabled(): number {
- return unimplementedWarning("getidleenabled");
- }
-}
-
-export default Edit;
diff --git a/packages/webamp-modern/src/runtime/EqVis.ts b/packages/webamp-modern/src/runtime/EqVis.ts
deleted file mode 100644
index 422bd0c3..00000000
--- a/packages/webamp-modern/src/runtime/EqVis.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import GuiObject from "./GuiObject";
-
-class EqVis extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "EqVis";
- }
-}
-
-export default EqVis;
diff --git a/packages/webamp-modern/src/runtime/FeedWatcher.ts b/packages/webamp-modern/src/runtime/FeedWatcher.ts
deleted file mode 100644
index 2a8088c3..00000000
--- a/packages/webamp-modern/src/runtime/FeedWatcher.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import MakiObject from "./MakiObject";
-import * as Utils from "../utils";
-
-export default class FeedWatcher extends MakiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "FeedWatcher";
- }
-
- setfeed(feed_id: string): number {
- return Utils.unimplementedWarning("setfeed");
- }
-
- releasefeed(): void {
- return Utils.unimplementedWarning("releasefeed");
- }
-
- onfeedchange(new_feeddata: string): void {
- return Utils.unimplementedWarning("onfeedchange");
- }
-}
diff --git a/packages/webamp-modern/src/runtime/Form.ts b/packages/webamp-modern/src/runtime/Form.ts
deleted file mode 100644
index 566f9391..00000000
--- a/packages/webamp-modern/src/runtime/Form.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import GuiObject from "./GuiObject";
-import * as Utils from "../utils";
-
-export default class Form extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Form";
- }
-
- getcontentsheight(): number {
- return Utils.unimplementedWarning("getcontentsheight");
- }
-
- newcell(groupname: string): void {
- return Utils.unimplementedWarning("newcell");
- }
-
- nextrow(): void {
- return Utils.unimplementedWarning("nextrow");
- }
-
- deleteall(): void {
- return Utils.unimplementedWarning("deleteall");
- }
-}
diff --git a/packages/webamp-modern/src/runtime/Frame.ts b/packages/webamp-modern/src/runtime/Frame.ts
deleted file mode 100644
index 70b6b042..00000000
--- a/packages/webamp-modern/src/runtime/Frame.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import GuiObject from "./GuiObject";
-import * as Utils from "../utils";
-
-export default class Frame extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Frame";
- }
-
- getposition(): number {
- return Utils.unimplementedWarning("getposition");
- }
-
- setposition(position: number): void {
- return Utils.unimplementedWarning("setposition");
- }
-
- onsetposition(position: number): void {
- return Utils.unimplementedWarning("onsetposition");
- }
-}
diff --git a/packages/webamp-modern/src/runtime/Group.ts b/packages/webamp-modern/src/runtime/Group.ts
deleted file mode 100644
index f7627f0b..00000000
--- a/packages/webamp-modern/src/runtime/Group.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import GuiObject from "./GuiObject";
-import { getMousePosition, unimplementedWarning } from "../utils";
-
-class Group extends GuiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Group";
- }
-
- getobject(id: string) {
- // Not sure this is correct, but it is my understanding this is just an alias
- return this.findobject(id);
- }
-
- getnumobjects(): number {
- return unimplementedWarning("getnumobjects");
- }
-
- enumobject(num: number) {
- return unimplementedWarning("enumobject");
- }
-
- oncreateobject(newobj: GuiObject): void {
- this.js_trigger("onCreateObject", newobj);
- }
-
- getmouseposx(): number {
- return getMousePosition().x;
- }
-
- getmouseposy(): number {
- return getMousePosition().y;
- }
-
- islayout(): boolean {
- return unimplementedWarning("islayout");
- }
-}
-
-export default Group;
diff --git a/packages/webamp-modern/src/runtime/GroupList.ts b/packages/webamp-modern/src/runtime/GroupList.ts
deleted file mode 100644
index 906b48af..00000000
--- a/packages/webamp-modern/src/runtime/GroupList.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class GroupList extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "GroupList";
- }
-
- instantiate(group_id: string, num_groups: number) {
- return unimplementedWarning("instantiate");
- }
-
- getnumitems(): number {
- return unimplementedWarning("getnumitems");
- }
-
- enumitem(num: number) {
- return unimplementedWarning("enumitem");
- }
-
- removeall(): void {
- return unimplementedWarning("removeall");
- }
-
- scrolltopercent(percent: number): void {
- return unimplementedWarning("scrolltopercent");
- }
-
- setredraw(redraw: number): void {
- return unimplementedWarning("setredraw");
- }
-}
-
-export default GroupList;
diff --git a/packages/webamp-modern/src/runtime/GuiList.ts b/packages/webamp-modern/src/runtime/GuiList.ts
deleted file mode 100644
index 45de6829..00000000
--- a/packages/webamp-modern/src/runtime/GuiList.ts
+++ /dev/null
@@ -1,382 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class GuiList extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "GuiList";
- }
-
- getnumitems(): number {
- return unimplementedWarning("getnumitems");
- }
-
- getwantautodeselect(): number {
- return unimplementedWarning("getwantautodeselect");
- }
-
- setwantautodeselect(want: number): void {
- return unimplementedWarning("setwantautodeselect");
- }
-
- // @ts-ignore Type does not match that of parent.
- onsetvisible(show: boolean): void {
- this.js_trigger("onSetVisible", show);
- }
-
- setautosort(dosort: number): void {
- return unimplementedWarning("setautosort");
- }
-
- next(): void {
- return unimplementedWarning("next");
- }
-
- selectcurrent(): void {
- return unimplementedWarning("selectcurrent");
- }
-
- selectfirstentry(): void {
- return unimplementedWarning("selectfirstentry");
- }
-
- previous(): void {
- return unimplementedWarning("previous");
- }
-
- pagedown(): void {
- return unimplementedWarning("pagedown");
- }
-
- pageup(): void {
- return unimplementedWarning("pageup");
- }
-
- home(): void {
- return unimplementedWarning("home");
- }
-
- end(): void {
- return unimplementedWarning("end");
- }
-
- reset(): void {
- return unimplementedWarning("reset");
- }
-
- addcolumn(name: string, width: number, numeric: number): number {
- return unimplementedWarning("addcolumn");
- }
-
- getnumcolumns(): number {
- return unimplementedWarning("getnumcolumns");
- }
-
- getcolumnwidth(column: number): number {
- return unimplementedWarning("getcolumnwidth");
- }
-
- setcolumnwidth(column: number, newwidth: number): void {
- return unimplementedWarning("setcolumnwidth");
- }
-
- getcolumnlabel(column: number): string {
- return unimplementedWarning("getcolumnlabel");
- }
-
- setcolumnlabel(column: number, newlabel: string): void {
- return unimplementedWarning("setcolumnlabel");
- }
-
- getcolumnnumeric(column: number): number {
- return unimplementedWarning("getcolumnnumeric");
- }
-
- setcolumndynamic(column: number, isdynamic: number): void {
- return unimplementedWarning("setcolumndynamic");
- }
-
- iscolumndynamic(column: number): number {
- return unimplementedWarning("iscolumndynamic");
- }
-
- setminimumsize(size: number): void {
- return unimplementedWarning("setminimumsize");
- }
-
- additem(label: string): number {
- return unimplementedWarning("additem");
- }
-
- insertitem(pos: number, label: string): number {
- return unimplementedWarning("insertitem");
- }
-
- getlastaddeditempos(): number {
- return unimplementedWarning("getlastaddeditempos");
- }
-
- setsubitem(pos: number, subpos: number, txt: string): void {
- return unimplementedWarning("setsubitem");
- }
-
- deleteallitems(): void {
- return unimplementedWarning("deleteallitems");
- }
-
- deletebypos(pos: number): number {
- return unimplementedWarning("deletebypos");
- }
-
- getitemlabel(pos: number, subpos: number): string {
- return unimplementedWarning("getitemlabel");
- }
-
- setitemlabel(pos: number, _text: string): void {
- return unimplementedWarning("setitemlabel");
- }
-
- getitemselected(pos: number): number {
- return unimplementedWarning("getitemselected");
- }
-
- isitemfocused(pos: number): number {
- return unimplementedWarning("isitemfocused");
- }
-
- getitemfocused(): number {
- return unimplementedWarning("getitemfocused");
- }
-
- setitemfocused(pos: number): void {
- return unimplementedWarning("setitemfocused");
- }
-
- ensureitemvisible(pos: number): void {
- return unimplementedWarning("ensureitemvisible");
- }
-
- invalidatecolumns(): void {
- return unimplementedWarning("invalidatecolumns");
- }
-
- scrollabsolute(x: number): number {
- return unimplementedWarning("scrollabsolute");
- }
-
- scrollrelative(x: number): number {
- return unimplementedWarning("scrollrelative");
- }
-
- scrollleft(lines: number): void {
- return unimplementedWarning("scrollleft");
- }
-
- scrollright(lines: number): void {
- return unimplementedWarning("scrollright");
- }
-
- scrollup(lines: number): void {
- return unimplementedWarning("scrollup");
- }
-
- scrolldown(lines: number): void {
- return unimplementedWarning("scrolldown");
- }
-
- getsubitemtext(pos: number, subpos: number): string {
- return unimplementedWarning("getsubitemtext");
- }
-
- getfirstitemselected(): number {
- return unimplementedWarning("getfirstitemselected");
- }
-
- getnextitemselected(lastpos: number): number {
- return unimplementedWarning("getnextitemselected");
- }
-
- selectall(): number {
- return unimplementedWarning("selectall");
- }
-
- deselectall(): number {
- return unimplementedWarning("deselectall");
- }
-
- invertselection(): number {
- return unimplementedWarning("invertselection");
- }
-
- invalidateitem(pos: number): number {
- return unimplementedWarning("invalidateitem");
- }
-
- getfirstitemvisible(): number {
- return unimplementedWarning("getfirstitemvisible");
- }
-
- getlastitemvisible(): number {
- return unimplementedWarning("getlastitemvisible");
- }
-
- setfontsize(size: number): number {
- return unimplementedWarning("setfontsize");
- }
-
- getfontsize(): number {
- return unimplementedWarning("getfontsize");
- }
-
- jumptonext(c: number): void {
- return unimplementedWarning("jumptonext");
- }
-
- scrolltoitem(pos: number): void {
- return unimplementedWarning("scrolltoitem");
- }
-
- resort(): void {
- return unimplementedWarning("resort");
- }
-
- getsortdirection(): number {
- return unimplementedWarning("getsortdirection");
- }
-
- getsortcolumn(): number {
- return unimplementedWarning("getsortcolumn");
- }
-
- setsortcolumn(col: number): void {
- return unimplementedWarning("setsortcolumn");
- }
-
- setsortdirection(dir: number): void {
- return unimplementedWarning("setsortdirection");
- }
-
- getitemcount(): number {
- return unimplementedWarning("getitemcount");
- }
-
- setselectionstart(pos: number): void {
- return unimplementedWarning("setselectionstart");
- }
-
- setselectionend(pos: number): void {
- return unimplementedWarning("setselectionend");
- }
-
- setselected(pos: number, selected: number): void {
- return unimplementedWarning("setselected");
- }
-
- toggleselection(pos: number, setfocus: number): void {
- return unimplementedWarning("toggleselection");
- }
-
- getheaderheight(): number {
- return unimplementedWarning("getheaderheight");
- }
-
- getpreventmultipleselection(): number {
- return unimplementedWarning("getpreventmultipleselection");
- }
-
- setpreventmultipleselection(val: number): number {
- return unimplementedWarning("setpreventmultipleselection");
- }
-
- moveitem(from: number, to: number): void {
- return unimplementedWarning("moveitem");
- }
-
- onselectall(): void {
- this.js_trigger("onSelectAll");
- }
-
- ondelete(): void {
- this.js_trigger("onDelete");
- }
-
- ondoubleclick(itemnum: number): void {
- this.js_trigger("onDoubleClick", itemnum);
- }
-
- onleftclick(itemnum: number): void {
- this.js_trigger("onLeftClick", itemnum);
- }
-
- onsecondleftclick(itemnum: number): void {
- this.js_trigger("onSecondLeftClick", itemnum);
- }
-
- onrightclick(itemnum: number): number {
- unimplementedWarning("onrightclick");
- this.js_trigger("onRightClick", itemnum);
- // TODO: not sure what we shuld return
- return 0;
- }
-
- oncolumndblclick(col: number, x: number, y: number): number {
- unimplementedWarning("oncolumndblclick");
- this.js_trigger("onColumnDblClick", col, x, y);
- // TODO: not sure what we shuld return
- return 0;
- }
-
- oncolumnlabelclick(col: number, x: number, y: number): number {
- unimplementedWarning("oncolumnlabelclick");
- this.js_trigger("onColumnLabelClick", col, x, y);
- // TODO: not sure what we shuld return
- return 0;
- }
-
- onitemselection(itemnum: number, selected: number): void {
- this.js_trigger("onItemSelection", itemnum, selected);
- }
-
- setitemicon(pos: number, bitmapId: string): void {
- return unimplementedWarning("setitemicon");
- }
-
- getitemicon(pos: number): string {
- return unimplementedWarning("getitemicon");
- }
-
- setshowicons(showThem: number): void {
- return unimplementedWarning("setshowicons");
- }
-
- getshowicons(): number {
- return unimplementedWarning("getshowicons");
- }
-
- seticonwidth(width: number): number {
- return unimplementedWarning("seticonwidth");
- }
-
- seticonheight(width: number): number {
- return unimplementedWarning("seticonheight");
- }
-
- geticonwidth(): void {
- return unimplementedWarning("geticonwidth");
- }
-
- geticonheight(): void {
- return unimplementedWarning("geticonheight");
- }
-
- oniconleftclick(itemnum: number, x: number, y: number): number {
- return unimplementedWarning("oniconleftclick");
- }
-}
-
-export default GuiList;
diff --git a/packages/webamp-modern/src/runtime/GuiObject.ts b/packages/webamp-modern/src/runtime/GuiObject.ts
deleted file mode 100644
index 025a1b53..00000000
--- a/packages/webamp-modern/src/runtime/GuiObject.ts
+++ /dev/null
@@ -1,560 +0,0 @@
-import MakiObject from "./MakiObject";
-import {
- findDescendantByTypeAndId,
- findParentNodeOfType,
- baseImageAttributeFromObject,
- unimplementedWarning,
-} from "../utils";
-import { XmlNode } from "../types";
-
-type TargetParams = {
- alpha?: number;
- x?: number;
- y?: number;
- w?: number;
- h?: number;
-};
-
-type TransitionParams = {
- alpha?: { start: number; end: number };
- x?: { start: number; end: number };
- y?: { start: number; end: number };
- w?: { start: number; end: number };
- h?: { start: number; end: number };
-};
-
-type AnimationPropKeys = "alpha" | "x" | "y" | "w" | "h";
-
-const ANIMATION_PROP_KEYS: AnimationPropKeys[] = ["alpha", "x", "y", "w", "h"];
-
-class GuiObject extends MakiObject {
- visible: boolean;
- _targetAnimationSpeed: number;
- _targetParams: TargetParams;
- _transitionParams: TransitionParams;
- _targetAnimationStartTime: number;
- _targetAnimationCancelID: number | null;
- constructor(
- node: XmlNode | null,
- parent: MakiObject | null,
- annotations: Object = {}
- ) {
- super(node, parent, annotations);
-
- this._setAttributeDefaults();
- this._convertAttributeTypes();
-
- this.visible = true;
- this._targetAnimationSpeed = 0;
- this._targetParams = {};
- this._transitionParams = {};
- this._targetAnimationStartTime = 0;
- this._targetAnimationCancelID = null;
- }
-
- _setAttributeDefaults() {
- if (this.attributes.alpha == null) {
- this.attributes.alpha = "255";
- }
- if (this.attributes.x == null) {
- this.attributes.x = "0";
- }
- if (this.attributes.y == null) {
- this.attributes.y = "0";
- }
- if (this.attributes.ghost == null) {
- this.attributes.ghost = "0";
- }
- }
-
- _convertAttributeTypes() {
- const { attributes } = this;
- if (attributes.alpha != null) {
- attributes.alpha = Number(attributes.alpha);
- }
- if (attributes.x != null) {
- attributes.x = Number(attributes.x);
- }
- if (attributes.y != null) {
- attributes.y = Number(attributes.y);
- }
- if (attributes.ghost != null) {
- attributes.ghost = !!Number(attributes.ghost);
- }
- }
-
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "GuiObject";
- }
-
- findobject(id: string) {
- const self: MakiObject = this;
- return findDescendantByTypeAndId(self, null, id);
- }
-
- init(newRoot: MakiObject): void {
- this.parent = newRoot;
- newRoot.js_addChild(this);
- }
-
- setxmlparam(param: string, value: string): void {
- this.attributes[param] = value;
- this.js_trigger("js_update");
- }
-
- getxmlparam(param: string): string {
- return String(this.attributes[param]);
- }
-
- getparent() {
- return this.parent;
- }
-
- // TODO: Make this return a `Layout` once `Layout` is typed.
- getparentlayout(): MakiObject | null {
- const self: MakiObject = this;
- return findParentNodeOfType(self, new Set(["layout"]));
- }
-
- show(): void {
- this.visible = true;
- this.js_trigger("js_update");
- }
-
- hide(): void {
- this.visible = false;
- this.js_trigger("js_update");
- }
-
- gettop(): number {
- return Number(this.attributes.y) || 0;
- }
-
- getleft(): number {
- return Number(this.attributes.x) || 0;
- }
-
- getheight(): number {
- if (this.attributes.h !== undefined) {
- return Number(this.attributes.h);
- }
- const baseImage = baseImageAttributeFromObject(this);
- if (baseImage) {
- // TODO: fix the type on this, we currently have better typing for this in
- // AnimatedLayer where we convert to _typedAttributes, as we apply that new
- // standard up to GuiObject/MakiObject we should be able to remove the ignore
- // @ts-ignore
- const image = this.attributes.js_assets[baseImage];
- if (image && image.h !== undefined) {
- return image.h;
- }
- }
-
- return 0;
- }
-
- getwidth(): number {
- if (this.attributes.w !== undefined) {
- return Number(this.attributes.w);
- }
- const baseImage = baseImageAttributeFromObject(this);
- if (baseImage) {
- // TODO: fix the type on this, we currently have better typing for this in
- // AnimatedLayer where we convert to _typedAttributes, as we apply that new
- // standard up to GuiObject/MakiObject we should be able to remove the ignore
- // @ts-ignore
- const image = this.attributes.js_assets[baseImage];
- if (image && image.w !== undefined) {
- return image.w;
- }
- }
-
- return 0;
- }
-
- resize(x: number, y: number, w: number, h: number): void {
- this.attributes.x = x;
- this.attributes.y = y;
- this.attributes.w = w;
- this.attributes.h = h;
- // TODO: Confirm that GuiObject actually supports these min/max attributes
- this.attributes.minimum_w = w;
- this.attributes.maximum_w = w;
- this.attributes.minimum_h = h;
- this.attributes.maximum_h = h;
- this.js_trigger("js_update");
- }
-
- // alpha range from 0-255
- setalpha(alpha: number): void {
- this.attributes.alpha = alpha;
- this.js_trigger("js_update");
- }
-
- isvisible(): number {
- return this.visible ? 1 : 0;
- }
-
- onsetvisible(onoff: boolean): void {
- this.js_trigger("onSetVisible", onoff);
- }
-
- getalpha(): number {
- return unimplementedWarning("getalpha");
- }
-
- onleftbuttonup(x: number, y: number): void {
- this.js_trigger("onLeftButtonUp", x, y);
- }
-
- onleftbuttondown(x: number, y: number): void {
- this.js_trigger("onLeftButtonDown", x, y);
- }
-
- onrightbuttonup(x: number, y: number): void {
- this.js_trigger("onRightButtonUp", x, y);
- }
-
- onrightbuttondown(x: number, y: number): void {
- this.js_trigger("onRightButtonDown", x, y);
- }
-
- onrightbuttondblclk(x: number, y: number): void {
- this.js_trigger("onRightButtonDblClk", x, y);
- }
-
- onleftbuttondblclk(x: number, y: number): void {
- this.js_trigger("onLeftButtonDblClk", x, y);
- }
-
- onmousemove(x: number, y: number): void {
- this.js_trigger("onMouseMove", x, y);
- }
-
- onenterarea(): void {
- this.js_trigger("onEnterArea");
- }
-
- onleavearea(): void {
- this.js_trigger("onLeaveArea");
- }
-
- setenabled(onoff: boolean): void {
- return unimplementedWarning("setenabled");
- }
-
- getenabled(): boolean {
- return unimplementedWarning("getenabled");
- }
-
- onenable(onoff: boolean): void {
- this.js_trigger("onEnable", onoff);
- }
-
- onresize(x: number, y: number, w: number, h: number): void {
- this.js_trigger("onResize", x, y, w, h);
- }
-
- ismouseover(x: number, y: number): boolean {
- return unimplementedWarning("ismouseover");
- }
-
- settargetx(x: number): void {
- this._targetParams.x = x;
- }
-
- settargety(y: number): void {
- this._targetParams.y = y;
- }
-
- settargetw(w: number): void {
- this._targetParams.w = w;
- }
-
- // r? OK...
- settargeth(r: number): void {
- this._targetParams.h = r;
- }
-
- // alpha range from 0-255
- settargeta(alpha: number): void {
- this._targetParams.alpha = alpha;
- }
-
- settargetspeed(insecond: number): void {
- this._targetAnimationSpeed = insecond * 1000;
- }
-
- _targetAnimationLoop(): void {
- this._targetAnimationCancelID = window.requestAnimationFrame(
- (currentTime) => {
- const progress =
- (currentTime - this._targetAnimationStartTime) /
- this._targetAnimationSpeed;
- if (progress > 1) {
- this._targetParams = {};
- this.ontargetreached();
- return;
- }
- ANIMATION_PROP_KEYS.forEach((attr) => {
- const transition = this._transitionParams[attr];
- if (transition == null) {
- return;
- }
- const { start, end } = transition;
- this.attributes[attr] = end * progress + start * (1 - progress);
- });
- this.js_trigger("js_update");
- this._targetAnimationLoop();
- }
- );
- }
-
- gototarget(): void {
- this._transitionParams = {};
- ANIMATION_PROP_KEYS.forEach((attr) => {
- const target = this._targetParams[attr];
- if (target == null) {
- return;
- }
-
- const attribute = this.attributes[attr];
-
- this._transitionParams[attr] = {
- start: attribute != null ? Number(attribute) : target,
- end: target,
- };
- });
-
- this._targetAnimationStartTime = window.performance.now();
- this._targetAnimationLoop();
- }
-
- ontargetreached(): void {
- this.js_trigger("onTargetReached");
- }
-
- canceltarget(): void {
- if (this._targetAnimationCancelID != null) {
- window.cancelAnimationFrame(this._targetAnimationCancelID);
- }
- this._targetAnimationCancelID = null;
- this._targetParams = {};
- }
-
- reversetarget(reverse: number): void {
- return unimplementedWarning("reversetarget");
- }
-
- onstartup(): void {
- this.js_trigger("onStartup");
- }
-
- isgoingtotarget(): boolean {
- return unimplementedWarning("isgoingtotarget");
- }
-
- bringtofront(): void {
- return unimplementedWarning("bringtofront");
- }
-
- bringtoback(): void {
- return unimplementedWarning("bringtoback");
- }
-
- bringabove(guiobj: GuiObject): void {
- return unimplementedWarning("bringabove");
- }
-
- bringbelow(guiobj: GuiObject): void {
- return unimplementedWarning("bringbelow");
- }
-
- getguix(): number {
- return unimplementedWarning("getguix");
- }
-
- getguiy(): number {
- return unimplementedWarning("getguiy");
- }
-
- getguiw(): number {
- return unimplementedWarning("getguiw");
- }
-
- getguih(): number {
- return unimplementedWarning("getguih");
- }
-
- getguirelatx(): number {
- return unimplementedWarning("getguirelatx");
- }
-
- getguirelaty(): number {
- return unimplementedWarning("getguirelaty");
- }
-
- getguirelatw(): number {
- return unimplementedWarning("getguirelatw");
- }
-
- getguirelath(): number {
- return unimplementedWarning("getguirelath");
- }
-
- isactive(): boolean {
- return unimplementedWarning("isactive");
- }
-
- gettopparent() {
- return unimplementedWarning("gettopparent");
- }
-
- runmodal(): number {
- return unimplementedWarning("runmodal");
- }
-
- endmodal(retcode: number): void {
- return unimplementedWarning("endmodal");
- }
-
- findobjectxy(x: number, y: number) {
- return unimplementedWarning("findobjectxy");
- }
-
- getname(): string {
- return unimplementedWarning("getname");
- }
-
- clienttoscreenx(x: number): number {
- return unimplementedWarning("clienttoscreenx");
- }
-
- clienttoscreeny(y: number): number {
- return unimplementedWarning("clienttoscreeny");
- }
-
- clienttoscreenw(w: number): number {
- return unimplementedWarning("clienttoscreenw");
- }
-
- clienttoscreenh(h: number): number {
- return unimplementedWarning("clienttoscreenh");
- }
-
- screentoclientx(x: number): number {
- return unimplementedWarning("screentoclientx");
- }
-
- screentoclienty(y: number): number {
- return unimplementedWarning("screentoclienty");
- }
-
- screentoclientw(w: number): number {
- return unimplementedWarning("screentoclientw");
- }
-
- screentoclienth(h: number): number {
- return unimplementedWarning("screentoclienth");
- }
-
- getautowidth(): number {
- return unimplementedWarning("getautowidth");
- }
-
- getautoheight(): number {
- return unimplementedWarning("getautoheight");
- }
-
- setfocus(): void {
- return unimplementedWarning("setfocus");
- }
-
- onchar(c: string): void {
- this.js_trigger("onChar", c);
- }
-
- onaccelerator(accel: string): void {
- this.js_trigger("onAccelerator", accel);
- }
-
- ismouseoverrect(): boolean {
- return unimplementedWarning("ismouseoverrect");
- }
-
- getinterface(interface_guid: string) {
- return unimplementedWarning("getinterface");
- }
-
- onkeydown(vk_code: number): void {
- this.js_trigger("onKeyDown", vk_code);
- }
-
- onkeyup(vk_code: number): void {
- this.js_trigger("onKeyUp", vk_code);
- }
-
- ongetfocus(): void {
- this.js_trigger("onGetFocus");
- }
-
- onkillfocus(): void {
- this.js_trigger("onKillFocus");
- }
-
- /* eslint-disable-next-line max-params */
- sendaction(
- action: string,
- param: string,
- x: number,
- y: number,
- p1: number,
- p2: number
- ): number {
- return unimplementedWarning("sendaction");
- }
-
- /* eslint-disable-next-line max-params */
- onaction(
- action: string,
- param: string,
- x: number,
- y: number,
- p1: number,
- p2: number,
- source: GuiObject
- ): number {
- unimplementedWarning("onaction");
- this.js_trigger("onAction", action, param, x, y, p1, p2, source);
- // TODO: not sure what we shuld return
- return 0;
- }
-
- onmousewheelup(clicked: number, lines: number): number {
- return unimplementedWarning("onmousewheelup");
- }
-
- onmousewheeldown(clicked: number, lines: number): number {
- return unimplementedWarning("onmousewheeldown");
- }
-
- ondragenter(): void {
- return unimplementedWarning("ondragenter");
- }
-
- ondragover(x: number, y: number): void {
- return unimplementedWarning("ondragover");
- }
-
- ondragleave(): void {
- return unimplementedWarning("ondragleave");
- }
-}
-
-export default GuiObject;
diff --git a/packages/webamp-modern/src/runtime/GuiTree.ts b/packages/webamp-modern/src/runtime/GuiTree.ts
deleted file mode 100644
index 2aa0a0b7..00000000
--- a/packages/webamp-modern/src/runtime/GuiTree.ts
+++ /dev/null
@@ -1,246 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-import TreeItem from "./TreeItem";
-
-class GuiTree extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "GuiTree";
- }
-
- onwantautocontextmenu(): number {
- unimplementedWarning("onwantautocontextmenu");
- this.js_trigger("onWantAutoContextMenu");
- // TODO: not sure what we shuld return
- return 0;
- }
-
- onmousewheelup(clicked: number, lines: number): number {
- unimplementedWarning("onmousewheelup");
- this.js_trigger("onMouseWheelUp", clicked, lines);
- // TODO: not sure what we shuld return
- return 0;
- }
-
- onmousewheeldown(clicked: number, lines: number): number {
- unimplementedWarning("onmousewheeldown");
- this.js_trigger("onMouseWheelDown", clicked, lines);
- // TODO: not sure what we shuld return
- return 0;
- }
-
- oncontextmenu(x: number, y: number): number {
- unimplementedWarning("oncontextmenu");
- this.js_trigger("onContextMenu", x, y);
- // TODO: not sure what we shuld return
- return 0;
- }
-
- // @ts-ignore Type does not match that of parent.
- onchar(c: string): number {
- unimplementedWarning("onchar");
- this.js_trigger("onChar", c);
- // TODO: not sure what we shuld return
- return 0;
- }
-
- onitemrecvdrop(item: TreeItem): void {
- this.js_trigger("onItemRecvDrop", item);
- }
-
- onlabelchange(item: TreeItem): void {
- this.js_trigger("onLabelChange", item);
- }
-
- onitemselected(item: TreeItem): void {
- this.js_trigger("onItemSelected", item);
- }
-
- onitemdeselected(item: TreeItem): void {
- this.js_trigger("onItemDeselected", item);
- }
-
- getnumrootitems(): number {
- return unimplementedWarning("getnumrootitems");
- }
-
- enumrootitem(which: number) {
- return unimplementedWarning("enumrootitem");
- }
-
- jumptonext(c: number): void {
- return unimplementedWarning("jumptonext");
- }
-
- ensureitemvisible(item: TreeItem): void {
- return unimplementedWarning("ensureitemvisible");
- }
-
- getcontentswidth(): number {
- return unimplementedWarning("getcontentswidth");
- }
-
- getcontentsheight(): number {
- return unimplementedWarning("getcontentsheight");
- }
-
- addtreeitem(
- item: TreeItem,
- par: TreeItem,
- sorted: number,
- haschildtab: number
- ) {
- return unimplementedWarning("addtreeitem");
- }
-
- removetreeitem(item: TreeItem): number {
- return unimplementedWarning("removetreeitem");
- }
-
- movetreeitem(item: TreeItem, newparent: TreeItem): void {
- return unimplementedWarning("movetreeitem");
- }
-
- deleteallitems(): void {
- return unimplementedWarning("deleteallitems");
- }
-
- expanditem(item: TreeItem): number {
- return unimplementedWarning("expanditem");
- }
-
- expanditemdeferred(item: TreeItem): void {
- return unimplementedWarning("expanditemdeferred");
- }
-
- collapseitem(item: TreeItem): number {
- return unimplementedWarning("collapseitem");
- }
-
- collapseitemdeferred(item: TreeItem): void {
- return unimplementedWarning("collapseitemdeferred");
- }
-
- selectitem(item: TreeItem): void {
- return unimplementedWarning("selectitem");
- }
-
- selectitemdeferred(item: TreeItem): void {
- return unimplementedWarning("selectitemdeferred");
- }
-
- delitemdeferred(item: TreeItem): void {
- return unimplementedWarning("delitemdeferred");
- }
-
- hiliteitem(item: TreeItem): void {
- return unimplementedWarning("hiliteitem");
- }
-
- unhiliteitem(item: TreeItem): void {
- return unimplementedWarning("unhiliteitem");
- }
-
- getcuritem() {
- return unimplementedWarning("getcuritem");
- }
-
- hittest(x: number, y: number) {
- return unimplementedWarning("hittest");
- }
-
- edititemlabel(item: TreeItem): void {
- return unimplementedWarning("edititemlabel");
- }
-
- canceleditlabel(destroyit: number): void {
- return unimplementedWarning("canceleditlabel");
- }
-
- setautoedit(ae: number): void {
- return unimplementedWarning("setautoedit");
- }
-
- getautoedit(): number {
- return unimplementedWarning("getautoedit");
- }
-
- getbylabel(item: TreeItem, name: string) {
- return unimplementedWarning("getbylabel");
- }
-
- setsorted(dosort: number): void {
- return unimplementedWarning("setsorted");
- }
-
- getsorted(): number {
- return unimplementedWarning("getsorted");
- }
-
- sorttreeitems(): void {
- return unimplementedWarning("sorttreeitems");
- }
-
- getsibling(item: TreeItem) {
- return unimplementedWarning("getsibling");
- }
-
- setautocollapse(doautocollapse: number): void {
- return unimplementedWarning("setautocollapse");
- }
-
- setfontsize(newsize: number): number {
- return unimplementedWarning("setfontsize");
- }
-
- getfontsize(): number {
- return unimplementedWarning("getfontsize");
- }
-
- getnumvisiblechilditems(c: TreeItem): number {
- return unimplementedWarning("getnumvisiblechilditems");
- }
-
- getnumvisibleitems(): number {
- return unimplementedWarning("getnumvisibleitems");
- }
-
- enumvisibleitems(n: number) {
- return unimplementedWarning("enumvisibleitems");
- }
-
- enumvisiblechilditems(c: TreeItem, n: number) {
- return unimplementedWarning("enumvisiblechilditems");
- }
-
- enumallitems(n: number) {
- return unimplementedWarning("enumallitems");
- }
-
- getitemrectx(item: TreeItem): number {
- return unimplementedWarning("getitemrectx");
- }
-
- getitemrecty(item: TreeItem): number {
- return unimplementedWarning("getitemrecty");
- }
-
- getitemrectw(item: TreeItem): number {
- return unimplementedWarning("getitemrectw");
- }
-
- getitemrecth(item: TreeItem): number {
- return unimplementedWarning("getitemrecth");
- }
-
- getitemfrompoint(x: number, y: number) {
- return unimplementedWarning("getitemfrompoint");
- }
-}
-
-export default GuiTree;
diff --git a/packages/webamp-modern/src/runtime/JsElements.ts b/packages/webamp-modern/src/runtime/JsElements.ts
deleted file mode 100644
index 04b3ac98..00000000
--- a/packages/webamp-modern/src/runtime/JsElements.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import MakiObject from "./MakiObject";
-
-class JsElements extends MakiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Elements";
- }
-}
-
-export default JsElements;
diff --git a/packages/webamp-modern/src/runtime/JsGammaSet.ts b/packages/webamp-modern/src/runtime/JsGammaSet.ts
deleted file mode 100644
index 0dfba15e..00000000
--- a/packages/webamp-modern/src/runtime/JsGammaSet.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import MakiObject from "./MakiObject";
-
-class JsGammaSet extends MakiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "GammaSet";
- }
-}
-
-export default JsGammaSet;
diff --git a/packages/webamp-modern/src/runtime/JsGroupDef.ts b/packages/webamp-modern/src/runtime/JsGroupDef.ts
deleted file mode 100644
index b080c8a4..00000000
--- a/packages/webamp-modern/src/runtime/JsGroupDef.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import MakiObject from "./MakiObject";
-
-class JsGroupDef extends MakiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "GroupDef";
- }
-}
-
-export default JsGroupDef;
diff --git a/packages/webamp-modern/src/runtime/JsScript.ts b/packages/webamp-modern/src/runtime/JsScript.ts
deleted file mode 100644
index ee4a1a5b..00000000
--- a/packages/webamp-modern/src/runtime/JsScript.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import MakiObject from "./MakiObject";
-import System from "./System";
-
-class JsScript extends MakiObject {
- system: System | undefined;
-
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Script";
- }
-
- getScriptPath(): string | null {
- const { file } = this.attributes;
- return file == null ? null : String(file);
- }
-}
-
-export default JsScript;
diff --git a/packages/webamp-modern/src/runtime/JsWinampAbstractionLayer.ts b/packages/webamp-modern/src/runtime/JsWinampAbstractionLayer.ts
deleted file mode 100644
index 92536b41..00000000
--- a/packages/webamp-modern/src/runtime/JsWinampAbstractionLayer.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import Group from "./Group";
-
-// Needs to behavve like a group to work with top level scripts that call `getScriptGroup`
-class JsWinampAbstractionLayer extends Group {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "JsWinampAbstractionLayer";
- }
-}
-
-export default JsWinampAbstractionLayer;
diff --git a/packages/webamp-modern/src/runtime/Layer.ts b/packages/webamp-modern/src/runtime/Layer.ts
deleted file mode 100644
index 9474f3ba..00000000
--- a/packages/webamp-modern/src/runtime/Layer.ts
+++ /dev/null
@@ -1,162 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-import Region from "./Region";
-import MakiMap from "./MakiMap";
-
-class Layer extends GuiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Layer";
- }
-
- setregion(reg: Region): void {
- unimplementedWarning("setregion");
- }
-
- setregionfrommap(
- regionmap: MakiMap,
- threshold: number,
- reverse: boolean
- ): void {
- unimplementedWarning("setregion");
- }
-
- onbeginresize(x: number, y: number, w: number, h: number): void {
- this.js_trigger("onBeginResize", x, y, w, h);
- }
-
- onendresize(x: number, y: number, w: number, h: number): void {
- this.js_trigger("onEndResize", x, y, w, h);
- }
-
- fx_oninit(): void {
- return unimplementedWarning("fx_oninit");
- }
-
- fx_onframe(): void {
- return unimplementedWarning("fx_onframe");
- }
-
- fx_ongetpixelr(r: number, d: number, x: number, y: number): number {
- return unimplementedWarning("fx_ongetpixelr");
- }
-
- fx_ongetpixeld(r: number, d: number, x: number, y: number): number {
- return unimplementedWarning("fx_ongetpixeld");
- }
-
- fx_ongetpixelx(r: number, d: number, x: number, y: number): number {
- return unimplementedWarning("fx_ongetpixelx");
- }
-
- fx_ongetpixely(r: number, d: number, x: number, y: number): number {
- return unimplementedWarning("fx_ongetpixely");
- }
-
- fx_ongetpixela(r: number, d: number, x: number, y: number): number {
- return unimplementedWarning("fx_ongetpixela");
- }
-
- fx_setenabled(onoff: boolean): void {
- return unimplementedWarning("fx_setenabled");
- }
-
- fx_getenabled(): boolean {
- return unimplementedWarning("fx_getenabled");
- }
-
- fx_setwrap(onoff: boolean): void {
- return unimplementedWarning("fx_setwrap");
- }
-
- fx_getwrap(): boolean {
- return unimplementedWarning("fx_getwrap");
- }
-
- fx_setrect(onoff: boolean): void {
- return unimplementedWarning("fx_setrect");
- }
-
- fx_getrect(): boolean {
- return unimplementedWarning("fx_getrect");
- }
-
- fx_setbgfx(onoff: boolean): void {
- return unimplementedWarning("fx_setbgfx");
- }
-
- fx_getbgfx(): boolean {
- return unimplementedWarning("fx_getbgfx");
- }
-
- fx_setclear(onoff: boolean): void {
- return unimplementedWarning("fx_setclear");
- }
-
- fx_getclear(): boolean {
- return unimplementedWarning("fx_getclear");
- }
-
- fx_setspeed(msperframe: number): void {
- return unimplementedWarning("fx_setspeed");
- }
-
- fx_getspeed(): number {
- return unimplementedWarning("fx_getspeed");
- }
-
- fx_setrealtime(onoff: boolean): void {
- return unimplementedWarning("fx_setrealtime");
- }
-
- fx_getrealtime(): boolean {
- return unimplementedWarning("fx_getrealtime");
- }
-
- fx_setlocalized(onoff: boolean): void {
- return unimplementedWarning("fx_setlocalized");
- }
-
- fx_getlocalized(): boolean {
- return unimplementedWarning("fx_getlocalized");
- }
-
- fx_setbilinear(onoff: boolean): void {
- return unimplementedWarning("fx_setbilinear");
- }
-
- fx_getbilinear(): boolean {
- return unimplementedWarning("fx_getbilinear");
- }
-
- fx_setalphamode(onoff: boolean): void {
- return unimplementedWarning("fx_setalphamode");
- }
-
- fx_getalphamode(): boolean {
- return unimplementedWarning("fx_getalphamode");
- }
-
- fx_setgridsize(x: number, y: number): void {
- return unimplementedWarning("fx_setgridsize");
- }
-
- fx_update(): void {
- return unimplementedWarning("fx_update");
- }
-
- fx_restart(): void {
- return unimplementedWarning("fx_restart");
- }
-
- isinvalid(): boolean {
- return unimplementedWarning("isinvalid");
- }
-}
-
-export default Layer;
diff --git a/packages/webamp-modern/src/runtime/Layout.ts b/packages/webamp-modern/src/runtime/Layout.ts
deleted file mode 100644
index e5494811..00000000
--- a/packages/webamp-modern/src/runtime/Layout.ts
+++ /dev/null
@@ -1,118 +0,0 @@
-import Group from "./Group";
-import { findParentNodeOfType, unimplementedWarning } from "../utils";
-import MakiObject from "./MakiObject";
-
-class Layout extends Group {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Layout";
- }
-
- getcontainer() {
- const self: MakiObject = this;
- return findParentNodeOfType(self, new Set(["container"]));
- }
-
- ondock(side: number): void {
- this.js_trigger("onDock");
- }
-
- onundock(): void {
- this.js_trigger("onUnDock");
- }
-
- onscale(newscalevalue: number): void {
- this.js_trigger("onScale", newscalevalue);
- }
-
- getscale(): number {
- return unimplementedWarning("getscale");
- }
-
- setscale(scalevalue: number): void {
- return unimplementedWarning("setscale");
- }
-
- setdesktopalpha(onoff: boolean): void {
- return unimplementedWarning("setdesktopalpha");
- }
-
- getdesktopalpha(): boolean {
- return unimplementedWarning("getdesktopalpha");
- }
-
- center(): void {
- return unimplementedWarning("center");
- }
-
- onmove(): void {
- this.js_trigger("onMove");
- }
-
- onendmove(): void {
- this.js_trigger("onEndMove");
- }
-
- onuserresize(x: number, y: number, w: number, h: number): void {
- this.js_trigger("onUserResize", x, y, w, h);
- }
-
- snapadjust(left: number, top: number, right: number, bottom: number): void {
- return unimplementedWarning("snapadjust");
- }
-
- getsnapadjusttop(): number {
- return unimplementedWarning("getsnapadjusttop");
- }
-
- getsnapadjustright(): number {
- return unimplementedWarning("getsnapadjustright");
- }
-
- getsnapadjustleft(): number {
- return unimplementedWarning("getsnapadjustleft");
- }
-
- getsnapadjustbottom(): number {
- return unimplementedWarning("getsnapadjustbottom");
- }
-
- setredrawonresize(wantredrawonresize: number): void {
- return unimplementedWarning("setredrawonresize");
- }
-
- beforeredock(): void {
- return unimplementedWarning("beforeredock");
- }
-
- redock(): void {
- return unimplementedWarning("redock");
- }
-
- istransparencysafe(): boolean {
- return unimplementedWarning("istransparencysafe");
- }
-
- islayoutanimationsafe(): boolean {
- return unimplementedWarning("islayoutanimationsafe");
- }
-
- onmouseenterlayout(): void {
- this.js_trigger("onMousEenterLayout");
- }
-
- onmouseleavelayout(): void {
- this.js_trigger("onMouseLeaveLayout");
- }
-
- onsnapadjustchanged(): void {
- this.js_trigger("onSnapAdjustChanged");
- }
-}
-
-export default Layout;
diff --git a/packages/webamp-modern/src/runtime/LayoutStatus.ts b/packages/webamp-modern/src/runtime/LayoutStatus.ts
deleted file mode 100644
index 8e659b47..00000000
--- a/packages/webamp-modern/src/runtime/LayoutStatus.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class LayoutStatus extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "LayoutStatus";
- }
-
- callme(str: string): void {
- return unimplementedWarning("callme");
- }
-}
-
-export default LayoutStatus;
diff --git a/packages/webamp-modern/src/runtime/List.ts b/packages/webamp-modern/src/runtime/List.ts
deleted file mode 100644
index 454cc9a2..00000000
--- a/packages/webamp-modern/src/runtime/List.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import MakiObject from "./MakiObject";
-import { XmlNode } from "../types";
-import * as Utils from "../utils";
-
-class List extends MakiObject {
- _list: Array;
-
- constructor(node: XmlNode, parent: MakiObject, annotations: Object = {}) {
- super(node, parent, annotations);
- this._list = [];
- }
-
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "List";
- }
-
- additem(object: any): void {
- this._list.push(object);
- }
-
- removeitem(pos: number): void {
- this._list.splice(pos, 1);
- }
-
- enumitem(pos: number): any {
- return this._list[pos];
- }
-
- finditem(obj: any): number {
- return this._list.indexOf(obj);
- }
-
- getnumitems(): number {
- return this._list.length;
- }
-
- removeall(): void {
- this._list = [];
- }
-
- finditem2(_object: any, startItem: number): number {
- return Utils.unimplementedWarning("finditem2");
- }
-}
-
-export default List;
diff --git a/packages/webamp-modern/src/runtime/MakiMap.ts b/packages/webamp-modern/src/runtime/MakiMap.ts
deleted file mode 100644
index 93df29c7..00000000
--- a/packages/webamp-modern/src/runtime/MakiMap.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import MakiObject from "./MakiObject";
-import { unimplementedWarning } from "../utils";
-
-class MakiMap extends MakiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Map";
- }
-
- loadmap(bitmapid: string): void {
- unimplementedWarning("loadmap");
- }
-
- getwidth(): number {
- unimplementedWarning("getwidth");
- return 10;
- }
-
- getheight(): number {
- unimplementedWarning("getheight");
- return 10;
- }
-
- getvalue(x: number, y: number): number {
- return unimplementedWarning("getvalue");
- }
-
- inregion(x: number, y: number): boolean {
- return unimplementedWarning("inregion");
- }
-
- getregion() {
- return unimplementedWarning("getregion");
- }
-
- getargbvalue(x: number, y: number, channel: number): number {
- return unimplementedWarning("getargbvalue");
- }
-}
-
-export default MakiMap;
diff --git a/packages/webamp-modern/src/runtime/MakiObject.ts b/packages/webamp-modern/src/runtime/MakiObject.ts
deleted file mode 100644
index 058e5ea5..00000000
--- a/packages/webamp-modern/src/runtime/MakiObject.ts
+++ /dev/null
@@ -1,137 +0,0 @@
-import Emitter from "../Emitter";
-import * as Utils from "../utils";
-import { XmlNode } from "../types";
-
-class MakiObject {
- _node: XmlNode;
- name: string;
- _uid: number;
- // TODO: This should really just be `string | undefined` and we should handle
- // type conversion differently. Having one type that holds both the pre and
- // post type coerced values is too confusing.
- attributes: { [key: string]: string | number | boolean | undefined };
- parent: MakiObject | null;
- _emitter: Emitter;
- children: MakiObject[];
- js_annotations: Object;
-
- constructor(
- node: XmlNode | null,
- parent: MakiObject | null,
- annotations: Object = {}
- ) {
- if (node) {
- this._node = node;
- this._uid = node.uid;
- this.attributes = node.attributes || {};
- this.name = node.name;
- } else {
- // This feels like a hack.
- this._node = {
- children: [],
- attributes: {},
- uid: Utils.getId(),
- name: this.getclassname().toLowerCase(),
- };
- this._uid = Utils.getId();
- // When dynamically creating an object with `new` we have no underlying node
- this.attributes = {};
- this.name = this.getclassname().toLowerCase();
- }
- this.parent = parent;
- this.js_annotations = annotations;
- this.children = [];
- this._emitter = new Emitter();
- }
-
- js_addChild(child: MakiObject) {
- this.children.push(child);
- }
-
- js_addChildren(children: MakiObject[]) {
- this.children = this.children.concat(children);
- }
-
- js_removeChild(child: MakiObject) {
- this.children = this.children.filter((item) => item !== child);
- }
-
- js_getChildren(): MakiObject[] {
- return this.children;
- }
-
- js_delete() {
- if (this.parent == null) {
- return;
- }
- this.parent.js_removeChild(this);
- this.parent.js_trigger("js_update");
- }
-
- js_trigger(eventName: string, ...args: any[]): void {
- this._emitter.trigger(eventName.toLowerCase(), ...args);
- }
-
- js_listen(eventName: string, cb: (...args: any[]) => void) {
- return this._emitter.listen(eventName, cb);
- }
-
- js_listenToAll(cb: (eventName: string, ...args: any[]) => void) {
- return this._emitter.listenToAll(cb);
- }
-
- js_dispose() {
- this._emitter.dispose();
- }
-
- js_imageLookup(id: string) {
- const element = Utils.findElementById(this, id);
- if (element) {
- return element.js_annotations;
- }
-
- return null;
- }
-
- js_fontLookup(id: string) {
- const element = Utils.findElementById(this, id);
- if (element) {
- return element.js_annotations;
- }
-
- return null;
- }
-
- js_groupdefLookup(id: string) {
- const groupdef = Utils.findGroupDefById(this, id);
- if (groupdef) {
- return groupdef;
- }
-
- return null;
- }
-
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Object";
- }
-
- /**
- * getId()
- */
- getid(): string {
- throw new Error("getId not implemented");
- }
-
- onnotify(command: string, param: string, a: number, b: number): number {
- this.js_trigger("onNotify", command, param, a, b);
- return 0;
- }
-}
-
-export default MakiObject;
diff --git a/packages/webamp-modern/src/runtime/Menu.ts b/packages/webamp-modern/src/runtime/Menu.ts
deleted file mode 100644
index 08099ed3..00000000
--- a/packages/webamp-modern/src/runtime/Menu.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-export default class Menu extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Menu";
- }
-
- setmenugroup(groupId: string): void {
- return unimplementedWarning("setmenugroup");
- }
-
- getmenugroup(): string {
- return unimplementedWarning("getmenugroup");
- }
-
- setmenu(menuId: string): void {
- return unimplementedWarning("setmenu");
- }
-
- getmenu(): string {
- return unimplementedWarning("getmenu");
- }
-
- spawnmenu(monitor: number): void {
- return unimplementedWarning("spawnmenu");
- }
-
- cancelmenu(): void {
- return unimplementedWarning("cancelmenu");
- }
-
- setnormalid(id: string): void {
- return unimplementedWarning("setnormalid");
- }
-
- setdownid(id: string): void {
- return unimplementedWarning("setdownid");
- }
-
- sethoverid(id: string): void {
- return unimplementedWarning("sethoverid");
- }
-
- onopenmenu(): void {
- return unimplementedWarning("onopenmenu");
- }
-
- onclosemenu(): void {
- return unimplementedWarning("onclosemenu");
- }
-
- nextmenu(): void {
- return unimplementedWarning("nextmenu");
- }
-
- previousmenu(): void {
- return unimplementedWarning("previousmenu");
- }
-}
diff --git a/packages/webamp-modern/src/runtime/MenuButton.ts b/packages/webamp-modern/src/runtime/MenuButton.ts
deleted file mode 100644
index 55f36f5a..00000000
--- a/packages/webamp-modern/src/runtime/MenuButton.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class MenuButton extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "MenuButton";
- }
-
- onopenmenu(): void {
- this.js_trigger("onOpenMenu");
- }
-
- onclosemenu(): void {
- this.js_trigger("onCloseMenu");
- }
-
- onselectitem(item: string): void {
- this.js_trigger("onSelectItem", item);
- }
-
- openmenu(): void {
- return unimplementedWarning("openmenu");
- }
-
- closemenu(): void {
- return unimplementedWarning("closemenu");
- }
-}
-
-export default MenuButton;
diff --git a/packages/webamp-modern/src/runtime/MouseRedir.ts b/packages/webamp-modern/src/runtime/MouseRedir.ts
deleted file mode 100644
index e23af7d0..00000000
--- a/packages/webamp-modern/src/runtime/MouseRedir.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-import MakiMap from "./MakiMap";
-import Region from "./Region";
-
-class MouseRedir extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "MouseRedir";
- }
-
- setredirection(o: GuiObject): void {
- return unimplementedWarning("setredirection");
- }
-
- getredirection() {
- return unimplementedWarning("getredirection");
- }
-
- setregionfrommap(
- regionmap: MakiMap,
- threshold: number,
- reverse: boolean
- ): void {
- return unimplementedWarning("setregionfrommap");
- }
-
- setregion(reg: Region): void {
- return unimplementedWarning("setregion");
- }
-}
-
-export default MouseRedir;
diff --git a/packages/webamp-modern/src/runtime/PlDir.ts b/packages/webamp-modern/src/runtime/PlDir.ts
deleted file mode 100644
index 51f9639b..00000000
--- a/packages/webamp-modern/src/runtime/PlDir.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import MakiObject from "./MakiObject";
-import * as Utils from "../utils";
-
-export default class PlDir extends MakiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "PlDir";
- }
-
- showcurrentlyplayingentry(): void {
- return Utils.unimplementedWarning("showcurrentlyplayingentry");
- }
-
- getnumitems(): number {
- return Utils.unimplementedWarning("getnumitems");
- }
-
- getitemname(item: number): string {
- return Utils.unimplementedWarning("getitemname");
- }
-
- refresh(): void {
- return Utils.unimplementedWarning("refresh");
- }
-
- renameitem(item: number, name: string): void {
- return Utils.unimplementedWarning("renameitem");
- }
-
- enqueueitem(item: number): void {
- return Utils.unimplementedWarning("enqueueitem");
- }
-
- playitem(item: number): void {
- return Utils.unimplementedWarning("playitem");
- }
-}
diff --git a/packages/webamp-modern/src/runtime/PlEdit.ts b/packages/webamp-modern/src/runtime/PlEdit.ts
deleted file mode 100644
index e38599c1..00000000
--- a/packages/webamp-modern/src/runtime/PlEdit.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-import MakiObject from "./MakiObject";
-import { unimplementedWarning } from "../utils";
-
-export default class PlEdit extends MakiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "PlEdit";
- }
-
- getnumtracks(): number {
- return unimplementedWarning("getnumtracks");
- }
-
- getcurrentindex(): number {
- return unimplementedWarning("getcurrentindex");
- }
-
- getnumselectedtracks(): number {
- return unimplementedWarning("getnumselectedtracks");
- }
-
- getnextselectedtrack(i: number): number {
- return unimplementedWarning("getnextselectedtrack");
- }
-
- showcurrentlyplayingtrack(): void {
- return unimplementedWarning("showcurrentlyplayingtrack");
- }
-
- showtrack(item: number): void {
- return unimplementedWarning("showtrack");
- }
-
- enqueuefile(file: string): void {
- return unimplementedWarning("enqueuefile");
- }
-
- clear(): void {
- return unimplementedWarning("clear");
- }
-
- removetrack(item: number): void {
- return unimplementedWarning("removetrack");
- }
-
- swaptracks(item1: number, item2: number): void {
- return unimplementedWarning("swaptracks");
- }
-
- moveup(item: number): void {
- return unimplementedWarning("moveup");
- }
-
- movedown(item: number): void {
- return unimplementedWarning("movedown");
- }
-
- moveto(item: number, pos: number): void {
- return unimplementedWarning("moveto");
- }
-
- playtrack(item: number): void {
- return unimplementedWarning("playtrack");
- }
-
- getrating(item: number): number {
- return unimplementedWarning("getrating");
- }
-
- setrating(item: number, rating: number): void {
- return unimplementedWarning("setrating");
- }
-
- gettitle(item: number): string {
- return unimplementedWarning("gettitle");
- }
-
- getlength(item: number): string {
- return unimplementedWarning("getlength");
- }
-
- getmetadata(item: number, metadatastring: string): string {
- return unimplementedWarning("getmetadata");
- }
-
- getfilename(item: number): string {
- return unimplementedWarning("getfilename");
- }
-
- onpleditmodified(): void {
- return unimplementedWarning("onpleditmodified");
- }
-}
diff --git a/packages/webamp-modern/src/runtime/PopupMenu.ts b/packages/webamp-modern/src/runtime/PopupMenu.ts
deleted file mode 100644
index 108c87e8..00000000
--- a/packages/webamp-modern/src/runtime/PopupMenu.ts
+++ /dev/null
@@ -1,102 +0,0 @@
-import MakiObject from "./MakiObject";
-import { unimplementedWarning } from "../utils";
-import { XmlNode } from "../types";
-import Group from "./Group";
-
-type Command =
- | {
- name: string;
- id: number;
- checked: boolean;
- disabled: boolean;
- }
- | {
- id: "separator";
- };
-
-class PopupMenu extends MakiObject {
- _commands: Command[];
- _guiParent: Group;
- parent: MakiObject;
- js_selectCommand: (id: number) => void;
-
- constructor(node: XmlNode, parent: MakiObject, annotations: Object) {
- super(node, parent, annotations);
- this.parent = parent;
-
- if (!(parent instanceof Group)) {
- throw new Error(
- "Tried to create a PopupMenu with a parent that is not a GuiObject"
- );
- }
- // MakiOjbect.parent is just a MakiObject, but we expect the parent to have GuiObject properties/methods.
- this._guiParent = parent;
-
- this._commands = [];
- this.js_selectCommand = (id: number) => {};
- }
-
- js_getCommands(): Command[] {
- return this._commands;
- }
-
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "PopupMenu";
- }
-
- addcommand(
- txt: string,
- id: number,
- checked: boolean,
- disabled: boolean
- ): void {
- this._commands.push({ name: txt, id, checked, disabled });
- }
-
- addseparator(): void {
- this._commands.push({ id: "separator" });
- }
-
- checkcommand(id: number, check: boolean): void {
- unimplementedWarning("checkcommand");
- }
-
- popatmouse(): Promise {
- this.attributes.x = this._guiParent.getmouseposx();
- this.attributes.y = this._guiParent.getmouseposy();
- return new Promise((resolve) => {
- this.js_selectCommand = (id) => {
- this.parent.js_removeChild(this);
- this.parent.js_trigger("js_update");
- resolve(id);
- };
-
- this.parent.js_addChild(this);
- this.parent.js_trigger("js_update");
- });
- }
-
- addsubmenu(submenu: PopupMenu, submenutext: string): void {
- return unimplementedWarning("addsubmenu");
- }
-
- popatxy(x: number, y: number): number {
- return unimplementedWarning("popatxy");
- }
-
- getnumcommands(): number {
- return unimplementedWarning("getnumcommands");
- }
-
- disablecommand(cmd_id: number, disable: boolean): void {
- return unimplementedWarning("disablecommand");
- }
-}
-
-export default PopupMenu;
diff --git a/packages/webamp-modern/src/runtime/QueryList.ts b/packages/webamp-modern/src/runtime/QueryList.ts
deleted file mode 100644
index 50dcfdaa..00000000
--- a/packages/webamp-modern/src/runtime/QueryList.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import GuiObject from "./GuiObject";
-
-class QueryList extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "QueryList";
- }
-
- onresetquery(): void {
- this.js_trigger("onResetQuery");
- }
-}
-
-export default QueryList;
diff --git a/packages/webamp-modern/src/runtime/Region.ts b/packages/webamp-modern/src/runtime/Region.ts
deleted file mode 100644
index 5b1779dd..00000000
--- a/packages/webamp-modern/src/runtime/Region.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import MakiObject from "./MakiObject";
-import { unimplementedWarning } from "../utils";
-import MakiMap from "./MakiMap";
-
-class Region extends MakiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Region";
- }
-
- loadfrommap(regionmap: MakiMap, threshold: number, reversed: boolean): void {
- unimplementedWarning("loadFromMap");
- }
-
- offset(x: number, y: number): void {
- unimplementedWarning("offset");
- }
-
- add(reg: Region): void {
- return unimplementedWarning("add");
- }
-
- sub(reg: Region): void {
- return unimplementedWarning("sub");
- }
-
- stretch(r: number): void {
- return unimplementedWarning("stretch");
- }
-
- copy(reg: Region): void {
- return unimplementedWarning("copy");
- }
-
- loadfrombitmap(bitmapid: string): void {
- return unimplementedWarning("loadfrombitmap");
- }
-
- getboundingboxx(): number {
- return unimplementedWarning("getboundingboxx");
- }
-
- getboundingboxy(): number {
- return unimplementedWarning("getboundingboxy");
- }
-
- getboundingboxw(): number {
- return unimplementedWarning("getboundingboxw");
- }
-
- getboundingboxh(): number {
- return unimplementedWarning("getboundingboxh");
- }
-}
-
-export default Region;
diff --git a/packages/webamp-modern/src/runtime/Slider.ts b/packages/webamp-modern/src/runtime/Slider.ts
deleted file mode 100644
index 8c5ff86e..00000000
--- a/packages/webamp-modern/src/runtime/Slider.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class Slider extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Slider";
- }
-
- getposition(): number {
- unimplementedWarning("getposition");
- return 0;
- }
-
- onsetposition(newpos: number): void {
- this.js_trigger("onSetPosition", newpos);
- }
-
- onpostedposition(newpos: number): void {
- this.js_trigger("onPostedPosition", newpos);
- }
-
- onsetfinalposition(pos: number): void {
- this.js_trigger("onSetFinalPosition", pos);
- }
-
- setposition(pos: number): void {
- return unimplementedWarning("setposition");
- }
-
- lock(): void {
- return unimplementedWarning("lock");
- }
-
- unlock(): void {
- return unimplementedWarning("unlock");
- }
-}
-
-export default Slider;
diff --git a/packages/webamp-modern/src/runtime/Status.ts b/packages/webamp-modern/src/runtime/Status.ts
deleted file mode 100644
index 8a8eb72f..00000000
--- a/packages/webamp-modern/src/runtime/Status.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import GuiObject from "./GuiObject";
-
-class Status extends GuiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Status";
- }
-}
-
-export default Status;
diff --git a/packages/webamp-modern/src/runtime/System.ts b/packages/webamp-modern/src/runtime/System.ts
deleted file mode 100644
index bcfafb85..00000000
--- a/packages/webamp-modern/src/runtime/System.ts
+++ /dev/null
@@ -1,1105 +0,0 @@
-import Group from "./Group";
-import MakiObject from "./MakiObject";
-import {
- findDescendantByTypeAndId,
- getMousePosition,
- unimplementedWarning,
-} from "../utils";
-import * as Actions from "../Actions";
-import * as Selectors from "../Selectors";
-import { ModernStore } from "../types";
-import Layout from "./Layout";
-import GuiObject from "./GuiObject";
-
-class System extends MakiObject {
- _scriptGroup: MakiObject;
- _root: MakiObject;
- _store: ModernStore;
- _privateInt: Map>;
- _privateString: Map>;
- constructor(scriptGroup: MakiObject | null, store: ModernStore) {
- super(null, null);
- this._store = store;
-
- this._scriptGroup =
- scriptGroup == null ? new Group(null, null) : scriptGroup;
- this._root = this._scriptGroup;
- while (this._root.parent) {
- this._root = this._root.parent;
- }
- // TODO: Replace these with a DefaultMap once we have one.
- this._privateInt = new Map();
- this._privateString = new Map();
- }
-
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "System";
- }
-
- getscriptgroup() {
- return this._scriptGroup;
- }
-
- getcontainer(id: string) {
- return findDescendantByTypeAndId(this._root, "container", id);
- }
-
- getruntimeversion(): number {
- return 5.666;
- }
-
- // Retreive a token from a list of tokens seperated by separator.
- gettoken(str: string, separator: string, tokennum: number): string {
- const tokens = str.split(separator);
- if (tokens.length > tokennum) {
- return tokens[tokennum];
- }
- return "";
- }
-
- getparam(): string {
- unimplementedWarning("getparam");
- return "Some String";
- }
-
- getskinname(): string {
- unimplementedWarning("getskinname");
- return "Some String";
- }
-
- getplayitemstring(): string {
- unimplementedWarning("getplayitemstring");
- return "Some String";
- }
-
- geteq(): number {
- unimplementedWarning("geteq");
- return 0;
- }
-
- oneqchanged(newstatus: number): void {
- this.js_trigger("onEqChanged", newstatus);
- }
-
- geteqband(band: number): number {
- unimplementedWarning("geteqband");
- return 0;
- }
-
- geteqpreamp(): number {
- unimplementedWarning("geteqpreamp");
- return 0;
- }
-
- getstatus(): number {
- unimplementedWarning("getstatus");
- return 0;
- }
-
- messagebox(
- message: string,
- msgtitle: string,
- flag: number,
- notanymoreId: string
- ): number {
- console.log({ message, msgtitle, flag, notanymoreId });
- return unimplementedWarning("getstatus");
- }
-
- integertostring(value: number): string {
- return value.toString();
- }
-
- stringtointeger(str: string): number {
- return parseInt(str, 10);
- }
-
- getprivateint(section: string, item: string, defvalue: number): number {
- if (
- !this._privateInt.has(section) ||
- // @ts-ignore We know this section exists
- !this._privateInt.get(section).has(item)
- ) {
- return defvalue;
- }
- // @ts-ignore We know this section exists
- return this._privateInt.get(section).get(item);
- }
-
- // I think `defvalue` here is a typo that we inherited from std.mi. It should just be `value`.
- setprivateint(section: string, item: string, defvalue: number): void {
- if (!this._privateInt.has(section)) {
- this._privateInt.set(section, new Map([[item, defvalue]]));
- } else {
- // @ts-ignore We know the section exists
- this._privateInt.get(section).set(item, defvalue);
- }
- }
-
- getleftvumeter(): number {
- return Selectors.getLeftVUMeter(this._store.getState());
- }
-
- getrightvumeter(): number {
- return Selectors.getRightVUMeter(this._store.getState());
- }
-
- // Seems like volume is 0-255
- getvolume(): number {
- return Selectors.getVolume(this._store.getState());
- }
-
- setvolume(volume: number): void {
- return this._store.dispatch(Actions.setVolume(volume));
- }
-
- getplayitemlength(): number {
- unimplementedWarning("getplayitemlength");
- return 100000;
- }
-
- seekto(pos: number): void {
- unimplementedWarning("seekto");
- }
-
- getviewportheight(): number {
- return Math.max(
- document.documentElement.clientHeight,
- window.innerHeight || 0
- );
- }
-
- getviewportwidth(): number {
- return Math.max(
- document.documentElement.clientWidth,
- window.innerWidth || 0
- );
- }
-
- onscriptloaded(): void {
- this.js_trigger("onScriptLoaded");
- }
-
- onscriptunloading(): void {
- this.js_trigger("onScriptUnloading");
- }
-
- onquit(): void {
- this.js_trigger("onQuit");
- }
-
- onsetxuiparam(param: string, value: string): void {
- this.js_trigger("onSetXuiParam", param, value);
- }
-
- onkeydown(key: string): void {
- this.js_trigger("onKeyDown", key);
- }
-
- onaccelerator(action: string, section: string, key: string): void {
- this.js_trigger("onAccelerator", action, section, key);
- }
-
- oncreatelayout(_layout: Layout): void {
- this.js_trigger("onCreateLayout", _layout);
- }
-
- onshowlayout(_layout: Layout): void {
- this.js_trigger("onShowLayout", _layout);
- }
-
- onhidelayout(_layout: Layout): void {
- this.js_trigger("onHideLayout", _layout);
- }
-
- onstop(): void {
- this.js_trigger("onStop");
- }
-
- onplay(): void {
- this.js_trigger("onPlay");
- }
-
- onpause(): void {
- this.js_trigger("onPause");
- }
-
- onresume(): void {
- this.js_trigger("onResume");
- }
-
- ontitlechange(newtitle: string): void {
- this.js_trigger("onTitleChange", newtitle);
- }
-
- ontitle2change(newtitle2: string): void {
- this.js_trigger("onTitle2Change", newtitle2);
- }
-
- oninfochange(info: string): void {
- this.js_trigger("onInfoChange", info);
- }
-
- onstatusmsg(msg: string): void {
- this.js_trigger("onStatusMsg", msg);
- }
-
- oneqbandchanged(band: number, newvalue: number): void {
- this.js_trigger("onEqBandChanged", band, newvalue);
- }
-
- oneqpreampchanged(newvalue: number): void {
- this.js_trigger("onEqPreampChanged", newvalue);
- }
-
- onvolumechanged(newvol: number): void {
- this.js_trigger("onVolumeChanged", newvol);
- }
-
- onseek(newpos: number): void {
- this.js_trigger("onSeek", newpos);
- }
-
- newdynamiccontainer(container_id: string) {
- return unimplementedWarning("newdynamiccontainer");
- }
-
- newgroup(group_id: string) {
- return unimplementedWarning("newgroup");
- }
-
- newgroupaslayout(group_id: string) {
- return unimplementedWarning("newgroupaslayout");
- }
-
- getnumcontainers(): number {
- return unimplementedWarning("getnumcontainers");
- }
-
- enumcontainer(num: number) {
- return unimplementedWarning("enumcontainer");
- }
-
- getwac(wac_guid: string) {
- return unimplementedWarning("getwac");
- }
-
- getplayitemmetadatastring(metadataname: string): string {
- return unimplementedWarning("getplayitemmetadatastring");
- }
-
- getplayitemdisplaytitle(): string {
- return unimplementedWarning("getplayitemdisplaytitle");
- }
-
- getextfamily(ext: string): string {
- return unimplementedWarning("getextfamily");
- }
-
- playfile(playitem: string): void {
- return unimplementedWarning("playfile");
- }
-
- play(): void {
- return unimplementedWarning("play");
- }
-
- stop(): void {
- return unimplementedWarning("stop");
- }
-
- pause(): void {
- return unimplementedWarning("pause");
- }
-
- next(): void {
- return unimplementedWarning("next");
- }
-
- previous(): void {
- return unimplementedWarning("previous");
- }
-
- eject(): void {
- return unimplementedWarning("eject");
- }
-
- getposition(): number {
- return unimplementedWarning("getposition");
- }
-
- seteqband(band: number, value: number): void {
- return unimplementedWarning("seteqband");
- }
-
- seteqpreamp(value: number): void {
- return unimplementedWarning("seteqpreamp");
- }
-
- seteq(onoff: number): void {
- return unimplementedWarning("seteq");
- }
-
- getmouseposx(): number {
- return getMousePosition().x;
- }
-
- getmouseposy(): number {
- return getMousePosition().y;
- }
-
- floattostring(value: number, ndigits: number): string {
- return value.toFixed(ndigits).toString();
- }
-
- stringtofloat(str: string): number {
- return parseFloat(str);
- }
-
- _atLeastTwoDigits(n: number): string {
- return n > 9 ? n.toString() : `0${n}`;
- }
-
- // Convert a time in seconds to a HH:MM:SS value.
- integertolongtime(value: number): string {
- const hours = Math.floor(value / 3600);
- const remainingTime = value - hours * 3600;
- const minutes = Math.floor(remainingTime / 60);
- const seconds = Math.floor(remainingTime - minutes * 60);
- return `${this._atLeastTwoDigits(hours)}:${this._atLeastTwoDigits(
- minutes
- )}:${this._atLeastTwoDigits(seconds)}`;
- }
-
- // Convert a time in seconds to a MM:SS value.
- integertotime(value: number): string {
- const minutes = Math.floor(value / 60);
- const seconds = Math.floor(value - minutes * 60);
- return `${this._atLeastTwoDigits(minutes)}:${this._atLeastTwoDigits(
- seconds
- )}`;
- }
-
- _getDateTimeInMs(date: Date): number {
- const dateTime = date.getTime();
- const dateCopy = new Date(dateTime);
- return dateTime - dateCopy.setHours(0, 0, 0, 0);
- }
-
- // datetime in HH:MM format (docs imply it is in the same format as integertotime
- // which would be MM:SS, but I tested in winamp and it is HH:MM)
- // (e.g. 17:44)
- datetotime(datetime: number): string {
- const date = new Date(datetime * 1000);
- const seconds = this._getDateTimeInMs(date) / 1000;
- const longtime = this.integertolongtime(seconds);
- return longtime.substring(0, longtime.length - 3);
- }
-
- // datetime in HH:MM:SS format
- // (e.g. 17:44:58)
- datetolongtime(datetime: number): string {
- const date = new Date(datetime * 1000);
- const seconds = this._getDateTimeInMs(date) / 1000;
- return this.integertolongtime(seconds);
- }
-
- // datetime in MM/DD/YY HH:MM:SS format
- // (e.g. 09/08/19 17:44:58)
- formatdate(datetime: number): string {
- const date = new Date(datetime * 1000);
- const seconds = this._getDateTimeInMs(date) / 1000;
- const dateString = date.toLocaleDateString("en-US", {
- year: "2-digit",
- month: "2-digit",
- day: "2-digit",
- });
- const timeString = this.integertolongtime(seconds);
- return `${dateString} ${timeString}`;
- }
-
- // datetime in DayOfWeek, Month DD, YYYY HH:MM:SS format
- // (e.g. Sunday, September 08, 2019 17:44:58)
- formatlongdate(datetime: number): string {
- const date = new Date(datetime * 1000);
- const seconds = this._getDateTimeInMs(date) / 1000;
- const dateString = date.toLocaleDateString("en-US", {
- weekday: "long",
- year: "numeric",
- month: "long",
- day: "2-digit",
- });
- const timeString = this.integertolongtime(seconds);
- return `${dateString} ${timeString}`;
- }
-
- // returns the datetime's year since 1900
- getdateyear(datetime: number): number {
- const date = new Date(datetime * 1000);
- return date.getFullYear() - 1900;
- }
-
- // returns the datetime's month (0-11)
- getdatemonth(datetime: number): number {
- const date = new Date(datetime * 1000);
- return date.getMonth();
- }
-
- // returns the datetime's day of the month (1-31)
- getdateday(datetime: number): number {
- const date = new Date(datetime * 1000);
- return date.getDate();
- }
-
- // returns the datetime's day of the week (0-6)
- // MAKI starts with Sunday like JS
- getdatedow(datetime: number): number {
- const date = new Date(datetime * 1000);
- return date.getDay();
- }
-
- // returns the datetime's day of the year (0-365)
- getdatedoy(datetime: number): number {
- const date = new Date(datetime * 1000);
- const start = new Date(date.getFullYear(), 0, 0);
- return Math.floor((date.getTime() - start.getTime()) / 86400000);
- }
-
- // returns the datetime's hour (0-23)
- getdatehour(datetime: number): number {
- const date = new Date(datetime * 1000);
- return date.getHours();
- }
-
- // returns the datetime's minutes (0-59)
- getdatemin(datetime: number): number {
- const date = new Date(datetime * 1000);
- return date.getMinutes();
- }
-
- // returns the datetime's seconds (0-59)
- getdatesec(datetime: number): number {
- const date = new Date(datetime * 1000);
- return date.getSeconds();
- }
-
- // Based on https://stackoverflow.com/questions/11887934/how-to-check-if-the-dst-daylight-saving-time-is-in-effect-and-if-it-is-whats
- _stdTimezoneOffset(date: Date): number {
- const jan = new Date(date.getFullYear(), 0, 1);
- const jul = new Date(date.getFullYear(), 6, 1);
- return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());
- }
-
- // returns the datetime's daylight savings flag
- getdatedst(datetime: number): number {
- const date = new Date(datetime * 1000);
- return date.getTimezoneOffset() < this._stdTimezoneOffset(date) ? 1 : 0;
- }
-
- // returns the datetime in seconds, use with the above functions
- getdate(): number {
- return Math.floor(Date.now() / 1000);
- }
-
- // Get a substring from a string.
- strmid(str: string, start: number, len: number): string {
- return str.substring(start, start + len);
- }
-
- // Get a substring from a string, starting from the left.
- strleft(str: string, nchars: number): string {
- return str.substring(0, nchars);
- }
-
- // Get a substring from a string, starting from the right. Since
- // the start point is the right of the string (or the end). It will
- // extract the string starting from the END going towards the BEGINNING.
- strright(str: string, nchars: number): string {
- return str.substring(str.length - nchars);
- }
-
- // Search a string for any occurance of substring. If the substring was
- // found in the string, it will return the position of the substring in
- // the string searched. If the substring is not found, the return value
- // is -1.
- strsearch(str: string, substr: string): number {
- return str.indexOf(substr);
- }
-
- strlen(str: string): number {
- return str.length;
- }
-
- strupper(str: string): string {
- return str.toUpperCase();
- }
-
- strlower(str: string): string {
- return str.toLowerCase();
- }
-
- urlencode(url: string): string {
- return encodeURI(url);
- }
-
- removepath(str: string): string {
- return unimplementedWarning("removepath");
- }
-
- getpath(str: string): string {
- return unimplementedWarning("getpath");
- }
-
- getextension(str: string): string {
- return unimplementedWarning("getextension");
- }
-
- sin(value: number): number {
- return Math.sin(value);
- }
-
- cos(value: number): number {
- return Math.cos(value);
- }
-
- tan(value: number): number {
- return Math.tan(value);
- }
-
- asin(value: number): number {
- return Math.asin(value);
- }
-
- acos(value: number): number {
- return Math.acos(value);
- }
-
- atan(value: number): number {
- return Math.atan(value);
- }
-
- atan2(y: number, x: number): number {
- return Math.atan2(y, x);
- }
-
- pow(value: number, pvalue: number): number {
- return Math.pow(value, pvalue);
- }
-
- sqr(value: number): number {
- return Math.pow(value, 2);
- }
-
- sqrt(value: number): number {
- return Math.sqrt(value);
- }
-
- random(max: number): number {
- return Math.floor(Math.random() * max);
- }
-
- setprivatestring(section: string, item: string, value: string): void {
- if (!this._privateString.has(section)) {
- this._privateString.set(section, new Map([[item, value]]));
- } else {
- // @ts-ignore We know the section exists
- this._privateString.get(section).set(item, value);
- }
- }
-
- getprivatestring(section: string, item: string, defvalue: string): string {
- if (
- !this._privateString.has(section) ||
- // @ts-ignore We know this section exists
- !this._privateString.get(section).has(item)
- ) {
- return defvalue;
- }
- // @ts-ignore We know the section exists
- return this._privateString.get(section).get(item);
- }
-
- setpublicstring(item: string, value: string): void {
- return unimplementedWarning("setpublicstring");
- }
-
- setpublicint(item: string, value: number): void {
- return unimplementedWarning("setpublicint");
- }
-
- getpublicstring(item: string, defvalue: string): string {
- return unimplementedWarning("getpublicstring");
- }
-
- getpublicint(item: string, defvalue: number): number {
- return unimplementedWarning("getpublicint");
- }
-
- getviewportwidthfrompoint(x: number, y: number): number {
- return unimplementedWarning("getviewportwidthfrompoint");
- }
-
- getviewportheightfrompoint(x: number, y: number): number {
- return unimplementedWarning("getviewportheightfrompoint");
- }
-
- getviewportleft(): number {
- return unimplementedWarning("getviewportleft");
- }
-
- getviewportleftfrompoint(x: number, y: number): number {
- return unimplementedWarning("getviewportleftfrompoint");
- }
-
- getviewporttop(): number {
- return unimplementedWarning("getviewporttop");
- }
-
- getviewporttopfrompoint(x: number, y: number): number {
- return unimplementedWarning("getviewporttopfrompoint");
- }
-
- debugstring(str: string, severity: number): void {
- return unimplementedWarning("debugstring");
- }
-
- ddesend(application: string, command: string, mininterval: number): void {
- return unimplementedWarning("ddesend");
- }
-
- onlookforcomponent(guid: string) {
- return unimplementedWarning("onlookforcomponent");
- }
-
- getcurappleft(): number {
- return unimplementedWarning("getcurappleft");
- }
-
- getcurapptop(): number {
- return unimplementedWarning("getcurapptop");
- }
-
- getcurappwidth(): number {
- return unimplementedWarning("getcurappwidth");
- }
-
- getcurappheight(): number {
- return unimplementedWarning("getcurappheight");
- }
-
- isappactive(): boolean {
- return unimplementedWarning("isappactive");
- }
-
- switchskin(skinname: string): void {
- return unimplementedWarning("switchskin");
- }
-
- isloadingskin(): number {
- return unimplementedWarning("isloadingskin");
- }
-
- lockui(): void {
- return unimplementedWarning("lockui");
- }
-
- unlockui(): void {
- return unimplementedWarning("unlockui");
- }
-
- getmainbrowser() {
- return unimplementedWarning("getmainbrowser");
- }
-
- popmainbrowser(): void {
- return unimplementedWarning("popmainbrowser");
- }
-
- navigateurl(url: string): void {
- return unimplementedWarning("navigateurl");
- }
-
- isobjectvalid(o: MakiObject): boolean {
- return unimplementedWarning("isobjectvalid");
- }
-
- // Takes a Double and returns the closest integer representation.
- integer(d: number): number {
- return Math.round(d);
- }
-
- frac(d: number): number {
- return d - Math.floor(d);
- }
-
- // Returns ms since midnight
- gettimeofday(): number {
- const date = new Date();
- return this._getDateTimeInMs(date);
- }
-
- setmenutransparency(alphavalue: number): void {
- return unimplementedWarning("setmenutransparency");
- }
-
- ongetcancelcomponent(guid: string, goingvisible: boolean): boolean {
- unimplementedWarning("ongetcancelcomponent");
- this.js_trigger("onGetCancelComponent", guid, goingvisible);
- // TODO: not sure what we shuld return
- return true;
- }
-
- iskeydown(vk_code: number): number {
- return unimplementedWarning("iskeydown");
- }
-
- setclipboardtext(_text: string): void {
- return unimplementedWarning("setclipboardtext");
- }
-
- chr(charnum: number): string {
- return String.fromCharCode(charnum);
- }
-
- selectfile(extlist: string, id: string, prev_filename: string): string {
- return unimplementedWarning("selectfile");
- }
-
- systemmenu(): void {
- return unimplementedWarning("systemmenu");
- }
-
- windowmenu(): void {
- return unimplementedWarning("windowmenu");
- }
-
- triggeraction(
- context: GuiObject,
- actionname: string,
- actionparam: string
- ): void {
- return unimplementedWarning("triggeraction");
- }
-
- showwindow(
- guidorgroupid: string,
- preferedcontainer: string,
- transient: boolean
- ) {
- return unimplementedWarning("showwindow");
- }
-
- hidewindow(hw: GuiObject): void {
- return unimplementedWarning("hidewindow");
- }
-
- hidenamedwindow(guidorgroup: string): void {
- return unimplementedWarning("hidenamedwindow");
- }
-
- isnamedwindowvisible(guidorgroup: string): boolean {
- return unimplementedWarning("isnamedwindowvisible");
- }
-
- setatom(atomname: string, object: MakiObject): void {
- return unimplementedWarning("setatom");
- }
-
- getatom(atomname: string) {
- return unimplementedWarning("getatom");
- }
-
- invokedebugger(): void {
- return unimplementedWarning("invokedebugger");
- }
-
- isvideo(): number {
- return unimplementedWarning("isvideo");
- }
-
- isvideofullscreen(): number {
- return unimplementedWarning("isvideofullscreen");
- }
-
- getidealvideowidth(): number {
- return unimplementedWarning("getidealvideowidth");
- }
-
- getidealvideoheight(): number {
- return unimplementedWarning("getidealvideoheight");
- }
-
- isminimized(): number {
- return unimplementedWarning("isminimized");
- }
-
- minimizeapplication(): void {
- return unimplementedWarning("minimizeapplication");
- }
-
- restoreapplication(): void {
- return unimplementedWarning("restoreapplication");
- }
-
- activateapplication(): void {
- return unimplementedWarning("activateapplication");
- }
-
- getplaylistlength(): number {
- return unimplementedWarning("getplaylistlength");
- }
-
- getplaylistindex(): number {
- return unimplementedWarning("getplaylistindex");
- }
-
- isdesktopalphaavailable(): boolean {
- return unimplementedWarning("isdesktopalphaavailable");
- }
-
- istransparencyavailable(): boolean {
- return unimplementedWarning("istransparencyavailable");
- }
-
- onshownotification(): number {
- this.js_trigger("onShowNotification");
- return 1; // return 1 if you implement it
- }
-
- getsonginfotext(): string {
- return unimplementedWarning("getsonginfotext");
- }
-
- getvisband(channel: number, band: number): number {
- return unimplementedWarning("getvisband");
- }
-
- onviewportchanged(width: number, height: number): void {
- return unimplementedWarning("onviewportchanged");
- }
-
- onurlchange(url: string): void {
- return unimplementedWarning("onurlchange");
- }
-
- oneqfreqchanged(isiso: number): void {
- return unimplementedWarning("oneqfreqchanged");
- }
-
- enumembedguid(num: number): string {
- return unimplementedWarning("enumembedguid");
- }
-
- getmetadatastring(filename: string, metadataname: string): string {
- return unimplementedWarning("getmetadatastring");
- }
-
- getcurrenttrackrating(): number {
- return unimplementedWarning("getcurrenttrackrating");
- }
-
- oncurrenttrackrated(rating: number): void {
- return unimplementedWarning("oncurrenttrackrated");
- }
-
- setcurrenttrackrating(rating: number): void {
- return unimplementedWarning("setcurrenttrackrating");
- }
-
- getdecodername(playitem: string): string {
- return unimplementedWarning("getdecodername");
- }
-
- getalbumart(playitem: string): number {
- return unimplementedWarning("getalbumart");
- }
-
- downloadmedia(
- url: string,
- destinationPath: string,
- wantAddToML: boolean,
- notifyDownloadsList: boolean
- ): void {
- return unimplementedWarning("downloadmedia");
- }
-
- downloadurl(
- url: string,
- destination_filename: string,
- progress_dialog_title: string
- ): void {
- return unimplementedWarning("downloadurl");
- }
-
- ondownloadfinished(url: string, success: boolean, filename: string): void {
- return unimplementedWarning("ondownloadfinished");
- }
-
- getdownloadpath(): string {
- return unimplementedWarning("getdownloadpath");
- }
-
- setdownloadpath(new_path: string): void {
- return unimplementedWarning("setdownloadpath");
- }
-
- enqueuefile(playitem: string): void {
- return unimplementedWarning("enqueuefile");
- }
-
- urldecode(url: string): string {
- return unimplementedWarning("urldecode");
- }
-
- parseatf(topass: string): string {
- return unimplementedWarning("parseatf");
- }
-
- log10(value: number): number {
- return unimplementedWarning("log10");
- }
-
- ln(value: number): number {
- return unimplementedWarning("ln");
- }
-
- getviewportwidthfromguiobject(g: GuiObject): number {
- return unimplementedWarning("getviewportwidthfromguiobject");
- }
-
- getmonitorwidth(): number {
- return unimplementedWarning("getmonitorwidth");
- }
-
- getmonitorwidthfrompoint(x: number, y: number): number {
- return unimplementedWarning("getmonitorwidthfrompoint");
- }
-
- getmonitorwidthfromguiobject(g: GuiObject): number {
- return unimplementedWarning("getmonitorwidthfromguiobject");
- }
-
- onmousemove(x: number, y: number): void {
- return unimplementedWarning("onmousemove");
- }
-
- getviewportheightfromguiobject(g: GuiObject): number {
- return unimplementedWarning("getviewportheightfromguiobject");
- }
-
- getmonitorheight(): number {
- return unimplementedWarning("getmonitorheight");
- }
-
- getmonitorheightfrompoint(x: number, y: number): number {
- return unimplementedWarning("getmonitorheightfrompoint");
- }
-
- getmonitorheightfromguiobject(g: GuiObject): number {
- return unimplementedWarning("getmonitorheightfromguiobject");
- }
-
- getmonitorleft(): number {
- return unimplementedWarning("getmonitorleft");
- }
-
- getmonitorleftfromguiobject(g: GuiObject): number {
- return unimplementedWarning("getmonitorleftfromguiobject");
- }
-
- getmonitorleftfrompoint(x: number, y: number): number {
- return unimplementedWarning("getmonitorleftfrompoint");
- }
-
- getmonitortop(): number {
- return unimplementedWarning("getmonitortop");
- }
-
- getmonitortopfromguiobject(g: GuiObject): number {
- return unimplementedWarning("getmonitortopfromguiobject");
- }
-
- getmonitortopfrompoint(x: number, y: number): number {
- return unimplementedWarning("getmonitortopfrompoint");
- }
-
- getviewportleftfromguiobject(g: GuiObject): number {
- return unimplementedWarning("getviewportleftfromguiobject");
- }
-
- getviewporttopfromguiobject(g: GuiObject): number {
- return unimplementedWarning("getviewporttopfromguiobject");
- }
-
- navigateurlbrowser(url: string): void {
- return unimplementedWarning("navigateurlbrowser");
- }
-
- onopenurl(url: string): boolean {
- return unimplementedWarning("onopenurl");
- }
-
- translate(str: string): string {
- return unimplementedWarning("translate");
- }
-
- getstring(table: string, id: number): string {
- return unimplementedWarning("getstring");
- }
-
- getlanguageid(): string {
- return unimplementedWarning("getlanguageid");
- }
-
- selectfolder(
- wnd_title: string,
- wnd_info: string,
- default_path: string
- ): string {
- return unimplementedWarning("selectfolder");
- }
-
- hasvideosupport(): number {
- return unimplementedWarning("hasvideosupport");
- }
-
- clearplaylist(): void {
- return unimplementedWarning("clearplaylist");
- }
-
- getsonginfotexttranslated(): string {
- return unimplementedWarning("getsonginfotexttranslated");
- }
-
- iswa2componentvisible(guid: string): number {
- return unimplementedWarning("iswa2componentvisible");
- }
-
- hidewa2component(guid: string): void {
- return unimplementedWarning("hidewa2component");
- }
-
- isproversion(): boolean {
- return unimplementedWarning("isproversion");
- }
-
- getwinampversion(): string {
- return unimplementedWarning("getwinampversion");
- }
-
- getbuildnumber(): number {
- return unimplementedWarning("getbuildnumber");
- }
-
- getfilesize(fullfilename: string): number {
- return unimplementedWarning("getfilesize");
- }
-}
-
-export default System;
diff --git a/packages/webamp-modern/src/runtime/TabSheet.ts b/packages/webamp-modern/src/runtime/TabSheet.ts
deleted file mode 100644
index 9234fe5c..00000000
--- a/packages/webamp-modern/src/runtime/TabSheet.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class TabSheet extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "TabSheet";
- }
-
- getcurpage(): number {
- return unimplementedWarning("getcurpage");
- }
-
- setcurpage(a: number): void {
- return unimplementedWarning("setcurpage");
- }
-}
-
-export default TabSheet;
diff --git a/packages/webamp-modern/src/runtime/Text.ts b/packages/webamp-modern/src/runtime/Text.ts
deleted file mode 100644
index 78278abf..00000000
--- a/packages/webamp-modern/src/runtime/Text.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class Text extends GuiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Text";
- }
-
- setalternatetext(txt: string): void {
- unimplementedWarning("setalternatetext");
- }
-
- settext(txt: string): void {
- return unimplementedWarning("settext");
- }
-
- gettext(): string {
- unimplementedWarning("gettext");
- return "";
- }
-
- gettextwidth(): number {
- return unimplementedWarning("gettextwidth");
- }
-
- ontextchanged(newtxt: string): void {
- this.js_trigger("onTextChanged", newtxt);
- }
-}
-
-export default Text;
diff --git a/packages/webamp-modern/src/runtime/Timer.ts b/packages/webamp-modern/src/runtime/Timer.ts
deleted file mode 100644
index 970e2cae..00000000
--- a/packages/webamp-modern/src/runtime/Timer.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-import MakiObject from "./MakiObject";
-import { unimplementedWarning } from "../utils";
-import { XmlNode } from "../types";
-
-class Timer extends MakiObject {
- _speed: number;
- _animationStartTime: number;
- _animationCancelID: number | null;
-
- constructor(node: XmlNode, parent: MakiObject, annotations: Object = {}) {
- super(node, parent, annotations);
-
- this._speed = 200;
- this._animationStartTime = 0;
- this._animationCancelID = null;
- }
-
- _animationLoop(): void {
- this._animationCancelID = window.requestAnimationFrame((currentTime) => {
- if (currentTime > this._animationStartTime + this._speed) {
- this._animationStartTime = currentTime;
- this.ontimer();
- }
- this._animationLoop();
- });
- }
-
- js_delete() {
- if (this._animationCancelID != null) {
- window.cancelAnimationFrame(this._animationCancelID);
- }
- super.js_delete();
- }
-
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Timer";
- }
-
- setdelay(millisec: number): void {
- this._speed = millisec;
- }
-
- start(): void {
- this._animationStartTime = window.performance.now();
- this._animationLoop();
- }
-
- stop(): void {
- if (this._animationCancelID == null) {
- return;
- }
-
- window.cancelAnimationFrame(this._animationCancelID);
- this._animationCancelID = null;
- }
-
- ontimer(): void {
- this.js_trigger("onTimer");
- }
-
- getdelay(): number {
- return this._speed;
- }
-
- isrunning(): boolean {
- return this._animationCancelID != null;
- }
-
- getskipped(): number {
- return unimplementedWarning("getskipped");
- }
-}
-
-export default Timer;
diff --git a/packages/webamp-modern/src/runtime/Title.ts b/packages/webamp-modern/src/runtime/Title.ts
deleted file mode 100644
index 547a7ac8..00000000
--- a/packages/webamp-modern/src/runtime/Title.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import GuiObject from "./GuiObject";
-
-class Title extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Title";
- }
-}
-
-export default Title;
diff --git a/packages/webamp-modern/src/runtime/ToggleButton.ts b/packages/webamp-modern/src/runtime/ToggleButton.ts
deleted file mode 100644
index 539f2804..00000000
--- a/packages/webamp-modern/src/runtime/ToggleButton.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import Button from "./Button";
-import { unimplementedWarning } from "../utils";
-
-class ToggleButton extends Button {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "ToggleButton";
- }
-
- ontoggle(onnoff: boolean): void {
- this.js_trigger("onToggle", onnoff);
- }
-
- getcurcfgval(): number {
- return unimplementedWarning("getcurcfgval");
- }
-}
-
-export default ToggleButton;
diff --git a/packages/webamp-modern/src/runtime/TreeItem.ts b/packages/webamp-modern/src/runtime/TreeItem.ts
deleted file mode 100644
index 7b890ff3..00000000
--- a/packages/webamp-modern/src/runtime/TreeItem.ts
+++ /dev/null
@@ -1,156 +0,0 @@
-import MakiObject from "./MakiObject";
-import { unimplementedWarning } from "../utils";
-
-class TreeItem extends MakiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "TreeItem";
- }
-
- getnumchildren(): number {
- return unimplementedWarning("getnumchildren");
- }
-
- setlabel(label: string): void {
- return unimplementedWarning("setlabel");
- }
-
- getlabel(): string {
- return unimplementedWarning("getlabel");
- }
-
- ensurevisible(): void {
- return unimplementedWarning("ensurevisible");
- }
-
- getnthchild(nth: number) {
- return unimplementedWarning("getnthchild");
- }
-
- getchild() {
- return unimplementedWarning("getchild");
- }
-
- getchildsibling(_item: TreeItem) {
- return unimplementedWarning("getchildsibling");
- }
-
- getsibling() {
- return unimplementedWarning("getsibling");
- }
-
- getparent() {
- return unimplementedWarning("getparent");
- }
-
- editlabel(): void {
- return unimplementedWarning("editlabel");
- }
-
- hassubitems(): number {
- return unimplementedWarning("hassubitems");
- }
-
- setsorted(issorted: number): void {
- return unimplementedWarning("setsorted");
- }
-
- setchildtab(haschildtab: number): void {
- return unimplementedWarning("setchildtab");
- }
-
- issorted(): number {
- return unimplementedWarning("issorted");
- }
-
- iscollapsed(): number {
- return unimplementedWarning("iscollapsed");
- }
-
- isexpanded(): number {
- return unimplementedWarning("isexpanded");
- }
-
- invalidate(): void {
- return unimplementedWarning("invalidate");
- }
-
- isselected(): number {
- return unimplementedWarning("isselected");
- }
-
- ishilited(): number {
- return unimplementedWarning("ishilited");
- }
-
- sethilited(ishilited: number): void {
- return unimplementedWarning("sethilited");
- }
-
- collapse(): number {
- return unimplementedWarning("collapse");
- }
-
- expand(): number {
- return unimplementedWarning("expand");
- }
-
- gettree() {
- return unimplementedWarning("gettree");
- }
-
- ontreeadd(): void {
- this.js_trigger("onTreeAdd");
- }
-
- ontreeremove(): void {
- this.js_trigger("onTreeRemove");
- }
-
- onselect(): void {
- this.js_trigger("onSelect");
- }
-
- ondeselect(): void {
- this.js_trigger("onDeselect");
- }
-
- onleftdoubleclick(): void {
- this.js_trigger("onLeftDoubleClick");
- }
-
- onrightdoubleclick(): void {
- this.js_trigger("onRightDoubleClick");
- }
-
- onchar(key: number): void {
- this.js_trigger("onChar", key);
- }
-
- onexpand(): void {
- this.js_trigger("onExpand");
- }
-
- oncollapse(): void {
- this.js_trigger("onCollapse");
- }
-
- onbeginlabeledit(): void {
- this.js_trigger("onBeginLabelEdit");
- }
-
- onendlabeledit(newlabel: string): void {
- this.js_trigger("onEndLabelEdit", newlabel);
- }
-
- oncontextmenu(x: number, y: number): void {
- this.js_trigger("onContextMenu", x, y);
- }
-}
-
-export default TreeItem;
diff --git a/packages/webamp-modern/src/runtime/Vis.ts b/packages/webamp-modern/src/runtime/Vis.ts
deleted file mode 100644
index b8910e17..00000000
--- a/packages/webamp-modern/src/runtime/Vis.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-
-class Vis extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Vis";
- }
-
- setmode(mode: number): void {
- unimplementedWarning("setmode");
- }
-
- onframe(): void {
- this.js_trigger("onFrame");
- }
-
- setrealtime(onoff: boolean): void {
- return unimplementedWarning("setrealtime");
- }
-
- getrealtime(): boolean {
- return unimplementedWarning("getrealtime");
- }
-
- getmode(): number {
- return unimplementedWarning("getmode");
- }
-
- nextmode(): void {
- return unimplementedWarning("nextmode");
- }
-}
-
-export default Vis;
diff --git a/packages/webamp-modern/src/runtime/Wac.ts b/packages/webamp-modern/src/runtime/Wac.ts
deleted file mode 100644
index 882ac95b..00000000
--- a/packages/webamp-modern/src/runtime/Wac.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import MakiObject from "./MakiObject";
-import { unimplementedWarning } from "../utils";
-
-class Wac extends MakiObject {
- /**
- * getclassname()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "Wac";
- }
-
- getguid(): string {
- return unimplementedWarning("getguid");
- }
-
- getname(): string {
- return unimplementedWarning("getname");
- }
-
- sendcommand(
- cmd: string,
- param1: number,
- param2: number,
- param3: string
- ): number {
- return unimplementedWarning("sendcommand");
- }
-
- show(): void {
- return unimplementedWarning("show");
- }
-
- hide(): void {
- return unimplementedWarning("hide");
- }
-
- isvisible(): boolean {
- return unimplementedWarning("isvisible");
- }
-
- onnotify(command: string, param: string, a: number, b: number): number {
- this.js_trigger("onNotify", command, param, a, b);
- return unimplementedWarning("onnotify");
- }
-
- onshow(): void {
- this.js_trigger("onShow");
- }
-
- onhide(): void {
- this.js_trigger("onHide");
- }
-
- setstatusbar(onoff: boolean): void {
- return unimplementedWarning("setstatusbar");
- }
-
- getstatusbar(): boolean {
- return unimplementedWarning("getstatusbar");
- }
-}
-
-export default Wac;
diff --git a/packages/webamp-modern/src/runtime/WindowHolder.ts b/packages/webamp-modern/src/runtime/WindowHolder.ts
deleted file mode 100644
index f3f89575..00000000
--- a/packages/webamp-modern/src/runtime/WindowHolder.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import GuiObject from "./GuiObject";
-import { unimplementedWarning } from "../utils";
-import Wac from "./Wac";
-import MakiMap from "./MakiMap";
-import Region from "./Region";
-
-class WindowHolder extends GuiObject {
- /**
- * getClassName()
- *
- * Returns the class name for the object.
- * @ret The class name.
- */
- getclassname() {
- return "WindowHolder";
- }
-
- ongetwac(wacobj: Wac): void {
- this.js_trigger("onGetWac", wacobj);
- }
-
- ongiveupwac(wacobj: Wac): void {
- this.js_trigger("onGiveUpWac", wacobj);
- }
-
- getguid(): string {
- return unimplementedWarning("getguid");
- }
-
- getwac() {
- return unimplementedWarning("getwac");
- }
-
- setregionfrommap(
- regionmap: MakiMap,
- threshold: number,
- reverse: boolean
- ): void {
- return unimplementedWarning("setregionfrommap");
- }
-
- setregion(reg: Region): void {
- return unimplementedWarning("setregion");
- }
-
- setacceptwac(onoff: boolean): void {
- return unimplementedWarning("setacceptwac");
- }
-
- getcontent() {
- return unimplementedWarning("getcontent");
- }
-
- getcomponentname(): string {
- return unimplementedWarning("getcomponentname");
- }
-}
-
-export default WindowHolder;
diff --git a/packages/webamp-modern/src/runtime/index.ts b/packages/webamp-modern/src/runtime/index.ts
deleted file mode 100644
index 635a1939..00000000
--- a/packages/webamp-modern/src/runtime/index.ts
+++ /dev/null
@@ -1,114 +0,0 @@
-import System from "./System";
-import Button from "./Button";
-import ToggleButton from "./ToggleButton";
-import Group from "./Group";
-import Layout from "./Layout";
-import Layer from "./Layer";
-import PopupMenu from "./PopupMenu";
-import List from "./List";
-import Status from "./Status";
-import Text from "./Text";
-import Container from "./Container";
-import GuiObject from "./GuiObject";
-import MakiObject from "./MakiObject";
-import Wac from "./Wac";
-import MakiMap from "./MakiMap";
-import Region from "./Region";
-import Timer from "./Timer";
-import AnimatedLayer from "./AnimatedLayer";
-import WindowHolder from "./WindowHolder";
-import ComponentBucket from "./ComponentBucket";
-import Edit from "./Edit";
-import Slider from "./Slider";
-import Vis from "./Vis";
-import Browser from "./Browser";
-import EqVis from "./EqVis";
-import Title from "./Title";
-import GroupList from "./GroupList";
-import CfgGroup from "./CfgGroup";
-import QueryList from "./QueryList";
-import MouseRedir from "./MouseRedir";
-import DropDownList from "./DropDownList";
-import LayoutStatus from "./LayoutStatus";
-import TabSheet from "./TabSheet";
-import GuiList from "./GuiList";
-import GuiTree from "./GuiTree";
-import TreeItem from "./TreeItem";
-import MenuButton from "./MenuButton";
-import CheckBox from "./CheckBox";
-import Config from "./Config";
-import ConfigItem from "./ConfigItem";
-import ConfigAttribute from "./ConfigAttribute";
-import PlDir from "./PlDir";
-import FeedWatcher from "./FeedWatcher";
-import Form from "./Form";
-import PlEdit from "./PlEdit";
-import Frame from "./Frame";
-import Menu from "./Menu";
-import BitList from "./BitList";
-import AlbumArtLayer from "./AlbumArtLayer";
-
-const runtime = {
- "516549714a510d87b5a6e391e7f33532": MakiObject,
- d6f50f6449b793fa66baf193983eaeef: System,
- "00c074a049a0fea2bbfa8dbe401616db": Wac,
- "3860366542a7461b3fd875aa73bf6766": MakiMap,
- "3a370c02439f3cbf8886f184361ecf5b": Region,
- "5d0c5bb64b1f7de1168d0fa741199459": Timer,
- "45be95e5419120725fbb5c93fd17f1f9": Group,
- "4ee3e1994becc636bc78cd97b028869c": GuiObject,
- "698eddcd4fec8f1e44f9129b45ff09f9": Button,
- "6b64cd274c4b5a26a7e6598c3a49f60c": AnimatedLayer,
- b4dccfff4bcc81fe0f721b96ff0fbed5: ToggleButton,
- f4787af44ef7b2bb4be7fb9c8da8bea9: PopupMenu,
- e90dc47b4ae7840d0b042cb0fcf775d2: Container,
- "60906d4e482e537e94cc04b072568861": Layout,
- b2023ab54ba1434d6359aebec6f30375: List,
- "5ab9fa1545579a7d5765c8aba97cc6a6": Layer,
- "0f08c9404b23af39c4b8f38059bb7e8f": Status,
- efaa867241fa310ea985dcb74bcb5b52: Text,
- "403abcc04bd66f22c810a48b47259329": WindowHolder,
- "97aa3e4d4fa8f4d0f20a7b818349452a": ComponentBucket,
- "64e4bbfa49d981f45ba8c0b0fdbcc32e": Edit,
- "62b65e3f408d375e8176ea8d771bb94a": Slider,
- ce4f97be4e1977b098d45699276cc933: Vis,
- a8c2200d4b2a51eb4b5d7fba714c5dc6: Browser,
- "8d1eba38483e489e1f8d60b905c4c543": EqVis,
- "7dfd32444e7c3751ae8240bf33dc3a5f": Title,
- "01e28ce111d5b059dee49f970a76516f": GroupList,
- "80f0f8bd42a61ba5363293a04a8d0ca0": CfgGroup,
- cdcb785d425381f2b861058ffa3c2872: QueryList,
- "9b2e341b40fa6c981b0c858b0594e86e": MouseRedir,
- "36d59b714af803fd020595977a26dbb7": DropDownList,
- "7fd5f21048dfacc45154a0a676dc6c57": LayoutStatus,
- b5baa5354dcb05b318e6c1ad96688fd2: TabSheet,
- "6129fec14d51dab7ca016591db701b0c": GuiList,
- d59514f745e8ed364e3f0f98d92c52a0: GuiTree,
- "9b3b4b82420e667a4179fc8f029c8015": TreeItem,
- "1d8631c8479280d05dbd989f3691b436": MenuButton,
- c7ed319947985319b1606398aa8c295a: CheckBox,
- "593dba224976d07771f452b90b405536": Config,
- d40302824d873aab32128d87d5fcad6f: ConfigItem,
- "24dec2834a36b76e249ecc8c736c6bc4": ConfigAttribute,
- "61a7abad41f67d7980e1d0b1f4a40386": PlDir,
- a5376fa1411a4e94ec05f6830a5fea5e: FeedWatcher,
- "2d2d13764cb9be0ae6570cbcf599c9e4": Form,
- e2bbc14d417384f6ebb2b3bd5055662f: Frame,
- "345beebc49210229b66cbe90d9799aa4": PlEdit,
- "6dcb05e448c28ac4f04993b14af50e91": AlbumArtLayer,
- "87c6577849fee743cc09f98556fd2a53": BitList,
- "73c00594401b961f24671b9b6541ac27": Menu,
- /*
- // https://github.com/captbaritone/webamp/pull/933#issuecomment-535690208
-
- a5376fa1411a4e94ec05f6830a5fea5e: FeedWatcher,
- aee235ff498febd1e0d7af961a54d4da: ColorMgr,
- b8e867b04da72715db53baa5acfefca1: Application,
- f857beca41f18e197e093e97039f6439: CoreAdmin,
- 2825a91b4245d4885970f1aa7b4388cf: Core,
- 836f8b2e4db4e0d10a0d7f93d1dcc804: File,
-
- */
-};
-
-export default runtime;
diff --git a/packages/webamp-modern-2/src/skin/AudioPlayer.ts b/packages/webamp-modern/src/skin/AudioPlayer.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/AudioPlayer.ts
rename to packages/webamp-modern/src/skin/AudioPlayer.ts
diff --git a/packages/webamp-modern-2/src/skin/Bitmap.ts b/packages/webamp-modern/src/skin/Bitmap.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/Bitmap.ts
rename to packages/webamp-modern/src/skin/Bitmap.ts
diff --git a/packages/webamp-modern-2/src/skin/BitmapFont.ts b/packages/webamp-modern/src/skin/BitmapFont.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/BitmapFont.ts
rename to packages/webamp-modern/src/skin/BitmapFont.ts
diff --git a/packages/webamp-modern-2/src/skin/Clippath.ts b/packages/webamp-modern/src/skin/Clippath.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/Clippath.ts
rename to packages/webamp-modern/src/skin/Clippath.ts
diff --git a/packages/webamp-modern-2/src/skin/Color.ts b/packages/webamp-modern/src/skin/Color.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/Color.ts
rename to packages/webamp-modern/src/skin/Color.ts
diff --git a/packages/webamp-modern-2/src/skin/ColorThemesList.ts b/packages/webamp-modern/src/skin/ColorThemesList.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/ColorThemesList.ts
rename to packages/webamp-modern/src/skin/ColorThemesList.ts
diff --git a/packages/webamp-modern-2/src/skin/Cursor.ts b/packages/webamp-modern/src/skin/Cursor.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/Cursor.ts
rename to packages/webamp-modern/src/skin/Cursor.ts
diff --git a/packages/webamp-modern-2/src/skin/GammaGroup.ts b/packages/webamp-modern/src/skin/GammaGroup.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/GammaGroup.ts
rename to packages/webamp-modern/src/skin/GammaGroup.ts
diff --git a/packages/webamp-modern-2/src/skin/GammaWebGL.ts b/packages/webamp-modern/src/skin/GammaWebGL.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/GammaWebGL.ts
rename to packages/webamp-modern/src/skin/GammaWebGL.ts
diff --git a/packages/webamp-modern-2/src/skin/ImageManager.ts b/packages/webamp-modern/src/skin/ImageManager.ts
similarity index 97%
rename from packages/webamp-modern-2/src/skin/ImageManager.ts
rename to packages/webamp-modern/src/skin/ImageManager.ts
index 7d3f1ea7..0daf3b9e 100644
--- a/packages/webamp-modern-2/src/skin/ImageManager.ts
+++ b/packages/webamp-modern/src/skin/ImageManager.ts
@@ -25,6 +25,10 @@ export default class ImageManager {
return this._urlCache.get(filePath);
}
+ getCachedUrl(filePath: string): string {
+ return this._urlCache.get(filePath);
+ }
+
addBitmap(bitmap: Bitmap) {
const id = bitmap.getId();
const filePath = bitmap.getFile();
diff --git a/packages/webamp-modern-2/src/skin/PrivateConfig.ts b/packages/webamp-modern/src/skin/PrivateConfig.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/PrivateConfig.ts
rename to packages/webamp-modern/src/skin/PrivateConfig.ts
diff --git a/packages/webamp-modern-2/src/skin/TrueTypeFont.ts b/packages/webamp-modern/src/skin/TrueTypeFont.ts
similarity index 76%
rename from packages/webamp-modern-2/src/skin/TrueTypeFont.ts
rename to packages/webamp-modern/src/skin/TrueTypeFont.ts
index 63dcccbe..e7244a84 100644
--- a/packages/webamp-modern-2/src/skin/TrueTypeFont.ts
+++ b/packages/webamp-modern/src/skin/TrueTypeFont.ts
@@ -6,6 +6,7 @@ export default class TrueTypeFont {
_id: string;
_fontFace: FontFace;
_inlineFamily: string;
+ _imageManager: ImageManager;
setXmlAttributes(attributes: { [attrName: string]: string }) {
for (const [key, value] of Object.entries(attributes)) {
@@ -20,8 +21,10 @@ export default class TrueTypeFont {
break;
case "family":
this._inlineFamily = value;
+ break;
case "file":
this._file = value;
+ break;
default:
return false;
}
@@ -33,19 +36,30 @@ export default class TrueTypeFont {
}
getFontFamily() {
- return this._inlineFamily || this._fontFace.family;
+ return `'${this._inlineFamily || this._fontFace.family || this.getId()}'`;
}
dispose() {
document.fonts.delete(this._fontFace);
}
+ getBase64() {
+ console.log("getting Base64. me:", this.getId());
+ return this._imageManager.getCachedUrl(this._file);
+ }
+
+ // dummy ttf has no url, such as Arial
+ hasUrl(): boolean {
+ return this._imageManager != null;
+ }
+
// Ensure we've loaded the font into our asset loader.
async ensureFontLoaded(imageManager: ImageManager) {
Utils.assert(
this._fontFace == null,
"Tried to ensure a TrueTypeFont was laoded more than once."
);
+ this._imageManager = imageManager;
const fontUrl = await imageManager.getUrl(this._file);
const sanitizedFile = this._file.replace(/\./, "_");
diff --git a/packages/webamp-modern-2/src/skin/VM.ts b/packages/webamp-modern/src/skin/VM.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/VM.ts
rename to packages/webamp-modern/src/skin/VM.ts
diff --git a/packages/webamp-modern-2/src/skin/XmlObj.ts b/packages/webamp-modern/src/skin/XmlObj.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/XmlObj.ts
rename to packages/webamp-modern/src/skin/XmlObj.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/AlbumArt.ts b/packages/webamp-modern/src/skin/makiClasses/AlbumArt.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/AlbumArt.ts
rename to packages/webamp-modern/src/skin/makiClasses/AlbumArt.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/AnimatedLayer.ts b/packages/webamp-modern/src/skin/makiClasses/AnimatedLayer.ts
similarity index 94%
rename from packages/webamp-modern-2/src/skin/makiClasses/AnimatedLayer.ts
rename to packages/webamp-modern/src/skin/makiClasses/AnimatedLayer.ts
index c75f14b2..106268df 100644
--- a/packages/webamp-modern-2/src/skin/makiClasses/AnimatedLayer.ts
+++ b/packages/webamp-modern/src/skin/makiClasses/AnimatedLayer.ts
@@ -1,5 +1,5 @@
import UI_ROOT from "../../UIRoot";
-import { ensureVmInt, px } from "../../utils";
+import { ensureVmInt, num, px } from "../../utils";
import Layer from "./Layer";
export default class AnimatedLayer extends Layer {
@@ -9,12 +9,17 @@ export default class AnimatedLayer extends Layer {
_endFrame: number = 0;
_speed: number = 0;
_animationInterval: NodeJS.Timeout | null = null;
+
setXmlAttr(_key: string, value: string): boolean {
const key = _key.toLowerCase();
if (super.setXmlAttr(key, value)) {
return true;
}
switch (key) {
+ case "frameheight":
+ this._height = num(value);
+ this._renderHeight();
+ break;
default:
return false;
}
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/BaseObject.ts b/packages/webamp-modern/src/skin/makiClasses/BaseObject.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/BaseObject.ts
rename to packages/webamp-modern/src/skin/makiClasses/BaseObject.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Button.ts b/packages/webamp-modern/src/skin/makiClasses/Button.ts
similarity index 98%
rename from packages/webamp-modern-2/src/skin/makiClasses/Button.ts
rename to packages/webamp-modern/src/skin/makiClasses/Button.ts
index 3776f2ee..e8f9a164 100644
--- a/packages/webamp-modern-2/src/skin/makiClasses/Button.ts
+++ b/packages/webamp-modern/src/skin/makiClasses/Button.ts
@@ -107,6 +107,10 @@ export default class Button extends GuiObj {
}
}
+ setactivatednocallback(onoff: boolean){
+ //TODO:
+ }
+
leftclick() {
this.onLeftClick();
if (this._action && this._actionTarget) {
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/ComponentBucket.ts b/packages/webamp-modern/src/skin/makiClasses/ComponentBucket.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/ComponentBucket.ts
rename to packages/webamp-modern/src/skin/makiClasses/ComponentBucket.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Config.ts b/packages/webamp-modern/src/skin/makiClasses/Config.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/Config.ts
rename to packages/webamp-modern/src/skin/makiClasses/Config.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/ConfigAttribute.ts b/packages/webamp-modern/src/skin/makiClasses/ConfigAttribute.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/ConfigAttribute.ts
rename to packages/webamp-modern/src/skin/makiClasses/ConfigAttribute.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/ConfigItem.ts b/packages/webamp-modern/src/skin/makiClasses/ConfigItem.ts
similarity index 54%
rename from packages/webamp-modern-2/src/skin/makiClasses/ConfigItem.ts
rename to packages/webamp-modern/src/skin/makiClasses/ConfigItem.ts
index d4a7fe54..f2dfdd8f 100644
--- a/packages/webamp-modern-2/src/skin/makiClasses/ConfigItem.ts
+++ b/packages/webamp-modern/src/skin/makiClasses/ConfigItem.ts
@@ -1,18 +1,10 @@
import XmlObj from "../XmlObj";
import ConfigAttribute from "./ConfigAttribute";
-
export default class ConfigItem {
static GUID = "d40302824d873aab32128d87d5fcad6f";
- _name : string;
- _items : {[key:string]: ConfigAttribute} = {};
-
-// constructor(name:string) {
- // constructor() {
- // super();
- // this._name = name;
- // this._items = {};
- // }
+ _name: string;
+ _items: { [key: string]: ConfigAttribute } = {};
newattribute(name: string, defaultValue: string): ConfigAttribute {
const cfg = new ConfigAttribute(name, defaultValue);
@@ -20,4 +12,12 @@ export default class ConfigItem {
// this._items[name] = cfg;
return cfg;
}
+
+ getattribute(att_name: string): ConfigAttribute {
+ // sample:
+ // ConfigItem ciMisc;
+ // ciMisc = Config.getItem("Options");
+ // configAttribute_system_repeatType = ciMisc.getAttribute("repeat");
+ return new ConfigAttribute(att_name, "1");
+ }
}
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Container.ts b/packages/webamp-modern/src/skin/makiClasses/Container.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/Container.ts
rename to packages/webamp-modern/src/skin/makiClasses/Container.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Grid.ts b/packages/webamp-modern/src/skin/makiClasses/Grid.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/Grid.ts
rename to packages/webamp-modern/src/skin/makiClasses/Grid.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Group.ts b/packages/webamp-modern/src/skin/makiClasses/Group.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/Group.ts
rename to packages/webamp-modern/src/skin/makiClasses/Group.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/GroupXFade.ts b/packages/webamp-modern/src/skin/makiClasses/GroupXFade.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/GroupXFade.ts
rename to packages/webamp-modern/src/skin/makiClasses/GroupXFade.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/GuiObj.ts b/packages/webamp-modern/src/skin/makiClasses/GuiObj.ts
similarity index 99%
rename from packages/webamp-modern-2/src/skin/makiClasses/GuiObj.ts
rename to packages/webamp-modern/src/skin/makiClasses/GuiObj.ts
index 360e0e4d..5b34f458 100644
--- a/packages/webamp-modern-2/src/skin/makiClasses/GuiObj.ts
+++ b/packages/webamp-modern/src/skin/makiClasses/GuiObj.ts
@@ -12,6 +12,7 @@ import Bitmap from "../Bitmap";
import Group from "./Group";
import XmlObj from "../XmlObj";
import Layout from "./Layout";
+import Region from "./Region";
let BRING_LEAST: number = -1;
let BRING_MOST_TOP: number = 1;
@@ -411,6 +412,10 @@ export default class GuiObj extends XmlObj {
return this._div.matches(":focus");
}
+ setregion(reg: Region){
+ //TODO:
+ }
+
/**
* Hookable. Event happens when the left mouse
* button was previously down and is now up.
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Layer.ts b/packages/webamp-modern/src/skin/makiClasses/Layer.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/Layer.ts
rename to packages/webamp-modern/src/skin/makiClasses/Layer.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Layout.ts b/packages/webamp-modern/src/skin/makiClasses/Layout.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/Layout.ts
rename to packages/webamp-modern/src/skin/makiClasses/Layout.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/LayoutStatus.ts b/packages/webamp-modern/src/skin/makiClasses/LayoutStatus.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/LayoutStatus.ts
rename to packages/webamp-modern/src/skin/makiClasses/LayoutStatus.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/MakiMap.ts b/packages/webamp-modern/src/skin/makiClasses/MakiMap.ts
similarity index 99%
rename from packages/webamp-modern-2/src/skin/makiClasses/MakiMap.ts
rename to packages/webamp-modern/src/skin/makiClasses/MakiMap.ts
index f21c167e..c36726d9 100644
--- a/packages/webamp-modern-2/src/skin/makiClasses/MakiMap.ts
+++ b/packages/webamp-modern/src/skin/makiClasses/MakiMap.ts
@@ -6,6 +6,7 @@ import Bitmap from "../Bitmap";
export default class MakiMap extends BaseObject {
static GUID = "3860366542a7461b3fd875aa73bf6766";
_bitmap: Bitmap;
+
loadmap(bitmapId: string) {
this._bitmap = UI_ROOT.getBitmap(bitmapId);
}
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/MapObj.ts b/packages/webamp-modern/src/skin/makiClasses/MapObj.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/MapObj.ts
rename to packages/webamp-modern/src/skin/makiClasses/MapObj.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Movable.ts b/packages/webamp-modern/src/skin/makiClasses/Movable.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/Movable.ts
rename to packages/webamp-modern/src/skin/makiClasses/Movable.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/PopupMenu.ts b/packages/webamp-modern/src/skin/makiClasses/PopupMenu.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/PopupMenu.ts
rename to packages/webamp-modern/src/skin/makiClasses/PopupMenu.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/ProgressGrid.ts b/packages/webamp-modern/src/skin/makiClasses/ProgressGrid.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/ProgressGrid.ts
rename to packages/webamp-modern/src/skin/makiClasses/ProgressGrid.ts
diff --git a/packages/webamp-modern/src/skin/makiClasses/Region.ts b/packages/webamp-modern/src/skin/makiClasses/Region.ts
new file mode 100644
index 00000000..0d4f1b5f
--- /dev/null
+++ b/packages/webamp-modern/src/skin/makiClasses/Region.ts
@@ -0,0 +1,10 @@
+import MakiMap from "./MakiMap";
+
+export default class Region {
+ static GUID = "3a370c02439f3cbf8886f184361ecf5b";
+
+ loadfrommap(regionmap: MakiMap, threshold: number, reversed:boolean){
+ // TODO:
+ }
+
+}
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Slider.ts b/packages/webamp-modern/src/skin/makiClasses/Slider.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/Slider.ts
rename to packages/webamp-modern/src/skin/makiClasses/Slider.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Status.ts b/packages/webamp-modern/src/skin/makiClasses/Status.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/Status.ts
rename to packages/webamp-modern/src/skin/makiClasses/Status.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/SystemObject.ts b/packages/webamp-modern/src/skin/makiClasses/SystemObject.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/SystemObject.ts
rename to packages/webamp-modern/src/skin/makiClasses/SystemObject.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Text.ts b/packages/webamp-modern/src/skin/makiClasses/Text.ts
similarity index 99%
rename from packages/webamp-modern-2/src/skin/makiClasses/Text.ts
rename to packages/webamp-modern/src/skin/makiClasses/Text.ts
index 0f0fc539..d13e8c33 100644
--- a/packages/webamp-modern-2/src/skin/makiClasses/Text.ts
+++ b/packages/webamp-modern/src/skin/makiClasses/Text.ts
@@ -93,6 +93,7 @@ export default class Text extends GuiObj {
case "color":
// (int[sic?]) The comma delimited RGB color of the text.
this._color = value;
+ this._prepareCss();
break;
case "ticker":
/// (bool) Setting this flag causes the object to scroll left and right if the text does not fit the rectangular area of the text object.
@@ -248,7 +249,7 @@ offsety - (int) Extra pixels to be added to or subtracted from the calculated x
//to speedup, we spit render. This is only rendering style
_prepareCss() {
- if (!this._font_obj) {
+ if (!this._font_obj && this._font_id) {
this._font_obj = UI_ROOT.getFont(this._font_id);
}
const font = this._font_obj;
@@ -267,7 +268,7 @@ offsety - (int) Extra pixels to be added to or subtracted from the calculated x
if (this._color) {
const color = UI_ROOT.getColor(this._color);
if (color) {
- this._div.style.color = `var(${color.getCSSVar()}, ${color.getRgb})`;
+ this._div.style.color = `var(${color.getCSSVar()}, ${color.getRgb()})`;
}
}
if (font instanceof TrueTypeFont) {
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Timer.ts b/packages/webamp-modern/src/skin/makiClasses/Timer.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/Timer.ts
rename to packages/webamp-modern/src/skin/makiClasses/Timer.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/ToggleButton.ts b/packages/webamp-modern/src/skin/makiClasses/ToggleButton.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/ToggleButton.ts
rename to packages/webamp-modern/src/skin/makiClasses/ToggleButton.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/Vis.ts b/packages/webamp-modern/src/skin/makiClasses/Vis.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/Vis.ts
rename to packages/webamp-modern/src/skin/makiClasses/Vis.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/WasabiButton.ts b/packages/webamp-modern/src/skin/makiClasses/WasabiButton.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/WasabiButton.ts
rename to packages/webamp-modern/src/skin/makiClasses/WasabiButton.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/WasabiFrame.ts b/packages/webamp-modern/src/skin/makiClasses/WasabiFrame.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/WasabiFrame.ts
rename to packages/webamp-modern/src/skin/makiClasses/WasabiFrame.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/WasabiTitle.ts b/packages/webamp-modern/src/skin/makiClasses/WasabiTitle.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/WasabiTitle.ts
rename to packages/webamp-modern/src/skin/makiClasses/WasabiTitle.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/WinampConfig.ts b/packages/webamp-modern/src/skin/makiClasses/WinampConfig.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/WinampConfig.ts
rename to packages/webamp-modern/src/skin/makiClasses/WinampConfig.ts
diff --git a/packages/webamp-modern-2/src/skin/makiClasses/WindowHolder.ts b/packages/webamp-modern/src/skin/makiClasses/WindowHolder.ts
similarity index 100%
rename from packages/webamp-modern-2/src/skin/makiClasses/WindowHolder.ts
rename to packages/webamp-modern/src/skin/makiClasses/WindowHolder.ts
diff --git a/packages/webamp-modern-2/src/skin/parse.ts b/packages/webamp-modern/src/skin/parse.ts
similarity index 99%
rename from packages/webamp-modern-2/src/skin/parse.ts
rename to packages/webamp-modern/src/skin/parse.ts
index 2896a720..37b55fa0 100644
--- a/packages/webamp-modern-2/src/skin/parse.ts
+++ b/packages/webamp-modern/src/skin/parse.ts
@@ -51,6 +51,7 @@ const ResourcesTag = [
"color",
"bitmap",
"bitmapfont",
+ "truetypefont",
"skininfo",
"accelerators",
// other resource not listed here are also parsed/loaded first in RESOURCE_PHASE (eg script)
@@ -786,7 +787,7 @@ export default class SkinParser {
const current_dir = [...parent_dir, ...directories].join("/");
var self = this;
- function recursiveScanChildren(mother: XmlElement) {
+ const recursiveScanChildren = (mother: XmlElement) => {
var nonGroupDefs = [];
for (const element of mother.children) {
if (element instanceof XmlElement) {
diff --git a/packages/webamp-modern-2/src/skin/resolver.ts b/packages/webamp-modern/src/skin/resolver.ts
similarity index 97%
rename from packages/webamp-modern-2/src/skin/resolver.ts
rename to packages/webamp-modern/src/skin/resolver.ts
index 37b637da..ef36eb5f 100644
--- a/packages/webamp-modern-2/src/skin/resolver.ts
+++ b/packages/webamp-modern/src/skin/resolver.ts
@@ -22,6 +22,7 @@ import ConfigAttribute from "./makiClasses/ConfigAttribute";
import WinampConfig, { WinampConfigGroup } from "./makiClasses/WinampConfig";
import ComponentBucket from "./makiClasses/ComponentBucket";
import AlbumArt from "./makiClasses/AlbumArt";
+import Region from "./makiClasses/Region";
const CLASSES = [
@@ -29,6 +30,7 @@ const CLASSES = [
Config, ConfigItem, ConfigAttribute,
WinampConfig, WinampConfigGroup,
ComponentBucket,
+ Region,
AlbumArt,
Button,
SystemObject,
diff --git a/packages/webamp-modern/src/store.ts b/packages/webamp-modern/src/store.ts
deleted file mode 100644
index aa2e0fbc..00000000
--- a/packages/webamp-modern/src/store.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { ModernSkinState, ModernAction } from "./types";
-import { createStore, applyMiddleware, combineReducers } from "redux";
-import { composeWithDevTools } from "redux-devtools-extension";
-import thunk from "redux-thunk";
-
-const defaultState = {
- makiTree: null,
- volume: 127,
- rightVUMeter: 127,
- leftVUMeter: 127,
- xmlTree: null,
- skinLoaded: false,
-};
-
-function modernSkinReducer(
- state: ModernSkinState = defaultState,
- action: ModernAction
-): ModernSkinState {
- switch (action.type) {
- case "SET_MAKI_TREE":
- return { ...state, makiTree: action.makiTree, skinLoaded: true };
- case "SET_XML_TREE":
- return { ...state, xmlTree: action.xmlTree };
- case "SKIN_UNLOADED":
- return { ...state, xmlTree: null, makiTree: null, skinLoaded: false };
- case "SET_VOLUME":
- return { ...state, volume: action.volume };
- default:
- return state;
- }
-}
-
-const reducer = combineReducers({
- modernSkin: modernSkinReducer,
-});
-
-export function create() {
- return createStore(reducer, composeWithDevTools(applyMiddleware(thunk)));
-}
diff --git a/packages/webamp-modern-2/src/test.html b/packages/webamp-modern/src/test.html
similarity index 100%
rename from packages/webamp-modern-2/src/test.html
rename to packages/webamp-modern/src/test.html
diff --git a/packages/webamp-modern-2/src/tests.ts b/packages/webamp-modern/src/tests.ts
similarity index 100%
rename from packages/webamp-modern-2/src/tests.ts
rename to packages/webamp-modern/src/tests.ts
diff --git a/packages/webamp-modern/src/types.ts b/packages/webamp-modern/src/types.ts
deleted file mode 100644
index 4b59d0e5..00000000
--- a/packages/webamp-modern/src/types.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-// TODO: Type the state tree
-export type MakiTree = any;
-
-export type XmlNode = {
- children: XmlNode[];
- attributes: { [key: string]: string | undefined };
- name: string;
- uid: number; // TODO: They don't start with these. Do we need types for each stage?
-};
-
-// What is a tree, but a single root node?
-export type XmlTree = XmlNode;
-
-export type ModernSkinState = {
- makiTree: MakiTree | null;
- xmlTree: XmlTree | null;
- volume: number;
- rightVUMeter: number;
- leftVUMeter: number;
- skinLoaded: boolean;
-};
-
-export type ModernAppState = {
- modernSkin: ModernSkinState;
-};
-
-export type ModernAction =
- | { type: "SET_MAKI_TREE"; makiTree: MakiTree }
- | { type: "SET_XML_TREE"; xmlTree: XmlTree }
- | { type: "SKIN_UNLOADED" }
- | { type: "SET_VOLUME"; volume: number };
-
-export type ModernDispatch = (action: ModernAction | Thunk) => void;
-
-export type Thunk = (
- dispatch: ModernDispatch,
- getState: () => ModernAppState
-) => void;
-
-export type ModernStore = {
- getState(): ModernAppState;
- subscribe(cb: () => void): () => void;
- dispatch: ModernDispatch;
-};
diff --git a/packages/webamp-modern/src/utils.ts b/packages/webamp-modern/src/utils.ts
index 3e9738df..86895da0 100644
--- a/packages/webamp-modern/src/utils.ts
+++ b/packages/webamp-modern/src/utils.ts
@@ -1,455 +1,160 @@
-import JSZip from "jszip";
-import { xml2js } from "xml-js";
-import { XmlNode } from "./types";
-import MakiObject from "./runtime/MakiObject";
-import GuiObject from "./runtime/GuiObject";
+import JSZip, { JSZipObject } from "jszip";
-let nextId = 0;
+export function assert(condition: boolean, message: string) {
+ if (!condition) {
+ throw new Error(message);
+ }
+}
+
+// While developing I want to clarify some assumptions. These are things which
+// don't need to break the world, but I would like to know if/when my
+// assumptions are invalidated.
+// In the future these can be turned into warnings.
+export function assume(condition: boolean, message: string) {
+ if (!condition) {
+ console.warn(message);
+ }
+ return condition;
+}
+
+export function getCaseInsensitiveFile(
+ zip: JSZip,
+ filePath: string
+): JSZipObject | null {
+ const normalized = filePath.replace(/[\/\\]/g, `[/\\\\]`);
+ return zip.file(new RegExp(normalized, "i"))[0] ?? null;
+}
+
+export function num(str: string | void): number | null {
+ return str == null ? null : Number(str);
+}
+
+export function px(size: number): string {
+ return `${size}px`;
+}
+
+export function relative(size: number): string {
+ if (size === 0) return "100%";
+ return `calc(100% + ${size}px)`;
+}
+
+export function toBool(str: string) {
+ assert(
+ str === "0" || str === "1",
+ `Expected bool value to be "0" or "1", but it was "${str}".`
+ );
+ return str === "1";
+}
+
+let id = 0;
export function getId(): number {
- return nextId++;
+ return id++;
}
-// Breadth-first tree map
-// TODO: Type this so the return type is different than the initial type
-// NOTE: This does not apply the callback to the root node. It probably should,
-// but I'm too lazy to figure out how to write it.
-export function mapTreeBreadth(
- node: T,
- cb: (node: T, parent: T) => T
-): T {
- const children = node.children || [];
- const mappedChildren = children.map((child) => {
- const newChild = cb(child, node);
- return mapTreeBreadth(newChild, cb);
- });
- return { ...node, children: mappedChildren };
+// TODO: Delete this once we have proper type coersion in the VM.
+export function ensureVmInt(num: number): number {
+ return Math.floor(num);
}
-export function isPromise(obj: any): boolean {
- return obj && typeof obj.then === "function";
+export function clamp(num: number, min: number, max: number): number {
+ return Math.max(min, Math.min(num, max));
}
-export function isString(obj: any): boolean {
- return typeof obj === "string";
+export function normalizeDomId(id: string) {
+ return id.replace(/[^a-zA-Z0-9]/g, "-");
}
-export function isObject(obj: any): boolean {
- return obj === Object(obj);
-}
-
-// Convert windows filename slashes to forward slashes
-function fixFilenameSlashes(filename: string): string {
- return filename.replace(/\\/g, "/");
-}
-
-export function getCaseInsensitveFile(
- zip: JSZip,
- filename: string
-): JSZip.JSZipObject {
- // TODO: Escape `file` for rejex characters
- return zip.file(new RegExp(fixFilenameSlashes(filename), "i"))[0];
-}
-
-// Read a
-export async function readXml(
- zip: JSZip,
- filepath: string
-): Promise {
- const file = await getCaseInsensitveFile(zip, filepath);
- if (file == null) {
- return null;
+export function removeAllChildNodes(parent: Element) {
+ while (parent.firstChild) {
+ parent.removeChild(parent.firstChild);
}
- const text = await file.async("text");
- // @ts-ignore Due to the way it's config object interface works, xml2js is
- // bascially impossible to type. For example, you can specify what key to use
- // for `elements`. We choose `children` but the types assume the default
- // `elements`.
- return xml2js(text, { compact: false, elementsKey: "children" });
}
-export async function readUint8array(
- zip: JSZip,
- filepath: string
-): Promise {
- const file = await getCaseInsensitveFile(zip, filepath);
- if (file == null) {
- return null;
+export function integerToTime(seconds: number): string {
+ const mins = Math.floor(seconds / 60);
+ const secs = String(Math.round(seconds % 60)).padStart(2, "0");
+ return `${mins}:${secs}`;
+}
+
+export function findLast(
+ arr: T[],
+ predicate: (value: T) => boolean
+): T | undefined {
+ for (let i = arr.length - 1; i >= 0; i--) {
+ const value = arr[i];
+ if (predicate(value)) {
+ return value;
+ }
}
- return file.async("uint8array");
}
-// I any of the values in `arr` are themselves arrays, interpolate the nested
-// array into the top level array.
-function flatten(arr: Array): T[] {
- const newArr: T[] = [];
- arr.forEach((item) => {
- if (Array.isArray(item)) {
- newArr.push(...item);
+export function getUrlQuery(location: Location, variable: string): string {
+ return new URL(location.href).searchParams.get(variable);
+}
+
+export const throttle = (fn: Function, wait: number = 300) => {
+ let inThrottle: boolean,
+ lastFn: ReturnType,
+ lastTime: number;
+ return function (this: any) {
+ const context = this,
+ args = arguments;
+ if (!inThrottle) {
+ fn.apply(context, args);
+ lastTime = Date.now();
+ inThrottle = true;
} else {
- newArr.push(item);
- }
- });
- return newArr;
-}
-
-// Map an async function over an array. If the value returned from the mapper is
-// an array, it recursively maps the function over that array's values, and then
-// interpoates the resulting flat array into the top level array of results.
-export async function asyncFlatMap(
- arr: Array,
- mapper: (value: T) => Promise
-): Promise {
- const mapped = await Promise.all(arr.map(mapper));
- const childPromises = mapped.map(async (item) => {
- if (Array.isArray(item)) {
- return asyncFlatMap(item, mapper);
- }
- return item;
- });
- return flatten(await Promise.all(childPromises));
-}
-
-// Apply a mapper function to all nodes in a tree using `asyncFlatMap`. This
-// allows mapper to conditionally return either a single node, or an array of
-// nodes.
-//
-// The tree should have the form of objects nodes, each of which may
-// have a property `children` which is an array of nodes.
-//
-// Note: The root node will not be transformed by the mapper, since the mapper
-// could potentially return multiple nodes.
-export async function asyncTreeFlatMap(
- node: T,
- mapper: (node: T) => Promise
-): Promise {
- const { children } = node;
- if (children == null) {
- return node;
- }
-
- const mappedChildren = await asyncFlatMap(children, mapper);
-
- const recursedChildren = await Promise.all(
- mappedChildren.map((child) =>
- asyncTreeFlatMap(
- // @ts-ignore FixMe
- child,
- mapper
- )
- )
- );
-
- return { ...node, children: recursedChildren };
-}
-
-// Given an XML file and a zip which it came from, replace all `` elements
-// with the contents of the file to be included.
-export async function inlineIncludes(
- xml: XmlNode,
- zip: JSZip
-): Promise {
- return asyncTreeFlatMap(xml, async (node) => {
- if (node.name !== "include") {
- return node;
- }
- if (node.attributes.file == null) {
- return node;
- }
- // TODO: Normalize file names so that they hit the same cache
- const includedFile = await readXml(zip, node.attributes.file);
- if (includedFile == null) {
- console.warn(
- `Tried to include a file that could not be found: ${node.attributes.file}`
- );
- return [];
- }
- return includedFile.children;
- });
-}
-
-export function unimplementedWarning(name: string): any {
- console.warn(`Executing unimplemented MAKI function: ${name}`);
-}
-
-export function findParent(
- node: T,
- predicate: (node: T) => boolean
-): T | null {
- let n = node;
- while (n.parent) {
- n = n.parent;
- if (predicate(n)) {
- return n;
- }
- }
-
- return null;
-}
-
-// Operations on trees
-export function findParentNodeOfType(
- node: MakiObject,
- type: Set
-): MakiObject | null {
- return findParent(node, (n) => type.has(n.name.toLowerCase()));
-}
-
-export function findParentOrCurrentNodeOfType(
- node: MakiObject,
- type: Set
-): MakiObject | null {
- if (type.has(node.name.toLowerCase())) {
- return node;
- }
- return findParentNodeOfType(node, type);
-}
-
-export function findDescendantByTypeAndId<
- T extends { children: T[]; name: string; attributes?: { id?: string } }
->(node: T, type: string | null, id: string): T | null {
- if (node.children.length === 0) {
- return null;
- }
-
- const lowerCaseId = id.toLowerCase();
- for (let i = 0; i < node.children.length; i++) {
- const child = node.children[i];
- if (
- (!type || child.name === type) &&
- child.attributes &&
- child.attributes.id !== undefined &&
- child.attributes.id.toLowerCase() === lowerCaseId
- ) {
- return child;
- }
- }
-
- for (let i = 0; i < node.children.length; i++) {
- const child = node.children[i];
- const descendant = findDescendantByTypeAndId(child, type, id);
- if (descendant) {
- return descendant;
- }
- }
-
- return null;
-}
-
-function findDirectDescendantById<
- T extends { children: T[]; attributes?: { id?: string } }
->(node: T, id: string): T | undefined {
- const lowerCaseId = id.toLowerCase();
- return node.children.find((item) =>
- Boolean(
- item.attributes &&
- item.attributes.id &&
- item.attributes.id.toLowerCase() === lowerCaseId
- )
- );
-}
-
-function* iterateLexicalScope(node: MakiObject): IterableIterator {
- let currentNode = node;
- while (currentNode.parent) {
- const { parent } = currentNode;
- const { children } = parent;
- for (let i = 0; i < children.length; i++) {
- const child = children[i];
- if (child === currentNode) {
- break;
- }
- yield child;
- }
- currentNode = parent;
- }
-}
-
-// Search up the tree for a node that is in `node`'s lexical that matches `predicate`.
-function findInLexicalScope(
- node: MakiObject,
- predicate: (node: MakiObject) => boolean
-): MakiObject | null {
- for (const child of iterateLexicalScope(node)) {
- if (predicate(child)) {
- return child;
- }
- }
- return null;
-}
-
-// Search up the tree for nodes that are in node's lexical scope.
-// return the first child of an that matches id
-export function findElementById(
- node: MakiObject,
- id: string
-): MakiObject | null {
- for (const child of iterateLexicalScope(node)) {
- if (child.getclassname && child.getclassname() === "Elements") {
- const element = findDirectDescendantById(child, id);
- if (element) {
- return element;
- }
- }
- }
- return null;
-}
-
-// Search up the tree for a node that is in node's lexical scope and matches id.
-export function findGroupDefById(
- node: MakiObject,
- id: String
-): MakiObject | null {
- return findInLexicalScope(node, (child) => {
- return (
- child.getclassname &&
- child.getclassname() === "GroupDef" &&
- // @ts-ignore We don't have good typing for attributes
- child.attributes.id === id
- );
- });
-}
-
-// Search down the tree for nodes that are in node's lexical scope.
-// return the first child of an that matches id unless we find
-// node first, in that case we didn't find the element
-// TODO: this might be overly generous, including some definitions that
-// shouldn't be accessible. But it's working for now :-X
-export function findXmlElementById(
- node: XmlNode,
- id: string,
- root: XmlNode
-): XmlNode | null {
- if (root.uid === node.uid) {
- // Search ends if we find the node that initiated the search, since it means we weren't able to
- // find the match in its scope
- // Return the node itself as a kind of sentinel value to look for, since finding the node is an
- // ending condition for the search
- return node;
- } else if (root.name === "elements") {
- const element = findDirectDescendantById(root, id);
- if (element) {
- return element;
- }
- } else {
- const children = root.children || [];
- for (const child of children) {
- const element = findXmlElementById(node, id, child);
- if (element) {
- if (element.uid === node.uid) {
- // This happens when we find the node before we find the declaration, which means it
- // either doesn't exist or it wouldn't be in scope
- return null;
+ clearTimeout(lastFn);
+ lastFn = setTimeout(() => {
+ if (Date.now() - lastTime >= wait) {
+ fn.apply(context, args);
+ lastTime = Date.now();
}
- return element;
- }
+ }, Math.max(wait - (Date.now() - lastTime), 0));
}
- }
- return null;
-}
+ };
+};
-// This is intentionally async since we may want to sub it out for an async
-// function in a node environment
-export async function getUrlFromBlob(blob: Blob): Promise {
- // We initiallay used `URL.createObjectURL(blob)` here, but it had an issue
- // where, when used as a background imaged, they would take more than one
- // frame to load resulting in a white flash when switching background iamges.
- return new Promise((resolve, reject) => {
- const reader = new FileReader();
- reader.onload = function (e) {
- // @ts-ignore This API is not very type-friendly.
- resolve(e.target.result);
+/**
+ * Purpuse: to hold eventListeners
+ */
+export class Emitter {
+ _cbs: { [event: string]: Array } = {};
+
+ // call this to register a callback to a specific event
+ on(event: string, cb: Function) {
+ if (this._cbs[event] == null) {
+ this._cbs[event] = [];
+ }
+ this._cbs[event].push(cb);
+
+ // return a function for later unregistering
+ return () => {
+ //TODO: consider using this.off(), or integrate both
+ this._cbs[event] = this._cbs[event].filter((c) => c !== cb);
};
- reader.onerror = reject;
- reader.readAsDataURL(blob);
- });
-}
-
-async function loadImage(
- imgUrl: string
-): Promise<{ width: number; height: number }> {
- return new Promise((resolve, reject) => {
- const img = new Image();
- img.addEventListener("load", () => {
- resolve(img);
- });
- img.addEventListener("error", (e) => {
- reject(e);
- });
- img.src = imgUrl;
- });
-}
-
-/* global FontFace */
-// Types for FontFace provided by @types/css-font-loading-module
-// TODO: Offer some way to clean this up
-export async function loadFont(fontUrl: string, name: string) {
- // Note: Incompatible with non-chromium Edge (#901)
- const font = new FontFace(name, `url(${fontUrl})`);
- const loadedFont = await font.load();
- document.fonts.add(loadedFont);
-
- /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
- function remove() {
- document.fonts.delete(loadedFont);
}
-}
-export async function getSizeFromUrl(
- imgUrl: string
-): Promise<{ width: number; height: number }> {
- const { width, height } = await loadImage(imgUrl);
- return { width, height };
-}
-
-let mousePosition = { x: 0, y: 0 };
-function handleMouseMove(e: MouseEvent): void {
- mousePosition = { x: e.clientX, y: e.clientY };
-}
-
-// It's possible we are in a Node envionment
-if (typeof document !== "undefined") {
- document.addEventListener("mousemove", handleMouseMove);
-}
-
-export function getMousePosition() {
- return mousePosition;
-}
-
-export function imageAttributesFromNode(node: XmlNode): Array {
- if (!node.name) return [];
- switch (node.name.toLowerCase()) {
- case "layer":
- case "animatedlayer": {
- return ["image"];
+ // remove an registered callback from a specific event
+ off(event: string, cb: Function) {
+ if (this._cbs[event] == null) {
+ return;
}
- case "layout": {
- return ["background"];
+ const cbs = this._cbs[event];
+ const index = cbs.indexOf(cb, 0);
+ if (index > -1) {
+ cbs.splice(index, 1);
}
- case "button":
- case "togglebutton": {
- return ["image", "downImage"];
+ }
+
+ // call this to run registered callbacks of an event
+ trigger(event: string, ...args: any[]) {
+ const subscriptions = this._cbs[event];
+ if (subscriptions == null) {
+ return;
}
- default: {
- return [];
- }
- }
-}
-
-export function baseImageAttributeFromObject(obj: GuiObject): string | null {
- switch (obj.getclassname()) {
- case "Layer":
- case "AnimatedLayer": {
- return "image";
- }
- case "Layout": {
- return "background";
- }
- case "Button":
- case "ToggleButton": {
- return "image";
- }
- default: {
- return null;
+ for (const cb of subscriptions) {
+ cb(...args);
}
}
}
diff --git a/packages/webamp-modern/static.d.ts b/packages/webamp-modern/static.d.ts
deleted file mode 100644
index b69880b3..00000000
--- a/packages/webamp-modern/static.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-declare module "*.wsz";
-declare module "*.png";
-declare module "*.ico";
-declare module "*.jpg";
-declare module "*.svg";
diff --git a/packages/webamp-modern-2/tools/build-typescript-interfaces.js b/packages/webamp-modern/tools/build-typescript-interfaces.js
similarity index 100%
rename from packages/webamp-modern-2/tools/build-typescript-interfaces.js
rename to packages/webamp-modern/tools/build-typescript-interfaces.js
diff --git a/packages/webamp-modern-2/tools/eslint-rules/dist/proper-maki-types.js b/packages/webamp-modern/tools/eslint-rules/dist/proper-maki-types.js
similarity index 100%
rename from packages/webamp-modern-2/tools/eslint-rules/dist/proper-maki-types.js
rename to packages/webamp-modern/tools/eslint-rules/dist/proper-maki-types.js
diff --git a/packages/webamp-modern-2/tools/eslint-rules/proper-maki-types.ts b/packages/webamp-modern/tools/eslint-rules/proper-maki-types.ts
similarity index 100%
rename from packages/webamp-modern-2/tools/eslint-rules/proper-maki-types.ts
rename to packages/webamp-modern/tools/eslint-rules/proper-maki-types.ts
diff --git a/packages/webamp-modern-2/tools/extract-attributes.js b/packages/webamp-modern/tools/extract-attributes.js
similarity index 100%
rename from packages/webamp-modern-2/tools/extract-attributes.js
rename to packages/webamp-modern/tools/extract-attributes.js
diff --git a/packages/webamp-modern-2/tools/extract-functions.js b/packages/webamp-modern/tools/extract-functions.js
similarity index 100%
rename from packages/webamp-modern-2/tools/extract-functions.js
rename to packages/webamp-modern/tools/extract-functions.js
diff --git a/packages/webamp-modern-2/tools/extract-maki-files.js b/packages/webamp-modern/tools/extract-maki-files.js
similarity index 100%
rename from packages/webamp-modern-2/tools/extract-maki-files.js
rename to packages/webamp-modern/tools/extract-maki-files.js
diff --git a/packages/webamp-modern/tools/extract-object-types.js b/packages/webamp-modern/tools/extract-object-types.js
new file mode 100644
index 00000000..c58f45b0
--- /dev/null
+++ b/packages/webamp-modern/tools/extract-object-types.js
@@ -0,0 +1,23 @@
+var parser = require("./parse-mi");
+var path = require("path");
+var fs = require("fs");
+
+const compilers = path.join(__dirname, "../resources/maki_compiler/");
+
+const lib566 = path.join(compilers, "v1.2.0 (Winamp 5.66)/lib/");
+
+const files = {
+ pldir: path.join(lib566, "pldir.mi"),
+ config: path.join(lib566, "config.mi"),
+ std: path.join(lib566, "std.mi"),
+ winampconfig: path.join(lib566, "winampconfig.mi"),
+ application: path.join(lib566, "application.mi"),
+};
+
+Object.keys(files).forEach((name) => {
+ const sourcePath = files[name];
+ const types = parser.parseFile(sourcePath);
+ const destinationPath = path.join(__dirname, `../src/maki/objectData/${name}.json`);
+
+ fs.writeFileSync(destinationPath, JSON.stringify(types, null, 2));
+});
diff --git a/packages/webamp-modern-2/tools/parse-mi.js b/packages/webamp-modern/tools/parse-mi.js
similarity index 100%
rename from packages/webamp-modern-2/tools/parse-mi.js
rename to packages/webamp-modern/tools/parse-mi.js
diff --git a/packages/webamp-modern-2/tools/parse-mi.test.js b/packages/webamp-modern/tools/parse-mi.test.js
similarity index 74%
rename from packages/webamp-modern-2/tools/parse-mi.test.js
rename to packages/webamp-modern/tools/parse-mi.test.js
index 3d9d5541..e0980c90 100644
--- a/packages/webamp-modern-2/tools/parse-mi.test.js
+++ b/packages/webamp-modern/tools/parse-mi.test.js
@@ -1,6 +1,6 @@
-import std from "../objectData/std.json";
-import config from "../objectData/config.json";
-import pldir from "../objectData/pldir.json";
+import std from "../src/maki/objectData/std.json";
+import config from "../src/maki/objectData/config.json";
+import pldir from "../src/maki/objectData/pldir.json";
import { parseFile } from "../tools/parse-mi";
import path from "path";
@@ -10,8 +10,7 @@ import path from "path";
const compilers = path.join(
__dirname,
- // TODO: Move these into webamp-modern-2
- "../../webamp-modern/resources/maki_compiler/"
+ "../resources/maki_compiler/"
);
const lib566 = path.join(compilers, "v1.2.0 (Winamp 5.66)/lib/");
diff --git a/packages/webamp-modern/tsconfig.json b/packages/webamp-modern/tsconfig.json
index f02a124c..bc9e5022 100644
--- a/packages/webamp-modern/tsconfig.json
+++ b/packages/webamp-modern/tsconfig.json
@@ -1,17 +1,7 @@
{
"compilerOptions": {
- "moduleResolution": "node",
- "module": "commonjs",
- "target": "esnext",
+ "esModuleInterop": true,
"allowJs": true,
- "skipLibCheck": true,
- "allowSyntheticDefaultImports": true,
- "resolveJsonModule": true,
- "strict": true,
- "jsx": "preserve",
- "noEmit": true,
- "pretty": true
- },
- "include": ["**/*.ts", "**/*.tsx"],
- "exclude": ["node_modules", "built"]
+ "resolveJsonModule": true
+ }
}