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

Generate new types #604

Merged
merged 2 commits into from Dec 9, 2017

Conversation

Projects
None yet
3 participants
@GuillaumeGomez
Member

GuillaumeGomez commented Dec 3, 2017

}
pub trait InvisibleExt {
fn set_screen(&self, screen: &gdk::Screen);

This comment has been minimized.

@EPashkin

EPashkin Dec 4, 2017

Member

Strange, but no get_screen here

This comment has been minimized.

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Dec 4, 2017

Member

The strange thing is that it is in the gir file.

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Dec 9, 2017

Member

Ok, I added the method inside a manual trait. But still strange...

pub trait PadControllerExt {
//#[cfg(any(feature = "v3_22", feature = "dox"))]
//fn set_action(&self, type_: /*Ignored*/PadActionType, index: i32, mode: i32, label: &str, action_name: &str);

This comment has been minimized.

@EPashkin

EPashkin Dec 4, 2017

Member

PadActionType still ignored

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Dec 4, 2017

Updated.

Gir.toml Outdated
@@ -283,6 +295,7 @@ manual = [
"Gtk.Allocation",
"Gtk.AppChooser",
"Gtk.EntryBuffer",
"Gtk.Plug",

This comment has been minimized.

@EPashkin

EPashkin Dec 4, 2017

Member

This seems only for xlib, so needed some cfg_condition = "unix" or still be ignored

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Dec 4, 2017

Member

Do we have implemented a cfg parameter in gir or not yet?

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Dec 4, 2017

Member

And it works on OSX, so I suppose that the current condition is fine?

This comment has been minimized.

@EPashkin

EPashkin Dec 5, 2017

Member

Yes we already implement it.

use glib::translate::*;
use glib_ffi;
use std::mem;
use std::ptr;

This comment has been minimized.

@EPashkin

EPashkin Dec 5, 2017

Member

Empty file

use glib::translate::*;
use glib_ffi;
use std::mem;
use std::ptr;

This comment has been minimized.

@EPashkin

EPashkin Dec 5, 2017

Member

Empty file too

}
}
impl Border {

This comment has been minimized.

@EPashkin

EPashkin Dec 5, 2017

Member

Unusable as no getters and no fields generated

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Dec 9, 2017

Member

Apparently you apply things on the border but that's it. It's very strange so the current implementation seems complete.

This comment has been minimized.

@EPashkin

EPashkin Dec 9, 2017

Member

Gir don't generated fields for records. This same as GdkRectange.

}
impl MountOperation {
//pub fn new<'a, P: IsA<Window> + 'a, Q: Into<Option<&'a P>>>(parent: Q) -> MountOperation {

This comment has been minimized.

@EPashkin

EPashkin Dec 5, 2017

Member

Strange why this not generated, without new MountOperation unusable

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Dec 9, 2017

Member

Bug in Gir/Gtk. I'll maybe file a bug. Don't know yet...

use glib::translate::*;
use glib_ffi;
use std::mem;
use std::ptr;

This comment has been minimized.

@EPashkin

EPashkin Dec 5, 2017

Member

Empty file

fn set_action(&self, type_: PadActionType, index: i32, mode: i32, label: &str, action_name: &str);
//#[cfg(any(feature = "v3_22", feature = "dox"))]
//fn set_action_entries(&self, entries: /*Ignored*/&[&PadActionEntry]);

This comment has been minimized.

@EPashkin

EPashkin Dec 5, 2017

Member

Strange, file generated but it still ignored.
Maybe you forgot remove empty file?

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Dec 9, 2017

Member

Yes, I can't generate PadActionEntry because memory management functions are missing.

use glib::translate::*;
use glib_ffi;
use std::mem;
use std::ptr;

This comment has been minimized.

@EPashkin

EPashkin Dec 5, 2017

Member

Empty file

src/plug.rs Outdated
//pub fn new_for_display(display: &gdk::Display, socket_id: /*Ignored*/xlib::Window) -> Plug {
// unsafe { TODO: call ffi::gtk_plug_new_for_display() }
//}

This comment has been minimized.

@EPashkin

EPashkin Dec 5, 2017

Member

Without constructors it unusable

@EPashkin

This comment has been minimized.

Member

EPashkin commented Dec 9, 2017

@antoyo There 2 problems that better have fixed on gir async's:
minor about g_io_stream_splice_finish,
mayor: async function almost always accept Fn(Result<(), Error>) even if finish function return value that need passed to it (Result<isize, Error>)). See last commits.

@antoyo

This comment has been minimized.

Member

antoyo commented Dec 9, 2017

@EPashkin Can you give me a link to a function that accepts this other parameter, please?

@EPashkin

This comment has been minimized.

Member

EPashkin commented Dec 9, 2017

@antoyo Sorry, I added comment to wrong PR. See last commits in gtk-rs/gio#69.
Many of these in manual part of gio.File, Ex. g_file_create_async/g_file_create_finish

from_glib_none(ffi::gtk_invisible_get_screen(self.to_glib_none().0))
}
}
}

This comment has been minimized.

@EPashkin

EPashkin Dec 9, 2017

Member

Please add end of line here

unsafe {
MountOperation::from_glib_none(ffi::gtk_mount_operation_new(parent.0) as *mut ffi::GtkMountOperation).downcast_unchecked() }
}
}

This comment has been minimized.

@EPashkin

EPashkin Dec 9, 2017

Member

Please and empty line

@EPashkin

This comment has been minimized.

Member

EPashkin commented Dec 9, 2017

@GuillaumeGomez all seems good for me.

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Dec 9, 2017

No it's not. The MountOperation::new won't work. I need the Gio type.

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Dec 9, 2017

Now it should be complete.

@EPashkin

This comment has been minimized.

Member

EPashkin commented Dec 9, 2017

👍

@GuillaumeGomez GuillaumeGomez merged commit 3172c37 into gtk-rs:master Dec 9, 2017

2 checks passed

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

@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:new-types branch Dec 9, 2017

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