Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Async callbacks #85

Merged
merged 1 commit into from
Feb 21, 2018
Merged

Conversation

MathieuDuponchelle
Copy link
Contributor

Split in two commits, one regenerating, the other removing manual implementations of many async functions.

@MathieuDuponchelle
Copy link
Contributor Author

Hm, should have run the tests :) I'm not sure what to do here, is there a way to specify a "transform" type for parameters (Here transform int to glib::Priority)? That doesn't seem likely, otherwise I can revert to manually written bindings for these four functions I suppose

@sdroege
Copy link
Member

sdroege commented Feb 20, 2018

Those have to be manual unfortunately, unless you want to handle that somehow in gir too :)

@MathieuDuponchelle
Copy link
Contributor Author

Those have to be manual unfortunately, unless you want to handle that somehow in gir too :)

Not sure how I would do that tbh, gir doesn't know about glib::Priority, and the function expects an int, guess I'll just have to revert (would have been nice if these constants were actually an enum)

@EPashkin
Copy link
Member

Don't worry about tests, I hope adding PR today that fix it

@sdroege
Copy link
Member

sdroege commented Feb 20, 2018

Not sure how I would do that tbh, gir doesn't know about glib::Priority, and the function expects an int

You could specially handle arguments in async functions that are called io_priority and are of type int. Ugly hack :)

@MathieuDuponchelle
Copy link
Contributor Author

@EPashkin , curious how you will address this specific issue though ?

@MathieuDuponchelle
Copy link
Contributor Author

Ah I see, with a dirty hack, worksforme :) I'll regen once this is merged then!

@EPashkin
Copy link
Member

@MathieuDuponchelle Gir updated. Don't forget update submodule 😉

@EPashkin
Copy link
Member

@MathieuDuponchelle Thanks, but you forgot update gir submodule. (Something like git pull origin master in gir subfolder and add it to commit)
Also seems "Gio.FileIOStream", "Gio.FileInputStream", "Gio.FileOutputStream" can be generated too.

@EPashkin
Copy link
Member

As InputStreamExt::read_bytes_async now generated, warning appears

warning: unused import: `glib`
  --> src/input_stream.rs:10:5
   |
10 | use glib;
   |     ^^^^
   |
   = note: #[warn(unused_imports)] on by default

@MathieuDuponchelle
Copy link
Contributor Author

Also seems "Gio.FileIOStream", "Gio.FileInputStream", "Gio.FileOutputStream" can be generated too.

Let's do that separately no?

@EPashkin
Copy link
Member

I do not insist

@MathieuDuponchelle
Copy link
Contributor Author

Should we get that in then? :)

@EPashkin
Copy link
Member

@MathieuDuponchelle LGFM, Thanks

@GuillaumeGomez
Copy link
Member

Let's go! (and thanks 😉)

@GuillaumeGomez GuillaumeGomez merged commit 04fecda into gtk-rs:master Feb 21, 2018
@sdroege
Copy link
Member

sdroege commented Feb 21, 2018

Also seems "Gio.FileIOStream", "Gio.FileInputStream", "Gio.FileOutputStream" can be generated too.

Let's do that separately no?

Is one of you going to do it? Otherwise please someone open a ticket so we don't forget :)

vhdirk pushed a commit to vhdirk/gio-rs that referenced this pull request Jan 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants