Add AppFocus and AppBlur to the events

Now that they're supported by more than just textual-web it makes sense to
expose them a little better in the docs.
This commit is contained in:
Dave Pearson
2024-03-18 11:50:50 +00:00
parent 2b1088b2ac
commit a47be5a347
3 changed files with 42 additions and 0 deletions

20
docs/events/app_blur.md Normal file
View File

@@ -0,0 +1,20 @@
# AppBlur
The `AppBlur` event is sent to the application when the terminal window
loses focus.
!!! note
Only available when running under textual-web or within terminals that
support `FocusIn` reporting.
## Attributes
_No other attributes_
## Code
::: textual.events.AppBlur
## See also
- [AppFocus](app_focus.md)

20
docs/events/app_focus.md Normal file
View File

@@ -0,0 +1,20 @@
# AppFocus
The `AppFocus` event is sent to the application when the terminal window
gains focus.
!!! note
Only available when running under textual-web or within terminals that
support `FocusOut` reporting.
## Attributes
_No other attributes_
## Code
::: textual.events.AppFocus
## See also
- [AppBlur](app_blur.md)

View File

@@ -43,6 +43,8 @@ nav:
- "css_types/vertical.md"
- Events:
- "events/index.md"
- "events/app_blur.md"
- "events/app_focus.md"
- "events/blur.md"
- "events/click.md"
- "events/descendant_blur.md"