gtk3 2.2.5-x86-mingw32 → 3.0.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -0
- data/ext/gtk3/depend +0 -5
- data/ext/gtk3/extconf.rb +43 -53
- data/ext/gtk3/rb-gtk3-container.c +159 -0
- data/ext/gtk3/{rbgtk3util.h → rb-gtk3-private.h} +9 -9
- data/ext/gtk3/rb-gtk3-widget.c +71 -0
- data/ext/gtk3/rb-gtk3.c +407 -0
- data/ext/gtk3/{rbgtk-orientable.c → rb-gtk3.h} +10 -7
- data/extconf.rb +25 -9
- data/lib/2.0/gtk3.so +0 -0
- data/lib/2.1/gtk3.so +0 -0
- data/lib/2.2/gtk3.so +0 -0
- data/lib/gtk3.rb +70 -9
- data/lib/gtk3/about-dialog.rb +34 -0
- data/lib/gtk3/action-group.rb +131 -0
- data/lib/gtk3/action.rb +27 -0
- data/lib/gtk3/binding-set.rb +31 -0
- data/lib/gtk3/border.rb +28 -0
- data/lib/gtk3/box.rb +40 -0
- data/lib/gtk3/builder.rb +91 -0
- data/lib/gtk3/button.rb +53 -0
- data/lib/gtk3/calendar.rb +24 -0
- data/lib/gtk3/cell-layout.rb +31 -0
- data/{test/test_gtk_accel_group_entry.rb → lib/gtk3/clipboard.rb} +8 -7
- data/lib/gtk3/color-chooser-dialog.rb +27 -0
- data/lib/gtk3/combo-box-text.rb +30 -0
- data/lib/gtk3/combo-box.rb +55 -0
- data/lib/gtk3/container.rb +51 -0
- data/lib/gtk3/css-provider.rb +38 -0
- data/lib/gtk3/deprecated.rb +193 -99
- data/lib/gtk3/dialog.rb +65 -0
- data/lib/gtk3/file-chooser-dialog.rb +36 -0
- data/lib/gtk3/font-chooser-dialog.rb +27 -0
- data/lib/gtk3/gdk-drag-context.rb +29 -0
- data/lib/gtk3/gesture-multi-press.rb +31 -0
- data/lib/gtk3/icon-theme.rb +28 -0
- data/lib/gtk3/icon-view.rb +45 -0
- data/lib/gtk3/image.rb +113 -0
- data/lib/gtk3/label.rb +54 -0
- data/{test/test_gtk_tree_selection.rb → lib/gtk3/level-bar.rb} +13 -12
- data/lib/gtk3/list-store.rb +81 -0
- data/lib/gtk3/loader.rb +403 -0
- data/lib/gtk3/menu-item.rb +33 -0
- data/lib/gtk3/message-dialog.rb +49 -0
- data/lib/gtk3/paned.rb +37 -0
- data/lib/gtk3/radio-action.rb +28 -0
- data/lib/gtk3/radio-button.rb +49 -0
- data/lib/gtk3/recent-chooser-dialog.rb +38 -0
- data/lib/gtk3/scale-button.rb +35 -0
- data/{test/test_gtk_allocation.rb → lib/gtk3/scrolled-window.rb} +7 -7
- data/lib/gtk3/search-bar.rb +27 -0
- data/lib/gtk3/selection-data.rb +42 -0
- data/lib/gtk3/spin-button.rb +34 -0
- data/lib/gtk3/stack.rb +54 -0
- data/lib/gtk3/stock.rb +70 -0
- data/lib/gtk3/style-context.rb +26 -0
- data/lib/gtk3/style-properties.rb +29 -0
- data/lib/gtk3/target-entry.rb +27 -0
- data/lib/gtk3/target-list.rb +31 -0
- data/lib/gtk3/text-buffer.rb +165 -0
- data/lib/gtk3/text-iter.rb +39 -0
- data/lib/gtk3/text-tag-table.rb +31 -0
- data/lib/gtk3/toggle-action.rb +27 -0
- data/lib/gtk3/toggle-button.rb +35 -0
- data/lib/gtk3/tool-button.rb +36 -0
- data/lib/gtk3/tree-iter.rb +52 -0
- data/lib/gtk3/tree-model-filter.rb +45 -0
- data/lib/gtk3/tree-model.rb +51 -0
- data/lib/gtk3/tree-path.rb +29 -0
- data/lib/gtk3/tree-selection.rb +30 -0
- data/lib/gtk3/tree-store.rb +59 -0
- data/lib/gtk3/tree-view-column.rb +35 -0
- data/lib/gtk3/tree-view.rb +41 -0
- data/lib/gtk3/ui-manager.rb +35 -0
- data/lib/gtk3/version.rb +28 -0
- data/lib/gtk3/widget.rb +127 -0
- data/lib/gtk3/window.rb +29 -0
- data/sample/gtk-demo/TODO +69 -0
- data/sample/gtk-demo/application.ui +107 -0
- data/sample/gtk-demo/builder.rb +2 -2
- data/sample/gtk-demo/{button_box.rb → button-box.rb} +16 -17
- data/sample/gtk-demo/common.rb +1 -1
- data/sample/gtk-demo/css_accordion.rb +5 -5
- data/sample/gtk-demo/css_basics.css +22 -0
- data/sample/gtk-demo/css_basics.rb +103 -0
- data/sample/gtk-demo/dialog.rb +3 -3
- data/sample/gtk-demo/entry_completion.rb +1 -1
- data/sample/gtk-demo/hypertext.rb +1 -1
- data/sample/gtk-demo/main.rb +65 -91
- data/sample/gtk-demo/menus.rb +4 -4
- data/sample/gtk-demo/menus.ui +107 -0
- data/sample/gtk-demo/sizegroup.rb +1 -1
- data/sample/misc/aboutdialog.rb +10 -18
- data/sample/misc/aboutdialog2.rb +4 -16
- data/sample/misc/alpha-demo.rb +17 -16
- data/sample/misc/application.rb +31 -0
- data/sample/misc/assistant.rb +3 -5
- data/sample/misc/bindings.rb +64 -50
- data/sample/misc/builder-from-resource.rb +53 -0
- data/sample/misc/builder.rb +29 -0
- data/sample/misc/builder.ui +46 -0
- data/sample/misc/button.rb +18 -19
- data/sample/misc/button2.rb +5 -5
- data/sample/misc/buttonbox.rb +2 -4
- data/sample/misc/cairo-cursor.rb +37 -0
- data/sample/misc/cairo-pong.rb +17 -17
- data/sample/misc/calendar.rb +18 -18
- data/sample/misc/checkbutton.rb +3 -4
- data/sample/misc/colorselection.rb +10 -9
- data/sample/misc/{combo_check.rb → combo-check.rb} +1 -3
- data/sample/misc/combobox-from-cellrender.rb +48 -0
- data/sample/misc/combobox.rb +10 -10
- data/sample/misc/cursor.rb +5 -5
- data/sample/misc/dialog.rb +3 -4
- data/sample/misc/dialog2.rb +5 -6
- data/sample/misc/dnd.rb +27 -23
- data/sample/misc/dndtreeview.rb +16 -18
- data/sample/misc/drag-move.rb +3 -6
- data/sample/misc/drawing.rb +74 -86
- data/sample/misc/entry.rb +2 -4
- data/sample/misc/entrycompletion.rb +5 -5
- data/sample/misc/eventbox.rb +58 -0
- data/sample/misc/expander.rb +6 -5
- data/sample/misc/filechooser.rb +5 -7
- data/sample/misc/flowbox.rb +86 -0
- data/sample/misc/frame.rb +10 -12
- data/sample/misc/gdkscreen.rb +3 -3
- data/sample/misc/gtkglarea1.rb +114 -0
- data/sample/misc/gtkglarea2.rb +194 -0
- data/sample/misc/helloworld.rb +2 -5
- data/sample/misc/iconview.rb +9 -9
- data/sample/misc/image.rb +7 -6
- data/sample/misc/keyboard-grab.rb +34 -0
- data/sample/misc/label.rb +10 -11
- data/sample/misc/linkbutton.rb +3 -10
- data/sample/misc/list-store-usage.rb +96 -0
- data/sample/misc/listview.rb +9 -11
- data/sample/misc/menu.rb +45 -25
- data/sample/misc/{misc_button.rb → misc-button.rb} +15 -14
- data/sample/misc/mouse-gesture.rb +35 -42
- data/sample/misc/pango-layout.rb +100 -0
- data/sample/misc/pointer-grab.rb +36 -0
- data/sample/misc/print.rb +202 -201
- data/sample/misc/properties.rb +16 -14
- data/sample/misc/radiobutton.rb +18 -20
- data/sample/misc/recentchooserdialog.rb +8 -10
- data/sample/misc/rgtk+cairo.rb +26 -27
- data/sample/misc/scalebutton.rb +19 -7
- data/sample/misc/simple_window.gresource.xml +6 -0
- data/sample/misc/simple_window.ui +16 -0
- data/sample/misc/statusicon.rb +11 -14
- data/sample/misc/stock.rb +14 -11
- data/sample/misc/style-property.rb +76 -0
- data/sample/misc/t-gtkplug.rb +11 -14
- data/sample/misc/t-gtksocket.rb +19 -18
- data/sample/misc/template-from-resource.rb +59 -0
- data/sample/misc/template.gresource.xml +6 -0
- data/sample/misc/template.ui +16 -0
- data/sample/misc/textbuffer-serialize.rb +133 -0
- data/sample/misc/threads.rb +54 -13
- data/sample/misc/to-drawable.rb +34 -0
- data/sample/misc/togglebutton.rb +6 -8
- data/sample/misc/toolbar.rb +39 -30
- data/sample/misc/tooltips.rb +95 -104
- data/sample/misc/{tree_combo.rb → tree-combo.rb} +21 -27
- data/sample/misc/{tree_progress.rb → tree-progress.rb} +12 -17
- data/sample/misc/treemodelfilter.rb +13 -10
- data/sample/misc/treeview.rb +18 -20
- data/sample/misc/window.rb +2 -4
- data/sample/misc/xbm-cursor.rb +86 -0
- data/sample/tutorial/README.md +338 -0
- data/sample/tutorial/builder.ui +66 -0
- data/sample/tutorial/example-0.rb +32 -0
- data/sample/tutorial/example-1.rb +47 -0
- data/sample/tutorial/example-2.rb +68 -0
- data/sample/tutorial/example-4.rb +41 -0
- data/sample/tutorial/exampleapp.desktop +6 -0
- data/sample/tutorial/exampleapp.png +0 -0
- data/sample/tutorial/exampleapp1/exampleapp.rb +57 -0
- data/sample/tutorial/exampleapp2/exampleapp.gresource.xml +6 -0
- data/sample/tutorial/exampleapp2/exampleapp.rb +87 -0
- data/sample/tutorial/exampleapp2/window.ui +32 -0
- data/sample/tutorial/exampleapp3/exampleapp.gresource.xml +6 -0
- data/sample/tutorial/exampleapp3/exampleapp.rb +106 -0
- data/sample/tutorial/exampleapp3/window.ui +32 -0
- data/sample/tutorial/exampleapp4/app-menu.ui +18 -0
- data/sample/tutorial/exampleapp4/exampleapp.gresource.xml +7 -0
- data/sample/tutorial/exampleapp4/exampleapp.rb +124 -0
- data/sample/tutorial/exampleapp4/window.ui +32 -0
- data/sample/tutorial/exampleapp5/app-menu.ui +18 -0
- data/sample/tutorial/exampleapp5/exampleapp.gresource.xml +7 -0
- data/sample/tutorial/exampleapp5/exampleapp.rb +135 -0
- data/sample/tutorial/exampleapp5/org.gtk.exampleapp.gschema.xml +20 -0
- data/sample/tutorial/exampleapp5/window.ui +32 -0
- data/sample/tutorial/exampleapp6/app-menu.ui +18 -0
- data/sample/tutorial/exampleapp6/exampleapp.gresource.xml +8 -0
- data/sample/tutorial/exampleapp6/exampleapp.rb +168 -0
- data/sample/tutorial/exampleapp6/org.gtk.exampleapp.gschema.xml +20 -0
- data/sample/tutorial/exampleapp6/prefs.ui +70 -0
- data/sample/tutorial/exampleapp6/window.ui +32 -0
- data/sample/tutorial/exampleapp7/app-menu.ui +18 -0
- data/sample/tutorial/exampleapp7/exampleapp.gresource.xml +8 -0
- data/sample/tutorial/exampleapp7/exampleapp.rb +200 -0
- data/sample/tutorial/exampleapp7/org.gtk.exampleapp.gschema.xml +20 -0
- data/sample/tutorial/exampleapp7/prefs.ui +70 -0
- data/sample/tutorial/exampleapp7/window.ui +63 -0
- data/sample/tutorial/exampleapp8/app-menu.ui +18 -0
- data/sample/tutorial/exampleapp8/exampleapp.gresource.xml +9 -0
- data/sample/tutorial/exampleapp8/exampleapp.rb +247 -0
- data/sample/tutorial/exampleapp8/gears-menu.ui +12 -0
- data/sample/tutorial/exampleapp8/org.gtk.exampleapp.gschema.xml +25 -0
- data/sample/tutorial/exampleapp8/prefs.ui +70 -0
- data/sample/tutorial/exampleapp8/window.ui +100 -0
- data/test/fixture/Rakefile +32 -0
- data/test/fixture/gnome-logo-icon.png +0 -0
- data/test/fixture/image.gresource +0 -0
- data/test/fixture/image.gresource.xml +6 -0
- data/test/fixture/simple_window.gresource.xml +6 -0
- data/test/fixture/simple_window.ui +16 -0
- data/test/gtk-test-utils.rb +46 -4
- data/test/run-test.rb +9 -1
- data/test/{test_gc.rb → test-gc.rb} +0 -0
- data/test/{test_gtk_css_provider.rb → test-gdk-display.rb} +6 -8
- data/test/test-gdk-event.rb +24 -0
- data/test/test-gdk-screen.rb +42 -0
- data/test/{test_gtk_about_dialog.rb → test-gtk-about-dialog.rb} +0 -0
- data/test/test-gtk-accel-group.rb +23 -0
- data/test/{test_gtk_accel_key.rb → test-gtk-accel-key.rb} +0 -0
- data/test/{test_gtk_accessible.rb → test-gtk-accessible.rb} +0 -0
- data/test/{test_gtk_action_group.rb → test-gtk-action-bar.rb} +20 -23
- data/test/test-gtk-action-group.rb +48 -0
- data/test/test-gtk-action.rb +41 -0
- data/test/test-gtk-assistant.rb +44 -0
- data/test/{test_gtk_border.rb → test-gtk-border.rb} +0 -0
- data/test/test-gtk-box.rb +28 -0
- data/test/{test_gtk_buildable.rb → test-gtk-buildable.rb} +6 -6
- data/test/{test_gtk_builder.rb → test-gtk-builder.rb} +45 -11
- data/test/test-gtk-button.rb +54 -0
- data/test/test-gtk-cell-layout.rb +35 -0
- data/test/test-gtk-color-chooser-dialog.rb +41 -0
- data/test/test-gtk-combo-box-text.rb +34 -0
- data/test/test-gtk-combo-box.rb +97 -0
- data/test/test-gtk-container.rb +171 -0
- data/test/test-gtk-css-provider.rb +101 -0
- data/test/test-gtk-dialog.rb +74 -0
- data/test/{test_gtk_entry.rb → test-gtk-entry.rb} +0 -0
- data/test/test-gtk-event-controller.rb +35 -0
- data/test/test-gtk-file-chooser-dialog.rb +52 -0
- data/test/test-gtk-flow-box.rb +64 -0
- data/test/test-gtk-font-chooser-dialog.rb +41 -0
- data/test/test-gtk-gesture-multi-press.rb +31 -0
- data/test/test-gtk-gesture-pan.rb +32 -0
- data/test/test-gtk-gesture-single.rb +40 -0
- data/test/test-gtk-gesture.rb +29 -0
- data/test/{test_gtk_header_bar.rb → test-gtk-header-bar.rb} +15 -1
- data/test/{test_gtk_icon_theme.rb → test-gtk-icon-theme.rb} +0 -0
- data/test/{test_gtk_icon_view.rb → test-gtk-icon-view.rb} +24 -3
- data/test/test-gtk-image.rb +52 -0
- data/test/test-gtk-label.rb +39 -0
- data/test/{test_gtk_level_bar.rb → test-gtk-level-bar.rb} +12 -0
- data/test/test-gtk-list-store.rb +204 -0
- data/test/{test_gtk_menu_button.rb → test-gtk-menu-button.rb} +0 -0
- data/test/{test_gtk_menu_item.rb → test-gtk-menu-item.rb} +0 -0
- data/test/test-gtk-message-dialog.rb +62 -0
- data/test/test-gtk-paned.rb +109 -0
- data/test/test-gtk-places-sidebar.rb +68 -0
- data/test/test-gtk-radio-action.rb +45 -0
- data/test/test-gtk-radio-button.rb +82 -0
- data/test/test-gtk-recent-chooser-dialog.rb +53 -0
- data/test/{test_gtk_recent_data.rb → test-gtk-recent-data.rb} +0 -0
- data/test/{test_gtk_recent_filter_info.rb → test-gtk-recent-filter-info.rb} +1 -1
- data/test/test-gtk-recent-info.rb +37 -0
- data/test/{test_gtk_revealer.rb → test-gtk-revealer.rb} +0 -0
- data/test/test-gtk-scale-button.rb +56 -0
- data/test/{test_gtk_search_bar.rb → test-gtk-search-bar.rb} +1 -1
- data/test/{test_gtk_search_entry.rb → test-gtk-search-entry.rb} +0 -0
- data/test/test-gtk-spin-button.rb +45 -0
- data/test/{test_gtk_stack_switcher.rb → test-gtk-stack-switcher.rb} +0 -0
- data/test/{test_gtk_stack.rb → test-gtk-stack.rb} +8 -1
- data/test/test-gtk-stock.rb +26 -0
- data/test/{test_gtk_style_context.rb → test-gtk-style-context.rb} +0 -0
- data/test/{test_gtk_style_properties.rb → test-gtk-style-properties.rb} +0 -0
- data/test/test-gtk-style-provider.rb +25 -0
- data/test/test-gtk-switch.rb +34 -0
- data/test/test-gtk-target-entry.rb +37 -0
- data/test/test-gtk-text-buffer.rb +151 -0
- data/test/{test_gtk_container.rb → test-gtk-text-tag-table.rb} +13 -11
- data/test/test-gtk-toggle-action.rb +41 -0
- data/test/test-gtk-toggle-button.rb +39 -0
- data/test/test-gtk-tool-button.rb +53 -0
- data/test/test-gtk-tree-iter.rb +53 -0
- data/test/test-gtk-tree-model-filter.rb +55 -0
- data/test/test-gtk-tree-path.rb +42 -0
- data/test/test-gtk-tree-selection.rb +61 -0
- data/test/test-gtk-tree-view-column.rb +71 -0
- data/test/test-gtk-tree-view.rb +105 -0
- data/test/test-gtk-version.rb +47 -0
- data/test/test-gtk-widget.rb +148 -0
- data/test/{test_gtk.rb → test-gtk.rb} +0 -0
- metadata +256 -332
- data/ext/gtk3/conversions.c +0 -34
- data/ext/gtk3/gtk3.def +0 -10
- data/ext/gtk3/init.c +0 -34
- data/ext/gtk3/rbgtk-about-dialog.c +0 -113
- data/ext/gtk3/rbgtk-accel-group-entry.c +0 -94
- data/ext/gtk3/rbgtk-accel-group.c +0 -199
- data/ext/gtk3/rbgtk-accel-key.c +0 -120
- data/ext/gtk3/rbgtk-accel-label.c +0 -55
- data/ext/gtk3/rbgtk-accel-map.c +0 -135
- data/ext/gtk3/rbgtk-accelerator.c +0 -78
- data/ext/gtk3/rbgtk-accessible.c +0 -40
- data/ext/gtk3/rbgtk-action-bar.c +0 -73
- data/ext/gtk3/rbgtk-action-group.c +0 -467
- data/ext/gtk3/rbgtk-action.c +0 -205
- data/ext/gtk3/rbgtk-activatable.c +0 -30
- data/ext/gtk3/rbgtk-adjustment.c +0 -98
- data/ext/gtk3/rbgtk-alignment.c +0 -75
- data/ext/gtk3/rbgtk-allocation.c +0 -166
- data/ext/gtk3/rbgtk-app-chooser-button.c +0 -70
- data/ext/gtk3/rbgtk-app-chooser-dialog.c +0 -68
- data/ext/gtk3/rbgtk-app-chooser-widget.c +0 -40
- data/ext/gtk3/rbgtk-app-chooser.c +0 -47
- data/ext/gtk3/rbgtk-application.c +0 -69
- data/ext/gtk3/rbgtk-arrow.c +0 -56
- data/ext/gtk3/rbgtk-aspect-frame.c +0 -56
- data/ext/gtk3/rbgtk-assistant.c +0 -218
- data/ext/gtk3/rbgtk-bin.c +0 -42
- data/ext/gtk3/rbgtk-binding-set.c +0 -154
- data/ext/gtk3/rbgtk-border.c +0 -119
- data/ext/gtk3/rbgtk-box.c +0 -146
- data/ext/gtk3/rbgtk-buildable.c +0 -96
- data/ext/gtk3/rbgtk-builder.c +0 -166
- data/ext/gtk3/rbgtk-button-box.c +0 -87
- data/ext/gtk3/rbgtk-button.c +0 -93
- data/ext/gtk3/rbgtk-calendar.c +0 -118
- data/ext/gtk3/rbgtk-cell-editable.c +0 -57
- data/ext/gtk3/rbgtk-cell-layout.c +0 -144
- data/ext/gtk3/rbgtk-cell-renderer-accel.c +0 -41
- data/ext/gtk3/rbgtk-cell-renderer-combo.c +0 -38
- data/ext/gtk3/rbgtk-cell-renderer-pixbuf.c +0 -41
- data/ext/gtk3/rbgtk-cell-renderer-progress.c +0 -38
- data/ext/gtk3/rbgtk-cell-renderer-spin.c +0 -39
- data/ext/gtk3/rbgtk-cell-renderer-spinner.c +0 -38
- data/ext/gtk3/rbgtk-cell-renderer-text.c +0 -48
- data/ext/gtk3/rbgtk-cell-renderer-toggle.c +0 -39
- data/ext/gtk3/rbgtk-cell-renderer.c +0 -119
- data/ext/gtk3/rbgtk-cell-view.c +0 -95
- data/ext/gtk3/rbgtk-check-button.c +0 -64
- data/ext/gtk3/rbgtk-check-menu-item.c +0 -64
- data/ext/gtk3/rbgtk-clip-board.c +0 -389
- data/ext/gtk3/rbgtk-color-button.c +0 -55
- data/ext/gtk3/rbgtk-color-selection-dialog.c +0 -56
- data/ext/gtk3/rbgtk-color-selection.c +0 -219
- data/ext/gtk3/rbgtk-combo-box-text.c +0 -138
- data/ext/gtk3/rbgtk-combo-box.c +0 -147
- data/ext/gtk3/rbgtk-const.c +0 -79
- data/ext/gtk3/rbgtk-container.c +0 -788
- data/ext/gtk3/rbgtk-css-provider.c +0 -110
- data/ext/gtk3/rbgtk-dialog.c +0 -206
- data/ext/gtk3/rbgtk-drag-gdk-drag-context.c +0 -108
- data/ext/gtk3/rbgtk-drag.c +0 -93
- data/ext/gtk3/rbgtk-drawing-area.c +0 -42
- data/ext/gtk3/rbgtk-editable.c +0 -149
- data/ext/gtk3/rbgtk-entry-buffer.c +0 -87
- data/ext/gtk3/rbgtk-entry-completion.c +0 -122
- data/ext/gtk3/rbgtk-entry.c +0 -184
- data/ext/gtk3/rbgtk-event-box.c +0 -42
- data/ext/gtk3/rbgtk-expander.c +0 -49
- data/ext/gtk3/rbgtk-file-chooser-button.c +0 -50
- data/ext/gtk3/rbgtk-file-chooser-dialog.c +0 -62
- data/ext/gtk3/rbgtk-file-chooser-widget.c +0 -40
- data/ext/gtk3/rbgtk-file-chooser.c +0 -381
- data/ext/gtk3/rbgtk-file-filter.c +0 -128
- data/ext/gtk3/rbgtk-file-system-error.c +0 -48
- data/ext/gtk3/rbgtk-fixed.c +0 -61
- data/ext/gtk3/rbgtk-font-button.c +0 -49
- data/ext/gtk3/rbgtk-font-chooser-dialog.c +0 -56
- data/ext/gtk3/rbgtk-font-chooser-widget.c +0 -45
- data/ext/gtk3/rbgtk-font-chooser.c +0 -78
- data/ext/gtk3/rbgtk-frame.c +0 -69
- data/ext/gtk3/rbgtk-gdk-event.c +0 -38
- data/ext/gtk3/rbgtk-grid.c +0 -105
- data/ext/gtk3/rbgtk-handle-box.c +0 -45
- data/ext/gtk3/rbgtk-header-bar.c +0 -58
- data/ext/gtk3/rbgtk-hsv.c +0 -102
- data/ext/gtk3/rbgtk-icon-factory.c +0 -85
- data/ext/gtk3/rbgtk-icon-info.c +0 -115
- data/ext/gtk3/rbgtk-icon-set.c +0 -84
- data/ext/gtk3/rbgtk-icon-size.c +0 -91
- data/ext/gtk3/rbgtk-icon-source.c +0 -184
- data/ext/gtk3/rbgtk-icon-theme.c +0 -268
- data/ext/gtk3/rbgtk-icon-view.c +0 -295
- data/ext/gtk3/rbgtk-im-multicontext.c +0 -48
- data/ext/gtk3/rbgtk-image-menu-item.c +0 -67
- data/ext/gtk3/rbgtk-image.c +0 -162
- data/ext/gtk3/rbgtk-imcon-text-simple.c +0 -69
- data/ext/gtk3/rbgtk-imcon-text.c +0 -133
- data/ext/gtk3/rbgtk-infobar.c +0 -121
- data/ext/gtk3/rbgtk-invisible.c +0 -49
- data/ext/gtk3/rbgtk-label.c +0 -139
- data/ext/gtk3/rbgtk-layout.c +0 -93
- data/ext/gtk3/rbgtk-level-bar.c +0 -88
- data/ext/gtk3/rbgtk-link-button.c +0 -49
- data/ext/gtk3/rbgtk-list-store.c +0 -399
- data/ext/gtk3/rbgtk-lock-button.c +0 -50
- data/ext/gtk3/rbgtk-menu-button.c +0 -41
- data/ext/gtk3/rbgtk-menu-item.c +0 -95
- data/ext/gtk3/rbgtk-menu-shell.c +0 -106
- data/ext/gtk3/rbgtk-menu-tool-button.c +0 -81
- data/ext/gtk3/rbgtk-menu.c +0 -168
- data/ext/gtk3/rbgtk-menubar.c +0 -43
- data/ext/gtk3/rbgtk-message-dialog.c +0 -74
- data/ext/gtk3/rbgtk-misc.c +0 -70
- data/ext/gtk3/rbgtk-notebook.c +0 -383
- data/ext/gtk3/rbgtk-numerable-icon.c +0 -50
- data/ext/gtk3/rbgtk-overlay.c +0 -53
- data/ext/gtk3/rbgtk-page-setup-unix-dialog.c +0 -94
- data/ext/gtk3/rbgtk-page-setup.c +0 -195
- data/ext/gtk3/rbgtk-paned.c +0 -114
- data/ext/gtk3/rbgtk-paper-size.c +0 -179
- data/ext/gtk3/rbgtk-plug.c +0 -85
- data/ext/gtk3/rbgtk-print-context.c +0 -125
- data/ext/gtk3/rbgtk-print-job.c +0 -148
- data/ext/gtk3/rbgtk-print-operation-preview.c +0 -59
- data/ext/gtk3/rbgtk-print-operation.c +0 -149
- data/ext/gtk3/rbgtk-print-settings.c +0 -807
- data/ext/gtk3/rbgtk-print-unix-dialog.c +0 -90
- data/ext/gtk3/rbgtk-printer.c +0 -155
- data/ext/gtk3/rbgtk-progress-bar.c +0 -72
- data/ext/gtk3/rbgtk-radio-action.c +0 -122
- data/ext/gtk3/rbgtk-radio-button.c +0 -89
- data/ext/gtk3/rbgtk-radio-menu-item.c +0 -147
- data/ext/gtk3/rbgtk-radio-tool-button.c +0 -131
- data/ext/gtk3/rbgtk-range.c +0 -68
- data/ext/gtk3/rbgtk-recent-action.c +0 -64
- data/ext/gtk3/rbgtk-recent-chooser-dialog.c +0 -66
- data/ext/gtk3/rbgtk-recent-chooser-menu.c +0 -50
- data/ext/gtk3/rbgtk-recent-chooser-widget.c +0 -48
- data/ext/gtk3/rbgtk-recent-chooser.c +0 -198
- data/ext/gtk3/rbgtk-recent-data.c +0 -188
- data/ext/gtk3/rbgtk-recent-filter-info.c +0 -201
- data/ext/gtk3/rbgtk-recent-filter.c +0 -169
- data/ext/gtk3/rbgtk-recent-info.c +0 -213
- data/ext/gtk3/rbgtk-recent-manager.c +0 -134
- data/ext/gtk3/rbgtk-revealer.c +0 -42
- data/ext/gtk3/rbgtk-scale-button.c +0 -84
- data/ext/gtk3/rbgtk-scale.c +0 -97
- data/ext/gtk3/rbgtk-scrollable.c +0 -31
- data/ext/gtk3/rbgtk-scrollbar.c +0 -52
- data/ext/gtk3/rbgtk-scrolled-window.c +0 -122
- data/ext/gtk3/rbgtk-search-bar.c +0 -59
- data/ext/gtk3/rbgtk-search-entry.c +0 -42
- data/ext/gtk3/rbgtk-selection-data.c +0 -281
- data/ext/gtk3/rbgtk-selection.c +0 -168
- data/ext/gtk3/rbgtk-separator-menu-item.c +0 -39
- data/ext/gtk3/rbgtk-separator-tool-item.c +0 -38
- data/ext/gtk3/rbgtk-separator.c +0 -44
- data/ext/gtk3/rbgtk-settings.c +0 -229
- data/ext/gtk3/rbgtk-size-group.c +0 -66
- data/ext/gtk3/rbgtk-socket.c +0 -82
- data/ext/gtk3/rbgtk-spin-button.c +0 -132
- data/ext/gtk3/rbgtk-spinner.c +0 -55
- data/ext/gtk3/rbgtk-stack-switcher.c +0 -41
- data/ext/gtk3/rbgtk-stack.c +0 -106
- data/ext/gtk3/rbgtk-status-bar.c +0 -77
- data/ext/gtk3/rbgtk-status-icon.c +0 -122
- data/ext/gtk3/rbgtk-stock.c +0 -213
- data/ext/gtk3/rbgtk-style-context-gdk-screen.c +0 -61
- data/ext/gtk3/rbgtk-style-context.c +0 -411
- data/ext/gtk3/rbgtk-style-properties.c +0 -118
- data/ext/gtk3/rbgtk-style-provider.c +0 -67
- data/ext/gtk3/rbgtk-switch.c +0 -40
- data/ext/gtk3/rbgtk-table.c +0 -190
- data/ext/gtk3/rbgtk-target-list.c +0 -125
- data/ext/gtk3/rbgtk-tearoff-menu-item.c +0 -41
- data/ext/gtk3/rbgtk-text-appearance.c +0 -236
- data/ext/gtk3/rbgtk-text-attributes.c +0 -326
- data/ext/gtk3/rbgtk-text-buffer.c +0 -899
- data/ext/gtk3/rbgtk-text-child-anchor.c +0 -56
- data/ext/gtk3/rbgtk-text-iter.c +0 -732
- data/ext/gtk3/rbgtk-text-mark.c +0 -71
- data/ext/gtk3/rbgtk-text-tag-table.c +0 -96
- data/ext/gtk3/rbgtk-text-tag.c +0 -68
- data/ext/gtk3/rbgtk-text-view.c +0 -336
- data/ext/gtk3/rbgtk-theming-engine.c +0 -257
- data/ext/gtk3/rbgtk-toggle-action.c +0 -61
- data/ext/gtk3/rbgtk-toggle-button.c +0 -87
- data/ext/gtk3/rbgtk-toggle-tool-button.c +0 -61
- data/ext/gtk3/rbgtk-tool-button.c +0 -66
- data/ext/gtk3/rbgtk-tool-item.c +0 -200
- data/ext/gtk3/rbgtk-tool-itemgroup.c +0 -70
- data/ext/gtk3/rbgtk-tool-shell.c +0 -96
- data/ext/gtk3/rbgtk-toolbar.c +0 -118
- data/ext/gtk3/rbgtk-tooltip-gdk-display.c +0 -39
- data/ext/gtk3/rbgtk-tooltip.c +0 -100
- data/ext/gtk3/rbgtk-tree-dragdest.c +0 -28
- data/ext/gtk3/rbgtk-tree-dragsource.c +0 -28
- data/ext/gtk3/rbgtk-tree-iter.c +0 -258
- data/ext/gtk3/rbgtk-tree-model.c +0 -246
- data/ext/gtk3/rbgtk-tree-modelfilter.c +0 -197
- data/ext/gtk3/rbgtk-tree-modelsort.c +0 -111
- data/ext/gtk3/rbgtk-tree-path.c +0 -191
- data/ext/gtk3/rbgtk-tree-rowreference.c +0 -140
- data/ext/gtk3/rbgtk-tree-selection.c +0 -190
- data/ext/gtk3/rbgtk-tree-sortable.c +0 -122
- data/ext/gtk3/rbgtk-tree-store.c +0 -330
- data/ext/gtk3/rbgtk-tree-view-column.c +0 -256
- data/ext/gtk3/rbgtk-tree-view.c +0 -716
- data/ext/gtk3/rbgtk-ui-manager.c +0 -189
- data/ext/gtk3/rbgtk-viewport.c +0 -44
- data/ext/gtk3/rbgtk-volume-button.c +0 -41
- data/ext/gtk3/rbgtk-widget-path.c +0 -229
- data/ext/gtk3/rbgtk-widget.c +0 -1554
- data/ext/gtk3/rbgtk-window-group.c +0 -80
- data/ext/gtk3/rbgtk-window.c +0 -565
- data/ext/gtk3/rbgtk.c +0 -783
- data/ext/gtk3/rbgtk3.h +0 -90
- data/ext/gtk3/rbgtk3conversions.h +0 -439
- data/ext/gtk3/rbgtk3private.h +0 -300
- data/ext/gtk3/rbgtk3util.c +0 -67
- data/lib/gtk3/base.rb +0 -67
- data/sample/gtk-demo/appwindow.rb +0 -233
- data/sample/misc/composited-windows.rb +0 -113
- data/sample/misc/itemfactory.rb +0 -73
- data/sample/misc/itemfactory2.rb +0 -74
- data/sample/misc/keyboard_grab.rb +0 -29
- data/sample/misc/pangorenderer.rb +0 -66
- data/sample/misc/pointer_grab.rb +0 -34
- data/sample/misc/settings.rb +0 -41
- data/sample/misc/style_property.rb +0 -67
- data/sample/misc/style_property.rc +0 -19
- data/sample/misc/textbuffer_serialize.rb +0 -130
- data/sample/misc/to_drawable.rb +0 -42
- data/sample/misc/uimanager.rb +0 -148
- data/sample/misc/uimanager2.rb +0 -91
- data/sample/misc/uimanager2.xml +0 -36
- data/sample/misc/xbm_cursor.rb +0 -43
- data/sample/testgtk/3DRings.xpm +0 -116
- data/sample/testgtk/FilesQueue.xpm +0 -98
- data/sample/testgtk/Modeller.xpm +0 -117
- data/sample/testgtk/README +0 -14
- data/sample/testgtk/button.rb +0 -124
- data/sample/testgtk/buttonbox.rb +0 -100
- data/sample/testgtk/check-n.xpm +0 -21
- data/sample/testgtk/check-y.xpm +0 -21
- data/sample/testgtk/checkbutton.rb +0 -67
- data/sample/testgtk/circles.xbm +0 -46
- data/sample/testgtk/colorselect.rb +0 -33
- data/sample/testgtk/dialog.rb +0 -48
- data/sample/testgtk/entry.rb +0 -73
- data/sample/testgtk/filesel.rb +0 -65
- data/sample/testgtk/fontselection.rb +0 -56
- data/sample/testgtk/labels.rb +0 -74
- data/sample/testgtk/layout.rb +0 -108
- data/sample/testgtk/marble.xpm +0 -408
- data/sample/testgtk/menu.rb +0 -79
- data/sample/testgtk/notebook.rb +0 -280
- data/sample/testgtk/pixmap.rb +0 -58
- data/sample/testgtk/progressbar.rb +0 -173
- data/sample/testgtk/radiobutton.rb +0 -61
- data/sample/testgtk/range.rb +0 -65
- data/sample/testgtk/reparent.rb +0 -91
- data/sample/testgtk/sample.rb +0 -80
- data/sample/testgtk/savedposition.rb +0 -87
- data/sample/testgtk/scrolledwindow.rb +0 -67
- data/sample/testgtk/shapedwindow.rb +0 -99
- data/sample/testgtk/spinbutton.rb +0 -181
- data/sample/testgtk/statusbar.rb +0 -89
- data/sample/testgtk/test.xpm +0 -92
- data/sample/testgtk/testgtk.rb +0 -176
- data/sample/testgtk/testgtkrc +0 -146
- data/sample/testgtk/testgtkrc2 +0 -21
- data/sample/testgtk/togglebutton.rb +0 -53
- data/sample/testgtk/toolbar.rb +0 -82
- data/sample/testgtk/tooltips.rb +0 -41
- data/sample/testgtk/wmhints.rb +0 -40
- data/test/test_gtk_image.rb +0 -8
- data/test/test_gtk_list_store.rb +0 -105
- data/test/test_gtk_tree_path.rb +0 -20
- data/test/test_gtk_unix_print.rb +0 -14
- data/test/test_gtk_widget.rb +0 -24
data/lib/gtk3/builder.rb
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
# Copyright (C) 2015 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
module Gtk
|
18
|
+
class Builder
|
19
|
+
alias_method :initialize_raw, :initialize
|
20
|
+
def initialize(options={})
|
21
|
+
file = options[:file]
|
22
|
+
resource = options[:resource]
|
23
|
+
string = options[:string]
|
24
|
+
|
25
|
+
if file
|
26
|
+
initialize_new_from_file(file)
|
27
|
+
elsif resource
|
28
|
+
initialize_new_from_resource(resource)
|
29
|
+
elsif string
|
30
|
+
initialize_new_from_string(string, string.bytesize)
|
31
|
+
else
|
32
|
+
initialize_raw
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
alias_method :[], :get_object
|
37
|
+
|
38
|
+
alias_method :add_from_string_raw, :add_from_string
|
39
|
+
def add_from_string(string)
|
40
|
+
add_from_string_raw(string, string.bytesize)
|
41
|
+
end
|
42
|
+
|
43
|
+
def add(target)
|
44
|
+
if target.respond_to?(:to_path)
|
45
|
+
add_from_file(target.to_path)
|
46
|
+
elsif target.start_with?("<") or target.start_with?(" ")
|
47
|
+
add_from_string(target)
|
48
|
+
elsif File.exist?(target)
|
49
|
+
add_from_file(target)
|
50
|
+
else
|
51
|
+
add_from_resource(target)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def <<(target)
|
56
|
+
add(target)
|
57
|
+
self
|
58
|
+
end
|
59
|
+
|
60
|
+
private
|
61
|
+
def normalize_handler_name(name)
|
62
|
+
name.gsub(/[-\s]+/, "_")
|
63
|
+
end
|
64
|
+
|
65
|
+
def __connect_signals__(connector, object, signal_name,
|
66
|
+
handler_name, connect_object, flags)
|
67
|
+
handler_name = normalize_handler_name(handler_name)
|
68
|
+
if connect_object
|
69
|
+
handler = connect_object.method(handler_name)
|
70
|
+
else
|
71
|
+
handler = connector.call(handler_name)
|
72
|
+
end
|
73
|
+
unless handler
|
74
|
+
$stderr.puts("Undefined handler: #{handler_name}") if $DEBUG
|
75
|
+
return
|
76
|
+
end
|
77
|
+
|
78
|
+
if flags.after?
|
79
|
+
signal_connect_method = :signal_connect_after
|
80
|
+
else
|
81
|
+
signal_connect_method = :signal_connect
|
82
|
+
end
|
83
|
+
|
84
|
+
if handler.arity.zero?
|
85
|
+
object.send(signal_connect_method, signal_name) {handler.call}
|
86
|
+
else
|
87
|
+
object.send(signal_connect_method, signal_name, &handler)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
data/lib/gtk3/button.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# Copyright (C) 2014 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
module Gtk
|
18
|
+
class Button
|
19
|
+
alias_method :initialize_raw, :initialize
|
20
|
+
def initialize(options={})
|
21
|
+
label = options[:label]
|
22
|
+
use_underline = options[:use_underline]
|
23
|
+
if use_underline.nil?
|
24
|
+
mnemonic = options[:mnemonic]
|
25
|
+
if mnemonic
|
26
|
+
label = mnemonic
|
27
|
+
use_underline = true
|
28
|
+
end
|
29
|
+
end
|
30
|
+
stock = options[:stock_id]
|
31
|
+
icon_name = options[:icon_name]
|
32
|
+
icon_size = options[:icon_size] || :button
|
33
|
+
|
34
|
+
if label
|
35
|
+
if use_underline
|
36
|
+
initialize_new_with_mnemonic(label)
|
37
|
+
else
|
38
|
+
initialize_new_with_label(label)
|
39
|
+
end
|
40
|
+
elsif stock
|
41
|
+
initialize_new_from_stock(stock)
|
42
|
+
elsif icon_name
|
43
|
+
case icon_size
|
44
|
+
when Symbol, String
|
45
|
+
icon_size = IconSize.new(icon_size.to_s)
|
46
|
+
end
|
47
|
+
initialize_new_from_icon_name(icon_name, icon_size)
|
48
|
+
else
|
49
|
+
initialize_raw
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Copyright (C) 2015 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
module Gtk
|
18
|
+
class Calendar
|
19
|
+
alias_method :select_month_raw, :select_month
|
20
|
+
def select_month(month, year)
|
21
|
+
select_month_raw(month - 1, year)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Copyright (C) 2015 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
module Gtk
|
18
|
+
module CellLayout
|
19
|
+
def set_attributes(cell, attributes)
|
20
|
+
attributes.each do |key, value|
|
21
|
+
add_attribute(cell, key, value)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
alias_method :add_attribute_raw, :add_attribute
|
26
|
+
def add_attribute(cell, name, value)
|
27
|
+
name = name.to_s if name.is_a?(Symbol)
|
28
|
+
add_attribute_raw(cell, name, value)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -1,6 +1,4 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
1
|
+
# Copyright (C) 2015 Ruby-GNOME2 Project Team
|
4
2
|
#
|
5
3
|
# This library is free software; you can redistribute it and/or
|
6
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -16,9 +14,12 @@
|
|
16
14
|
# License along with this library; if not, write to the Free Software
|
17
15
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
16
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
module Gtk
|
18
|
+
class Clipboard
|
19
|
+
alias_method :set_text_raw, :set_text
|
20
|
+
def set_text(text)
|
21
|
+
set_text_raw(text, text.bytesize)
|
22
|
+
end
|
23
|
+
alias_method :text=, :set_text
|
23
24
|
end
|
24
25
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Copyright (C) 2015 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
module Gtk
|
18
|
+
class ColorChooserDialog
|
19
|
+
alias_method :initialize_raw, :initialize
|
20
|
+
def initialize(options={})
|
21
|
+
title = options[:title]
|
22
|
+
parent = options[:parent]
|
23
|
+
|
24
|
+
initialize_raw(title, parent)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Copyright (C) 2015 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
module Gtk
|
18
|
+
class ComboBoxText
|
19
|
+
alias_method :initialize_raw, :initialize
|
20
|
+
def initialize(options={})
|
21
|
+
entry = options[:entry]
|
22
|
+
|
23
|
+
if entry
|
24
|
+
initialize_new_with_entry
|
25
|
+
else
|
26
|
+
initialize_new
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# Copyright (C) 2015 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
module Gtk
|
18
|
+
class ComboBox
|
19
|
+
alias_method :initialize_raw, :initialize
|
20
|
+
def initialize(options={})
|
21
|
+
entry = options[:entry]
|
22
|
+
model = options[:model]
|
23
|
+
area = options[:area]
|
24
|
+
|
25
|
+
if entry
|
26
|
+
if model
|
27
|
+
initialize_new_with_model_and_entry(model)
|
28
|
+
elsif area
|
29
|
+
initialize_new_with_area_and_entry(area)
|
30
|
+
else
|
31
|
+
initialize_new_with_entry
|
32
|
+
end
|
33
|
+
else
|
34
|
+
if model
|
35
|
+
initialize_new_with_model(model)
|
36
|
+
elsif area
|
37
|
+
initialize_new_with_area(area)
|
38
|
+
else
|
39
|
+
initialize_new
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
alias_method :active_iter_raw, :active_iter
|
45
|
+
def active_iter
|
46
|
+
found, iter = active_iter_raw
|
47
|
+
if found
|
48
|
+
iter.model = model
|
49
|
+
iter
|
50
|
+
else
|
51
|
+
nil
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Copyright (C) 2014-2015 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
module Gtk
|
18
|
+
class Container
|
19
|
+
class << self
|
20
|
+
alias_method :child_properties_raw, :child_properties
|
21
|
+
def child_properties
|
22
|
+
child_properties_raw[0]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
include Enumerable
|
27
|
+
|
28
|
+
def <<(widget)
|
29
|
+
add(widget)
|
30
|
+
self
|
31
|
+
end
|
32
|
+
|
33
|
+
alias_method :focus_chain_raw, :focus_chain
|
34
|
+
def focus_chain
|
35
|
+
set_explicitly, widgets = focus_chain_raw
|
36
|
+
if set_explicitly
|
37
|
+
widgets
|
38
|
+
else
|
39
|
+
nil
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
alias_method :child_get_property_raw, :child_get_property
|
44
|
+
def child_get_property(child, name)
|
45
|
+
property = self.class.find_child_property(name)
|
46
|
+
value = GLib::Value.new(property.value_type)
|
47
|
+
child_get_property_raw(child, name, value)
|
48
|
+
value.value
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Copyright (C) 2014-2015 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
module Gtk
|
18
|
+
class CssProvider
|
19
|
+
def load(options)
|
20
|
+
data = options[:data]
|
21
|
+
file = options[:file]
|
22
|
+
path = options[:path]
|
23
|
+
resource_path = options[:resource_path]
|
24
|
+
if data
|
25
|
+
load_from_data(data)
|
26
|
+
elsif file
|
27
|
+
load_from_file(file)
|
28
|
+
elsif path
|
29
|
+
load_from_path(path)
|
30
|
+
elsif resource_path
|
31
|
+
load_from_resource(resource_path)
|
32
|
+
else
|
33
|
+
message = "Must specify one of :data, :file, :path or :resource_path"
|
34
|
+
raise ArgumentError, "#{message}: #{options.inspect}"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/gtk3/deprecated.rb
CHANGED
@@ -1,22 +1,32 @@
|
|
1
1
|
module Gtk
|
2
2
|
extend GLib::Deprecatable
|
3
|
-
define_deprecated_const :
|
4
|
-
|
5
|
-
define_deprecated_const :
|
6
|
-
define_deprecated_const :
|
7
|
-
define_deprecated_const :
|
8
|
-
define_deprecated_const :
|
9
|
-
define_deprecated_const :
|
10
|
-
define_deprecated_const :
|
11
|
-
|
12
|
-
define_deprecated_const :
|
13
|
-
define_deprecated_const :
|
14
|
-
define_deprecated_const :
|
15
|
-
define_deprecated_const :
|
16
|
-
define_deprecated_const :
|
17
|
-
define_deprecated_const :
|
18
|
-
define_deprecated_const :
|
19
|
-
define_deprecated_const :
|
3
|
+
define_deprecated_const :Allocation, "Gdk::Rectangle"
|
4
|
+
|
5
|
+
define_deprecated_const :Combo, :raise => "Use 'Gtk::ComboBoxText' instead."
|
6
|
+
define_deprecated_const :ComboBoxEntry, :raise => "Use 'Gtk::ComboBox' instead."
|
7
|
+
define_deprecated_const :Curve, :raise => "Don't use this widget anymore."
|
8
|
+
define_deprecated_const :FileSelection, :raise => "Use 'Gtk::FileChooserDialog' instead."
|
9
|
+
define_deprecated_const :FontSelection, :raise => "Use 'Gtk::FontChooserWidget' instead."
|
10
|
+
define_deprecated_const :FontSelectionDialog, :raise => "Use 'Gtk::FontChooserDialog' instead."
|
11
|
+
remove_const(:ColorSelection)
|
12
|
+
define_deprecated_const :ColorSelection, :raise => "Use 'Gtk::ColorChooserWidget' instead."
|
13
|
+
define_deprecated_const :ColorSelectionDialog, :raise => "Use 'Gtk::ColorChooserDialog' instead."
|
14
|
+
define_deprecated_const :GammaCurve, :raise => "Don't use this widget anymore."
|
15
|
+
define_deprecated_const :HRuler, :raise => "Don't use this widget anymore."
|
16
|
+
define_deprecated_const :InputDialog, :raise => "Don't use this widget anymore."
|
17
|
+
define_deprecated_const :ItemFactory, :raise => "Use 'Gtk::UIManager' instead."
|
18
|
+
define_deprecated_const :OptionMenu, :raise => "Use 'Gtk::ComboBox' instead."
|
19
|
+
define_deprecated_const :PageSetupUnixDialog, :raise => "Use 'Gtk::PrintOperation' instead."
|
20
|
+
define_deprecated_const :Printer, :raise => "Use 'Gtk::PrintOperation' instead."
|
21
|
+
define_deprecated_const :PrintCapabilities, :raise => "Use 'Gtk::PrintOperation' instead."
|
22
|
+
define_deprecated_const :PrintJob, :raise => "Use 'Gtk::PrintOperation' instead."
|
23
|
+
define_deprecated_const :PrintUnixDialog, :raise => "Use 'Gtk::PrintOperation' instead."
|
24
|
+
define_deprecated_const :RC, :raise => "Use 'Gtk::StyleContext' instead."
|
25
|
+
define_deprecated_const :RcStyle, :raise => "Use 'Gtk::CssProvider' instead."
|
26
|
+
define_deprecated_const :Ruler, :raise => "Don't use this widget anymore."
|
27
|
+
define_deprecated_const :Style, :raise => "Use 'Gtk::StyleContext' instead."
|
28
|
+
define_deprecated_const :Tooltips, :raise => "Use 'Gtk::Tooltip' API."
|
29
|
+
define_deprecated_const :VRuler, :raise => "Don't use this widget anymore."
|
20
30
|
define_deprecated_flags :AccelFlags, 'ACCEL'
|
21
31
|
define_deprecated_flags :AttachOptions
|
22
32
|
define_deprecated_enums :CornerType, 'CORNER'
|
@@ -64,8 +74,8 @@ module Gtk
|
|
64
74
|
define_deprecated_singleton_method :init_add, :warn => "Don't use this method."
|
65
75
|
define_deprecated_singleton_method :quit_add, :warn => "Don't use this method."
|
66
76
|
define_deprecated_singleton_method :quit_remove, :warn => "Don't use this method."
|
67
|
-
define_deprecated_singleton_method :get_event_widget, :warn => "Use 'Gdk::Event#
|
68
|
-
event && event.
|
77
|
+
define_deprecated_singleton_method :get_event_widget, :warn => "Use 'Gdk::Event#widget'." do |_self, event|
|
78
|
+
event && event.widget
|
69
79
|
end
|
70
80
|
define_deprecated_singleton_method :timeout_add, :warn => "Use 'GLib::Timeout.add'." do |_self, interval, &block|
|
71
81
|
GLib::Timeout.add(interval, &block)
|
@@ -110,7 +120,8 @@ module Gtk
|
|
110
120
|
|
111
121
|
class Assistant
|
112
122
|
extend GLib::Deprecatable
|
113
|
-
|
123
|
+
define_deprecated_const :PageType, "Gtk::AssistantPageType"
|
124
|
+
define_deprecated_enums :AssistantPageType, 'PAGE'
|
114
125
|
define_deprecated_method :set_page_header_image, :warn => "Don't use this method."
|
115
126
|
define_deprecated_method :get_page_header_image, :warn => "Don't use this method."
|
116
127
|
define_deprecated_method :set_page_side_image, :warn => "Don't use this method."
|
@@ -119,7 +130,9 @@ module Gtk
|
|
119
130
|
|
120
131
|
class BindingSet
|
121
132
|
extend GLib::Deprecatable
|
122
|
-
define_deprecated_method :entry_clear, :
|
133
|
+
define_deprecated_method :entry_clear, :remove
|
134
|
+
define_deprecated_method :entry_skip, :skip
|
135
|
+
define_deprecated_method :entry_add_signal, :add_signal
|
123
136
|
define_deprecated_method :add_path, :raise => "Don't use this method."
|
124
137
|
end
|
125
138
|
|
@@ -159,15 +172,11 @@ module Gtk
|
|
159
172
|
define_deprecated_signal :released, :warn => "Use 'Gtk::Widget::button-release-event' signal."
|
160
173
|
define_deprecated_method_by_hash_args :initialize,
|
161
174
|
'label_or_stock_id, use_underline = nil',
|
162
|
-
':label => nil, :
|
175
|
+
':label => nil, :use_underline => nil, :stock_id => nil' do
|
163
176
|
|_self, label_or_stock_id, use_underline|
|
164
177
|
case label_or_stock_id
|
165
178
|
when String
|
166
|
-
|
167
|
-
[{:mnemonic => label_or_stock_id}]
|
168
|
-
else
|
169
|
-
[{:label => label_or_stock_id}]
|
170
|
-
end
|
179
|
+
[{:label => label_or_stock_id, :use_underline => use_underline}]
|
171
180
|
when Symbol
|
172
181
|
[{:stock_id => label_or_stock_id}]
|
173
182
|
else
|
@@ -183,24 +192,27 @@ module Gtk
|
|
183
192
|
|
184
193
|
class Calendar
|
185
194
|
extend GLib::Deprecatable
|
186
|
-
define_deprecated_flags
|
195
|
+
define_deprecated_flags "Gtk::CalendarDisplayOptions"
|
187
196
|
define_deprecated_method :freeze, :warn => "Don't use this method."
|
188
197
|
define_deprecated_method :thaw, :warn => "Don't use this method."
|
189
198
|
end
|
190
199
|
|
191
200
|
class CellRenderer
|
192
201
|
extend GLib::Deprecatable
|
193
|
-
|
194
|
-
|
202
|
+
define_deprecated_const :Mode, "Gtk::CellRendererMode"
|
203
|
+
define_deprecated_enums :CellRendererMode, 'MODE'
|
204
|
+
define_deprecated_const :State, "Gtk::CellRendererState"
|
205
|
+
define_deprecated_flags :CellRendererState
|
195
206
|
define_deprecated_method :editing_canceled, :warn => "Use '#{self}#stop_editing'." do |_self|
|
196
207
|
_self.stop_editing(true)
|
197
208
|
end
|
198
|
-
define_deprecated_method :get_size, :raise => "Use Gtk::
|
209
|
+
define_deprecated_method :get_size, :raise => "Use Gtk::CellRenderer#get_preferred_size."
|
199
210
|
end
|
200
211
|
|
201
212
|
class CellRendererAccel
|
202
213
|
extend GLib::Deprecatable
|
203
|
-
|
214
|
+
define_deprecated_const :Mode, "Gtk::CellRendererAccelMode"
|
215
|
+
define_deprecated_enums :CellRendererAccelMode, 'MODE'
|
204
216
|
end
|
205
217
|
|
206
218
|
class CellView
|
@@ -208,7 +220,7 @@ module Gtk
|
|
208
220
|
define_deprecated_method :cell_renderers, :warn => "Use 'Gtk::CellLayout#cells'." do |_self|
|
209
221
|
_self.cells
|
210
222
|
end
|
211
|
-
define_deprecated_method :get_size_of_row, :raise => "Use Gtk::
|
223
|
+
define_deprecated_method :get_size_of_row, :raise => "Use Gtk::Widget#get_preferred_size."
|
212
224
|
end
|
213
225
|
|
214
226
|
class ColorSelectionDialog
|
@@ -238,9 +250,15 @@ module Gtk
|
|
238
250
|
end
|
239
251
|
end
|
240
252
|
|
253
|
+
class Container
|
254
|
+
extend GLib::Deprecatable
|
255
|
+
define_deprecated_singleton_method :child_property, :find_child_property
|
256
|
+
end
|
257
|
+
|
241
258
|
class Dialog
|
242
259
|
extend GLib::Deprecatable
|
243
|
-
|
260
|
+
define_deprecated_const :Flags, "Gtk::DialogFlags"
|
261
|
+
define_deprecated_flags :DialogFlags
|
244
262
|
define_deprecated_const :ResponseType, 'Gtk::ResponseType'
|
245
263
|
define_deprecated_enums 'Gtk::ResponseType', 'RESPONSE'
|
246
264
|
define_deprecated_method :vbox, :child
|
@@ -254,10 +272,12 @@ module Gtk
|
|
254
272
|
|
255
273
|
module Drag
|
256
274
|
extend GLib::Deprecatable
|
257
|
-
|
258
|
-
|
275
|
+
define_deprecated_const :DestDefaults, "Gtk::DestDefaults"
|
276
|
+
define_deprecated_const :TargetFlags, "Gtk::TargetFlags"
|
259
277
|
define_deprecated_singleton_method :finish, :warn => "Use 'Gdk::DragContext#finish'." do |_self, context, success, del, time|
|
260
|
-
context.finish(success
|
278
|
+
context.finish(:success => success,
|
279
|
+
:delete => delete,
|
280
|
+
:time => time)
|
261
281
|
end
|
262
282
|
define_deprecated_singleton_method :set_icon_default, :warn => "Use 'Gdk::DragContext#set_icon_default'." do |_self, context|
|
263
283
|
context.set_icon_default
|
@@ -384,8 +404,10 @@ module Gtk
|
|
384
404
|
|
385
405
|
module FileChooser
|
386
406
|
extend GLib::Deprecatable
|
387
|
-
|
388
|
-
define_deprecated_enums :
|
407
|
+
define_deprecated_const :Action, "Gtk::FileChooserAction"
|
408
|
+
define_deprecated_enums :FileChooserAction, 'ACTION'
|
409
|
+
define_deprecated_const :Confirmation, "Gtk::FileChooserConfirmation"
|
410
|
+
define_deprecated_enums :FileChooserConfirmation, 'CONFIRMATION'
|
389
411
|
end
|
390
412
|
|
391
413
|
class FileChooserDialog
|
@@ -394,19 +416,28 @@ module Gtk
|
|
394
416
|
'title, parent, action, back, *buttons',
|
395
417
|
':title => nil, :parent => nil, :action => :open, :buttons => nil' do
|
396
418
|
|_self, title, parent, action, back, *buttons|
|
397
|
-
|
419
|
+
options = {
|
420
|
+
:title => title,
|
421
|
+
:parent => parent,
|
422
|
+
:action => action,
|
423
|
+
:buttons => buttons,
|
424
|
+
}
|
425
|
+
[options]
|
398
426
|
end
|
399
427
|
end
|
400
428
|
|
401
429
|
class FileFilter
|
402
430
|
extend GLib::Deprecatable
|
403
|
-
|
431
|
+
define_deprecated_const :Flags, "Gtk::FileFilterFlags"
|
432
|
+
define_deprecated_flags :FileFilterFlags
|
404
433
|
end
|
405
434
|
|
406
435
|
class HBox
|
407
436
|
extend GLib::Deprecatable
|
408
437
|
define_deprecated_singleton_method :new, :warn => "Use 'Gtk::Box.new(:horizontal, spacing)'." do |_self, homogeneous, spacing|
|
409
|
-
Gtk::Box.new(:horizontal, spacing)
|
438
|
+
box = Gtk::Box.new(:horizontal, spacing)
|
439
|
+
box.set_homogeneous(homogeneous)
|
440
|
+
box
|
410
441
|
end
|
411
442
|
end
|
412
443
|
|
@@ -450,28 +481,30 @@ module Gtk
|
|
450
481
|
define_deprecated_method :render_icon, :raise => "Use '#{self}#render_icon_pixbuf'."
|
451
482
|
end
|
452
483
|
|
453
|
-
module IconSize
|
454
|
-
|
455
|
-
|
456
|
-
end
|
484
|
+
#module IconSize
|
485
|
+
# extend GLib::Deprecatable
|
486
|
+
# define_deprecated_enums :IconSize
|
487
|
+
#end
|
457
488
|
|
458
489
|
class IconTheme
|
459
490
|
extend GLib::Deprecatable
|
460
|
-
|
491
|
+
define_deprecated_const :LookupFlags, "Gtk::IconLookupFlags"
|
492
|
+
define_deprecated_flags :IconLookupFlags, 'LOOKUP'
|
461
493
|
end
|
462
494
|
|
463
495
|
class IconView
|
464
496
|
extend GLib::Deprecatable
|
465
|
-
define_deprecated_enums :
|
497
|
+
define_deprecated_enums :IconViewDropPosition
|
466
498
|
end
|
467
499
|
|
468
500
|
class Image
|
469
501
|
extend GLib::Deprecatable
|
470
|
-
|
502
|
+
define_deprecated_const :Type, "Gtk::ImageType"
|
503
|
+
define_deprecated_enums :ImageType
|
471
504
|
define_deprecated_method :set, :warn => "Use '#{self}#set_stock', '#{self}#set_icon_name', '#{self}#set_icon_set', '#{self}#set_file', '#{self}#set_pixbuf' or '#{self}#set_pixbuf_animation'."
|
472
505
|
define_deprecated_method_by_hash_args :initialize,
|
473
506
|
'image, size = nil',
|
474
|
-
':
|
507
|
+
':stock => nil, :icon_name => nil, :icon_set => nil, :icon => nil, :file => nil, :pixbuf => nil, :animation => nil, :surface => nil, :size => nil' do
|
475
508
|
|_self, image, size|
|
476
509
|
case image
|
477
510
|
when String
|
@@ -484,6 +517,8 @@ module Gtk
|
|
484
517
|
[{:stock => image, :size => size}]
|
485
518
|
when Gtk::IconSet
|
486
519
|
[{:icon_set => image, :size => size}]
|
520
|
+
when Gio::Icon
|
521
|
+
[{:icon => image, :size => size}]
|
487
522
|
else
|
488
523
|
[image]
|
489
524
|
end
|
@@ -553,9 +588,9 @@ module Gtk
|
|
553
588
|
define_deprecated_enums 'Gtk::MessageType'
|
554
589
|
define_deprecated_method_by_hash_args :initialize,
|
555
590
|
'parent, flags, type, buttons_type, message',
|
556
|
-
':parent => nil, :flags => 0, :type => :info, :
|
557
|
-
|_self, parent, flags, type,
|
558
|
-
[{:parent => parent, :flags => flags, :type => type, :
|
591
|
+
':parent => nil, :flags => 0, :type => :info, :buttons => :ok, :message => ""' do
|
592
|
+
|_self, parent, flags, type, buttons, message|
|
593
|
+
[{:parent => parent, :flags => flags, :type => type, :buttons => buttons, :message => message}]
|
559
594
|
end
|
560
595
|
end
|
561
596
|
|
@@ -571,14 +606,6 @@ module Gtk
|
|
571
606
|
end
|
572
607
|
end
|
573
608
|
|
574
|
-
class PageSetupUnixDialog
|
575
|
-
extend GLib::Deprecatable
|
576
|
-
define_deprecated_method_by_hash_args :initialize,
|
577
|
-
'title, parent', ':title => nil, :parent => nil' do |_self, title, parent|
|
578
|
-
[{:title => title, :parent => parent}]
|
579
|
-
end
|
580
|
-
end
|
581
|
-
|
582
609
|
class PaperSize
|
583
610
|
extend GLib::Deprecatable
|
584
611
|
define_deprecated_enums :Unit, 'UNIT'
|
@@ -586,9 +613,12 @@ module Gtk
|
|
586
613
|
|
587
614
|
class PrintOperation
|
588
615
|
extend GLib::Deprecatable
|
589
|
-
|
590
|
-
define_deprecated_enums :
|
591
|
-
|
616
|
+
define_deprecated_const :Action, "Gtk::PrintOperationAction"
|
617
|
+
define_deprecated_enums :PrintOperationAction, 'ACTION'
|
618
|
+
define_deprecated_const :Result, "Gtk::PrintOperationResult"
|
619
|
+
define_deprecated_enums :PrintOperationResult, 'RESULT'
|
620
|
+
define_deprecated_const :Status, "Gtk::PrintStatus"
|
621
|
+
define_deprecated_enums :PrintStatus, 'STATUS'
|
592
622
|
end
|
593
623
|
|
594
624
|
class PrintSettings
|
@@ -600,15 +630,6 @@ module Gtk
|
|
600
630
|
define_deprecated_enums :PrintQuality, 'QUALITY'
|
601
631
|
end
|
602
632
|
|
603
|
-
class PrintUnixDialog
|
604
|
-
extend GLib::Deprecatable
|
605
|
-
define_deprecated_flags :Capabilities, 'CAPABILITY'
|
606
|
-
define_deprecated_method_by_hash_args :initialize,
|
607
|
-
'title, parent', ':title => nil, :parent => nil' do |_self, title, parent|
|
608
|
-
[{:title => title, :parent => parent}]
|
609
|
-
end
|
610
|
-
end
|
611
|
-
|
612
633
|
class Paned
|
613
634
|
extend GLib::Deprecatable
|
614
635
|
%w(child1 child2).product(%w(resize shrink)).each do |child, prop|
|
@@ -640,6 +661,27 @@ module Gtk
|
|
640
661
|
end
|
641
662
|
end
|
642
663
|
|
664
|
+
class RadioButton
|
665
|
+
extend GLib::Deprecatable
|
666
|
+
define_deprecated_method_by_hash_args :initialize,
|
667
|
+
'member_or_label, label_or_use_underline, use_underline',
|
668
|
+
':label => label, :member => member, :use_underline => use_underline',
|
669
|
+
0 do |_self, member_or_label, label_or_use_underline, use_underline|
|
670
|
+
options = {}
|
671
|
+
if member_or_label.is_a?(Gtk::RadioButton)
|
672
|
+
options[:member] = member_or_label
|
673
|
+
if label_or_use_underline.is_a?(String)
|
674
|
+
options[:label] = label_or_use_underline
|
675
|
+
options[:use_underline] = use_underline
|
676
|
+
end
|
677
|
+
else
|
678
|
+
options[:label] = member_or_label
|
679
|
+
options[:use_underline] = label_or_use_underline
|
680
|
+
end
|
681
|
+
[options]
|
682
|
+
end
|
683
|
+
end
|
684
|
+
|
643
685
|
class Range
|
644
686
|
extend GLib::Deprecatable
|
645
687
|
define_deprecated_enums :SensitivityType, 'SENSITIVITY'
|
@@ -650,8 +692,10 @@ module Gtk
|
|
650
692
|
|
651
693
|
module RC
|
652
694
|
extend GLib::Deprecatable
|
653
|
-
|
654
|
-
|
695
|
+
define_deprecated_const :Flags, "Gtk::RCFlags"
|
696
|
+
define_deprecated_flags :RCFlags
|
697
|
+
define_deprecated_const :TokenType, "Gtk::RCTokenType"
|
698
|
+
define_deprecated_enums :RCTokenType, 'TOKEN'
|
655
699
|
end
|
656
700
|
|
657
701
|
class RecentAction
|
@@ -678,16 +722,28 @@ module Gtk
|
|
678
722
|
extend GLib::Deprecatable
|
679
723
|
define_deprecated_method_by_hash_args :initialize,
|
680
724
|
'title, parent, manager, *buttons',
|
681
|
-
':title => nil, :parent => nil,
|
682
|
-
|_self, title, parent, *buttons|
|
683
|
-
|
684
|
-
|
725
|
+
':title => nil, :parent => nil, ' +
|
726
|
+
':recent_manager => nil, :buttons => nil' do |_self, title, parent, *buttons|
|
727
|
+
if buttons.first.is_a?(RecentManager)
|
728
|
+
recent_manager = buttons.shift
|
729
|
+
else
|
730
|
+
recent_manager = nil
|
731
|
+
end
|
732
|
+
[
|
733
|
+
{
|
734
|
+
:title => title,
|
735
|
+
:parent => parent,
|
736
|
+
:recent_manager => recent_manager,
|
737
|
+
:buttons => buttons,
|
738
|
+
},
|
739
|
+
]
|
685
740
|
end
|
686
741
|
end
|
687
742
|
|
688
743
|
class RecentFilter
|
689
744
|
extend GLib::Deprecatable
|
690
|
-
|
745
|
+
define_deprecated_const :Flags, "Gtk::RecentFilterFlags"
|
746
|
+
define_deprecated_flags :RecentFilterFlags
|
691
747
|
end
|
692
748
|
|
693
749
|
class RecentManager
|
@@ -725,13 +781,16 @@ module Gtk
|
|
725
781
|
|
726
782
|
class SizeGroup
|
727
783
|
extend GLib::Deprecatable
|
728
|
-
|
784
|
+
define_deprecated_const :Mode, "Gtk::SizeGroupMode"
|
785
|
+
define_deprecated_enums :SizeGroupMode
|
729
786
|
end
|
730
787
|
|
731
788
|
class SpinButton
|
732
789
|
extend GLib::Deprecatable
|
733
|
-
|
734
|
-
define_deprecated_enums :
|
790
|
+
define_deprecated_const :Type, "Gtk::SpinType"
|
791
|
+
define_deprecated_enums :SpinType
|
792
|
+
define_deprecated_const :UpdatePolicy, "Gtk::SpinButtonUpdatePolicy"
|
793
|
+
define_deprecated_enums :SpinButtonUpdatePolicy, 'UPDATE'
|
735
794
|
end
|
736
795
|
|
737
796
|
class TextAttributes
|
@@ -776,7 +835,8 @@ module Gtk
|
|
776
835
|
|
777
836
|
class TextIter
|
778
837
|
extend GLib::Deprecatable
|
779
|
-
|
838
|
+
define_deprecated_const :SearchFlags, "Gtk::TextSearchFlags"
|
839
|
+
define_deprecated_flags :TextSearchFlags, 'SEARCH'
|
780
840
|
define_deprecated_method :backword_visible_word_start, :backward_visible_word_start
|
781
841
|
end
|
782
842
|
|
@@ -837,20 +897,29 @@ module Gtk
|
|
837
897
|
|
838
898
|
module TreeModel
|
839
899
|
extend GLib::Deprecatable
|
840
|
-
|
900
|
+
define_deprecated_const :Flags, "Gtk::TreeModelFlags"
|
901
|
+
define_deprecated_flags :TreeModelFlags
|
902
|
+
end
|
903
|
+
|
904
|
+
class TreeSelection
|
905
|
+
extend GLib::Deprecatable
|
906
|
+
define_deprecated_method :selected_each, :each
|
841
907
|
end
|
842
908
|
|
843
909
|
class TreeView
|
844
910
|
extend GLib::Deprecatable
|
845
|
-
|
846
|
-
define_deprecated_enums :
|
911
|
+
define_deprecated_const :DropPosition, "Gtk::TreeViewDropPosition"
|
912
|
+
define_deprecated_enums :TreeViewDropPosition, 'DROP'
|
913
|
+
define_deprecated_const :GridLines, "Gtk::TreeViewGridLines"
|
914
|
+
define_deprecated_enums :TreeViewGridLines, 'GRID_LINES'
|
847
915
|
define_deprecated_method :widget_to_tree_coords, :convert_widget_to_bin_window_coords
|
848
916
|
define_deprecated_method :tree_to_widget_coords, :convert_bin_window_to_widget_coords
|
849
917
|
end
|
850
918
|
|
851
919
|
class TreeViewColumn
|
852
920
|
extend GLib::Deprecatable
|
853
|
-
|
921
|
+
define_deprecated_const :Sizing, "Gtk::TreeViewColumnSizing"
|
922
|
+
define_deprecated_enums :TreeViewColumnSizing
|
854
923
|
define_deprecated_method :cell_renderers, :warn => "Use 'Gtk::CellLayout#cells'." do |_self|
|
855
924
|
_self.cells
|
856
925
|
end
|
@@ -858,13 +927,16 @@ module Gtk
|
|
858
927
|
|
859
928
|
class UIManager
|
860
929
|
extend GLib::Deprecatable
|
861
|
-
|
930
|
+
define_deprecated_const :ItemType, "Gtk::UIManagerItemType"
|
931
|
+
define_deprecated_flags :UIManagerItemType
|
862
932
|
end
|
863
933
|
|
864
934
|
class VBox
|
865
935
|
extend GLib::Deprecatable
|
866
936
|
define_deprecated_singleton_method :new, :warn => "Use 'Gtk::Box.new(:vertical, spacing)'." do |_self, homogeneous, spacing|
|
867
|
-
Gtk::Box.new(:vertical, spacing)
|
937
|
+
box = Gtk::Box.new(:vertical, spacing)
|
938
|
+
box.set_homogeneous(homogeneous)
|
939
|
+
box
|
868
940
|
end
|
869
941
|
end
|
870
942
|
|
@@ -905,8 +977,10 @@ module Gtk
|
|
905
977
|
|
906
978
|
class Widget
|
907
979
|
extend GLib::Deprecatable
|
908
|
-
|
909
|
-
define_deprecated_enums :
|
980
|
+
define_deprecated_const :HelpType, "Gtk::WidgetHelpType"
|
981
|
+
define_deprecated_enums :WidgetHelpType, 'HELP'
|
982
|
+
define_deprecated_const :TextDirection, "Gtk::TextDIrection"
|
983
|
+
define_deprecated_enums "Gtk::TextDirection", 'TEXT_DIR'
|
910
984
|
define_deprecated_singleton_method :push_colormap, :warn => "Don't use this method."
|
911
985
|
define_deprecated_singleton_method :pop_colormap, :warn => "Don't use this method."
|
912
986
|
define_deprecated_singleton_method :set_default_colormap, :warn => "Don't use this method."
|
@@ -932,8 +1006,8 @@ module Gtk
|
|
932
1006
|
define_deprecated_method :colormap, :raise => "Use '#{self}#visual'."
|
933
1007
|
define_deprecated_method :set_colormap, :warn => "Use '#{self}#set_visual'."
|
934
1008
|
alias :colormap= :set_colormap
|
935
|
-
define_deprecated_method :shape_combine_mask, :warn => "
|
936
|
-
define_deprecated_method :input_shape_combine_mask, :warn => "
|
1009
|
+
define_deprecated_method :shape_combine_mask, :warn => "Use '#{self}#shape_combine_region' instead."
|
1010
|
+
define_deprecated_method :input_shape_combine_mask, :warn => "Use '#{self}#input_shape_combine_region' instead."
|
937
1011
|
define_deprecated_method :reset_shapes, :warn => "Don't use this method."
|
938
1012
|
define_deprecated_method :set_scroll_adjustments, :warn => "Use 'Gtk::Scrollable#set_hadjustment' and 'Gtk::Scrollable#set_vadjustment'." do |_self, hadj, vadj|
|
939
1013
|
_self.set_hadjustment(hadj)
|
@@ -944,9 +1018,6 @@ module Gtk
|
|
944
1018
|
define_deprecated_method :action, :warn => "Use 'Gtk::Activatable#related_action'." do |_self|
|
945
1019
|
_self.related_action
|
946
1020
|
end
|
947
|
-
define_deprecated_method :size_request, :warn => "Use '#{self}#preferred_size'." do |_self|
|
948
|
-
_self.preferred_size.last
|
949
|
-
end
|
950
1021
|
define_deprecated_method :child_requisition, :warn => "Use '#{self}#preferred_size'." do |_self|
|
951
1022
|
_self.preferred_size.last
|
952
1023
|
end
|
@@ -996,9 +1067,32 @@ module Gtk
|
|
996
1067
|
|
997
1068
|
class Window
|
998
1069
|
extend GLib::Deprecatable
|
999
|
-
|
1000
|
-
define_deprecated_enums
|
1070
|
+
define_deprecated_const :Position, "Gtk::WindowPosition"
|
1071
|
+
define_deprecated_enums "Gtk::WindowPosition", 'POS'
|
1072
|
+
define_deprecated_const :Type, "Gtk::WindowType"
|
1073
|
+
define_deprecated_enums "Gtk::WindowType"
|
1001
1074
|
define_deprecated_method :active_focus, :activate_focus
|
1002
1075
|
define_deprecated_method :active_default, :activate_default
|
1003
1076
|
end
|
1077
|
+
|
1078
|
+
class RecentFilter
|
1079
|
+
extend GLib::Deprecatable
|
1080
|
+
define_deprecated_const :Flags, 'Gtk::RecentFilterFlags'
|
1081
|
+
end
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
module Gdk
|
1085
|
+
class DragContext
|
1086
|
+
define_deprecated_method_by_hash_args :finish,
|
1087
|
+
'success, delete, time',
|
1088
|
+
':success => true, :delete => false, :time => Gdk::CURRENT_TIME' do |_self, success, delete, time|
|
1089
|
+
[{:success => success, :delete => delete, :time => time}]
|
1090
|
+
end
|
1091
|
+
end
|
1092
|
+
|
1093
|
+
class Event
|
1094
|
+
define_deprecated_method :event_widget, :warn => "Use 'Gdk::Event#widget'." do |_self|
|
1095
|
+
_self.widget
|
1096
|
+
end
|
1097
|
+
end
|
1004
1098
|
end
|