Questions tagged [rust-gnome]

Rust bindings and wrappers for gnome libraries

5 questions
12
votes
1 answer

HOWTO: Idiomatic Rust for callbacks with gtk (rust-gnome)

I am currently learning Rust and looking to use it for developing a GUI based application with GTK+. My problem relates to registering callbacks to respond to GTK events/signals and mutating state within those callbacks. I have a working but…
Geoff French
  • 148
  • 1
  • 9
4
votes
1 answer

How can I get my own data to a GTK callback when using rust-gnome?

... or, How can I subclass a gtk::Widget? I have the following dependencies in my Cargo.toml: [dependencies] num = "*" gtk = "*" cairo-rs = "*" gdk = "*" time = "*" I want to create my own type of widget (for rendering fractals). I have: extern…
Rasmus Kaj
  • 4,224
  • 1
  • 20
  • 23
3
votes
1 answer

Rust & GTK+3. How to create array containing a few elements of type glib::Value which can be casted to &[&ToValue] type?

I am creating GUI application using Rust and bindings for GTK+ 3 (called Gtk-rs or rust-gnome). I want to insert some data into gtk::ListStore (GtkListStore) using method insert_with_values Working sample, but only one column: I can insert data if I…
wm_obsd
  • 43
  • 6
1
vote
1 answer

Safely move or dereference Receiver in a Fn?

I'm working on an app that optionally uses a GUI to display video data that's roughly structured like this: fn main() { let (window_tx, window_rx) = MainContext::channel::(PRIORITY_DEFAULT); let some_thread =…
rumdrums
  • 1,322
  • 2
  • 11
  • 25
1
vote
1 answer

How to add ListStore inside ListStore in Rust's gtk-rs bindings?

I want to create program with a TreeView containing ComboBoxes using the gtk-rs bindings. In order to have data for the GtkCellRendererCombo, I need a GtkTreeModel *, but I don't know how to add a ListStore inside a ListStore. For now I have only a…
wm_obsd
  • 43
  • 6