mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-12 09:38:54 +00:00
Make ContentRectChanged event a non_exhaustive struct
Just to keep open the ability to add state to the event in the future without needing an API break.
This commit is contained in:
@@ -241,7 +241,7 @@ impl AndroidAppInner {
|
||||
MainEvent::RedrawNeeded {}
|
||||
}
|
||||
ffi::NativeAppGlueAppCmd_APP_CMD_CONTENT_RECT_CHANGED => {
|
||||
MainEvent::ContentRectChanged
|
||||
MainEvent::ContentRectChanged {}
|
||||
}
|
||||
ffi::NativeAppGlueAppCmd_APP_CMD_GAINED_FOCUS => {
|
||||
MainEvent::GainedFocus
|
||||
|
||||
@@ -137,7 +137,8 @@ pub enum MainEvent<'a> {
|
||||
/// Command from main thread: the content area of the window has changed,
|
||||
/// such as from the soft input window being shown or hidden. You can
|
||||
/// get the new content rect by calling [`AndroidApp::content_rect()`]
|
||||
ContentRectChanged,
|
||||
#[non_exhaustive]
|
||||
ContentRectChanged {},
|
||||
|
||||
/// Command from main thread: the app's activity window has gained
|
||||
/// input focus.
|
||||
|
||||
@@ -245,7 +245,7 @@ impl AndroidAppInner {
|
||||
Some(MainEvent::RedrawNeeded {})
|
||||
}
|
||||
ffi::APP_CMD_CONTENT_RECT_CHANGED => {
|
||||
Some(MainEvent::ContentRectChanged)
|
||||
Some(MainEvent::ContentRectChanged {})
|
||||
}
|
||||
ffi::APP_CMD_GAINED_FOCUS => Some(MainEvent::GainedFocus),
|
||||
ffi::APP_CMD_LOST_FOCUS => Some(MainEvent::LostFocus),
|
||||
|
||||
Reference in New Issue
Block a user