Module: Gtk

Extended by:
GLib::Deprecatable
Defined in:
lib/gtk3/box.rb,
lib/gtk3.rb,
lib/gtk3/image.rb,
lib/gtk3/label.rb,
lib/gtk3/paned.rb,
lib/gtk3/stack.rb,
lib/gtk3/stock.rb,
lib/gtk3/table.rb,
lib/gtk3/action.rb,
lib/gtk3/border.rb,
lib/gtk3/button.rb,
lib/gtk3/dialog.rb,
lib/gtk3/loader.rb,
lib/gtk3/widget.rb,
lib/gtk3/window.rb,
lib/gtk3/builder.rb,
lib/gtk3/version.rb,
lib/gtk3/calendar.rb,
lib/gtk3/show-uri.rb,
lib/gtk3/clipboard.rb,
lib/gtk3/combo-box.rb,
lib/gtk3/container.rb,
lib/gtk3/icon-size.rb,
lib/gtk3/icon-view.rb,
lib/gtk3/level-bar.rb,
lib/gtk3/menu-item.rb,
lib/gtk3/text-iter.rb,
lib/gtk3/text-view.rb,
lib/gtk3/tree-iter.rb,
lib/gtk3/tree-path.rb,
lib/gtk3/tree-view.rb,
lib/gtk3/deprecated.rb,
lib/gtk3/icon-theme.rb,
lib/gtk3/list-store.rb,
lib/gtk3/search-bar.rb,
lib/gtk3/stock-item.rb,
lib/gtk3/tree-model.rb,
lib/gtk3/tree-store.rb,
lib/gtk3/ui-manager.rb,
lib/gtk3/binding-set.rb,
lib/gtk3/cell-layout.rb,
lib/gtk3/spin-button.rb,
lib/gtk3/target-list.rb,
lib/gtk3/text-buffer.rb,
lib/gtk3/tool-button.rb,
lib/gtk3/about-dialog.rb,
lib/gtk3/action-group.rb,
lib/gtk3/css-provider.rb,
lib/gtk3/entry-buffer.rb,
lib/gtk3/radio-action.rb,
lib/gtk3/radio-button.rb,
lib/gtk3/scale-button.rb,
lib/gtk3/target-entry.rb,
lib/gtk3/style-context.rb,
lib/gtk3/toggle-action.rb,
lib/gtk3/toggle-button.rb,
lib/gtk3/combo-box-text.rb,
lib/gtk3/message-dialog.rb,
lib/gtk3/selection-data.rb,
lib/gtk3/text-tag-table.rb,
lib/gtk3/tree-selection.rb,
lib/gtk3/check-menu-item.rb,
lib/gtk3/image-menu-item.rb,
lib/gtk3/scrolled-window.rb,
lib/gtk3/style-properties.rb,
lib/gtk3/tree-view-column.rb,
lib/gtk3/tree-model-filter.rb,
lib/gtk3/file-chooser-dialog.rb,
lib/gtk3/font-chooser-dialog.rb,
lib/gtk3/gesture-multi-press.rb,
lib/gtk3/color-chooser-dialog.rb,
lib/gtk3/recent-chooser-dialog.rb

Overview

Copyright © 2015 Ruby-GNOME2 Project Team

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Defined Under Namespace

Modules: CellLayout, Drag, FileChooser, RecentChooser, Stock, TreeModel, Version Classes: AboutDialog, Action, ActionGroup, Alignment, Arrow, Assistant, BindingSet, Border, Box, Builder, Button, ButtonBox, Calendar, CellRenderer, CellRendererAccel, CellView, CheckMenuItem, Clipboard, ColorChooserDialog, ComboBox, ComboBoxText, Container, CssProvider, Dialog, EntryBuffer, Error, FileChooserDialog, FileFilter, FontChooserDialog, GestureMultiPress, HBox, HButtonBox, HPaned, HScale, HScrollbar, HSeparator, IconSet, IconSize, IconTheme, IconView, Image, ImageMenuItem, InitError, Label, LevelBar, LinkButton, ListStore, Loader, MenuBar, MenuItem, MenuShell, MenuToolButton, MessageDialog, Notebook, Paned, PaperSize, PrintOperation, PrintSettings, ProgressBar, RadioAction, RadioButton, Range, RecentAction, RecentChooserDialog, RecentFilter, RecentManager, ScaleButton, ScrolledWindow, SearchBar, SelectionData, SizeGroup, SpinButton, Stack, StockItem, StyleContext, StyleProperties, Table, TargetEntry, TargetList, TextAttributes, TextBuffer, TextIter, TextTag, TextTagTable, TextView, ToggleAction, ToggleButton, ToolButton, Toolbar, Tooltip, TreeIter, TreeModelFilter, TreePath, TreeSelection, TreeStore, TreeView, TreeViewColumn, UIManager, VBox, VButtonBox, VPaned, VScale, VScrollbar, VSeparator, Widget, Window

Constant Summary collapse

LOG_DOMAIN =
"Gtk"

Class Method Summary collapse

Class Method Details

.const_missing(name) ⇒ Object



39
40
41
42
43
44
45
46
# File 'lib/gtk3.rb', line 39

def const_missing(name)
  init()
  if const_defined?(name)
    const_get(name)
  else
    super
  end
end

.init(*argv) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
# File 'lib/gtk3.rb', line 57

def init(*argv)
  class << self
    remove_method(:init)
    remove_method(:const_missing)
    remove_method(:method_missing)
  end
  Gio.init if Gio.respond_to?(:init)
  Gdk.init if Gdk.respond_to?(:init)
  loader = Loader.new(self, argv)
  loader.load("Gtk")
end

.method_missing(name, *args, &block) ⇒ Object



48
49
50
51
52
53
54
55
# File 'lib/gtk3.rb', line 48

def method_missing(name, *args, &block)
  init()
  if respond_to?(name)
    __send__(name, *args, &block)
  else
    super
  end
end

.show_uri(uri_or_options) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/gtk3/show-uri.rb', line 20

def show_uri(uri_or_options)
  if uri_or_options.is_a?(String)
    options = {:uri => uri_or_options}
  else
    options = uri_or_options
  end

  screen    = options[:screen]
  uri       = options[:uri]
  timestamp = options[:timestamp] || Gdk::CURRENT_TIME

  show_uri_raw(screen, uri, timestamp)
end

.show_uri_rawObject



19
# File 'lib/gtk3/show-uri.rb', line 19

alias_method :show_uri_raw, :show_uri