# File gtk/sample/gtk-demo/pixbufs.rb, line 40
    def initialize
      super('Pixbufs')
      set_resizable(false)

      @background = nil
      @frame = nil
      @frame_num = 0
      @images = []

      begin
        load_pixbufs

        set_size_request(@background.width, @background.height)

        @frame = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB,
                                 false, 8,
                                 @background.width, @background.height)

        @da = Gtk::DrawingArea.new

        @da.signal_connect('expose_event') do |w, e|
          expose_cb(w, e)
        end

        add(@da)

        timeout_id = Gtk.timeout_add(FRAME_DELAY) do
          timeout
        end
        signal_connect('destroy') do
          Gtk.timeout_remove(timeout_id)
        end
      rescue
        dialog = Gtk::MessageDialog.new(self,
                                        Gtk::Dialog::DESTROY_WITH_PARENT,
                                        Gtk::MessageDialog::ERROR,
                                        Gtk::MessageDialog::BUTTONS_CLOSE,
                                        "Failed to load an image: #{$!.message}")

        dialog.signal_connect('response') do
          dialog.destroy
        end

        dialog.show
      end
    end