Package org.libsdl.app
Class SDLActivity
- java.lang.Object
-
- android.content.Context
-
- android.content.ContextWrapper
-
- android.view.ContextThemeWrapper
-
- android.app.Activity
-
- org.libsdl.app.SDLActivity
-
- All Implemented Interfaces:
android.content.ComponentCallbacks,android.content.ComponentCallbacks2,android.view.KeyEvent.Callback,android.view.LayoutInflater.Factory,android.view.LayoutInflater.Factory2,android.view.View.OnCreateContextMenuListener,android.view.View.OnSystemUiVisibilityChangeListener,android.view.Window.Callback
public class SDLActivity extends android.app.Activity implements android.view.View.OnSystemUiVisibilityChangeListenerSDL Activity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSDLActivity.NativeStateprotected static classSDLActivity.SDLCommandHandlerA Handler class for Messages from native SDL applications.
-
Field Summary
Fields Modifier and Type Field Description protected static intCOMMAND_CHANGE_TITLEprotected static intCOMMAND_CHANGE_WINDOW_STYLEprotected static intCOMMAND_SET_KEEP_SCREEN_ONprotected static intCOMMAND_TEXTEDIT_HIDEprotected static intCOMMAND_USERprotected static booleanmActivityCreatedstatic booleanmBrokenLibrariesIf shared libraries (e.g.protected static org.libsdl.app.SDLClipboardHandlermClipboardHandlerprotected static java.util.LocalemCurrentLocalestatic SDLActivity.NativeStatemCurrentNativeStateprotected static intmCurrentRotationprotected static java.util.Hashtable<java.lang.Integer,android.view.PointerIcon>mCursorsprotected static booleanmDispatchingKeyEventprotected int[]messageboxSelectionResult of current messagebox.protected static booleanmFullscreenModeActivestatic booleanmHasFocusstatic booleanmHasMultiWindowprotected static HIDDeviceManagermHIDDeviceManagerstatic booleanmIsResumedCalledprotected static intmLastCursorIDprotected static android.view.ViewGroupmLayoutprotected static org.libsdl.app.SDLGenericMotionListener_API14mMotionListenerstatic SDLActivity.NativeStatemNextNativeStateprotected static booleanmSDLMainFinishedprotected static java.lang.ThreadmSDLThreadprotected static SDLActivitymSingletonprotected static SDLSurfacemSurfaceprotected static SDLDummyEditmTextEditprotected static intSDL_ORIENTATION_LANDSCAPEprotected static intSDL_ORIENTATION_LANDSCAPE_FLIPPEDprotected static intSDL_ORIENTATION_PORTRAITprotected static intSDL_ORIENTATION_PORTRAIT_FLIPPEDprotected static intSDL_ORIENTATION_UNKNOWN-
Fields inherited from class android.app.Activity
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, FULLSCREEN_MODE_REQUEST_ENTER, FULLSCREEN_MODE_REQUEST_EXIT, OVERRIDE_TRANSITION_CLOSE, OVERRIDE_TRANSITION_OPEN, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
-
Fields inherited from class android.content.Context
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ADVANCED_PROTECTION_SERVICE, ALARM_SERVICE, APP_FUNCTION_SERVICE, APP_OPS_SERVICE, APP_SEARCH_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_ACTIVITY_STARTS, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE, BIND_EXTERNAL_SERVICE_LONG, BIND_IMPORTANT, BIND_INCLUDE_CAPABILITIES, BIND_NOT_FOREGROUND, BIND_NOT_PERCEPTIBLE, BIND_PACKAGE_ISOLATED_PROCESS, BIND_SHARED_ISOLATED_PROCESS, BIND_WAIVE_PRIORITY, BIOMETRIC_SERVICE, BLOB_STORE_SERVICE, BLUETOOTH_SERVICE, BUGREPORT_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, COMPANION_DEVICE_SERVICE, CONNECTIVITY_DIAGNOSTICS_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTACT_KEYS_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, CREDENTIAL_SERVICE, CROSS_PROFILE_APPS_SERVICE, DEVICE_ID_DEFAULT, DEVICE_ID_INVALID, DEVICE_LOCK_SERVICE, DEVICE_POLICY_SERVICE, DISPLAY_HASH_SERVICE, DISPLAY_SERVICE, DOMAIN_VERIFICATION_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, EUICC_SERVICE, FILE_INTEGRITY_SERVICE, FINGERPRINT_SERVICE, GAME_SERVICE, GRAMMATICAL_INFLECTION_SERVICE, HARDWARE_PROPERTIES_SERVICE, HEALTHCONNECT_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, IPSEC_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, KEYSTORE_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCALE_SERVICE, LOCATION_SERVICE, MEDIA_COMMUNICATION_SERVICE, MEDIA_METRICS_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_QUALITY_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, OVERLAY_SERVICE, PEOPLE_SERVICE, PERFORMANCE_HINT_SERVICE, PERSISTENT_DATA_BLOCK_SERVICE, POWER_SERVICE, PRINT_SERVICE, PROFILING_SERVICE, RECEIVER_EXPORTED, RECEIVER_NOT_EXPORTED, RECEIVER_VISIBLE_TO_INSTANT_APPS, RESTRICTIONS_SERVICE, ROLE_SERVICE, SATELLITE_SERVICE, SEARCH_SERVICE, SECURITY_STATE_SERVICE, SENSOR_SERVICE, SHORTCUT_SERVICE, STATUS_BAR_SERVICE, STORAGE_SERVICE, STORAGE_STATS_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_IMS_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TETHERING_SERVICE, TEXT_CLASSIFICATION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_AD_SERVICE, TV_INPUT_SERVICE, TV_INTERACTIVE_APP_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_MANAGER_SERVICE, VIBRATOR_SERVICE, VIRTUAL_DEVICE_SERVICE, VPN_MANAGEMENT_SERVICE, WALLPAPER_SERVICE, WIFI_AWARE_SERVICE, WIFI_P2P_SERVICE, WIFI_RTT_RANGING_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
-
-
Constructor Summary
Constructors Constructor Description SDLActivity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringclipboardGetText()This method is called by SDL using JNI.static booleanclipboardHasText()This method is called by SDL using JNI.static voidclipboardSetText(java.lang.String string)This method is called by SDL using JNI.static intcreateCustomCursor(int[] colors, int width, int height, int hotSpotX, int hotSpotY)This method is called by SDL using JNI.protected SDLSurfacecreateSDLSurface(android.content.Context context)static voiddestroyCustomCursor(int cursorID)This method is called by SDL using JNI.static booleandispatchingKeyEvent()booleandispatchKeyEvent(android.view.KeyEvent event)static java.lang.StringformatLocale(java.util.Locale locale)protected java.lang.String[]getArguments()This method is called by SDL before starting the native application thread.static android.view.ViewgetContentView()static android.app.ActivitygetContext()This method is called by SDL using JNI.static intgetCurrentRotation()static doublegetDiagonal()protected java.lang.String[]getLibraries()This method is called by SDL before loading the native shared libraries.protected java.lang.StringgetMainFunction()This method returns the name of the application entry point It can be overridden by derived classes.protected java.lang.StringgetMainSharedObject()This method returns the name of the shared object with the application entry point It can be overridden by derived classes.static booleangetManifestEnvironmentVariables()This method is called by SDL using JNI.static org.libsdl.app.SDLGenericMotionListener_API14getMotionListener()static android.view.SurfacegetNativeSurface()This method is called by SDL using JNI.static intgetNaturalOrientation()static java.lang.StringgetPreferredLocales()This method is called by SDL using JNI.static booleanhandleKeyEvent(android.view.View v, int keyCode, android.view.KeyEvent event, android.view.inputmethod.InputConnection ic)static voidhandleNativeState()static voidinitialize()static voidinitTouch()This method is called by SDL using JNI.static booleanisAndroidTV()This method is called by SDL using JNI.static booleanisChromebook()This method is called by SDL using JNI.static booleanisDeXMode()This method is called by SDL using JNI.static booleanisTablet()This method is called by SDL using JNI.static booleanisTextInputEvent(android.view.KeyEvent event)static booleanisVRHeadset()voidloadLibraries()protected voidmain()The application entry point, called on a dedicated thread (SDLThread).static voidmanualBackButton()protected voidmessageboxCreateAndShow(android.os.Bundle args)intmessageboxShowMessageBox(int flags, java.lang.String title, java.lang.String message, int[] buttonFlags, int[] buttonIds, java.lang.String[] buttonTexts, int[] colors)This method is called by SDL using JNI.static voidminimizeWindow()This method is called by SDL using JNI.static voidnativeAddTouch(int touchId, java.lang.String name)static booleannativeAllowRecreateActivity()static intnativeCheckSDLThreadCounter()static voidnativeCleanupMainThread()static voidnativeFocusChanged(boolean hasFocus)static java.lang.StringnativeGetHint(java.lang.String name)static booleannativeGetHintBoolean(java.lang.String name, boolean default_value)static java.lang.StringnativeGetVersion()static voidnativeInitMainThread()static voidnativeLowMemory()static voidnativePause()static voidnativePermissionResult(int requestCode, boolean result)static voidnativeQuit()static voidnativeResume()static intnativeRunMain(java.lang.String library, java.lang.String function, java.lang.Object arguments)static voidnativeSendQuit()static voidnativeSetenv(java.lang.String name, java.lang.String value)static voidnativeSetNaturalOrientation(int orientation)static voidnativeSetScreenResolution(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, float density, float rate)static voidnativeSetupJNI()protected voidonActivityResult(int requestCode, int resultCode, android.content.Intent data)voidonBackPressed()voidonConfigurationChanged(android.content.res.Configuration newConfig)protected voidonCreate(android.os.Bundle savedInstanceState)protected voidonDestroy()static voidonNativeAccel(float x, float y, float z)static voidonNativeClipboardChanged()static voidonNativeDarkModeChanged(boolean enabled)static voidonNativeDropFile(java.lang.String filename)static voidonNativeFileDialog(int requestCode, java.lang.String[] filelist, int filter)static voidonNativeInsetsChanged(int left, int right, int top, int bottom)static voidonNativeKeyboardFocusLost()static voidonNativeKeyDown(int keycode)static voidonNativeKeyUp(int keycode)static voidonNativeLocaleChanged()static voidonNativeMouse(int button, int action, float x, float y, boolean relative)static voidonNativePen(int penId, int device_type, int button, int action, float x, float y, float p)static voidonNativePinchEnd()static voidonNativePinchStart()static voidonNativePinchUpdate(float scale)static voidonNativeResize()static voidonNativeRotationChanged(int rotation)static voidonNativeScreenKeyboardHidden()static voidonNativeScreenKeyboardShown()static booleanonNativeSoftReturnKey()static voidonNativeSurfaceChanged()static voidonNativeSurfaceCreated()static voidonNativeSurfaceDestroyed()static voidonNativeTouch(int touchDevId, int pointerFingerId, int action, float x, float y, float p)protected voidonPause()voidonRequestPermissionsResult(int requestCode, java.lang.String[] permissions, int[] grantResults)protected voidonResume()protected voidonStart()protected voidonStop()voidonSystemUiVisibilityChange(int visibility)voidonTrimMemory(int level)protected booleanonUnhandledMessage(int command, java.lang.Object param)This method is called by SDL if SDL did not handle a message itself.voidonWindowFocusChanged(boolean hasFocus)static intopenFileDescriptor(java.lang.String uri, java.lang.String mode)This method is called by SDL using JNI.static booleanopenURL(java.lang.String url)This method is called by SDL using JNI.protected voidpauseNativeThread()voidpressBackButton()static voidrequestPermission(java.lang.String permission, int requestCode)This method is called by SDL using JNI.protected voidresumeNativeThread()protected booleansendCommand(int command, java.lang.Object data)static booleansendMessage(int command, int param)This method is called by SDL using JNI.static booleansetActivityTitle(java.lang.String title)This method is called by SDL using JNI.static booleansetCustomCursor(int cursorID)This method is called by SDL using JNI.static voidsetOrientation(int w, int h, boolean resizable, java.lang.String hint)This method is called by SDL using JNI.voidsetOrientationBis(int w, int h, boolean resizable, java.lang.String hint)This can be overriddenstatic booleansetRelativeMouseEnabled(boolean enabled)This method is called by SDL using JNI.static booleansetSystemCursor(int cursorID)This method is called by SDL using JNI.static voidsetWindowStyle(boolean fullscreen)This method is called by SDL using JNI.static booleanshouldMinimizeOnFocusLoss()This method is called by SDL using JNI.static booleanshowFileDialog(java.lang.String[] filters, boolean allowMultiple, boolean forWrite, int requestCode)This method is called by SDL using JNI.static booleanshowTextInput(int input_type, int x, int y, int w, int h)This method is called by SDL using JNI.static booleanshowToast(java.lang.String message, int duration, int gravity, int xOffset, int yOffset)This method is called by SDL using JNI.voidsuperOnBackPressed()static booleansupportsRelativeMouse()This method is called by SDL using JNI.-
Methods inherited from class android.app.Activity
addContentView, attachBaseContext, clearOverrideActivityTransition, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, enterPictureInPictureMode, enterPictureInPictureMode, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCaller, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentCaller, getCurrentFocus, getFragmentManager, getInitialCaller, getIntent, getLastNonConfigurationInstance, getLaunchedFromPackage, getLaunchedFromUid, getLayoutInflater, getLoaderManager, getLocalClassName, getMaxNumPictureInPictureActions, getMediaController, getMenuInflater, getOnBackInvokedDispatcher, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSplashScreen, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isActivityTransitionRunning, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLaunchedFromBubble, isLocalVoiceInteractionSupported, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onActivityResult, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onChildTitleChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onGetDirectActions, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onLowMemory, onMenuItemSelected, onMenuOpened, onMultiWindowModeChanged, onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild, onNewIntent, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPerformDirectAction, onPictureInPictureModeChanged, onPictureInPictureModeChanged, onPictureInPictureRequested, onPictureInPictureUiStateChanged, onPostCreate, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRequestPermissionsResult, onRestart, onRestoreInstanceState, onRestoreInstanceState, onRetainNonConfigurationInstance, onSaveInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStateNotSaved, onTitleChanged, onTopResumedActivityChanged, onTouchEvent, onTrackballEvent, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overrideActivityTransition, overrideActivityTransition, overridePendingTransition, overridePendingTransition, postponeEnterTransition, recreate, registerActivityLifecycleCallbacks, registerComponentCallbacks, registerForContextMenu, registerScreenCaptureCallback, releaseInstance, removeDialog, reportFullyDrawn, requestDragAndDropPermissions, requestFullscreenMode, requestOpenInBrowserEducation, requestPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, requireViewById, runOnUiThread, setActionBar, setAllowCrossUidActivitySwitchFromBelow, setContentTransitionManager, setContentView, setContentView, setContentView, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setInheritShowWhenLocked, setIntent, setIntent, setLocusContext, setMediaController, setPictureInPictureParams, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRecentsScreenshotEnabled, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setShouldDockBigOverlays, setShowWhenLocked, setTaskDescription, setTheme, setTitle, setTitle, setTitleColor, setTranslucent, setTurnScreenOn, setVisible, setVolumeControlStream, setVrModeEnabled, shouldDockBigOverlays, shouldShowRequestPermissionRationale, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterActivityLifecycleCallbacks, unregisterComponentCallbacks, unregisterForContextMenu, unregisterScreenCaptureCallback
-
Methods inherited from class android.view.ContextThemeWrapper
applyOverrideConfiguration, getAssets, getResources, getTheme, setTheme
-
Methods inherited from class android.content.ContextWrapper
bindIsolatedService, bindService, bindService, bindService, bindService, bindServiceAsUser, bindServiceAsUser, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingOrSelfUriPermissions, checkCallingPermission, checkCallingUriPermission, checkCallingUriPermissions, checkContentUriPermissionFull, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, checkUriPermissions, clearWallpaper, createAttributionContext, createConfigurationContext, createContext, createContextForSplit, createDeviceContext, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, createWindowContext, createWindowContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAttributionSource, getAttributionTag, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDataDir, getDeviceId, getDir, getDisplay, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainExecutor, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getOpPackageName, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getParams, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, isUiContext, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerDeviceIdChangeListener, registerReceiver, registerReceiver, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeSelfPermissionsOnKill, revokeUriPermission, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startForegroundService, startInstrumentation, startService, stopService, unbindService, unregisterDeviceIdChangeListener, unregisterReceiver, updateServiceGroup
-
Methods inherited from class android.content.Context
bindIsolatedService, getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, revokeSelfPermissionOnKill, sendBroadcastWithMultiplePermissions
-
-
-
-
Field Detail
-
mIsResumedCalled
public static boolean mIsResumedCalled
-
mHasFocus
public static boolean mHasFocus
-
mHasMultiWindow
public static final boolean mHasMultiWindow
-
SDL_ORIENTATION_UNKNOWN
protected static final int SDL_ORIENTATION_UNKNOWN
- See Also:
- Constant Field Values
-
SDL_ORIENTATION_LANDSCAPE
protected static final int SDL_ORIENTATION_LANDSCAPE
- See Also:
- Constant Field Values
-
SDL_ORIENTATION_LANDSCAPE_FLIPPED
protected static final int SDL_ORIENTATION_LANDSCAPE_FLIPPED
- See Also:
- Constant Field Values
-
SDL_ORIENTATION_PORTRAIT
protected static final int SDL_ORIENTATION_PORTRAIT
- See Also:
- Constant Field Values
-
SDL_ORIENTATION_PORTRAIT_FLIPPED
protected static final int SDL_ORIENTATION_PORTRAIT_FLIPPED
- See Also:
- Constant Field Values
-
mCurrentRotation
protected static int mCurrentRotation
-
mCurrentLocale
protected static java.util.Locale mCurrentLocale
-
mNextNativeState
public static SDLActivity.NativeState mNextNativeState
-
mCurrentNativeState
public static SDLActivity.NativeState mCurrentNativeState
-
mBrokenLibraries
public static boolean mBrokenLibraries
If shared libraries (e.g. SDL or the native application) could not be loaded.
-
mSingleton
protected static SDLActivity mSingleton
-
mSurface
protected static SDLSurface mSurface
-
mTextEdit
protected static SDLDummyEdit mTextEdit
-
mLayout
protected static android.view.ViewGroup mLayout
-
mClipboardHandler
protected static org.libsdl.app.SDLClipboardHandler mClipboardHandler
-
mCursors
protected static java.util.Hashtable<java.lang.Integer,android.view.PointerIcon> mCursors
-
mLastCursorID
protected static int mLastCursorID
-
mMotionListener
protected static org.libsdl.app.SDLGenericMotionListener_API14 mMotionListener
-
mHIDDeviceManager
protected static HIDDeviceManager mHIDDeviceManager
-
mSDLThread
protected static java.lang.Thread mSDLThread
-
mSDLMainFinished
protected static boolean mSDLMainFinished
-
mActivityCreated
protected static boolean mActivityCreated
-
mDispatchingKeyEvent
protected static boolean mDispatchingKeyEvent
-
COMMAND_CHANGE_TITLE
protected static final int COMMAND_CHANGE_TITLE
- See Also:
- Constant Field Values
-
COMMAND_CHANGE_WINDOW_STYLE
protected static final int COMMAND_CHANGE_WINDOW_STYLE
- See Also:
- Constant Field Values
-
COMMAND_TEXTEDIT_HIDE
protected static final int COMMAND_TEXTEDIT_HIDE
- See Also:
- Constant Field Values
-
COMMAND_SET_KEEP_SCREEN_ON
protected static final int COMMAND_SET_KEEP_SCREEN_ON
- See Also:
- Constant Field Values
-
COMMAND_USER
protected static final int COMMAND_USER
- See Also:
- Constant Field Values
-
mFullscreenModeActive
protected static boolean mFullscreenModeActive
-
messageboxSelection
protected final int[] messageboxSelection
Result of current messagebox. Also used for blocking the calling thread.
-
-
Method Detail
-
getMotionListener
public static org.libsdl.app.SDLGenericMotionListener_API14 getMotionListener()
-
main
protected void main()
The application entry point, called on a dedicated thread (SDLThread). The default implementation uses the getMainSharedObject() and getMainFunction() methods to invoke native code from the specified shared library. It can be overridden by derived classes.
-
getMainSharedObject
protected java.lang.String getMainSharedObject()
This method returns the name of the shared object with the application entry point It can be overridden by derived classes.
-
getMainFunction
protected java.lang.String getMainFunction()
This method returns the name of the application entry point It can be overridden by derived classes.
-
getLibraries
protected java.lang.String[] getLibraries()
This method is called by SDL before loading the native shared libraries. It can be overridden to provide names of shared libraries to be loaded. The default implementation returns the defaults. It never returns null. An array returned by a new implementation must at least contain "SDL3". Also keep in mind that the order the libraries are loaded may matter.- Returns:
- names of shared libraries to be loaded (e.g. "SDL3", "main").
-
loadLibraries
public void loadLibraries()
-
getArguments
protected java.lang.String[] getArguments()
This method is called by SDL before starting the native application thread. It can be overridden to provide the arguments after the application name. The default implementation returns an empty array. It never returns null.- Returns:
- arguments for the native application.
-
initialize
public static void initialize()
-
createSDLSurface
protected SDLSurface createSDLSurface(android.content.Context context)
-
onCreate
protected void onCreate(android.os.Bundle savedInstanceState)
- Overrides:
onCreatein classandroid.app.Activity
-
pauseNativeThread
protected void pauseNativeThread()
-
resumeNativeThread
protected void resumeNativeThread()
-
onPause
protected void onPause()
- Overrides:
onPausein classandroid.app.Activity
-
onResume
protected void onResume()
- Overrides:
onResumein classandroid.app.Activity
-
onStop
protected void onStop()
- Overrides:
onStopin classandroid.app.Activity
-
onStart
protected void onStart()
- Overrides:
onStartin classandroid.app.Activity
-
getNaturalOrientation
public static int getNaturalOrientation()
-
getCurrentRotation
public static int getCurrentRotation()
-
onWindowFocusChanged
public void onWindowFocusChanged(boolean hasFocus)
- Specified by:
onWindowFocusChangedin interfaceandroid.view.Window.Callback- Overrides:
onWindowFocusChangedin classandroid.app.Activity
-
onTrimMemory
public void onTrimMemory(int level)
- Specified by:
onTrimMemoryin interfaceandroid.content.ComponentCallbacks2- Overrides:
onTrimMemoryin classandroid.app.Activity
-
onConfigurationChanged
public void onConfigurationChanged(android.content.res.Configuration newConfig)
- Specified by:
onConfigurationChangedin interfaceandroid.content.ComponentCallbacks- Overrides:
onConfigurationChangedin classandroid.app.Activity
-
onDestroy
protected void onDestroy()
- Overrides:
onDestroyin classandroid.app.Activity
-
onBackPressed
public void onBackPressed()
- Overrides:
onBackPressedin classandroid.app.Activity
-
onActivityResult
protected void onActivityResult(int requestCode, int resultCode, android.content.Intent data)- Overrides:
onActivityResultin classandroid.app.Activity
-
manualBackButton
public static void manualBackButton()
-
pressBackButton
public void pressBackButton()
-
superOnBackPressed
public void superOnBackPressed()
-
dispatchKeyEvent
public boolean dispatchKeyEvent(android.view.KeyEvent event)
- Specified by:
dispatchKeyEventin interfaceandroid.view.Window.Callback- Overrides:
dispatchKeyEventin classandroid.app.Activity
-
dispatchingKeyEvent
public static boolean dispatchingKeyEvent()
-
handleNativeState
public static void handleNativeState()
-
onUnhandledMessage
protected boolean onUnhandledMessage(int command, java.lang.Object param)This method is called by SDL if SDL did not handle a message itself. This happens if a received message contains an unsupported command. Method can be overwritten to handle Messages in a different class.- Parameters:
command- the command of the message.param- the parameter of the message. May be null.- Returns:
- if the message was handled in overridden method.
-
sendCommand
protected boolean sendCommand(int command, java.lang.Object data)
-
nativeGetVersion
public static java.lang.String nativeGetVersion()
-
nativeSetupJNI
public static void nativeSetupJNI()
-
nativeInitMainThread
public static void nativeInitMainThread()
-
nativeCleanupMainThread
public static void nativeCleanupMainThread()
-
nativeRunMain
public static int nativeRunMain(java.lang.String library, java.lang.String function, java.lang.Object arguments)
-
nativeLowMemory
public static void nativeLowMemory()
-
nativeSendQuit
public static void nativeSendQuit()
-
nativeQuit
public static void nativeQuit()
-
nativePause
public static void nativePause()
-
nativeResume
public static void nativeResume()
-
nativeFocusChanged
public static void nativeFocusChanged(boolean hasFocus)
-
onNativeDropFile
public static void onNativeDropFile(java.lang.String filename)
-
nativeSetScreenResolution
public static void nativeSetScreenResolution(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, float density, float rate)
-
onNativeResize
public static void onNativeResize()
-
onNativeKeyDown
public static void onNativeKeyDown(int keycode)
-
onNativeKeyUp
public static void onNativeKeyUp(int keycode)
-
onNativeSoftReturnKey
public static boolean onNativeSoftReturnKey()
-
onNativeKeyboardFocusLost
public static void onNativeKeyboardFocusLost()
-
onNativeMouse
public static void onNativeMouse(int button, int action, float x, float y, boolean relative)
-
onNativeTouch
public static void onNativeTouch(int touchDevId, int pointerFingerId, int action, float x, float y, float p)
-
onNativePen
public static void onNativePen(int penId, int device_type, int button, int action, float x, float y, float p)
-
onNativeAccel
public static void onNativeAccel(float x, float y, float z)
-
onNativeClipboardChanged
public static void onNativeClipboardChanged()
-
onNativeSurfaceCreated
public static void onNativeSurfaceCreated()
-
onNativeSurfaceChanged
public static void onNativeSurfaceChanged()
-
onNativeSurfaceDestroyed
public static void onNativeSurfaceDestroyed()
-
onNativeScreenKeyboardShown
public static void onNativeScreenKeyboardShown()
-
onNativeScreenKeyboardHidden
public static void onNativeScreenKeyboardHidden()
-
nativeGetHint
public static java.lang.String nativeGetHint(java.lang.String name)
-
nativeGetHintBoolean
public static boolean nativeGetHintBoolean(java.lang.String name, boolean default_value)
-
nativeSetenv
public static void nativeSetenv(java.lang.String name, java.lang.String value)
-
nativeSetNaturalOrientation
public static void nativeSetNaturalOrientation(int orientation)
-
onNativeRotationChanged
public static void onNativeRotationChanged(int rotation)
-
onNativeInsetsChanged
public static void onNativeInsetsChanged(int left, int right, int top, int bottom)
-
nativeAddTouch
public static void nativeAddTouch(int touchId, java.lang.String name)
-
nativePermissionResult
public static void nativePermissionResult(int requestCode, boolean result)
-
onNativeLocaleChanged
public static void onNativeLocaleChanged()
-
onNativeDarkModeChanged
public static void onNativeDarkModeChanged(boolean enabled)
-
nativeAllowRecreateActivity
public static boolean nativeAllowRecreateActivity()
-
nativeCheckSDLThreadCounter
public static int nativeCheckSDLThreadCounter()
-
onNativeFileDialog
public static void onNativeFileDialog(int requestCode, java.lang.String[] filelist, int filter)
-
onNativePinchStart
public static void onNativePinchStart()
-
onNativePinchUpdate
public static void onNativePinchUpdate(float scale)
-
onNativePinchEnd
public static void onNativePinchEnd()
-
setActivityTitle
public static boolean setActivityTitle(java.lang.String title)
This method is called by SDL using JNI.
-
setWindowStyle
public static void setWindowStyle(boolean fullscreen)
This method is called by SDL using JNI.
-
setOrientation
public static void setOrientation(int w, int h, boolean resizable, java.lang.String hint)This method is called by SDL using JNI. This is a static method for JNI convenience, it calls a non-static method so that is can be overridden
-
setOrientationBis
public void setOrientationBis(int w, int h, boolean resizable, java.lang.String hint)This can be overridden
-
minimizeWindow
public static void minimizeWindow()
This method is called by SDL using JNI.
-
shouldMinimizeOnFocusLoss
public static boolean shouldMinimizeOnFocusLoss()
This method is called by SDL using JNI.
-
supportsRelativeMouse
public static boolean supportsRelativeMouse()
This method is called by SDL using JNI.
-
setRelativeMouseEnabled
public static boolean setRelativeMouseEnabled(boolean enabled)
This method is called by SDL using JNI.
-
sendMessage
public static boolean sendMessage(int command, int param)This method is called by SDL using JNI.
-
getContext
public static android.app.Activity getContext()
This method is called by SDL using JNI.
-
isAndroidTV
public static boolean isAndroidTV()
This method is called by SDL using JNI.
-
isVRHeadset
public static boolean isVRHeadset()
-
getDiagonal
public static double getDiagonal()
-
isTablet
public static boolean isTablet()
This method is called by SDL using JNI.
-
isChromebook
public static boolean isChromebook()
This method is called by SDL using JNI.
-
isDeXMode
public static boolean isDeXMode()
This method is called by SDL using JNI.
-
getManifestEnvironmentVariables
public static boolean getManifestEnvironmentVariables()
This method is called by SDL using JNI.
-
getContentView
public static android.view.View getContentView()
-
showTextInput
public static boolean showTextInput(int input_type, int x, int y, int w, int h)This method is called by SDL using JNI.
-
isTextInputEvent
public static boolean isTextInputEvent(android.view.KeyEvent event)
-
handleKeyEvent
public static boolean handleKeyEvent(android.view.View v, int keyCode, android.view.KeyEvent event, android.view.inputmethod.InputConnection ic)
-
getNativeSurface
public static android.view.Surface getNativeSurface()
This method is called by SDL using JNI.
-
initTouch
public static void initTouch()
This method is called by SDL using JNI.
-
messageboxShowMessageBox
public int messageboxShowMessageBox(int flags, java.lang.String title, java.lang.String message, int[] buttonFlags, int[] buttonIds, java.lang.String[] buttonTexts, int[] colors)This method is called by SDL using JNI. Shows the messagebox from UI thread and block calling thread. buttonFlags, buttonIds and buttonTexts must have same length.- Parameters:
buttonFlags- array containing flags for every button.buttonIds- array containing id for every button.buttonTexts- array containing text for every button.colors- null for default or array of length 5 containing colors.- Returns:
- button id or -1.
-
messageboxCreateAndShow
protected void messageboxCreateAndShow(android.os.Bundle args)
-
onSystemUiVisibilityChange
public void onSystemUiVisibilityChange(int visibility)
- Specified by:
onSystemUiVisibilityChangein interfaceandroid.view.View.OnSystemUiVisibilityChangeListener
-
clipboardHasText
public static boolean clipboardHasText()
This method is called by SDL using JNI.
-
clipboardGetText
public static java.lang.String clipboardGetText()
This method is called by SDL using JNI.
-
clipboardSetText
public static void clipboardSetText(java.lang.String string)
This method is called by SDL using JNI.
-
createCustomCursor
public static int createCustomCursor(int[] colors, int width, int height, int hotSpotX, int hotSpotY)This method is called by SDL using JNI.
-
destroyCustomCursor
public static void destroyCustomCursor(int cursorID)
This method is called by SDL using JNI.
-
setCustomCursor
public static boolean setCustomCursor(int cursorID)
This method is called by SDL using JNI.
-
setSystemCursor
public static boolean setSystemCursor(int cursorID)
This method is called by SDL using JNI.
-
requestPermission
public static void requestPermission(java.lang.String permission, int requestCode)This method is called by SDL using JNI.
-
onRequestPermissionsResult
public void onRequestPermissionsResult(int requestCode, java.lang.String[] permissions, int[] grantResults)- Overrides:
onRequestPermissionsResultin classandroid.app.Activity
-
openURL
public static boolean openURL(java.lang.String url)
This method is called by SDL using JNI.
-
showToast
public static boolean showToast(java.lang.String message, int duration, int gravity, int xOffset, int yOffset)This method is called by SDL using JNI.
-
openFileDescriptor
public static int openFileDescriptor(java.lang.String uri, java.lang.String mode) throws java.lang.ExceptionThis method is called by SDL using JNI.- Throws:
java.lang.Exception
-
showFileDialog
public static boolean showFileDialog(java.lang.String[] filters, boolean allowMultiple, boolean forWrite, int requestCode)This method is called by SDL using JNI.
-
getPreferredLocales
public static java.lang.String getPreferredLocales()
This method is called by SDL using JNI.
-
formatLocale
public static java.lang.String formatLocale(java.util.Locale locale)
-
-