flipper-zero-tutorials/ui/basic_scenes_split
2023-07-15 22:05:25 -05:00
..
application.fam Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
basic_scenes_split_i.h Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
basic_scenes_split.c Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
basic_scenes_split.h Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
basic_scenes.png Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
greeting_input.c Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
greeting_input.h Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
greeting_message.c Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
greeting_message.h Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
lottery.c Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
lottery.h Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
main_menu.c Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
main_menu.h Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00
README.md Example of basic_scenes split across files. 2023-07-15 22:04:30 -05:00

Scenes Demo Application Tutorial

This is an exampe similar to Basic_Scenes but with the files broken out into separate .c and .h files.

  • The static keyword is used on functions that do not need to be visible beyond their own .c file.
  • #pragma once is used to prevent the header file from being imported multiple times.
  • We don't use the typical typedef struct App App pattern in basic_scenes_split.h because the various scenes access properties of the App object.