├── .gitignore ├── dist ├── assets │ ├── ffmpeg-static │ │ ├── ffmpeg.exe │ │ └── ffprobe.exe │ ├── fonts │ │ ├── CinzelDecorative-Regular.ttf │ │ ├── Comfortaa-Regular.ttf │ │ ├── Dosis-Light.ttf │ │ ├── Megrim.ttf │ │ ├── PoiretOne-Regular.ttf │ │ ├── Raleway-Regular.ttf │ │ ├── RobotoMono-Light.ttf │ │ ├── RobotoMono-Regular.ttf │ │ ├── RobotoMono-Thin.ttf │ │ ├── SourceCodePro-Light.ttf │ │ ├── SourceCodePro-Regular.ttf │ │ ├── Ubuntu-Light.ttf │ │ └── Ubuntu-Regular.ttf │ ├── gray-icon32.png │ ├── gray-icon64.png │ ├── icon-variants │ │ ├── pman-music-icon.svg │ │ ├── pman-photo-icon.svg │ │ └── pman-video-icon.svg │ ├── icon1024.png │ ├── icon128.ico │ ├── icon128.png │ ├── icon16.ico │ ├── icon16.png │ ├── icon24.ico │ ├── icon24.png │ ├── icon256.ico │ ├── icon256.png │ ├── icon32.ico │ ├── icon32.png │ ├── icon48.ico │ ├── icon48.png │ ├── icon512.png │ ├── icon64.ico │ ├── icon64.png │ ├── oldicons │ │ ├── bplayer-icon.png │ │ ├── bplayer-icon.xcf │ │ ├── icon128.ico │ │ ├── icon128.png │ │ ├── icon16.ico │ │ ├── icon16.png │ │ ├── icon256.png │ │ ├── icon32.ico │ │ ├── icon32.png │ │ ├── icon48.png │ │ ├── icon64.ico │ │ └── icon64.png │ ├── pman-new-icon-gray.svg │ ├── pman-new-icon.png │ ├── pman-new-icon.svg │ ├── pman-new-icon.xcf │ └── templates │ │ ├── help-page.html │ │ ├── preferences.html │ │ ├── track-info.html │ │ └── track-item.html ├── build.sh ├── buildscripts │ └── src │ │ ├── files.coffee │ │ ├── installer.coffee │ │ ├── pack.coffee │ │ ├── standalone.coffee │ │ └── tools.coffee ├── pack.bat ├── package-lock.json ├── package.json ├── package.sh ├── pages │ ├── index.html │ ├── index.min.html │ ├── pman-page.html │ └── preferences.html ├── prefixer.py ├── scripts │ ├── all-libs.js │ ├── all-libs.min.js │ ├── foundation.min.js │ ├── foundation5.min.js │ ├── jquery-3.0.0.js │ ├── jquery-ui.min.js │ ├── jquery.min.js │ ├── jquery.terminal-1.4.2.min.js │ ├── otherstuff.js │ └── unix_formatting.js └── styles │ ├── fonts.css │ ├── foundation-flex.min.css │ ├── foundation-icons.css │ ├── foundation-rtl.min.css │ ├── foundation.min.css │ ├── foundation5.min.css │ ├── jquery-ui.min.css │ ├── jquery-ui.structure.min.css │ ├── jquery-ui.theme.min.css │ ├── jquery.terminal-1.4.2.min.css │ ├── pman.less │ ├── scaffolds.css │ ├── theme.less │ ├── utils.less │ ├── widgets.less │ └── widgets │ ├── dialogs.less │ ├── gallery.less │ ├── misc.less │ └── playlist.less ├── readme.md └── src ├── BPlayerMain.hx ├── Background.hx ├── ServerMain.hx ├── assets └── icons │ ├── compile.py │ ├── icon_data.json │ ├── makefile │ └── svg │ ├── back.svg │ ├── bluetooth.svg │ ├── cast.svg │ ├── clear.svg │ ├── clock.svg │ ├── close.svg │ ├── closedcaption-off.svg │ ├── closedcaption.svg │ ├── code.svg │ ├── cog.svg │ ├── collapse.svg │ ├── console.svg │ ├── delete.svg │ ├── edit.box.svg │ ├── edit.minus.svg │ ├── edit.plus.svg │ ├── edit.svg │ ├── email.svg │ ├── expand.svg │ ├── film.svg │ ├── folder.svg │ ├── heart.hollow.svg │ ├── heart.svg │ ├── image.gallery.svg │ ├── image.multiple.svg │ ├── image.svg │ ├── info.svg │ ├── left.svg │ ├── lines.horizontal.svg │ ├── list.svg │ ├── minus.svg │ ├── music-wifi.svg │ ├── music.svg │ ├── next.svg │ ├── pause.svg │ ├── play.svg │ ├── plus.svg │ ├── previous.svg │ ├── refresh.svg │ ├── repeat.svg │ ├── ribbon.svg │ ├── right.svg │ ├── save.svg │ ├── selection-collapse.svg │ ├── selection-expand.svg │ ├── shuffle.svg │ ├── sort.svg │ ├── sound-muted.svg │ ├── sound0.svg │ ├── sound1.svg │ ├── sound2.svg │ ├── sound3.svg │ ├── star.svg │ ├── tag.svg │ ├── tools.svg │ └── video.svg ├── build.hxml ├── crayon └── crayon │ ├── Application.hx │ ├── Body.hx │ ├── Page.hx │ └── PageController.hx ├── electron ├── MenuTemplate.hx ├── Tools.hx ├── ext │ ├── App.hx │ ├── BrowserWindow.hx │ ├── Clipboard.hx │ ├── Cookies.hx │ ├── Dialog.hx │ ├── ExtApp.hx │ ├── ExtNativeImage.hx │ ├── FileFilter.hx │ ├── GlobalShortcut.hx │ ├── IpcMain.hx │ ├── IpcRenderer.hx │ ├── Menu.hx │ ├── MenuItem.hx │ ├── NativeImage.hx │ ├── Remote.hx │ ├── Session.hx │ ├── Tray.hx │ ├── WebContents.hx │ ├── WebContentsInterface.hx │ └── WebViewElement.hx └── ipc │ ├── IpcAddress.hx │ ├── IpcAddressType.hx │ ├── IpcBus.hx │ ├── IpcBusPacket.hx │ ├── IpcBus_Main.hx │ ├── IpcBus_Renderer.hx │ ├── IpcFrozenMessage.hx │ ├── IpcMain.hx │ ├── IpcMessage.hx │ ├── IpcMessageType.hx │ ├── IpcSocket.hx │ ├── IpcSocket_Main.hx │ ├── IpcSocket_Renderer.hx │ └── IpcTools.hx ├── ffmpeg ├── FFfmpeg.hx ├── Fluent.hx └── FluentTools.hx ├── foundation ├── LICENSE ├── README.md └── src │ ├── .gitignore │ ├── README.md │ └── foundation │ ├── AccordionMenu.hx │ ├── AlertPane.hx │ ├── BaseLabel.hx │ ├── BoolInput.hx │ ├── Button.hx │ ├── ButtonGroup.hx │ ├── ButtonSize.hx │ ├── Canvas.hx │ ├── ContextMenu.hx │ ├── ContextMenuItem.hx │ ├── DOMInput.hx │ ├── Dialog.hx │ ├── DrilldownMenu.hx │ ├── Dropdown.hx │ ├── DropdownButton.hx │ ├── FlexPane.hx │ ├── FlexRow.hx │ ├── FloatInput.hx │ ├── Foundation.hx │ ├── Grid.hx │ ├── Heading.hx │ ├── IInput.hx │ ├── Icon.hx │ ├── IconType.hx │ ├── Image.hx │ ├── Input.hx │ ├── InputGroup.hx │ ├── Label.hx │ ├── LabelSpan.hx │ ├── Link.hx │ ├── List.hx │ ├── ListItem.hx │ ├── Pane.hx │ ├── Panel.hx │ ├── Paragraph.hx │ ├── ProgressBar.hx │ ├── Row.hx │ ├── Select.hx │ ├── Span.hx │ ├── SplitButton.hx │ ├── Styles.hx │ ├── Tab.hx │ ├── TabbedPane.hx │ ├── Table.hx │ ├── TableBody.hx │ ├── TableCol.hx │ ├── TableHead.hx │ ├── TableHeadRow.hx │ ├── TableRow.hx │ ├── TextInput.hx │ ├── TextualWidget.hx │ ├── Tools.hx │ ├── Widget.hx │ ├── WidgetAsset.hx │ └── styles │ ├── Display.hx │ ├── EFloat.hx │ ├── Pos.hx │ └── TextAlign.hx ├── ida └── ida │ ├── Cursor.hx │ ├── Database.hx │ ├── DatabaseConnector.hx │ ├── Index.hx │ ├── ObjectStore.hx │ ├── Transaction.hx │ ├── Utils.hx │ └── backend │ ├── core │ ├── BasicDatabase.hx │ └── BasicObjectStore.hx │ └── idb │ ├── IDBCursor.hx │ ├── IDBCursorWalker.hx │ ├── IDBDatabase.hx │ ├── IDBDatabaseConnector.hx │ ├── IDBFunctionalCursorWalker.hx │ ├── IDBIndex.hx │ ├── IDBKeyRange.hx │ ├── IDBObjectStore.hx │ └── IDBTransaction.hx ├── make.bat ├── makefile ├── nedb └── DataStore.hx ├── package.bat ├── packer ├── Packer.hx ├── build.hxml ├── make.bat ├── makefile └── pack │ ├── AppDirTransformer.hx │ ├── ArgParser.hx │ ├── BatchTask.hx │ ├── BuildInstallers.hx │ ├── BuildStandalones.hx │ ├── CatJsLibs.hx │ ├── ClosureCompile.hx │ ├── CompileApp.hx │ ├── CompileLess.hx │ ├── CompileStyles.hx │ ├── CompileWorkers.hx │ ├── CompressJs.hx │ ├── Concatenate.hx │ ├── DebianInstaller.hx │ ├── EBuild.hx │ ├── Installer.hx │ ├── LinuxApp.hx │ ├── PackStandalone.hx │ ├── Preprocess.hx │ ├── PromptedTask.hx │ ├── Prompts.hx │ ├── RevisePackageJson.hx │ ├── ShellExecTask.hx │ ├── ShellSpawnTask.hx │ ├── Task.hx │ ├── TaskOptions.hx │ ├── Tools.hx │ ├── UglifyJs.hx │ ├── WindowsApp.hx │ ├── WindowsInstaller.hx │ └── adt │ └── Common.hx ├── pman ├── Assets.hx ├── Errors.hx ├── GlobalMacros.hx ├── Globals.hx ├── LaunchInfo.hx ├── PManError.hx ├── Paths.hx ├── Tools.hx ├── async │ ├── AlbumArtLoader.hx │ ├── Async.hx │ ├── Asyncs.hx │ ├── Cb.hx │ ├── ChunkedReadStream.hx │ ├── MP3MetadataLoader.hx │ ├── MP4MetadataLoader.hx │ ├── MediaMetadataLoader.hx │ ├── Mp4InfoLoader.hx │ ├── RawSingleThumbnailLoader.hx │ ├── Result.hx │ ├── SeekbarPreviewThumbnailLoader.hx │ ├── Task1.hx │ ├── Task2.hx │ ├── Trackable.hx │ ├── VoidAsync.hx │ ├── VoidAsyncs.hx │ ├── VoidCb.hx │ └── tasks │ │ ├── CleanDatabase.hx │ │ ├── EfficientTrackListDataLoader.hx │ │ ├── ExportDatabase.hx │ │ ├── FluentTask.hx │ │ ├── GenerateBundleSnapshot.hx │ │ ├── GenerateBundleSnapshots.hx │ │ ├── GenerateThumbnail.hx │ │ ├── GenerateThumbnails.hx │ │ ├── HandleClipboardPaste.hx │ │ ├── LoadAlbumArt.hx │ │ ├── LoadMediaMetadata.hx │ │ ├── LoadTrackData.hx │ │ ├── MediaFileConvertTool.hx │ │ ├── PlayerStartup.hx │ │ ├── ResizeImageFile.hx │ │ ├── SaveSnapshot.hx │ │ ├── SaveTrackInfo.hx │ │ ├── ScaleBundleItem.hx │ │ ├── TrackBatchCache.hx │ │ ├── TrackDataAutoFill.hx │ │ ├── TrackDataPullRaw.hx │ │ ├── TrackDelete.hx │ │ ├── TrackListDataLoader.hx │ │ └── TrackRename.hx ├── bg │ ├── BgTest.hx │ ├── DictTools.hx │ ├── Dirs.hx │ ├── MediaTools.hx │ ├── PathTools.hx │ ├── URITools.hx │ ├── db │ │ ├── ActorTable.hx │ │ ├── Database.hx │ │ ├── MediaTable.hx │ │ ├── Table.hx │ │ └── TagTable.hx │ ├── media │ │ ├── Actor.hx │ │ ├── ActorRow.hx │ │ ├── Bundle.hx │ │ ├── Bundles.hx │ │ ├── Dimensions.hx │ │ ├── Mark.hx │ │ ├── Media.hx │ │ ├── MediaAttrExtractor.hx │ │ ├── MediaData.hx │ │ ├── MediaDataDelta.hx │ │ ├── MediaDataSource.hx │ │ ├── MediaDataState.hx │ │ ├── MediaFeature.hx │ │ ├── MediaFilter.hx │ │ ├── MediaMetadata.hx │ │ ├── MediaRow.hx │ │ ├── MediaSort.hx │ │ ├── MediaSource.hx │ │ ├── MediaType.hx │ │ ├── Tag.hx │ │ ├── TagRow.hx │ │ └── TypedMediaMetadata.hx │ └── tasks │ │ ├── LoadMediaData.hx │ │ ├── LoadMediaMetadata.hx │ │ └── SaveMediaData.hx ├── core │ ├── ApplicationState.hx │ ├── Collection.hx │ ├── CollectionEntry.hx │ ├── CollectionEntryType.hx │ ├── CollectionSource.hx │ ├── Engine.hx │ ├── Ent.hx │ ├── Executor.hx │ ├── ExecutorTools.hx │ ├── JsonData.hx │ ├── PlaybackTarget.hx │ ├── Player.hx │ ├── PlayerCommand.hx │ ├── PlayerComponent.hx │ ├── PlayerController.hx │ ├── PlayerHistory.hx │ ├── PlayerMediaContext.hx │ ├── PlayerPlaybackProperties.hx │ ├── PlayerSession.hx │ ├── PlayerSessionState.hx │ ├── PlayerStatus.hx │ ├── PlayerTab.hx │ ├── PlayerTools.hx │ ├── PlayerViewOptions.hx │ ├── comp │ │ └── Skimmer.hx │ ├── engine │ │ └── Dialogs.hx │ ├── exec │ │ ├── BatchExecutor.hx │ │ ├── MicroTask.hx │ │ └── MicroTaskSpec.hx │ └── history │ │ ├── PlayerHistoryItem.hx │ │ └── PlayerHistoryTools.hx ├── db │ ├── ActorsStore.hx │ ├── AppDir.hx │ ├── Bucket.hx │ ├── ConfigInfo.hx │ ├── DbMediaInfo.hx │ ├── MediaIdCache.hx │ ├── MediaItem.hx │ ├── MediaStore.hx │ ├── Model.hx │ ├── Modem.hx │ ├── PManDatabase.hx │ ├── Port.hx │ ├── Preferences.hx │ ├── Snapshot.hx │ ├── Snapshots.hx │ ├── Storage.hx │ ├── StoredModel.hx │ ├── StringBucket.hx │ ├── TableWrapper.hx │ ├── TagsStore.hx │ ├── WebStorage.hx │ └── spec │ │ ├── DatabaseSpec.hx │ │ ├── DatabaseSpecBuilder.hx │ │ ├── IndexSpec.hx │ │ ├── TableSpec.hx │ │ └── TableSpecBuilder.hx ├── display │ ├── ColorScheme.hx │ ├── Icons.hx │ ├── PlayerInterfaceConfiguration.hx │ ├── PlayerView.hx │ ├── Templates.hx │ ├── VideoFilter.hx │ ├── VideoFilterTools.hx │ ├── VideoFilterType.hx │ └── media │ │ ├── AudioEqualizer.hx │ │ ├── AudioVisualizer.hx │ │ ├── AudioVisualizerTools.hx │ │ ├── BarsVisualizer.hx │ │ ├── CircleBasedVisualizer.hx │ │ ├── LayeredCircleVisualizer.hx │ │ ├── LocalAudioRenderer.hx │ │ ├── LocalImageRenderer.hx │ │ ├── LocalMediaObjectRenderer.hx │ │ ├── LocalVideoRenderer.hx │ │ ├── MediaRenderer.hx │ │ ├── MediaRendererComponent.hx │ │ ├── SpectographVisualizer.hx │ │ ├── VideoAudioVisualizer.hx │ │ └── audio │ │ ├── AudioPipeline.hx │ │ ├── AudioPipelineNode.hx │ │ ├── FrequencyRangeIsolatorNode.hx │ │ └── SplitAudioByFrequencyRangeNode.hx ├── ds │ ├── DataTransfer.hx │ ├── DataTransferItem.hx │ ├── DataTransferItemList.hx │ ├── DirectoryProbe.hx │ ├── FileFilterProbe.hx │ ├── FixedLengthArray.hx │ ├── Model.hx │ ├── ModelBuilder.hx │ ├── ModelPersistor.hx │ ├── Modem.hx │ ├── OnceSignal.hx │ ├── OpenableFileProbe.hx │ ├── Port.hx │ ├── ProxyModel.hx │ ├── Transform.hx │ └── io │ │ ├── ByteArrayTransform.hx │ │ ├── EdisStoragePort.hx │ │ ├── FileModelPersistor.hx │ │ ├── FilePort.hx │ │ ├── FileSystemPort.hx │ │ └── SerialTransform.hx ├── edb │ ├── ActorStore.hx │ ├── AppDir.hx │ ├── AppDirPlaylists.hx │ ├── ConfigInfo.hx │ ├── HaxeSerializationFileStorage.hx │ ├── JsonFileStorage.hx │ ├── MediaRowTools.hx │ ├── MediaStore.hx │ ├── Modem.hx │ ├── Modification.hx │ ├── Operators.hx │ ├── PManDatabase.hx │ ├── Port.hx │ ├── Preferences.hx │ ├── Query.hx │ ├── Storage.hx │ └── TableWrapper.hx ├── events │ ├── DragDropEvent.hx │ ├── Event.hx │ ├── EventEmitter.hx │ ├── HotkeyController.hx │ ├── KbInputController.hx │ ├── KbInputHandler.hx │ ├── KeySequenceDescriptor.hx │ ├── KeyTools.hx │ ├── KeyboardControls.hx │ ├── KeyboardEvent.hx │ ├── KeyboardEventDescriptor.hx │ ├── KeyboardEventType.hx │ ├── ModSensitiveEvent.hx │ └── PlayerDragDropEvent.hx ├── format │ ├── ini │ │ ├── Data.hx │ │ └── Reader.hx │ ├── m3u │ │ ├── Reader.hx │ │ └── Writer.hx │ ├── pls │ │ └── Reader.hx │ ├── pmsh │ │ ├── Cmd.hx │ │ ├── CmdArg.hx │ │ ├── CmdIo.hx │ │ ├── Expr.hx │ │ ├── ExprTools.hx │ │ ├── FuncCmd.hx │ │ ├── Interpreter.hx │ │ ├── NewParser.hx │ │ ├── Printer.hx │ │ ├── Token.hx │ │ ├── Tokenizer.hx │ │ └── io │ │ │ ├── CmdInput.hx │ │ │ └── CmdOutput.hx │ ├── time │ │ ├── TimeExpr.hx │ │ └── TimeParser.hx │ └── xspf │ │ ├── Data.hx │ │ ├── Reader.hx │ │ ├── Tools.hx │ │ └── Writer.hx ├── http │ ├── UrlTransformer.hx │ └── domains │ │ ├── DomainHandler.hx │ │ └── YouTubeHandler.hx ├── imports.hx ├── ipc │ ├── BaseIpcCommands.hx │ ├── IpcIncomingPacket.hx │ ├── MainIpcCommands.hx │ └── RendererIpcCommands.hx ├── media │ ├── CastingController.hx │ ├── ChromecastController.hx │ ├── ChromecastMediaDriver.hx │ ├── FileListConverter.hx │ ├── HttpAddressMedia.hx │ ├── HttpAddressMediaProvider.hx │ ├── LinkedPlaylist.hx │ ├── LocalAudioMediaDriver.hx │ ├── LocalFileMedia.hx │ ├── LocalFileMediaProvider.hx │ ├── LocalImageMediaDriver.hx │ ├── LocalMediaObjectMediaDriver.hx │ ├── LocalVideoMediaDriver.hx │ ├── Media.hx │ ├── MediaController.hx │ ├── MediaDriver.hx │ ├── MediaError.hx │ ├── MediaListProvider.hx │ ├── MediaMetadata.hx │ ├── MediaProvider.hx │ ├── MediaSource.hx │ ├── MediaSourceList.hx │ ├── MediaSourceListProvider.hx │ ├── MediaTools.hx │ ├── MediaType.hx │ ├── MultiMediaDriver.hx │ ├── PathListConverter.hx │ ├── PlaybackCommand.hx │ ├── Playlist.hx │ ├── PlaylistChange.hx │ ├── PlaylistClass.hx │ ├── Track.hx │ ├── TrackData.hx │ ├── TrackData2.hx │ ├── TrackDataDeltaTools.hx │ ├── TrackDataTools.hx │ ├── TrackFilter.hx │ ├── TrackListInitializer.hx │ ├── TrackListProvider.hx │ ├── TrackSelection.hx │ ├── TrackSort.hx │ └── info │ │ ├── Actor.hx │ │ ├── Bundle.hx │ │ ├── BundleItem.hx │ │ ├── BundleItemType.hx │ │ ├── Bundles.hx │ │ ├── Mark.hx │ │ ├── OldMark.hx │ │ ├── OldTag.hx │ │ └── Thumbs.hx ├── pmbash │ ├── Interp.hx │ ├── args │ │ ├── CmdArgParser.hx │ │ ├── Directive.hx │ │ ├── DirectiveExecutor.hx │ │ └── DirectiveSpec.hx │ └── commands │ │ ├── AliasCommand.hx │ │ ├── BookmarkCommand.hx │ │ ├── Builtin.hx │ │ ├── CliCommand.hx │ │ ├── Command.hx │ │ ├── ExitCommand.hx │ │ ├── FunctionalSubCommand.hx │ │ ├── HierCommand.hx │ │ ├── MediaCommand.hx │ │ ├── PlayerCommand.hx │ │ ├── PlaylistCommand.hx │ │ ├── QueueCommand.hx │ │ ├── RestartCommand.hx │ │ ├── SubCommand.hx │ │ └── TrackCommand.hx ├── search │ ├── BaseSearchEngine.hx │ ├── FileSystemSearchEngine.hx │ ├── Match.hx │ ├── MatchList.hx │ ├── QoSearchEngine.hx │ ├── QuickOpenItem.hx │ ├── QuickOpenItems.hx │ ├── SearchEngine.hx │ ├── SearchTerm.hx │ ├── SearchTermParser.hx │ ├── SearchTermTokenizer.hx │ ├── SearchTools.hx │ └── TrackSearchEngine.hx ├── server │ ├── Server.hx │ ├── ServerInitData.hx │ └── ServerTools.hx ├── sid │ └── Clipboard.hx ├── sys │ ├── FSWFilter.hx │ ├── FSWFilterTools.hx │ ├── FileSystemWalker.hx │ ├── ValueExtractor.hx │ ├── ValueExtractorInterp.hx │ └── ValueExtractorTools.hx ├── time │ ├── AnimTicker.hx │ └── Timer.hx ├── tools │ ├── ArgParser.hx │ ├── Directive.hx │ ├── DirectiveExecutor.hx │ ├── DirectiveSpec.hx │ ├── HsTools.hx │ ├── PathTools.hx │ ├── SimpleWordLexer.hx │ ├── ValueCheck.hx │ ├── chromecast │ │ ├── Browser.hx │ │ ├── Device.hx │ │ ├── ExtBrowser.hx │ │ └── ExtDevice.hx │ ├── localforage │ │ └── LocalForage.hx │ ├── localip │ │ └── LocalIp.hx │ ├── mdns │ │ ├── MDNSBrowser.hx │ │ ├── Mdns.hx │ │ └── ServiceType.hx │ ├── mediatags │ │ └── MediaTagReader.hx │ ├── mp3duration │ │ └── MP3Duration.hx │ └── mp4box │ │ ├── MP4Box.hx │ │ └── MP4Metadata.hx ├── ui │ ├── AjaxPage.hx │ ├── AlbumArtUnderlay.hx │ ├── AutoCompletePrompt.hx │ ├── BookmarkEditor.hx │ ├── BookmarkPrompt.hx │ ├── CanvasProgressBar.hx │ ├── CanvasTooltip.hx │ ├── CanvasUnderlay.hx │ ├── ConfirmBox.hx │ ├── DragDropManager.hx │ ├── DragDropWidget.hx │ ├── KeyboardCommands.hx │ ├── Modal.hx │ ├── PMBashTerminal.hx │ ├── PManBrowserPage.hx │ ├── PlayerControlsView.hx │ ├── PlayerMessageBoard.hx │ ├── PlayerPage.hx │ ├── PlaylistView.hx │ ├── PreferencesPage.hx │ ├── ProgressBar.hx │ ├── PromptBox.hx │ ├── QuickOpenPrompt.hx │ ├── SnapshotView.hx │ ├── TimeJumpPrompt.hx │ ├── TopViewCanvasProgressBar.hx │ ├── TrackInfoPopup.hx │ ├── VideoUnderlay.hx │ ├── ctrl │ │ ├── CastButton.hx │ │ ├── FullscreenButton.hx │ │ ├── IconicPlayerControlButton.hx │ │ ├── ImagePlayerControlButton.hx │ │ ├── NextButton.hx │ │ ├── PlaybackButton.hx │ │ ├── PlaybackSpeedButton.hx │ │ ├── PlaybackSpeedOption.hx │ │ ├── PlaybackSpeedWidget.hx │ │ ├── PlayerControlButton.hx │ │ ├── PlaylistButton.hx │ │ ├── PlaylistChooserWidget.hx │ │ ├── PreviousButton.hx │ │ ├── RepeatButton.hx │ │ ├── SeekBar.hx │ │ ├── SeekBarMarkView.hx │ │ ├── SeekBarMarkViewTooltip.hx │ │ ├── SeekBarMarkViewTooltipGroup.hx │ │ ├── SeekBarMarkViewTooltipPanel.hx │ │ ├── ShuffleButton.hx │ │ ├── ThumbPreviewBox.hx │ │ ├── TrackAddToPlaylistButton.hx │ │ ├── TrackControlButton.hx │ │ ├── TrackControlsView.hx │ │ ├── TrackEditInfoButton.hx │ │ ├── TrackMoveToTrashButton.hx │ │ ├── TrackShowInfoButton.hx │ │ ├── TrackStarredButton.hx │ │ ├── VolumeButton.hx │ │ └── VolumeWidget.hx │ ├── hud │ │ ├── FPSDisplay.hx │ │ ├── MemoryUsageDisplay.hx │ │ ├── PlayerHUD.hx │ │ ├── PlayerHUDItem.hx │ │ ├── ProgressItem.hx │ │ ├── TextualHUDItem.hx │ │ ├── TitleItem.hx │ │ ├── ToggleableItem.hx │ │ └── VolumeItem.hx │ ├── pl │ │ ├── SearchWidget.hx │ │ ├── TrackListView.hx │ │ └── TrackView.hx │ ├── statusbar │ │ ├── CmdStatusBarItem.hx │ │ ├── DefaultStatusBarItem.hx │ │ ├── PlayerStatusBar.hx │ │ └── StatusBarItem.hx │ ├── tabs │ │ ├── TabView.hx │ │ └── TabViewBar.hx │ └── views │ │ ├── CharacterMatrixState.hx │ │ ├── CharacterMatrixView.hx │ │ ├── CharacterMatrixViewAccessor.hx │ │ ├── CharacterMatrixViewBuffer.hx │ │ ├── CharacterMatrixViewBufferCursor.hx │ │ ├── CharacterMatrixViewBufferLine.hx │ │ ├── CharacterMatrixViewBufferLineChar.hx │ │ ├── CharacterMatrixViewMacros.hx │ │ ├── CharacterMatrixViewRenderer.hx │ │ ├── CharacterMatrixViewStyle.hx │ │ ├── TextBoxView.hx │ │ └── curses │ │ ├── CellGridView.hx │ │ └── models │ │ ├── Cell.hx │ │ ├── CellGrid.hx │ │ └── CellRow.hx └── ww │ ├── Boss.hx │ ├── NodeBoss.hx │ ├── Processor.hx │ ├── WebBoss.hx │ ├── Worker.hx │ ├── WorkerMacros.hx │ ├── WorkerPacket.hx │ ├── WorkerStream.hx │ └── workers │ ├── HDDProbe.hx │ ├── HDDProbeInfo.hx │ ├── HDDProbeStream.hx │ ├── MediaSourceProbeStream.hx │ └── TrackDataLoader.hx ├── res └── trayTemplate.js ├── vex ├── .gitignore └── vex │ ├── core │ ├── BaseDocument.hx │ ├── BaseElement.hx │ ├── Document.hx │ ├── Element.hx │ ├── Group.hx │ ├── Line.hx │ ├── Path.hx │ ├── Polygon.hx │ ├── Polyline.hx │ └── Rect.hx │ └── svg │ ├── DocumentWidget.hx │ ├── SVGDocument.hx │ ├── SVGElement.hx │ ├── SVGFilter.hx │ ├── SVGGroup.hx │ ├── SVGLine.hx │ ├── SVGPath.hx │ ├── SVGPolygon.hx │ ├── SVGPolyline.hx │ ├── SVGRect.hx │ ├── SVGStyle.hx │ └── path │ ├── Command.hx │ ├── Editor.hx │ ├── Parser.hx │ └── Printer.hx └── workers.hxml /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.swp 3 | *.map 4 | 5 | src/borner 6 | 7 | dist/scripts/content*.js 8 | dist/scripts/background*.js 9 | dist/scripts/worker*.js 10 | #dist/scripts/all-libs*.js 11 | dist/scripts/server*.js 12 | dist/scripts/lib/*.js 13 | dist/styles/theme.css 14 | 15 | dist/node_modules 16 | dist/node_modules/** 17 | dist/node_modules/**/ 18 | dist/releases 19 | dist/releases/** 20 | dist/releases/**/ 21 | dist/installers/* 22 | dist/buildscripts/*.js 23 | 24 | dist/pack.js 25 | 26 | dist/_thumbs/ 27 | 28 | dist/pack 29 | 30 | dist/styles/pman\.css 31 | 32 | dist/scripts/process\.worker\.js 33 | 34 | dist/scripts/diskprobe\.worker\.js 35 | 36 | dist/scripts/bgdb\.worker\.js 37 | 38 | src/res/test_script\.js 39 | 40 | dist/theme-example\.css 41 | -------------------------------------------------------------------------------- /dist/assets/ffmpeg-static/ffmpeg.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/ffmpeg-static/ffmpeg.exe -------------------------------------------------------------------------------- /dist/assets/ffmpeg-static/ffprobe.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/ffmpeg-static/ffprobe.exe -------------------------------------------------------------------------------- /dist/assets/fonts/CinzelDecorative-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/CinzelDecorative-Regular.ttf -------------------------------------------------------------------------------- /dist/assets/fonts/Comfortaa-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/Comfortaa-Regular.ttf -------------------------------------------------------------------------------- /dist/assets/fonts/Dosis-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/Dosis-Light.ttf -------------------------------------------------------------------------------- /dist/assets/fonts/Megrim.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/Megrim.ttf -------------------------------------------------------------------------------- /dist/assets/fonts/PoiretOne-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/PoiretOne-Regular.ttf -------------------------------------------------------------------------------- /dist/assets/fonts/Raleway-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/Raleway-Regular.ttf -------------------------------------------------------------------------------- /dist/assets/fonts/RobotoMono-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/RobotoMono-Light.ttf -------------------------------------------------------------------------------- /dist/assets/fonts/RobotoMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/RobotoMono-Regular.ttf -------------------------------------------------------------------------------- /dist/assets/fonts/RobotoMono-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/RobotoMono-Thin.ttf -------------------------------------------------------------------------------- /dist/assets/fonts/SourceCodePro-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/SourceCodePro-Light.ttf -------------------------------------------------------------------------------- /dist/assets/fonts/SourceCodePro-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/SourceCodePro-Regular.ttf -------------------------------------------------------------------------------- /dist/assets/fonts/Ubuntu-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/Ubuntu-Light.ttf -------------------------------------------------------------------------------- /dist/assets/fonts/Ubuntu-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/fonts/Ubuntu-Regular.ttf -------------------------------------------------------------------------------- /dist/assets/gray-icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/gray-icon32.png -------------------------------------------------------------------------------- /dist/assets/gray-icon64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/gray-icon64.png -------------------------------------------------------------------------------- /dist/assets/icon1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon1024.png -------------------------------------------------------------------------------- /dist/assets/icon128.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon128.ico -------------------------------------------------------------------------------- /dist/assets/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon128.png -------------------------------------------------------------------------------- /dist/assets/icon16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon16.ico -------------------------------------------------------------------------------- /dist/assets/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon16.png -------------------------------------------------------------------------------- /dist/assets/icon24.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon24.ico -------------------------------------------------------------------------------- /dist/assets/icon24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon24.png -------------------------------------------------------------------------------- /dist/assets/icon256.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon256.ico -------------------------------------------------------------------------------- /dist/assets/icon256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon256.png -------------------------------------------------------------------------------- /dist/assets/icon32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon32.ico -------------------------------------------------------------------------------- /dist/assets/icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon32.png -------------------------------------------------------------------------------- /dist/assets/icon48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon48.ico -------------------------------------------------------------------------------- /dist/assets/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon48.png -------------------------------------------------------------------------------- /dist/assets/icon512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon512.png -------------------------------------------------------------------------------- /dist/assets/icon64.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon64.ico -------------------------------------------------------------------------------- /dist/assets/icon64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/icon64.png -------------------------------------------------------------------------------- /dist/assets/oldicons/bplayer-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/oldicons/bplayer-icon.png -------------------------------------------------------------------------------- /dist/assets/oldicons/bplayer-icon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/oldicons/bplayer-icon.xcf -------------------------------------------------------------------------------- /dist/assets/oldicons/icon128.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/oldicons/icon128.ico -------------------------------------------------------------------------------- /dist/assets/oldicons/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/oldicons/icon128.png -------------------------------------------------------------------------------- /dist/assets/oldicons/icon16.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/oldicons/icon16.ico -------------------------------------------------------------------------------- /dist/assets/oldicons/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/oldicons/icon16.png -------------------------------------------------------------------------------- /dist/assets/oldicons/icon256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/oldicons/icon256.png -------------------------------------------------------------------------------- /dist/assets/oldicons/icon32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/oldicons/icon32.ico -------------------------------------------------------------------------------- /dist/assets/oldicons/icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/oldicons/icon32.png -------------------------------------------------------------------------------- /dist/assets/oldicons/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/oldicons/icon48.png -------------------------------------------------------------------------------- /dist/assets/oldicons/icon64.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/oldicons/icon64.ico -------------------------------------------------------------------------------- /dist/assets/oldicons/icon64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/oldicons/icon64.png -------------------------------------------------------------------------------- /dist/assets/pman-new-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/pman-new-icon.png -------------------------------------------------------------------------------- /dist/assets/pman-new-icon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/assets/pman-new-icon.xcf -------------------------------------------------------------------------------- /dist/assets/templates/help-page.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

