Ignore:
Timestamp:
Oct 31, 2006, 3:04:22 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Got rid of cucul_ansi_to_str(), it's really useless.
  • Partial update of the C++ bindings.
  • Updated documentation.
Location:
libcaca/trunk/cxx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cxx/cucul++.cpp

    r1156 r1269  
    8888}
    8989
    90 void Cucul::setColor(unsigned int f, unsigned int b)
    91 {
    92     cucul_set_color(cv, f, b);
    93 }
    94 
    95 int  Cucul::setTruecolor(unsigned int f, unsigned int b)
    96 {
    97     return cucul_set_truecolor(cv, f, b);
    98 }
    99 
    100 char const * Cucul::getColorName(unsigned int color)
    101 {
    102     return cucul_get_color_name(color);
     90int Cucul::setColorANSI(unsigned char f, unsigned char b)
     91{
     92    return cucul_set_color_ansi(cv, f, b);
     93}
     94
     95int  Cucul::setColorARGB(unsigned int f, unsigned int b)
     96{
     97    return cucul_set_color_argb(cv, f, b);
    10398}
    10499
     
    236231}
    237232
    238 unsigned long int Cucul::getColor(int x, int y)
    239 {
    240     return cucul_get_color(cv, x, y);
     233int Cucul::setAttr(unsigned long int attr)
     234{
     235    return cucul_set_attr(cv, attr);
     236}
     237
     238unsigned long int Cucul::getAttr(int x, int y)
     239{
     240    return cucul_get_attr(cv, x, y);
    241241}
    242242
  • libcaca/trunk/cxx/cucul++.h

    r1203 r1269  
    121121    unsigned int getWidth(void);
    122122    unsigned int getHeight(void);
    123     void setColor(unsigned int f, unsigned int b);
    124     int  setTruecolor(unsigned int f, unsigned int b);
    125     unsigned long int getColor(int, int);
    126     char const * getColorName(unsigned int color);
     123    unsigned long int getAttr(int, int);
     124    int setAttr(unsigned long int);
     125    int setColorANSI(unsigned char f, unsigned char b);
     126    int setColorARGB(unsigned int f, unsigned int b);
    127127    void Printf(int x , int y , char const * format,...);
    128128    void putChar(int x, int y, char ch);
  • libcaca/trunk/cxx/cxxtest.cpp

    r1268 r1269  
    44 *                All Rights Reserved
    55 *
    6  *  $Id$
     6 *  $Id: cpptest.cpp 784 2006-06-10 11:35:18Z jylam $
    77 *
    88 *  This program is free software; you can redistribute it and/or
     
    7373
    7474        /* Draw pig */
    75         qq->setColor(CUCUL_LIGHTMAGENTA, CUCUL_BLACK);
     75        qq->setColorANSI(CUCUL_LIGHTMAGENTA, CUCUL_BLACK);
    7676
    7777        for(int i = 0; pig[i]; i++)
     
    7979
    8080        /* printf works */
    81         qq->setColor(CUCUL_LIGHTBLUE, CUCUL_BLACK);
     81        qq->setColorANSI(CUCUL_LIGHTBLUE, CUCUL_BLACK);
    8282        qq->Printf(30,15, "Powered by libcaca %s", VERSION);
    8383
Note: See TracChangeset for help on using the changeset viewer.