From 432f24319319fe040e142059eb83279c53f90ab8 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 9 Aug 2025 08:35:03 +0200 Subject: refactor 2 --- .../example_android_opengl3/android/.gitignore | 12 ------ .../android/app/build.gradle | 46 ---------------------- .../android/app/src/main/AndroidManifest.xml | 24 ----------- .../android/app/src/main/java/MainActivity.kt | 40 ------------------- .../example_android_opengl3/android/build.gradle | 24 ----------- .../android/settings.gradle | 1 - 6 files changed, 147 deletions(-) delete mode 100644 imgui-1.92.1/examples/example_android_opengl3/android/.gitignore delete mode 100644 imgui-1.92.1/examples/example_android_opengl3/android/app/build.gradle delete mode 100644 imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml delete mode 100644 imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt delete mode 100644 imgui-1.92.1/examples/example_android_opengl3/android/build.gradle delete mode 100644 imgui-1.92.1/examples/example_android_opengl3/android/settings.gradle (limited to 'imgui-1.92.1/examples/example_android_opengl3/android') diff --git a/imgui-1.92.1/examples/example_android_opengl3/android/.gitignore b/imgui-1.92.1/examples/example_android_opengl3/android/.gitignore deleted file mode 100644 index 3c7a619..0000000 --- a/imgui-1.92.1/examples/example_android_opengl3/android/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -.cxx -.externalNativeBuild -build/ -*.iml - -.idea -.gradle -local.properties - -# Android Studio puts a Gradle wrapper here, that we don't want: -gradle/ -gradlew* diff --git a/imgui-1.92.1/examples/example_android_opengl3/android/app/build.gradle b/imgui-1.92.1/examples/example_android_opengl3/android/app/build.gradle deleted file mode 100644 index 3a68c83..0000000 --- a/imgui-1.92.1/examples/example_android_opengl3/android/app/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - buildToolsVersion "33.0.2" - ndkVersion "25.2.9519653" - - defaultConfig { - applicationId "imgui.example.android" - namespace "imgui.example.android" - minSdkVersion 24 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt') - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - kotlinOptions { - jvmTarget="11" - } - - externalNativeBuild { - cmake { - path "../../CMakeLists.txt" - version '3.22.1' - } - } -} -repositories { - mavenCentral() -} -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" -} diff --git a/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml b/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 5a1e2d9..0000000 --- a/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt b/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt deleted file mode 100644 index 896a88c..0000000 --- a/imgui-1.92.1/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt +++ /dev/null @@ -1,40 +0,0 @@ -package imgui.example.android - -import android.app.NativeActivity -import android.os.Bundle -import android.content.Context -import android.view.inputmethod.InputMethodManager -import android.view.KeyEvent -import java.util.concurrent.LinkedBlockingQueue - -class MainActivity : NativeActivity() { - public override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - } - - fun showSoftInput() { - val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager - inputMethodManager.showSoftInput(this.window.decorView, 0) - } - - fun hideSoftInput() { - val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager - inputMethodManager.hideSoftInputFromWindow(this.window.decorView.windowToken, 0) - } - - // Queue for the Unicode characters to be polled from native code (via pollUnicodeChar()) - private var unicodeCharacterQueue: LinkedBlockingQueue = LinkedBlockingQueue() - - // We assume dispatchKeyEvent() of the NativeActivity is actually called for every - // KeyEvent and not consumed by any View before it reaches here - override fun dispatchKeyEvent(event: KeyEvent): Boolean { - if (event.action == KeyEvent.ACTION_DOWN) { - unicodeCharacterQueue.offer(event.getUnicodeChar(event.metaState)) - } - return super.dispatchKeyEvent(event) - } - - fun pollUnicodeChar(): Int { - return unicodeCharacterQueue.poll() ?: 0 - } -} diff --git a/imgui-1.92.1/examples/example_android_opengl3/android/build.gradle b/imgui-1.92.1/examples/example_android_opengl3/android/build.gradle deleted file mode 100644 index ccd2185..0000000 --- a/imgui-1.92.1/examples/example_android_opengl3/android/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -buildscript { - ext.kotlin_version = '1.8.0' - repositories { - google() - mavenCentral() - - } - dependencies { - classpath 'com.android.tools.build:gradle:7.4.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/imgui-1.92.1/examples/example_android_opengl3/android/settings.gradle b/imgui-1.92.1/examples/example_android_opengl3/android/settings.gradle deleted file mode 100644 index e7b4def..0000000 --- a/imgui-1.92.1/examples/example_android_opengl3/android/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' -- cgit v1.2.3-70-g09d2