gpui: Add support for observing window appearance (#7294)

This PR adds support to GPUI for observing when the appearance of a
window changes.

Based on the initial work done in
https://github.com/zed-industries/zed/pull/6881.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-02-02 13:13:35 -05:00 committed by GitHub
parent 1f6bd6760f
commit 115f0672fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 45 additions and 6 deletions

View file

@ -171,7 +171,7 @@ impl PlatformWindow for TestWindow {
}
fn appearance(&self) -> WindowAppearance {
unimplemented!()
WindowAppearance::Light
}
fn display(&self) -> std::rc::Rc<dyn crate::PlatformDisplay> {
@ -276,9 +276,7 @@ impl PlatformWindow for TestWindow {
unimplemented!()
}
fn on_appearance_changed(&self, _callback: Box<dyn FnMut()>) {
unimplemented!()
}
fn on_appearance_changed(&self, _callback: Box<dyn FnMut()>) {}
fn is_topmost_for_position(&self, _position: crate::Point<Pixels>) -> bool {
unimplemented!()