mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-05-25 00:59:39 -04:00
Doc updated for UI and removed some doc for bluetooth
* removed taglib doc build, main readme shown by default on start * made better diagrams for UI shown in doxygen * removed old docs for bluetooth
This commit is contained in:
@@ -905,7 +905,8 @@ EXCLUDE = @PROJECT_SOURCE_DIR@/module-bluetooth/lib \
|
||||
@PROJECT_SOURCE_DIR@/module-audio/tests \
|
||||
@PROJECT_SOURCE_DIR@/module-vfs/tests \
|
||||
@PROJECT_SOURCE_DIR@/module-vfs/board \
|
||||
@PROJECT_SOURCE_DIR@/module-bsp/board/rt1051/common
|
||||
@PROJECT_SOURCE_DIR@/module-bsp/board/rt1051/common \
|
||||
@PROJECT_SOURCE_DIR@/module-audio/Audio/decoder/taglib
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
||||
@@ -958,7 +959,7 @@ EXAMPLE_RECURSIVE = NO
|
||||
# that contain images that are to be included in the documentation (see the
|
||||
# \image command).
|
||||
|
||||
IMAGE_PATH =
|
||||
IMAGE_PATH = @PROJECT_SOURCE_DIR@/module-gui/doc/
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
|
||||
@@ -2,20 +2,11 @@
|
||||
|
||||
This article includes details on how MuditaOS widgets are rendered and how the GUI handles key pressing.
|
||||
|
||||
Schematics parts used:
|
||||
- `[name : part]` - [name of module : part of code responsible]
|
||||
- `=> / <=>` - direction of communication
|
||||
- `<>` event on diagrams, name placeholder of element in text
|
||||
|
||||
## Introduction
|
||||
|
||||
### How widgets are rendered
|
||||
|
||||
Our UI is split into:
|
||||
|
||||
```
|
||||
[bsp] <=> [renderer] <=> [application : widgets]
|
||||
```
|
||||

|
||||
|
||||
* All widgets are children of `gui::Item`
|
||||
* There are two major commands to trigger screen redraw:
|
||||
@@ -31,14 +22,7 @@ Our UI is split into:
|
||||
|
||||
Please see `app::Application`, `sapm::ApplicationManager` for detailed information on how messages are handled between both. This is just general documentation.
|
||||
|
||||
```
|
||||
[ApplicationManager] [Application]
|
||||
<=> START <=>
|
||||
<=> Set focus <=>
|
||||
<=> Set keyboard <=>
|
||||
<=> Put background <=>
|
||||
<=> kill <=>
|
||||
```
|
||||

|
||||
|
||||
These actions are done on a chained bus request between: `app::Application`, `sapm::ApplicationManager` and `sapm::EventWorker`
|
||||
|
||||
@@ -64,9 +48,7 @@ All of these are asynchronous and there is little state machine maintenance.
|
||||
|
||||
## What happens when you press a key?
|
||||
|
||||
```
|
||||
[bsp] <basic freertos pipe> => [EventWorker : basic key translation] < key press event> => [Application with focus]
|
||||
```
|
||||

|
||||
|
||||
* `bsp` handles key press on I2C IRQ and sends Event to event worker on naked FreeRTOS pipe (on target RT1051, on Linux `gtk` does that)
|
||||
* `EventWorker` worker of `EventService`:
|
||||
|
||||
29
module-gui/doc/how_app_start_work.puml
Normal file
29
module-gui/doc/how_app_start_work.puml
Normal file
@@ -0,0 +1,29 @@
|
||||
@startuml
|
||||
|
||||
== ApplicationManager aplication start ==
|
||||
|
||||
APM -> Application: Message start
|
||||
APM <- Application: Application started confirmation
|
||||
APM -> Application: Init
|
||||
APM <- Application: Initialized
|
||||
APM -> Application: You have focus
|
||||
APM -> EVM: Application NAME has focus
|
||||
... ~~ Lots of action ~~ ...
|
||||
|
||||
|
||||
== ApplicationManager aplication start ==
|
||||
|
||||
Application <- APM: EOL request
|
||||
|
||||
hnote over APM
|
||||
Get previous application or ignore
|
||||
endhnote
|
||||
|
||||
== Service manager - power off ==
|
||||
|
||||
loop each application
|
||||
SVM -> Application: EOL request
|
||||
SVM <-- Application: OK
|
||||
end
|
||||
|
||||
@enduml
|
||||
41
module-gui/doc/how_app_start_work.svg
Normal file
41
module-gui/doc/how_app_start_work.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 12 KiB |
41
module-gui/doc/how_keypress_work.puml
Normal file
41
module-gui/doc/how_keypress_work.puml
Normal file
@@ -0,0 +1,41 @@
|
||||
@startuml
|
||||
|
||||
actor User
|
||||
|
||||
== Simple fast key press ==
|
||||
|
||||
User -> EVM : KeyPress
|
||||
EVM->Apps: KeyPress
|
||||
User-> EVM: KeyRelease
|
||||
EVM->Apps: KeyReleased
|
||||
|
||||
== Long Press ==
|
||||
|
||||
User -> EVM : KeyPress
|
||||
EVM->Apps: KeyPress
|
||||
... Some ~~long delay~~ ...
|
||||
EVM->Apps: KeyLongPress
|
||||
User-> EVM: KeyRelease
|
||||
EVM -x Apps: No KeyRelease now!
|
||||
|
||||
== Long Press - with continous action ==
|
||||
|
||||
User -> EVM : KeyPress
|
||||
EVM->Apps: KeyPress
|
||||
... Some ~~long delay~~ ...
|
||||
EVM->Apps: KeyLongPress
|
||||
hnote over Apps
|
||||
App TIMER process things:
|
||||
each 100ms:
|
||||
do_something
|
||||
endhnote
|
||||
... Some ~~long delay~~ ...
|
||||
User->EVM: KeyReleased
|
||||
EVM-> Apps: KeyLongRelease
|
||||
hnote over Apps
|
||||
App end TIMER processing
|
||||
endhnote
|
||||
EVM -x Apps: No KeyRelease now!
|
||||
|
||||
@enduml
|
||||
|
||||
53
module-gui/doc/how_keypress_work.svg
Normal file
53
module-gui/doc/how_keypress_work.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 15 KiB |
17
module-gui/doc/how_ui_work.puml
Normal file
17
module-gui/doc/how_ui_work.puml
Normal file
@@ -0,0 +1,17 @@
|
||||
@startuml
|
||||
|
||||
Application -> Application : Prepare DOM for render
|
||||
Application -> ServiceGUI : Process DOM to render
|
||||
|
||||
hnote over ServiceGUI
|
||||
Draws DOM on canvas
|
||||
endhnote
|
||||
|
||||
ServiceGUI -> ServiceEink: Process DOM render
|
||||
ServiceGUI <- ServiceEink: Request done (blocking)
|
||||
|
||||
hnote over ServiceEink
|
||||
Sends data to display
|
||||
endhnote
|
||||
|
||||
@enduml
|
||||
29
module-gui/doc/how_ui_work.svg
Normal file
29
module-gui/doc/how_ui_work.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.8 KiB |
Reference in New Issue
Block a user