Loading

Paste #pd335kfg6

  1. diff --git a/handy/Gir.toml b/handy/Gir.toml
  2. index c4ddc0a..1975e56 100644
  3. --- a/handy/Gir.toml
  4. +++ b/handy/Gir.toml
  5. @@ -17,6 +17,7 @@ external_libraries = [
  6.  ]
  7.  
  8.  generate = ["Handy.Column",
  9. +            "Handy.ComboRow",
  10.              "Handy.DialerButton",
  11.              "Handy.Dialer",
  12.              "Handy.DialerCycleButton",
  13. diff --git a/handy/src/auto/combo_row.rs b/handy/src/auto/combo_row.rs
  14. new file mode 100644
  15. index 0000000..543dddc
  16. --- /dev/null
  17. +++ b/handy/src/auto/combo_row.rs
  18. @@ -0,0 +1,68 @@
  19. +// This file was generated by gir (https://github.com/gtk-rs/gir)
  20. +// from gir-files (https://github.com/gtk-rs/gir-files)
  21. +// DO NOT EDIT
  22. +
  23. +use ActionRow;
  24. +use ffi;
  25. +use glib::object::IsA;
  26. +use glib::translate::*;
  27. +use glib_ffi;
  28. +use gobject_ffi;
  29. +use gtk;
  30. +use gtk_ffi;
  31. +use std::mem;
  32. +use std::ptr;
  33. +
  34. +glib_wrapper! {
  35. +    pub struct ComboRow(Object<ffi::HdyComboRow, ffi::HdyComboRowClass>): [
  36. +        ActionRow,
  37. +        gtk::Widget => gtk_ffi::GtkWidget,
  38. +    ];
  39. +
  40. +    match fn {
  41. +        get_type => || ffi::hdy_combo_row_get_type(),
  42. +    }
  43. +}
  44. +
  45. +impl ComboRow {
  46. +    pub fn new() -> ComboRow {
  47. +        assert_initialized_main_thread!();
  48. +        unsafe {
  49. +            from_glib_none(ffi::hdy_combo_row_new())
  50. +        }
  51. +    }
  52. +}
  53. +
  54. +impl Default for ComboRow {
  55. +    fn default() -> Self {
  56. +        Self::new()
  57. +    }
  58. +}
  59. +
  60. +pub trait ComboRowExt {
  61. +    //fn bind_model<'a, 'b, 'c, P: IsA</*Ignored*/gio::ListModel> + 'a, Q: Into<Option<&'a P>>, R: Into<Option<&'b /*Ignored*/gtk::ListBoxCreateWidgetFunc>>, S: Into<Option<&'c /*Ignored*/gtk::ListBoxCreateWidgetFunc>>>(&self, model: Q, create_list_widget_func: R, create_current_widget_func: S, user_data_free_func: /*Unknown conversion*//*Unimplemented*/DestroyNotify);
  62. +
  63. +    //fn bind_name_model<'a, 'b, P: IsA</*Ignored*/gio::ListModel> + 'a, Q: Into<Option<&'a P>>, R: Into<Option<&'b /*Unimplemented*/ComboRowGetNameFunc>>>(&self, model: Q, get_name_func: R, user_data_free_func: /*Unknown conversion*//*Unimplemented*/DestroyNotify);
  64. +
  65. +    //fn get_model(&self) -> /*Ignored*/Option<gio::ListModel>;
  66. +
  67. +    //fn set_for_enum<'a, P: Into<Option<&'a /*Unimplemented*/ComboRowGetEnumValueNameFunc>>>(&self, enum_type: glib::types::Type, get_name_func: P, user_data_free_func: /*Unknown conversion*//*Unimplemented*/DestroyNotify);
  68. +}
  69. +
  70. +impl<O: IsA<ComboRow>> ComboRowExt for O {
  71. +    //fn bind_model<'a, 'b, 'c, P: IsA</*Ignored*/gio::ListModel> + 'a, Q: Into<Option<&'a P>>, R: Into<Option<&'b /*Ignored*/gtk::ListBoxCreateWidgetFunc>>, S: Into<Option<&'c /*Ignored*/gtk::ListBoxCreateWidgetFunc>>>(&self, model: Q, create_list_widget_func: R, create_current_widget_func: S, user_data_free_func: /*Unknown conversion*//*Unimplemented*/DestroyNotify) {
  72. +    //    unsafe { TODO: call ffi::hdy_combo_row_bind_model() }
  73. +    //}
  74. +
  75. +    //fn bind_name_model<'a, 'b, P: IsA</*Ignored*/gio::ListModel> + 'a, Q: Into<Option<&'a P>>, R: Into<Option<&'b /*Unimplemented*/ComboRowGetNameFunc>>>(&self, model: Q, get_name_func: R, user_data_free_func: /*Unknown conversion*//*Unimplemented*/DestroyNotify) {
  76. +    //    unsafe { TODO: call ffi::hdy_combo_row_bind_name_model() }
  77. +    //}
  78. +
  79. +    //fn get_model(&self) -> /*Ignored*/Option<gio::ListModel> {
  80. +    //    unsafe { TODO: call ffi::hdy_combo_row_get_model() }
  81. +    //}
  82. +
  83. +    //fn set_for_enum<'a, P: Into<Option<&'a /*Unimplemented*/ComboRowGetEnumValueNameFunc>>>(&self, enum_type: glib::types::Type, get_name_func: P, user_data_free_func: /*Unknown conversion*//*Unimplemented*/DestroyNotify) {
  84. +    //    unsafe { TODO: call ffi::hdy_combo_row_set_for_enum() }
  85. +    //}
  86. +}
  87. diff --git a/handy/src/auto/mod.rs b/handy/src/auto/mod.rs
  88. index bb8a1cb..242fd16 100644
  89. --- a/handy/src/auto/mod.rs
  90. +++ b/handy/src/auto/mod.rs
  91. @@ -14,6 +14,10 @@ mod column;
  92.  pub use self::column::Column;
  93.  pub use self::column::ColumnExt;
  94.  
  95. +mod combo_row;
  96. +pub use self::combo_row::ComboRow;
  97. +pub use self::combo_row::ComboRowExt;
  98. +
  99.  mod dialer;
  100.  pub use self::dialer::Dialer;
  101.  pub use self::dialer::DialerExt;
  102. @@ -41,6 +45,7 @@ pub mod traits {
  103.      pub use super::ActionRowExt;
  104.      pub use super::ArrowsExt;
  105.      pub use super::ColumnExt;
  106. +    pub use super::ComboRowExt;
  107.      pub use super::DialerExt;
  108.      pub use super::DialerButtonExt;
  109.      pub use super::DialerCycleButtonExt;