]> gitweb.factorcode.org Git - factor.git/blob - extra/ui/gadgets/worlds/null/null.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / extra / ui / gadgets / worlds / null / null.factor
1 USING: accessors kernel ui ui.backend ui.gadgets
2 ui.gadgets.worlds ui.pixel-formats ;
3 IN: ui.gadgets.worlds.null
4
5 TUPLE: null-world < world ;
6 M: null-world begin-world drop ;
7 M: null-world end-world drop ;
8 M: null-world draw-world* drop ;
9 M: null-world resize-world drop ;
10
11 : null-window ( title -- world )
12     <world-attributes>
13         swap >>title
14         null-world >>world-class
15         {
16             windowed
17             double-buffered
18             backing-store
19             T{ depth-bits f 24 }
20         } >>pixel-format-attributes
21         { 512 512 } >>pref-dim
22     f swap open-window* ;
23
24 : into-window ( world quot -- world )
25     [ dup ] dip with-gl-context ; inline