New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async callbacks #85

Merged
merged 1 commit into from Feb 21, 2018

Conversation

Projects
None yet
4 participants
@MathieuDuponchelle
Contributor

MathieuDuponchelle commented Feb 20, 2018

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

@MathieuDuponchelle

This comment has been minimized.

Contributor

MathieuDuponchelle commented Feb 20, 2018

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

This comment has been minimized.

Member

sdroege commented Feb 20, 2018

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

@MathieuDuponchelle

This comment has been minimized.

Contributor

MathieuDuponchelle commented Feb 20, 2018

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

This comment has been minimized.

Member

EPashkin commented Feb 20, 2018

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

@sdroege

This comment has been minimized.

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

This comment has been minimized.

Contributor

MathieuDuponchelle commented Feb 20, 2018

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

@MathieuDuponchelle

This comment has been minimized.

Contributor

MathieuDuponchelle commented Feb 20, 2018

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

@EPashkin

This comment has been minimized.

Member

EPashkin commented Feb 20, 2018

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

@EPashkin

This comment has been minimized.

Member

EPashkin commented Feb 21, 2018

@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

This comment has been minimized.

Member

EPashkin commented Feb 21, 2018

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

This comment has been minimized.

Contributor

MathieuDuponchelle commented Feb 21, 2018

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

Let's do that separately no?

@EPashkin

This comment has been minimized.

Member

EPashkin commented Feb 21, 2018

I do not insist

@MathieuDuponchelle

This comment has been minimized.

Contributor

MathieuDuponchelle commented Feb 21, 2018

Should we get that in then? :)

@EPashkin

This comment has been minimized.

Member

EPashkin commented Feb 21, 2018

@MathieuDuponchelle LGFM, Thanks

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Feb 21, 2018

Let's go! (and thanks 😉)

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

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sdroege

This comment has been minimized.

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment