Ignore:
Timestamp:
Apr 18, 2006, 5:11:25 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Renamed caca_t into caca_display_t.
  • Renamed canvas handle variables from "c" to "cv". Eh ouais mon gros.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/driver_raw.c

    r810 r811  
    2727#include "cucul_internals.h"
    2828
    29 static int raw_init_graphics(caca_t *kk)
     29static int raw_init_graphics(caca_display_t *dp)
    3030{
    3131    return 0;
    3232}
    3333
    34 static int raw_end_graphics(caca_t *kk)
     34static int raw_end_graphics(caca_display_t *dp)
    3535{
    3636    return 0;
    3737}
    3838
    39 static int raw_set_window_title(caca_t *kk, char const *title)
     39static int raw_set_window_title(caca_display_t *dp, char const *title)
    4040{
    4141    return 0;
    4242}
    4343
    44 static unsigned int raw_get_window_width(caca_t *kk)
     44static unsigned int raw_get_window_width(caca_display_t *dp)
    4545{
    4646    return 0;
    4747}
    4848
    49 static unsigned int raw_get_window_height(caca_t *kk)
     49static unsigned int raw_get_window_height(caca_display_t *dp)
    5050{
    5151    return 0;
    5252}
    5353
    54 static void raw_display(caca_t *kk)
     54static void raw_display(caca_display_t *dp)
    5555{
    56     uint32_t *attr = kk->c->attr;
    57     uint32_t *chars = kk->c->chars;
     56    uint32_t *attr = dp->cv->attr;
     57    uint32_t *chars = dp->cv->chars;
    5858    uint32_t w, h;
    5959    unsigned int n;
    6060
    61     w = kk->c->width;
    62     h = kk->c->height;
     61    w = dp->cv->width;
     62    h = dp->cv->height;
    6363
    6464    fprintf(stdout, "CACA%c%c%c%c%c%c%c%c",
     
    6666                    (h >> 24), (h >> 16) & 0xff, (h >> 8) & 0xff, h & 0xff);
    6767
    68     for(n = kk->c->height * kk->c->width; n--; )
     68    for(n = dp->cv->height * dp->cv->width; n--; )
    6969    {
    70         uint32_t c = *chars++;
     70        uint32_t ch = *chars++;
    7171        uint32_t a = *attr++;
    7272
    7373        fprintf(stdout, "%c%c%c%c%c%c%c%c",
    74                 (c >> 24), (c >> 16) & 0xff, (c >> 8) & 0xff, c & 0xff,
     74                (ch >> 24), (ch >> 16) & 0xff, (ch >> 8) & 0xff, ch & 0xff,
    7575                (a >> 24), (a >> 16) & 0xff, (a >> 8) & 0xff, a & 0xff);
    7676    }
     
    8080}
    8181
    82 static void raw_handle_resize(caca_t *kk)
     82static void raw_handle_resize(caca_display_t *dp)
    8383{
    8484    ;
    8585}
    8686
    87 static int raw_get_event(caca_t *kk, caca_event_t *ev)
     87static int raw_get_event(caca_display_t *dp, caca_event_t *ev)
    8888{
    8989    ev->type = CACA_EVENT_NONE;
     
    9595 */
    9696
    97 int raw_install(caca_t *kk)
     97int raw_install(caca_display_t *dp)
    9898{
    99     kk->drv.driver = CACA_DRIVER_RAW;
     99    dp->drv.driver = CACA_DRIVER_RAW;
    100100
    101     kk->drv.init_graphics = raw_init_graphics;
    102     kk->drv.end_graphics = raw_end_graphics;
    103     kk->drv.set_window_title = raw_set_window_title;
    104     kk->drv.get_window_width = raw_get_window_width;
    105     kk->drv.get_window_height = raw_get_window_height;
    106     kk->drv.display = raw_display;
    107     kk->drv.handle_resize = raw_handle_resize;
    108     kk->drv.get_event = raw_get_event;
    109     kk->drv.set_mouse = NULL;
     101    dp->drv.init_graphics = raw_init_graphics;
     102    dp->drv.end_graphics = raw_end_graphics;
     103    dp->drv.set_window_title = raw_set_window_title;
     104    dp->drv.get_window_width = raw_get_window_width;
     105    dp->drv.get_window_height = raw_get_window_height;
     106    dp->drv.display = raw_display;
     107    dp->drv.handle_resize = raw_handle_resize;
     108    dp->drv.get_event = raw_get_event;
     109    dp->drv.set_mouse = NULL;
    110110
    111111    return 0;
Note: See TracChangeset for help on using the changeset viewer.