Handbook
Glossary
UI backend window management
Factor handbook
»
UI framework
»
Developing UI backends
Prev:
UI initialization and the event loop
The high-level
open-window
word eventually calls a low-level word which you must implement:
open-world-window
( world -- )
This word should create a native window, store some kind of handle in the
handle
slot, then call two words:
register-window
( world handle -- )
The following words must also be implemented:
set-title
( string world -- )
raise-window
( gadget -- )
When a world needs to be redrawn, the UI will call a word automatically:
draw-world
( world -- )
This word can also be called directly if the UI backend is notified by the window system that window contents have been invalidated. Before and after drawing, two words are called, which the UI backend must implement:
select-gl-context
( handle -- )
flush-gl-context
( handle -- )
If the user clicks the window's close box, you must call the following word:
close-window
( gadget -- )