gpui: Update docs to reflect removal of View, ViewContext, WindowContext (#24008)

This PR updates function signatures, docstrings, and gpui's other
documentation to reflect it's new state following the merge of `Model`
and `View` into `Entity` as well as the removal of `WindowContext`.

Release Notes:

- N/A
This commit is contained in:
someone13574 2025-01-31 14:40:42 -05:00 committed by GitHub
parent 027fe1b4b5
commit 0c94bdc8e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 330 additions and 329 deletions

View file

@ -25,9 +25,9 @@ pub fn derive_app_context(input: TokenStream) -> TokenStream {
fn new<T: 'static>(
&mut self,
build_model: impl FnOnce(&mut gpui::Context<'_, T>) -> T,
build_entity: impl FnOnce(&mut gpui::Context<'_, T>) -> T,
) -> Self::Result<gpui::Entity<T>> {
self.#app_variable.new(build_model)
self.#app_variable.new(build_entity)
}
fn reserve_entity<T: 'static>(&mut self) -> Self::Result<gpui::Reservation<T>> {
@ -37,9 +37,9 @@ pub fn derive_app_context(input: TokenStream) -> TokenStream {
fn insert_entity<T: 'static>(
&mut self,
reservation: gpui::Reservation<T>,
build_model: impl FnOnce(&mut gpui::Context<'_, T>) -> T,
build_entity: impl FnOnce(&mut gpui::Context<'_, T>) -> T,
) -> Self::Result<gpui::Entity<T>> {
self.#app_variable.insert_entity(reservation, build_model)
self.#app_variable.insert_entity(reservation, build_entity)
}
fn update_entity<T, R>(