PMan Help

5 |
6 |
7 |
Hotkeys
8 |
9 |
10 | Spacebar 11 |

12 | Toggle playback 13 |

14 |
15 |
16 |
17 |
18 | -------------------------------------------------------------------------------- /dist/assets/templates/track-item.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | ::if data:: 5 | ::if (data.views == 0):: 6 | (U)  7 | ::elseif (data.starred):: 8 | * 9 | ::end:: 10 | ::end:: 11 | ::title:: 12 |
13 |
14 |
::if data::(::(data.meta.video.height)::p)$$duration()::end::
15 |
16 |
17 |
18 |
19 |
20 | 21 | -------------------------------------------------------------------------------- /dist/build.sh: -------------------------------------------------------------------------------- 1 | 2 | lessc styles/pman.less >styles/pman.css 3 | 4 | coffee -c -o scripts/lib scripts/lib/ 5 | 6 | -------------------------------------------------------------------------------- /dist/buildscripts/src/files.coffee: -------------------------------------------------------------------------------- 1 | 2 | fs = require 'fs' 3 | path = require 'path' 4 | 5 | async = require 'async' 6 | _ = require 'underscore' 7 | 8 | coffee = require 'coffee-script' 9 | less = require 'less' 10 | ugly = require 'ugly' 11 | 12 | tools = require './tools' 13 | {Build,Builds,Task,Batch} = tools 14 | 15 | exports['concat'] = concat = (inputs, output, callback) -> 16 | async.map inputs, fs.readFile, (err, buffs) -> 17 | sum = '' 18 | sum += b for b in buffs 19 | sum = Buffer.from sum 20 | fs.writeFile(output, sum, callback) 21 | 22 | 23 | -------------------------------------------------------------------------------- /dist/buildscripts/src/installer.coffee: -------------------------------------------------------------------------------- 1 | fs = require 'fs' 2 | path = require 'path' 3 | 4 | async = require 'async' 5 | _ = require 'underscore' 6 | 7 | tools = require './tools' 8 | 9 | deb_installer = require 'electron-installer-debian' 10 | win_installer = require 'electron-installer-windows' 11 | installer_funcs = { 12 | win32: win_installer 13 | linux: deb_installer 14 | } 15 | 16 | class Installer extends tools.Task 17 | constructor: (@platform, @arch='x64') -> 18 | super() 19 | @method = switch (@platform.toLowerCase()) 20 | when 'win32' then win_installer 21 | when 'linux' then deb_installer 22 | else null 23 | @options = { 24 | src: tools.scriptdir('releases', "pman-#{@platform}-#{@arch}") 25 | dest: tools.scriptdir('installers') 26 | arch: @arch 27 | } 28 | @promptMessage = "create installer for #{@platform}-#{@arch}" 29 | @promptDefault = no 30 | 31 | perform: (callback) -> 32 | @method(@options, callback) 33 | 34 | exports['InstAller'] = class InstAller extends tools.Batch 35 | constructor: -> 36 | super() 37 | @tasks = [ 38 | new Installer( 'linux' ) 39 | new Installer( 'win32' ) 40 | ] 41 | 42 | confirm: (f) -> 43 | _.defer(_.partial(f, null, yes)) 44 | -------------------------------------------------------------------------------- /dist/buildscripts/src/pack.coffee: -------------------------------------------------------------------------------- 1 | 2 | fs = require 'fs' 3 | path = require 'path' 4 | 5 | async = require 'async' 6 | _ = require 'underscore' 7 | 8 | tools = require './tools' 9 | standalone = require './standalone' 10 | {Pack, PackAll} = require './standalone' 11 | {Installer,InstAller} = require './installer' 12 | 13 | module.exports = pack = ( argv ) -> 14 | packall = new PackAll() 15 | install = new InstAller() 16 | packall.execute -> 17 | install.execute -> 18 | console.log " -- DONE -- " 19 | 20 | do -> 21 | argv = process.argv[2..] 22 | pack( argv ) 23 | -------------------------------------------------------------------------------- /dist/pack.bat: -------------------------------------------------------------------------------- 1 | 2 | node pack %* 3 | -------------------------------------------------------------------------------- /dist/package.sh: -------------------------------------------------------------------------------- 1 | 2 | coffee -c -o buildscripts/ buildscripts/src/; 3 | 4 | #cd ../src/; 5 | #haxe -D release build.hxml; 6 | #cd ../dist/; 7 | 8 | node buildscripts/pack.js $@; 9 | 10 | -------------------------------------------------------------------------------- /dist/pages/preferences.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

