Task T95505
Add a GHOST_TConsoleWindowState enum to GHOST_Types.h encapsulating all 4 options.
Update GHOST_ISystem.h with the new function signature (int setConsoleWindowState(GHOST_TConsoleWindowState action);
Update GHOST_SystemWin32.cpp and GHOST_SystemWin32.h with the new function signature.
Update GHOST_SystemWayland.cpp and GHOST_SystemWayland.h with the new function signature.
Update GHOST_SystemX11.h with the new function signature.
Update GHOST_SystemSDL.h with the new function signature.
Update GHOST_SystemNULL.h with the new function signature.
Update GHOST_SystemCocoa.h with the new function signature.
Update GHOST_C-api.cpp and GHOST_C-api.h with the new function signature.
Update wm_init_exit.c to call the new function.
Update wm_operators.c to call the new function.
Given the enum is now used everywhere, cleanup (remove) any comments that still refer to the 4 magic integer values.
Details
- Reviewers
Ray Molenkamp (LazyDodo) - Maniphest Tasks
- T95505: Cleanup: GHOST_ISystem::toggleConsole API
- Commits
- rBf021d467526a: Cleanup: GHOST_ISystem::toggleConsole API
Diff Detail
- Repository
- rB Blender
- Branch
- Ghost (branched from master)
- Build Status
Buildable 20387 Build 20387: arc lint + arc unit
Event Timeline
| intern/ghost/GHOST_Types.h | ||
|---|---|---|
| 147 | * - 3: Hides if it runs not from command line GHOST_kConsoleWindowStateShowCLI is probably not the best name here, GHOST_kConsoleWindowStateHideForNonConsoleLaunch is a little long but covers what is happening nicely. | |
| intern/ghost/intern/GHOST_SystemWin32.cpp | ||
| 108 | Best not to include things from other patches. | |
| 2232 | Given the enum names are descriptive enough, this comment can be removed, same for the others in this function. | |
| intern/ghost/intern/GHOST_SystemX11.h | ||
| 272 | that semicolon at the end breaks the linux build | |
| intern/ghost/GHOST_C-api.h | ||
|---|---|---|
| 894 |
pending here and 2 places below in "(1 -visible, 0 - hidden)" also is int return type instead of the enum intended ? | |
| intern/ghost/GHOST_C-api.h | ||
|---|---|---|
| 894 | it would have to be a new enum, as GHOST_TConsoleWindowState doesn't really cover it, for now an int will be fine. | |
| intern/ghost/intern/GHOST_SystemWayland.cpp | ||
|---|---|---|
| 1476 | sorry, missed this on an earlier pass, stray semicolon. | |