Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
public class Application : Gtk.Application { | |
public Application () { | |
Object(application_id: "my.application", | |
flags: ApplicationFlags.FLAGS_NONE); | |
} | |
protected override void activate () { | |
// create the window of this application and show it | |
Gtk.ApplicationWindow window = new Gtk.ApplicationWindow (this); |
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
<html> | |
<head></head> | |
<body> | |
<h1>This is a webpage that can receive and send data to the native UI (GTK)</h1> | |
<br> | |
<input class="text" onkeyup="document.title = this.value" onkeydown="document.title = this.value"></input><label>Type in here to change the native gui text</label> | |
<h3 class="count"> - </h3> | |
<div class="color" style="width: 100px; height: 100px; background-color: red;"></div> | |
<p>Vala, GTK, Webkit, Javascript</p> | |
</body> |
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 GLib; | |
using Gtk; | |
using WebKit; | |
public class Browser : Window { | |
private const string URL = "http://google.com"; | |
public Browser() { | |
this.window_position = WindowPosition.CENTER; |
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
# https://developer.gnome.org/gtk3/3.6/GtkCssProvider.html | |
self.win.set_name('MyWindow') | |
self.button.set_name("Test") | |
self.style_provider = Gtk.CssProvider() | |
css = open('/path/to/your/style.css'), 'rb') # rb needed for python 3 support | |
css_data = css.read() | |
css.close() |
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
import Leap, sys | |
class LeapMotionListener(Leap.Listener): | |
finger_names = ["Thumb", "Index", "Middle", "Ring", "Pinky"] | |
bone_name = ["Metacarpal", "Proximal", "Intermediate", "Distal"] | |
state_names = ["STATE_INVALID", "STATE_START", "STATE_UPDATE", "STATE_END"] | |
def on_init(self, controller): | |
print("Int") |