This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class App : Gtk.Application { | |
| public override void activate () { | |
| var win = new Gtk.ApplicationWindow (this); | |
| var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); | |
| var bar = new Gtk.ProgressBar (); | |
| var scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 0, 1, 0.0001); | |
| scale.value_changed.connect (() => bar.fraction = scale.get_value ()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class App : Gtk.Application { | |
| public override void activate () { | |
| var win = new Gtk.ApplicationWindow (this); | |
| var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); | |
| var label = new Gtk.Label (""); | |
| label.attributes = new Pango.AttrList (); | |
| var scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 0, 1, 0.01); | |
| scale.value_changed.connect (() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class App : Gtk.Application { | |
| public override void activate () { | |
| var win = new Gtk.ApplicationWindow (this); | |
| var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); | |
| var button1 = new Gtk.ToggleButton.with_label ("AM"); | |
| var button2 = new Gtk.ToggleButton.with_label ("PM"); | |
| box.get_style_context ().add_class ("linked"); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Plugin] | |
| Module=meson_plugin | |
| Loader=python3 | |
| Name=Meson | |
| Description=Provides integration with the Meson build system | |
| Authors= | |
| Copyright=Copyright © 2015 | |
| Builtin=true | |
| Hidden=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Gtk; | |
| class App : Gtk.Application { | |
| static Revealer mk (uint duration, RevealerTransitionType type) { | |
| var r = new Revealer (); | |
| r.transition_duration = duration; | |
| r.transition_type = type; | |
| return r; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function deepEqual(a, b) { | |
| if (a === b) return true; | |
| if (typeof a != typeof b) return false; | |
| if (a === null || b === null) return false; | |
| if (typeof a == 'object' && typeof b == 'object') { | |
| for (var x in a) | |
| if (!(x in b) || !deepEqual(a[x], b[x])) | |
| return false; | |
| return true; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Gtk; | |
| class App : Gtk.Application { | |
| private void show_popover (Button b) { | |
| var pop = new Popover (b); | |
| pop.set_modal (false); | |
| pop.set_position (PositionType.BOTTOM); | |
| var fixed = new Fixed (); | |
| var b2 = new LinkButton (b.label); | |
| b2.clicked.connect (show_popover); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdbool.h> | |
| #include <unistd.h> | |
| #include <X11/Xlib.h> | |
| #include <gtk/gtk.h> | |
| #include <gdk/gdkx.h> | |
| void walk_tree(Display *display, Window win, int depth) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // GIO demo | |
| #include <libsoup/soup.h> | |
| #include <stdio.h> | |
| #include <stdbool.h> | |
| #include <string.h> | |
| typedef struct { | |
| char buf[1024]; | |
| gsize bytes; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!-- Generated with glade 3.19.0 --> | |
| <interface> | |
| <requires lib="gtk+" version="3.16"/> | |
| <object class="GtkWindow" id="window1"> | |
| <property name="can_focus">False</property> | |
| <signal name="delete-event" handler="gtk_main_quit" swapped="no"/> | |
| <child> | |
| <object class="GtkScrolledWindow" id="scrolledwindow1"> | |
| <property name="visible">True</property> |