Sha256: 5a456198d3a7d8b2cbf66af45dd585dd9a496702d3245a71910329ea57187305

Contents?: true

Size: 1.1 KB

Versions: 12

Compression:

Stored size: 1.1 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(VALUE self, VALUE width, VALUE height, VALUE 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(VALUE self, VALUE 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

12 entries across 12 versions & 1 rubygems

Version Path
gdk_pixbuf2-1.0.3-x86-mingw32 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-1.0.3 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-1.0.2-x86-mingw32 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-1.0.2 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-1.0.1 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-1.0.1-x86-mingw32 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-1.0.0-x86-mingw32 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-1.0.0 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.9 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.9-x86-mingw32 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.8-x86-mingw32 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
gdk_pixbuf2-0.90.8 ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c