Ignore:
Timestamp:
Sep 27, 2008, 3:12:46 PM (11 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/caca/driver_ncurses.c

    r2305 r2821  
    5151#endif
    5252
    53 #include "cucul.h"
    5453#include "caca.h"
    5554#include "caca_internals.h"
     
    303302
    304303    dp->resize.allow = 1;
    305     cucul_set_canvas_size(dp->cv, COLS, LINES);
     304    caca_set_canvas_size(dp->cv, COLS, LINES);
    306305    dp->resize.allow = 0;
    307306
     
    336335{
    337336    /* Fallback to a 6x10 font */
    338     return cucul_get_canvas_width(dp->cv) * 6;
     337    return caca_get_canvas_width(dp->cv) * 6;
    339338}
    340339
     
    342341{
    343342    /* Fallback to a 6x10 font */
    344     return cucul_get_canvas_height(dp->cv) * 10;
     343    return caca_get_canvas_height(dp->cv) * 10;
    345344}
    346345
    347346static void ncurses_display(caca_display_t *dp)
    348347{
    349     uint32_t const *cvchars = (uint32_t const *)cucul_get_canvas_chars(dp->cv);
    350     uint32_t const *cvattrs = (uint32_t const *)cucul_get_canvas_attrs(dp->cv);
    351     int width = cucul_get_canvas_width(dp->cv);
    352     int height = cucul_get_canvas_height(dp->cv);
     348    uint32_t const *cvchars = (uint32_t const *)caca_get_canvas_chars(dp->cv);
     349    uint32_t const *cvattrs = (uint32_t const *)caca_get_canvas_attrs(dp->cv);
     350    int width = caca_get_canvas_width(dp->cv);
     351    int height = caca_get_canvas_height(dp->cv);
    353352    int x, y;
    354353
     
    358357        for(x = width; x--; )
    359358        {
    360             attrset(dp->drv.p->attr[cucul_attr_to_ansi(*cvattrs++)]);
     359            attrset(dp->drv.p->attr[caca_attr_to_ansi(*cvattrs++)]);
    361360            ncurses_write_utf32(*cvchars++);
    362361        }
    363362    }
    364363   
    365     x = cucul_get_cursor_x(dp->cv);
    366     y = cucul_get_cursor_y(dp->cv);
     364    x = caca_get_cursor_x(dp->cv);
     365    y = caca_get_cursor_y(dp->cv);
    367366    move(y, x);
    368367
     
    390389
    391390    /* Fallback */
    392     dp->resize.w = cucul_get_canvas_width(dp->cv);
    393     dp->resize.h = cucul_get_canvas_height(dp->cv);
     391    dp->resize.w = caca_get_canvas_width(dp->cv);
     392    dp->resize.h = caca_get_canvas_height(dp->cv);
    394393}
    395394
     
    433432
    434433        utf8[i] = '\0';
    435         utf32 = cucul_utf8_to_utf32(utf8, &bytes);
     434        utf32 = caca_utf8_to_utf32(utf8, &bytes);
    436435
    437436        while(i > bytes)
     
    616615#endif
    617616
    618     if(ch == CUCUL_MAGIC_FULLWIDTH)
     617    if(ch == CACA_MAGIC_FULLWIDTH)
    619618        return;
    620619
    621620#if defined HAVE_NCURSESW_NCURSES_H
    622     bytes = cucul_utf32_to_utf8(buf, ch);
     621    bytes = caca_utf32_to_utf8(buf, ch);
    623622    buf[bytes] = '\0';
    624623    addstr(buf);
     
    815814        }
    816815        addch(cch);
    817         if(cucul_utf32_is_fullwidth(ch))
     816        if(caca_utf32_is_fullwidth(ch))
    818817        {
    819818            addch(cch2);
Note: See TracChangeset for help on using the changeset viewer.