Changeset 899 for libcaca/trunk/cxx


Ignore:
Timestamp:
Apr 26, 2006, 2:11:55 PM (14 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Updated C++ bindings and renamed directory to more comprehensive cxx
Location:
libcaca/trunk/cxx
Files:
1 edited
6 copied

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cxx/Makefile.am

    r837 r899  
    33AM_CPPFLAGS = -I$(top_srcdir)/cucul -I$(top_srcdir)/caca
    44
    5 if USE_CPP
     5if USE_CXX
    66include_HEADERS = cucul++.h caca++.h
    77lib_LTLIBRARIES = libcucul++.la libcaca++.la
     
    1616libcaca___la_LIBADD = ../caca/libcaca.la
    1717
    18 if USE_CPP
     18if USE_CXX
    1919noinst_PROGRAMS = cpptest
    2020endif
  • libcaca/trunk/cxx/cucul++.cpp

    r897 r899  
    3737}
    3838
    39 Cucul::Cucul(void const *data, unsigned int size, char const *format)
    40 {
    41     cv = cucul_import_canvas(data, size, format);
     39Cucul::Cucul(Buffer *b, char const *format)
     40{
     41    cv = cucul_import_canvas(b->get_buffer(), format);
    4242    if(!cv) throw -1;
    4343}
     
    332332    return cucul_get_export_list();
    333333}
     334
     335cucul_buffer *Buffer::get_buffer(void)
     336{
     337    return buffer;
     338}
  • libcaca/trunk/cxx/cucul++.h

    r897 r899  
    7373class Buffer
    7474{
     75    friend class Cucul;
    7576 public:
    7677    Buffer(Cucul *cv, char const *);
    7778    ~Buffer();
    7879    char const *const * getExportList(void);
     80
     81 protected:
     82    cucul_buffer *get_buffer();
    7983
    8084 private:
     
    9296    Cucul();
    9397    Cucul(int width, int height);
    94     Cucul(void const *, unsigned int, char const *);
     98    Cucul(Buffer *, char const *);
    9599    ~Cucul();
    96100
Note: See TracChangeset for help on using the changeset viewer.