mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-10 00:37:28 +00:00
Import android-games-sdk changes for 4.0.0
This imports the SDK from commit 8fa58b0e145ec28e726fa2b1c7e7a52af925ca35, from: https://github.com/rust-mobile/android-games-sdk/commits/android-activity-4.0.0 This includes one "notify android_main of editor actions" patch which will make it possible to forward editor actions and support IME Commit events in Winit) # notify android_main of editor actions This adds a pendingEditorActions member to android_app that is set via onEditorAction and the android_main thread is notified via notifyInput instead of re-instating APP_CMD_EDITOR_ACTION. The idea is that the android_main thread should check for android_app->pendingEditorActions whenever input events are polled/iterated. # FFI bindings update Also updates the FFI bindings via generate-bindings.sh
This commit is contained in:
+4
@@ -226,6 +226,10 @@ struct android_app {
|
||||
* thread, so we can't say that this is only valid within the `APP_CMD_` handler.
|
||||
*/
|
||||
int editorAction;
|
||||
/**
|
||||
* true when editorAction has been set
|
||||
*/
|
||||
bool pendingEditorAction;
|
||||
|
||||
/**
|
||||
* Current state of the app's activity. May be either APP_CMD_START,
|
||||
|
||||
+8
-2
@@ -726,9 +726,15 @@ static bool onEditorAction(GameActivity* activity, int action) {
|
||||
// XXX: this is a racy design that could lose InputConnection actions if the
|
||||
// application doesn't manage to look at app->editorAction before another
|
||||
// action is delivered.
|
||||
if (android_app->pendingEditorAction) {
|
||||
LOGW("Dropping editor action %d because previous action %d not yet "
|
||||
"handled",
|
||||
action, android_app->editorAction);
|
||||
}
|
||||
android_app->editorAction = action;
|
||||
// TODO: buffer these actions like other input events
|
||||
//notifyInput(android_app);
|
||||
android_app->pendingEditorAction = true;
|
||||
notifyInput(android_app);
|
||||
// TODO: buffer IME text events and editor actions like other input events
|
||||
|
||||
//android_app_write_cmd(android_app, APP_CMD_EDITOR_ACTION);
|
||||
pthread_mutex_unlock(&android_app->mutex);
|
||||
|
||||
@@ -4702,6 +4702,8 @@ pub struct android_app {
|
||||
pub softwareKeyboardVisible: bool,
|
||||
#[doc = " Last editor action. Valid within APP_CMD_SOFTWARE_KB_VIS_CHANGED handler.\n\n Note: the upstream comment above isn't accurate.\n - `APP_CMD_SOFTWARE_KB_VIS_CHANGED` is associated with `softwareKeyboardVisible`\n changes, not `editorAction`.\n - `APP_CMD_EDITOR_ACTION` is associated with this state but unlike for\n `window` state there's no synchonization that blocks the Java main\n thread, so we can't say that this is only valid within the `APP_CMD_` handler."]
|
||||
pub editorAction: ::std::os::raw::c_int,
|
||||
#[doc = " true when editorAction has been set"]
|
||||
pub pendingEditorAction: bool,
|
||||
#[doc = " Current state of the app's activity. May be either APP_CMD_START,\n APP_CMD_RESUME, APP_CMD_PAUSE, or APP_CMD_STOP."]
|
||||
pub activityState: ::std::os::raw::c_int,
|
||||
#[doc = " This is non-zero when the application's GameActivity is being\n destroyed and waiting for the app thread to complete."]
|
||||
@@ -4731,7 +4733,7 @@ pub struct android_app {
|
||||
}
|
||||
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
|
||||
const _: () = {
|
||||
["Size of android_app"][::std::mem::size_of::<android_app>() - 392usize];
|
||||
["Size of android_app"][::std::mem::size_of::<android_app>() - 400usize];
|
||||
["Alignment of android_app"][::std::mem::align_of::<android_app>() - 8usize];
|
||||
["Offset of field: android_app::userData"]
|
||||
[::std::mem::offset_of!(android_app, userData) - 0usize];
|
||||
@@ -4752,46 +4754,48 @@ const _: () = {
|
||||
[::std::mem::offset_of!(android_app, softwareKeyboardVisible) - 80usize];
|
||||
["Offset of field: android_app::editorAction"]
|
||||
[::std::mem::offset_of!(android_app, editorAction) - 84usize];
|
||||
["Offset of field: android_app::pendingEditorAction"]
|
||||
[::std::mem::offset_of!(android_app, pendingEditorAction) - 88usize];
|
||||
["Offset of field: android_app::activityState"]
|
||||
[::std::mem::offset_of!(android_app, activityState) - 88usize];
|
||||
[::std::mem::offset_of!(android_app, activityState) - 92usize];
|
||||
["Offset of field: android_app::destroyRequested"]
|
||||
[::std::mem::offset_of!(android_app, destroyRequested) - 92usize];
|
||||
[::std::mem::offset_of!(android_app, destroyRequested) - 96usize];
|
||||
["Offset of field: android_app::inputBuffers"]
|
||||
[::std::mem::offset_of!(android_app, inputBuffers) - 96usize];
|
||||
[::std::mem::offset_of!(android_app, inputBuffers) - 104usize];
|
||||
["Offset of field: android_app::currentInputBuffer"]
|
||||
[::std::mem::offset_of!(android_app, currentInputBuffer) - 192usize];
|
||||
[::std::mem::offset_of!(android_app, currentInputBuffer) - 200usize];
|
||||
["Offset of field: android_app::textInputState"]
|
||||
[::std::mem::offset_of!(android_app, textInputState) - 196usize];
|
||||
["Offset of field: android_app::mutex"][::std::mem::offset_of!(android_app, mutex) - 200usize];
|
||||
["Offset of field: android_app::cond"][::std::mem::offset_of!(android_app, cond) - 240usize];
|
||||
[::std::mem::offset_of!(android_app, textInputState) - 204usize];
|
||||
["Offset of field: android_app::mutex"][::std::mem::offset_of!(android_app, mutex) - 208usize];
|
||||
["Offset of field: android_app::cond"][::std::mem::offset_of!(android_app, cond) - 248usize];
|
||||
["Offset of field: android_app::msgread"]
|
||||
[::std::mem::offset_of!(android_app, msgread) - 288usize];
|
||||
[::std::mem::offset_of!(android_app, msgread) - 296usize];
|
||||
["Offset of field: android_app::msgwrite"]
|
||||
[::std::mem::offset_of!(android_app, msgwrite) - 292usize];
|
||||
[::std::mem::offset_of!(android_app, msgwrite) - 300usize];
|
||||
["Offset of field: android_app::thread"]
|
||||
[::std::mem::offset_of!(android_app, thread) - 296usize];
|
||||
[::std::mem::offset_of!(android_app, thread) - 304usize];
|
||||
["Offset of field: android_app::cmdPollSource"]
|
||||
[::std::mem::offset_of!(android_app, cmdPollSource) - 304usize];
|
||||
[::std::mem::offset_of!(android_app, cmdPollSource) - 312usize];
|
||||
["Offset of field: android_app::running"]
|
||||
[::std::mem::offset_of!(android_app, running) - 328usize];
|
||||
[::std::mem::offset_of!(android_app, running) - 336usize];
|
||||
["Offset of field: android_app::stateSaved"]
|
||||
[::std::mem::offset_of!(android_app, stateSaved) - 332usize];
|
||||
[::std::mem::offset_of!(android_app, stateSaved) - 340usize];
|
||||
["Offset of field: android_app::destroyed"]
|
||||
[::std::mem::offset_of!(android_app, destroyed) - 336usize];
|
||||
[::std::mem::offset_of!(android_app, destroyed) - 344usize];
|
||||
["Offset of field: android_app::redrawNeeded"]
|
||||
[::std::mem::offset_of!(android_app, redrawNeeded) - 340usize];
|
||||
[::std::mem::offset_of!(android_app, redrawNeeded) - 348usize];
|
||||
["Offset of field: android_app::pendingWindow"]
|
||||
[::std::mem::offset_of!(android_app, pendingWindow) - 344usize];
|
||||
[::std::mem::offset_of!(android_app, pendingWindow) - 352usize];
|
||||
["Offset of field: android_app::pendingContentRect"]
|
||||
[::std::mem::offset_of!(android_app, pendingContentRect) - 352usize];
|
||||
[::std::mem::offset_of!(android_app, pendingContentRect) - 360usize];
|
||||
["Offset of field: android_app::keyEventFilter"]
|
||||
[::std::mem::offset_of!(android_app, keyEventFilter) - 368usize];
|
||||
[::std::mem::offset_of!(android_app, keyEventFilter) - 376usize];
|
||||
["Offset of field: android_app::motionEventFilter"]
|
||||
[::std::mem::offset_of!(android_app, motionEventFilter) - 376usize];
|
||||
[::std::mem::offset_of!(android_app, motionEventFilter) - 384usize];
|
||||
["Offset of field: android_app::inputAvailableWakeUp"]
|
||||
[::std::mem::offset_of!(android_app, inputAvailableWakeUp) - 384usize];
|
||||
[::std::mem::offset_of!(android_app, inputAvailableWakeUp) - 392usize];
|
||||
["Offset of field: android_app::inputSwapPending"]
|
||||
[::std::mem::offset_of!(android_app, inputSwapPending) - 385usize];
|
||||
[::std::mem::offset_of!(android_app, inputSwapPending) - 393usize];
|
||||
};
|
||||
#[doc = " Looper data ID of commands coming from the app's main thread, which\n is returned as an identifier from ALooper_pollOnce(). The data for this\n identifier is a pointer to an android_poll_source structure.\n These can be retrieved and processed with android_app_read_cmd()\n and android_app_exec_cmd()."]
|
||||
pub const NativeAppGlueLooperId_LOOPER_ID_MAIN: NativeAppGlueLooperId = 1;
|
||||
|
||||
@@ -5144,6 +5144,8 @@ pub struct android_app {
|
||||
pub softwareKeyboardVisible: bool,
|
||||
#[doc = " Last editor action. Valid within APP_CMD_SOFTWARE_KB_VIS_CHANGED handler.\n\n Note: the upstream comment above isn't accurate.\n - `APP_CMD_SOFTWARE_KB_VIS_CHANGED` is associated with `softwareKeyboardVisible`\n changes, not `editorAction`.\n - `APP_CMD_EDITOR_ACTION` is associated with this state but unlike for\n `window` state there's no synchonization that blocks the Java main\n thread, so we can't say that this is only valid within the `APP_CMD_` handler."]
|
||||
pub editorAction: ::std::os::raw::c_int,
|
||||
#[doc = " true when editorAction has been set"]
|
||||
pub pendingEditorAction: bool,
|
||||
#[doc = " Current state of the app's activity. May be either APP_CMD_START,\n APP_CMD_RESUME, APP_CMD_PAUSE, or APP_CMD_STOP."]
|
||||
pub activityState: ::std::os::raw::c_int,
|
||||
#[doc = " This is non-zero when the application's GameActivity is being\n destroyed and waiting for the app thread to complete."]
|
||||
@@ -5173,7 +5175,7 @@ pub struct android_app {
|
||||
}
|
||||
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
|
||||
const _: () = {
|
||||
["Size of android_app"][::std::mem::size_of::<android_app>() - 248usize];
|
||||
["Size of android_app"][::std::mem::size_of::<android_app>() - 256usize];
|
||||
["Alignment of android_app"][::std::mem::align_of::<android_app>() - 8usize];
|
||||
["Offset of field: android_app::userData"]
|
||||
[::std::mem::offset_of!(android_app, userData) - 0usize];
|
||||
@@ -5194,46 +5196,48 @@ const _: () = {
|
||||
[::std::mem::offset_of!(android_app, softwareKeyboardVisible) - 48usize];
|
||||
["Offset of field: android_app::editorAction"]
|
||||
[::std::mem::offset_of!(android_app, editorAction) - 52usize];
|
||||
["Offset of field: android_app::pendingEditorAction"]
|
||||
[::std::mem::offset_of!(android_app, pendingEditorAction) - 56usize];
|
||||
["Offset of field: android_app::activityState"]
|
||||
[::std::mem::offset_of!(android_app, activityState) - 56usize];
|
||||
[::std::mem::offset_of!(android_app, activityState) - 60usize];
|
||||
["Offset of field: android_app::destroyRequested"]
|
||||
[::std::mem::offset_of!(android_app, destroyRequested) - 60usize];
|
||||
[::std::mem::offset_of!(android_app, destroyRequested) - 64usize];
|
||||
["Offset of field: android_app::inputBuffers"]
|
||||
[::std::mem::offset_of!(android_app, inputBuffers) - 64usize];
|
||||
[::std::mem::offset_of!(android_app, inputBuffers) - 72usize];
|
||||
["Offset of field: android_app::currentInputBuffer"]
|
||||
[::std::mem::offset_of!(android_app, currentInputBuffer) - 160usize];
|
||||
[::std::mem::offset_of!(android_app, currentInputBuffer) - 168usize];
|
||||
["Offset of field: android_app::textInputState"]
|
||||
[::std::mem::offset_of!(android_app, textInputState) - 164usize];
|
||||
["Offset of field: android_app::mutex"][::std::mem::offset_of!(android_app, mutex) - 168usize];
|
||||
["Offset of field: android_app::cond"][::std::mem::offset_of!(android_app, cond) - 172usize];
|
||||
[::std::mem::offset_of!(android_app, textInputState) - 172usize];
|
||||
["Offset of field: android_app::mutex"][::std::mem::offset_of!(android_app, mutex) - 176usize];
|
||||
["Offset of field: android_app::cond"][::std::mem::offset_of!(android_app, cond) - 180usize];
|
||||
["Offset of field: android_app::msgread"]
|
||||
[::std::mem::offset_of!(android_app, msgread) - 176usize];
|
||||
[::std::mem::offset_of!(android_app, msgread) - 184usize];
|
||||
["Offset of field: android_app::msgwrite"]
|
||||
[::std::mem::offset_of!(android_app, msgwrite) - 180usize];
|
||||
[::std::mem::offset_of!(android_app, msgwrite) - 188usize];
|
||||
["Offset of field: android_app::thread"]
|
||||
[::std::mem::offset_of!(android_app, thread) - 184usize];
|
||||
[::std::mem::offset_of!(android_app, thread) - 192usize];
|
||||
["Offset of field: android_app::cmdPollSource"]
|
||||
[::std::mem::offset_of!(android_app, cmdPollSource) - 188usize];
|
||||
[::std::mem::offset_of!(android_app, cmdPollSource) - 196usize];
|
||||
["Offset of field: android_app::running"]
|
||||
[::std::mem::offset_of!(android_app, running) - 200usize];
|
||||
[::std::mem::offset_of!(android_app, running) - 208usize];
|
||||
["Offset of field: android_app::stateSaved"]
|
||||
[::std::mem::offset_of!(android_app, stateSaved) - 204usize];
|
||||
[::std::mem::offset_of!(android_app, stateSaved) - 212usize];
|
||||
["Offset of field: android_app::destroyed"]
|
||||
[::std::mem::offset_of!(android_app, destroyed) - 208usize];
|
||||
[::std::mem::offset_of!(android_app, destroyed) - 216usize];
|
||||
["Offset of field: android_app::redrawNeeded"]
|
||||
[::std::mem::offset_of!(android_app, redrawNeeded) - 212usize];
|
||||
[::std::mem::offset_of!(android_app, redrawNeeded) - 220usize];
|
||||
["Offset of field: android_app::pendingWindow"]
|
||||
[::std::mem::offset_of!(android_app, pendingWindow) - 216usize];
|
||||
[::std::mem::offset_of!(android_app, pendingWindow) - 224usize];
|
||||
["Offset of field: android_app::pendingContentRect"]
|
||||
[::std::mem::offset_of!(android_app, pendingContentRect) - 220usize];
|
||||
[::std::mem::offset_of!(android_app, pendingContentRect) - 228usize];
|
||||
["Offset of field: android_app::keyEventFilter"]
|
||||
[::std::mem::offset_of!(android_app, keyEventFilter) - 236usize];
|
||||
[::std::mem::offset_of!(android_app, keyEventFilter) - 244usize];
|
||||
["Offset of field: android_app::motionEventFilter"]
|
||||
[::std::mem::offset_of!(android_app, motionEventFilter) - 240usize];
|
||||
[::std::mem::offset_of!(android_app, motionEventFilter) - 248usize];
|
||||
["Offset of field: android_app::inputAvailableWakeUp"]
|
||||
[::std::mem::offset_of!(android_app, inputAvailableWakeUp) - 244usize];
|
||||
[::std::mem::offset_of!(android_app, inputAvailableWakeUp) - 252usize];
|
||||
["Offset of field: android_app::inputSwapPending"]
|
||||
[::std::mem::offset_of!(android_app, inputSwapPending) - 245usize];
|
||||
[::std::mem::offset_of!(android_app, inputSwapPending) - 253usize];
|
||||
};
|
||||
#[doc = " Looper data ID of commands coming from the app's main thread, which\n is returned as an identifier from ALooper_pollOnce(). The data for this\n identifier is a pointer to an android_poll_source structure.\n These can be retrieved and processed with android_app_read_cmd()\n and android_app_exec_cmd()."]
|
||||
pub const NativeAppGlueLooperId_LOOPER_ID_MAIN: NativeAppGlueLooperId = 1;
|
||||
|
||||
@@ -5184,6 +5184,8 @@ pub struct android_app {
|
||||
pub softwareKeyboardVisible: bool,
|
||||
#[doc = " Last editor action. Valid within APP_CMD_SOFTWARE_KB_VIS_CHANGED handler.\n\n Note: the upstream comment above isn't accurate.\n - `APP_CMD_SOFTWARE_KB_VIS_CHANGED` is associated with `softwareKeyboardVisible`\n changes, not `editorAction`.\n - `APP_CMD_EDITOR_ACTION` is associated with this state but unlike for\n `window` state there's no synchonization that blocks the Java main\n thread, so we can't say that this is only valid within the `APP_CMD_` handler."]
|
||||
pub editorAction: ::std::os::raw::c_int,
|
||||
#[doc = " true when editorAction has been set"]
|
||||
pub pendingEditorAction: bool,
|
||||
#[doc = " Current state of the app's activity. May be either APP_CMD_START,\n APP_CMD_RESUME, APP_CMD_PAUSE, or APP_CMD_STOP."]
|
||||
pub activityState: ::std::os::raw::c_int,
|
||||
#[doc = " This is non-zero when the application's GameActivity is being\n destroyed and waiting for the app thread to complete."]
|
||||
@@ -5213,7 +5215,7 @@ pub struct android_app {
|
||||
}
|
||||
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
|
||||
const _: () = {
|
||||
["Size of android_app"][::std::mem::size_of::<android_app>() - 232usize];
|
||||
["Size of android_app"][::std::mem::size_of::<android_app>() - 236usize];
|
||||
["Alignment of android_app"][::std::mem::align_of::<android_app>() - 4usize];
|
||||
["Offset of field: android_app::userData"]
|
||||
[::std::mem::offset_of!(android_app, userData) - 0usize];
|
||||
@@ -5234,46 +5236,48 @@ const _: () = {
|
||||
[::std::mem::offset_of!(android_app, softwareKeyboardVisible) - 48usize];
|
||||
["Offset of field: android_app::editorAction"]
|
||||
[::std::mem::offset_of!(android_app, editorAction) - 52usize];
|
||||
["Offset of field: android_app::pendingEditorAction"]
|
||||
[::std::mem::offset_of!(android_app, pendingEditorAction) - 56usize];
|
||||
["Offset of field: android_app::activityState"]
|
||||
[::std::mem::offset_of!(android_app, activityState) - 56usize];
|
||||
[::std::mem::offset_of!(android_app, activityState) - 60usize];
|
||||
["Offset of field: android_app::destroyRequested"]
|
||||
[::std::mem::offset_of!(android_app, destroyRequested) - 60usize];
|
||||
[::std::mem::offset_of!(android_app, destroyRequested) - 64usize];
|
||||
["Offset of field: android_app::inputBuffers"]
|
||||
[::std::mem::offset_of!(android_app, inputBuffers) - 64usize];
|
||||
[::std::mem::offset_of!(android_app, inputBuffers) - 68usize];
|
||||
["Offset of field: android_app::currentInputBuffer"]
|
||||
[::std::mem::offset_of!(android_app, currentInputBuffer) - 144usize];
|
||||
[::std::mem::offset_of!(android_app, currentInputBuffer) - 148usize];
|
||||
["Offset of field: android_app::textInputState"]
|
||||
[::std::mem::offset_of!(android_app, textInputState) - 148usize];
|
||||
["Offset of field: android_app::mutex"][::std::mem::offset_of!(android_app, mutex) - 152usize];
|
||||
["Offset of field: android_app::cond"][::std::mem::offset_of!(android_app, cond) - 156usize];
|
||||
[::std::mem::offset_of!(android_app, textInputState) - 152usize];
|
||||
["Offset of field: android_app::mutex"][::std::mem::offset_of!(android_app, mutex) - 156usize];
|
||||
["Offset of field: android_app::cond"][::std::mem::offset_of!(android_app, cond) - 160usize];
|
||||
["Offset of field: android_app::msgread"]
|
||||
[::std::mem::offset_of!(android_app, msgread) - 160usize];
|
||||
[::std::mem::offset_of!(android_app, msgread) - 164usize];
|
||||
["Offset of field: android_app::msgwrite"]
|
||||
[::std::mem::offset_of!(android_app, msgwrite) - 164usize];
|
||||
[::std::mem::offset_of!(android_app, msgwrite) - 168usize];
|
||||
["Offset of field: android_app::thread"]
|
||||
[::std::mem::offset_of!(android_app, thread) - 168usize];
|
||||
[::std::mem::offset_of!(android_app, thread) - 172usize];
|
||||
["Offset of field: android_app::cmdPollSource"]
|
||||
[::std::mem::offset_of!(android_app, cmdPollSource) - 172usize];
|
||||
[::std::mem::offset_of!(android_app, cmdPollSource) - 176usize];
|
||||
["Offset of field: android_app::running"]
|
||||
[::std::mem::offset_of!(android_app, running) - 184usize];
|
||||
[::std::mem::offset_of!(android_app, running) - 188usize];
|
||||
["Offset of field: android_app::stateSaved"]
|
||||
[::std::mem::offset_of!(android_app, stateSaved) - 188usize];
|
||||
[::std::mem::offset_of!(android_app, stateSaved) - 192usize];
|
||||
["Offset of field: android_app::destroyed"]
|
||||
[::std::mem::offset_of!(android_app, destroyed) - 192usize];
|
||||
[::std::mem::offset_of!(android_app, destroyed) - 196usize];
|
||||
["Offset of field: android_app::redrawNeeded"]
|
||||
[::std::mem::offset_of!(android_app, redrawNeeded) - 196usize];
|
||||
[::std::mem::offset_of!(android_app, redrawNeeded) - 200usize];
|
||||
["Offset of field: android_app::pendingWindow"]
|
||||
[::std::mem::offset_of!(android_app, pendingWindow) - 200usize];
|
||||
[::std::mem::offset_of!(android_app, pendingWindow) - 204usize];
|
||||
["Offset of field: android_app::pendingContentRect"]
|
||||
[::std::mem::offset_of!(android_app, pendingContentRect) - 204usize];
|
||||
[::std::mem::offset_of!(android_app, pendingContentRect) - 208usize];
|
||||
["Offset of field: android_app::keyEventFilter"]
|
||||
[::std::mem::offset_of!(android_app, keyEventFilter) - 220usize];
|
||||
[::std::mem::offset_of!(android_app, keyEventFilter) - 224usize];
|
||||
["Offset of field: android_app::motionEventFilter"]
|
||||
[::std::mem::offset_of!(android_app, motionEventFilter) - 224usize];
|
||||
[::std::mem::offset_of!(android_app, motionEventFilter) - 228usize];
|
||||
["Offset of field: android_app::inputAvailableWakeUp"]
|
||||
[::std::mem::offset_of!(android_app, inputAvailableWakeUp) - 228usize];
|
||||
[::std::mem::offset_of!(android_app, inputAvailableWakeUp) - 232usize];
|
||||
["Offset of field: android_app::inputSwapPending"]
|
||||
[::std::mem::offset_of!(android_app, inputSwapPending) - 229usize];
|
||||
[::std::mem::offset_of!(android_app, inputSwapPending) - 233usize];
|
||||
};
|
||||
#[doc = " Looper data ID of commands coming from the app's main thread, which\n is returned as an identifier from ALooper_pollOnce(). The data for this\n identifier is a pointer to an android_poll_source structure.\n These can be retrieved and processed with android_app_read_cmd()\n and android_app_exec_cmd()."]
|
||||
pub const NativeAppGlueLooperId_LOOPER_ID_MAIN: NativeAppGlueLooperId = 1;
|
||||
|
||||
@@ -5213,6 +5213,8 @@ pub struct android_app {
|
||||
pub softwareKeyboardVisible: bool,
|
||||
#[doc = " Last editor action. Valid within APP_CMD_SOFTWARE_KB_VIS_CHANGED handler.\n\n Note: the upstream comment above isn't accurate.\n - `APP_CMD_SOFTWARE_KB_VIS_CHANGED` is associated with `softwareKeyboardVisible`\n changes, not `editorAction`.\n - `APP_CMD_EDITOR_ACTION` is associated with this state but unlike for\n `window` state there's no synchonization that blocks the Java main\n thread, so we can't say that this is only valid within the `APP_CMD_` handler."]
|
||||
pub editorAction: ::std::os::raw::c_int,
|
||||
#[doc = " true when editorAction has been set"]
|
||||
pub pendingEditorAction: bool,
|
||||
#[doc = " Current state of the app's activity. May be either APP_CMD_START,\n APP_CMD_RESUME, APP_CMD_PAUSE, or APP_CMD_STOP."]
|
||||
pub activityState: ::std::os::raw::c_int,
|
||||
#[doc = " This is non-zero when the application's GameActivity is being\n destroyed and waiting for the app thread to complete."]
|
||||
@@ -5242,7 +5244,7 @@ pub struct android_app {
|
||||
}
|
||||
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
|
||||
const _: () = {
|
||||
["Size of android_app"][::std::mem::size_of::<android_app>() - 392usize];
|
||||
["Size of android_app"][::std::mem::size_of::<android_app>() - 400usize];
|
||||
["Alignment of android_app"][::std::mem::align_of::<android_app>() - 8usize];
|
||||
["Offset of field: android_app::userData"]
|
||||
[::std::mem::offset_of!(android_app, userData) - 0usize];
|
||||
@@ -5263,46 +5265,48 @@ const _: () = {
|
||||
[::std::mem::offset_of!(android_app, softwareKeyboardVisible) - 80usize];
|
||||
["Offset of field: android_app::editorAction"]
|
||||
[::std::mem::offset_of!(android_app, editorAction) - 84usize];
|
||||
["Offset of field: android_app::pendingEditorAction"]
|
||||
[::std::mem::offset_of!(android_app, pendingEditorAction) - 88usize];
|
||||
["Offset of field: android_app::activityState"]
|
||||
[::std::mem::offset_of!(android_app, activityState) - 88usize];
|
||||
[::std::mem::offset_of!(android_app, activityState) - 92usize];
|
||||
["Offset of field: android_app::destroyRequested"]
|
||||
[::std::mem::offset_of!(android_app, destroyRequested) - 92usize];
|
||||
[::std::mem::offset_of!(android_app, destroyRequested) - 96usize];
|
||||
["Offset of field: android_app::inputBuffers"]
|
||||
[::std::mem::offset_of!(android_app, inputBuffers) - 96usize];
|
||||
[::std::mem::offset_of!(android_app, inputBuffers) - 104usize];
|
||||
["Offset of field: android_app::currentInputBuffer"]
|
||||
[::std::mem::offset_of!(android_app, currentInputBuffer) - 192usize];
|
||||
[::std::mem::offset_of!(android_app, currentInputBuffer) - 200usize];
|
||||
["Offset of field: android_app::textInputState"]
|
||||
[::std::mem::offset_of!(android_app, textInputState) - 196usize];
|
||||
["Offset of field: android_app::mutex"][::std::mem::offset_of!(android_app, mutex) - 200usize];
|
||||
["Offset of field: android_app::cond"][::std::mem::offset_of!(android_app, cond) - 240usize];
|
||||
[::std::mem::offset_of!(android_app, textInputState) - 204usize];
|
||||
["Offset of field: android_app::mutex"][::std::mem::offset_of!(android_app, mutex) - 208usize];
|
||||
["Offset of field: android_app::cond"][::std::mem::offset_of!(android_app, cond) - 248usize];
|
||||
["Offset of field: android_app::msgread"]
|
||||
[::std::mem::offset_of!(android_app, msgread) - 288usize];
|
||||
[::std::mem::offset_of!(android_app, msgread) - 296usize];
|
||||
["Offset of field: android_app::msgwrite"]
|
||||
[::std::mem::offset_of!(android_app, msgwrite) - 292usize];
|
||||
[::std::mem::offset_of!(android_app, msgwrite) - 300usize];
|
||||
["Offset of field: android_app::thread"]
|
||||
[::std::mem::offset_of!(android_app, thread) - 296usize];
|
||||
[::std::mem::offset_of!(android_app, thread) - 304usize];
|
||||
["Offset of field: android_app::cmdPollSource"]
|
||||
[::std::mem::offset_of!(android_app, cmdPollSource) - 304usize];
|
||||
[::std::mem::offset_of!(android_app, cmdPollSource) - 312usize];
|
||||
["Offset of field: android_app::running"]
|
||||
[::std::mem::offset_of!(android_app, running) - 328usize];
|
||||
[::std::mem::offset_of!(android_app, running) - 336usize];
|
||||
["Offset of field: android_app::stateSaved"]
|
||||
[::std::mem::offset_of!(android_app, stateSaved) - 332usize];
|
||||
[::std::mem::offset_of!(android_app, stateSaved) - 340usize];
|
||||
["Offset of field: android_app::destroyed"]
|
||||
[::std::mem::offset_of!(android_app, destroyed) - 336usize];
|
||||
[::std::mem::offset_of!(android_app, destroyed) - 344usize];
|
||||
["Offset of field: android_app::redrawNeeded"]
|
||||
[::std::mem::offset_of!(android_app, redrawNeeded) - 340usize];
|
||||
[::std::mem::offset_of!(android_app, redrawNeeded) - 348usize];
|
||||
["Offset of field: android_app::pendingWindow"]
|
||||
[::std::mem::offset_of!(android_app, pendingWindow) - 344usize];
|
||||
[::std::mem::offset_of!(android_app, pendingWindow) - 352usize];
|
||||
["Offset of field: android_app::pendingContentRect"]
|
||||
[::std::mem::offset_of!(android_app, pendingContentRect) - 352usize];
|
||||
[::std::mem::offset_of!(android_app, pendingContentRect) - 360usize];
|
||||
["Offset of field: android_app::keyEventFilter"]
|
||||
[::std::mem::offset_of!(android_app, keyEventFilter) - 368usize];
|
||||
[::std::mem::offset_of!(android_app, keyEventFilter) - 376usize];
|
||||
["Offset of field: android_app::motionEventFilter"]
|
||||
[::std::mem::offset_of!(android_app, motionEventFilter) - 376usize];
|
||||
[::std::mem::offset_of!(android_app, motionEventFilter) - 384usize];
|
||||
["Offset of field: android_app::inputAvailableWakeUp"]
|
||||
[::std::mem::offset_of!(android_app, inputAvailableWakeUp) - 384usize];
|
||||
[::std::mem::offset_of!(android_app, inputAvailableWakeUp) - 392usize];
|
||||
["Offset of field: android_app::inputSwapPending"]
|
||||
[::std::mem::offset_of!(android_app, inputSwapPending) - 385usize];
|
||||
[::std::mem::offset_of!(android_app, inputSwapPending) - 393usize];
|
||||
};
|
||||
#[doc = " Looper data ID of commands coming from the app's main thread, which\n is returned as an identifier from ALooper_pollOnce(). The data for this\n identifier is a pointer to an android_poll_source structure.\n These can be retrieved and processed with android_app_read_cmd()\n and android_app_exec_cmd()."]
|
||||
pub const NativeAppGlueLooperId_LOOPER_ID_MAIN: NativeAppGlueLooperId = 1;
|
||||
|
||||
Reference in New Issue
Block a user