Ignore:
Timestamp:
Sep 27, 2008, 3:12:46 PM (12 years ago)
Author:
Sam Hocevar
Message:

Starting refactoring to get rid of libcucul. The initial reason for the
split is rendered moot by the plugin system: when enabled, binaries do
not link directly with libX11 or libGL. I hope this is a step towards
more consisteny and clarity.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/examples/input.c

    r2299 r2821  
    2020#endif
    2121
    22 #include "cucul.h"
    2322#include "caca.h"
    2423
     
    3534{
    3635    textentry entries[TEXT_ENTRIES];
    37     cucul_canvas_t *cv;
     36    caca_canvas_t *cv;
    3837    caca_display_t *dp;
    3938    unsigned int i, e = 0, running = 1;
    4039
    41     cv = cucul_create_canvas(0, 0);
     40    cv = caca_create_canvas(0, 0);
    4241    if(cv == NULL)
    4342    {
     
    5352    caca_set_cursor(dp, 1);
    5453
    55     cucul_set_color_ansi(cv, CUCUL_WHITE, CUCUL_BLUE);
    56     cucul_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");
    5756
    5857    for(i = 0; i < TEXT_ENTRIES; i++)
     
    7170            unsigned int j, start, size;
    7271
    73             cucul_set_color_ansi(cv, CUCUL_BLACK, CUCUL_LIGHTGRAY);
    74             cucul_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, ' ');
    7574
    7675            start = 0;
     
    7978            for(j = 0; j < size; j++)
    8079            {
    81                 cucul_put_char(cv, 2 + j, 3 * i + 4,
     80                caca_put_char(cv, 2 + j, 3 * i + 4,
    8281                              entries[i].buffer[start + j]);
    8382            }
     
    8584
    8685        /* Put the cursor on the active textentry */
    87         cucul_gotoxy(cv, 2 + entries[e].cursor, 3 * e + 4);
     86        caca_gotoxy(cv, 2 + entries[e].cursor, 3 * e + 4);
    8887
    8988        caca_refresh_display(dp);
     
    150149
    151150    caca_free_display(dp);
    152     cucul_free_canvas(cv);
     151    caca_free_canvas(cv);
    153152
    154153    return 0;
Note: See TracChangeset for help on using the changeset viewer.