Changeset 527 for trunk/thune/gl/boot.c
- Timestamp:
- 05/26/08 17:22:18 (6 months ago)
- Files:
-
- 1 modified
-
trunk/thune/gl/boot.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/thune/gl/boot.c
r516 r527 1 "[file string!] [\n"2 " file 16 read\n"3 " dup \"RIFF\" match ift (file load-wav return)\n"4 " file read\n"5 " dup \"#!\" match ift (eol find)\n"6 " to-block kernel-ops infuse\n"7 "] func :load\n"8 1 "[\n" 9 2 " none :orient\n" … … 16 9 "context :camera\n" 17 10 "[\n" 18 " none :parent\n"19 " none :children\n"20 11 " 0,0 :area\n" 21 12 " none :key-down\n" … … 30 21 " none :draw\n" 31 22 "]\n" 32 "context :widget-proto\n" 23 "context :t-widget-proto\n" 24 "[\n" 25 " none :texture\n" 26 " none :tex-size\n" 27 " none :control-font\n" 28 " none :title-font\n" 29 " none :label\n" 30 " none :area\n" 31 " none :window-margin\n" 32 " none :window\n" 33 " none :button-size-limit\n" 34 " none :button-up\n" 35 " none :button-down\n" 36 " none :button-hover\n" 37 "]\n" 38 "context dup :gui-style-proto :gui-style\n" 33 39 "[\n" 34 40 " none :value\n" … … 47 53 " 3 :mouse-mb]\n" 48 54 "] case\n" 49 "[\n" 50 " copy\n" 51 " dup [dup first key-code 1 poke drop] iter/2\n" 52 " [dup none select do] copy swap 2 poke\n" 53 "]\n" 54 "proc :key-handler\n" 55 "[wid | handler]\n" 56 "[\n" 57 " [] display.events [\n" 58 " dup first wid get dup :handler\n" 59 " ift (second handler do) drop\n" 60 " ] iter/2\n" 61 "]\n" 62 "func :handle.events\n" 63 "[wid | handler]\n" 64 "[\n" 65 " [] 'wait display.events [\n" 66 " dup first wid get dup :handler\n" 67 " ift (second handler do) drop\n" 68 " ] iter/2\n" 69 "]\n" 70 "func :wait-events\n" 55 "[drop display.events] proc :handle-events\n" 56 "[drop display.events/wait] proc :wait-events\n" 71 57 "[list block! | ctx wrd n]\n" 72 58 "[\n" … … 128 114 "]\n" 129 115 "make-opcodes :draw-list-opcodes\n" 116 "[draw-list! swap make] proc :draw-list\n" 117 "[draw-list! swap paren! as make] proc :draw-list.compile\n" 130 118 "[\n" 131 " draw-list! swap make\n" 119 " copy\n" 120 " dup [dup first key-code 1 poke drop] iter/2\n" 132 121 "]\n" 133 "proc :draw-list\n" 122 "proc :key-handler\n" 123 "[desc | wid]\n" 134 124 "[\n" 135 " draw-list! swap paren! as make\n" 136 "]\n" 137 "proc :draw-list.compile\n" 138 "[desc | tok wid]\n" 139 "[\n" 140 " widget-proto [] make :wid\n" 141 " desc wid bind [\n" 142 " :tok\n" 143 " 'key-down block! (tok/2 key-handler :wid/key-down)\n" 144 " | 'key-up block! (tok/2 key-handler :wid/key-up)\n" 145 " | 'mouse-move block! (tok/2 :wid/mouse-move)\n" 146 " | 'mouse-down block! (tok/2 :wid/mouse-down)\n" 147 " | 'mouse-up block! (tok/2 :wid/mouse-up)\n" 148 " | 'mouse-wheel block! (tok/2 :wid/mouse-wheel)\n" 149 " | 'close block! (tok/2 :wid/close)\n" 150 " | 'resize block! (tok/2 :wid/resize)\n" 151 " | 'joystick block! (tok/2 :wid/joystick)\n" 152 " | 'draw block! (tok/2 :wid/draw)\n" 153 " | 'draw-list block! (tok/2 draw-list :wid/draw)\n" 154 " | 'parent word! (tok/2 get :wid/parent)\n" 155 " ] parse.some\n" 156 " wid/parent\n" 157 " ['area wid/parent get :wid/area]\n" 158 " [display.area :wid/area]\n" 159 " either\n" 160 " wid/resize ift (wid/area wid/resize do drop)\n" 125 " desc t-widget-proto copy dup :wid set-key-values\n" 126 " wid/key-down if-some (key-handler :wid/key-down)\n" 127 " wid/key-up if-some (key-handler :wid/key-up)\n" 128 " wid/draw if-some (draw-list :wid/draw)\n" 161 129 " wid\n" 162 130 "]\n" 163 "func :make-widget\n" 131 "func :t-widget-context\n" 132 "[widget! [t-widget none] rot 2 poke make] proc :make-widget\n" 133 "[file string!] [\n" 134 " file 16 read\n" 135 " dup \"RIFF\" match ift (file load-wav return)\n" 136 " file read\n" 137 " dup \"#!\" match ift (eol find)\n" 138 " to-block kernel-ops infuse\n" 139 "] func :load\n" 164 140 "[load shader! swap make] proc :load.shader\n" 165 141 "[load.png texture! swap make] proc :load.tex\n" … … 180 156 " 0.0 0.0 0.0 1.0 \n" 181 157 "] :unit-matrix\n" 182 "[\n" 183 " unit-matrix copy swap 13 poke\n" 184 "]\n" 185 "proc :make-matrix\n" 158 "[unit-matrix copy swap 13 poke] proc :make-matrix\n"
