Sha256: 410d3ff6e24db14c0395923b6cf5d7478b077b1c4152029faed1b11a3b0d447a

Contents?: true

Size: 1.13 KB

Versions: 14

Compression:

Stored size: 1.13 KB

Contents

/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
/************************************************

  rbgdk-pixbufanimation.c -

  $Author: ggc $
  $Date: 2005/09/23 22:02:07 $

  Copyright (C) 2002,2003 the ruby-gnome2 project
************************************************/
#include "rbgdk-pixbuf.h"

#if RBGDK_PIXBUF_CHECK_VERSION(2,8,0)
#define _SELF(s) (GDK_PIXBUF_SIMPLE_ANIM(RVAL2GOBJ(s)))

static VALUE
simpleanim_initialize(self, width, height, rate)
    VALUE self, width, height, rate;
{
    GdkPixbufSimpleAnim* ret = gdk_pixbuf_simple_anim_new(NUM2INT(width), NUM2INT(height), NUM2DBL(rate));
    G_INITIALIZE(self, ret);
    return Qnil;
}

static VALUE
simpleanim_add_frame(self, pixbuf)
    VALUE self, pixbuf;
{
    gdk_pixbuf_simple_anim_add_frame(_SELF(self), RVAL2GOBJ(pixbuf));
    return self;
}
#endif

void
Init_gdk_pixbuf_simpleanim(VALUE mGdk)
{
#if RBGDK_PIXBUF_CHECK_VERSION(2,8,0)
    VALUE anim = G_DEF_CLASS(GDK_TYPE_PIXBUF_SIMPLE_ANIM, "PixbufSimpleAnim", mGdk);    

    rb_define_method(anim, "initialize", simpleanim_initialize, 3);
    rb_define_method(anim, "add_frame", simpleanim_add_frame, 1);
#endif
}

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
gdk_pixbuf2-0.90.7-x86-mingw32 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.7 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.6 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.6-x86-mingw32 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.5 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.5-x86-mingw32 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.4 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.4-x86-mingw32 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.3 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.3-x86-mingw32 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.2-x86-mingw32 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.2 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdkpixbuf-0.20.1 rbgdk-pixbufsimpleanim.c
gdkpixbuf-0.20.0 rbgdk-pixbufsimpleanim.c