PMan Preferences

5 |
6 |
7 |
8 | 9 |
10 | 11 |
12 | 13 |
14 | 15 |
16 | 17 |
18 |
19 |
20 | 21 |
22 |
23 |
24 |
25 | 26 |
27 |
28 | 29 |
30 |
31 |
32 | 33 | -------------------------------------------------------------------------------- /dist/prefixer.py: -------------------------------------------------------------------------------- 1 | 2 | import sys, os 3 | path = os.path 4 | 5 | def read( fn ): 6 | f = open(fn, 'r', 1) 7 | c = f.read() 8 | f.close() 9 | return c 10 | 11 | def write(fn, d): 12 | f = open(fn, 'w', 1) 13 | f.write( d ) 14 | f.close() 15 | 16 | def main(): 17 | 18 | code = read('./pack') 19 | code = ('#!/usr/bin/env node\n\n' + code) 20 | write('./pack', code) 21 | 22 | if __name__ == "__main__": 23 | main() 24 | -------------------------------------------------------------------------------- /dist/styles/fonts.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face { 3 | font-family: Ubuntu; 4 | src: url('../res/fonts/Ubuntu-Regular.ttf'); 5 | } 6 | 7 | @font-face { 8 | font-family: UbuntuLight; 9 | src: url('../res/fonts/Ubuntu-Light.ttf'); 10 | } 11 | -------------------------------------------------------------------------------- /dist/styles/theme.less: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | Color Scheme 4 | --- 5 | I'd eventually love to somehow make this changeable programmatically 6 | */ 7 | @color_bg: #444444; 8 | @color_fg: orange; 9 | 10 | @primary: rgb(34, 34, 34); 11 | @secondary: rgb(242, 122, 72); 12 | @tertiary: rgb(231, 231, 231); 13 | 14 | -------------------------------------------------------------------------------- /dist/styles/utils.less: -------------------------------------------------------------------------------- 1 | 2 | @import "theme"; 3 | 4 | .block-center { 5 | display: block; 6 | margin-left: auto; 7 | margin-right: auto; 8 | } 9 | 10 | .unselectable { 11 | -webkit-user-select: none; /* Chrome/Safari */ 12 | -moz-user-select: none; /* Firefox */ 13 | -ms-user-select: none; /* IE10+ */ 14 | 15 | /* Rules below not implemented in browsers yet */ 16 | -o-user-select: none; 17 | user-select: none; 18 | } 19 | -------------------------------------------------------------------------------- /dist/styles/widgets/gallery.less: -------------------------------------------------------------------------------- 1 | 2 | @import "../theme"; 3 | @import "../utils"; 4 | 5 | .pm-header { 6 | position: fixed; 7 | z-index: 12; 8 | left: 0px; 9 | top: 0px; 10 | width: 100%; 11 | height: 50px; 12 | background-color: lighten(@primary, 10%); 13 | border-bottom: solid darken(@primary, 13%) 2px; 14 | } 15 | 16 | .pm-search { 17 | // container for the searchbox form inputs 18 | .inputs { 19 | // the text input itself 20 | input[type='text'] { 21 | color: darken(@primary, 35%); 22 | height: auto; 23 | font-size: 9pt; 24 | padding: 6px; 25 | margin-top: 7px; 26 | margin-left: 8px; 27 | } 28 | div.input-group-button { 29 | input[type=button] { 30 | transform: scale(0.709); 31 | background-color: @secondary; 32 | } 33 | } 34 | } 35 | 36 | // container for the autocompletion suggestions 37 | .suggestions { 38 | display: none; 39 | } 40 | } 41 | 42 | .pm-container { 43 | width: 100vw; 44 | height: 100%; 45 | background-color: @primary; 46 | position: absolute; 47 | top: 50px; 48 | left: 0px; 49 | } -------------------------------------------------------------------------------- /dist/styles/widgets/misc.less: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavisDevelopment/pman/609b3dcbfeefcdde477447a162b434d20f565be4/dist/styles/widgets/misc.less -------------------------------------------------------------------------------- /src/assets/icons/compile.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os, sys, json 4 | import xml.etree.ElementTree as ET 5 | path = os.path 6 | 7 | cwd = os.getcwd() 8 | svgPath = path.join(cwd, 'svg') 9 | 10 | def get(name): 11 | f = open(name, 'r', 1) 12 | r = f.read() 13 | f.close() 14 | return r 15 | 16 | def put(name, data): 17 | f = open(name, 'w', 1) 18 | f.write( data ) 19 | f.close() 20 | 21 | def getAllIconPaths(): 22 | l = os.listdir( svgPath ) 23 | return [path.join(svgPath, name) for name in l] 24 | 25 | def iconPath( p ): 26 | tree = ET.parse( p ) 27 | root = tree.getroot() 28 | return root.find('{http://www.w3.org/2000/svg}path') 29 | 30 | def parse(): 31 | ipaths = getAllIconPaths() 32 | data = {} 33 | for n in ipaths: 34 | key = path.splitext(path.basename( n ))[0] 35 | print( key ) 36 | p = iconPath( n ) 37 | value = p.get( 'd' ).strip() 38 | data[key] = value 39 | str_data = json.dumps(data, indent=3) 40 | put('icon_data.json', str_data) 41 | print('Done') 42 | 43 | parse() 44 | -------------------------------------------------------------------------------- /src/assets/icons/makefile: -------------------------------------------------------------------------------- 1 | 2 | all: 3 | python3 compile.py 4 | -------------------------------------------------------------------------------- /src/assets/icons/svg/back.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/bluetooth.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/cast.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/clear.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/close.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/code.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/collapse.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/console.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/delete.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/edit.box.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/edit.minus.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/edit.plus.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/edit.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/email.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/expand.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/folder.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/heart.hollow.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/heart.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/image.gallery.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/image.multiple.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/image.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/info.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/left.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/lines.horizontal.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/list.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/minus.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/music.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/next.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/pause.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/play.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/plus.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/previous.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/refresh.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/repeat.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/ribbon.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/right.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/save.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/selection-collapse.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/selection-expand.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/shuffle.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/sort.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/sound-muted.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/sound0.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/sound1.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/sound2.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/star.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/tag.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/assets/icons/svg/video.svg: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/build.hxml: -------------------------------------------------------------------------------- 1 | 2 | -cp tannus/ 3 | -cp gryffin/ 4 | -cp foundation/src/ 5 | -cp crayon/ 6 | -cp ida/ 7 | -cp vex/ 8 | -cp hxpress/src/ 9 | -cp hscript/ 10 | -cp hxelectron/src/ 11 | -cp edis/ 12 | 13 | -lib slambda 14 | -lib actuate 15 | -lib format 16 | -lib hxnodejs 17 | -lib haxe-crypto 18 | -lib hxjs-fengari 19 | 20 | -D tannus 21 | -D node 22 | -D electron 23 | -D gryffin 24 | -D ida 25 | -D vex 26 | -D foundation 27 | -D eval-stack 28 | -D underscore 29 | 30 | --each 31 | 32 | -main BPlayerMain 33 | #-D debug 34 | -D renderer_process 35 | -D js-es=6 36 | -D js-enums-as-objects 37 | -D debug 38 | -js ../dist/scripts/content.js 39 | 40 | --next 41 | 42 | -main Background 43 | -D main_process 44 | -js ../dist/scripts/background.js 45 | 46 | --next 47 | -------------------------------------------------------------------------------- /src/crayon/crayon/Application.hx: -------------------------------------------------------------------------------- 1 | package crayon; 2 | 3 | import foundation.*; 4 | import tannus.html.Element; 5 | import tannus.html.Win; 6 | import tannus.ds.*; 7 | import tannus.io.*; 8 | 9 | using StringTools; 10 | using tannus.ds.StringUtils; 11 | using Lambda; 12 | using tannus.ds.ArrayTools; 13 | using tannus.math.TMath; 14 | using tannus.macro.MacroTools; 15 | 16 | class Application { 17 | /* Constrcutor Function */ 18 | public function new():Void { 19 | win = Win.current; 20 | self = Obj.fromDynamic( this ); 21 | var rtitle = Ptr.create( win.document.title ); 22 | self.defineProperty('title', rtitle); 23 | body = new Body( this ); 24 | } 25 | 26 | /* === Instance Methods === */ 27 | 28 | /** 29 | * Start [this] Application 30 | */ 31 | public function start():Void { 32 | null; 33 | } 34 | 35 | /* === Instance Fields === */ 36 | 37 | public var title : String; 38 | public var win : Win; 39 | public var self : Obj; 40 | public var body : Body; 41 | } 42 | -------------------------------------------------------------------------------- /src/electron/MenuTemplate.hx: -------------------------------------------------------------------------------- 1 | package electron; 2 | 3 | import electron.ext.Menu; 4 | import electron.ext.MenuItem; 5 | 6 | //import electron.main.Menu; 7 | //import electron.main.MenuItem; 8 | 9 | using StringTools; 10 | using tannus.ds.StringUtils; 11 | using Lambda; 12 | using tannus.ds.ArrayTools; 13 | using Slambda; 14 | 15 | @:forward 16 | abstract MenuTemplate (Array) from Array to Array { 17 | public inline function new(?l : Array) { 18 | this = (l != null ? l : []); 19 | //new MenuItem() 20 | } 21 | 22 | @:to 23 | public inline function toMenu():Menu { 24 | return Menu.buildFromTemplate(cast this); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/electron/Tools.hx: -------------------------------------------------------------------------------- 1 | package electron; 2 | 3 | 4 | /** 5 | * class full of utility methods for electron 6 | */ 7 | class Tools { 8 | /** 9 | * queue [action] for invokation immediately after the current call-stack 10 | */ 11 | public static inline function defer(action : Void -> Void):Void { 12 | (untyped __js__( 'process.nextTick' )( action )); 13 | } 14 | 15 | /* === Class Fields === */ 16 | 17 | public static var now(get, never):Float; 18 | private static inline function get_now():Float { 19 | return Date.now().getTime(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/electron/ext/App.hx: -------------------------------------------------------------------------------- 1 | package electron.ext; 2 | 3 | import haxe.Constraints.Function; 4 | 5 | import electron.ext.ExtApp; 6 | import electron.ext.ExtApp in A; 7 | 8 | import tannus.sys.Path; 9 | 10 | typedef App = ExtApp; 11 | 12 | class OldApp { 13 | /* === Class Methods === */ 14 | 15 | /** 16 | * wait for [this] App to be ready 17 | */ 18 | public static inline function onReady(callback : Void->Void):Void { 19 | on('ready', callback); 20 | } 21 | 22 | public static inline function quit():Void A.quit(); 23 | public static inline function exit(?code : Int):Void A.exit(code); 24 | public static inline function relaunch(?options : ExtAppRelaunchOptions):Void A.relaunch( options ); 25 | public static inline function isReady():Bool return A.isReady(); 26 | public static inline function focus():Void A.focus(); 27 | 28 | public static inline function getAppPath():Path return new Path(A.getAppPath()); 29 | public static inline function getPath(name : ExtAppNamedPath):Path return new Path(A.getPath( name )); 30 | 31 | public static inline function getVersion():String return A.getVersion(); 32 | public static inline function getName():String return A.getName(); 33 | public static inline function on(name:String, f:Function):Void A.on(name, f); 34 | } 35 | -------------------------------------------------------------------------------- /src/electron/ext/Clipboard.hx: -------------------------------------------------------------------------------- 1 | package electron.ext; 2 | 3 | @:jsRequire('electron', 'clipboard') 4 | extern class Clipboard { 5 | static function readText(?type : String):String; 6 | static function writeText(text:String, ?type:String):Void; 7 | static function readImage(?type : String):Null; 8 | static function writeImage(image:NativeImage, ?type:String):Void; 9 | static function availableFormats(?type : String):Array; 10 | static function read(data:String, ?type:String):Null; 11 | static function clear(?type : String):Void; 12 | } 13 | -------------------------------------------------------------------------------- /src/electron/ext/Cookies.hx: -------------------------------------------------------------------------------- 1 | package electron.ext; 2 | 3 | import haxe.extern.*; 4 | 5 | import tannus.node.EventEmitter; 6 | import tannus.node.Buffer; 7 | 8 | extern class Cookies { 9 | function get(filter:CookiesGetFilter, callback:Null->Array->Void):Void; 10 | function set(details:CookiesSetDetails, callback:Null->Void):Void; 11 | function remove(url:String, name:String, done:Void->Void):Void; 12 | } 13 | 14 | typedef CookiesSetDetails = { 15 | url : String, 16 | ?name : String, 17 | ?value : String, 18 | ?domain : String, 19 | ?path : String, 20 | ?secure : Bool, 21 | ?httpOnly : Bool, 22 | ?expirationDate : Float 23 | }; 24 | 25 | typedef CookiesGetFilter = { 26 | ?url : String, 27 | ?name : String, 28 | ?domain : String, 29 | ?path : String, 30 | ?secure : Bool, 31 | ?session : Bool 32 | }; 33 | -------------------------------------------------------------------------------- /src/electron/ext/Dialog.hx: -------------------------------------------------------------------------------- 1 | package electron.ext; 2 | 3 | #if renderer_process 4 | @:jsRequire('electron', 'remote.dialog') 5 | #elseif main_process 6 | @:jsRequire('electron', 'dialog') 7 | #end 8 | extern class Dialog { 9 | @:overload(function(options:FileOpenOptions, callback:Array->Void):Void {}) 10 | @:overload(function(win:BrowserWindow, options:FileOpenOptions, callback:Array->Void):Void {}) 11 | static function showOpenDialog(callback:Array->Void):Void; 12 | 13 | @:overload(function(options:FileDialogOptions, callback:String->Void):Void {}) 14 | static function showSaveDialog(callback : String -> Void):Void; 15 | } 16 | 17 | typedef FileDialogOptions = { 18 | ?title:String, 19 | ?defaultPath:String, 20 | ?buttonLabel:String, 21 | ?filters:Array 22 | }; 23 | typedef FileOpenOptions = { 24 | >FileDialogOptions, 25 | ?properties:Array 26 | }; 27 | 28 | @:enum 29 | abstract FileDialogProperty (String) from String { 30 | var OpenFile = 'openFile'; 31 | var OpenDirectory = 'openDirectory'; 32 | var MultiSelections = 'multiSelections'; 33 | var CreateDirectory = 'createDirectory'; 34 | var ShowHiddenFiles = 'showHiddenFiles'; 35 | } 36 | -------------------------------------------------------------------------------- /src/electron/ext/ExtNativeImage.hx: -------------------------------------------------------------------------------- 1 | package electron.ext; 2 | 3 | import tannus.node.Buffer; 4 | 5 | #if main_process 6 | @:jsRequire('electron', 'nativeImage') 7 | #elseif renderer_process 8 | @:jsRequire('electron', 'remote.nativeImage') 9 | #end 10 | extern class ExtNativeImage { 11 | public function toPNG():Buffer; 12 | public function toJPEG(quality : Int):Buffer; 13 | public function toBitmap():Buffer; 14 | public function toDataURL():String; 15 | public function getBitmap():Buffer; 16 | public function isEmpty():Bool; 17 | public function getSize():{width:Int, height:Int}; 18 | public function setTemplateImage(v : Bool):Void; 19 | public function isTemplateImage():Bool; 20 | public function crop(rect : T):ExtNativeImage; 21 | public function getAspectRatio():Float; 22 | 23 | public static function createEmpty():ExtNativeImage; 24 | public static function createFromPath(path : String):ExtNativeImage; 25 | public static function createFromBuffer(buffer:Buffer, ?options:CfbOptions):ExtNativeImage; 26 | public static function createFromDataURL(url : String):ExtNativeImage; 27 | } 28 | 29 | typedef CfbOptions = { 30 | ?width : Int, 31 | ?height : Int, 32 | ?scaleFactor : Float 33 | }; 34 | 35 | private typedef RectLike = { 36 | x : Int, 37 | y : Int, 38 | width : Int, 39 | height : Int 40 | }; 41 | -------------------------------------------------------------------------------- /src/electron/ext/GlobalShortcut.hx: -------------------------------------------------------------------------------- 1 | package electron.ext; 2 | 3 | #if main_process 4 | @:jsRequire('electron', 'globalShortcut') 5 | #elseif renderer_process 6 | @:jsRequire('electron', 'remote.globalShortcut') 7 | #end 8 | extern class GlobalShortcut { 9 | static function register(accelerator:String, callback:Void->Void):Void; 10 | static function isRegistered(accelerator : String):Bool; 11 | static function unregister(accelerator : String):Void; 12 | static function unregisterAll():Void; 13 | } 14 | -------------------------------------------------------------------------------- /src/electron/ext/IpcMain.hx: -------------------------------------------------------------------------------- 1 | package electron.ext; 2 | 3 | import haxe.extern.Rest; 4 | import haxe.Constraints.Function; 5 | 6 | @:jsRequire('electron', 'ipcMain') 7 | extern class IpcMain { 8 | public static function on(channel:String, callback:IpcMainEvent->Array->Void):Void; 9 | public static function once(channel:String, callback:IpcMainEvent->Array->Void):Void; 10 | //public static function send(channel:String, data:Rest):Void; 11 | public static function removeListener(channel:String, listener:Function):Void; 12 | public static function removeAllListeners(?channel : String):Void; 13 | } 14 | 15 | typedef IpcMainEvent = { 16 | sender : WebContents, 17 | returnValue : Null 18 | }; 19 | -------------------------------------------------------------------------------- /src/electron/ext/IpcRenderer.hx: -------------------------------------------------------------------------------- 1 | package electron.ext; 2 | 3 | import haxe.Constraints.Function; 4 | 5 | @:jsRequire('electron', 'ipcRenderer') 6 | extern class IpcRenderer { 7 | public static function on(channel:String, callback:IpcRendererEvent->Array->Void):Void; 8 | public static function once(channel:String, callback:IpcRendererEvent->Array->Void):Void; 9 | 10 | public static function removeListener(channel:String, listener:Function):Void; 11 | public static function removeAllListeners(?channel : String):Void; 12 | 13 | public static function send(channel:String, data:Array):Void; 14 | public static function sendToHost(channel:String, data:Array):Void; 15 | public static function sendSync(channel:String, data:Array):T; 16 | } 17 | 18 | typedef IpcRendererEvent = { 19 | sender : IpcRendererMessageSender 20 | }; 21 | 22 | extern class IpcRendererMessageSender { 23 | public function send(channel:String, data:Array):Void; 24 | public function sendSync(channel:String, data:Array):T; 25 | public function sendTo(webContentsId:Int, channel:String, data:Array):Void; 26 | public function sendToAll(webContentsId:Int, channel:String, data:Array):Void; 27 | } 28 | -------------------------------------------------------------------------------- /src/electron/ext/Menu.hx: -------------------------------------------------------------------------------- 1 | package electron.ext; 2 | 3 | import js.html.Window; 4 | 5 | import electron.ext.MenuItem; 6 | 7 | #if main_process 8 | @:jsRequire('electron', 'Menu') 9 | #elseif renderer_process 10 | @:jsRequire('electron', 'remote.Menu') 11 | #end 12 | extern class Menu { 13 | /* === Instance Fields === */ 14 | 15 | public var items : Array; 16 | 17 | /* === Instance Methods === */ 18 | 19 | public function new():Void; 20 | 21 | //@:overload(function(x:Float, y:Float):Void {}) 22 | public function popup(options: {?x:Float,?y:Float,?window:BrowserWindow}):Void; 23 | public function append(item : MenuItem):Void; 24 | public function insert(pos:Int, item:MenuItem):Void; 25 | 26 | /* === Static Methods === */ 27 | 28 | public static function setApplicationMenu(menu : Menu):Void; 29 | public static function getApplicationMenu():Menu; 30 | public static function buildFromTemplate(template : Array):Menu; 31 | } 32 | -------------------------------------------------------------------------------- /src/electron/ext/Remote.hx: -------------------------------------------------------------------------------- 1 | package electron.ext; 2 | 3 | @:jsRequire('electron', 'remote') 4 | extern class Remote { 5 | public static function require(name : String):Dynamic; 6 | public static function getCurrentWindow():BrowserWindow; 7 | public static function getCurrentWebContents():WebContents; 8 | } 9 | -------------------------------------------------------------------------------- /src/electron/ext/Session.hx: -------------------------------------------------------------------------------- 1 | package electron.ext; 2 | 3 | import haxe.extern.*; 4 | 5 | import tannus.node.EventEmitter; 6 | import tannus.node.Buffer; 7 | 8 | extern class Session extends EventEmitter { 9 | function setDownloadPath(path : String):Void; 10 | function setUserAgent(userAgent : String):Void; 11 | function getUserAgent():String; 12 | function getBlobData(id:String, callback:Buffer->Void):Void; 13 | 14 | var cookies : Cookies; 15 | } 16 | -------------------------------------------------------------------------------- /src/electron/ipc/IpcAddress.hx: -------------------------------------------------------------------------------- 1 | package electron.ipc; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | 6 | import haxe.Serializer; 7 | import haxe.Unserializer; 8 | 9 | import Std.*; 10 | import tannus.math.TMath.*; 11 | 12 | using StringTools; 13 | using tannus.ds.StringUtils; 14 | using tannus.ds.ArrayTools; 15 | using Lambda; 16 | using Slambda; 17 | 18 | /** 19 | * class that represents an ipc-address 20 | */ 21 | class IpcAddress { 22 | /* Constructor Function */ 23 | public function new(id:String, type:IpcAddressType):Void { 24 | this.id = id; 25 | this.type = type; 26 | } 27 | 28 | /* === Instance Methods === */ 29 | 30 | /** 31 | * create and return a deep-copy of [this] 32 | */ 33 | public function clone():IpcAddress { 34 | return new IpcAddress( 35 | this.id, 36 | this.type 37 | ); 38 | } 39 | 40 | // serialize [this] 41 | @:keep 42 | public function hxSerialize(s : Serializer):Void { 43 | var w = s.serialize; 44 | 45 | w( id ); 46 | w( type ); 47 | } 48 | 49 | // unserialize [this] 50 | @:keep 51 | public function hxUnserialize(u : Unserializer):Void { 52 | var r = u.unserialize; 53 | 54 | id = r(); 55 | type = r(); 56 | } 57 | 58 | /* === Instance Fields === */ 59 | 60 | public var id : String; 61 | public var type : IpcAddressType; 62 | } 63 | -------------------------------------------------------------------------------- /src/electron/ipc/IpcAddressType.hx: -------------------------------------------------------------------------------- 1 | package electron.ipc; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | 6 | import Std.*; 7 | import tannus.math.TMath.*; 8 | 9 | using StringTools; 10 | using tannus.ds.StringUtils; 11 | using tannus.ds.ArrayTools; 12 | using Lambda; 13 | using Slambda; 14 | 15 | /** 16 | * enumerator representing the different types of ipc addresses 17 | */ 18 | enum IpcAddressType { 19 | // the main process 20 | TMain; 21 | 22 | // a renderer process, identified by its id 23 | TBrowserWindow(windowId : Int); 24 | } 25 | -------------------------------------------------------------------------------- /src/electron/ipc/IpcBusPacket.hx: -------------------------------------------------------------------------------- 1 | package electron.ipc; 2 | 3 | enum IpcBusPacket { 4 | Connect(address : IpcAddress); 5 | Message(message : IpcFrozenMessage); 6 | } 7 | -------------------------------------------------------------------------------- /src/electron/ipc/IpcMessageType.hx: -------------------------------------------------------------------------------- 1 | package electron.ipc; 2 | 3 | enum IpcMessageType { 4 | TNormal; 5 | TDestroy; 6 | TReply; 7 | } 8 | -------------------------------------------------------------------------------- /src/electron/ipc/IpcTools.hx: -------------------------------------------------------------------------------- 1 | package electron.ipc; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | 6 | import electron.ipc.IpcBusPacket; 7 | import electron.ipc.IpcAddressType; 8 | 9 | import haxe.Serializer; 10 | import haxe.Unserializer; 11 | 12 | import Std.*; 13 | import tannus.math.TMath.*; 14 | 15 | using StringTools; 16 | using tannus.ds.StringUtils; 17 | using tannus.ds.ArrayTools; 18 | using Lambda; 19 | using Slambda; 20 | 21 | class IpcTools { 22 | /* === Static Extension Methods === */ 23 | 24 | /* === Global Methods === */ 25 | 26 | /** 27 | * raise the 'not implemented' error 28 | */ 29 | public static macro function ni() { 30 | return macro throw 'Not implemented!'; 31 | } 32 | 33 | /** 34 | * shorthand to serialize a value 35 | */ 36 | public static function serialize(value : T):String { 37 | var s:Serializer = new Serializer(); 38 | s.useCache = s.useEnumIndex = true; 39 | s.serialize( value ); 40 | return s.toString(); 41 | } 42 | 43 | /** 44 | * shorthand to unserialize a value 45 | */ 46 | public static inline function unserialize(data : String):Dynamic { 47 | return Unserializer.run( data ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/ffmpeg/FFfmpeg.hx: -------------------------------------------------------------------------------- 1 | package ffmpeg; 2 | 3 | typedef FFfmpeg = ffmpeg.Fluent; 4 | -------------------------------------------------------------------------------- /src/ffmpeg/FluentTools.hx: -------------------------------------------------------------------------------- 1 | package ffmpeg; 2 | 3 | import tannus.node.*; 4 | import tannus.sys.*; 5 | import tannus.ds.*; 6 | import tannus.TSys.systemName; 7 | 8 | import haxe.Constraints.Function; 9 | import haxe.extern.EitherType; 10 | 11 | import pman.async.*; 12 | 13 | using StringTools; 14 | using tannus.ds.StringUtils; 15 | using Lambda; 16 | using tannus.ds.ArrayTools; 17 | using Slambda; 18 | 19 | class FluentTools { 20 | private static var _isWin:Null = null; 21 | private static var _exeRoot:Null = null; 22 | 23 | public static function _gather():Void { 24 | if (_isWin == null) { 25 | _isWin = (systemName() == 'Windows'); 26 | } 27 | if ( _isWin ) { 28 | if (_exeRoot == null) { 29 | _exeRoot = pman.edb.AppDir.getAppPath('assets/ffmpeg-static'); 30 | } 31 | Fluent.setFfmpegPath(_exeRoot.plusString('ffmpeg.exe')); 32 | Fluent.setFfprobePath(_exeRoot.plusString('ffprobe.exe')); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/foundation/README.md: -------------------------------------------------------------------------------- 1 | # haxe-foundation 2 | Foundation widgets written in Haxe 3.2 3 | -------------------------------------------------------------------------------- /src/foundation/src/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Ignore SWAP Files 3 | foundation/*.swp 4 | -------------------------------------------------------------------------------- /src/foundation/src/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## haxe-foundation - Foundation Widgets in Haxe 3.2 3 | 4 | The aim of haxe-foundation is to provide a complete, object-oriented interface to the Foundation library, for quickly creating rich user interfaces 5 | in Haxe, for the client-side JavaScript target (of course). Currently only in alpha. Documentation coming soon. 6 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/AlertPane.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import foundation.Pane; 4 | import foundation.Link; 5 | 6 | class AlertPane extends Pane { 7 | /* Constructor Function */ 8 | public function new():Void { 9 | super(); 10 | addClass('alert-box'); 11 | el.attr('data-alert', 'yes'); 12 | closeButton = new Link('', '#'); 13 | closeButton.el.html('×'); 14 | closeButton.addClass('close'); 15 | append(closeButton); 16 | 17 | addSignals(['close']); 18 | on('activate', function(me) { 19 | engage(); 20 | }); 21 | closeButton.on('click', function(e) { 22 | dispatch('close', this); 23 | destroy(); 24 | }); 25 | } 26 | 27 | /* === Instance Methods === */ 28 | 29 | /** 30 | * Close [this] AlertPane 31 | */ 32 | public function close():Void { 33 | closeButton.click(); 34 | destroy(); 35 | } 36 | 37 | /* === Instance Fields === */ 38 | 39 | /* The button used to 'close' [this] Alert */ 40 | private var closeButton : Link; 41 | } 42 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/BaseLabel.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import tannus.html.Win; 4 | import tannus.html.Element; 5 | 6 | class BaseLabel extends TextualWidget { 7 | /* Constructor Function */ 8 | public function new():Void { 9 | super(); 10 | 11 | el = ''; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/BoolInput.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import foundation.TextualWidget; 4 | import foundation.IInput; 5 | 6 | using StringTools; 7 | using tannus.ds.StringUtils; 8 | using Lambda; 9 | using tannus.ds.ArrayTools; 10 | 11 | /** 12 | * class TextInput wraps js.html.InputElement[type=text] 13 | */ 14 | class BoolInput extends DOMInput { 15 | /* Constructor Function */ 16 | public function new():Void { 17 | super(); 18 | 19 | ntype = 'checkbox'; 20 | } 21 | 22 | /* === Instance Methods === */ 23 | 24 | override public function getValue():Null return iel.checked; 25 | override public function setValue(v : Null):Void (iel.checked = v); 26 | 27 | /* === Computed Instance Fields === */ 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/ButtonSize.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | @:enum 4 | abstract ButtonSize (String) from String to String { 5 | var Tiny = 'tiny'; 6 | var Small = 'small'; 7 | var Normal = ''; 8 | var Large = 'large'; 9 | var Fill = 'expand'; 10 | } 11 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/Canvas.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import tannus.html.Element; 4 | 5 | import js.html.Image in JsImage; 6 | 7 | import gryffin.display.Canvas in Can; 8 | 9 | import Math.*; 10 | import tannus.math.TMath.*; 11 | 12 | @:access( gryffin.display.Canvas ) 13 | class Canvas extends Widget { 14 | /* Constructor Function */ 15 | public function new(?c : Can):Void { 16 | super(); 17 | 18 | if (c == null) { 19 | c = Can.create(0, 0); 20 | } 21 | canvas = c; 22 | 23 | el = new Element( canvas.canvas ); 24 | } 25 | 26 | /* === Instance Fields === */ 27 | 28 | public var canvas(default, null):Can; 29 | } 30 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/DrilldownMenu.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import foundation.Pane; 4 | 5 | import tannus.ds.*; 6 | 7 | import Std.*; 8 | import Math.*; 9 | import tannus.math.TMath.*; 10 | 11 | using Lambda; 12 | using tannus.ds.ArrayTools; 13 | using StringTools; 14 | using tannus.ds.StringUtils; 15 | using tannus.math.TMath; 16 | 17 | class DrilldownMenu extends List { 18 | /* Constructor Function */ 19 | public function new():Void { 20 | super( false ); 21 | 22 | el['data-drilldown'] = 'yes'; 23 | addClass( 'vertical' ); 24 | addClass( 'menu' ); 25 | } 26 | 27 | /* === Instance Methods === */ 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/Dropdown.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import Std.*; 4 | import Std.is in istype; 5 | import Math.*; 6 | import tannus.math.TMath.*; 7 | import tannus.internal.TypeTools; 8 | import tannus.internal.CompileTime in Ct; 9 | import foundation.Tools.*; 10 | 11 | using Lambda; 12 | using tannus.ds.ArrayTools; 13 | using StringTools; 14 | using tannus.ds.StringUtils; 15 | using tannus.math.TMath; 16 | //using foundation.Tools; 17 | 18 | class Dropdown extends Pane { 19 | /* Constructor Function */ 20 | public function new():Void { 21 | super(); 22 | 23 | addClass( 'dropdown-pane' ); 24 | el['data-dropdown'] = ''; 25 | 26 | ddi = Foundation.pluginInstance('Dropdown', [el]); 27 | 28 | build(); 29 | } 30 | 31 | /* === Instance Methods === */ 32 | 33 | override public function activate():Void { 34 | super.activate(); 35 | } 36 | 37 | override private function populate():Void { 38 | super.populate(); 39 | } 40 | 41 | public function open():Void { 42 | ddi.open(); 43 | } 44 | 45 | public function close():Void { 46 | ddi.close(); 47 | } 48 | 49 | public function toggle():Void { 50 | ddi.toggle(); 51 | } 52 | 53 | /* === Instance Fields === */ 54 | 55 | // Foundation.Dropdown instance itself 56 | private var ddi : Dynamic; 57 | } 58 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/FloatInput.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import foundation.TextualWidget; 4 | import foundation.IInput; 5 | 6 | using StringTools; 7 | using tannus.ds.StringUtils; 8 | using Lambda; 9 | using tannus.ds.ArrayTools; 10 | 11 | /** 12 | * class TextInput wraps js.html.InputElement[type=text] 13 | */ 14 | class FloatInput extends DOMInput { 15 | /* Constructor Function */ 16 | public function new():Void { 17 | super(); 18 | 19 | ntype = 'number'; 20 | } 21 | 22 | /* === Instance Methods === */ 23 | 24 | override public function getValue():Float return iel.valueAsNumber; 25 | override public function setValue(v : Float):Float return (iel.valueAsNumber = v); 26 | } 27 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/Grid.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import tannus.html.Element; 4 | import tannus.html.ElAttributes; 5 | import tannus.io.Ptr; 6 | import tannus.io.Signal; 7 | 8 | import foundation.List; 9 | 10 | using Lambda; 11 | using StringTools; 12 | 13 | class Grid extends List { 14 | /* Constructor Function */ 15 | public function new(?column_count:Int=3):Void { 16 | super(); 17 | 18 | cols = column_count; 19 | } 20 | 21 | /* === Computed Instance Fields === */ 22 | 23 | /** 24 | * The number of Blocks per row in [this] Grid 25 | */ 26 | public var cols(get, set):Int; 27 | private inline function get_cols() return _cols; 28 | private function set_cols(nc : Int) { 29 | var ls = el.classes.filter(function(s) return (s.indexOf('block-grid') == -1)); 30 | ls.push('small-block-grid-$nc'); 31 | el.classes = ls; 32 | _cols = nc; 33 | return _cols; 34 | } 35 | 36 | /* === Instance Fields === */ 37 | 38 | private var _cols:Int; 39 | } 40 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/Heading.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import foundation.TextualWidget; 4 | 5 | class Heading extends TextualWidget { 6 | /* Constructor Function */ 7 | public function new(lvl:Int, ?txt:String):Void { 8 | super(); 9 | 10 | el = ''; 11 | if (txt != null) 12 | text = txt; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/IInput.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | /** 4 | * Interface to represent an data-input widget 5 | */ 6 | interface IInput { 7 | /* The 'name' of [this] Input */ 8 | var name(get, set) : String; 9 | 10 | /* Obtain the value of [this] Input */ 11 | function getValue():T; 12 | 13 | /* Assign the value of [this] Input */ 14 | function setValue(v : T):T; 15 | } 16 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/Icon.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import foundation.IconType; 4 | 5 | using StringTools; 6 | using tannus.ds.StringUtils; 7 | using Lambda; 8 | using tannus.ds.ArrayTools; 9 | 10 | class Icon extends TextualWidget { 11 | /* Constructor Function */ 12 | public function new(?type : IconType):Void { 13 | super(); 14 | 15 | el = ''; 16 | 17 | if (type != null) { 18 | this.type = type; 19 | } 20 | } 21 | 22 | /* === Computed Instance Fields === */ 23 | 24 | public var type(get, set):Null; 25 | private function get_type():Null { 26 | return classes().macfirstMatch(_.startsWith('fi-')); 27 | } 28 | private function set_type(v : Null):Null { 29 | var t = type; 30 | if (t != null) { 31 | removeClass( t ); 32 | } 33 | if (v != null) { 34 | addClass( v ); 35 | } 36 | return type; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/Input.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | class Input extends Widget { 4 | public function getValue():Null return null; 5 | public function setValue(value : T):Void {}; 6 | } 7 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/LabelSpan.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import tannus.html.Element; 4 | 5 | using StringTools; 6 | 7 | class LabelSpan extends Widget { 8 | /* Constructor Function */ 9 | public function new():Void { 10 | super(); 11 | 12 | el = ''; 13 | addClass( 'label' ); 14 | } 15 | 16 | /* === Instance Methods === */ 17 | 18 | /* 19 | "class switch" 20 | @param [name] 21 | @type String 22 | */ 23 | private inline function cs(n:String, v:Bool=true):Bool { 24 | (v ? addClass : removeClass)( n ); 25 | return is( '.$n' ); 26 | } 27 | 28 | public inline function secondary(?v : Bool):Void cs('secondary', v); 29 | public inline function success(?v : Bool):Void cs('success', v); 30 | public inline function alert(?v : Bool):Void cs('alter', v); 31 | public inline function warning(?v : Bool):Void cs('warning', v); 32 | 33 | /* === Computed Instance Fields === */ 34 | /* === Instance Fields === */ 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/ListItem.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import foundation.Pane; 4 | 5 | import tannus.ds.*; 6 | 7 | import Std.*; 8 | import Math.*; 9 | import tannus.math.TMath.*; 10 | 11 | using Lambda; 12 | using tannus.ds.ArrayTools; 13 | using StringTools; 14 | using tannus.ds.StringUtils; 15 | using tannus.math.TMath; 16 | 17 | class ListItem extends Widget { 18 | /* Constructor Function */ 19 | public function new(l:List, ?c:Dynamic):Void { 20 | super(); 21 | 22 | el = '
  • '; 23 | if (c != null) { 24 | setContent( c ); 25 | } 26 | } 27 | 28 | public inline function setContent(c : Dynamic):Void { 29 | append( c ); 30 | content = c; 31 | } 32 | 33 | /* === Instance Fields === */ 34 | 35 | public var content : Dynamic; 36 | } 37 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/Pane.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import tannus.geom.Point; 4 | import tannus.geom.Rectangle; 5 | import tannus.math.TMath; 6 | import tannus.graphics.Color; 7 | 8 | import foundation.Widget; 9 | 10 | class Pane extends Widget { 11 | /* Constructor Function */ 12 | public function new():Void { 13 | super(); 14 | 15 | el = '
    '; 16 | } 17 | 18 | /* === Instance Methods === */ 19 | 20 | /* === Computed Instance Fields === */ 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/Panel.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import foundation.Pane; 4 | 5 | class Panel extends Pane { 6 | /* Constructor Function */ 7 | public function new():Void { 8 | super(); 9 | addClass('panel'); 10 | } 11 | 12 | /* === Computed Instance Fields === */ 13 | 14 | /** 15 | * Whether [this] Panel has rounded corners 16 | */ 17 | public var roundCorners(get, set):Bool; 18 | private function get_roundCorners() return el.is('.radius'); 19 | private function set_roundCorners(r : Bool):Bool { 20 | (r?addClass:removeClass)('radius'); 21 | return r; 22 | } 23 | 24 | /** 25 | * Whether [this] Panel has rounded sides 26 | */ 27 | public var roundSides(get, set):Bool; 28 | private function get_roundSides() return el.is('.round'); 29 | private function set_roundSides(r : Bool):Bool { 30 | (r?addClass:removeClass)('round'); 31 | return r; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/Paragraph.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import foundation.TextualWidget; 4 | 5 | class Paragraph extends TextualWidget { 6 | /* Constructor Function */ 7 | public function new(?txt : String):Void { 8 | super(); 9 | el = '

    '; 10 | if (txt != null) 11 | text = txt; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/Span.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import foundation.TextualWidget in TWidget; 4 | import tannus.html.Element; 5 | 6 | class Span extends TWidget { 7 | /* Constructor Function */ 8 | public function new(?txt : String):Void { 9 | super(); 10 | el = ''; 11 | if (txt != null) 12 | text = txt; 13 | } 14 | 15 | /* === Instance Fields === */ 16 | } 17 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/TableHeadRow.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import tannus.ds.*; 4 | import tannus.io.*; 5 | import tannus.html.Element; 6 | 7 | class TableHeadRow extends TextualWidget { 8 | /* Constructor Function */ 9 | public function new(h:TableHead):Void { 10 | super(); 11 | 12 | el = ''; 13 | el.data('widget', this); 14 | 15 | head = h; 16 | } 17 | 18 | /* === Instance Methods === */ 19 | 20 | /* === Instance Fields === */ 21 | 22 | public var head : TableHead; 23 | } 24 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/TextInput.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import foundation.TextualWidget; 4 | import foundation.IInput; 5 | 6 | using StringTools; 7 | using tannus.ds.StringUtils; 8 | using Lambda; 9 | using tannus.ds.ArrayTools; 10 | 11 | /** 12 | * class TextInput wraps js.html.InputElement[type=text] 13 | */ 14 | class TextInput extends DOMInput { 15 | /* Constructor Function */ 16 | public function new():Void { 17 | super(); 18 | 19 | ntype = 'text'; 20 | 21 | forwardEvents(['input', 'keypress', 'keydown', 'keyup'], el, tannus.events.KeyboardEvent.fromJqEvent); 22 | } 23 | 24 | public var placeholder(get, set):String; 25 | private inline function get_placeholder():String return (el['placeholder'].or('')); 26 | private inline function set_placeholder(v : String):String return (el['placeholder'] = v); 27 | } 28 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/WidgetAsset.hx: -------------------------------------------------------------------------------- 1 | package foundation; 2 | 3 | import tannus.ds.Destructible; 4 | 5 | /** 6 | * Interface for an object which can be 'attached' to a Widget 7 | */ 8 | interface WidgetAsset extends Destructible { 9 | function activate():Void; 10 | } 11 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/styles/Display.hx: -------------------------------------------------------------------------------- 1 | package foundation.styles; 2 | 3 | @:enum 4 | abstract Display (String) from String to String { 5 | var None = 'none'; 6 | var Inline = 'inline'; 7 | var Block = 'block'; 8 | var InlineBlock = 'inline-block'; 9 | var Contents = 'contents'; 10 | var ListItem = 'list-item'; 11 | var InlineListItem = 'inline-list-item'; 12 | var Table = 'table'; 13 | } 14 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/styles/EFloat.hx: -------------------------------------------------------------------------------- 1 | package foundation.styles; 2 | 3 | @:enum 4 | abstract EFloat (String) from String to String { 5 | var Left = 'left'; 6 | var Right = 'right'; 7 | var None = 'none'; 8 | var InlineStart = 'inline-start'; 9 | var InlineEnd = 'inline-end'; 10 | } 11 | -------------------------------------------------------------------------------- /src/foundation/src/foundation/styles/TextAlign.hx: -------------------------------------------------------------------------------- 1 | package foundation.styles; 2 | 3 | @:enum 4 | abstract TextAlign (String) from String to String { 5 | var Start = 'start'; 6 | var End = 'end'; 7 | var Left = 'left'; 8 | var Right = 'right'; 9 | var Center = 'center'; 10 | var Justify = 'justify'; 11 | var JustifyAll = 'justify-all'; 12 | var MatchParent = 'match-parent'; 13 | } 14 | -------------------------------------------------------------------------------- /src/ida/ida/Cursor.hx: -------------------------------------------------------------------------------- 1 | package ida; 2 | 3 | typedef Cursor = ida.backend.idb.IDBCursor; 4 | -------------------------------------------------------------------------------- /src/ida/ida/Database.hx: -------------------------------------------------------------------------------- 1 | package ida; 2 | 3 | // for now, ida.Database is just an alias to ida.backend.idb.IDBDatabase 4 | 5 | typedef Database = ida.backend.idb.IDBDatabase; 6 | -------------------------------------------------------------------------------- /src/ida/ida/DatabaseConnector.hx: -------------------------------------------------------------------------------- 1 | package ida; 2 | 3 | typedef DatabaseConnector = ida.backend.idb.IDBDatabaseConnector; 4 | -------------------------------------------------------------------------------- /src/ida/ida/Index.hx: -------------------------------------------------------------------------------- 1 | package ida; 2 | 3 | typedef Index = ida.backend.idb.IDBIndex; 4 | -------------------------------------------------------------------------------- /src/ida/ida/ObjectStore.hx: -------------------------------------------------------------------------------- 1 | package ida; 2 | 3 | typedef ObjectStore = ida.backend.idb.IDBObjectStore; 4 | -------------------------------------------------------------------------------- /src/ida/ida/Transaction.hx: -------------------------------------------------------------------------------- 1 | package ida; 2 | 3 | typedef Transaction = ida.backend.idb.IDBTransaction; 4 | -------------------------------------------------------------------------------- /src/ida/ida/backend/core/BasicDatabase.hx: -------------------------------------------------------------------------------- 1 | package ida.backend.core; 2 | 3 | import tannus.ds.*; 4 | import tannus.ds.promises.*; 5 | import tannus.io.*; 6 | 7 | import ida.Utils; 8 | 9 | import Std.*; 10 | 11 | using Lambda; 12 | using tannus.ds.ArrayTools; 13 | using tannus.html.JSTools; 14 | using ida.Utils; 15 | 16 | /** 17 | * Base-class for a backend Database implementation 18 | */ 19 | class BasicDatabase { 20 | /* Constructor Function */ 21 | public function new():Void { 22 | 23 | } 24 | 25 | /* === Instance Methods === */ 26 | 27 | /* create a new ObjectStore */ 28 | public function createObjectStore(name:String, callback:Null->Null->Void):Void { 29 | throw 'Not implemented'; 30 | } 31 | 32 | /* === Computed Instance Fields === */ 33 | 34 | /* the name of [this] database */ 35 | public var name(get, never):String; 36 | private function get_name():String return ''; 37 | 38 | /* the names of the objectStores in [this] Database */ 39 | public var objectStoreNames(get, never):Array; 40 | private function get_objectStoreNames():Array return []; 41 | } 42 | -------------------------------------------------------------------------------- /src/ida/ida/backend/core/BasicObjectStore.hx: -------------------------------------------------------------------------------- 1 | package ida.backend.core; 2 | 3 | import tannus.ds.*; 4 | import tannus.ds.promises.*; 5 | import tannus.io.*; 6 | 7 | import ida.Utils; 8 | 9 | import Std.*; 10 | 11 | using Lambda; 12 | using tannus.ds.ArrayTools; 13 | using tannus.html.JSTools; 14 | using ida.Utils; 15 | 16 | class BasicObjectStore { 17 | /* Constructor Function */ 18 | public function new():Void { 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/ida/ida/backend/idb/IDBFunctionalCursorWalker.hx: -------------------------------------------------------------------------------- 1 | package ida.backend.idb; 2 | 3 | import tannus.ds.*; 4 | import tannus.io.Signal; 5 | import tannus.io.VoidSignal; 6 | import tannus.html.Win; 7 | 8 | import js.html.idb.*; 9 | import js.html.DOMError; 10 | import haxe.Constraints.Function; 11 | 12 | import ida.Utils; 13 | 14 | import Std.*; 15 | 16 | using Lambda; 17 | using tannus.ds.ArrayTools; 18 | using tannus.html.JSTools; 19 | using ida.Utils; 20 | 21 | class IDBFunctionalCursorWalker extends IDBCursorWalker { 22 | /* Constructor Function */ 23 | public function new(r:Request, f:IDBCursor->IDBCursorWalker->Void):Void { 24 | super( r ); 25 | 26 | body = f; 27 | } 28 | 29 | /* === Instance Methods === */ 30 | 31 | /** 32 | * do the stuff 33 | */ 34 | override public function step(cursor : IDBCursor):Void { 35 | var next = cursor.next.bind(); 36 | var calledNext:Bool = false; 37 | (untyped cursor).next = function(?key:Dynamic){ 38 | next(); 39 | calledNext = true; 40 | }; 41 | 42 | body(cursor, this); 43 | 44 | if ( aborted ) { 45 | complete.fire(); 46 | return ; 47 | } 48 | else if ( !calledNext ) { 49 | cursor.next(); 50 | } 51 | } 52 | 53 | /* === Instance Fields === */ 54 | 55 | private var body : IDBCursor -> IDBCursorWalker -> Void; 56 | } 57 | -------------------------------------------------------------------------------- /src/make.bat: -------------------------------------------------------------------------------- 1 | 2 | haxe build.hxml workers.hxml && cd ..\dist\ && pack preprocess && electron . && cd ..\src\ -------------------------------------------------------------------------------- /src/makefile: -------------------------------------------------------------------------------- 1 | 2 | all: compile run 3 | 4 | run: 5 | #@read -p "Enter pman args: " args; \ 6 | #cd ../dist/ && electron . $$args; 7 | cd ../dist/ && electron . 8 | 9 | compile: 10 | haxe build.hxml && cd ../dist/ && ./pack preprocess 11 | 12 | compile-compress: 13 | cd ../dist/ && ./pack -p linux -compress recompile preprocess 14 | 15 | compile-release: 16 | cd ../dist/ && ./pack -p linux -release recompile preprocess 17 | 18 | pack: 19 | cd ../dist/ && ./pack -release package 20 | 21 | build-installers: 22 | cd ../dist/ && ./pack -release installer 23 | 24 | pack-all: compile-release 25 | cd ../dist/ && ./pack -p linux -p windows -a x64 -release package 26 | 27 | release: compile-release 28 | #cd ../dist/ && ./pack recompile preprocess package installer -release -p linux -a x64 29 | cd ../dist/ && ./pack -p linux -a x64 -release package installer 30 | 31 | install_deps: 32 | git clone http://github.com/DavisDevelopment/tnative tannus 33 | git clone http://github.com/DavisDevelopment/jsgryf gryffin 34 | git clone http://github.com/DavisDevelopment/edis 35 | haxelib install slambda 36 | haxelib install actuate 37 | haxelib install format 38 | haxelib install electron 39 | cd ../dist/ && npm install 40 | 41 | -------------------------------------------------------------------------------- /src/nedb/DataStore.hx: -------------------------------------------------------------------------------- 1 | package nedb; 2 | 3 | import tannus.node.*; 4 | import tannus.async.*; 5 | 6 | @:jsRequire( 'nedb' ) 7 | extern class DataStore { 8 | public function new(options : Dynamic):Void; 9 | 10 | public function loadDatabase(?callback : VoidCb):Void; 11 | public function insert(doc:Dynamic, callback:Cb):Void; 12 | public function find(query:Dynamic, callback:Cb>):Void; 13 | public function findOne(query:Dynamic, callback:Cb):Void; 14 | public function count(query:Dynamic, callback:Cb):Void; 15 | public function update(query:Dynamic, update:Dynamic, options:UpdateOptions, ?callback:Null->Null->Null->Null->Void):Void; 16 | public function remove(query:Dynamic, options:{multi:Bool}, ?callback:Cb):Void; 17 | public function ensureIndex(options:IndexOptions, ?callback:VoidCb):Void; 18 | public function removeIndex(fieldName:String, ?callback:VoidCb):Void; 19 | } 20 | 21 | typedef IndexOptions = { 22 | fieldName: String, 23 | ?unique: Bool, 24 | ?sparse: Bool, 25 | ?expireAfterSeconds: Float 26 | }; 27 | 28 | typedef UpdateOptions = { 29 | ?multi: Bool, 30 | ?upsert: Bool, 31 | ?returnUpdatedDocs: Bool 32 | }; 33 | -------------------------------------------------------------------------------- /src/package.bat: -------------------------------------------------------------------------------- 1 | 2 | cd ../dist/ && pack recompile preprocess package -p windows -a x64 && cd ../src/ 3 | -------------------------------------------------------------------------------- /src/packer/build.hxml: -------------------------------------------------------------------------------- 1 | 2 | -cp ../tannus/ 3 | #-cp ../gryffin/ 4 | #-cp ../foundation/src/ 5 | #-cp ../crayon/ 6 | #-cp ../ida/ 7 | #-cp ../vex/ 8 | #-cp ../hxpress/src/ 9 | #-cp ../hscript/ 10 | 11 | -lib slambda 12 | -lib format 13 | 14 | -D tannus 15 | -D node 16 | 17 | --each 18 | 19 | -main Packer 20 | -js ../../dist/pack 21 | 22 | -------------------------------------------------------------------------------- /src/packer/make.bat: -------------------------------------------------------------------------------- 1 | 2 | haxe build.hxml && cd ../../dist/ && python prefixer.py && cd ../src/packer/ 3 | -------------------------------------------------------------------------------- /src/packer/makefile: -------------------------------------------------------------------------------- 1 | 2 | all: compile run 3 | # Done 4 | 5 | compile: 6 | haxe build.hxml 7 | cd ../../dist/ && python3 prefixer.py && chmod +x ./pack 8 | #cd ../../dist/ && chmod +x ./pack 9 | 10 | run: 11 | cd ../../dist/ && ./pack rc pp pk -release -asar -p linux -a x64 12 | -------------------------------------------------------------------------------- /src/packer/pack/BatchTask.hx: -------------------------------------------------------------------------------- 1 | package pack; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | import tannus.async.*; 7 | 8 | import pack.*; 9 | 10 | using StringTools; 11 | using tannus.ds.StringUtils; 12 | using Lambda; 13 | using tannus.ds.ArrayTools; 14 | using Slambda; 15 | using pack.Tools; 16 | 17 | class BatchTask extends Task { 18 | public function new(?kids : Iterable):Void { 19 | super(); 20 | 21 | if (kids != null) { 22 | for (t in kids) { 23 | addChild( t ); 24 | } 25 | } 26 | } 27 | 28 | override function execute(done : VoidCb):Void { 29 | done(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/packer/pack/BuildInstallers.hx: -------------------------------------------------------------------------------- 1 | package pack; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | import tannus.async.*; 7 | 8 | import haxe.Json; 9 | import js.Lib.require; 10 | 11 | import pack.*; 12 | import pack.Tools.*; 13 | import pack.PackStandalone as Ps; 14 | 15 | using StringTools; 16 | using tannus.ds.StringUtils; 17 | using Lambda; 18 | using tannus.ds.ArrayTools; 19 | using Slambda; 20 | using pack.Tools; 21 | 22 | class BuildInstallers extends BatchTask { 23 | public function new(o : TaskOptions):Void { 24 | super(); 25 | 26 | for (platform in o.platforms) { 27 | for (arch in o.arches) { 28 | switch ( platform ) { 29 | case 'linux': 30 | addChild(new DebianInstaller( arch )); 31 | 32 | case 'win32', 'windows': 33 | addChild(new WindowsInstaller( arch )); 34 | 35 | default: 36 | throw 'Error: $platform platform not yet supported'; 37 | } 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/packer/pack/BuildStandalones.hx: -------------------------------------------------------------------------------- 1 | package pack; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | import tannus.async.*; 7 | 8 | import haxe.Json; 9 | import js.Lib.require; 10 | 11 | import pack.*; 12 | import pack.Tools.*; 13 | import pack.PackStandalone as Ps; 14 | 15 | using StringTools; 16 | using tannus.ds.StringUtils; 17 | using Lambda; 18 | using tannus.ds.ArrayTools; 19 | using Slambda; 20 | using pack.Tools; 21 | 22 | class BuildStandalones extends BatchTask { 23 | public function new(o : TaskOptions):Void { 24 | super(); 25 | 26 | o.platforms = o.platforms.unique(); 27 | o.arches = o.arches.unique(); 28 | 29 | inline function q(t:Task) 30 | children.push( t ); 31 | 32 | for (platform in o.platforms) { 33 | var appClass:Class = (switch ( platform ) { 34 | case 'linux', 'ubuntu': LinuxApp; 35 | case 'win32', 'windows': WindowsApp; 36 | default: PackStandalone; 37 | }); 38 | for (arch in o.arches) { 39 | var pack = Type.createInstance(appClass, untyped [o, arch]); 40 | q( pack ); 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/packer/pack/CompileApp.hx: -------------------------------------------------------------------------------- 1 | package pack; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | import tannus.async.*; 7 | 8 | import haxe.Json; 9 | import js.Lib.require; 10 | 11 | import pack.*; 12 | import pack.Tools.*; 13 | 14 | using StringTools; 15 | using tannus.ds.StringUtils; 16 | using Lambda; 17 | using tannus.ds.ArrayTools; 18 | using Slambda; 19 | using pack.Tools; 20 | 21 | class CompileApp extends Task { 22 | /* Constructor Function */ 23 | public function new(o : TaskOptions):Void { 24 | super(); 25 | 26 | defines = o.app.haxeDefs; 27 | } 28 | 29 | override function execute(callback : VoidCb):Void { 30 | var args:Array = []; 31 | for (d in defines) { 32 | args.push('-D'); 33 | args.push( d ); 34 | } 35 | args.push('build.hxml'); 36 | var cwd:Path = path().normalize().resolve( '../src' ).normalize(); 37 | trace( cwd ); 38 | shell = new ShellSpawnTask('haxe', args, { 39 | cwd: cwd.toString(), 40 | stdio: 'inherit' 41 | }); 42 | shell.execute(function(?error : Dynamic) { 43 | callback( error ); 44 | }); 45 | } 46 | 47 | public var defines:Array; 48 | public var shell:ShellSpawnTask; 49 | } 50 | -------------------------------------------------------------------------------- /src/packer/pack/CompileWorkers.hx: -------------------------------------------------------------------------------- 1 | package pack; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | import tannus.sys.FileSystem as Fs; 7 | import tannus.async.*; 8 | 9 | import haxe.Json; 10 | import js.Lib.require; 11 | 12 | import pack.*; 13 | import pack.CompressJs; 14 | import pack.Tools.*; 15 | 16 | using StringTools; 17 | using tannus.ds.StringUtils; 18 | using Lambda; 19 | using tannus.ds.ArrayTools; 20 | using Slambda; 21 | using pack.Tools; 22 | 23 | class CompileWorkers extends BatchTask { 24 | /* Constructor Function */ 25 | public function new():Void { 26 | super(); 27 | } 28 | 29 | /* === Instance Methods === */ 30 | 31 | /** 32 | * execute [this] 33 | */ 34 | override function execute(callback: VoidCb):Void { 35 | var scripts = Fs.readDirectory(path('scripts/')).filter.fn(_.endsWith('.worker.js')).map(fn(path('scripts/').plusString(_))); 36 | var compressors:Array = [JsCompressor.Uglify, JsCompressor.Closure]; 37 | for (script in scripts) { 38 | addChild(new CompressJs(script, compressors)); 39 | } 40 | callback(); 41 | } 42 | 43 | /* === Instance Fields === */ 44 | } 45 | -------------------------------------------------------------------------------- /src/packer/pack/EBuild.hx: -------------------------------------------------------------------------------- 1 | package pack; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | import tannus.async.*; 7 | 8 | import haxe.Json; 9 | import js.Lib.require; 10 | 11 | import pack.*; 12 | import pack.Tools.*; 13 | 14 | using StringTools; 15 | using tannus.ds.StringUtils; 16 | using Lambda; 17 | using tannus.ds.ArrayTools; 18 | using Slambda; 19 | using pack.Tools; 20 | 21 | class EBuild extends Task { 22 | // 23 | } 24 | -------------------------------------------------------------------------------- /src/packer/pack/LinuxApp.hx: -------------------------------------------------------------------------------- 1 | package pack; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | import tannus.async.*; 7 | 8 | import haxe.Json; 9 | import js.Lib.require; 10 | 11 | import pack.*; 12 | import pack.Tools.*; 13 | import pack.PackStandalone; 14 | 15 | using StringTools; 16 | using tannus.ds.StringUtils; 17 | using Lambda; 18 | using tannus.ds.ArrayTools; 19 | using Slambda; 20 | using pack.Tools; 21 | 22 | class LinuxApp extends PackStandalone { 23 | /* Constructor Function */ 24 | public function new(o:TaskOptions, arch:String, ?opts:Array):Void { 25 | super(o, 'linux', arch, opts); 26 | } 27 | 28 | /* === Instance Methods === */ 29 | 30 | override function buildOptions(ol : Array):PackagerOptions { 31 | var po = super.buildOptions( ol ); 32 | if (go.hasFlag('-asar')) { 33 | po.asar = true; 34 | } 35 | return po; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/packer/pack/PromptedTask.hx: -------------------------------------------------------------------------------- 1 | package pack; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | import tannus.async.*; 7 | 8 | import pack.Tools.*; 9 | 10 | using StringTools; 11 | using tannus.ds.StringUtils; 12 | using Lambda; 13 | using tannus.ds.ArrayTools; 14 | using Slambda; 15 | using pack.Tools; 16 | 17 | class PromptedTask extends pack.Task { 18 | /* Constructor Function */ 19 | public function new():Void { 20 | super(); 21 | } 22 | 23 | /* === Instance Methods === */ 24 | 25 | /** 26 | * Prompt the user for input regarding [this] Task 27 | */ 28 | public function prompt(done : Void->Void):Void { 29 | done(); 30 | } 31 | 32 | /** 33 | * run [this] Task 34 | */ 35 | override function run(?cb : ?Dynamic->Void):Void { 36 | prompt(function() { 37 | if (cb == null) { 38 | cb = (function(?error : Dynamic) null); 39 | } 40 | super.run( cb ); 41 | }); 42 | } 43 | 44 | /* === Instance Fields === */ 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/packer/pack/WindowsApp.hx: -------------------------------------------------------------------------------- 1 | package pack; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | import tannus.async.*; 7 | 8 | import haxe.Json; 9 | import js.Lib.require; 10 | 11 | import pack.*; 12 | import pack.Tools.*; 13 | import pack.PackStandalone; 14 | 15 | using StringTools; 16 | using tannus.ds.StringUtils; 17 | using Lambda; 18 | using tannus.ds.ArrayTools; 19 | using Slambda; 20 | using pack.Tools; 21 | 22 | class WindowsApp extends PackStandalone { 23 | /* Constructor Function */ 24 | public function new(o:TaskOptions, arch:String, ?opts:Array):Void { 25 | super(o, 'win32', arch, opts); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/pman/Assets.hx: -------------------------------------------------------------------------------- 1 | package pman; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | 7 | import electron.ext.*; 8 | 9 | import gryffin.core.*; 10 | import gryffin.display.*; 11 | 12 | using StringTools; 13 | using tannus.ds.StringUtils; 14 | using Lambda; 15 | using tannus.ds.ArrayTools; 16 | using Slambda; 17 | 18 | class Assets { 19 | // get the app path 20 | private static inline function ad():Path return App.getAppPath(); 21 | public static inline function getAssetsPath():Path return ad().plusString( 'assets' ); 22 | public static inline function getIconPath(id : String):Path { 23 | return getAssetsPath().plusString( 'icons/$id' ); 24 | } 25 | public static inline function getIconUri(id : String):String { 26 | return ('file://' + getIconPath( id ).toString()); 27 | } 28 | 29 | public static function loadIcon(id : String):Image { 30 | return Image.load('file://${getIconPath( id )}'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/pman/Errors.hx: -------------------------------------------------------------------------------- 1 | package pman; 2 | 3 | class Errors { 4 | public static macro function ni() { 5 | return macro throw 'Error: Not implemented'; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/pman/PManError.hx: -------------------------------------------------------------------------------- 1 | package pman; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.async.*; 6 | import tannus.sys.Path; 7 | 8 | enum PManError { 9 | // TODO 10 | PMESystemError; 11 | 12 | // fs errors 13 | PMEFileSystemError(e: PManFileSystemError); 14 | 15 | // TODO 16 | PMEDatabaseError; 17 | 18 | // media errors 19 | PMEMediaError(e: PManMediaError); 20 | } 21 | 22 | /* 23 | represents an error related to the media system 24 | */ 25 | enum PManMediaError { 26 | // wraps around a native MediaError 27 | EMediaObjectError(e: js.html.MediaError); 28 | 29 | // invalid/malformed URI 30 | EMalformedURIError(uri: String); 31 | } 32 | 33 | /* 34 | represents an error related to the FileSystem 35 | */ 36 | enum PManFileSystemError { 37 | // invalid/malformed FileSystem path 38 | EMalformedPathError(path: String); 39 | 40 | //TODO wraps around an EdisFileSystemError value 41 | EEdisFileSystemError; 42 | 43 | //TODO wraps around a TannusFileSystemError value 44 | ETannusFileSystemError; 45 | } 46 | -------------------------------------------------------------------------------- /src/pman/Tools.hx: -------------------------------------------------------------------------------- 1 | package pman; 2 | 3 | import tannus.io.*; 4 | import tannus.geom.*; 5 | import tannus.events.*; 6 | import tannus.sys.*; 7 | import tannus.media.Duration; 8 | 9 | import electron.ext.*; 10 | import electron.ext.Dialog; 11 | 12 | import Slambda.fn; 13 | import tannus.math.TMath.*; 14 | 15 | using StringTools; 16 | using Lambda; 17 | using Slambda; 18 | using tannus.math.TMath; 19 | 20 | class Tools { 21 | /** 22 | * convert file size to human readable form 23 | */ 24 | public static function formatSize(bytes:Float, si:Bool=true):String { 25 | var thresh:Int = (si ? 1000 : 1024); 26 | if (abs( bytes ) < thresh) { 27 | return (bytes + 'B'); 28 | } 29 | var units : Array; 30 | if ( si ) { 31 | units = ['kB','MB','GB','TB','PB','EB','ZB','YB']; 32 | } 33 | else { 34 | units = ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB']; 35 | } 36 | var u = -1; 37 | do { 38 | bytes /= thresh; 39 | ++u; 40 | } while (abs( bytes ) >= thresh && u < units.length - 1); 41 | return (bytes.toFixed( 1 ) + ' ' + units[u]); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/pman/async/Async.hx: -------------------------------------------------------------------------------- 1 | package pman.async; 2 | 3 | import tannus.ds.*; 4 | 5 | typedef Async = tannus.async.Async; 6 | 7 | /* 8 | @:callable 9 | abstract Async (Cb->Void) from Cb->Void { 10 | public inline function new(f : Cb->Void) 11 | this = f; 12 | 13 | @:to 14 | public function promise():Promise { 15 | return new Promise(function(yield, raise) { 16 | this(function(?error, ?result) { 17 | if (error != null) 18 | return raise( error ); 19 | else if (result != null) 20 | return yield( result ); 21 | else { 22 | trace('Promise left unresolved!'); 23 | } 24 | }); 25 | }); 26 | } 27 | 28 | @:to 29 | public function promiser():Void->Promise { 30 | return promise.bind(); 31 | } 32 | } 33 | */ 34 | -------------------------------------------------------------------------------- /src/pman/async/Asyncs.hx: -------------------------------------------------------------------------------- 1 | package pman.async; 2 | 3 | import tannus.ds.Promise; 4 | import tannus.ds.Stack; 5 | 6 | using Lambda; 7 | using Slambda; 8 | using tannus.ds.ArrayTools; 9 | using tannus.math.TMath; 10 | 11 | typedef Asyncs = tannus.async.Asyncs; 12 | -------------------------------------------------------------------------------- /src/pman/async/Cb.hx: -------------------------------------------------------------------------------- 1 | package pman.async; 2 | 3 | typedef Cb = tannus.async.Cb; 4 | 5 | /* 6 | @:callable 7 | abstract Cb (?Dynamic->?T->Void) from ?Dynamic->?T->Void { 8 | public inline function new(f : ?Dynamic->?T->Void):Void { 9 | this = f; 10 | } 11 | 12 | @:to 13 | public inline function raise():Dynamic->Void return untyped f.bind(_, null); 14 | 15 | @:to 16 | public inline function yield():T->Void return untyped f.bind(null, _); 17 | 18 | @:to 19 | public inline function toVoid():Void->Void return void(); 20 | public inline function void(?val : T):Void->Void { 21 | return f.bind(null, val); 22 | } 23 | 24 | public var f(get, never):?Dynamic->?T->Void; 25 | private inline function get_f():?Dynamic->?T->Void return this; 26 | } 27 | */ 28 | -------------------------------------------------------------------------------- /src/pman/async/ChunkedReadStream.hx: -------------------------------------------------------------------------------- 1 | package pman.async; 2 | 3 | import pman.async.*; 4 | import pman.async.ReadStream; 5 | 6 | using pman.async.Asyncs; 7 | 8 | class ChunkedReadStream extends ReadStream> { 9 | public function readAllChunks(done : Cb>):Void { 10 | var packets:Array = new Array(); 11 | open(function(?error, ?packet) { 12 | if (error != null) 13 | return done(error, null); 14 | 15 | switch ( packet ) { 16 | case RSPData( chunk ): 17 | packets = packets.concat( chunk ); 18 | 19 | case RSPClose: 20 | done(null, packets); 21 | } 22 | }); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/pman/async/MP3MetadataLoader.hx: -------------------------------------------------------------------------------- 1 | package pman.async; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.geom.*; 6 | import tannus.sys.*; 7 | import tannus.node.*; 8 | 9 | import gryffin.core.*; 10 | import gryffin.display.*; 11 | import gryffin.audio.*; 12 | 13 | import pman.core.*; 14 | import pman.media.*; 15 | import pman.tools.mp3duration.MP3Duration; 16 | 17 | import Std.*; 18 | import tannus.math.TMath.*; 19 | import js.Browser.window; 20 | import electron.Tools.defer; 21 | import gryffin.Tools.now; 22 | 23 | using tannus.math.TMath; 24 | using StringTools; 25 | using tannus.ds.StringUtils; 26 | using Lambda; 27 | using tannus.ds.ArrayTools; 28 | using Slambda; 29 | 30 | class MP3MetadataLoader extends MediaMetadataLoader { 31 | override function action(done : Void->Void):Void { 32 | status = 'Loading metadata..'; 33 | progress( 0 ); 34 | MP3Duration.duration(path.toString(), function(error, duration) { 35 | meta.duration = duration; 36 | 37 | meta.audio = {}; 38 | status = 'metadata loaded'; 39 | progress( 100 ); 40 | 41 | defer( done ); 42 | }); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/pman/async/Result.hx: -------------------------------------------------------------------------------- 1 | package pman.async; 2 | 3 | enum Result { 4 | Error(error : L); 5 | Value(value : R); 6 | } 7 | -------------------------------------------------------------------------------- /src/pman/async/Trackable.hx: -------------------------------------------------------------------------------- 1 | package pman.async; 2 | 3 | import tannus.math.Percent; 4 | import tannus.io.*; 5 | import tannus.ds.*; 6 | import tannus.async.Task2 as T2; 7 | 8 | import pman.Globals.*; 9 | import pman.async.Result; 10 | 11 | interface Trackable { 12 | public var progress(default, set):Float; 13 | public var statusMessage(default, set): String; 14 | public var startTime(default, null):Float; 15 | 16 | public var onComplete : Signal>; 17 | public var onProgress : Signal>; 18 | public var onError : Signal; 19 | public var onResult : Signal; 20 | } 21 | -------------------------------------------------------------------------------- /src/pman/async/VoidAsync.hx: -------------------------------------------------------------------------------- 1 | package pman.async; 2 | 3 | typedef VoidAsync = tannus.async.VoidAsync; 4 | 5 | /* 6 | @:callable 7 | abstract VoidAsync (VoidCb->Void) from VoidCb->Void { 8 | public inline function new(f : VoidCb->Void) 9 | this = f; 10 | } 11 | */ 12 | -------------------------------------------------------------------------------- /src/pman/async/VoidAsyncs.hx: -------------------------------------------------------------------------------- 1 | package pman.async; 2 | 3 | import tannus.ds.Stack; 4 | 5 | import haxe.macro.Expr; 6 | import haxe.macro.Context; 7 | 8 | using Lambda; 9 | using Slambda; 10 | using tannus.ds.ArrayTools; 11 | using tannus.math.TMath; 12 | 13 | using haxe.macro.ExprTools; 14 | using tannus.macro.MacroTools; 15 | 16 | typedef VoidAsyncs = tannus.async.VoidAsyncs; 17 | -------------------------------------------------------------------------------- /src/pman/async/VoidCb.hx: -------------------------------------------------------------------------------- 1 | package pman.async; 2 | 3 | typedef VoidCb = tannus.async.VoidCb; 4 | 5 | /* 6 | @:callable 7 | abstract VoidCb (?Dynamic->Void) from ?Dynamic->Void { 8 | public inline function new(f : ?Dynamic->Void):Void { 9 | this = f; 10 | } 11 | 12 | @:to 13 | public inline function void():Void->Void return f.bind(null); 14 | @:to 15 | public inline function raise():Dynamic->Void return untyped f.bind(_); 16 | 17 | public var f(get, never):?Dynamic->Void; 18 | private inline function get_f():?Dynamic->Void return this; 19 | } 20 | */ 21 | -------------------------------------------------------------------------------- /src/pman/bg/PathTools.hx: -------------------------------------------------------------------------------- 1 | package pman.bg; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | import tannus.sys.FileSystem as Fs; 7 | import tannus.async.*; 8 | import tannus.sys.Path; 9 | import tannus.http.Url; 10 | 11 | import pman.bg.media.MediaSource; 12 | import pman.bg.media.MediaRow; 13 | import pman.bg.MediaTools; 14 | 15 | import Slambda.fn; 16 | 17 | using StringTools; 18 | using tannus.ds.StringUtils; 19 | using Slambda; 20 | using tannus.ds.ArrayTools; 21 | using tannus.FunctionTools; 22 | 23 | class PathTools { 24 | /** 25 | * convert a Path to a URI 26 | */ 27 | public static inline function toUri(path: Path):String { 28 | return ('file://' + path.toString()); 29 | } 30 | 31 | /** 32 | * convert a Path to a MediaSource 33 | */ 34 | public static inline function toMediaSource(path: Path):MediaSource { 35 | return UriTools.toMediaSource(toUri( path )); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/pman/bg/db/Table.hx: -------------------------------------------------------------------------------- 1 | package pman.bg.db; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | import tannus.async.*; 7 | import tannus.sys.Path; 8 | import tannus.http.Url; 9 | import tannus.sys.FileSystem as Fs; 10 | 11 | import edis.libs.nedb.*; 12 | import edis.storage.db.*; 13 | 14 | import pman.bg.Dirs; 15 | 16 | import Slambda.fn; 17 | import edis.Globals.*; 18 | 19 | using StringTools; 20 | using tannus.ds.StringUtils; 21 | using Slambda; 22 | using tannus.ds.ArrayTools; 23 | using tannus.FunctionTools; 24 | using pman.bg.MediaTools; 25 | 26 | class Table extends TableWrapper { 27 | /* Constructor Function */ 28 | public function new(store: DataStore):Void { 29 | super( store ); 30 | } 31 | 32 | /* === Instance Methods === */ 33 | 34 | /* === Instance Fields === */ 35 | } 36 | -------------------------------------------------------------------------------- /src/pman/bg/media/ActorRow.hx: -------------------------------------------------------------------------------- 1 | package pman.bg.media; 2 | 3 | import tannus.io.*; 4 | import tannus.ds.*; 5 | import tannus.sys.*; 6 | import tannus.async.*; 7 | import tannus.async.promises.*; 8 | import tannus.sys.Path; 9 | import tannus.http.Url; 10 | import tannus.sys.FileSystem as Fs; 11 | 12 | import Slambda.fn; 13 | import edis.Globals.*; 14 | 15 | using StringTools; 16 | using tannus.ds.StringUtils; 17 | using Slambda; 18 | using tannus.ds.ArrayTools; 19 | using tannus.FunctionTools; 20 | using tannus.async.Asyncs; 21 | using pman.bg.MediaTools; 22 | 23 | typedef ActorRow = { 24 | ?_id: String, 25 | name: String, 26 | ?aliases: Array, 27 | ?dob: Date 28 | }; 29 | -------------------------------------------------------------------------------- /src/pman/bg/media/MediaAttrExtractor.hx: -------------------------------------------------------------------------------- 1 | package pman.bg.media; 2 | 3 | import tannus.media.Duration; 4 | import tannus.math.Time; 5 | 6 | import pman.bg.media.Actor; 7 | import pman.bg.media.Mark; 8 | import pman.bg.media.Tag; 9 | import pman.bg.media.Dimensions; 10 | 11 | enum MediaAttrExtractor { 12 | MAEActors() : Mae>; 13 | MAEMarks() : Mae>; 14 | MAETags() : Mae>; 15 | MAEViews() : Mae; 16 | MAETitle() : Mae; 17 | MAEDuration() : Mae; 18 | MAEDurationTime() : Mae