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 moved

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/ruby/caca-dither.c

    r2820 r2821  
    11/*
    2  *  libcucul Ruby bindings
     2 *  libcaca Ruby bindings
    33 *  Copyright (c) 2007 Pascal Terjan <pterjan@linuxfr.org>
    44 *
     
    1111
    1212#include <ruby.h>
    13 #include <cucul.h>
     13#include <caca.h>
    1414#include <errno.h>
    1515#include "common.h"
     
    1919void dither_free(void *dither)
    2020{
    21     cucul_free_dither((cucul_dither_t *)dither);
     21    caca_free_dither((caca_dither_t *)dither);
    2222}
    2323
     
    3131static VALUE dither_initialize(VALUE self, VALUE bpp, VALUE w, VALUE h, VALUE pitch, VALUE rmask, VALUE gmask, VALUE bmask, VALUE amask)
    3232{
    33     cucul_dither_t *dither;
    34 
    35     dither = cucul_create_dither(NUM2UINT(bpp), NUM2UINT(w), NUM2UINT(h), NUM2UINT(pitch), NUM2ULONG(rmask), NUM2ULONG(gmask), NUM2ULONG(bmask), NUM2ULONG(amask));
     33    caca_dither_t *dither;
     34
     35    dither = caca_create_dither(NUM2UINT(bpp), NUM2UINT(w), NUM2UINT(h), NUM2UINT(pitch), NUM2ULONG(rmask), NUM2ULONG(gmask), NUM2ULONG(bmask), NUM2ULONG(amask));
    3636    if(dither == NULL)
    3737    {
     
    116116    }
    117117
    118     if(cucul_set_dither_palette(_SELF, red, green, blue, alpha)<0)
     118    if(caca_set_dither_palette(_SELF, red, green, blue, alpha)<0)
    119119    {
    120120        free(red);
     
    142142static VALUE set_##x(VALUE self, VALUE x)              \
    143143{                                                       \
    144     if(cucul_set_dither_##x(_SELF, (float)NUM2DBL(x))<0)\
     144    if(caca_set_dither_##x(_SELF, (float)NUM2DBL(x))<0)\
    145145        rb_raise(rb_eRuntimeError, strerror(errno));    \
    146146                                                        \
     
    162162static VALUE set_dither_##x(VALUE self, VALUE x)         \
    163163{                                                        \
    164     if(cucul_set_dither_##x(_SELF, StringValuePtr(x))<0) \
     164    if(caca_set_dither_##x(_SELF, StringValuePtr(x))<0) \
    165165    {                                                    \
    166166        rb_raise(rb_eRuntimeError, strerror(errno));     \
     
    180180get_set_str_from_list(algorithm)
    181181
    182 void Init_cucul_dither(VALUE mCucul)
     182void Init_caca_dither(VALUE mCucul)
    183183{
    184184    cDither = rb_define_class_under(mCucul, "Dither", rb_cObject);
Note: See TracChangeset for help on using the changeset viewer.