And implemented on Windows, and more TODOs on top of that.

This commit is contained in:
Pietro Gagliardi 2016-06-16 14:12:47 -04:00
parent c001c164f1
commit 179042025a
4 changed files with 12 additions and 0 deletions

View File

@ -22,6 +22,7 @@ This README is being written.<br>
* Added `uiWindowContentSize()`, `uiWindowSetContentSize()`, and `uiWindowOnContentSizeChanged()` methods for manipulating uiWindow content sizes. Note the use of "content size"; the size you work with does NOT include window decorations (titlebars, menus, etc.).
* Added `uiWindowFullscreen()` and `uiWindowSetFullscreen()` to allow making fullscreen uiWindows, taking advantage of OS facilities for fullscreen and without changing the screen resolution (!).
* Added `uiWindowBorderless()` and `uiWindowSetBorderless()` for allowing borderless uiWindows.
* Added `uiMainSteps()`. You call this instead of `uiMain()` if you want to run the main loop yourself. You pass in a function that will be called; within that function, you call `uiMainStep()` repeatedly until it returns 0, doing whatever you need to do in the meantime. (This was needed because just having `uiMainStep()` by itself only worked on some systems.)
* **15 June 2016**
* Added `uiFormDelete()`; thanks to @emersion.

View File

@ -93,3 +93,8 @@ notes
- group and tab should act as if they have no child if the child is hidden
on windows
- a way to do recursive main loops
- how do we handle 0 returns from non-recursive uiMainStep() calls that aren't the main loop? (event handlers, for instance)

1
doc/mainsteps Normal file
View File

@ -0,0 +1 @@
the function passed to mainsteps must not return until uiQuit itself has been called; otherwise the results are undefined

View File

@ -77,6 +77,11 @@ void uiMain(void)
;
}
void uiMainSteps(void (*f)(void *), void *data)
{
(*f)(data);
}
static int peekMessage(MSG *msg)
{
BOOL res;