Changeset 3195
- Timestamp:
- Nov 2, 2008, 12:43:00 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca-php/caca.php
r3193 r3195 15 15 16 16 class Canvas { 17 private varcv;17 private $cv; 18 18 19 19 function setSize($width, $height) { … … 150 150 151 151 function __construct($width = 0, $height = 0) { 152 cv = caca_create_canvas($width, $height);152 $this->cv = caca_create_canvas($width, $height); 153 153 } 154 154 … … 157 157 } 158 158 } 159 160 class Display { 161 private $dp; 162 163 function setDisplayTime($time) { 164 return caca_set_display_time($this->dp, $time); 165 } 166 167 function getDisplayTime() { 168 return caca_get_display_time($this->dp); 169 } 170 171 function getWidth() { 172 return caca_get_display_width($this->dp); 173 } 174 175 function getHeight() { 176 return caca_get_display_height($this->dp); 177 } 178 179 function setTitle($title) { 180 return caca_set_display_title($this->dp, $title); 181 } 182 183 function getMouseX() { 184 return caca_get_mouse_x($this->dp); 185 } 186 187 function getMouseY() { 188 return caca_get_mouse_y($this->dp); 189 } 190 191 function setMouse($state) { 192 return caca_set_mouse($this->dp, $state); 193 } 194 195 function __construct($canvas) { 196 $this->dp = caca_create_display($canvas->get_resource()); 197 } 198 199 function get_resource() { 200 return $this->dp; 201 } 202 }
Note: See TracChangeset
for help on using the changeset viewer.