├── doc
├── en
│ └── README.md
├── ru
│ ├── README.md
│ ├── HELLO_WORLD.md
│ └── GET_STARTED.md
└── README.md
├── plugins
└── jppm
│ ├── .gitignore
│ ├── package.build.php
│ ├── package.php.yml
│ └── src
│ └── gradle-build-scripts
│ └── native.template.groovy
├── templates
├── native
│ ├── src-template
│ │ ├── src-php
│ │ │ └── index.php
│ │ ├── .jpfa
│ │ │ └── compiler.jar
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── values
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ └── layout
│ │ │ │ │ └── activity_main.xml
│ │ │ │ └── AndroidManifest.xml.template
│ │ └── package.php.yml.template
│ └── package.php.yml
└── javafx
│ ├── src-template
│ ├── .jpfa
│ │ └── compiler.jar
│ ├── android
│ │ └── res
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ ├── src
│ │ ├── index.php
│ │ └── app
│ │ │ └── HomeView.php.template
│ └── package.php.yml.template
│ └── package.php.yml
├── extensions
├── jphp-android-native-ui-ext
│ ├── src-jvm
│ │ └── main
│ │ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── services
│ │ │ │ └── php.runtime.ext.support.Extension
│ │ │ └── java
│ │ │ └── jpfa
│ │ │ └── pkg
│ │ │ └── android
│ │ │ ├── AndroidExtension.java
│ │ │ ├── classes
│ │ │ ├── PView.java
│ │ │ ├── PButton.java
│ │ │ └── PActivity.java
│ │ │ └── AppActivity.java
│ └── package.php.yml
└── jphp-android-javafx-ui-ext
│ ├── src-jvm
│ └── main
│ │ ├── resources
│ │ ├── META-INF
│ │ │ └── services
│ │ │ │ └── php.runtime.ext.support.Extension
│ │ └── splash_image.png
│ │ └── java
│ │ └── org
│ │ └── venity
│ │ └── jphp
│ │ └── ext
│ │ └── android
│ │ ├── fx
│ │ ├── support
│ │ │ ├── tray
│ │ │ │ ├── animations
│ │ │ │ │ ├── AnimationType.java
│ │ │ │ │ └── TrayAnimation.java
│ │ │ │ ├── notification
│ │ │ │ │ ├── NotificationLocation.java
│ │ │ │ │ └── NotificationType.java
│ │ │ │ └── models
│ │ │ │ │ └── Location.java
│ │ │ ├── event
│ │ │ │ ├── MediaPlayerEventProvider.java
│ │ │ │ ├── AnimationEventProvider.java
│ │ │ │ ├── ButtonBaseEventProvider.java
│ │ │ │ ├── ContextMenuEventProvider.java
│ │ │ │ ├── ListViewEventProvider.java
│ │ │ │ ├── RadioGroupPaneEventProvider.java
│ │ │ │ └── MenuItemEventProvider.java
│ │ │ ├── control
│ │ │ │ ├── CanvasEx.java
│ │ │ │ └── ListViewEx.java
│ │ │ ├── BugFix8Utils.java
│ │ │ ├── FixMenuSkinBar.java
│ │ │ └── UserData.java
│ │ ├── JavaFXExtension.java
│ │ ├── classes
│ │ │ ├── support
│ │ │ │ └── Eventable.java
│ │ │ ├── WrapJSException.java
│ │ │ ├── UXGeometry.java
│ │ │ ├── effect
│ │ │ │ ├── UXEffect.java
│ │ │ │ ├── UXSepiaToneEffect.java
│ │ │ │ ├── UXReflectionEffect.java
│ │ │ │ ├── UXBloomEffect.java
│ │ │ │ ├── UXGlowEffect.java
│ │ │ │ ├── UXLightingEffect.java
│ │ │ │ ├── UXColorAdjustEffect.java
│ │ │ │ └── UXGaussianBlurEffect.java
│ │ │ ├── event
│ │ │ │ ├── UXWebEvent.java
│ │ │ │ ├── UXContextMenuEvent.java
│ │ │ │ └── UXWebErrorEvent.java
│ │ │ ├── UXListCell.java
│ │ │ ├── UXButtonBase.java
│ │ │ ├── UXTableCell.java
│ │ │ ├── layout
│ │ │ │ └── UXStackPane.java
│ │ │ ├── UXGroup.java
│ │ │ ├── UXHtmlEditor.java
│ │ │ ├── UXProgressBar.java
│ │ │ ├── UXPasswordField.java
│ │ │ ├── animation
│ │ │ │ └── UXTimeline.java
│ │ │ ├── UXMaskTextField.java
│ │ │ ├── UXContextMenu.java
│ │ │ └── UXFlatButton.java
│ │ └── bind
│ │ │ ├── CursorMemoryOperation.java
│ │ │ ├── DurationMemoryOperation.java
│ │ │ ├── KeyCombinationMemoryOperation.java
│ │ │ ├── PaperMemoryOperation.java
│ │ │ ├── PrintResolutionMemoryOperation.java
│ │ │ └── IndexRangeMemoryOperation.java
│ │ ├── SplashView.java
│ │ └── android
│ │ └── classes
│ │ ├── UXSwatch.java
│ │ ├── UXExceptionDialog.java
│ │ ├── UXAndroidAlert.java
│ │ ├── support
│ │ └── PView.java
│ │ ├── services
│ │ ├── PStatusBarService.java
│ │ └── PDeviceService.java
│ │ ├── UXStatusBar.java
│ │ └── UXNavigationDrawerFooter.java
│ ├── sdk
│ └── php
│ │ ├── gui
│ │ ├── UXSplitMenuButton.php
│ │ ├── UXPasswordField.php
│ │ ├── UXButtonBase.php
│ │ ├── UXProgressBar.php
│ │ ├── effect
│ │ │ ├── UXEffect.php
│ │ │ ├── UXSepiaToneEffect.php
│ │ │ ├── UXGaussianBlurEffect.php
│ │ │ ├── UXGlowEffect.php
│ │ │ ├── UXBloomEffect.php
│ │ │ ├── UXReflectionEffect.php
│ │ │ ├── UXColorAdjustEffect.php
│ │ │ ├── UXLightingEffect.php
│ │ │ ├── UXInnerShadowEffect.php
│ │ │ └── UXDrowShadowEffect.php
│ │ ├── UXColorChooser.php
│ │ ├── UXContextMenu.php
│ │ ├── UXListCell.php
│ │ ├── event
│ │ │ ├── UXWebEvent.php
│ │ │ ├── UXWebErrorEvent.php
│ │ │ ├── UXWindowEvent.php
│ │ │ ├── UXEvent.php
│ │ │ ├── UXContextMenuEvent.php
│ │ │ └── UXKeyboardManager.php
│ │ ├── UXToggleGroup.php
│ │ ├── UXGroup.php
│ │ ├── UXButton.php
│ │ ├── UXTextField.php
│ │ ├── shape
│ │ │ ├── UXRectangle.php
│ │ │ ├── UXCircle.php
│ │ │ ├── UXPolygon.php
│ │ │ ├── UXEllipse.php
│ │ │ └── UXShape.php
│ │ ├── UXMenuBar.php
│ │ ├── UXHtmlEditor.php
│ │ ├── UXToggleButton.php
│ │ ├── UXLabelEx.php
│ │ ├── layout
│ │ │ ├── UXStackPane.php
│ │ │ ├── UXFragmentPane.php
│ │ │ ├── UXPane.php
│ │ │ ├── UXBorderPane.php
│ │ │ ├── UXFlowPane.php
│ │ │ ├── UXTilePane.php
│ │ │ ├── UXPanel.php
│ │ │ ├── UXHBox.php
│ │ │ └── UXVBox.php
│ │ ├── UXGeometry.php
│ │ ├── UXLabel.php
│ │ ├── UXProgressIndicator.php
│ │ ├── UXMaskTextField.php
│ │ ├── UXTableCell.php
│ │ ├── animation
│ │ │ ├── UXTimeline.php
│ │ │ ├── UXAnimationTimer.php
│ │ │ ├── UXKeyFrame.php
│ │ │ ├── UXFadeAnimation.php
│ │ │ └── UXPathAnimation.php
│ │ ├── UXColorPicker.php
│ │ ├── UXChoiceBox.php
│ │ ├── UXMenu.php
│ │ ├── UXFlatButton.php
│ │ ├── UXDatePicker.php
│ │ ├── UXCheckbox.php
│ │ ├── UXControl.php
│ │ ├── UXDesktop.php
│ │ ├── UXSeparator.php
│ │ ├── UXDirectoryChooser.php
│ │ ├── UXHyperlink.php
│ │ ├── UXTitledPane.php
│ │ ├── UXTextArea.php
│ │ ├── UXLoader.php
│ │ ├── UXDraggableTab.php
│ │ ├── UXImageView.php
│ │ ├── UXNumberSpinner.php
│ │ ├── UXScreen.php
│ │ ├── UXValue.php
│ │ ├── UXDragboard.php
│ │ ├── UXTreeItem.php
│ │ ├── UXWebHistory.php
│ │ ├── UXMenuButton.php
│ │ ├── UXRadioGroupPane.php
│ │ ├── UXScene.php
│ │ ├── UXWebView.php
│ │ ├── UXMediaView.php
│ │ ├── UXSplitPane.php
│ │ ├── UXCell.php
│ │ ├── UXCustomNode.php
│ │ ├── UXMediaViewBox.php
│ │ ├── UXMedia.php
│ │ ├── UXSlider.php
│ │ ├── UXData.php
│ │ ├── UXParent.php
│ │ ├── UXPopupWindow.php
│ │ ├── UXComboBoxBase.php
│ │ ├── UXTabPane.php
│ │ ├── UXAlert.php
│ │ ├── UXCanvas.php
│ │ ├── UXFileChooser.php
│ │ ├── UXSpinner.php
│ │ ├── UXDialog.php
│ │ ├── UXComboBox.php
│ │ └── UXPagination.php
│ │ └── android
│ │ ├── UXAndroidAlert.php
│ │ ├── UXSwatch.php
│ │ ├── UXStatusBar.php
│ │ ├── UXExceptionDialog.php
│ │ ├── UXSidePopupView.php
│ │ ├── services
│ │ ├── StatusBarService.php
│ │ ├── Notification.php
│ │ ├── NotificationService.php
│ │ ├── StorageService.php
│ │ └── DeviceService.php
│ │ ├── UXToast.php
│ │ ├── UXBottomNavigation.php
│ │ ├── UXView.php
│ │ ├── UXNavigationDrawerFooter.php
│ │ ├── UXBottomNavigationButton.php
│ │ ├── UXRating.php
│ │ ├── UXAppBar.php
│ │ ├── UXNavigationDrawer.php
│ │ ├── UXMaterialIcons.php
│ │ ├── UXNavigationDrawerHeader.php
│ │ ├── UXNavigationDrawerItem.php
│ │ └── UXAndroidDialog.php
│ ├── .gitignore
│ └── package.php.yml
├── examples
└── javafx-hello
│ ├── android
│ └── res
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ ├── src
│ ├── index.php
│ └── app
│ │ └── MainView.php
│ ├── package.php.yml
│ └── README.md
├── compiler
├── .gitignore
├── package.php.yml
├── src-jvm
│ └── main
│ │ └── java
│ │ └── org
│ │ └── venity
│ │ └── compiler
│ │ └── CompilerExtension.java
├── README.md
└── package.build.php
├── .gitignore
├── package.php.yml
└── package.build.php
/doc/en/README.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/plugins/jppm/.gitignore:
--------------------------------------------------------------------------------
1 | src/jpfa/**
--------------------------------------------------------------------------------
/templates/native/src-template/src-php/index.php:
--------------------------------------------------------------------------------
1 | The main documentation page
3 |
4 | Select your language:
5 |
6 | * [English](en/README.md)
7 | * [Russian](ru/README.md)
--------------------------------------------------------------------------------
/examples/javafx-hello/android/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/examples/javafx-hello/android/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/javafx-hello/android/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/examples/javafx-hello/android/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/javafx-hello/android/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/examples/javafx-hello/android/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/compiler/.gitignore:
--------------------------------------------------------------------------------
1 | /.gradle/**
2 | /build/**
3 | /gradle/**
4 | /jars/**
5 | /vendor/**
6 | /build.gradle
7 | /gradlew
8 | /gradlew.bat
9 | /package-lock.php.yml
10 |
11 | **.iml
--------------------------------------------------------------------------------
/examples/javafx-hello/android/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/examples/javafx-hello/android/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/javafx-hello/android/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/examples/javafx-hello/android/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/javafx-hello/android/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/examples/javafx-hello/android/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/javafx-hello/android/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/examples/javafx-hello/android/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | **/.gradle/**
3 | **/build/**
4 | **/gradle/**
5 | **/jars/**
6 | **/vendor/**
7 | **/gradlew.bat
8 | **/gradlew
9 | **/build.gradle
10 |
11 | **/package-lock.php.yml
--------------------------------------------------------------------------------
/examples/javafx-hello/android/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/examples/javafx-hello/android/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/examples/javafx-hello/android/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/examples/javafx-hello/android/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/templates/javafx/src-template/android/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/javafx/src-template/android/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/templates/javafx/src-template/android/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/javafx/src-template/android/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/javafx-hello/android/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/examples/javafx-hello/android/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/templates/javafx/src-template/android/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/javafx/src-template/android/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/templates/javafx/src-template/android/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/javafx/src-template/android/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/templates/javafx/src-template/android/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/javafx/src-template/android/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/templates/native/src-template/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/native/src-template/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/templates/native/src-template/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/native/src-template/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/templates/native/src-template/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/native/src-template/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/templates/native/src-template/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/native/src-template/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/templates/native/src-template/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/native/src-template/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/resources/splash_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/extensions/jphp-android-javafx-ui-ext/src-jvm/main/resources/splash_image.png
--------------------------------------------------------------------------------
/templates/javafx/src-template/android/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/javafx/src-template/android/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/templates/javafx/src-template/android/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/javafx/src-template/android/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/templates/javafx/src-template/android/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/javafx/src-template/android/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/templates/javafx/src-template/android/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/javafx/src-template/android/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/templates/native/src-template/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/native/src-template/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/templates/native/src-template/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/native/src-template/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/templates/native/src-template/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/native/src-template/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/templates/javafx/src-template/android/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/javafx/src-template/android/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/templates/native/src-template/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/native/src-template/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/templates/native/src-template/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jphp-group/jphp-android/HEAD/templates/native/src-template/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXSplitMenuButton.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/plugins/jppm/package.build.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/examples/javafx-hello/android/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/android/UXAndroidAlert.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXListCell.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/templates/javafx/src-template/android/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/templates/native/src-template/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/effect/UXSepiaToneEffect.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/android/UXSidePopupView.php:
--------------------------------------------------------------------------------
1 | {
8 | public MediaPlayerEventProvider() {
9 | }
10 |
11 | @Override
12 | public Class getTargetClass() {
13 | return MediaPlayer.class;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/android/UXView.php:
--------------------------------------------------------------------------------
1 | AOT Compiler for jPHP
4 |
5 | ### How to build ?
6 |
7 | Use ``jppm build`` command to build ``jphp-compiler``. Output ``jar`` file you can find on ``build`` directory.
8 |
9 | ### How to use ?
10 |
11 | ``jphp-compiler`` it\`s command-line application.
12 |
13 | Command-line arguments:
14 | * --src - path to directory witch php sources
15 | * --dest - path to output directory (if ends ``.jar`` then create jar file)
16 | * --dest-res - (optional) path to output resursces
17 |
18 | Before use compiler remove ``META-INF/MANIFEST.mf`` file!
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXChoiceBox.php:
--------------------------------------------------------------------------------
1 | Hello, World example on jPHP and JavaFX
4 |
5 | You need Android SDK, [JDK 8](https://bell-sw.com/pages/java-8u222/) and [JPPM](https://github.com/jphp-group/jphp/releases).
6 |
7 | ## Compile
8 |
9 | To compile apk use this command:
10 |
11 | ```bash
12 | jppm update
13 | jppm android:compile
14 | ```
15 |
16 | You can find `apk` file on `build\javafxports\android`
17 |
18 | ## Runing on desktop (without Android SDK)
19 |
20 | To run application on desktop without Android SDK use this command:
21 |
22 | ```bash
23 | jppm update
24 | jppm android:run
25 | ```
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/shape/UXEllipse.php:
--------------------------------------------------------------------------------
1 | 0, 'y' => 0, 'width' => 0, 'height' => 0];
25 |
26 | /**
27 | * @readonly
28 | * @var array
29 | */
30 | public $visualBounds = ['x' => 0, 'y' => 0, 'width' => 0, 'height' => 0];
31 |
32 | /**
33 | * @return UXScreen
34 | */
35 | public static function getPrimary()
36 | {
37 | }
38 |
39 | /**
40 | * @return UXScreen[]
41 | */
42 | public static function getScreens()
43 | {
44 | }
45 | }
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXValue.php:
--------------------------------------------------------------------------------
1 | package()->getAny('modules', []) as $i => $module) {
12 | Tasks::runExternal("./$module", 'publish', [], "yes");
13 | }
14 |
15 | foreach ($event->package()->getAny('plugins', []) as $i => $plugin) {
16 | Tasks::runExternal("./plugins/$plugin", 'publish', [], "yes");
17 | }
18 |
19 | foreach ($event->package()->getAny('extensions', []) as $i => $extension) {
20 | Tasks::runExternal("./extensions/$extension", 'publish', [], "yes");
21 | }
22 |
23 | foreach ($event->package()->getAny('templates', []) as $i => $template) {
24 | Tasks::runExternal("./templates/$template", 'publish', [], "yes");
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/extensions/jphp-android-native-ui-ext/src-jvm/main/java/jpfa/pkg/android/AndroidExtension.java:
--------------------------------------------------------------------------------
1 | package jpfa.pkg.android;
2 |
3 | import jpfa.pkg.android.classes.PActivity;
4 | import jpfa.pkg.android.classes.PApplication;
5 | import jpfa.pkg.android.classes.PButton;
6 | import jpfa.pkg.android.classes.PView;
7 | import php.runtime.env.CompileScope;
8 | import php.runtime.ext.support.Extension;
9 |
10 | public class AndroidExtension extends Extension {
11 | public static final String NS = "php\\android";
12 |
13 | @Override
14 | public String getName() {
15 | return "JPFA Native API";
16 | }
17 |
18 | @Override
19 | public Status getStatus() {
20 | return Status.EXPERIMENTAL;
21 | }
22 |
23 | @Override
24 | public void onRegister(CompileScope scope) {
25 | registerClass(scope, PActivity.class, PApplication.class, PView.class, PButton.class);
26 | }
27 | }
--------------------------------------------------------------------------------
/extensions/jphp-android-native-ui-ext/src-jvm/main/java/jpfa/pkg/android/classes/PView.java:
--------------------------------------------------------------------------------
1 | package jpfa.pkg.android.classes;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 | import jpfa.pkg.android.AndroidExtension;
6 | import php.runtime.annotation.Reflection;
7 | import php.runtime.env.Environment;
8 | import php.runtime.lang.BaseObject;
9 | import php.runtime.reflection.ClassEntity;
10 |
11 | @Reflection.Name("View")
12 | @Reflection.Namespace(AndroidExtension.NS)
13 | public class PView extends BaseObject {
14 | public PView(Environment env) {
15 | super(env);
16 | }
17 |
18 | protected PView(ClassEntity entity) {
19 | super(entity);
20 | }
21 |
22 | public PView(Environment env, ClassEntity clazz) {
23 | super(env, clazz);
24 | }
25 |
26 | public View makeView(Context context) {
27 | return new View(context);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/package.php.yml:
--------------------------------------------------------------------------------
1 | name: jphp-android-javafx-ui-ext
2 | version: 1.0.0
3 |
4 | plugins:
5 | - 'Gradle'
6 | - 'Doc'
7 | - 'Hub'
8 |
9 | gradle:
10 | repos:
11 | - "http://nexus.gluonhq.com/nexus/content/repositories/releases/" # Gluon repository
12 | deps:
13 | - "com.gluonhq:charm:5.0.2"
14 | - "com.gluonhq:charm-down-plugin-local-notifications:3.8.6"
15 |
16 | deps:
17 | jphp-runtime: '*'
18 | jphp-xml-ext: '*'
19 |
20 | hub:
21 | login: "yousan4ik@gmail.com"
22 |
23 | config:
24 | ignore:
25 | - /sandbox/**
26 | - /.idea/**
27 | - /.gradle/**
28 | - /*.iml
29 | - /.git/**
30 | - /examples/**
31 | - /gradle/**
32 | - /build/**
33 | - /package.hub.yml
34 |
35 |
36 | doc:
37 | url-prefix: https://github.com/jphp-group/jphp-android/tree/master/ui-javafx/api-docs/
38 | langs:
39 | en: English
40 | ru: Русский
41 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/layout/UXFlowPane.php:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
--------------------------------------------------------------------------------
/templates/javafx/package.php.yml:
--------------------------------------------------------------------------------
1 | name: jphp-android-javafx
2 | version: 1.0.0
3 | description: JPFA Tamplate with JavaFX UI backend
4 | type: template
5 |
6 | template:
7 | variables:
8 | name: "Project name"
9 | version:
10 | message: "Project version"
11 | default: 1.0.0
12 | regex: ^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$
13 | regex-error-message: "semver version like `1.0.0` or `1.2.3-alpha.something+meta-data`"
14 | description: "Project description"
15 | android-id:
16 | message: "Android application id"
17 | default: "org.develnext.android"
18 | regex: ^([A-Za-z]{1}[A-Za-z\d_]*\.)+[A-Za-z][A-Za-z\d_]*$
19 | regex-error-message: "android pacakge like `org.develnext.android`"
20 | sources:
21 | - src-template
22 | tasks:
23 | - update
24 | - android:sdk:install
25 |
--------------------------------------------------------------------------------
/templates/native/package.php.yml:
--------------------------------------------------------------------------------
1 | name: jphp-android-native
2 | version: 1.0.0
3 | description: JPFA Tamplate with native UI backend
4 | type: template
5 |
6 | template:
7 | variables:
8 | name: "Project name"
9 | version:
10 | message: "Project version"
11 | default: 1.0.0
12 | regex: ^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$
13 | regex-error-message: "semver version like `1.0.0` or `1.2.3-alpha.something+meta-data`"
14 | description: "Project description"
15 | android-id:
16 | message: "Android application id"
17 | default: "org.develnext.android"
18 | regex: ^([A-Za-z]{1}[A-Za-z\d_]*\.)+[A-Za-z][A-Za-z\d_]*$
19 | regex-error-message: "android pacakge like `org.develnext.android`"
20 | sources:
21 | - src-template
22 | tasks:
23 | - update
24 | - android:sdk:install
25 |
--------------------------------------------------------------------------------
/extensions/jphp-android-native-ui-ext/src-jvm/main/java/jpfa/pkg/android/classes/PButton.java:
--------------------------------------------------------------------------------
1 | package jpfa.pkg.android.classes;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 | import android.widget.Button;
6 | import jpfa.pkg.android.AndroidExtension;
7 | import php.runtime.annotation.Reflection;
8 | import php.runtime.env.Environment;
9 | import php.runtime.reflection.ClassEntity;
10 |
11 | @Reflection.Name("Button")
12 | @Reflection.Namespace(AndroidExtension.NS)
13 | public class PButton extends PView {
14 | public PButton(Environment env) {
15 | super(env);
16 | }
17 |
18 | protected PButton(ClassEntity entity) {
19 | super(entity);
20 | }
21 |
22 | public PButton(Environment env, ClassEntity clazz) {
23 | super(env, clazz);
24 | }
25 |
26 | @Override
27 | public View makeView(Context context) {
28 | return new Button(context);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/event/UXEvent.php:
--------------------------------------------------------------------------------
1 | {
8 | public Handler finishHandler() {
9 | return new Handler() {
10 | @Override
11 | public void set(Animation target, EventHandler eventHandler) {
12 | target.setOnFinished(eventHandler);
13 | }
14 |
15 | @Override
16 | public EventHandler get(Animation target) {
17 | return target.getOnFinished();
18 | }
19 | };
20 | }
21 |
22 | @Override
23 | public Class getTargetClass() {
24 | return Animation.class;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/android/services/DeviceService.php:
--------------------------------------------------------------------------------
1 | {
8 | public Handler actionHandler() {
9 | return new Handler() {
10 | @Override
11 | public void set(ButtonBase target, EventHandler eventHandler) {
12 | target.setOnAction(eventHandler);
13 | }
14 |
15 | @Override
16 | public EventHandler get(ButtonBase target) {
17 | return target.getOnAction();
18 | }
19 | };
20 | }
21 |
22 | @Override
23 | public Class getTargetClass() {
24 | return ButtonBase.class;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXScene.php:
--------------------------------------------------------------------------------
1 | {
8 | public Handler actionHandler() {
9 | return new Handler() {
10 | @Override
11 | public void set(ContextMenu target, EventHandler eventHandler) {
12 | target.setOnAction(eventHandler);
13 | }
14 |
15 | @Override
16 | public EventHandler get(ContextMenu target) {
17 | return target.getOnAction();
18 | }
19 | };
20 | }
21 |
22 | @Override
23 | public Class getTargetClass() {
24 | return ContextMenu.class;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/support/event/ListViewEventProvider.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.support.event;
2 |
3 | import javafx.event.EventHandler;
4 | import org.venity.jphp.ext.android.fx.support.control.ListViewEx;
5 | import org.venity.jphp.ext.android.fx.support.EventProvider;
6 |
7 | public class ListViewEventProvider extends EventProvider {
8 | public Handler actionHandler() {
9 | return new Handler() {
10 | @Override
11 | public void set(ListViewEx target, EventHandler eventHandler) {
12 | target.setOnAction(eventHandler);
13 | }
14 |
15 | @Override
16 | public EventHandler get(ListViewEx target) {
17 | return target.getOnAction();
18 | }
19 | };
20 | }
21 |
22 | @Override
23 | public Class getTargetClass() {
24 | return ListViewEx.class;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXWebView.php:
--------------------------------------------------------------------------------
1 | engine->url (this is alias)
49 | * @var string
50 | */
51 | public $url;
52 | }
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXMediaView.php:
--------------------------------------------------------------------------------
1 | {
14 |
15 | public UXSwatch(Environment env, Swatch wrappedObject) {
16 | super(env, wrappedObject);
17 | }
18 |
19 | public UXSwatch(Environment env, ClassEntity clazz) {
20 | super(env, clazz);
21 | }
22 |
23 | @Reflection.Signature
24 | public static Swatch of(String color){
25 | return Swatch.valueOf(color.toUpperCase());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/bind/CursorMemoryOperation.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.bind;
2 |
3 | import javafx.scene.Cursor;
4 | import php.runtime.Memory;
5 | import php.runtime.env.Environment;
6 | import php.runtime.env.TraceInfo;
7 | import php.runtime.memory.StringMemory;
8 | import php.runtime.memory.support.MemoryOperation;
9 |
10 | public class CursorMemoryOperation extends MemoryOperation {
11 | @Override
12 | public Class>[] getOperationClasses() {
13 | return new Class>[] { Cursor.class };
14 | }
15 |
16 | @Override
17 | public Cursor convert(Environment env, TraceInfo trace, Memory arg) throws Throwable {
18 | return arg.isNull() ? null : Cursor.cursor(arg.toString());
19 | }
20 |
21 | @Override
22 | public Memory unconvert(Environment env, TraceInfo trace, Cursor arg) throws Throwable {
23 | return arg == null ? Memory.NULL : StringMemory.valueOf(arg.toString());
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/UXGeometry.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes;
2 |
3 | import javafx.geometry.Point2D;
4 | import org.venity.jphp.ext.android.AndroidExtension;
5 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
6 | import php.runtime.annotation.Reflection;
7 | import php.runtime.annotation.Reflection.Abstract;
8 | import php.runtime.annotation.Reflection.Signature;
9 | import php.runtime.env.Environment;
10 | import php.runtime.lang.BaseObject;
11 | import php.runtime.reflection.ClassEntity;
12 |
13 | @Abstract
14 | @Reflection.Name("UXGeometry")
15 | @Reflection.Namespace(AndroidExtension.NS_FX)
16 | public class UXGeometry extends BaseObject {
17 | public UXGeometry(Environment env, ClassEntity clazz) {
18 | super(env, clazz);
19 | }
20 |
21 | @Signature
22 | public static double distance(double x1, double y1, double x2, double y2) {
23 | return new Point2D(x1, y1).distance(x2, y2);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/layout/UXTilePane.php:
--------------------------------------------------------------------------------
1 | {
8 | public Handler actionHandler() {
9 | return new Handler() {
10 | @Override
11 | public void set(RadioGroupPane target, EventHandler eventHandler) {
12 | target.setOnAction(eventHandler);
13 | }
14 |
15 | @Override
16 | public EventHandler get(RadioGroupPane target) {
17 | return target.getOnAction();
18 | }
19 | };
20 | }
21 |
22 | @Override
23 | public Class getTargetClass() {
24 | return RadioGroupPane.class;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/plugins/jppm/src/gradle-build-scripts/native.template.groovy:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 | }
8 |
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.2.0'
11 | }
12 | }
13 |
14 | repositories {
15 | google()
16 | jcenter()
17 | }
18 |
19 | android {
20 | compileSdkVersion %sdk%
21 | buildToolsVersion "%sdk-tools%"
22 |
23 | compileOptions {
24 | sourceCompatibility 1.8
25 | targetCompatibility 1.8
26 | }
27 |
28 | defaultConfig {
29 | applicationId '%id%'
30 | minSdkVersion 14
31 | targetSdkVersion %sdk%
32 | }
33 |
34 | lintOptions {
35 | abortOnError false
36 | }
37 | }
38 |
39 | dependencies {
40 | implementation fileTree(dir: 'libs', include: ['*.jar'])
41 | implementation 'com.android.support:appcompat-v7:28.0.0'
42 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
43 | }
44 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXCell.php:
--------------------------------------------------------------------------------
1 | setOnUpdateAppBar([$this, "onUpdateAppBar"]);
16 |
17 | $button = new UXButton("Hello, World!");
18 | $button->graphic = UXMaterialIcons::of("LANGUAGE")->graphic();
19 | $button->on("click", function () use ($button) {
20 | $button->text = "Change the world!";
21 | });
22 |
23 | $this->center = $button;
24 | }
25 |
26 | /**
27 | * @param UXAppBar $bar
28 | */
29 | public function onUpdateAppBar(UXAppBar $bar) {
30 | $bar->title = new UXLabel("{{name}}");
31 | $bar->navIcon = UXMaterialIcons::of("MENU")->button(function () {
32 | // on navigation icon click ....
33 | });
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXMedia.php:
--------------------------------------------------------------------------------
1 | {
17 | PActivity activity = PApplication.getActivities().get(
18 | PApplication.getCurrentActivity());
19 |
20 | setContentView(activity.makeLayout(this));
21 | });
22 |
23 | if (!jphpRuning) {
24 | AndroidStandaloneLoader.INSTANCE.run(this);
25 | jphpRuning = true;
26 | } else {
27 | AndroidStandaloneLoader.INSTANCE.setMainActivity(this);
28 | PApplication.getShowActivityCallback().run();
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/effect/UXEffect.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes.effect;
2 |
3 | import javafx.scene.effect.Effect;
4 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
5 | import php.runtime.annotation.Reflection;
6 | import php.runtime.annotation.Reflection.Abstract;
7 | import php.runtime.annotation.Reflection.Name;
8 | import php.runtime.env.Environment;
9 | import php.runtime.lang.BaseWrapper;
10 | import php.runtime.reflection.ClassEntity;
11 |
12 | @Abstract
13 | @Name("UXEffect")
14 | @Reflection.Namespace("php\\gui\\effect")
15 | public class UXEffect extends BaseWrapper {
16 | interface WrappedInterface {
17 | }
18 |
19 | public UXEffect(Environment env, T wrappedObject) {
20 | super(env, wrappedObject);
21 | }
22 |
23 | public UXEffect(Environment env, ClassEntity clazz) {
24 | super(env, clazz);
25 | }
26 |
27 | @Override
28 | public T getWrappedObject() {
29 | return (T) super.getWrappedObject();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/event/UXWebEvent.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes.event;
2 |
3 | import javafx.scene.web.WebEvent;
4 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
5 | import php.runtime.annotation.Reflection;
6 | import php.runtime.annotation.Reflection.Name;
7 | import php.runtime.annotation.Reflection.Property;
8 | import php.runtime.env.Environment;
9 | import php.runtime.reflection.ClassEntity;
10 |
11 | @Reflection.Abstract
12 | @Name("UXWebEvent")
13 | @Reflection.Namespace("php\\gui\\event")
14 | public class UXWebEvent extends UXEvent {
15 | interface WrappedInterface {
16 | @Property Object data();
17 | }
18 |
19 | public UXWebEvent(Environment env, WebEvent wrappedObject) {
20 | super(env, wrappedObject);
21 | }
22 |
23 | public UXWebEvent(Environment env, ClassEntity clazz) {
24 | super(env, clazz);
25 | }
26 |
27 | @Override
28 | public WebEvent getWrappedObject() {
29 | return (WebEvent) super.getWrappedObject();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/bind/DurationMemoryOperation.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.bind;
2 |
3 | import javafx.util.Duration;
4 | import php.runtime.Memory;
5 | import php.runtime.env.Environment;
6 | import php.runtime.env.TraceInfo;
7 | import php.runtime.memory.LongMemory;
8 | import php.runtime.memory.support.MemoryOperation;
9 |
10 | public class DurationMemoryOperation extends MemoryOperation {
11 | @Override
12 | public Class>[] getOperationClasses() {
13 | return new Class>[] {Duration.class};
14 | }
15 |
16 | @Override
17 | public Duration convert(Environment env, TraceInfo trace, Memory arg) throws Throwable {
18 | long millis = arg.toLong();
19 | return millis == -1 ? Duration.INDEFINITE : new Duration(millis);
20 | }
21 |
22 | @Override
23 | public Memory unconvert(Environment env, TraceInfo trace, Duration arg) throws Throwable {
24 | return arg == null ? Memory.NULL : LongMemory.valueOf(arg.isIndefinite() ? -1L : (long) arg.toMillis());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/effect/UXSepiaToneEffect.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes.effect;
2 |
3 | import javafx.scene.effect.SepiaTone;
4 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
5 | import php.runtime.annotation.Reflection.Name;
6 | import php.runtime.annotation.Reflection.Property;
7 | import php.runtime.annotation.Reflection.Signature;
8 | import php.runtime.env.Environment;
9 | import php.runtime.reflection.ClassEntity;
10 |
11 | @Name(JavaFXExtension.NS + "effect\\UXSepiaToneEffect")
12 | public class UXSepiaToneEffect extends UXEffect {
13 | interface WrappedInterface {
14 | @Property double level();
15 | }
16 |
17 | public UXSepiaToneEffect(Environment env, SepiaTone wrappedObject) {
18 | super(env, wrappedObject);
19 | }
20 |
21 | public UXSepiaToneEffect(Environment env, ClassEntity clazz) {
22 | super(env, clazz);
23 | }
24 |
25 | @Signature
26 | public void __construct() {
27 | __wrappedObject = new SepiaTone();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXParent.php:
--------------------------------------------------------------------------------
1 | {
11 | @Override
12 | public Class>[] getOperationClasses() {
13 | return new Class>[] { KeyCombination.class };
14 | }
15 |
16 | @Override
17 | public KeyCombination convert(Environment environment, TraceInfo traceInfo, Memory memory) {
18 | return memory.isNull() ? null : KeyCombination.valueOf(memory.toString());
19 | }
20 |
21 | @Override
22 | public Memory unconvert(Environment environment, TraceInfo traceInfo, KeyCombination keyCombination) {
23 | return keyCombination == null ? Memory.NULL : StringMemory.valueOf(keyCombination.toString());
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/effect/UXReflectionEffect.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes.effect;
2 |
3 | import javafx.scene.effect.Reflection;
4 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
5 | import php.runtime.annotation.Reflection.*;
6 | import php.runtime.env.Environment;
7 | import php.runtime.reflection.ClassEntity;
8 |
9 | @Name("UXReflectionEffect")
10 | @php.runtime.annotation.Reflection.Namespace("php\\gui\\effect")
11 | public class UXReflectionEffect extends UXEffect {
12 | interface WrappedInterface {
13 | @Property double topOffset();
14 | @Property double topOpacity();
15 | @Property double bottomOpacity();
16 | }
17 |
18 | public UXReflectionEffect(Environment env, Reflection wrappedObject) {
19 | super(env, wrappedObject);
20 | }
21 |
22 | public UXReflectionEffect(Environment env, ClassEntity clazz) {
23 | super(env, clazz);
24 | }
25 |
26 | @Signature
27 | public void __construct() {
28 | __wrappedObject = new Reflection();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/examples/javafx-hello/src/app/MainView.php:
--------------------------------------------------------------------------------
1 | graphic = UXMaterialIcons::of("LANGUAGE")->graphic();
21 | $button->on("click", function () use ($button) {
22 | $button->text = "Change the world!";
23 | });
24 |
25 | $this->center = $button;
26 |
27 | $this->setOnUpdateAppBar([$this, "updateAppBar"]);
28 | }
29 |
30 | /**
31 | * Update top app bar
32 | *
33 | * @param UXAppBar $appBar
34 | */
35 | public function updateAppBar(UXAppBar $appBar) {
36 | $appBar->title = new UXLabel("jPHP & JavaFX");
37 | $appBar->navIcon = UXMaterialIcons::of("MENU")->button(function () {
38 | // on navigation icon click ....
39 | });
40 | }
41 | }
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXPopupWindow.php:
--------------------------------------------------------------------------------
1 | В разработке!
38 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/support/FixMenuSkinBar.java:
--------------------------------------------------------------------------------
1 | /*package org.develnext.jphp.ext.javafx.support;
2 |
3 | import com.sun.javafx.scene.control.skin.*;
4 | import javafx.beans.InvalidationListener;
5 | import javafx.beans.Observable;
6 | import javafx.beans.WeakInvalidationListener;
7 | import javafx.scene.control.MenuBar;
8 | import javafx.scene.control.RadioMenuItem;
9 | import javafx.scene.control.Tab;
10 |
11 | import java.lang.reflect.Field;
12 |
13 | public class FixMenuSkinBar extends com.sun.javafx.scene.control.skin.MenuBarSkin {
14 | public FixMenuSkinBar(MenuBar control) {
15 | super(control);
16 |
17 | try {
18 | Field field = null;
19 | field = getClass().getSuperclass().getDeclaredField("firstMenuRunnable");
20 |
21 | field.setAccessible(true);
22 | field.set(this, new Runnable() {
23 | @Override
24 | public void run() {
25 | ;
26 | }
27 | });
28 | } catch (NoSuchFieldException | IllegalAccessException e) {
29 | // nop
30 | }
31 | }
32 | }*/
33 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/bind/PaperMemoryOperation.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.bind;
2 |
3 | import javafx.print.Paper;
4 | import php.runtime.Memory;
5 | import php.runtime.env.Environment;
6 | import php.runtime.env.TraceInfo;
7 | import php.runtime.memory.ArrayMemory;
8 | import php.runtime.memory.support.MemoryOperation;
9 |
10 | public class PaperMemoryOperation extends MemoryOperation {
11 | @Override
12 | public Class>[] getOperationClasses() {
13 | return new Class[] {Paper.class};
14 | }
15 |
16 | @Override
17 | public Paper convert(Environment env, TraceInfo trace, Memory arg) throws Throwable {
18 | throw new IllegalStateException("Unable to convert memory to " + Paper.class.getName());
19 | }
20 |
21 | @Override
22 | public Memory unconvert(Environment env, TraceInfo trace, Paper arg) throws Throwable {
23 | ArrayMemory p = new ArrayMemory();
24 | p.refOfIndex("name").assign(arg.getName());
25 | p.refOfIndex("width").assign(arg.getWidth());
26 | p.refOfIndex("height").assign(arg.getHeight());
27 | return p;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/UXListCell.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes;
2 |
3 | import javafx.scene.control.ListCell;
4 | import javafx.scene.control.ListView;
5 | import org.venity.jphp.ext.android.AndroidExtension;
6 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
7 | import php.runtime.annotation.Reflection;
8 | import php.runtime.annotation.Reflection.Property;
9 | import php.runtime.annotation.Reflection.Signature;
10 | import php.runtime.env.Environment;
11 | import php.runtime.reflection.ClassEntity;
12 |
13 | @Reflection.Name("UXListCell")
14 | @Reflection.Namespace(AndroidExtension.NS_FX)
15 | public class UXListCell extends UXCell {
16 | interface WrappedInterface {
17 | @Property
18 | ListView listView();
19 | }
20 |
21 | public UXListCell(Environment env, ListCell wrappedObject) {
22 | super(env, wrappedObject);
23 | }
24 |
25 | public UXListCell(Environment env, ClassEntity clazz) {
26 | super(env, clazz);
27 | }
28 |
29 | @Signature
30 | public void __construct() {
31 | __wrappedObject = new ListCell<>();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/extensions/jphp-android-native-ui-ext/src-jvm/main/java/jpfa/pkg/android/classes/PActivity.java:
--------------------------------------------------------------------------------
1 | package jpfa.pkg.android.classes;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 | import jpfa.pkg.android.AndroidExtension;
6 | import php.runtime.annotation.Reflection;
7 | import php.runtime.env.Environment;
8 | import php.runtime.lang.BaseObject;
9 | import php.runtime.reflection.ClassEntity;
10 |
11 | @Reflection.Name("Activity")
12 | @Reflection.Namespace(AndroidExtension.NS)
13 | public class PActivity extends BaseObject {
14 | private PView layout;
15 |
16 | public PActivity(Environment env) {
17 | super(env);
18 | }
19 |
20 | protected PActivity(ClassEntity entity) {
21 | super(entity);
22 | }
23 |
24 | public PActivity(Environment env, ClassEntity clazz) {
25 | super(env, clazz);
26 | }
27 |
28 | public View makeLayout(Context context) {
29 | return layout.makeView(context);
30 | }
31 |
32 | @Reflection.Getter
33 | public PView getLayout() {
34 | return layout;
35 | }
36 |
37 | @Reflection.Setter
38 | public void setLayout(PView layout) {
39 | this.layout = layout;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/UXButtonBase.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes;
2 |
3 | import javafx.scene.control.ButtonBase;
4 | import org.venity.jphp.ext.android.AndroidExtension;
5 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
6 | import php.runtime.annotation.Reflection;
7 | import php.runtime.annotation.Reflection.Abstract;
8 | import php.runtime.annotation.Reflection.Property;
9 | import php.runtime.env.Environment;
10 | import php.runtime.reflection.ClassEntity;
11 |
12 | @Abstract
13 | @Reflection.Name("UXButtonBase")
14 | @Reflection.Namespace(AndroidExtension.NS_FX)
15 | public class UXButtonBase extends UXLabeled {
16 | interface WrappedInterface {
17 | @Property boolean armed();
18 | }
19 |
20 | public UXButtonBase(Environment env, T wrappedObject) {
21 | super(env, wrappedObject);
22 | }
23 |
24 | public UXButtonBase(Environment env, ClassEntity clazz) {
25 | super(env, clazz);
26 | }
27 |
28 | @Override
29 | @SuppressWarnings("unchecked")
30 | public T getWrappedObject() {
31 | return (T) super.getWrappedObject();
32 | }
33 | }
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/android/classes/UXExceptionDialog.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.android.classes;
2 |
3 | import com.gluonhq.charm.glisten.control.Dialog;
4 | import com.gluonhq.charm.glisten.control.ExceptionDialog;
5 | import org.venity.jphp.ext.android.AndroidExtension;
6 | import php.runtime.annotation.Reflection;
7 | import php.runtime.env.Environment;
8 | import php.runtime.reflection.ClassEntity;
9 | import java.lang.Exception;
10 |
11 | @Reflection.Name("UXExceptionDialog")
12 | @Reflection.Namespace(AndroidExtension.NS_ANDROID)
13 | public class UXExceptionDialog extends UXAndroidDialog {
14 | public UXExceptionDialog(Environment env, ExceptionDialog wrappedObject) {
15 | super(env, wrappedObject);
16 | }
17 |
18 | public UXExceptionDialog(Environment env, ClassEntity clazz) {
19 | super(env, clazz);
20 | }
21 |
22 | @Reflection.Signature
23 | public void __construct(){
24 | __wrappedObject = new ExceptionDialog();
25 | }
26 |
27 |
28 | interface WrappedInterface{
29 | @Reflection.Property Exception exception();
30 | @Reflection.Property String introText();
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/effect/UXBloomEffect.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes.effect;
2 |
3 | import javafx.scene.effect.Bloom;
4 | import javafx.scene.effect.Effect;
5 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
6 | import php.runtime.annotation.Reflection;
7 | import php.runtime.annotation.Reflection.*;
8 | import php.runtime.env.Environment;
9 | import php.runtime.reflection.ClassEntity;
10 |
11 | @Name("UXBloomEffect")
12 | @Reflection.Namespace("php\\gui\\effect")
13 | public class UXBloomEffect extends UXEffect {
14 | interface WrappedInterface {
15 | @Property double threshold();
16 | @Property Effect input();
17 | }
18 |
19 | public UXBloomEffect(Environment env, Bloom wrappedObject) {
20 | super(env, wrappedObject);
21 | }
22 |
23 | public UXBloomEffect(Environment env, ClassEntity clazz) {
24 | super(env, clazz);
25 | }
26 |
27 | @Signature
28 | public void __construct() {
29 | __wrappedObject = new Bloom();
30 | }
31 |
32 | @Signature
33 | public void __construct(double threshold) {
34 | __wrappedObject = new Bloom(threshold);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/UXTableCell.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes;
2 |
3 | import javafx.scene.control.TableCell;
4 | import javafx.scene.control.TableColumn;
5 | import javafx.scene.control.TableView;
6 | import org.venity.jphp.ext.android.AndroidExtension;
7 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
8 | import php.runtime.annotation.Reflection;
9 | import php.runtime.annotation.Reflection.Signature;
10 | import php.runtime.env.Environment;
11 | import php.runtime.reflection.ClassEntity;
12 |
13 | @Reflection.Name("UXTableCell")
14 | @Reflection.Namespace(AndroidExtension.NS_FX)
15 | public class UXTableCell extends UXCell {
16 | interface WrappedInterface {
17 | void updateTableView(TableView tv);
18 | void updateTableColumn(TableColumn col);
19 | }
20 |
21 | public UXTableCell(Environment env, TableCell wrappedObject) {
22 | super(env, wrappedObject);
23 | }
24 |
25 | public UXTableCell(Environment env, ClassEntity clazz) {
26 | super(env, clazz);
27 | }
28 |
29 | @Signature
30 | public void __construct() {
31 | __wrappedObject = new TableCell<>();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/templates/native/src-template/src/main/AndroidManifest.xml.template:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXComboBoxBase.php:
--------------------------------------------------------------------------------
1 | extends UXPane {
16 | interface WrappedInterface {
17 |
18 | }
19 |
20 | public UXStackPane(Environment env, T wrappedObject) {
21 | super(env, wrappedObject);
22 | }
23 |
24 | public UXStackPane(Environment env, ClassEntity clazz) {
25 | super(env, clazz);
26 | }
27 |
28 | @Signature
29 | public void __construct() {
30 | __wrappedObject = new StackPane();
31 | }
32 |
33 | @Signature
34 | public void __construct(List children) {
35 | __wrappedObject = new StackPane(children.toArray(new Node[children.size()]));
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/support/UserData.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.support;
2 |
3 | import php.runtime.Memory;
4 |
5 | import java.util.HashMap;
6 | import java.util.Map;
7 |
8 | public class UserData {
9 | protected Memory value = Memory.NULL;
10 | protected final Map data = new HashMap<>();
11 |
12 | public UserData() {
13 | }
14 |
15 | public UserData(Memory value) {
16 | if (value == null) {
17 | throw new NullPointerException();
18 | }
19 |
20 | this.value = value;
21 | }
22 |
23 | public Memory getValue() {
24 | return value;
25 | }
26 |
27 | public void setValue(Memory value) {
28 | this.value = value;
29 | }
30 |
31 | public Memory set(String name, Memory data) {
32 | Memory memory = this.data.put(name, data);
33 |
34 | return memory == null ? Memory.NULL : memory;
35 | }
36 |
37 | public Memory get(String name) {
38 | Memory memory = this.data.get(name);
39 | return memory == null ? Memory.NULL : memory;
40 | }
41 |
42 | public boolean has(String name) {
43 | return this.data.containsKey(name);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/UXGroup.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes;
2 |
3 | import javafx.scene.Group;
4 | import javafx.scene.Node;
5 | import org.venity.jphp.ext.android.AndroidExtension;
6 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
7 | import php.runtime.annotation.Reflection;
8 | import php.runtime.annotation.Reflection.Signature;
9 | import php.runtime.env.Environment;
10 | import php.runtime.reflection.ClassEntity;
11 |
12 | import java.util.List;
13 |
14 | @Reflection.Name("UXGroup")
15 | @Reflection.Namespace(AndroidExtension.NS_FX)
16 | public class UXGroup extends UXParent {
17 | interface WrappedInterface {
18 | }
19 |
20 | public UXGroup(Environment env, T wrappedObject) {
21 | super(env, wrappedObject);
22 | }
23 |
24 | public UXGroup(Environment env, ClassEntity clazz) {
25 | super(env, clazz);
26 | }
27 |
28 | @Signature
29 | public void __construct() {
30 | __wrappedObject = new Group();
31 | }
32 |
33 | @Signature
34 | public void __construct(List children) {
35 | __wrappedObject = new Group(children.toArray(new Node[children.size()]));
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/layout/UXPanel.php:
--------------------------------------------------------------------------------
1 | onFinished);
17 |
18 | /**
19 | * Plays both the show and dismiss animation using a sequential transition object
20 | * @param dismissDelay How long to delay the start of the dismiss animation
21 | */
22 | void playSequential(Duration dismissDelay);
23 |
24 | /**
25 | * Plays the implemented show animation
26 | */
27 | void playShowAnimation();
28 |
29 | /**
30 | * Plays the implemented dismiss animation
31 | */
32 | void playDismissAnimation();
33 |
34 | /**
35 | * Signifies if the tray is current showing
36 | * @return boolean resultant
37 | */
38 | boolean isShowing();
39 | }
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/support/control/ListViewEx.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.support.control;
2 |
3 | import javafx.application.Platform;
4 | import javafx.collections.FXCollections;
5 | import javafx.collections.ObservableList;
6 | import javafx.event.Event;
7 | import javafx.event.EventHandler;
8 | import javafx.event.EventType;
9 | import javafx.scene.control.ListView;
10 |
11 | public class ListViewEx extends ListView {
12 | protected EventHandler onAction = null;
13 |
14 | public ListViewEx() {
15 | this(FXCollections.observableArrayList());
16 | }
17 |
18 | public ListViewEx(ObservableList items) {
19 | super(items);
20 |
21 | getSelectionModel().selectedIndexProperty().addListener((observable, oldValue, newValue) -> {
22 | if (onAction != null) {
23 | Platform.runLater(() -> onAction.handle(new Event(ListViewEx.this, ListViewEx.this, EventType.ROOT)));
24 | }
25 | });
26 | }
27 |
28 | public EventHandler getOnAction() {
29 | return onAction;
30 | }
31 |
32 | public void setOnAction(EventHandler onAction) {
33 | this.onAction = onAction;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXTabPane.php:
--------------------------------------------------------------------------------
1 | {
12 | @Override
13 | public Class>[] getOperationClasses() {
14 | return new Class[] { PrintResolution.class };
15 | }
16 |
17 | @Override
18 | public PrintResolution convert(Environment env, TraceInfo trace, Memory arg) throws Throwable {
19 | throw new IllegalStateException("Unable to convert memory to " + PrintResolution.class.getName());
20 | }
21 |
22 | @Override
23 | public Memory unconvert(Environment env, TraceInfo trace, PrintResolution resolution) throws Throwable {
24 | ArrayMemory r = new ArrayMemory();
25 | r.refOfIndex("crossFeedResolution").assign(resolution.getCrossFeedResolution());
26 | r.refOfIndex("feedResolution").assign(resolution.getFeedResolution());
27 | return r;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/android/classes/services/PStatusBarService.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.android.classes.services;
2 |
3 | import com.gluonhq.charm.down.Services;
4 | import com.gluonhq.charm.down.plugins.StatusBarService;
5 | import javafx.scene.paint.Color;
6 | import org.venity.jphp.ext.android.AndroidExtension;
7 | import php.runtime.annotation.Reflection;
8 | import php.runtime.env.Environment;
9 | import php.runtime.lang.BaseWrapper;
10 | import php.runtime.reflection.ClassEntity;
11 |
12 | @Reflection.Name("StatusBarService")
13 | @Reflection.Namespace(AndroidExtension.NS_ANDROID_SERVICE)
14 | @Reflection.Abstract
15 | public class PStatusBarService extends BaseWrapper {
16 |
17 | public PStatusBarService(Environment env, StatusBarService wrappedObject) {
18 | super(env, wrappedObject);
19 | }
20 |
21 | public PStatusBarService(Environment env, ClassEntity clazz) {
22 | super(env, clazz);
23 | }
24 |
25 | @Reflection.Signature
26 | public static PStatusBarService get(Environment __env__) {
27 | return new PStatusBarService(__env__, Services.get(StatusBarService.class).get());
28 | }
29 |
30 | interface WrappedInterface {
31 | void setColor(Color color);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/UXHtmlEditor.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes;
2 |
3 | import javafx.scene.web.HTMLEditor;
4 | import org.venity.jphp.ext.android.AndroidExtension;
5 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
6 | import php.runtime.annotation.Reflection;
7 | import php.runtime.annotation.Reflection.Name;
8 | import php.runtime.annotation.Reflection.Property;
9 | import php.runtime.annotation.Reflection.Signature;
10 | import php.runtime.env.Environment;
11 | import php.runtime.reflection.ClassEntity;
12 |
13 | @Name("UXHtmlEditor")
14 | @Reflection.Namespace(AndroidExtension.NS_FX)
15 | public class UXHtmlEditor extends UXControl {
16 | interface WrappedInterface {
17 | @Property String htmlText();
18 | }
19 |
20 | public UXHtmlEditor(Environment env, HTMLEditor wrappedObject) {
21 | super(env, wrappedObject);
22 | }
23 |
24 | public UXHtmlEditor(Environment env, ClassEntity clazz) {
25 | super(env, clazz);
26 | }
27 |
28 | @Override
29 | public HTMLEditor getWrappedObject() {
30 | return (HTMLEditor) super.getWrappedObject();
31 | }
32 |
33 | @Signature
34 | public void __construct() {
35 | __wrappedObject = new HTMLEditor();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/event/UXKeyboardManager.php:
--------------------------------------------------------------------------------
1 | {
16 | interface WrappedInterface {
17 | @Property double level();
18 | @Property Effect input();
19 | }
20 |
21 | public UXGlowEffect(Environment env, Glow wrappedObject) {
22 | super(env, wrappedObject);
23 | }
24 |
25 | public UXGlowEffect(Environment env, ClassEntity clazz) {
26 | super(env, clazz);
27 | }
28 |
29 | @Signature
30 | public void __construct() {
31 | __wrappedObject = new Glow();
32 | }
33 |
34 | @Signature
35 | public void __construct(double level) {
36 | __wrappedObject = new Glow(level);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/animation/UXPathAnimation.php:
--------------------------------------------------------------------------------
1 | {
12 | @Override
13 | public Class>[] getOperationClasses() {
14 | return new Class>[] { IndexRange.class };
15 | }
16 |
17 | @Override
18 | public IndexRange convert(Environment env, TraceInfo trace, Memory arg) throws Throwable {
19 | throw new IllegalStateException("Unable to convert memory to IndexRange");
20 | }
21 |
22 | @Override
23 | public Memory unconvert(Environment env, TraceInfo trace, IndexRange arg) throws Throwable {
24 | if (arg == null) {
25 | return Memory.NULL;
26 | }
27 |
28 | ArrayMemory r = new ArrayMemory();
29 | r.refOfIndex("start").assign(arg.getStart());
30 | r.refOfIndex("end").assign(arg.getEnd());
31 | r.refOfIndex("length").assign(arg.getLength());
32 |
33 | return r.toConstant();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/effect/UXLightingEffect.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes.effect;
2 |
3 | import javafx.scene.effect.Effect;
4 | import javafx.scene.effect.Lighting;
5 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
6 | import php.runtime.annotation.Reflection.Name;
7 | import php.runtime.annotation.Reflection.Property;
8 | import php.runtime.annotation.Reflection.Signature;
9 | import php.runtime.env.Environment;
10 | import php.runtime.reflection.ClassEntity;
11 |
12 | @Name(JavaFXExtension.NS + "effect\\UXLightingEffect")
13 | public class UXLightingEffect extends UXEffect {
14 | interface WrappedInterface {
15 | @Property double diffuseConstant();
16 | @Property double specularConstant();
17 | @Property double specularExponent();
18 | @Property double surfaceScale();
19 | @Property Effect contentInput();
20 | @Property Effect bumpInput();
21 | }
22 |
23 | public UXLightingEffect(Environment env, Lighting wrappedObject) {
24 | super(env, wrappedObject);
25 | }
26 |
27 | public UXLightingEffect(Environment env, ClassEntity clazz) {
28 | super(env, clazz);
29 | }
30 |
31 | @Signature
32 | public void __construct() {
33 | __wrappedObject = new Lighting();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/doc/ru/GET_STARTED.md:
--------------------------------------------------------------------------------
1 | # Начало работы
2 |
3 | ## Сборка из исходного кода
4 |
5 | Для начала, вам нужно установить Android SDK, [JDK 8](https://bell-sw.com/pages/java-8u222/) и [JPPM](https://github.com/jphp-group/jphp/releases).
6 |
7 | После установки необходимых компонентов, нужно собрать jPHP for Android из исходного кода, используя следующие комманды:
8 |
9 | ```bash
10 | git clone https://github.com/jphp-group/jphp-android.git
11 | cd jphp-android
12 | jppm build
13 | ```
14 |
15 | После выполнения этих команд у нас загрузится исходный код jPHP for Android и скомилируются следующие модули:
16 |
17 | * **compiler** - AOT компилятор jPHP кода в JVM Byte-Code
18 | * **ui-javafx** - Обёртка вокруг проекта [JavaFXPorts](https://gluonhq.com/products/mobile/javafxports/)
19 | * **ui-native** - Обёртка вокруг Android API (В разработке)
20 | * **jppm-plugin** - Плагин для системы сборки [jppm](https://github.com/jphp-group/jphp/tree/master/packager)
21 |
22 | ## Как это работает ?
23 |
24 | Для начала `jppm` собирает единый `jar` со всеми зависимостями.
25 |
26 | Потом вызывается AOT компилятор jPHP который конвертирует все php файлы, в едином `jar`, в ``$php_хеш.class`` файлы,
27 | понятные ``JVM``.
28 |
29 | После всех этих манипуляций собирается само Android приложение в которое дабовляется скомпилированый `jar` как зависимость.
30 |
31 | На выходе, мы получаем готовый apk файл.
32 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/UXProgressBar.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes;
2 |
3 | import javafx.scene.control.ProgressBar;
4 | import org.venity.jphp.ext.android.AndroidExtension;
5 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
6 | import php.runtime.annotation.Reflection;
7 | import php.runtime.annotation.Reflection.Name;
8 | import php.runtime.annotation.Reflection.Signature;
9 | import php.runtime.env.Environment;
10 | import php.runtime.reflection.ClassEntity;
11 |
12 | @Name("UXProgressBar")
13 | @Reflection.Namespace(AndroidExtension.NS_FX)
14 | public class UXProgressBar extends UXProgressIndicator {
15 | public UXProgressBar(Environment env, ProgressBar wrappedObject) {
16 | super(env, wrappedObject);
17 | }
18 |
19 | public UXProgressBar(Environment env, ClassEntity clazz) {
20 | super(env, clazz);
21 | }
22 |
23 | @Override
24 | public ProgressBar getWrappedObject() {
25 | return (ProgressBar) super.getWrappedObject();
26 | }
27 |
28 | @Override
29 | @Signature
30 | public void __construct() {
31 | __wrappedObject = new ProgressBar();
32 | }
33 |
34 | @Override
35 | @Signature
36 | public void __construct(double progress) {
37 | __wrappedObject = new ProgressBar(progress);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/effect/UXColorAdjustEffect.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes.effect;
2 |
3 | import javafx.scene.effect.ColorAdjust;
4 | import javafx.scene.effect.Effect;
5 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
6 | import php.runtime.annotation.Reflection;
7 | import php.runtime.annotation.Reflection.Name;
8 | import php.runtime.annotation.Reflection.Property;
9 | import php.runtime.annotation.Reflection.Signature;
10 | import php.runtime.env.Environment;
11 | import php.runtime.reflection.ClassEntity;
12 |
13 | @Name("UXColorAdjustEffect")
14 | @Reflection.Namespace("php\\gui\\effect")
15 | public class UXColorAdjustEffect extends UXEffect {
16 | interface WrappedInterface {
17 | @Property double brightness();
18 | @Property double contrast();
19 | @Property double hue();
20 | @Property double saturation();
21 |
22 | @Property Effect input();
23 | }
24 |
25 | public UXColorAdjustEffect(Environment env, ColorAdjust wrappedObject) {
26 | super(env, wrappedObject);
27 | }
28 |
29 | public UXColorAdjustEffect(Environment env, ClassEntity clazz) {
30 | super(env, clazz);
31 | }
32 |
33 | @Signature
34 | public void __construct() {
35 | __wrappedObject = new ColorAdjust();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/UXPasswordField.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes;
2 |
3 | import javafx.scene.control.PasswordField;
4 | import org.venity.jphp.ext.android.AndroidExtension;
5 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
6 | import php.runtime.annotation.Reflection;
7 | import php.runtime.annotation.Reflection.Name;
8 | import php.runtime.annotation.Reflection.Signature;
9 | import php.runtime.env.Environment;
10 | import php.runtime.reflection.ClassEntity;
11 |
12 | @Name("UXPasswordField")
13 | @Reflection.Namespace(AndroidExtension.NS_FX)
14 | public class UXPasswordField extends UXTextField {
15 | public UXPasswordField(Environment env, PasswordField wrappedObject) {
16 | super(env, wrappedObject);
17 | }
18 |
19 | public UXPasswordField(Environment env, ClassEntity clazz) {
20 | super(env, clazz);
21 | }
22 |
23 | @Override
24 | public PasswordField getWrappedObject() {
25 | return (PasswordField) super.getWrappedObject();
26 | }
27 |
28 | @Override
29 | @Signature
30 | public void __construct() {
31 | __wrappedObject = new PasswordField();
32 | }
33 |
34 | @Override
35 | public void __construct(String text) {
36 | __wrappedObject = new PasswordField();
37 | getWrappedObject().setText(text);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/src-jvm/main/java/org/venity/jphp/ext/android/fx/classes/event/UXContextMenuEvent.java:
--------------------------------------------------------------------------------
1 | package org.venity.jphp.ext.android.fx.classes.event;
2 |
3 | import javafx.scene.input.ContextMenuEvent;
4 | import org.venity.jphp.ext.android.fx.JavaFXExtension;
5 | import php.runtime.annotation.Reflection;
6 | import php.runtime.annotation.Reflection.Name;
7 | import php.runtime.annotation.Reflection.Property;
8 | import php.runtime.env.Environment;
9 | import php.runtime.reflection.ClassEntity;
10 |
11 | @Name("UXContextMenuEvent")
12 | @Reflection.Namespace("php\\gui\\event")
13 | public class UXContextMenuEvent extends UXEvent {
14 | interface WrappedInterface {
15 | @Property double sceneX();
16 | @Property double sceneY();
17 |
18 | @Property double screenX();
19 | @Property double screenY();
20 |
21 | @Property double x();
22 | @Property double y();
23 |
24 | @Property boolean keyboardTrigger();
25 | }
26 |
27 | public UXContextMenuEvent(Environment env, ContextMenuEvent wrappedObject) {
28 | super(env, wrappedObject);
29 | }
30 |
31 | public UXContextMenuEvent(Environment env, ClassEntity clazz) {
32 | super(env, clazz);
33 | }
34 |
35 | @Override
36 | public ContextMenuEvent getWrappedObject() {
37 | return (ContextMenuEvent) super.getWrappedObject();
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXFileChooser.php:
--------------------------------------------------------------------------------
1 | {
16 | interface WrappedInterface {
17 | @Property double radius();
18 | @Property Effect input();
19 | }
20 |
21 | public UXGaussianBlurEffect(Environment env, GaussianBlur wrappedObject) {
22 | super(env, wrappedObject);
23 | }
24 |
25 | public UXGaussianBlurEffect(Environment env, ClassEntity clazz) {
26 | super(env, clazz);
27 | }
28 |
29 | @Signature
30 | public void __construct() {
31 | __wrappedObject = new GaussianBlur();
32 | }
33 |
34 | @Signature
35 | public void __construct(double radius) {
36 | __wrappedObject = new GaussianBlur(radius);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/extensions/jphp-android-javafx-ui-ext/sdk/php/gui/UXSpinner.php:
--------------------------------------------------------------------------------
1 | {
8 | public Handler actionHandler() {
9 | return new Handler() {
10 | @Override
11 | public void set(MenuItem target, EventHandler eventHandler) {
12 | target.setOnAction(eventHandler);
13 | }
14 |
15 | @Override
16 | public EventHandler get(MenuItem target) {
17 | return target.getOnAction();
18 | }
19 | };
20 | }
21 |
22 | public Handler menuvalidationHandler() {
23 | return new Handler() {
24 | @Override
25 | public void set(MenuItem target, EventHandler eventHandler) {
26 | target.setOnMenuValidation(eventHandler);
27 | }
28 |
29 | @Override
30 | public EventHandler get(MenuItem target) {
31 | return target.getOnMenuValidation();
32 | }
33 | };
34 | }
35 |
36 | @Override
37 | public Class