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

Add missing getters #232

Merged
merged 2 commits into from Jul 20, 2018

Conversation

Projects
None yet
2 participants
@GuillaumeGomez
Member

GuillaumeGomez commented Jul 18, 2018

} else {
unsafe { Some((*axes, *axes.offset(1))) }
}
}

This comment has been minimized.

@sdroege

sdroege Jul 18, 2018

Member

Please check the docs and add all the missing getters while we're at it :)

There's at least x_root and y_root still missing here and maybe other things for the other events

@sdroege

sdroege Jul 18, 2018

Member

Please check the docs and add all the missing getters while we're at it :)

There's at least x_root and y_root still missing here and maybe other things for the other events

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Jul 18, 2018

Member

Damn, I thought it was implemented in Event... I'll need to make a bigger check.

@GuillaumeGomez

GuillaumeGomez Jul 18, 2018

Member

Damn, I thought it was implemented in Event... I'll need to make a bigger check.

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jul 18, 2018

Member

Added a lot of missing stuff.

Member

GuillaumeGomez commented Jul 18, 2018

Added a lot of missing stuff.

Show outdated Hide outdated src/lib.rs
Show outdated Hide outdated src/lib.rs
Show outdated Hide outdated src/lib.rs
@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jul 19, 2018

Member

Updated.

Member

GuillaumeGomez commented Jul 19, 2018

Updated.

// TODO: to be uncommented when the field will be generated
// pub fn get_is_modifier(&self) -> bool {
// from_glib(self.as_ref().is_modifier)
// }

This comment has been minimized.

@sdroege

sdroege Jul 20, 2018

Member

Bitfields /o\

As the whole GdkEvent union is zero-allocated, you can

    let ptr = (&self.as_ref().group as *const u8).offset(1);
    from_glib(*ptr)
@sdroege

sdroege Jul 20, 2018

Member

Bitfields /o\

As the whole GdkEvent union is zero-allocated, you can

    let ptr = (&self.as_ref().group as *const u8).offset(1);
    from_glib(*ptr)

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Jul 20, 2018

Member

I'd rather not. I prefer to just wait for the generation instead.

@GuillaumeGomez

GuillaumeGomez Jul 20, 2018

Member

I'd rather not. I prefer to just wait for the generation instead.

This comment has been minimized.

@sdroege

sdroege Jul 20, 2018

Member

We can probably wait years for that, it's far from trivial to get right for the general case

@sdroege

sdroege Jul 20, 2018

Member

We can probably wait years for that, it's far from trivial to get right for the general case

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Jul 20, 2018

Member

I'm a patient man. :)

@GuillaumeGomez

GuillaumeGomez Jul 20, 2018

Member

I'm a patient man. :)

This comment has been minimized.

@sdroege

sdroege Jul 20, 2018

Member

The users might not be :P

@sdroege

sdroege Jul 20, 2018

Member

The users might not be :P

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Jul 20, 2018

Member

I'll think about it when I'll hear their complains then. :p

@GuillaumeGomez

GuillaumeGomez Jul 20, 2018

Member

I'll think about it when I'll hear their complains then. :p

// TODO: to be uncommented when the field will be generated
// pub fn get_is_stop(&self) -> bool {
// from_glib(self.as_ref().is_stop)

This comment has been minimized.

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Jul 20, 2018

Member

Looks good

Member

sdroege commented Jul 20, 2018

Looks good

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jul 20, 2018

Member

Then I merge!

Member

GuillaumeGomez commented Jul 20, 2018

Then I merge!

@GuillaumeGomez GuillaumeGomez merged commit d7016ec into gtk-rs:master Jul 20, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:missing-getters branch Jul 20, 2018

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