Module: GtkApp
- Defined in:
- lib/gtk_app.rb,
lib/gtk_app/view.rb,
lib/gtk_app/model.rb,
lib/gtk_app/config.rb,
lib/gtk_app/dialog.rb,
lib/gtk_app/drawer.rb,
lib/gtk_app/helpers.rb,
lib/gtk_app/partial.rb,
lib/gtk_app/version.rb,
lib/gtk_app/observer.rb,
lib/gtk_app/controller.rb,
lib/gtk_app/application.rb,
lib/gtk_app/text_buffer.rb,
lib/gtk_app/list_control.rb,
lib/gtk_app/view_helpers.rb,
lib/gtk_app/dialog/notify.rb,
lib/gtk_app/signal_support.rb,
lib/gtk_app/widget_observer.rb,
lib/gtk_app/callback_support.rb,
lib/gtk_app/register_support.rb
Defined Under Namespace
Modules: Application, CallbackSupport, Dialog, Helpers, ListControlSupport, RegisterSupport, SignalSupport, ViewHelpers Classes: Config, Controller, Drawer, Model, Observer, Partial, TextBuffer, View, WidgetObserver
Constant Summary collapse
- Version =
VERSION = '0.2.0'
Class Method Summary collapse
-
.add_timeout(time_in_milliseconds, controller, callback) ⇒ Object
Establish a controller method to be invoked at regular intervals.
-
.quit ⇒ Object
Stop the main Gtk loop.
-
.refresh ⇒ Object
Run a single iteration of the main loop while there are pending events without blocking.
-
.run ⇒ Object
Start the main Gtk loop.
Class Method Details
.add_timeout(time_in_milliseconds, controller, callback) ⇒ Object
Establish a controller method to be invoked at regular intervals.
38 39 40 |
# File 'lib/gtk_app.rb', line 38 def self.add_timeout(time_in_milliseconds, controller, callback) GLib::Timeout.add(time_in_milliseconds){ controller.method(:"#{callback}") } end |
.quit ⇒ Object
Stop the main Gtk loop.
24 25 26 |
# File 'lib/gtk_app.rb', line 24 def self.quit Gtk::main_quit end |
.refresh ⇒ Object
Run a single iteration of the main loop while there are pending events without blocking.
30 31 32 |
# File 'lib/gtk_app.rb', line 30 def self.refresh Gtk::main_iteration_do(false) while Gtk::events_pending? end |
.run ⇒ Object
Start the main Gtk loop.
19 20 21 |
# File 'lib/gtk_app.rb', line 19 def self.run Gtk::main end |