Changeset 2821 for libcaca/trunk/examples/input.c
- Timestamp:
- Sep 27, 2008, 3:12:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/examples/input.c
r2299 r2821 20 20 #endif 21 21 22 #include "cucul.h"23 22 #include "caca.h" 24 23 … … 35 34 { 36 35 textentry entries[TEXT_ENTRIES]; 37 c ucul_canvas_t *cv;36 caca_canvas_t *cv; 38 37 caca_display_t *dp; 39 38 unsigned int i, e = 0, running = 1; 40 39 41 cv = c ucul_create_canvas(0, 0);40 cv = caca_create_canvas(0, 0); 42 41 if(cv == NULL) 43 42 { … … 53 52 caca_set_cursor(dp, 1); 54 53 55 c ucul_set_color_ansi(cv, CUCUL_WHITE, CUCUL_BLUE);56 c ucul_put_str(cv, 1, 1, "Text entries - press tab to cycle");54 caca_set_color_ansi(cv, CACA_WHITE, CACA_BLUE); 55 caca_put_str(cv, 1, 1, "Text entries - press tab to cycle"); 57 56 58 57 for(i = 0; i < TEXT_ENTRIES; i++) … … 71 70 unsigned int j, start, size; 72 71 73 c ucul_set_color_ansi(cv, CUCUL_BLACK, CUCUL_LIGHTGRAY);74 c ucul_fill_box(cv, 2, 3 * i + 4, 2 + BUFFER_SIZE, 3 * i + 4, ' ');72 caca_set_color_ansi(cv, CACA_BLACK, CACA_LIGHTGRAY); 73 caca_fill_box(cv, 2, 3 * i + 4, 2 + BUFFER_SIZE, 3 * i + 4, ' '); 75 74 76 75 start = 0; … … 79 78 for(j = 0; j < size; j++) 80 79 { 81 c ucul_put_char(cv, 2 + j, 3 * i + 4,80 caca_put_char(cv, 2 + j, 3 * i + 4, 82 81 entries[i].buffer[start + j]); 83 82 } … … 85 84 86 85 /* Put the cursor on the active textentry */ 87 c ucul_gotoxy(cv, 2 + entries[e].cursor, 3 * e + 4);86 caca_gotoxy(cv, 2 + entries[e].cursor, 3 * e + 4); 88 87 89 88 caca_refresh_display(dp); … … 150 149 151 150 caca_free_display(dp); 152 c ucul_free_canvas(cv);151 caca_free_canvas(cv); 153 152 154 153 return 0;
Note: See TracChangeset
for help on using the changeset viewer.