├── .gitignore ├── CMakeLists.txt ├── CMakePresets.json ├── LICENSE.txt ├── README.md ├── build.cmd ├── build.sh ├── source └── chat │ ├── contact.h │ ├── extended_contact.h │ ├── folder │ ├── abstract_element.h │ └── element.h │ ├── model.cpp │ ├── model.h │ ├── session.cpp │ └── session.h └── ui ├── android ├── .gitignore ├── app │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── chat │ │ │ └── ExampleInstrumentedTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── chat │ │ │ │ └── MainActivity.java │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ └── ic_launcher_background.xml │ │ │ ├── layout │ │ │ ├── activity_main.xml │ │ │ └── content_main.xml │ │ │ ├── menu │ │ │ └── menu_main.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── example │ │ └── chat │ │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── cpp ├── CMakeLists.txt └── source │ └── main.cpp ├── cs ├── CMakeLists.txt └── source │ ├── App.config │ ├── Form1.Designer.cs │ ├── Form1.cs │ ├── Program.cs │ └── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── ios ├── chat.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── chat │ ├── chat.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── chat.xcscheme │ └── chat │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ ├── TestObjC.h │ ├── TestObjC.m │ ├── ViewController.swift │ └── chat-Bridging-Header.h ├── java ├── CMakeLists.txt └── com │ └── example │ └── chat │ └── Chat.java ├── js ├── serve.cmd ├── serve.sh └── test.html ├── macos ├── chat.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── chat │ ├── chat.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── chat.xcscheme │ └── chat │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ ├── TestObjC.h │ ├── TestObjC.m │ ├── ViewController.swift │ ├── chat-Bridging-Header.h │ └── chat.entitlements └── python ├── run.py ├── test_enum.py ├── test_override.py └── test_struct.py /.gitignore: -------------------------------------------------------------------------------- 1 | # scapix 2 | /build/ 3 | /generated/ 4 | /dev.cmd 5 | /dev.sh 6 | 7 | # macos 8 | .DS_Store 9 | 10 | # xcode 11 | xcuserdata/ 12 | 13 | # vs 14 | .vs/ 15 | 16 | # vs cs 17 | **/bin/Debug/ 18 | **/bin/Release/ 19 | **/obj/Debug/ 20 | **/obj/Release/ 21 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20...3.27) 2 | 3 | project(chatlib) 4 | 5 | include(FetchContent) 6 | FetchContent_Declare( 7 | cmodule 8 | URL "https://github.com/scapix-com/cmodule/archive/refs/tags/v2.0.1.tar.gz" 9 | URL_HASH SHA256=a9477bbefb43b6fabdc2dc044207fe42cca63999c60b6baf06ba0c62fa116ec5 10 | ) 11 | FetchContent_MakeAvailable(cmodule) 12 | 13 | file(GLOB_RECURSE bridge_headers CONFIGURE_DEPENDS "source/*.h") 14 | file(GLOB_RECURSE sources CONFIGURE_DEPENDS "source/*") 15 | source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}/source" PREFIX "source" FILES ${sources}) 16 | 17 | find_package(Scapix REQUIRED) 18 | 19 | scapix_add_target(chatlib "com.example.chat" ${bridge_headers}) 20 | target_sources(chatlib PRIVATE ${sources}) 21 | target_include_directories(chatlib PUBLIC source) 22 | 23 | if(EXISTS "ui/${SCAPIX_BRIDGE}/CMakeLists.txt") 24 | add_subdirectory("ui/${SCAPIX_BRIDGE}") 25 | endif() 26 | -------------------------------------------------------------------------------- /CMakePresets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "configurePresets": [ 4 | { 5 | "name": "default", 6 | "displayName": "Default build, Scapix Bridge disabled", 7 | "binaryDir": "${sourceDir}/build/${presetName}" 8 | }, 9 | { 10 | "name": "java", 11 | "inherits": [ "default" ], 12 | "cacheVariables": { 13 | "SCAPIX_BRIDGE": "java" 14 | } 15 | }, 16 | { 17 | "name": "objc", 18 | "inherits": [ "default" ], 19 | "cacheVariables": { 20 | "SCAPIX_BRIDGE": "objc" 21 | } 22 | }, 23 | { 24 | "name": "objc-ios", 25 | "inherits": [ "objc" ], 26 | "cacheVariables": { 27 | "CMAKE_SYSTEM_NAME": "iOS", 28 | "CMAKE_OSX_ARCHITECTURES": "arm64" 29 | } 30 | }, 31 | { 32 | "name": "objc-tvos", 33 | "inherits": [ "objc" ], 34 | "cacheVariables": { 35 | "CMAKE_SYSTEM_NAME": "tvOS", 36 | "CMAKE_OSX_ARCHITECTURES": "arm64" 37 | } 38 | }, 39 | { 40 | "name": "objc-watchos", 41 | "inherits": [ "objc" ], 42 | "cacheVariables": { 43 | "CMAKE_SYSTEM_NAME": "watchOS", 44 | "CMAKE_OSX_ARCHITECTURES": "arm64" 45 | } 46 | }, 47 | { 48 | "name": "objc-visionos", 49 | "inherits": [ "objc" ], 50 | "cacheVariables": { 51 | "CMAKE_SYSTEM_NAME": "visionOS", 52 | "CMAKE_OSX_ARCHITECTURES": "arm64" 53 | } 54 | }, 55 | { 56 | "name": "python", 57 | "inherits": [ "default" ], 58 | "cacheVariables": { 59 | "SCAPIX_BRIDGE": "python" 60 | } 61 | }, 62 | { 63 | "name": "js", 64 | "inherits": [ "default" ], 65 | "cacheVariables": { 66 | "SCAPIX_BRIDGE": "js", 67 | "CMAKE_TOOLCHAIN_FILE": "$env{EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake" 68 | } 69 | }, 70 | { 71 | "name": "ninja-js", 72 | "inherits": [ "js" ], 73 | "generator": "Ninja" 74 | }, 75 | { 76 | "name": "cs", 77 | "inherits": [ "default" ], 78 | "cacheVariables": { 79 | "SCAPIX_BRIDGE": "cs" 80 | } 81 | }, 82 | { 83 | "name": "xcode", 84 | "inherits": [ "default" ], 85 | "generator": "Xcode", 86 | "cacheVariables": { 87 | "CMAKE_OSX_ARCHITECTURES": "" 88 | } 89 | }, 90 | { 91 | "name": "xcode-java", 92 | "inherits": [ "xcode", "java" ] 93 | }, 94 | { 95 | "name": "xcode-objc", 96 | "inherits": [ "xcode", "objc" ] 97 | }, 98 | { 99 | "name": "xcode-objc-ios", 100 | "inherits": [ "xcode", "objc-ios" ] 101 | }, 102 | { 103 | "name": "xcode-objc-tvos", 104 | "inherits": [ "xcode", "objc-tvos" ] 105 | }, 106 | { 107 | "name": "xcode-objc-watchos", 108 | "inherits": [ "xcode", "objc-watchos" ] 109 | }, 110 | { 111 | "name": "xcode-objc-visionos", 112 | "inherits": [ "xcode", "objc-visionos" ] 113 | }, 114 | { 115 | "name": "xcode-python", 116 | "inherits": [ "xcode", "python" ] 117 | }, 118 | { 119 | "name": "xcode-cs", 120 | "inherits": [ "xcode", "cs" ] 121 | }, 122 | { 123 | "name": "vs2019", 124 | "inherits": [ "default" ], 125 | "generator": "Visual Studio 16 2019" 126 | }, 127 | { 128 | "name": "vs2019-clang", 129 | "inherits": [ "vs2019" ], 130 | "toolset": "clangcl" 131 | }, 132 | { 133 | "name": "vs2019-java", 134 | "inherits": [ "vs2019", "java" ] 135 | }, 136 | { 137 | "name": "vs2019-clang-java", 138 | "inherits": [ "vs2019-clang", "java" ] 139 | }, 140 | { 141 | "name": "vs2019-python", 142 | "inherits": [ "vs2019", "python" ] 143 | }, 144 | { 145 | "name": "vs2019-clang-python", 146 | "inherits": [ "vs2019-clang", "python" ] 147 | }, 148 | { 149 | "name": "vs2019-cs", 150 | "inherits": [ "vs2019", "cs" ] 151 | }, 152 | { 153 | "name": "vs2022", 154 | "inherits": [ "default" ], 155 | "generator": "Visual Studio 17 2022" 156 | }, 157 | { 158 | "name": "vs2022-clang", 159 | "inherits": [ "vs2022" ], 160 | "toolset": "clangcl" 161 | }, 162 | { 163 | "name": "vs2022-java", 164 | "inherits": [ "vs2022", "java" ] 165 | }, 166 | { 167 | "name": "vs2022-clang-java", 168 | "inherits": [ "vs2022-clang", "java" ] 169 | }, 170 | { 171 | "name": "vs2022-python", 172 | "inherits": [ "vs2022", "python" ] 173 | }, 174 | { 175 | "name": "vs2022-clang-python", 176 | "inherits": [ "vs2022-clang", "python" ] 177 | }, 178 | { 179 | "name": "vs2022-cs", 180 | "inherits": [ "vs2022", "cs" ] 181 | } 182 | ] 183 | } 184 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | This is the Scapix Example Code License Agreement 2 | 3 | MIT License 4 | 5 | Copyright (c) 2019 Boris Rasin 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Example for [Scapix Language Bridge](https://www.scapix.com/) 2 | 3 | On the fly code generation to bridge C++ to `Java`, `Objective-C`, `Swift`, `Python`, `JavaScript` (WebAssembly) and `C#`. 4 | 5 | 1. Change your C++ code and build your project (bindings generated as part of the build). 6 | 2. Call newly changed C++ code from Java, Objective-C, Swift, Python, JavaScript or C#. 7 | 8 | ### Install 9 | 10 | ```bash 11 | $ git clone https://github.com/scapix-com/example1 12 | ``` 13 | 14 | ### Build 15 | 16 | `build.sh` script (or `build.cmd` on Windows) runs CMake configure and build steps using selected CMake preset. 17 | 18 | - Run `build` script without parameters to see list of available CMake presets. 19 | - Run `build` script specifying one the the presets to create and build library project (chatlib). 20 | - Open corresponding platform specific application project in **ui** folder (chat). 21 | 22 | #### macOS 23 | 24 | - Run: `./build.sh xcode-objc` 25 | - Open in Xcode: **ui/macos/chat.xcworkspace** 26 | 27 | #### iOS 28 | 29 | - Run: `./build.sh xcode-objc-ios` 30 | - Open in Xcode: **ui/ios/chat.xcworkspace** 31 | 32 | #### tvOS 33 | 34 | - Run: `./build.sh xcode-objc-tvos` 35 | 36 | #### watchOS 37 | 38 | - Run: `./build.sh xcode-objc-watchos` 39 | 40 | #### visionOS 41 | 42 | - Run: `./build.sh xcode-objc-visionos` 43 | 44 | #### Android (on Windows, macOS or Linux) 45 | 46 | - Open in Android Studio: **ui/android** 47 | - Requires: [Ninja](https://github.com/ninja-build/ninja/releases), see [Install CMake and Ninja](https://developer.android.com/studio/projects/install-ndk#vanilla_cmake) 48 | 49 | #### Python (on Windows, macOS or Linux) 50 | 51 | ```bash 52 | $ ./build.sh python 53 | $ cd ui/python 54 | $ ./run.py 55 | ``` 56 | 57 | You can also specify CMake generator explicitly and then open generated project in corresponding IDE: 58 | 59 | ```bash 60 | $ build vs2019-python 61 | $ build vs2022-python 62 | $ ./build.sh xcode-python 63 | ``` 64 | 65 | #### Java (on Windows, macOS or Linux) 66 | 67 | ```bash 68 | $ ./build.sh java 69 | ``` 70 | 71 | You can also specify CMake generator explicitly and then open generated project in corresponding IDE: 72 | 73 | ```bash 74 | $ build vs2019-java 75 | $ build vs2022-java 76 | $ ./build.sh xcode-java 77 | ``` 78 | 79 | #### JavaScript (Emscripten) 80 | 81 | Install [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html) 82 | 83 | ```bash 84 | $ ./build.sh js 85 | $ cd ui/js 86 | $ ./serve.sh 87 | ``` 88 | 89 | On Windows use ninja-js preset, as [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html) doesn't support Visual Studio CMake generators: 90 | 91 | ```bash 92 | $ build ninja-js 93 | $ cd ui/js 94 | $ serve.sh 95 | ``` 96 | 97 | #### C# 98 | 99 | ```bash 100 | $ build vs2022-cs 101 | ``` 102 | 103 | Open Visual Studio solution: `build\vs2022-cs\ui\cs\chat.sln` 104 | -------------------------------------------------------------------------------- /build.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | IF "%1" == "" ( 4 | cmake --list-presets 5 | exit /b 1 6 | ) 7 | 8 | set str1=%1 9 | IF NOT x%str1:js=%==x%str1% ( 10 | IF NOT DEFINED EMSDK ( 11 | IF EXIST c:\library\dev\emsdk\emsdk_env.bat ( 12 | setlocal 13 | set EMSDK_QUIET=1 14 | call c:\library\dev\emsdk\emsdk_env.bat 15 | ) ELSE ( 16 | echo "error: no EMSDK environment variable, run emsdk\emsdk_env.bat" 17 | exit /b 1 18 | ) 19 | ) 20 | ) 21 | 22 | cmake --preset %1 || exit /b 1 23 | cmake --build build/%1 --parallel || exit /b 1 24 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | if [ -z $1 ]; then 2 | cmake --list-presets 3 | exit 1 4 | fi 5 | 6 | if [[ $1 == *"js"* ]]; then 7 | if [ -z "$EMSDK" ]; then 8 | if [ -f ~/projects/emsdk/emsdk_env.sh ]; then 9 | export EMSDK_QUIET=1 10 | source ~/projects/emsdk/emsdk_env.sh 11 | else 12 | echo "error: no EMSDK environment variable, run emsdk/emsdk_env.sh" 13 | exit 1 14 | fi 15 | fi 16 | fi 17 | 18 | cmake --preset $1 || exit 1 19 | cmake --build build/$1 --parallel || exit 1 20 | -------------------------------------------------------------------------------- /source/chat/contact.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | chat/contact.h 4 | 5 | */ 6 | 7 | #ifndef CHAT_CONTACT_H 8 | #define CHAT_CONTACT_H 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | namespace chat { 17 | 18 | // Implement this interface in bridged languages, to receive events from C++. 19 | // Overriding C++ virtual functions in bridged languages currently supported only by Python and JavaScript bridge, support for other languages coming soon. 20 | // You can also use std::function<> parameters to receive events from C++. 21 | 22 | class contact_events : public scapix::bridge::object 23 | { 24 | public: 25 | 26 | virtual ~contact_events() = default; 27 | 28 | virtual void name_changed() = 0; 29 | virtual void id_changed() = 0; 30 | 31 | }; 32 | 33 | struct data 34 | { 35 | std::int32_t a; 36 | float b; 37 | bool c; 38 | }; 39 | 40 | class contact; 41 | 42 | class contact : public scapix::bridge::object 43 | { 44 | public: 45 | 46 | std::vector vector_bool(std::vector v) 47 | { 48 | v.push_back(true); 49 | v.push_back(false); 50 | v.push_back(true); 51 | v.push_back(true); 52 | v.push_back(false); 53 | v.push_back(true); 54 | return v; 55 | } 56 | 57 | bool return_bool() { return true; } 58 | 59 | static std::shared_ptr create() { return std::make_shared(); } 60 | 61 | std::vector int8_vec() const { return {0, 1, 2}; } 62 | std::vector int16_vec() const { return {0, 1, 2}; } 63 | std::vector int32_vec() const { return {0, 1, 2}; } 64 | std::vector int64_vec() const { return {0, 1, 2}; } 65 | 66 | std::vector uint8_vec() const { return {0, 1, 2}; } 67 | std::vector uint16_vec() const { return {0, 1, 2}; } 68 | std::vector uint32_vec() const { return {0, 1, 2}; } 69 | std::vector uint64_vec() const { return {0, 1, 2}; } 70 | 71 | contact() {} 72 | // contact(int, float) {} 73 | contact(const std::string& id, const std::string& name) : id_(id), name_(name) {} 74 | 75 | const std::string& id() { return id_; } 76 | void id(const std::string& id) { id_ = id; } 77 | // void id2(std::string&& id) { id_ = std::move(id); } 78 | 79 | const std::string& name() { return name_; } 80 | void name(const std::string& name) { name_ = name; } 81 | // void name2(std::string&& name) { name_ = std::move(name); } 82 | 83 | // std::shared_ptr name2() { return name2_; } 84 | std::string* name22() { return name2_.get(); } 85 | void name3(std::string*) {} 86 | 87 | // void register_event_handler(std::shared_ptr handler) {} 88 | void register_on_name_change(std::function handler) { handler("callback from C++"); } 89 | void callback2(std::function)> handler) { handler(std::make_shared("id2", "name2")); } 90 | 91 | void send_contacts(std::vector> friends) {} 92 | 93 | std::vector test_array(std::vector a) 94 | { 95 | for (auto& i : a) 96 | ++i; 97 | 98 | a.push_back(777); 99 | a.push_back(888); 100 | 101 | return a; 102 | } 103 | 104 | std::vector test_array2(std::vector a) 105 | { 106 | for (auto& i : a) 107 | ++i; 108 | 109 | a.push_back(77.7f); 110 | a.push_back(88.8f); 111 | 112 | return a; 113 | } 114 | 115 | data test_struct(data d) 116 | { 117 | d.a++; 118 | d.b--; 119 | d.c = true; 120 | 121 | return d; 122 | } 123 | 124 | protected: 125 | 126 | void protected_func(){} 127 | void protected_func(int){} 128 | 129 | private: 130 | 131 | std::string id_; 132 | std::string name_; 133 | std::shared_ptr name2_; 134 | 135 | }; 136 | 137 | } // namespace chat 138 | 139 | #endif // CHAT_CONTACT_H 140 | -------------------------------------------------------------------------------- /source/chat/extended_contact.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | chat/extended_contact.h 4 | 5 | */ 6 | 7 | #ifndef CHAT_EXTENDED_CONTACT_H 8 | #define CHAT_EXTENDED_CONTACT_H 9 | 10 | #include 11 | #include 12 | 13 | namespace chat { 14 | 15 | class contact; 16 | 17 | class extended_contact : public contact 18 | { 19 | public: 20 | 21 | using contact::contact; 22 | extended_contact(int):contact("1", "2"){} 23 | extended_contact() = default; 24 | 25 | void test(std::string, std::shared_ptr, std::shared_ptr) {} 26 | 27 | // msvc bug 28 | //#ifndef _MSC_VER 29 | // using contact::protected_func; 30 | // using contact::id; 31 | //#endif 32 | 33 | }; 34 | 35 | class extended_contact2 : public extended_contact 36 | { 37 | public: 38 | 39 | void test() {} 40 | 41 | }; 42 | 43 | class extended_contact3 : public contact 44 | { 45 | public: 46 | 47 | void test() {} 48 | 49 | }; 50 | 51 | } // namespace chat 52 | 53 | #endif // CHAT_EXTENDED_CONTACT_H 54 | -------------------------------------------------------------------------------- /source/chat/folder/abstract_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | chat/folder/abstract_element.h 4 | 5 | */ 6 | 7 | #ifndef CHAT_FOLDER_ABSTRACT_ELEMENT_H 8 | #define CHAT_FOLDER_ABSTRACT_ELEMENT_H 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | namespace chat::folder { 16 | 17 | class abstract_element : public scapix::bridge::object 18 | { 19 | public: 20 | 21 | virtual ~abstract_element() = default; 22 | 23 | virtual std::vector func1(std::vector s) = 0; 24 | virtual std::vector func2(std::vector s) final { s.push_back("abstract_element::func2"); return func1(s); } 25 | virtual std::string func3(std::string, int, std::shared_ptr) const & noexcept { return {}; } 26 | void func4() {} 27 | 28 | }; 29 | 30 | class abstract_element2 : public scapix::bridge::object 31 | { 32 | public: 33 | 34 | virtual ~abstract_element2() = default; 35 | 36 | virtual void func1() const noexcept(true) = 0; 37 | virtual void func1(int) const noexcept(true) = 0; 38 | virtual void func2() { func1(); } 39 | virtual std::string func3(std::string&&, int, std::shared_ptr) const noexcept { return {}; } 40 | void func4() && {} 41 | 42 | }; 43 | 44 | class abstract_element3 final : public scapix::bridge::object 45 | { 46 | public: 47 | 48 | virtual void func1() {} 49 | 50 | }; 51 | 52 | class abstract_element4 : public abstract_element 53 | { 54 | public: 55 | 56 | std::vector func1(std::vector s) override { s.push_back("abstract_element4::func1"); return s; } 57 | 58 | }; 59 | 60 | } // namespace chat::folder 61 | 62 | class abstract_element5 : public chat::folder::abstract_element 63 | { 64 | public: 65 | 66 | std::vector func1(std::vector s) override { s.push_back("abstract_element5::func1"); return s; } 67 | 68 | }; 69 | 70 | #endif // CHAT_FOLDER_ABSTRACT_ELEMENT_H 71 | -------------------------------------------------------------------------------- /source/chat/folder/element.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | chat/folder/element.h 4 | 5 | */ 6 | 7 | #ifndef CHAT_FOLDER_ELEMENT_H 8 | #define CHAT_FOLDER_ELEMENT_H 9 | 10 | #include 11 | #include 12 | 13 | namespace chat::folder { 14 | 15 | class element : public abstract_element 16 | { 17 | public: 18 | 19 | std::vector func1(std::vector s) override { s.push_back("element::func1"); return s; } 20 | void func4(std::shared_ptr) {} 21 | 22 | }; 23 | 24 | } // namespace chat::folder 25 | 26 | #endif // CHAT_FOLDER_ELEMENT_H 27 | -------------------------------------------------------------------------------- /source/chat/model.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace chat { 4 | 5 | void model::connect(std::string id, std::string password) 6 | { 7 | } 8 | 9 | void model::disconnect() 10 | { 11 | } 12 | 13 | } // namespace chat 14 | -------------------------------------------------------------------------------- /source/chat/model.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | chat/model.h 4 | 5 | */ 6 | 7 | #ifndef CHAT_MODEL_H 8 | #define CHAT_MODEL_H 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace chat { 15 | 16 | struct struct1 17 | { 18 | std::int32_t a; 19 | std::string b; 20 | std::vector buffer; 21 | }; 22 | 23 | struct struct2 24 | { 25 | std::vector strings; 26 | std::function callback; 27 | struct1 f1; 28 | }; 29 | 30 | class model : public scapix::bridge::object 31 | { 32 | public: 33 | 34 | model() {} 35 | 36 | void connect(std::string id, std::string password); 37 | void disconnect(); 38 | 39 | const std::vector>& friends() { return contacts_; } 40 | std::vector> friends(std::string filter) { return {}; } 41 | 42 | void add_friend(std::shared_ptr contact) {} 43 | void remove_friend(std::shared_ptr contact) {} 44 | 45 | const std::vector>& sessions() { return sessions_; } 46 | std::shared_ptr session_with_contact(std::shared_ptr contact) { return {}; } 47 | 48 | struct1 test_struct(struct2 p) 49 | { 50 | p.f1.a++; 51 | p.f1.b += " back from C++"; 52 | p.f1.buffer.push_back(77); 53 | auto s = p.callback(p.strings[0]); 54 | return p.f1; 55 | } 56 | 57 | data test_struct(data d) 58 | { 59 | d.a++; 60 | d.b--; 61 | d.c = true; 62 | 63 | return d; 64 | } 65 | 66 | private: 67 | 68 | std::vector> contacts_; 69 | std::vector> sessions_; 70 | 71 | }; 72 | 73 | } // namespace chat 74 | 75 | #endif // CHAT_MODEL_H 76 | -------------------------------------------------------------------------------- /source/chat/session.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | chat/session.cpp 4 | 5 | */ 6 | 7 | #include 8 | 9 | namespace chat { 10 | 11 | void session::add_contact(std::shared_ptr contact) 12 | { 13 | contacts_.push_back(contact); 14 | } 15 | 16 | void session::remove_contact(std::shared_ptr contact) 17 | { 18 | } 19 | 20 | std::string session::send_message(std::string message) 21 | { 22 | return {}; 23 | } 24 | 25 | void session::close() 26 | { 27 | } 28 | 29 | void session::sample() 30 | { 31 | } 32 | 33 | } // namespace chat 34 | -------------------------------------------------------------------------------- /source/chat/session.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | chat/session.h 4 | 5 | */ 6 | 7 | #ifndef CHAT_SESSION_H 8 | #define CHAT_SESSION_H 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #include 22 | 23 | namespace chat { 24 | 25 | // test aliases 26 | using string_type = std::string; 27 | using integer16 = std::int16_t; 28 | 29 | class session : public scapix::bridge::object 30 | { 31 | public: 32 | 33 | using integer32 = std::int32_t; 34 | 35 | session() noexcept {} 36 | session(const string_type&) {} 37 | session(std::vector vs, int, int, int, int) : strings_(vs) {} 38 | session(int) {} 39 | session(int, long long) {} 40 | session(std::string&& s1, std::string&& s2) { strings_.push_back(s1); strings_.push_back(s2); } 41 | session(std::string&& s1, std::string&& s2, const int&) { strings_.push_back(s1); strings_.push_back(s2); } 42 | session(std::string&& s1, std::string&& s2, const int&, long long) { strings_.push_back(s1); strings_.push_back(s2); } 43 | session(std::string s1, std::string s2, std::string = "") { strings_.push_back(s1); strings_.push_back(s2); } 44 | session(std::function callback) {} 45 | 46 | void int_test1(bool, std::int8_t, std::int16_t, std::int32_t, std::int64_t, integer16, integer32) noexcept {} 47 | void int_test2(const std::int8_t&, const std::int16_t&, const std::int32_t&, const std::int64_t&, const integer16&, const integer32&) {} 48 | 49 | void unsigned_test1(bool, std::uint8_t, std::uint16_t, std::uint32_t, std::uint64_t) noexcept {} 50 | void unsigned_test2(const std::uint8_t&, const std::uint16_t&, const std::uint32_t&, const std::uint64_t&) {} 51 | 52 | enum enum_type1 { one, two }; 53 | enum class enum_type2 { one, two }; 54 | 55 | enum_type1 enum_test1(enum_type1, enum_type2) { return one; } 56 | enum_type2 enum_test2(enum_type1, enum_type2) { return enum_type2::one; } 57 | 58 | const std::string& ref_test(const std::string&, std::string&&) { return name; } 59 | void int_test3(std::int8_t&&, std::int16_t&&, std::int32_t&&, std::int64_t&&, integer16&&, integer32&&) {} 60 | 61 | // Using int types directly works, but generates non-portable (target specific) code. 62 | // void int_test4(signed char, short, int, long, long long) {} 63 | 64 | // In case of conflict, only the first overloaded function is bridged: 65 | 66 | std::string string(std::string filter) { return filter; } 67 | std::string string(std::string filter) const { return filter; } 68 | std::string& string(std::string& filter) { return filter; } 69 | std::string&& string(std::string&& filter) { return std::move(filter); } 70 | const std::string& string(const std::string& filter) { return filter; } 71 | const std::string&& string(const std::string&& filter) { return std::move(filter); } 72 | 73 | // test java keywords 74 | 75 | void test_java_keyword(int package) {} 76 | void synchronized() {} 77 | 78 | // test python keywords 79 | 80 | void global() {} 81 | void del() {} 82 | 83 | // test snake case conversion 84 | 85 | void getHTTPRequest22() {} 86 | void SetHTTP2Request_3D() {} 87 | void SetHTTP2Request_4d() {} 88 | void someCSharpName() {} 89 | void _someNSStringName_() {} 90 | void HELLO_HTTP2A333De8() {} 91 | void HELLO_Http() {} 92 | 93 | std::shared_ptr object(std::shared_ptr m) { return m; } 94 | std::shared_ptr object(std::shared_ptr m) { return m; } 95 | int object(int m) { return m; } 96 | 97 | enum class color { red, green, blue }; 98 | void test_enum(color) {} 99 | 100 | int operator + (int) { return 0; } 101 | ~session() {} 102 | friend void friend_test() {} 103 | auto auto_test() { return 55; } 104 | auto auto_test2(); 105 | 106 | int* test_unsupported_param_type() { return {}; } 107 | void test_unsupported_param_type(int, int*) {} 108 | 109 | void alias_test(std::string s1, string_type s2) {} 110 | 111 | void async_connect(std::string host, std::function handler) {} 112 | 113 | const std::vector>& contacts() { return contacts_; } 114 | std::vector> contacts(std::string filter) { return contacts_; } 115 | 116 | std::map> map(std::map> m) { m.emplace("added from C++", std::make_shared()); return m; } 117 | std::map map(std::map m) { return m; } 118 | std::map map2(std::map m) { return m; } 119 | std::map map3(std::map m) { return m; } 120 | 121 | std::set set(std::set s) { return s; } 122 | std::unordered_map> unordered_map(std::unordered_map> s) { return s; } 123 | std::unordered_set unordered_set(std::unordered_set s) { return s; } 124 | 125 | std::vector> tags(std::vector> tags) { return contacts_; } 126 | std::vector ints(std::vector ints) { return ints; } 127 | std::vector strings(std::vector) { return {}; } 128 | 129 | void add_contact(std::shared_ptr contact); 130 | void remove_contact(std::shared_ptr contact); 131 | 132 | std::string send_message(std::string message); 133 | void send_message2(std::string message, int count) {} 134 | std::string send_message3(std::shared_ptr contact, std::string message, int count) { return message + std::to_string(count); } 135 | 136 | void close(); 137 | 138 | std::shared_ptr sample2() { return nullptr; } 139 | std::shared_ptr sample2(bool/*, char*/, short, int/*, long*/, float, double) { return nullptr; } 140 | 141 | static void sample(); 142 | static int sample(std::string, std::vector) { return {}; } 143 | 144 | auto connect(std::function>)> handler) 145 | { 146 | return handler("hello2", contacts_); 147 | } 148 | 149 | using handler_type = int(std::string, std::vector>); 150 | 151 | void connect2(std::function handler) 152 | { 153 | [[maybe_unused]] auto r = handler("hello3", contacts_); 154 | } 155 | 156 | void connect3(std::function>)> handler) 157 | { 158 | [[maybe_unused]] auto r = handler("hello2", contacts_); 159 | } 160 | 161 | void connect4(std::function>)> handler) 162 | { 163 | [[maybe_unused]] auto r = handler(55, contacts_); 164 | } 165 | 166 | // std::function connect5(std::function>)> handler) 167 | // { 168 | // [[maybe_unused]] auto r = handler(55, contacts_); 169 | // return nullptr; 170 | // } 171 | // 172 | // std::function connect6(std::function)> handler) 173 | // { 174 | // [[maybe_unused]] auto r = handler(55, nullptr); 175 | // return nullptr; 176 | // } 177 | 178 | void connect7(std::vector>>) 179 | { 180 | } 181 | 182 | void connect8(std::vector>) 183 | { 184 | } 185 | 186 | void test_exception(std::function callback) 187 | { 188 | try 189 | { 190 | callback(); 191 | } 192 | catch (int e) 193 | { 194 | std::cout << "caught " << e << "\n"; 195 | } 196 | catch (const std::exception& e) 197 | { 198 | std::cout << "caught " << e.what() << "\n"; 199 | } 200 | } 201 | 202 | void throw_int() 203 | { 204 | throw 5; 205 | } 206 | 207 | void throw_exception() 208 | { 209 | throw std::runtime_error("test exception string"); 210 | } 211 | 212 | const std::vector& strings() const { return strings_; } 213 | 214 | std::vector> composed(std::vector> p) { return p; } 215 | std::unordered_map> composed2(std::unordered_map> p) { return p; } 216 | std::unordered_map>> composed3(std::unordered_map>> p) { return p; } 217 | std::unordered_map> composed4(std::unordered_map> p) { return p; } 218 | 219 | private: 220 | 221 | std::string name = "session1"; 222 | std::vector strings_; 223 | std::vector> contacts_; 224 | 225 | }; 226 | 227 | class session2 : public scapix::bridge::object 228 | { 229 | public: 230 | 231 | void add_contact(std::shared_ptr contact) {} 232 | void add_session(std::shared_ptr session) {} 233 | void add_session2(std::shared_ptr session) {} 234 | 235 | }; 236 | 237 | } // namespace chat 238 | 239 | #endif // CHAT_SESSION_H 240 | -------------------------------------------------------------------------------- /ui/android/.gitignore: -------------------------------------------------------------------------------- 1 | /.gradle/ 2 | /.idea/ 3 | /build/ 4 | /captures/ 5 | /local.properties 6 | -------------------------------------------------------------------------------- /ui/android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /.cxx/ 3 | -------------------------------------------------------------------------------- /ui/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | } 4 | 5 | android { 6 | namespace 'com.example.chat' 7 | compileSdk 35 8 | ndkVersion "28.0.13004108" 9 | compileOptions { 10 | sourceCompatibility JavaVersion.VERSION_17 11 | targetCompatibility JavaVersion.VERSION_17 12 | } 13 | defaultConfig { 14 | applicationId "com.example.chat" 15 | minSdk 21 16 | targetSdk 35 17 | versionCode 1 18 | versionName "1.0" 19 | testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' 20 | externalNativeBuild { 21 | cmake { 22 | arguments "-DSCAPIX_BRIDGE=java" 23 | } 24 | } 25 | ndk { 26 | // By default, all 4 ABIs are built: 27 | // abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' 28 | abiFilters 'x86_64' 29 | } 30 | } 31 | buildTypes { 32 | // Scapix: see 'proguard-rules.pro' for rules required with 'minifyEnabled true' 33 | release { 34 | minifyEnabled false 35 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 36 | } 37 | } 38 | externalNativeBuild { 39 | cmake { 40 | path "../../../CMakeLists.txt" 41 | version "3.22.1+" 42 | } 43 | } 44 | sourceSets { 45 | main.java.srcDirs += ['../../../generated/bridge/java'] 46 | } 47 | } 48 | 49 | dependencies { 50 | implementation fileTree(dir: 'libs', include: ['*.jar']) 51 | implementation 'androidx.appcompat:appcompat:1.7.0' 52 | implementation 'androidx.constraintlayout:constraintlayout:2.2.1' 53 | implementation 'com.google.android.material:material:1.12.0' 54 | testImplementation 'junit:junit:4.13.2' 55 | androidTestImplementation 'androidx.test.ext:junit:1.2.1' 56 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' 57 | } 58 | -------------------------------------------------------------------------------- /ui/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | 23 | -keep class com.scapix.** { 24 | *; 25 | } 26 | 27 | -keep class com.example.** { 28 | *; 29 | } 30 | -------------------------------------------------------------------------------- /ui/android/app/src/androidTest/java/com/example/chat/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.chat; 2 | 3 | import android.content.Context; 4 | import androidx.test.platform.app.InstrumentationRegistry; 5 | import androidx.test.ext.junit.runners.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 23 | 24 | assertEquals("com.example.chat", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ui/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ui/android/app/src/main/java/com/example/chat/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.chat; 2 | 3 | import android.os.Bundle; 4 | import com.google.android.material.floatingactionbutton.FloatingActionButton; 5 | import com.google.android.material.snackbar.Snackbar; 6 | import androidx.appcompat.app.AppCompatActivity; 7 | import androidx.appcompat.widget.Toolbar; 8 | import android.view.View; 9 | import android.view.Menu; 10 | import android.view.MenuItem; 11 | import android.widget.TextView; 12 | 13 | public class MainActivity extends AppCompatActivity { 14 | 15 | void testScapix() { 16 | TextView tv = (TextView) findViewById(R.id.scapixText); 17 | 18 | Contact c = new Contact(); 19 | c.name("Hello Scapix"); 20 | tv.setText(c.name()); 21 | 22 | Session s = new Session(); 23 | s.addContact(c); 24 | s.sendMessage("aaa"); 25 | String str = s.sendMessage3(c, "Hello Scapix ", 5); 26 | Contact[] cc = s.tags(new Contact[]{c, c}); 27 | int[] ii = s.ints(new int[]{10, 20, 30}); 28 | // s.testInt(true,true,true,0,0,0); 29 | tv.setText(str); 30 | 31 | s.connect((java.lang.String p1, Contact[] p2) -> 5); 32 | 33 | java.util.TreeMap map = new java.util.TreeMap<>(); 34 | map.put("one", c); 35 | map.put("two", c); 36 | java.util.TreeMap map2 = s.map(map); 37 | 38 | java.util.TreeSet set = new java.util.TreeSet<>(); 39 | set.add("one"); 40 | set.add("two"); 41 | java.util.TreeSet set2 = s.set(set); 42 | 43 | java.util.HashMap hashMap = new java.util.HashMap<>(); 44 | hashMap.put("one", c); 45 | hashMap.put("two", c); 46 | hashMap.put("three", c); 47 | java.util.HashMap hashMap2 = s.unorderedMap(hashMap); 48 | 49 | java.util.HashSet hashSet = new java.util.HashSet<>(); 50 | hashSet.add("one"); 51 | hashSet.add("two"); 52 | hashSet.add("three"); 53 | java.util.HashSet hashSet2 = s.unorderedSet(hashSet); 54 | 55 | Element element = new Element(); 56 | element.func1(new String[]{"test"}); 57 | } 58 | 59 | @Override 60 | protected void onCreate(Bundle savedInstanceState) { 61 | super.onCreate(savedInstanceState); 62 | setContentView(R.layout.activity_main); 63 | Toolbar toolbar = findViewById(R.id.toolbar); 64 | setSupportActionBar(toolbar); 65 | 66 | FloatingActionButton fab = findViewById(R.id.fab); 67 | fab.setOnClickListener(new View.OnClickListener() { 68 | @Override 69 | public void onClick(View view) { 70 | Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) 71 | .setAction("Action", null).show(); 72 | } 73 | }); 74 | 75 | testScapix(); 76 | } 77 | 78 | @Override 79 | public boolean onCreateOptionsMenu(Menu menu) { 80 | // Inflate the menu; this adds items to the action bar if it is present. 81 | getMenuInflater().inflate(R.menu.menu_main, menu); 82 | return true; 83 | } 84 | 85 | @Override 86 | public boolean onOptionsItemSelected(MenuItem item) { 87 | // Handle action bar item clicks here. The action bar will 88 | // automatically handle clicks on the Home/Up button, so long 89 | // as you specify a parent activity in AndroidManifest.xml. 90 | int id = item.getItemId(); 91 | 92 | //noinspection SimplifiableIfStatement 93 | if (id == R.id.action_settings) { 94 | return true; 95 | } 96 | 97 | return super.onOptionsItemSelected(item); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /ui/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /ui/android/app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /ui/android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 20 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | -------------------------------------------------------------------------------- /ui/android/app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 20 | 21 | -------------------------------------------------------------------------------- /ui/android/app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /ui/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ui/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ui/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scapix-com/example1/548ce2011aac1ac0fa2ab3c98c2db453d6558517/ui/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ui/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scapix-com/example1/548ce2011aac1ac0fa2ab3c98c2db453d6558517/ui/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ui/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scapix-com/example1/548ce2011aac1ac0fa2ab3c98c2db453d6558517/ui/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ui/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scapix-com/example1/548ce2011aac1ac0fa2ab3c98c2db453d6558517/ui/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scapix-com/example1/548ce2011aac1ac0fa2ab3c98c2db453d6558517/ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scapix-com/example1/548ce2011aac1ac0fa2ab3c98c2db453d6558517/ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scapix-com/example1/548ce2011aac1ac0fa2ab3c98c2db453d6558517/ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scapix-com/example1/548ce2011aac1ac0fa2ab3c98c2db453d6558517/ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scapix-com/example1/548ce2011aac1ac0fa2ab3c98c2db453d6558517/ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scapix-com/example1/548ce2011aac1ac0fa2ab3c98c2db453d6558517/ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ui/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #008577 4 | #00574B 5 | #D81B60 6 | 7 | -------------------------------------------------------------------------------- /ui/android/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /ui/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | chat 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /ui/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 |