Sha256: 7289d6c654298e79583db778718df58a6d0614244adff18d6de30898e4a9f05b

Contents?: true

Size: 924 Bytes

Versions: 7

Compression:

Stored size: 924 Bytes

Contents

# frozen_string_literal: true

Gtk.load_class :MessageDialog

module Gtk
  # Add non-introspected function to Gtk::Lib
  module Lib
    attach_function :gtk_message_dialog_new, [:pointer,
                                              Gtk::DialogFlags,
                                              Gtk::MessageType,
                                              Gtk::ButtonsType,
                                              :string,
                                              :varargs], :pointer
  end

  # Overrides for GtkMessageDialog
  class MessageDialog
    alias old_initialize initialize

    def initialize(parent, flags, type, buttons, message)
      ptr = Gtk::Lib.gtk_message_dialog_new(parent, flags, type, buttons,
                                            '%s',
                                            :string, message)
      store_pointer(ptr)
    end

    remove_method :old_initialize
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gir_ffi-gtk-0.15.0 lib/gir_ffi-gtk/message_dialog.rb
gir_ffi-gtk-0.14.1 lib/gir_ffi-gtk/message_dialog.rb
gir_ffi-gtk-0.14.0 lib/gir_ffi-gtk/message_dialog.rb
gir_ffi-gtk-0.13.1 lib/gir_ffi-gtk/message_dialog.rb
gir_ffi-gtk-0.13.0 lib/gir_ffi-gtk/message_dialog.rb
gir_ffi-gtk-0.12.1 lib/gir_ffi-gtk/message_dialog.rb
gir_ffi-gtk-0.12.0 lib/gir_ffi-gtk/message_dialog.rb