Compare commits
11 Commits
6830c61e31
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c101d647dd | |||
| 1074a1e59a | |||
| 784e054105 | |||
| 16dd10f9a6 | |||
| 3a410775b5 | |||
| f3a69571a2 | |||
| ce19309e05 | |||
| d3eae79aa3 | |||
| e576011ebb | |||
| 2ee6543d51 | |||
| 66df0e66e2 |
36
.idea/caches/deviceStreaming.xml
generated
@@ -244,6 +244,18 @@
|
|||||||
<option name="screenX" value="1080" />
|
<option name="screenX" value="1080" />
|
||||||
<option name="screenY" value="2340" />
|
<option name="screenY" value="2340" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="36" />
|
||||||
|
<option name="brand" value="samsung" />
|
||||||
|
<option name="codename" value="a35x" />
|
||||||
|
<option name="id" value="a35x" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Samsung" />
|
||||||
|
<option name="name" value="A35" />
|
||||||
|
<option name="screenDensity" value="450" />
|
||||||
|
<option name="screenX" value="1080" />
|
||||||
|
<option name="screenY" value="2340" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="35" />
|
<option name="api" value="35" />
|
||||||
<option name="brand" value="samsung" />
|
<option name="brand" value="samsung" />
|
||||||
@@ -942,9 +954,9 @@
|
|||||||
<option name="labId" value="google" />
|
<option name="labId" value="google" />
|
||||||
<option name="manufacturer" value="Samsung" />
|
<option name="manufacturer" value="Samsung" />
|
||||||
<option name="name" value="Galaxy S25 Ultra" />
|
<option name="name" value="Galaxy S25 Ultra" />
|
||||||
<option name="screenDensity" value="600" />
|
<option name="screenDensity" value="450" />
|
||||||
<option name="screenX" value="1440" />
|
<option name="screenX" value="1080" />
|
||||||
<option name="screenY" value="3120" />
|
<option name="screenY" value="2340" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="36" />
|
<option name="api" value="36" />
|
||||||
@@ -954,9 +966,9 @@
|
|||||||
<option name="labId" value="google" />
|
<option name="labId" value="google" />
|
||||||
<option name="manufacturer" value="Samsung" />
|
<option name="manufacturer" value="Samsung" />
|
||||||
<option name="name" value="Galaxy S25 Ultra" />
|
<option name="name" value="Galaxy S25 Ultra" />
|
||||||
<option name="screenDensity" value="600" />
|
<option name="screenDensity" value="450" />
|
||||||
<option name="screenX" value="1440" />
|
<option name="screenX" value="1080" />
|
||||||
<option name="screenY" value="3120" />
|
<option name="screenY" value="2340" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="33" />
|
<option name="api" value="33" />
|
||||||
@@ -1044,6 +1056,18 @@
|
|||||||
<option name="screenX" value="1080" />
|
<option name="screenX" value="1080" />
|
||||||
<option name="screenY" value="2340" />
|
<option name="screenY" value="2340" />
|
||||||
</PersistentDeviceSelectionData>
|
</PersistentDeviceSelectionData>
|
||||||
|
<PersistentDeviceSelectionData>
|
||||||
|
<option name="api" value="36" />
|
||||||
|
<option name="brand" value="samsung" />
|
||||||
|
<option name="codename" value="r9q-SM-G990U" />
|
||||||
|
<option name="id" value="r9q-SM-G990U" />
|
||||||
|
<option name="labId" value="google" />
|
||||||
|
<option name="manufacturer" value="Samsung" />
|
||||||
|
<option name="name" value="Galaxy S21 FE 5G" />
|
||||||
|
<option name="screenDensity" value="480" />
|
||||||
|
<option name="screenX" value="1080" />
|
||||||
|
<option name="screenY" value="2340" />
|
||||||
|
</PersistentDeviceSelectionData>
|
||||||
<PersistentDeviceSelectionData>
|
<PersistentDeviceSelectionData>
|
||||||
<option name="api" value="36" />
|
<option name="api" value="36" />
|
||||||
<option name="brand" value="google" />
|
<option name="brand" value="google" />
|
||||||
|
|||||||
3
.idea/deploymentTargetSelector.xml
generated
@@ -2,9 +2,6 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="deploymentTargetSelector">
|
<component name="deploymentTargetSelector">
|
||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="NativeService">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
<SelectionState runConfigName="MosisService">
|
<SelectionState runConfigName="MosisService">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
</SelectionState>
|
</SelectionState>
|
||||||
|
|||||||
1
.idea/gradle.xml
generated
@@ -6,6 +6,7 @@
|
|||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="gradleHome" value="C:\gradle-8.13" />
|
||||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
<set>
|
<set>
|
||||||
|
|||||||
50
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="ComposePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ComposePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ComposePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="ComposePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="GlancePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="GlancePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="GlancePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="GlancePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewAnnotationInFunctionWithParameters" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewApiLevelMustBeValid" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewDeviceShouldUseNewSpec" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewFontScaleMustBeGreaterThanZero" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewMultipleParameterProviders" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewParameterProviderOnFirstParameter" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
||||||
|
<option name="composableFile" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
||||||
@@ -4,6 +4,10 @@ plugins {
|
|||||||
alias(libs.plugins.kotlin.compose)
|
alias(libs.plugins.kotlin.compose)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val sdkHome = System.getenv("ANDROID_HOME") as String
|
||||||
|
val ndkHome = System.getenv("ANDROID_NDK_HOME") as String
|
||||||
|
val vcpkgHome = System.getenv("VCPKG_ROOT") as String
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "com.omixlab.mosis"
|
namespace = "com.omixlab.mosis"
|
||||||
|
|
||||||
@@ -14,13 +18,25 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.omixlab.mosis"
|
applicationId = "com.omixlab.mosis"
|
||||||
minSdk = 33
|
minSdk = 34
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 1
|
versionCode = 1
|
||||||
versionName = "1.0"
|
versionName = "1.0"
|
||||||
|
ndk {
|
||||||
|
abiFilters += listOf("arm64-v8a")
|
||||||
|
}
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
|
//arguments += "--trace-expand"
|
||||||
cppFlags += ""
|
cppFlags += ""
|
||||||
|
arguments += "-DANDROID_STL=c++_shared"
|
||||||
|
arguments += "-DCMAKE_TOOLCHAIN_FILE=$vcpkgHome/scripts/buildsystems/vcpkg.cmake"
|
||||||
|
arguments += "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$ndkHome/build/cmake/android.toolchain.cmake"
|
||||||
|
arguments += "-DVCPKG_TARGET_TRIPLET=arm64-android"
|
||||||
|
arguments += "-DANDROID_SDK=$sdkHome"
|
||||||
|
arguments += "-DANDROID_NDK=$ndkHome"
|
||||||
|
targets += "mosis-service"
|
||||||
|
targets += "mosis-test"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,5 +4,5 @@
|
|||||||
# Location of the SDK. This is only used by Gradle.
|
# Location of the SDK. This is only used by Gradle.
|
||||||
# For customization when using a Version Control System, please read the
|
# For customization when using a Version Control System, please read the
|
||||||
# header note.
|
# header note.
|
||||||
#Thu Dec 25 21:43:48 CET 2025
|
#Mon Jan 05 20:27:08 CET 2026
|
||||||
sdk.dir=/Users/omar/Library/Android/sdk
|
sdk.dir=C\:\\Users\\omara\\AppData\\Local\\Android\\Sdk
|
||||||
|
|||||||
3
src/main/aidl/android/hardware/HardwareBuffer.aidl
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
package android.hardware;
|
||||||
|
|
||||||
|
@JavaOnlyStableParcelable @NdkOnlyStableParcelable parcelable HardwareBuffer ndk_header "android/hardware_buffer_aidl.h";
|
||||||
10
src/main/aidl/com/omixlab/mosis/IMosisListener.aidl
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package com.omixlab.mosis;
|
||||||
|
|
||||||
|
import android.hardware.HardwareBuffer;
|
||||||
|
|
||||||
|
// oneway = fire-and-forget (asynchronous)
|
||||||
|
oneway interface IMosisListener {
|
||||||
|
void onServiceInitialized(boolean success);
|
||||||
|
void onBufferAvailable(in HardwareBuffer buffer);
|
||||||
|
void onFrameAvailable();
|
||||||
|
}
|
||||||
@@ -1,6 +1,10 @@
|
|||||||
package com.omixlab.mosis;
|
package com.omixlab.mosis;
|
||||||
|
|
||||||
|
import com.omixlab.mosis.IMosisListener;
|
||||||
|
|
||||||
interface IMosisService {
|
interface IMosisService {
|
||||||
boolean initOS();
|
boolean initOS(IMosisListener listener);
|
||||||
int getNumber();
|
void onTouchDown(float x, float y);
|
||||||
|
void onTouchMove(float x, float y);
|
||||||
|
void onTouchUp(float x, float y);
|
||||||
}
|
}
|
||||||
212
src/main/assets/LICENSE.txt
Normal file
@@ -0,0 +1,212 @@
|
|||||||
|
The RmlUi samples include fonts that are separately licensed. They are listed
|
||||||
|
below along with their licenses.
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
-----------------------------------------------------------
|
||||||
|
--- Lato ---
|
||||||
|
--- http://www.latofonts.com/ ---
|
||||||
|
--- ---
|
||||||
|
--- LatoLatin-Bold.ttf ---
|
||||||
|
--- LatoLatin-BoldItalic.ttf ---
|
||||||
|
--- LatoLatin-Italic.ttf ---
|
||||||
|
--- LatoLatin-Regular.ttf ---
|
||||||
|
-----------------------------------------------------------
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
Copyright (c) 2010-2015, Łukasz Dziedzic (dziedzic@typoland.com),
|
||||||
|
with Reserved Font Name Lato.
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
http://scripts.sil.org/OFL
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font creation
|
||||||
|
efforts of academic and linguistic communities, and to provide a free and
|
||||||
|
open framework in which fonts may be shared and improved in partnership
|
||||||
|
with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply
|
||||||
|
to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as
|
||||||
|
distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to a
|
||||||
|
new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||||
|
redistribute, and sell modified and unmodified copies of the Font
|
||||||
|
Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components,
|
||||||
|
in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the corresponding
|
||||||
|
Copyright Holder. This restriction only applies to the primary font name as
|
||||||
|
presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created
|
||||||
|
using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
-----------------------------------------------------------
|
||||||
|
--- Noto Emoji ---
|
||||||
|
--- https://www.google.com/get/noto/ ---
|
||||||
|
--- ---
|
||||||
|
--- NotoEmoji-Regular.ttf ---
|
||||||
|
-----------------------------------------------------------
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License,
|
||||||
|
Version 1.1.
|
||||||
|
|
||||||
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
http://scripts.sil.org/OFL
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font
|
||||||
|
creation efforts of academic and linguistic communities, and to
|
||||||
|
provide a free and open framework in which fonts may be shared and
|
||||||
|
improved in partnership with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply to
|
||||||
|
any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software
|
||||||
|
components as distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to,
|
||||||
|
deleting, or substituting -- in part or in whole -- any of the
|
||||||
|
components of the Original Version, by changing formats or by porting
|
||||||
|
the Font Software to a new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed,
|
||||||
|
modify, redistribute, and sell modified and unmodified copies of the
|
||||||
|
Font Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components, in
|
||||||
|
Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the
|
||||||
|
corresponding Copyright Holder. This restriction only applies to the
|
||||||
|
primary font name as presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created using
|
||||||
|
the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||||
BIN
src/main/assets/LatoLatin-Bold.ttf
Normal file
BIN
src/main/assets/LatoLatin-BoldItalic.ttf
Normal file
BIN
src/main/assets/LatoLatin-Italic.ttf
Normal file
BIN
src/main/assets/LatoLatin-Regular.ttf
Normal file
BIN
src/main/assets/NotoEmoji-Regular.ttf
Normal file
93
src/main/assets/Roboto/OFL.txt
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
Copyright 2011 The Roboto Project Authors (https://github.com/googlefonts/roboto-classic)
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
https://openfontlicense.org
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font creation
|
||||||
|
efforts of academic and linguistic communities, and to provide a free and
|
||||||
|
open framework in which fonts may be shared and improved in partnership
|
||||||
|
with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply
|
||||||
|
to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as
|
||||||
|
distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to a
|
||||||
|
new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||||
|
redistribute, and sell modified and unmodified copies of the Font
|
||||||
|
Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components,
|
||||||
|
in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the corresponding
|
||||||
|
Copyright Holder. This restriction only applies to the primary font name as
|
||||||
|
presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created
|
||||||
|
using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||||
118
src/main/assets/Roboto/README.txt
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
Roboto Variable Font
|
||||||
|
====================
|
||||||
|
|
||||||
|
This download contains Roboto as both variable fonts and static fonts.
|
||||||
|
|
||||||
|
Roboto is a variable font with these axes:
|
||||||
|
wdth
|
||||||
|
wght
|
||||||
|
|
||||||
|
This means all the styles are contained in these files:
|
||||||
|
Roboto-VariableFont_wdth,wght.ttf
|
||||||
|
Roboto-Italic-VariableFont_wdth,wght.ttf
|
||||||
|
|
||||||
|
If your app fully supports variable fonts, you can now pick intermediate styles
|
||||||
|
that aren’t available as static fonts. Not all apps support variable fonts, and
|
||||||
|
in those cases you can use the static font files for Roboto:
|
||||||
|
static/Roboto_Condensed-Thin.ttf
|
||||||
|
static/Roboto_Condensed-ExtraLight.ttf
|
||||||
|
static/Roboto_Condensed-Light.ttf
|
||||||
|
static/Roboto_Condensed-Regular.ttf
|
||||||
|
static/Roboto_Condensed-Medium.ttf
|
||||||
|
static/Roboto_Condensed-SemiBold.ttf
|
||||||
|
static/Roboto_Condensed-Bold.ttf
|
||||||
|
static/Roboto_Condensed-ExtraBold.ttf
|
||||||
|
static/Roboto_Condensed-Black.ttf
|
||||||
|
static/Roboto_SemiCondensed-Thin.ttf
|
||||||
|
static/Roboto_SemiCondensed-ExtraLight.ttf
|
||||||
|
static/Roboto_SemiCondensed-Light.ttf
|
||||||
|
static/Roboto_SemiCondensed-Regular.ttf
|
||||||
|
static/Roboto_SemiCondensed-Medium.ttf
|
||||||
|
static/Roboto_SemiCondensed-SemiBold.ttf
|
||||||
|
static/Roboto_SemiCondensed-Bold.ttf
|
||||||
|
static/Roboto_SemiCondensed-ExtraBold.ttf
|
||||||
|
static/Roboto_SemiCondensed-Black.ttf
|
||||||
|
static/Roboto-Thin.ttf
|
||||||
|
static/Roboto-ExtraLight.ttf
|
||||||
|
static/Roboto-Light.ttf
|
||||||
|
static/Roboto-Regular.ttf
|
||||||
|
static/Roboto-Medium.ttf
|
||||||
|
static/Roboto-SemiBold.ttf
|
||||||
|
static/Roboto-Bold.ttf
|
||||||
|
static/Roboto-ExtraBold.ttf
|
||||||
|
static/Roboto-Black.ttf
|
||||||
|
static/Roboto_Condensed-ThinItalic.ttf
|
||||||
|
static/Roboto_Condensed-ExtraLightItalic.ttf
|
||||||
|
static/Roboto_Condensed-LightItalic.ttf
|
||||||
|
static/Roboto_Condensed-Italic.ttf
|
||||||
|
static/Roboto_Condensed-MediumItalic.ttf
|
||||||
|
static/Roboto_Condensed-SemiBoldItalic.ttf
|
||||||
|
static/Roboto_Condensed-BoldItalic.ttf
|
||||||
|
static/Roboto_Condensed-ExtraBoldItalic.ttf
|
||||||
|
static/Roboto_Condensed-BlackItalic.ttf
|
||||||
|
static/Roboto_SemiCondensed-ThinItalic.ttf
|
||||||
|
static/Roboto_SemiCondensed-ExtraLightItalic.ttf
|
||||||
|
static/Roboto_SemiCondensed-LightItalic.ttf
|
||||||
|
static/Roboto_SemiCondensed-Italic.ttf
|
||||||
|
static/Roboto_SemiCondensed-MediumItalic.ttf
|
||||||
|
static/Roboto_SemiCondensed-SemiBoldItalic.ttf
|
||||||
|
static/Roboto_SemiCondensed-BoldItalic.ttf
|
||||||
|
static/Roboto_SemiCondensed-ExtraBoldItalic.ttf
|
||||||
|
static/Roboto_SemiCondensed-BlackItalic.ttf
|
||||||
|
static/Roboto-ThinItalic.ttf
|
||||||
|
static/Roboto-ExtraLightItalic.ttf
|
||||||
|
static/Roboto-LightItalic.ttf
|
||||||
|
static/Roboto-Italic.ttf
|
||||||
|
static/Roboto-MediumItalic.ttf
|
||||||
|
static/Roboto-SemiBoldItalic.ttf
|
||||||
|
static/Roboto-BoldItalic.ttf
|
||||||
|
static/Roboto-ExtraBoldItalic.ttf
|
||||||
|
static/Roboto-BlackItalic.ttf
|
||||||
|
|
||||||
|
Get started
|
||||||
|
-----------
|
||||||
|
|
||||||
|
1. Install the font files you want to use
|
||||||
|
|
||||||
|
2. Use your app's font picker to view the font family and all the
|
||||||
|
available styles
|
||||||
|
|
||||||
|
Learn more about variable fonts
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
|
||||||
|
https://variablefonts.typenetwork.com
|
||||||
|
https://medium.com/variable-fonts
|
||||||
|
|
||||||
|
In desktop apps
|
||||||
|
|
||||||
|
https://theblog.adobe.com/can-variable-fonts-illustrator-cc
|
||||||
|
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
|
||||||
|
|
||||||
|
Online
|
||||||
|
|
||||||
|
https://developers.google.com/fonts/docs/getting_started
|
||||||
|
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
|
||||||
|
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
|
||||||
|
|
||||||
|
Installing fonts
|
||||||
|
|
||||||
|
MacOS: https://support.apple.com/en-us/HT201749
|
||||||
|
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
|
||||||
|
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
|
||||||
|
|
||||||
|
Android Apps
|
||||||
|
|
||||||
|
https://developers.google.com/fonts/docs/android
|
||||||
|
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
Please read the full license text (OFL.txt) to understand the permissions,
|
||||||
|
restrictions and requirements for usage, redistribution, and modification.
|
||||||
|
|
||||||
|
You can use them in your products & projects – print or digital,
|
||||||
|
commercial or otherwise.
|
||||||
|
|
||||||
|
This isn't legal advice, please consider consulting a lawyer and see the full
|
||||||
|
license for all details.
|
||||||
BIN
src/main/assets/Roboto/Roboto-Italic-VariableFont_wdth,wght.ttf
Normal file
BIN
src/main/assets/Roboto/Roboto-VariableFont_wdth,wght.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-Black.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-BlackItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-Bold.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-BoldItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-ExtraBold.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-ExtraBoldItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-ExtraLight.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-ExtraLightItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-Italic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-Light.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-LightItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-Medium.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-MediumItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-Regular.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-SemiBold.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-SemiBoldItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-Thin.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto-ThinItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-Black.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-BlackItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-Bold.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-BoldItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-ExtraBold.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-ExtraLight.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-Italic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-Light.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-LightItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-Medium.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-MediumItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-Regular.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-SemiBold.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-Thin.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_Condensed-ThinItalic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_SemiCondensed-Black.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_SemiCondensed-Bold.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_SemiCondensed-ExtraBold.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_SemiCondensed-Italic.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_SemiCondensed-Light.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_SemiCondensed-Medium.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_SemiCondensed-Regular.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_SemiCondensed-SemiBold.ttf
Normal file
BIN
src/main/assets/Roboto/static/Roboto_SemiCondensed-Thin.ttf
Normal file
BIN
src/main/assets/alien_small.tga
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
35
src/main/assets/demo.rml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<rml>
|
||||||
|
<head>
|
||||||
|
<link type="text/rcss" href="html.rcss"/>
|
||||||
|
<link type="text/rcss" href="phone.rcss"/>
|
||||||
|
<title>Fullscreen Mobile UI</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="status-bar">
|
||||||
|
<span class="time">22:47</span>
|
||||||
|
<div class="status-icons">
|
||||||
|
<span class="icon">📶</span>
|
||||||
|
<span class="icon">🔋</span>
|
||||||
|
<span class="icon">📶</span>
|
||||||
|
<span class="icon">🔋</span>
|
||||||
|
<span class="icon">📶</span>
|
||||||
|
<span class="icon">🔋</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
<div class="header-section">
|
||||||
|
<h1>Hello omar 3 hello! and hello LEO 2 Hello!</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="nav-bar">
|
||||||
|
<div class="nav-item">Home</div>
|
||||||
|
<div class="nav-item">Apps</div>
|
||||||
|
<div class="nav-item">Settings</div>
|
||||||
|
<div class="nav-item">Home</div>
|
||||||
|
<div class="nav-item">Apps</div>
|
||||||
|
<div class="nav-item">Settings</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</rml>
|
||||||
BIN
src/main/assets/hello_world.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
13
src/main/assets/hello_world.rml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<rml>
|
||||||
|
<head>
|
||||||
|
<title>Hello world</title>
|
||||||
|
<link type="text/rcss" href="rml.rcss"/>
|
||||||
|
<link type="text/rcss" href="window.rcss"/>
|
||||||
|
</head>
|
||||||
|
<body data-model="animals">
|
||||||
|
<h1>RmlUi</h1>
|
||||||
|
<p>Hello <span id="world">world</span>!</p>
|
||||||
|
<p data-if="show_text">The quick brown fox jumps over the lazy {{animal}}.</p>
|
||||||
|
<input type="text" data-value="animal"/>
|
||||||
|
</body>
|
||||||
|
</rml>
|
||||||
BIN
src/main/assets/high_scores_alien_1.tga
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/main/assets/high_scores_alien_2.tga
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/main/assets/high_scores_alien_3.tga
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/main/assets/high_scores_defender.tga
Normal file
|
After Width: | Height: | Size: 32 KiB |
93
src/main/assets/html.rcss
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
body, div,
|
||||||
|
h1, h2, h3, h4,
|
||||||
|
h5, h6, p,
|
||||||
|
hr, pre,
|
||||||
|
tabset tabs
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1
|
||||||
|
{
|
||||||
|
font-size: 2em;
|
||||||
|
margin: .67em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2
|
||||||
|
{
|
||||||
|
font-size: 1.5em;
|
||||||
|
margin: .75em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3
|
||||||
|
{
|
||||||
|
font-size: 1.17em;
|
||||||
|
margin: .83em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4, p
|
||||||
|
{
|
||||||
|
margin: 1.12em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5
|
||||||
|
{
|
||||||
|
font-size: .83em;
|
||||||
|
margin: 1.5em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h6
|
||||||
|
{
|
||||||
|
font-size: .75em;
|
||||||
|
margin: 1.67em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4,
|
||||||
|
h5, h6, strong
|
||||||
|
{
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
em
|
||||||
|
{
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre
|
||||||
|
{
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr
|
||||||
|
{
|
||||||
|
border-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table
|
||||||
|
{
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
|
tr
|
||||||
|
{
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: table-row;
|
||||||
|
}
|
||||||
|
td
|
||||||
|
{
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: table-cell;
|
||||||
|
}
|
||||||
|
col
|
||||||
|
{
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: table-column;
|
||||||
|
}
|
||||||
|
colgroup
|
||||||
|
{
|
||||||
|
display: table-column-group;
|
||||||
|
}
|
||||||
|
thead, tbody, tfoot
|
||||||
|
{
|
||||||
|
display: table-row-group;
|
||||||
|
}
|
||||||
765
src/main/assets/invader.rcss
Normal file
@@ -0,0 +1,765 @@
|
|||||||
|
@spritesheet theme
|
||||||
|
{
|
||||||
|
src: invader.tga;
|
||||||
|
|
||||||
|
/* For high dpi screens, designates the scaling it is intended to be shown at. */
|
||||||
|
resolution: 1x;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The following specifies a list of sprite names and associated rectangles into the image given above.
|
||||||
|
Any sprite given here can be specified in a decorator. Their names must be globally unique.
|
||||||
|
Rectangles are specified as: x y width height. With the origin assumed to be at the top left corner.
|
||||||
|
*/
|
||||||
|
title-bar-l: 147px 0px 82px 85px;
|
||||||
|
title-bar-c: 229px 0px 1px 85px;
|
||||||
|
title-bar-r: 231px 0px 15px 85px;
|
||||||
|
|
||||||
|
/* huditems are vertically flipped titlebars */
|
||||||
|
huditem-l: 147px 55px 82px -55px;
|
||||||
|
huditem-c: 229px 55px 1px -55px;
|
||||||
|
huditem-r: 231px 55px 15px -55px;
|
||||||
|
|
||||||
|
icon-help: 128px 152px 51px 39px;
|
||||||
|
icon-invader: 179px 152px 51px 39px;
|
||||||
|
icon-game: 230px 152px 51px 39px;
|
||||||
|
icon-hiscore: 281px 152px 51px 39px;
|
||||||
|
icon-waves: 332px 152px 51px 39px;
|
||||||
|
icon-flag: 336px 191px 51px 39px;
|
||||||
|
icon-lives: 383px 152px 51px 39px;
|
||||||
|
icon-score: 434px 152px 51px 39px;
|
||||||
|
|
||||||
|
window-tl: 0px 0px 133px 140px;
|
||||||
|
window-t: 134px 0px 1px 140px;
|
||||||
|
window-tr: 136px 0px 10px 140px;
|
||||||
|
window-l: 0px 139px 10px 1px;
|
||||||
|
window-c: 11px 139px 1px 1px;
|
||||||
|
window-r: 10px 139px -10px 1px; /* mirrored left */
|
||||||
|
window-bl: 0px 140px 11px 11px;
|
||||||
|
window-b: 11px 140px 1px 11px;
|
||||||
|
window-br: 136px 140px 10px 11px;
|
||||||
|
|
||||||
|
button: 247px 0px 159px 45px;
|
||||||
|
button-hover: 247px 45px 159px 45px;
|
||||||
|
button-active: 247px 90px 159px 45px;
|
||||||
|
|
||||||
|
button-inner: 259px 19px 135px 1px;
|
||||||
|
button-inner-hover: 259px 64px 135px 1px;
|
||||||
|
button-inner-active: 259px 109px 135px 1px;
|
||||||
|
|
||||||
|
text-l: 162px 192px 14px 31px;
|
||||||
|
text-c: 176px 192px 1px 31px;
|
||||||
|
text-focus-l: 162px 230px 14px 31px;
|
||||||
|
text-focus-c: 176px 230px 1px 31px;
|
||||||
|
textarea: 162px 193px 145px 31px;
|
||||||
|
textarea-inner: 173px 206px 127px 10px;
|
||||||
|
textarea-focus: 162px 231px 145px 31px;
|
||||||
|
textarea-focus-inner: 173px 244px 127px 10px;
|
||||||
|
|
||||||
|
selectbox-tl: 281px 275px 11px 9px;
|
||||||
|
selectbox-t: 292px 275px 1px 9px;
|
||||||
|
selectbox-tr: 294px 275px 11px 9px;
|
||||||
|
selectbox-l: 281px 283px 11px 1px;
|
||||||
|
selectbox-c: 292px 283px 1px 1px;
|
||||||
|
selectbox-bl: 281px 285px 11px 11px;
|
||||||
|
selectbox-b: 292px 285px 1px 11px;
|
||||||
|
selectbox-br: 294px 285px 11px 11px;
|
||||||
|
|
||||||
|
selectvalue: 162px 192px 145px 37px;
|
||||||
|
selectvalue-hover: 162px 230px 145px 37px;
|
||||||
|
selectarrow: 307px 192px 30px 37px;
|
||||||
|
selectarrow-hover: 307px 230px 30px 37px;
|
||||||
|
selectarrow-active: 307px 268px 30px 37px;
|
||||||
|
|
||||||
|
radio: 407px 0px 30px 30px;
|
||||||
|
radio-hover: 437px 0px 30px 30px;
|
||||||
|
radio-active: 467px 0px 30px 30px;
|
||||||
|
radio-checked: 407px 30px 30px 30px;
|
||||||
|
radio-checked-hover: 437px 30px 30px 30px;
|
||||||
|
radio-checked-active: 467px 30px 30px 30px;
|
||||||
|
|
||||||
|
checkbox: 407px 60px 30px 30px;
|
||||||
|
checkbox-hover: 437px 60px 30px 30px;
|
||||||
|
checkbox-active: 467px 60px 30px 30px;
|
||||||
|
checkbox-checked: 407px 90px 30px 30px;
|
||||||
|
checkbox-checked-hover: 437px 90px 30px 30px;
|
||||||
|
checkbox-checked-active: 467px 90px 30px 30px;
|
||||||
|
|
||||||
|
tableheader-l: 127px 192px 16px 31px;
|
||||||
|
tableheader-c: 143px 192px 2px 31px;
|
||||||
|
tableheader-r: 145px 192px 15px 31px;
|
||||||
|
|
||||||
|
expand: 3px 232px 17px 17px;
|
||||||
|
expand-hover: 21px 232px 17px 17px;
|
||||||
|
expand-active: 39px 232px 17px 17px;
|
||||||
|
expand-collapsed: 3px 250px 17px 17px;
|
||||||
|
expand-collapsed-hover: 21px 250px 17px 17px;
|
||||||
|
expand-collapsed-active: 39px 250px 17px 17px;
|
||||||
|
|
||||||
|
slidertrack-t: 70px 199px 27px 2px;
|
||||||
|
slidertrack-c: 70px 201px 27px 1px;
|
||||||
|
slidertrack-b: 70px 202px 27px 2px;
|
||||||
|
|
||||||
|
sliderbar-t: 56px 152px 23px 23px;
|
||||||
|
sliderbar-c: 56px 175px 23px 1px;
|
||||||
|
sliderbar-b: 56px 176px 23px 22px;
|
||||||
|
sliderbar-hover-t: 80px 152px 23px 23px;
|
||||||
|
sliderbar-hover-c: 80px 175px 23px 1px;
|
||||||
|
sliderbar-hover-b: 80px 176px 23px 22px;
|
||||||
|
sliderbar-active-t: 104px 152px 23px 23px;
|
||||||
|
sliderbar-active-c: 104px 175px 23px 1px;
|
||||||
|
sliderbar-active-b: 104px 176px 23px 22px;
|
||||||
|
|
||||||
|
sliderarrowdec: 0px 152px 27px 24px;
|
||||||
|
sliderarrowdec-hover: 0px 177px 27px 24px;
|
||||||
|
sliderarrowdec-active: 0px 202px 27px 24px;
|
||||||
|
|
||||||
|
sliderarrowinc: 28px 152px 27px 24px;
|
||||||
|
sliderarrowinc-hover: 28px 177px 27px 24px;
|
||||||
|
sliderarrowinc-active: 28px 202px 27px 24px;
|
||||||
|
|
||||||
|
range-track: 219px 194px 3px 32px;
|
||||||
|
range-track-inner: 220px 204px 1px 14px;
|
||||||
|
range-track-focus: 219px 232px 3px 32px;
|
||||||
|
range-track-focus-inner: 220px 242px 1px 14px;
|
||||||
|
|
||||||
|
range-bar: 127px 191px 34px 32px;
|
||||||
|
range-dec: 3px 232px 17px 17px;
|
||||||
|
range-dec-hover: 21px 232px 17px 17px;
|
||||||
|
range-dec-active: 39px 232px 17px 17px;
|
||||||
|
range-inc: 3px 250px 17px 17px;
|
||||||
|
range-inc-hover: 21px 250px 17px 17px;
|
||||||
|
range-inc-active: 39px 250px 17px 17px;
|
||||||
|
|
||||||
|
progress-l: 103px 267px 13px 34px;
|
||||||
|
progress-c: 116px 267px 54px 34px;
|
||||||
|
progress-r: 170px 267px 13px 34px;
|
||||||
|
progress-fill-l: 110px 302px 6px 34px;
|
||||||
|
progress-fill-c: 140px 302px 6px 34px;
|
||||||
|
progress-fill-r: 170px 302px 6px 34px;
|
||||||
|
gauge: 0px 271px 100px 86px;
|
||||||
|
gauge-fill: 0px 356px 100px 86px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body
|
||||||
|
{
|
||||||
|
font-family: LatoLatin;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 15dp;
|
||||||
|
color: white;
|
||||||
|
nav: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.window
|
||||||
|
{
|
||||||
|
padding-top: 43dp;
|
||||||
|
padding-bottom: 20dp;
|
||||||
|
|
||||||
|
min-width: 250dp;
|
||||||
|
max-width: 800dp;
|
||||||
|
|
||||||
|
min-height: 135dp;
|
||||||
|
max-height: 700dp;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#title_bar
|
||||||
|
{
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
top: 7dp;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#title_bar div#icon
|
||||||
|
{
|
||||||
|
position: absolute;
|
||||||
|
left: 15dp;
|
||||||
|
top: -4dp;
|
||||||
|
|
||||||
|
width: 51dp;
|
||||||
|
height: 39dp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
div#title_bar span
|
||||||
|
{
|
||||||
|
padding-left: 85dp;
|
||||||
|
padding-right: 25dp;
|
||||||
|
padding-top: 18dp;
|
||||||
|
padding-bottom: 43dp;
|
||||||
|
|
||||||
|
vertical-align: top;
|
||||||
|
|
||||||
|
line-height: 24dp;
|
||||||
|
font-size: 20dp;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
font-effect: glow(1dp black);
|
||||||
|
decorator: tiled-horizontal( title-bar-l, title-bar-c, title-bar-r );
|
||||||
|
}
|
||||||
|
|
||||||
|
div#window
|
||||||
|
{
|
||||||
|
width: auto;
|
||||||
|
height: 100%;
|
||||||
|
padding: 10dp 15dp;
|
||||||
|
|
||||||
|
decorator: tiled-box(
|
||||||
|
window-tl, window-t, window-tr,
|
||||||
|
window-l, window-c, window-r,
|
||||||
|
window-bl, window-b, window-br
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
div#content
|
||||||
|
{
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
|
width: auto;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
overflow: hidden auto;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
p
|
||||||
|
{
|
||||||
|
text-align: left;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1
|
||||||
|
{
|
||||||
|
margin-left: 0.4em;
|
||||||
|
margin-bottom: 0.4em;
|
||||||
|
|
||||||
|
text-align: left;
|
||||||
|
font-size: 16dp;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
font-effect: glow(1dp 1dp 1dp 1dp #1117);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
input,
|
||||||
|
select
|
||||||
|
{
|
||||||
|
margin-left: 20dp;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.submit
|
||||||
|
{
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, button, select {
|
||||||
|
nav: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
input.submit
|
||||||
|
{
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
width: 159dp;
|
||||||
|
height: 33dp;
|
||||||
|
padding-top: 12dp;
|
||||||
|
|
||||||
|
font-size: 16dp;
|
||||||
|
text-align: center;
|
||||||
|
tab-index: auto;
|
||||||
|
|
||||||
|
decorator: image(button);
|
||||||
|
}
|
||||||
|
|
||||||
|
button:focus,
|
||||||
|
input.submit:focus
|
||||||
|
{
|
||||||
|
font-effect: blur(3dp #fff);
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover, button:focus-visible,
|
||||||
|
input.submit:hover, input.submit:focus-visible
|
||||||
|
{
|
||||||
|
decorator: image(button-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
button:active,
|
||||||
|
input.submit:active
|
||||||
|
{
|
||||||
|
decorator: image(button-active);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.submit:disabled
|
||||||
|
{
|
||||||
|
decorator: image(button);
|
||||||
|
image-color: rgba(50, 150, 150, 120);
|
||||||
|
cursor: unavailable;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.text, input.password
|
||||||
|
{
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 31dp;
|
||||||
|
padding: 11dp 10dp 0;
|
||||||
|
decorator: tiled-horizontal( text-l, text-c, auto ); /* Right becomes mirrored left */
|
||||||
|
cursor: text;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
input.text:focus-visible, input.password:focus-visible
|
||||||
|
{
|
||||||
|
decorator: tiled-horizontal( text-focus-l, text-focus-c, auto );
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea
|
||||||
|
{
|
||||||
|
padding: 5dp 8dp;
|
||||||
|
decorator: ninepatch(textarea, textarea-inner, 1.0) border-box;
|
||||||
|
cursor: text;
|
||||||
|
text-align: left;
|
||||||
|
line-height: 1.3;
|
||||||
|
border-width: 14dp 12dp 10dp;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
textarea:focus-visible
|
||||||
|
{
|
||||||
|
decorator: ninepatch(textarea-focus, textarea-focus-inner, 1.0) border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.text,
|
||||||
|
input.password,
|
||||||
|
select,
|
||||||
|
textarea
|
||||||
|
{
|
||||||
|
color: #333;
|
||||||
|
font-size: 13dp;
|
||||||
|
}
|
||||||
|
|
||||||
|
table input.text
|
||||||
|
{
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 1dp 5dp;
|
||||||
|
height: auto;
|
||||||
|
line-height: 16dp;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
border-width: 1dp;
|
||||||
|
border-color: black;
|
||||||
|
background-color: white;
|
||||||
|
|
||||||
|
font-size: 15dp;
|
||||||
|
}
|
||||||
|
table input.text, table input.text:focus-visible
|
||||||
|
{
|
||||||
|
decorator: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
select
|
||||||
|
{
|
||||||
|
width: 175dp;
|
||||||
|
height: 37dp;
|
||||||
|
}
|
||||||
|
|
||||||
|
select selectvalue
|
||||||
|
{
|
||||||
|
width: auto;
|
||||||
|
margin-right: 30dp;
|
||||||
|
|
||||||
|
height: 25dp;
|
||||||
|
padding: 12dp 10dp 0dp 10dp;
|
||||||
|
|
||||||
|
decorator: image( selectvalue );
|
||||||
|
}
|
||||||
|
select:focus-visible selectvalue {
|
||||||
|
decorator: image( selectvalue-hover );
|
||||||
|
}
|
||||||
|
|
||||||
|
select selectarrow
|
||||||
|
{
|
||||||
|
width: 30dp;
|
||||||
|
height: 37dp;
|
||||||
|
|
||||||
|
decorator: image( selectarrow );
|
||||||
|
}
|
||||||
|
|
||||||
|
select:hover selectarrow, select:focus-visible selectarrow
|
||||||
|
{
|
||||||
|
decorator: image( selectarrow-hover );
|
||||||
|
}
|
||||||
|
|
||||||
|
select:active selectarrow,
|
||||||
|
select selectarrow:checked
|
||||||
|
{
|
||||||
|
decorator: image( selectarrow-active );
|
||||||
|
}
|
||||||
|
|
||||||
|
select selectbox
|
||||||
|
{
|
||||||
|
margin-left: 1dp;
|
||||||
|
margin-top: -7dp;
|
||||||
|
margin-bottom: -10dp;
|
||||||
|
width: 162dp;
|
||||||
|
padding: 1dp 4dp 4dp 4dp;
|
||||||
|
}
|
||||||
|
|
||||||
|
select selectbox,
|
||||||
|
tbody
|
||||||
|
{
|
||||||
|
decorator: tiled-box(
|
||||||
|
selectbox-tl, selectbox-t, selectbox-tr,
|
||||||
|
selectbox-l, selectbox-c, auto, /* auto mirrors left */
|
||||||
|
selectbox-bl, selectbox-b, selectbox-br
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
select selectbox option
|
||||||
|
{
|
||||||
|
width: auto;
|
||||||
|
padding: 3dp 0 3dp 6dp;
|
||||||
|
background: #DDDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
select selectbox option:nth-child(even),
|
||||||
|
tr:nth-child(even)
|
||||||
|
{
|
||||||
|
background: #FFFFFFA0;
|
||||||
|
}
|
||||||
|
select selectbox option:checked
|
||||||
|
{
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
select selectbox option:hover
|
||||||
|
{
|
||||||
|
background: #FF5D5D;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
input.radio,
|
||||||
|
input.checkbox
|
||||||
|
{
|
||||||
|
width: 30dp;
|
||||||
|
height: 30dp;
|
||||||
|
|
||||||
|
vertical-align: -11dp;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.radio
|
||||||
|
{
|
||||||
|
decorator: image(radio);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.radio:hover, input.radio:focus-visible
|
||||||
|
{
|
||||||
|
decorator: image(radio-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.radio:active
|
||||||
|
{
|
||||||
|
decorator: image(radio-active);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.radio:checked
|
||||||
|
{
|
||||||
|
decorator: image(radio-checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.radio:checked:hover, input.radio:checked:focus-visible
|
||||||
|
{
|
||||||
|
decorator: image(radio-checked-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.radio:checked:active
|
||||||
|
{
|
||||||
|
decorator: image(radio-checked-active);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.checkbox
|
||||||
|
{
|
||||||
|
decorator: image(checkbox);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.checkbox:hover, input.checkbox:focus-visible
|
||||||
|
{
|
||||||
|
decorator: image(checkbox-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.checkbox:active
|
||||||
|
{
|
||||||
|
decorator: image(checkbox-active);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.checkbox:checked
|
||||||
|
{
|
||||||
|
decorator: image(checkbox-checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.checkbox:checked:hover, input.checkbox:checked:focus-visible
|
||||||
|
{
|
||||||
|
decorator: image(checkbox-checked-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.checkbox:checked:active
|
||||||
|
{
|
||||||
|
decorator: image(checkbox-checked-active);
|
||||||
|
}
|
||||||
|
|
||||||
|
input.range {
|
||||||
|
width: 200dp;
|
||||||
|
height: 32dp;
|
||||||
|
vertical-align: -12dp;
|
||||||
|
}
|
||||||
|
input.range slidertrack {
|
||||||
|
margin-top: 3dp;
|
||||||
|
height: 22dp;
|
||||||
|
image-color: #ecc;
|
||||||
|
decorator: ninepatch( range-track, range-track-inner, 1.0 );
|
||||||
|
}
|
||||||
|
input.range:focus-visible slidertrack {
|
||||||
|
decorator: ninepatch( range-track-focus, range-track-focus-inner, 1.0 );
|
||||||
|
}
|
||||||
|
input.range sliderprogress {
|
||||||
|
background: rgba(100, 0, 0, 80);
|
||||||
|
margin-top: 8dp;
|
||||||
|
height: 7dp;
|
||||||
|
}
|
||||||
|
input.range sliderbar {
|
||||||
|
margin-left: -8dp;
|
||||||
|
margin-right: -7dp;
|
||||||
|
margin-top: -3dp;
|
||||||
|
width: 34dp;
|
||||||
|
height: 23dp;
|
||||||
|
decorator: image( range-bar );
|
||||||
|
}
|
||||||
|
input.range sliderbar:hover, input.range slidertrack:hover + sliderbar {
|
||||||
|
image-color: #cc0;
|
||||||
|
}
|
||||||
|
input.range sliderbar:active, input.range slidertrack:active + sliderbar {
|
||||||
|
image-color: #c80;
|
||||||
|
}
|
||||||
|
input.range sliderarrowdec, input.range sliderarrowinc {
|
||||||
|
width: 17dp;
|
||||||
|
height: 17dp;
|
||||||
|
margin-top: 6dp;
|
||||||
|
}
|
||||||
|
input.range sliderarrowdec { decorator: image( range-dec ); }
|
||||||
|
input.range sliderarrowinc { decorator: image( range-inc ); }
|
||||||
|
input.range sliderarrowdec:hover { decorator: image( range-dec-hover ); }
|
||||||
|
input.range sliderarrowinc:hover { decorator: image( range-inc-hover ); }
|
||||||
|
input.range sliderarrowdec:active { decorator: image( range-dec-active ); }
|
||||||
|
input.range sliderarrowinc:active { decorator: image( range-inc-active ); }
|
||||||
|
|
||||||
|
thead tr {
|
||||||
|
height: 35dp;
|
||||||
|
decorator: tiled-horizontal( tableheader-l, tableheader-c, tableheader-r );
|
||||||
|
}
|
||||||
|
thead td {
|
||||||
|
padding-top: 11dp;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody {
|
||||||
|
/* Margin left/right only affects the background positioning for the decorator, not the cell placement */
|
||||||
|
margin-left: 5dp;
|
||||||
|
margin-right: 4dp;
|
||||||
|
/* Padding top/bottom adds extra spacing between the header row and the body, and between the body and table bottom */
|
||||||
|
padding-top: 4dp;
|
||||||
|
padding-bottom: 4dp;
|
||||||
|
}
|
||||||
|
tbody tr {
|
||||||
|
margin-left: 9dp;
|
||||||
|
margin-right: 8dp;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
expand
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
margin: 1dp 0 1dp 5dp;
|
||||||
|
height: 17dp;
|
||||||
|
width: 17dp;
|
||||||
|
|
||||||
|
decorator: image( expand );
|
||||||
|
}
|
||||||
|
|
||||||
|
expand:hover
|
||||||
|
{
|
||||||
|
decorator: image( expand-hover );
|
||||||
|
}
|
||||||
|
|
||||||
|
expand:active
|
||||||
|
{
|
||||||
|
decorator: image( expand-active );
|
||||||
|
}
|
||||||
|
|
||||||
|
expand.collapsed
|
||||||
|
{
|
||||||
|
decorator: image( expand-collapsed );
|
||||||
|
}
|
||||||
|
|
||||||
|
expand.collapsed:hover
|
||||||
|
{
|
||||||
|
decorator: image( expand-collapsed-hover );
|
||||||
|
}
|
||||||
|
|
||||||
|
expand.collapsed:active
|
||||||
|
{
|
||||||
|
decorator: image( expand-collapsed-active );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
scrollbarvertical
|
||||||
|
{
|
||||||
|
margin-top: -6dp;
|
||||||
|
margin-bottom: -6dp;
|
||||||
|
margin-right: -11dp;
|
||||||
|
width: 27dp;
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollbarvertical slidertrack
|
||||||
|
{
|
||||||
|
decorator: tiled-vertical( slidertrack-t, slidertrack-c, slidertrack-b );
|
||||||
|
}
|
||||||
|
scrollbarvertical slidertrack:active
|
||||||
|
{
|
||||||
|
image-color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollbarvertical sliderbar
|
||||||
|
{
|
||||||
|
margin-left: 4dp;
|
||||||
|
width: 23dp;
|
||||||
|
min-height: 46dp;
|
||||||
|
|
||||||
|
decorator: tiled-vertical( sliderbar-t, sliderbar-c, sliderbar-b );
|
||||||
|
}
|
||||||
|
scrollbarvertical sliderbar:hover
|
||||||
|
{
|
||||||
|
decorator: tiled-vertical( sliderbar-hover-t, sliderbar-hover-c, sliderbar-hover-b );
|
||||||
|
}
|
||||||
|
scrollbarvertical sliderbar:active
|
||||||
|
{
|
||||||
|
decorator: tiled-vertical( sliderbar-active-t, sliderbar-active-c, sliderbar-active-b );
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollbarvertical sliderarrowdec,
|
||||||
|
scrollbarvertical sliderarrowinc
|
||||||
|
{
|
||||||
|
width: 27dp;
|
||||||
|
height: 24dp;
|
||||||
|
}
|
||||||
|
scrollbarvertical sliderarrowdec
|
||||||
|
{
|
||||||
|
decorator: image( sliderarrowdec );
|
||||||
|
}
|
||||||
|
scrollbarvertical sliderarrowdec:hover
|
||||||
|
{
|
||||||
|
decorator: image( sliderarrowdec-hover );
|
||||||
|
}
|
||||||
|
scrollbarvertical sliderarrowdec:active
|
||||||
|
{
|
||||||
|
decorator: image( sliderarrowdec-active );
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollbarvertical sliderarrowinc
|
||||||
|
{
|
||||||
|
decorator: image( sliderarrowinc );
|
||||||
|
}
|
||||||
|
scrollbarvertical sliderarrowinc:hover
|
||||||
|
{
|
||||||
|
decorator: image( sliderarrowinc-hover );
|
||||||
|
}
|
||||||
|
scrollbarvertical sliderarrowinc:active
|
||||||
|
{
|
||||||
|
decorator: image( sliderarrowinc-active );
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollbarhorizontal
|
||||||
|
{
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea scrollbarvertical
|
||||||
|
{
|
||||||
|
cursor: arrow;
|
||||||
|
width: 12dp;
|
||||||
|
margin: -3dp -7dp -3dp 7dp;
|
||||||
|
}
|
||||||
|
textarea scrollbarvertical slidertrack
|
||||||
|
{
|
||||||
|
decorator: none;
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
textarea scrollbarvertical sliderbar
|
||||||
|
{
|
||||||
|
decorator: none;
|
||||||
|
background-color: #bc0000;
|
||||||
|
border-left: 5dp #cc7272;
|
||||||
|
width: 7dp;
|
||||||
|
min-height: 16dp;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
textarea scrollbarvertical sliderbar:hover
|
||||||
|
{
|
||||||
|
decorator: none;
|
||||||
|
background-color: #ca3535;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea scrollbarvertical sliderbar:active
|
||||||
|
{
|
||||||
|
decorator: none;
|
||||||
|
background-color: #880000;
|
||||||
|
}
|
||||||
|
textarea scrollbarvertical sliderarrowdec,
|
||||||
|
textarea scrollbarvertical sliderarrowinc
|
||||||
|
{
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea scrollbarhorizontal
|
||||||
|
{
|
||||||
|
cursor: arrow;
|
||||||
|
height: 10dp;
|
||||||
|
margin: 3dp -7dp -3dp -3dp;
|
||||||
|
}
|
||||||
|
textarea scrollbarhorizontal sliderbar
|
||||||
|
{
|
||||||
|
background-color: #bc0000;
|
||||||
|
border-top: 4dp #cc7272;
|
||||||
|
height: 6dp;
|
||||||
|
min-width: 10dp;
|
||||||
|
}
|
||||||
|
textarea scrollbarhorizontal sliderbar:hover
|
||||||
|
{
|
||||||
|
background-color: #ca3535;
|
||||||
|
}
|
||||||
|
textarea scrollbarhorizontal sliderbar:active
|
||||||
|
{
|
||||||
|
background-color: #880000;
|
||||||
|
}
|
||||||
|
textarea scrollbarhorizontal slidertrack
|
||||||
|
{
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea scrollbarcorner
|
||||||
|
{
|
||||||
|
cursor: arrow;
|
||||||
|
background-color: #ccc;
|
||||||
|
margin-top: 3dp;
|
||||||
|
margin-left: 7dp;
|
||||||
|
}
|
||||||
BIN
src/main/assets/invader.tga
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
110
src/main/assets/phone.rcss
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
/* Ensure the body fills the entire window */
|
||||||
|
body {
|
||||||
|
font-family: LatoLatin;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background: #0f0f12;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Status Bar pinned to top */
|
||||||
|
#status-bar {
|
||||||
|
display: block;
|
||||||
|
height: 140px;
|
||||||
|
padding: 10px 20px 0;
|
||||||
|
background-color: rgba(255, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
float: left;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-icons {
|
||||||
|
float: right;
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Content area grows to fill space */
|
||||||
|
#content {
|
||||||
|
padding: 20px;
|
||||||
|
/* Leaves room for status and nav bars */
|
||||||
|
height: 80%;
|
||||||
|
align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-section {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 2.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mobile-style cards */
|
||||||
|
.card {
|
||||||
|
background: #1e1e24;
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 20px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
border: 1px solid #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
font-size: 1.2em;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
color: #3498db;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
height: 8px;
|
||||||
|
background: #333;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-fill {
|
||||||
|
width: 84%;
|
||||||
|
height: 100%;
|
||||||
|
background: #3498db;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Navigation Bar pinned to bottom */
|
||||||
|
#nav-bar {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 65px;
|
||||||
|
background-color: #16161a;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
border-top: 1px solid #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-item {
|
||||||
|
font-size: 1.9em;
|
||||||
|
color: #888;
|
||||||
|
background-color: red;
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
line-height: 90px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-item:hover {
|
||||||
|
color: #3498db;
|
||||||
|
background-color: blue;
|
||||||
|
}
|
||||||
BIN
src/main/assets/present.tga
Normal file
|
After Width: | Height: | Size: 40 KiB |
14
src/main/assets/quad.fs.glsl
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#version 300 es
|
||||||
|
#extension GL_OES_EGL_image_external_essl3 : require
|
||||||
|
|
||||||
|
precision mediump float;
|
||||||
|
|
||||||
|
uniform samplerExternalOES uTexture;
|
||||||
|
|
||||||
|
in vec2 vTexCoord;
|
||||||
|
out vec4 fragColor;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
fragColor = texture(uTexture, vTexCoord);
|
||||||
|
}
|
||||||
12
src/main/assets/quad.vs.glsl
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#version 300 es
|
||||||
|
|
||||||
|
layout(location = 0) in vec4 aPosition;
|
||||||
|
layout(location = 1) in vec2 aTexCoord;
|
||||||
|
|
||||||
|
out vec2 vTexCoord;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
gl_Position = aPosition;
|
||||||
|
vTexCoord = aTexCoord;
|
||||||
|
}
|
||||||
61
src/main/assets/rml.rcss
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* Default styles for all the basic elements.
|
||||||
|
*/
|
||||||
|
|
||||||
|
div
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
p
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
em
|
||||||
|
{
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
strong
|
||||||
|
{
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
select
|
||||||
|
{
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
tabset tabs
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
|
tr {
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: table-row;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: table-cell;
|
||||||
|
}
|
||||||
|
col {
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: table-column;
|
||||||
|
}
|
||||||
|
colgroup {
|
||||||
|
display: table-column-group;
|
||||||
|
}
|
||||||
|
thead, tbody, tfoot {
|
||||||
|
display: table-row-group;
|
||||||
|
}
|
||||||
36
src/main/assets/window.rcss
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
body {
|
||||||
|
font-family: LatoLatin;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #02475e;
|
||||||
|
background: #fefecc;
|
||||||
|
text-align: center;
|
||||||
|
padding: 2em 1em;
|
||||||
|
position: absolute;
|
||||||
|
border: 2px #ccc;
|
||||||
|
width: 500px;
|
||||||
|
height: 200px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #f6470a;
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.7em;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0.7em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.text {
|
||||||
|
background-color: #fff;
|
||||||
|
color: #555;
|
||||||
|
border: 2px #999;
|
||||||
|
padding: 5px;
|
||||||
|
tab-index: auto;
|
||||||
|
cursor: text;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 200px;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
19
src/main/assets/window.rml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<template name="window" content="content">
|
||||||
|
<head>
|
||||||
|
<link type="text/rcss" href="rml.rcss"/>
|
||||||
|
<link type="text/rcss" href="invader.rcss"/>
|
||||||
|
</head>
|
||||||
|
<body class="window">
|
||||||
|
<div id="title_bar">
|
||||||
|
<handle move_target="#document">
|
||||||
|
<div id="icon"></div>
|
||||||
|
<span id="title">Title</span>
|
||||||
|
</handle>
|
||||||
|
</div>
|
||||||
|
<div id="window">
|
||||||
|
<div id="content">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<handle size_target="#document" style="position: absolute; width: 16dp; height: 16dp; bottom: 0px; right: 0px; cursor: resize;"></handle>
|
||||||
|
</body>
|
||||||
|
</template>
|
||||||
@@ -4,30 +4,85 @@ project("mosis")
|
|||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
set(ANDROID_SDK "/Users/omar/Library/Android/sdk")
|
#set(ANDROID_SDK "/Users/omar/Library/Android/sdk")
|
||||||
set(BINDER_DIR "${ANDROID_SDK}/platforms/android-36/optional/libbinder_ndk_cpp")
|
set(BINDER_DIR "${ANDROID_SDK}/platforms/android-36/optional/libbinder_ndk_cpp")
|
||||||
|
set(AIDL_EXE "${ANDROID_SDK}/build-tools/36.1.0/aidl.exe")
|
||||||
|
|
||||||
|
find_package(RmlUi CONFIG REQUIRED)
|
||||||
|
|
||||||
|
#get_cmake_property(_variableNames VARIABLES)
|
||||||
|
#list(SORT _variableNames)
|
||||||
|
#foreach(_variableName ${_variableNames})
|
||||||
|
# message(STATUS "${_variableName}=${${_variableName}}")
|
||||||
|
#endforeach()
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/com/omixlab/mosis/IMosisService.cpp"
|
||||||
|
COMMAND ${AIDL_EXE} --lang=ndk --min_sdk_version=36 -o ${CMAKE_CURRENT_BINARY_DIR} -h ${CMAKE_CURRENT_BINARY_DIR} -I ..\\aidl ..\\aidl\\com\\omixlab\\mosis\\IMosisService.aidl
|
||||||
|
DEPENDS ../aidl/com/omixlab/mosis/IMosisService.aidl
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/com/omixlab/mosis/IMosisListener.cpp"
|
||||||
|
COMMAND ${AIDL_EXE} --lang=ndk --min_sdk_version=36 -o ${CMAKE_CURRENT_BINARY_DIR} -h ${CMAKE_CURRENT_BINARY_DIR} -I ..\\aidl ..\\aidl\\com\\omixlab\\mosis\\IMosisListener.aidl
|
||||||
|
DEPENDS ../aidl/com/omixlab/mosis/IMosisListener.aidl
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
|
||||||
add_library(mosis-service SHARED
|
add_library(mosis-service SHARED
|
||||||
mosis-service.cpp
|
mosis-service.cpp
|
||||||
com/omixlab/mosis/IMosisService.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/com/omixlab/mosis/IMosisService.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/com/omixlab/mosis/IMosisListener.cpp
|
||||||
|
assets_manager.cpp
|
||||||
|
shader.cpp
|
||||||
|
external_texture.cpp
|
||||||
|
quad.cpp
|
||||||
egl_context.cpp
|
egl_context.cpp
|
||||||
|
render_target.cpp
|
||||||
logger.cpp
|
logger.cpp
|
||||||
|
kernel.cpp
|
||||||
glad/src/egl.c
|
glad/src/egl.c
|
||||||
glad/src/gles2.c)
|
glad/src/gles2.c
|
||||||
|
RmlUi_Renderer_GL3.cpp
|
||||||
|
)
|
||||||
|
target_compile_definitions(mosis-service PUBLIC
|
||||||
|
RMLUI_NUM_MSAA_SAMPLES=2
|
||||||
|
RMLUI_GL3_CUSTOM_LOADER=<glad/gles2.h>
|
||||||
|
)
|
||||||
target_include_directories(mosis-service PUBLIC
|
target_include_directories(mosis-service PUBLIC
|
||||||
${CMAKE_CURRENT_LIST_DIR} ${BINDER_DIR} glad/include)
|
${CMAKE_CURRENT_LIST_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${BINDER_DIR}
|
||||||
|
glad/include
|
||||||
|
)
|
||||||
target_link_libraries(mosis-service
|
target_link_libraries(mosis-service
|
||||||
android log binder_ndk EGL GLESv2)
|
android log binder_ndk EGL GLESv2 nativewindow
|
||||||
|
RmlUi::RmlUi
|
||||||
|
)
|
||||||
|
|
||||||
add_library(mosis-test SHARED
|
add_library(mosis-test SHARED
|
||||||
com/omixlab/mosis/IMosisService.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/com/omixlab/mosis/IMosisService.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/com/omixlab/mosis/IMosisListener.cpp
|
||||||
mosis-test.cpp
|
mosis-test.cpp
|
||||||
|
assets_manager.cpp
|
||||||
|
shader.cpp
|
||||||
|
external_texture.cpp
|
||||||
|
quad.cpp
|
||||||
egl_context.cpp
|
egl_context.cpp
|
||||||
|
render_target.cpp
|
||||||
logger.cpp
|
logger.cpp
|
||||||
glad/src/egl.c
|
glad/src/egl.c
|
||||||
glad/src/gles2.c)
|
glad/src/gles2.c
|
||||||
|
)
|
||||||
target_include_directories(mosis-test PUBLIC
|
target_include_directories(mosis-test PUBLIC
|
||||||
${CMAKE_CURRENT_LIST_DIR} ${BINDER_DIR} glad/include)
|
${CMAKE_CURRENT_LIST_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${BINDER_DIR}
|
||||||
|
glad/include
|
||||||
|
)
|
||||||
target_link_libraries(mosis-test
|
target_link_libraries(mosis-test
|
||||||
android log binder_ndk EGL GLESv2)
|
android log binder_ndk EGL GLESv2 nativewindow
|
||||||
|
)
|
||||||
|
|||||||
2195
src/main/cpp/RmlUi_Renderer_GL3.cpp
Normal file
241
src/main/cpp/RmlUi_Renderer_GL3.h
Normal file
@@ -0,0 +1,241 @@
|
|||||||
|
/*
|
||||||
|
* This source file is part of RmlUi, the HTML/CSS Interface Middleware
|
||||||
|
*
|
||||||
|
* For the latest information, see http://github.com/mikke89/RmlUi
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
|
||||||
|
* Copyright (c) 2019-2023 The RmlUi Team, and contributors
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef RMLUI_BACKENDS_RENDERER_GL3_H
|
||||||
|
#define RMLUI_BACKENDS_RENDERER_GL3_H
|
||||||
|
|
||||||
|
#include <RmlUi/Core/RenderInterface.h>
|
||||||
|
#include <RmlUi/Core/Types.h>
|
||||||
|
#include <bitset>
|
||||||
|
|
||||||
|
enum class ProgramId;
|
||||||
|
enum class UniformId;
|
||||||
|
class RenderLayerStack;
|
||||||
|
namespace Gfx {
|
||||||
|
struct ProgramData;
|
||||||
|
struct FramebufferData;
|
||||||
|
} // namespace Gfx
|
||||||
|
|
||||||
|
class RenderInterface_GL3 : public Rml::RenderInterface {
|
||||||
|
public:
|
||||||
|
RenderInterface_GL3();
|
||||||
|
~RenderInterface_GL3();
|
||||||
|
|
||||||
|
// Returns true if the renderer was successfully constructed.
|
||||||
|
explicit operator bool() const { return static_cast<bool>(program_data); }
|
||||||
|
|
||||||
|
// The viewport should be updated whenever the window size changes.
|
||||||
|
void SetViewport(int viewport_width, int viewport_height, int viewport_offset_x = 0, int viewport_offset_y = 0);
|
||||||
|
|
||||||
|
// Sets up OpenGL states for taking rendering commands from RmlUi.
|
||||||
|
void BeginFrame();
|
||||||
|
// Draws the result to the backbuffer and restores OpenGL state.
|
||||||
|
void EndFrame(unsigned int fb0);
|
||||||
|
|
||||||
|
// Optional, can be used to clear the active framebuffer.
|
||||||
|
void Clear();
|
||||||
|
|
||||||
|
// -- Inherited from Rml::RenderInterface --
|
||||||
|
|
||||||
|
Rml::CompiledGeometryHandle CompileGeometry(Rml::Span<const Rml::Vertex> vertices, Rml::Span<const int> indices) override;
|
||||||
|
void RenderGeometry(Rml::CompiledGeometryHandle handle, Rml::Vector2f translation, Rml::TextureHandle texture) override;
|
||||||
|
void ReleaseGeometry(Rml::CompiledGeometryHandle handle) override;
|
||||||
|
|
||||||
|
Rml::TextureHandle LoadTexture(Rml::Vector2i& texture_dimensions, const Rml::String& source) override;
|
||||||
|
Rml::TextureHandle GenerateTexture(Rml::Span<const Rml::byte> source_data, Rml::Vector2i source_dimensions) override;
|
||||||
|
void ReleaseTexture(Rml::TextureHandle texture_handle) override;
|
||||||
|
|
||||||
|
void EnableScissorRegion(bool enable) override;
|
||||||
|
void SetScissorRegion(Rml::Rectanglei region) override;
|
||||||
|
|
||||||
|
void EnableClipMask(bool enable) override;
|
||||||
|
void RenderToClipMask(Rml::ClipMaskOperation mask_operation, Rml::CompiledGeometryHandle geometry, Rml::Vector2f translation) override;
|
||||||
|
|
||||||
|
void SetTransform(const Rml::Matrix4f* transform) override;
|
||||||
|
|
||||||
|
Rml::LayerHandle PushLayer() override;
|
||||||
|
void CompositeLayers(Rml::LayerHandle source, Rml::LayerHandle destination, Rml::BlendMode blend_mode,
|
||||||
|
Rml::Span<const Rml::CompiledFilterHandle> filters) override;
|
||||||
|
void PopLayer() override;
|
||||||
|
|
||||||
|
Rml::TextureHandle SaveLayerAsTexture() override;
|
||||||
|
|
||||||
|
Rml::CompiledFilterHandle SaveLayerAsMaskImage() override;
|
||||||
|
|
||||||
|
Rml::CompiledFilterHandle CompileFilter(const Rml::String& name, const Rml::Dictionary& parameters) override;
|
||||||
|
void ReleaseFilter(Rml::CompiledFilterHandle filter) override;
|
||||||
|
|
||||||
|
Rml::CompiledShaderHandle CompileShader(const Rml::String& name, const Rml::Dictionary& parameters) override;
|
||||||
|
void RenderShader(Rml::CompiledShaderHandle shader_handle, Rml::CompiledGeometryHandle geometry_handle, Rml::Vector2f translation,
|
||||||
|
Rml::TextureHandle texture) override;
|
||||||
|
void ReleaseShader(Rml::CompiledShaderHandle effect_handle) override;
|
||||||
|
|
||||||
|
// Can be passed to RenderGeometry() to enable texture rendering without changing the bound texture.
|
||||||
|
static constexpr Rml::TextureHandle TextureEnableWithoutBinding = Rml::TextureHandle(-1);
|
||||||
|
// Can be passed to RenderGeometry() to leave the bound texture and used program unchanged.
|
||||||
|
static constexpr Rml::TextureHandle TexturePostprocess = Rml::TextureHandle(-2);
|
||||||
|
|
||||||
|
// -- Utility functions for clients --
|
||||||
|
|
||||||
|
const Rml::Matrix4f& GetTransform() const;
|
||||||
|
void ResetProgram();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void UseProgram(ProgramId program_id);
|
||||||
|
int GetUniformLocation(UniformId uniform_id) const;
|
||||||
|
void SubmitTransformUniform(Rml::Vector2f translation);
|
||||||
|
|
||||||
|
void BlitLayerToPostprocessPrimary(Rml::LayerHandle layer_handle);
|
||||||
|
void RenderFilters(Rml::Span<const Rml::CompiledFilterHandle> filter_handles);
|
||||||
|
|
||||||
|
void SetScissor(Rml::Rectanglei region, bool vertically_flip = false);
|
||||||
|
|
||||||
|
void DrawFullscreenQuad();
|
||||||
|
void DrawFullscreenQuad(Rml::Vector2f uv_offset, Rml::Vector2f uv_scaling = Rml::Vector2f(1.f));
|
||||||
|
|
||||||
|
void RenderBlur(float sigma, const Gfx::FramebufferData& source_destination, const Gfx::FramebufferData& temp, Rml::Rectanglei window_flipped);
|
||||||
|
|
||||||
|
static constexpr size_t MaxNumPrograms = 32;
|
||||||
|
std::bitset<MaxNumPrograms> program_transform_dirty;
|
||||||
|
|
||||||
|
Rml::Matrix4f transform;
|
||||||
|
Rml::Matrix4f projection;
|
||||||
|
|
||||||
|
ProgramId active_program = {};
|
||||||
|
Rml::Rectanglei scissor_state;
|
||||||
|
|
||||||
|
int viewport_width = 0;
|
||||||
|
int viewport_height = 0;
|
||||||
|
int viewport_offset_x = 0;
|
||||||
|
int viewport_offset_y = 0;
|
||||||
|
|
||||||
|
Rml::CompiledGeometryHandle fullscreen_quad_geometry = {};
|
||||||
|
|
||||||
|
Rml::UniquePtr<const Gfx::ProgramData> program_data;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Manages render targets, including the layer stack and postprocessing framebuffers.
|
||||||
|
|
||||||
|
Layers can be pushed and popped, creating new framebuffers as needed. Typically, geometry is rendered to the top
|
||||||
|
layer. The layer framebuffers may have MSAA enabled.
|
||||||
|
|
||||||
|
Postprocessing framebuffers are separate from the layers, and are commonly used to apply texture-wide effects
|
||||||
|
such as filters. They are used both as input and output during rendering, and do not use MSAA.
|
||||||
|
*/
|
||||||
|
class RenderLayerStack {
|
||||||
|
public:
|
||||||
|
RenderLayerStack();
|
||||||
|
~RenderLayerStack();
|
||||||
|
|
||||||
|
// Push a new layer. All references to previously retrieved layers are invalidated.
|
||||||
|
Rml::LayerHandle PushLayer();
|
||||||
|
|
||||||
|
// Pop the top layer. All references to previously retrieved layers are invalidated.
|
||||||
|
void PopLayer();
|
||||||
|
|
||||||
|
const Gfx::FramebufferData& GetLayer(Rml::LayerHandle layer) const;
|
||||||
|
const Gfx::FramebufferData& GetTopLayer() const;
|
||||||
|
Rml::LayerHandle GetTopLayerHandle() const;
|
||||||
|
|
||||||
|
const Gfx::FramebufferData& GetPostprocessPrimary() { return EnsureFramebufferPostprocess(0); }
|
||||||
|
const Gfx::FramebufferData& GetPostprocessSecondary() { return EnsureFramebufferPostprocess(1); }
|
||||||
|
const Gfx::FramebufferData& GetPostprocessTertiary() { return EnsureFramebufferPostprocess(2); }
|
||||||
|
const Gfx::FramebufferData& GetBlendMask() { return EnsureFramebufferPostprocess(3); }
|
||||||
|
|
||||||
|
void SwapPostprocessPrimarySecondary();
|
||||||
|
|
||||||
|
void BeginFrame(int new_width, int new_height);
|
||||||
|
void EndFrame();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void DestroyFramebuffers();
|
||||||
|
const Gfx::FramebufferData& EnsureFramebufferPostprocess(int index);
|
||||||
|
|
||||||
|
int width = 0, height = 0;
|
||||||
|
|
||||||
|
// The number of active layers is manually tracked since we re-use the framebuffers stored in the fb_layers stack.
|
||||||
|
int layers_size = 0;
|
||||||
|
|
||||||
|
Rml::Vector<Gfx::FramebufferData> fb_layers;
|
||||||
|
Rml::Vector<Gfx::FramebufferData> fb_postprocess;
|
||||||
|
};
|
||||||
|
|
||||||
|
RenderLayerStack render_layers;
|
||||||
|
|
||||||
|
struct GLStateBackup {
|
||||||
|
bool enable_cull_face;
|
||||||
|
bool enable_blend;
|
||||||
|
bool enable_stencil_test;
|
||||||
|
bool enable_scissor_test;
|
||||||
|
bool enable_depth_test;
|
||||||
|
|
||||||
|
int viewport[4];
|
||||||
|
int scissor[4];
|
||||||
|
|
||||||
|
int active_texture;
|
||||||
|
|
||||||
|
int stencil_clear_value;
|
||||||
|
float color_clear_value[4];
|
||||||
|
unsigned char color_writemask[4];
|
||||||
|
|
||||||
|
int blend_equation_rgb;
|
||||||
|
int blend_equation_alpha;
|
||||||
|
int blend_src_rgb;
|
||||||
|
int blend_dst_rgb;
|
||||||
|
int blend_src_alpha;
|
||||||
|
int blend_dst_alpha;
|
||||||
|
|
||||||
|
struct Stencil {
|
||||||
|
int func;
|
||||||
|
int ref;
|
||||||
|
int value_mask;
|
||||||
|
int writemask;
|
||||||
|
int fail;
|
||||||
|
int pass_depth_fail;
|
||||||
|
int pass_depth_pass;
|
||||||
|
};
|
||||||
|
Stencil stencil_front;
|
||||||
|
Stencil stencil_back;
|
||||||
|
};
|
||||||
|
GLStateBackup glstate_backup = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
Helper functions for the OpenGL 3 renderer.
|
||||||
|
*/
|
||||||
|
namespace RmlGL3 {
|
||||||
|
|
||||||
|
// Loads OpenGL functions. Optionally, the out message describes the loaded GL version or an error message on failure.
|
||||||
|
bool Initialize(Rml::String* out_message = nullptr);
|
||||||
|
|
||||||
|
// Unloads OpenGL functions.
|
||||||
|
void Shutdown();
|
||||||
|
|
||||||
|
} // namespace RmlGL3
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is auto-generated. DO NOT MODIFY.
|
|
||||||
* Using: /Users/omar/Library/Android/sdk/build-tools/36.1.0/aidl --lang=ndk --min_sdk_version=36 -o src/main/cpp -h src/main/cpp -I src/main/aidl src/main/aidl/com/omixlab/mosis/IMosisService.aidl
|
|
||||||
*
|
|
||||||
* DO NOT CHECK THIS FILE INTO A CODE TREE (e.g. git, etc..).
|
|
||||||
* ALWAYS GENERATE THIS FILE FROM UPDATED AIDL COMPILER
|
|
||||||
* AS A BUILD INTERMEDIATE ONLY. THIS IS NOT SOURCE CODE.
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "aidl/com/omixlab/mosis/IMosisService.h"
|
|
||||||
|
|
||||||
#include <android/binder_ibinder.h>
|
|
||||||
#include <cassert>
|
|
||||||
|
|
||||||
#ifndef __BIONIC__
|
|
||||||
#ifndef __assert2
|
|
||||||
#define __assert2(a,b,c,d) ((void)0)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace aidl {
|
|
||||||
namespace com {
|
|
||||||
namespace omixlab {
|
|
||||||
namespace mosis {
|
|
||||||
class BnMosisService : public ::ndk::BnCInterface<IMosisService> {
|
|
||||||
public:
|
|
||||||
BnMosisService();
|
|
||||||
virtual ~BnMosisService();
|
|
||||||
protected:
|
|
||||||
::ndk::SpAIBinder createBinder() override;
|
|
||||||
private:
|
|
||||||
};
|
|
||||||
class IMosisServiceDelegator : public BnMosisService {
|
|
||||||
public:
|
|
||||||
explicit IMosisServiceDelegator(const std::shared_ptr<IMosisService> &impl) : _impl(impl) {
|
|
||||||
}
|
|
||||||
|
|
||||||
::ndk::ScopedAStatus initOS(bool* _aidl_return) override {
|
|
||||||
return _impl->initOS(_aidl_return);
|
|
||||||
}
|
|
||||||
::ndk::ScopedAStatus getNumber(int32_t* _aidl_return) override {
|
|
||||||
return _impl->getNumber(_aidl_return);
|
|
||||||
}
|
|
||||||
protected:
|
|
||||||
private:
|
|
||||||
std::shared_ptr<IMosisService> _impl;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace mosis
|
|
||||||
} // namespace omixlab
|
|
||||||
} // namespace com
|
|
||||||
} // namespace aidl
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is auto-generated. DO NOT MODIFY.
|
|
||||||
* Using: /Users/omar/Library/Android/sdk/build-tools/36.1.0/aidl --lang=ndk --min_sdk_version=36 -o src/main/cpp -h src/main/cpp -I src/main/aidl src/main/aidl/com/omixlab/mosis/IMosisService.aidl
|
|
||||||
*
|
|
||||||
* DO NOT CHECK THIS FILE INTO A CODE TREE (e.g. git, etc..).
|
|
||||||
* ALWAYS GENERATE THIS FILE FROM UPDATED AIDL COMPILER
|
|
||||||
* AS A BUILD INTERMEDIATE ONLY. THIS IS NOT SOURCE CODE.
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "aidl/com/omixlab/mosis/IMosisService.h"
|
|
||||||
|
|
||||||
#include <android/binder_ibinder.h>
|
|
||||||
|
|
||||||
namespace aidl {
|
|
||||||
namespace com {
|
|
||||||
namespace omixlab {
|
|
||||||
namespace mosis {
|
|
||||||
class BpMosisService : public ::ndk::BpCInterface<IMosisService> {
|
|
||||||
public:
|
|
||||||
explicit BpMosisService(const ::ndk::SpAIBinder& binder);
|
|
||||||
virtual ~BpMosisService();
|
|
||||||
|
|
||||||
::ndk::ScopedAStatus initOS(bool* _aidl_return) override;
|
|
||||||
::ndk::ScopedAStatus getNumber(int32_t* _aidl_return) override;
|
|
||||||
};
|
|
||||||
} // namespace mosis
|
|
||||||
} // namespace omixlab
|
|
||||||
} // namespace com
|
|
||||||
} // namespace aidl
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is auto-generated. DO NOT MODIFY.
|
|
||||||
* Using: /Users/omar/Library/Android/sdk/build-tools/36.1.0/aidl --lang=ndk --min_sdk_version=36 -o src/main/cpp -h src/main/cpp -I src/main/aidl src/main/aidl/com/omixlab/mosis/IMosisService.aidl
|
|
||||||
*
|
|
||||||
* DO NOT CHECK THIS FILE INTO A CODE TREE (e.g. git, etc..).
|
|
||||||
* ALWAYS GENERATE THIS FILE FROM UPDATED AIDL COMPILER
|
|
||||||
* AS A BUILD INTERMEDIATE ONLY. THIS IS NOT SOURCE CODE.
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <memory>
|
|
||||||
#include <optional>
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <android/binder_interface_utils.h>
|
|
||||||
#ifdef BINDER_STABILITY_SUPPORT
|
|
||||||
#include <android/binder_stability.h>
|
|
||||||
#endif // BINDER_STABILITY_SUPPORT
|
|
||||||
|
|
||||||
namespace aidl {
|
|
||||||
namespace com {
|
|
||||||
namespace omixlab {
|
|
||||||
namespace mosis {
|
|
||||||
class IMosisServiceDelegator;
|
|
||||||
|
|
||||||
class IMosisService : public ::ndk::ICInterface {
|
|
||||||
public:
|
|
||||||
typedef IMosisServiceDelegator DefaultDelegator;
|
|
||||||
static const char* descriptor;
|
|
||||||
IMosisService();
|
|
||||||
virtual ~IMosisService();
|
|
||||||
|
|
||||||
static constexpr uint32_t TRANSACTION_initOS = FIRST_CALL_TRANSACTION + 0;
|
|
||||||
static constexpr uint32_t TRANSACTION_getNumber = FIRST_CALL_TRANSACTION + 1;
|
|
||||||
|
|
||||||
static std::shared_ptr<IMosisService> fromBinder(const ::ndk::SpAIBinder& binder);
|
|
||||||
static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<IMosisService>& instance);
|
|
||||||
static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<IMosisService>* instance);
|
|
||||||
static bool setDefaultImpl(const std::shared_ptr<IMosisService>& impl);
|
|
||||||
static const std::shared_ptr<IMosisService>& getDefaultImpl();
|
|
||||||
virtual ::ndk::ScopedAStatus initOS(bool* _aidl_return) = 0;
|
|
||||||
virtual ::ndk::ScopedAStatus getNumber(int32_t* _aidl_return) = 0;
|
|
||||||
private:
|
|
||||||
static std::shared_ptr<IMosisService> default_impl;
|
|
||||||
};
|
|
||||||
class IMosisServiceDefault : public IMosisService {
|
|
||||||
public:
|
|
||||||
::ndk::ScopedAStatus initOS(bool* _aidl_return) override;
|
|
||||||
::ndk::ScopedAStatus getNumber(int32_t* _aidl_return) override;
|
|
||||||
::ndk::SpAIBinder asBinder() override;
|
|
||||||
bool isRemote() override;
|
|
||||||
};
|
|
||||||
} // namespace mosis
|
|
||||||
} // namespace omixlab
|
|
||||||
} // namespace com
|
|
||||||
} // namespace aidl
|
|
||||||
26
src/main/cpp/assets_manager.cpp
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#include "assets_manager.h"
|
||||||
|
#include <android/asset_manager.h>
|
||||||
|
|
||||||
|
void AssetsManager::Init(AAssetManager *asset_manager)
|
||||||
|
{
|
||||||
|
m_asset_manager = asset_manager;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<uint8_t> AssetsManager::ReadAll(const std::string &filename)
|
||||||
|
{
|
||||||
|
if (AAsset* asset = AAssetManager_open(m_asset_manager,
|
||||||
|
filename.c_str(), AASSET_MODE_BUFFER))
|
||||||
|
{
|
||||||
|
const auto size = AAsset_getLength(asset);
|
||||||
|
auto buffer = std::vector<uint8_t>(size);
|
||||||
|
AAsset_read(asset, buffer.data(), size);
|
||||||
|
AAsset_close(asset);
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
AAssetManager *AssetsManager::Native()
|
||||||
|
{
|
||||||
|
return m_asset_manager;
|
||||||
|
}
|
||||||
14
src/main/cpp/assets_manager.h
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
struct AAssetManager;
|
||||||
|
struct AAsset;
|
||||||
|
|
||||||
|
class AssetsManager
|
||||||
|
{
|
||||||
|
static inline AAssetManager* m_asset_manager = nullptr;
|
||||||
|
public:
|
||||||
|
static void Init(AAssetManager* asset_manager);
|
||||||
|
static std::vector<uint8_t> ReadAll(const std::string& filename);
|
||||||
|
static AAssetManager* Native();
|
||||||
|
};
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is auto-generated. DO NOT MODIFY.
|
|
||||||
* Using: /Users/omar/Library/Android/sdk/build-tools/36.1.0/aidl --lang=ndk --min_sdk_version=36 -o src/main/cpp -h src/main/cpp -I src/main/aidl src/main/aidl/com/omixlab/mosis/IMosisService.aidl
|
|
||||||
*
|
|
||||||
* DO NOT CHECK THIS FILE INTO A CODE TREE (e.g. git, etc..).
|
|
||||||
* ALWAYS GENERATE THIS FILE FROM UPDATED AIDL COMPILER
|
|
||||||
* AS A BUILD INTERMEDIATE ONLY. THIS IS NOT SOURCE CODE.
|
|
||||||
*/
|
|
||||||
#include "aidl/com/omixlab/mosis/IMosisService.h"
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <android/binder_parcel.h>
|
|
||||||
#include <android/binder_parcel_utils.h>
|
|
||||||
#include <android/binder_status.h>
|
|
||||||
#include <aidl/com/omixlab/mosis/BnMosisService.h>
|
|
||||||
#include <aidl/com/omixlab/mosis/BpMosisService.h>
|
|
||||||
|
|
||||||
namespace aidl {
|
|
||||||
namespace com {
|
|
||||||
namespace omixlab {
|
|
||||||
namespace mosis {
|
|
||||||
static binder_status_t _aidl_com_omixlab_mosis_IMosisService_onTransact(AIBinder* _aidl_binder, transaction_code_t _aidl_code, const AParcel* _aidl_in, AParcel* _aidl_out) {
|
|
||||||
(void)_aidl_in;
|
|
||||||
(void)_aidl_out;
|
|
||||||
binder_status_t _aidl_ret_status = STATUS_UNKNOWN_TRANSACTION;
|
|
||||||
std::shared_ptr<BnMosisService> _aidl_impl = std::static_pointer_cast<BnMosisService>(::ndk::ICInterface::asInterface(_aidl_binder));
|
|
||||||
switch (_aidl_code) {
|
|
||||||
case (FIRST_CALL_TRANSACTION + 0 /*initOS*/): {
|
|
||||||
bool _aidl_return;
|
|
||||||
|
|
||||||
::ndk::ScopedAStatus _aidl_status = _aidl_impl->initOS(&_aidl_return);
|
|
||||||
_aidl_ret_status = AParcel_writeStatusHeader(_aidl_out, _aidl_status.get());
|
|
||||||
if (_aidl_ret_status != STATUS_OK) break;
|
|
||||||
|
|
||||||
if (!AStatus_isOk(_aidl_status.get())) break;
|
|
||||||
|
|
||||||
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_out, _aidl_return);
|
|
||||||
if (_aidl_ret_status != STATUS_OK) break;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (FIRST_CALL_TRANSACTION + 1 /*getNumber*/): {
|
|
||||||
int32_t _aidl_return;
|
|
||||||
|
|
||||||
::ndk::ScopedAStatus _aidl_status = _aidl_impl->getNumber(&_aidl_return);
|
|
||||||
_aidl_ret_status = AParcel_writeStatusHeader(_aidl_out, _aidl_status.get());
|
|
||||||
if (_aidl_ret_status != STATUS_OK) break;
|
|
||||||
|
|
||||||
if (!AStatus_isOk(_aidl_status.get())) break;
|
|
||||||
|
|
||||||
_aidl_ret_status = ::ndk::AParcel_writeData(_aidl_out, _aidl_return);
|
|
||||||
if (_aidl_ret_status != STATUS_OK) break;
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _aidl_ret_status;
|
|
||||||
}
|
|
||||||
|
|
||||||
static AIBinder_Class* _g_aidl_com_omixlab_mosis_IMosisService_clazz = ::ndk::ICInterface::defineClass(IMosisService::descriptor, _aidl_com_omixlab_mosis_IMosisService_onTransact, nullptr, 0);
|
|
||||||
|
|
||||||
BpMosisService::BpMosisService(const ::ndk::SpAIBinder& binder) : BpCInterface(binder) {}
|
|
||||||
BpMosisService::~BpMosisService() {}
|
|
||||||
|
|
||||||
::ndk::ScopedAStatus BpMosisService::initOS(bool* _aidl_return) {
|
|
||||||
binder_status_t _aidl_ret_status = STATUS_OK;
|
|
||||||
::ndk::ScopedAStatus _aidl_status;
|
|
||||||
::ndk::ScopedAParcel _aidl_in;
|
|
||||||
::ndk::ScopedAParcel _aidl_out;
|
|
||||||
|
|
||||||
_aidl_ret_status = AIBinder_prepareTransaction(asBinderReference().get(), _aidl_in.getR());
|
|
||||||
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
||||||
|
|
||||||
_aidl_ret_status = AIBinder_transact(
|
|
||||||
asBinderReference().get(),
|
|
||||||
(FIRST_CALL_TRANSACTION + 0 /*initOS*/),
|
|
||||||
_aidl_in.getR(),
|
|
||||||
_aidl_out.getR(),
|
|
||||||
0
|
|
||||||
#ifdef BINDER_STABILITY_SUPPORT
|
|
||||||
| static_cast<int>(FLAG_PRIVATE_LOCAL)
|
|
||||||
#endif // BINDER_STABILITY_SUPPORT
|
|
||||||
);
|
|
||||||
if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && IMosisService::getDefaultImpl()) {
|
|
||||||
_aidl_status = IMosisService::getDefaultImpl()->initOS(_aidl_return);
|
|
||||||
goto _aidl_status_return;
|
|
||||||
}
|
|
||||||
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
||||||
|
|
||||||
_aidl_ret_status = AParcel_readStatusHeader(_aidl_out.get(), _aidl_status.getR());
|
|
||||||
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
||||||
|
|
||||||
if (!AStatus_isOk(_aidl_status.get())) goto _aidl_status_return;
|
|
||||||
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_out.get(), _aidl_return);
|
|
||||||
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
||||||
|
|
||||||
_aidl_error:
|
|
||||||
_aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
|
|
||||||
_aidl_status_return:
|
|
||||||
return _aidl_status;
|
|
||||||
}
|
|
||||||
::ndk::ScopedAStatus BpMosisService::getNumber(int32_t* _aidl_return) {
|
|
||||||
binder_status_t _aidl_ret_status = STATUS_OK;
|
|
||||||
::ndk::ScopedAStatus _aidl_status;
|
|
||||||
::ndk::ScopedAParcel _aidl_in;
|
|
||||||
::ndk::ScopedAParcel _aidl_out;
|
|
||||||
|
|
||||||
_aidl_ret_status = AIBinder_prepareTransaction(asBinderReference().get(), _aidl_in.getR());
|
|
||||||
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
||||||
|
|
||||||
_aidl_ret_status = AIBinder_transact(
|
|
||||||
asBinderReference().get(),
|
|
||||||
(FIRST_CALL_TRANSACTION + 1 /*getNumber*/),
|
|
||||||
_aidl_in.getR(),
|
|
||||||
_aidl_out.getR(),
|
|
||||||
0
|
|
||||||
#ifdef BINDER_STABILITY_SUPPORT
|
|
||||||
| static_cast<int>(FLAG_PRIVATE_LOCAL)
|
|
||||||
#endif // BINDER_STABILITY_SUPPORT
|
|
||||||
);
|
|
||||||
if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && IMosisService::getDefaultImpl()) {
|
|
||||||
_aidl_status = IMosisService::getDefaultImpl()->getNumber(_aidl_return);
|
|
||||||
goto _aidl_status_return;
|
|
||||||
}
|
|
||||||
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
||||||
|
|
||||||
_aidl_ret_status = AParcel_readStatusHeader(_aidl_out.get(), _aidl_status.getR());
|
|
||||||
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
||||||
|
|
||||||
if (!AStatus_isOk(_aidl_status.get())) goto _aidl_status_return;
|
|
||||||
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_out.get(), _aidl_return);
|
|
||||||
if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
|
|
||||||
|
|
||||||
_aidl_error:
|
|
||||||
_aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
|
|
||||||
_aidl_status_return:
|
|
||||||
return _aidl_status;
|
|
||||||
}
|
|
||||||
// Source for BnMosisService
|
|
||||||
BnMosisService::BnMosisService() {}
|
|
||||||
BnMosisService::~BnMosisService() {}
|
|
||||||
::ndk::SpAIBinder BnMosisService::createBinder() {
|
|
||||||
AIBinder* binder = AIBinder_new(_g_aidl_com_omixlab_mosis_IMosisService_clazz, static_cast<void*>(this));
|
|
||||||
#ifdef BINDER_STABILITY_SUPPORT
|
|
||||||
AIBinder_markCompilationUnitStability(binder);
|
|
||||||
#endif // BINDER_STABILITY_SUPPORT
|
|
||||||
return ::ndk::SpAIBinder(binder);
|
|
||||||
}
|
|
||||||
// Source for IMosisService
|
|
||||||
const char* IMosisService::descriptor = "com.omixlab.mosis.IMosisService";
|
|
||||||
IMosisService::IMosisService() {}
|
|
||||||
IMosisService::~IMosisService() {}
|
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<IMosisService> IMosisService::fromBinder(const ::ndk::SpAIBinder& binder) {
|
|
||||||
if (!AIBinder_associateClass(binder.get(), _g_aidl_com_omixlab_mosis_IMosisService_clazz)) {
|
|
||||||
#if __ANDROID_API__ >= 31
|
|
||||||
const AIBinder_Class* originalClass = AIBinder_getClass(binder.get());
|
|
||||||
if (originalClass == nullptr) return nullptr;
|
|
||||||
if (0 == strcmp(AIBinder_Class_getDescriptor(originalClass), descriptor)) {
|
|
||||||
return ::ndk::SharedRefBase::make<BpMosisService>(binder);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
std::shared_ptr<::ndk::ICInterface> interface = ::ndk::ICInterface::asInterface(binder.get());
|
|
||||||
if (interface) {
|
|
||||||
return std::static_pointer_cast<IMosisService>(interface);
|
|
||||||
}
|
|
||||||
return ::ndk::SharedRefBase::make<BpMosisService>(binder);
|
|
||||||
}
|
|
||||||
|
|
||||||
binder_status_t IMosisService::writeToParcel(AParcel* parcel, const std::shared_ptr<IMosisService>& instance) {
|
|
||||||
return AParcel_writeStrongBinder(parcel, instance ? instance->asBinder().get() : nullptr);
|
|
||||||
}
|
|
||||||
binder_status_t IMosisService::readFromParcel(const AParcel* parcel, std::shared_ptr<IMosisService>* instance) {
|
|
||||||
::ndk::SpAIBinder binder;
|
|
||||||
binder_status_t status = AParcel_readStrongBinder(parcel, binder.getR());
|
|
||||||
if (status != STATUS_OK) return status;
|
|
||||||
*instance = IMosisService::fromBinder(binder);
|
|
||||||
return STATUS_OK;
|
|
||||||
}
|
|
||||||
bool IMosisService::setDefaultImpl(const std::shared_ptr<IMosisService>& impl) {
|
|
||||||
// Only one user of this interface can use this function
|
|
||||||
// at a time. This is a heuristic to detect if two different
|
|
||||||
// users in the same process use this function.
|
|
||||||
assert(!IMosisService::default_impl);
|
|
||||||
if (impl) {
|
|
||||||
IMosisService::default_impl = impl;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const std::shared_ptr<IMosisService>& IMosisService::getDefaultImpl() {
|
|
||||||
return IMosisService::default_impl;
|
|
||||||
}
|
|
||||||
std::shared_ptr<IMosisService> IMosisService::default_impl = nullptr;
|
|
||||||
::ndk::ScopedAStatus IMosisServiceDefault::initOS(bool* /*_aidl_return*/) {
|
|
||||||
::ndk::ScopedAStatus _aidl_status;
|
|
||||||
_aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
|
|
||||||
return _aidl_status;
|
|
||||||
}
|
|
||||||
::ndk::ScopedAStatus IMosisServiceDefault::getNumber(int32_t* /*_aidl_return*/) {
|
|
||||||
::ndk::ScopedAStatus _aidl_status;
|
|
||||||
_aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
|
|
||||||
return _aidl_status;
|
|
||||||
}
|
|
||||||
::ndk::SpAIBinder IMosisServiceDefault::asBinder() {
|
|
||||||
return ::ndk::SpAIBinder();
|
|
||||||
}
|
|
||||||
bool IMosisServiceDefault::isRemote() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} // namespace mosis
|
|
||||||
} // namespace omixlab
|
|
||||||
} // namespace com
|
|
||||||
} // namespace aidl
|
|
||||||