Ignore:
Timestamp:
Apr 16, 2006, 8:28:47 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • Replaced "struct cucul_*" and "struct caca_*" types with opaque typedefs such as cucul_dither_t instead of struct cucul_dither.
  • Made cucul_buffer_t an opaque structure and implemented the two getters cucul_get_buffer_data() and cucul_get_buffer_size().
  • Documented all missing functions and function parameters.
Location:
libcaca/trunk/test
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/test/colors.c

    r710 r777  
    2525    cucul_t *qq;
    2626    caca_t *kk;
    27     struct caca_event ev;
     27    caca_event_t ev;
    2828    int i, j;
    2929
  • libcaca/trunk/test/demo.c

    r774 r777  
    3636int outline = 0;
    3737int dithering = 0;
    38 struct cucul_sprite *sprite = NULL;
     38cucul_sprite_t *sprite = NULL;
    3939
    4040cucul_t *qq;
     
    7272    while(!quit)
    7373    {
    74         struct caca_event ev;
     74        caca_event_t ev;
    7575        int menu = 0, mouse = 0, xmouse = 0, ymouse = 0;
    7676
     
    484484static void demo_render(void)
    485485{
    486     struct cucul_dither *dither;
     486    cucul_dither_t *dither;
    487487    //short buffer[256*256];
    488488    //short *dest = buffer;
     
    514514static void demo_render(void)
    515515{
    516     struct cucul_dither *dither;
     516    cucul_dither_t *dither;
    517517    int buffer[256*256];
    518518    int *dest;
  • libcaca/trunk/test/dithering.c

    r733 r777  
    3535int main(void)
    3636{
    37     struct caca_event ev;
     37    caca_event_t ev;
    3838    cucul_t *qq;
    3939    caca_t *kk;
  • libcaca/trunk/test/event.c

    r710 r777  
    2424static caca_t *kk;
    2525
    26 static void print_event(int, int, struct caca_event *);
     26static void print_event(int, int, caca_event_t *);
    2727
    2828int main(int argc, char **argv)
    2929{
    30     struct caca_event *events;
     30    caca_event_t *events;
    3131    int i, h, quit;
    3232
     
    4848    caca_display(kk);
    4949
    50     events = malloc(h * sizeof(struct caca_event));
    51     memset(events, 0, h * sizeof(struct caca_event));
     50    events = malloc(h * sizeof(caca_event_t));
     51    memset(events, 0, h * sizeof(caca_event_t));
    5252
    5353    for(quit = 0; quit < 4; )
    5454    {
    55         struct caca_event ev;
     55        caca_event_t ev;
    5656        static char const * quit_string[] = { "", "q", "qu", "qui", "quit" };
    5757        int ret = caca_get_event(kk, CACA_EVENT_ANY, &ev, -1);
     
    7575            }
    7676
    77             memmove(events + 1, events, (h - 1) * sizeof(struct caca_event));
     77            memmove(events + 1, events, (h - 1) * sizeof(caca_event_t));
    7878            events[0] = ev;
    7979
     
    107107}
    108108
    109 static void print_event(int x, int y, struct caca_event *ev)
     109static void print_event(int x, int y, caca_event_t *ev)
    110110{
    111111    int character;
  • libcaca/trunk/test/export.c

    r757 r777  
    3636{
    3737    cucul_t *qq;
    38     struct cucul_dither *dither;
    39     struct cucul_buffer *buffer;
     38    cucul_dither_t *dither;
     39    cucul_buffer_t *buffer;
    4040    int x, y;
    4141
     
    9191
    9292    buffer = cucul_create_export(qq, argv[1]);
    93     fwrite(buffer->data, buffer->size, 1, stdout);
    94     cucul_free_export(buffer);
     93    fwrite(cucul_get_buffer_data(buffer),
     94           cucul_get_buffer_size(buffer), 1, stdout);
     95    cucul_free_buffer(buffer);
    9596
    9697    cucul_free(qq);
  • libcaca/trunk/test/font.c

    r767 r777  
    3737    cucul_t *qq;
    3838    caca_t *kk;
    39     struct cucul_font *f;
    40     struct cucul_dither *d;
    41     struct caca_event ev;
     39    cucul_font_t *f;
     40    cucul_dither_t *d;
     41    caca_event_t ev;
    4242    unsigned char *buf;
    4343    unsigned int w, h;
  • libcaca/trunk/test/gamma.c

    r734 r777  
    3434int main(void)
    3535{
    36     struct caca_event ev;
     36    caca_event_t ev;
    3737    cucul_t *qq, *gg, *mask;
    3838    caca_t *kk;
    39     struct cucul_dither *left, *right;
     39    cucul_dither_t *left, *right;
    4040    float gam = 1.0;
    4141    int x;
  • libcaca/trunk/test/hsv.c

    r766 r777  
    2929int main(void)
    3030{
    31     struct caca_event ev;
     31    caca_event_t ev;
    3232    cucul_t *qq;
    3333    caca_t *kk;
    3434
    35     struct cucul_dither *dither;
     35    cucul_dither_t *dither;
    3636    int x, y;
    3737
  • libcaca/trunk/test/spritedit.c

    r774 r777  
    2727
    2828    int quit = 0;
    29     struct cucul_sprite *sprite;
     29    cucul_sprite_t *sprite;
    3030    int frame = 0;
    3131    unsigned char play = 0;
     
    5858    while(!quit)
    5959    {
    60         struct caca_event ev;
     60        caca_event_t ev;
    6161        int xa, ya, xb, yb;
    6262        char buf[BUFSIZ];
  • libcaca/trunk/test/transform.c

    r710 r777  
    5050int main(void)
    5151{
    52     struct caca_event ev;
     52    caca_event_t ev;
    5353    cucul_t *qq, *normal, *flip, *flop, *rotate;
    5454    caca_t *kk;
  • libcaca/trunk/test/unicode.c

    r710 r777  
    2727int main(void)
    2828{
    29     struct caca_event ev;
     29    caca_event_t ev;
    3030    cucul_t *qq;
    3131    caca_t *kk;
Note: See TracChangeset for help on using the changeset viewer.