Changeset 2043 for libcaca/trunk/caca
- Timestamp:
- Nov 24, 2007, 12:08:21 PM (12 years ago)
- Location:
- libcaca/trunk/caca
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/caca.h
r2039 r2043 193 193 __extern int caca_refresh_display(caca_display_t *); 194 194 __extern int caca_set_display_time(caca_display_t *, unsigned int); 195 __extern unsigned int caca_get_display_time(caca_display_t *);196 __extern unsigned int caca_get_display_width(caca_display_t *);197 __extern unsigned int caca_get_display_height(caca_display_t *);195 __extern unsigned int caca_get_display_time(caca_display_t const *); 196 __extern unsigned int caca_get_display_width(caca_display_t const *); 197 __extern unsigned int caca_get_display_height(caca_display_t const *); 198 198 __extern int caca_set_display_title(caca_display_t *, char const *); 199 199 /* @} */ … … 207 207 __extern int caca_get_event(caca_display_t *, unsigned int, 208 208 caca_event_t *, int); 209 __extern unsigned int caca_get_mouse_x(caca_display_t *);210 __extern unsigned int caca_get_mouse_y(caca_display_t *);209 __extern unsigned int caca_get_mouse_x(caca_display_t const *); 210 __extern unsigned int caca_get_mouse_y(caca_display_t const *); 211 211 __extern int caca_set_mouse(caca_display_t *, int); 212 212 __extern int caca_set_cursor(caca_display_t *, int); -
libcaca/trunk/caca/caca_internals.h
r1462 r2043 109 109 int (* end_graphics) (caca_display_t *); 110 110 int (* set_display_title) (caca_display_t *, char const *); 111 unsigned int (* get_display_width) (caca_display_t *);112 unsigned int (* get_display_height) (caca_display_t *);111 unsigned int (* get_display_width) (caca_display_t const *); 112 unsigned int (* get_display_height) (caca_display_t const *); 113 113 void (* display) (caca_display_t *); 114 114 void (* handle_resize) (caca_display_t *); -
libcaca/trunk/caca/driver_conio.c
r2040 r2043 84 84 } 85 85 86 static unsigned int conio_get_display_width(caca_display_t *dp)86 static unsigned int conio_get_display_width(caca_display_t const *dp) 87 87 { 88 88 /* Fallback to a 6x10 font */ … … 90 90 } 91 91 92 static unsigned int conio_get_display_height(caca_display_t *dp)92 static unsigned int conio_get_display_height(caca_display_t const *dp) 93 93 { 94 94 /* Fallback to a 6x10 font */ -
libcaca/trunk/caca/driver_gl.c
r2040 r2043 198 198 } 199 199 200 static unsigned int gl_get_display_width(caca_display_t *dp)200 static unsigned int gl_get_display_width(caca_display_t const *dp) 201 201 { 202 202 return dp->drv.p->width; 203 203 } 204 204 205 static unsigned int gl_get_display_height(caca_display_t *dp)205 static unsigned int gl_get_display_height(caca_display_t const *dp) 206 206 { 207 207 return dp->drv.p->height; -
libcaca/trunk/caca/driver_ncurses.c
r2040 r2043 327 327 } 328 328 329 static unsigned int ncurses_get_display_width(caca_display_t *dp)329 static unsigned int ncurses_get_display_width(caca_display_t const *dp) 330 330 { 331 331 /* Fallback to a 6x10 font */ … … 333 333 } 334 334 335 static unsigned int ncurses_get_display_height(caca_display_t *dp)335 static unsigned int ncurses_get_display_height(caca_display_t const *dp) 336 336 { 337 337 /* Fallback to a 6x10 font */ -
libcaca/trunk/caca/driver_raw.c
r2040 r2043 56 56 } 57 57 58 static unsigned int raw_get_display_width(caca_display_t *dp)58 static unsigned int raw_get_display_width(caca_display_t const *dp) 59 59 { 60 60 return 0; 61 61 } 62 62 63 static unsigned int raw_get_display_height(caca_display_t *dp)63 static unsigned int raw_get_display_height(caca_display_t const *dp) 64 64 { 65 65 return 0; -
libcaca/trunk/caca/driver_slang.c
r2040 r2043 194 194 } 195 195 196 static unsigned int slang_get_display_width(caca_display_t *dp)196 static unsigned int slang_get_display_width(caca_display_t const *dp) 197 197 { 198 198 /* Fallback to a 6x10 font */ … … 200 200 } 201 201 202 static unsigned int slang_get_display_height(caca_display_t *dp)202 static unsigned int slang_get_display_height(caca_display_t const *dp) 203 203 { 204 204 /* Fallback to a 6x10 font */ -
libcaca/trunk/caca/driver_vga.c
r2040 r2043 102 102 } 103 103 104 static unsigned int vga_get_display_width(caca_display_t *dp)104 static unsigned int vga_get_display_width(caca_display_t const *dp) 105 105 { 106 106 /* Fallback to a 320x200 screen */ … … 108 108 } 109 109 110 static unsigned int vga_get_display_height(caca_display_t *dp)110 static unsigned int vga_get_display_height(caca_display_t const *dp) 111 111 { 112 112 /* Fallback to a 320x200 screen */ -
libcaca/trunk/caca/driver_win32.c
r2040 r2043 172 172 } 173 173 174 static unsigned int win32_get_display_width(caca_display_t *dp)174 static unsigned int win32_get_display_width(caca_display_t const *dp) 175 175 { 176 176 /* FIXME */ … … 180 180 } 181 181 182 static unsigned int win32_get_display_height(caca_display_t *dp)182 static unsigned int win32_get_display_height(caca_display_t const *dp) 183 183 { 184 184 /* FIXME */ -
libcaca/trunk/caca/driver_x11.c
r2040 r2043 275 275 } 276 276 277 static unsigned int x11_get_display_width(caca_display_t *dp)277 static unsigned int x11_get_display_width(caca_display_t const *dp) 278 278 { 279 279 return dp->cv->width * dp->drv.p->font_width; 280 280 } 281 281 282 static unsigned int x11_get_display_height(caca_display_t *dp)282 static unsigned int x11_get_display_height(caca_display_t const *dp) 283 283 { 284 284 return dp->cv->height * dp->drv.p->font_height; -
libcaca/trunk/caca/event.c
r1556 r2043 126 126 * \return The X mouse coordinate. 127 127 */ 128 unsigned int caca_get_mouse_x(caca_display_t *dp)128 unsigned int caca_get_mouse_x(caca_display_t const *dp) 129 129 { 130 130 if(dp->mouse.x >= dp->cv->width) 131 dp->mouse.x =dp->cv->width - 1;131 return dp->cv->width - 1; 132 132 133 133 return dp->mouse.x; … … 146 146 * \return The Y mouse coordinate. 147 147 */ 148 unsigned int caca_get_mouse_y(caca_display_t *dp)148 unsigned int caca_get_mouse_y(caca_display_t const *dp) 149 149 { 150 150 if(dp->mouse.y >= dp->cv->height) 151 dp->mouse.y =dp->cv->height - 1;151 return dp->cv->height - 1; 152 152 153 153 return dp->mouse.y; -
libcaca/trunk/caca/graphics.c
r2040 r2043 65 65 * \return The display width. 66 66 */ 67 unsigned int caca_get_display_width(caca_display_t *dp)67 unsigned int caca_get_display_width(caca_display_t const *dp) 68 68 { 69 69 return dp->drv.get_display_width(dp); … … 82 82 * \return The display height. 83 83 */ 84 unsigned int caca_get_display_height(caca_display_t *dp)84 unsigned int caca_get_display_height(caca_display_t const *dp) 85 85 { 86 86 return dp->drv.get_display_height(dp); … … 121 121 * \return The render time in microseconds. 122 122 */ 123 unsigned int caca_get_display_time(caca_display_t *dp)123 unsigned int caca_get_display_time(caca_display_t const *dp) 124 124 { 125 125 return dp->rendertime;
Note: See TracChangeset
for help on using the changeset viewer.