Changeset 899


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
Files:
3 edited
6 copied

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/Makefile.am

    r858 r899  
    11# $Id$
    22
    3 SUBDIRS = kernel cucul caca src test tools cpp doc
     3SUBDIRS = kernel cucul caca src test tools cxx doc
    44DIST_SUBDIRS = $(SUBDIRS) autotools debian msvc
    55
  • libcaca/trunk/configure.ac

    r870 r899  
    5555
    5656dnl language bindings
    57 AC_ARG_ENABLE(cpp,
    58   [  --enable-cpp            C++ bindings (default disabled)])
     57AC_ARG_ENABLE(cxx,
     58  [  --enable-cxx            C++ bindings (default disabled)])
    5959
    6060dnl example programs features
     
    248248
    249249# Build the C++ bindings?
    250 ac_cv_my_have_cpp="no"
    251 if test "${enable_cpp}" = "yes"; then
    252   ac_cv_my_have_cpp="yes"
    253 fi
    254 AM_CONDITIONAL(USE_CPP, test "${ac_cv_my_have_cpp}" = "yes")
     250ac_cv_my_have_cxx="no"
     251if test "${enable_cxx}" = "yes"; then
     252  ac_cv_my_have_cxx="yes"
     253fi
     254AM_CONDITIONAL(USE_CXX, test "${ac_cv_my_have_cxx}" = "yes")
    255255
    256256# Build cacaserver?
     
    317317  test/Makefile
    318318  tools/Makefile
    319   cpp/Makefile
     319  cxx/Makefile
    320320  doc/Makefile
    321321  autotools/Makefile
  • 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.