Project restructuring (fixes macOS builds) (#198)
- Create `Include/` folder for all main projects - Fix some issues here and there (found while moving things) - All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
This commit is contained in:
committed by
GitHub
parent
7856827ecf
commit
c87200a80d
@@ -1,10 +1,11 @@
|
||||
#include "Tactility.h"
|
||||
#include "service/gui/Gui_i.h"
|
||||
#include "service/loader/Loader_i.h"
|
||||
#include "lvgl/LvglSync.h"
|
||||
#include "RtosCompat.h"
|
||||
#include "lvgl/Style.h"
|
||||
#include "lvgl/Statusbar.h"
|
||||
#include "Tactility/service/gui/Gui_i.h"
|
||||
#include "Tactility/service/loader/Loader_i.h"
|
||||
#include "Tactility/lvgl/LvglSync.h"
|
||||
#include "Tactility/lvgl/Style.h"
|
||||
#include "Tactility/lvgl/Statusbar.h"
|
||||
|
||||
#include <Tactility/Tactility.h>
|
||||
#include <Tactility/RtosCompat.h>
|
||||
|
||||
namespace tt::service::gui {
|
||||
|
||||
@@ -120,7 +121,7 @@ static int32_t guiMain(TT_UNUSED void* p) {
|
||||
Gui* local_gui = gui;
|
||||
|
||||
while (true) {
|
||||
uint32_t flags = Thread::awaitFlags(GUI_THREAD_FLAG_ALL, EventFlag::WaitAny, portMAX_DELAY);
|
||||
uint32_t flags = Thread::awaitFlags(GUI_THREAD_FLAG_ALL, EventFlag::WaitAny, (uint32_t)portMAX_DELAY);
|
||||
|
||||
// Process and dispatch draw call
|
||||
if (flags & GUI_THREAD_FLAG_DRAW) {
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "app/AppInstance.h"
|
||||
#include "app/AppContext.h"
|
||||
|
||||
namespace tt::service::gui {
|
||||
|
||||
typedef struct Gui Gui;
|
||||
|
||||
/**
|
||||
* Set the app viewport in the gui state and request the gui to draw it.
|
||||
* @param[in] app
|
||||
*/
|
||||
void showApp(std::shared_ptr<app::AppContext> app);
|
||||
|
||||
/**
|
||||
* Hide the current app's viewport.
|
||||
* Does not request a re-draw because after hiding the current app,
|
||||
* we always show the previous app, and there is always at least 1 app running.
|
||||
*/
|
||||
void hideApp();
|
||||
|
||||
/**
|
||||
* Show the on-screen keyboard.
|
||||
* @param[in] textarea the textarea to focus the input for
|
||||
*/
|
||||
void keyboardShow(lv_obj_t* textarea);
|
||||
|
||||
/**
|
||||
* Hide the on-screen keyboard.
|
||||
* Has no effect when the keyboard is not visible.
|
||||
*/
|
||||
void keyboardHide();
|
||||
|
||||
/**
|
||||
* The on-screen keyboard is only shown when both of these conditions are true:
|
||||
* - there is no hardware keyboard
|
||||
* - TT_CONFIG_FORCE_ONSCREEN_KEYBOARD is set to true in tactility_config.h
|
||||
* @return if we should show a on-screen keyboard for text input inside our apps
|
||||
*/
|
||||
bool keyboardIsEnabled();
|
||||
|
||||
/**
|
||||
* Glue code for the on-screen keyboard and the hardware keyboard:
|
||||
* - Attach automatic hide/show parameters for the on-screen keyboard.
|
||||
* - Registers the textarea to the default lv_group_t for hardware keyboards.
|
||||
* @param[in] textarea
|
||||
*/
|
||||
void keyboardAddTextArea(lv_obj_t* textarea);
|
||||
|
||||
} // namespace
|
||||
@@ -1,9 +1,10 @@
|
||||
#include "Check.h"
|
||||
#include "Log.h"
|
||||
#include "service/gui/Gui_i.h"
|
||||
#include "lvgl/LvglSync.h"
|
||||
#include "lvgl/Statusbar.h"
|
||||
#include "lvgl/Style.h"
|
||||
#include "Tactility/service/gui/Gui_i.h"
|
||||
#include "Tactility/lvgl/LvglSync.h"
|
||||
#include "Tactility/lvgl/Statusbar.h"
|
||||
#include "Tactility/lvgl/Style.h"
|
||||
|
||||
#include <Tactility/Check.h>
|
||||
#include <Tactility/Log.h>
|
||||
|
||||
namespace tt::service::gui {
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#include "Check.h"
|
||||
#include "TactilityConfig.h"
|
||||
#include "service/gui/Gui_i.h"
|
||||
#include "lvgl/LvglKeypad.h"
|
||||
#include "lvgl/LvglSync.h"
|
||||
#include "Tactility/Check.h"
|
||||
#include "Tactility/service/gui/Gui_i.h"
|
||||
#include "Tactility/lvgl/LvglKeypad.h"
|
||||
#include "Tactility/lvgl/LvglSync.h"
|
||||
|
||||
#include <Tactility/TactilityConfig.h>
|
||||
|
||||
namespace tt::service::gui {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user