diff --git a/atk/src/auto/action.rs b/atk/src/auto/action.rs index 4eeaea31b038..09dbab7fad1b 100644 --- a/atk/src/auto/action.rs +++ b/atk/src/auto/action.rs @@ -30,7 +30,7 @@ pub trait AtkActionExt: 'static { fn get_localized_name(&self, i: i32) -> Option; #[doc(alias = "atk_action_get_n_actions")] - fn get_n_actions(&self) -> i32; + fn n_actions(&self) -> i32; #[doc(alias = "atk_action_get_name")] fn get_name(&self, i: i32) -> Option; @@ -71,7 +71,7 @@ impl> AtkActionExt for O { } } - fn get_n_actions(&self) -> i32 { + fn n_actions(&self) -> i32 { unsafe { ffi::atk_action_get_n_actions(self.as_ref().to_glib_none().0) } } diff --git a/atk/src/auto/component.rs b/atk/src/auto/component.rs index 0b4283ddb448..b6a7ef8c268d 100644 --- a/atk/src/auto/component.rs +++ b/atk/src/auto/component.rs @@ -34,22 +34,22 @@ pub trait ComponentExt: 'static { fn contains(&self, x: i32, y: i32, coord_type: CoordType) -> bool; #[doc(alias = "atk_component_get_alpha")] - fn get_alpha(&self) -> f64; + fn alpha(&self) -> f64; #[doc(alias = "atk_component_get_extents")] fn get_extents(&self, coord_type: CoordType) -> (i32, i32, i32, i32); #[doc(alias = "atk_component_get_layer")] - fn get_layer(&self) -> Layer; + fn layer(&self) -> Layer; #[doc(alias = "atk_component_get_mdi_zorder")] - fn get_mdi_zorder(&self) -> i32; + fn mdi_zorder(&self) -> i32; #[doc(alias = "atk_component_get_position")] fn get_position(&self, coord_type: CoordType) -> (i32, i32); #[doc(alias = "atk_component_get_size")] - fn get_size(&self) -> (i32, i32); + fn size(&self) -> (i32, i32); #[doc(alias = "atk_component_grab_focus")] fn grab_focus(&self) -> bool; @@ -91,7 +91,7 @@ impl> ComponentExt for O { } } - fn get_alpha(&self) -> f64 { + fn alpha(&self) -> f64 { unsafe { ffi::atk_component_get_alpha(self.as_ref().to_glib_none().0) } } @@ -117,11 +117,11 @@ impl> ComponentExt for O { } } - fn get_layer(&self) -> Layer { + fn layer(&self) -> Layer { unsafe { from_glib(ffi::atk_component_get_layer(self.as_ref().to_glib_none().0)) } } - fn get_mdi_zorder(&self) -> i32 { + fn mdi_zorder(&self) -> i32 { unsafe { ffi::atk_component_get_mdi_zorder(self.as_ref().to_glib_none().0) } } @@ -141,7 +141,7 @@ impl> ComponentExt for O { } } - fn get_size(&self) -> (i32, i32) { + fn size(&self) -> (i32, i32) { unsafe { let mut width = mem::MaybeUninit::uninit(); let mut height = mem::MaybeUninit::uninit(); diff --git a/atk/src/auto/document.rs b/atk/src/auto/document.rs index 7931668124a5..5b2bb574bec7 100644 --- a/atk/src/auto/document.rs +++ b/atk/src/auto/document.rs @@ -26,19 +26,19 @@ pub trait DocumentExt: 'static { fn get_attribute_value(&self, attribute_name: &str) -> Option; //#[doc(alias = "atk_document_get_attributes")] - //fn get_attributes(&self) -> /*Ignored*/Option; + //fn attributes(&self) -> /*Ignored*/Option; #[doc(alias = "atk_document_get_current_page_number")] - fn get_current_page_number(&self) -> i32; + fn current_page_number(&self) -> i32; //#[doc(alias = "atk_document_get_document")] - //fn get_document(&self) -> /*Unimplemented*/Option; + //fn document(&self) -> /*Unimplemented*/Option; #[doc(alias = "atk_document_get_document_type")] - fn get_document_type(&self) -> Option; + fn document_type(&self) -> Option; #[doc(alias = "atk_document_get_page_count")] - fn get_page_count(&self) -> i32; + fn page_count(&self) -> i32; #[doc(alias = "atk_document_set_attribute_value")] fn set_attribute_value(&self, attribute_name: &str, attribute_value: &str) -> bool; @@ -62,19 +62,19 @@ impl> DocumentExt for O { } } - //fn get_attributes(&self) -> /*Ignored*/Option { + //fn attributes(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi:atk_document_get_attributes() } //} - fn get_current_page_number(&self) -> i32 { + fn current_page_number(&self) -> i32 { unsafe { ffi::atk_document_get_current_page_number(self.as_ref().to_glib_none().0) } } - //fn get_document(&self) -> /*Unimplemented*/Option { + //fn document(&self) -> /*Unimplemented*/Option { // unsafe { TODO: call ffi:atk_document_get_document() } //} - fn get_document_type(&self) -> Option { + fn document_type(&self) -> Option { unsafe { from_glib_none(ffi::atk_document_get_document_type( self.as_ref().to_glib_none().0, @@ -82,7 +82,7 @@ impl> DocumentExt for O { } } - fn get_page_count(&self) -> i32 { + fn page_count(&self) -> i32 { unsafe { ffi::atk_document_get_page_count(self.as_ref().to_glib_none().0) } } diff --git a/atk/src/auto/gobject_accessible.rs b/atk/src/auto/gobject_accessible.rs index 98379bb47fcb..04b1dcd8f5e4 100644 --- a/atk/src/auto/gobject_accessible.rs +++ b/atk/src/auto/gobject_accessible.rs @@ -31,11 +31,11 @@ pub const NONE_GOBJECT_ACCESSIBLE: Option<&GObjectAccessible> = None; pub trait GObjectAccessibleExt: 'static { #[doc(alias = "atk_gobject_accessible_get_object")] - fn get_object(&self) -> Option; + fn object(&self) -> Option; } impl> GObjectAccessibleExt for O { - fn get_object(&self) -> Option { + fn object(&self) -> Option { unsafe { from_glib_none(ffi::atk_gobject_accessible_get_object( self.as_ref().to_glib_none().0, diff --git a/atk/src/auto/hyperlink.rs b/atk/src/auto/hyperlink.rs index a5f819cb882d..413bd494c6f3 100644 --- a/atk/src/auto/hyperlink.rs +++ b/atk/src/auto/hyperlink.rs @@ -26,16 +26,16 @@ pub const NONE_HYPERLINK: Option<&Hyperlink> = None; pub trait HyperlinkExt: 'static { #[doc(alias = "atk_hyperlink_get_end_index")] - fn get_end_index(&self) -> i32; + fn end_index(&self) -> i32; #[doc(alias = "atk_hyperlink_get_n_anchors")] - fn get_n_anchors(&self) -> i32; + fn n_anchors(&self) -> i32; #[doc(alias = "atk_hyperlink_get_object")] fn get_object(&self, i: i32) -> Option; #[doc(alias = "atk_hyperlink_get_start_index")] - fn get_start_index(&self) -> i32; + fn start_index(&self) -> i32; #[doc(alias = "atk_hyperlink_get_uri")] fn get_uri(&self, i: i32) -> Option; @@ -46,7 +46,8 @@ pub trait HyperlinkExt: 'static { #[doc(alias = "atk_hyperlink_is_valid")] fn is_valid(&self) -> bool; - fn get_property_number_of_anchors(&self) -> i32; + #[doc(alias = "get_property_number_of_anchors")] + fn number_of_anchors(&self) -> i32; fn connect_link_activated(&self, f: F) -> SignalHandlerId; @@ -61,11 +62,11 @@ pub trait HyperlinkExt: 'static { } impl> HyperlinkExt for O { - fn get_end_index(&self) -> i32 { + fn end_index(&self) -> i32 { unsafe { ffi::atk_hyperlink_get_end_index(self.as_ref().to_glib_none().0) } } - fn get_n_anchors(&self) -> i32 { + fn n_anchors(&self) -> i32 { unsafe { ffi::atk_hyperlink_get_n_anchors(self.as_ref().to_glib_none().0) } } @@ -78,7 +79,7 @@ impl> HyperlinkExt for O { } } - fn get_start_index(&self) -> i32 { + fn start_index(&self) -> i32 { unsafe { ffi::atk_hyperlink_get_start_index(self.as_ref().to_glib_none().0) } } @@ -99,7 +100,7 @@ impl> HyperlinkExt for O { unsafe { from_glib(ffi::atk_hyperlink_is_valid(self.as_ref().to_glib_none().0)) } } - fn get_property_number_of_anchors(&self) -> i32 { + fn number_of_anchors(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/atk/src/auto/hyperlink_impl.rs b/atk/src/auto/hyperlink_impl.rs index 7a8ca4799645..79ce8afeb19e 100644 --- a/atk/src/auto/hyperlink_impl.rs +++ b/atk/src/auto/hyperlink_impl.rs @@ -19,11 +19,11 @@ pub const NONE_HYPERLINK_IMPL: Option<&HyperlinkImpl> = None; pub trait HyperlinkImplExt: 'static { #[doc(alias = "atk_hyperlink_impl_get_hyperlink")] - fn get_hyperlink(&self) -> Option; + fn hyperlink(&self) -> Option; } impl> HyperlinkImplExt for O { - fn get_hyperlink(&self) -> Option { + fn hyperlink(&self) -> Option { unsafe { from_glib_full(ffi::atk_hyperlink_impl_get_hyperlink( self.as_ref().to_glib_none().0, diff --git a/atk/src/auto/hypertext.rs b/atk/src/auto/hypertext.rs index a09d03db1ecc..0c6987c11394 100644 --- a/atk/src/auto/hypertext.rs +++ b/atk/src/auto/hypertext.rs @@ -30,7 +30,7 @@ pub trait HypertextExt: 'static { fn get_link_index(&self, char_index: i32) -> i32; #[doc(alias = "atk_hypertext_get_n_links")] - fn get_n_links(&self) -> i32; + fn n_links(&self) -> i32; fn connect_link_selected(&self, f: F) -> SignalHandlerId; } @@ -49,7 +49,7 @@ impl> HypertextExt for O { unsafe { ffi::atk_hypertext_get_link_index(self.as_ref().to_glib_none().0, char_index) } } - fn get_n_links(&self) -> i32 { + fn n_links(&self) -> i32 { unsafe { ffi::atk_hypertext_get_n_links(self.as_ref().to_glib_none().0) } } diff --git a/atk/src/auto/image.rs b/atk/src/auto/image.rs index 99f1a799bb90..12453060f4e6 100644 --- a/atk/src/auto/image.rs +++ b/atk/src/auto/image.rs @@ -20,23 +20,23 @@ pub const NONE_IMAGE: Option<&Image> = None; pub trait AtkImageExt: 'static { #[doc(alias = "atk_image_get_image_description")] - fn get_image_description(&self) -> Option; + fn image_description(&self) -> Option; #[doc(alias = "atk_image_get_image_locale")] - fn get_image_locale(&self) -> Option; + fn image_locale(&self) -> Option; #[doc(alias = "atk_image_get_image_position")] fn get_image_position(&self, coord_type: CoordType) -> (i32, i32); #[doc(alias = "atk_image_get_image_size")] - fn get_image_size(&self) -> (i32, i32); + fn image_size(&self) -> (i32, i32); #[doc(alias = "atk_image_set_image_description")] fn set_image_description(&self, description: &str) -> bool; } impl> AtkImageExt for O { - fn get_image_description(&self) -> Option { + fn image_description(&self) -> Option { unsafe { from_glib_none(ffi::atk_image_get_image_description( self.as_ref().to_glib_none().0, @@ -44,7 +44,7 @@ impl> AtkImageExt for O { } } - fn get_image_locale(&self) -> Option { + fn image_locale(&self) -> Option { unsafe { from_glib_none(ffi::atk_image_get_image_locale( self.as_ref().to_glib_none().0, @@ -68,7 +68,7 @@ impl> AtkImageExt for O { } } - fn get_image_size(&self) -> (i32, i32) { + fn image_size(&self) -> (i32, i32) { unsafe { let mut width = mem::MaybeUninit::uninit(); let mut height = mem::MaybeUninit::uninit(); diff --git a/atk/src/auto/object.rs b/atk/src/auto/object.rs index a86fe9a0696a..2191db07f63d 100644 --- a/atk/src/auto/object.rs +++ b/atk/src/auto/object.rs @@ -35,37 +35,37 @@ pub trait AtkObjectExt: 'static { #[cfg(any(feature = "v2_34", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_34")))] #[doc(alias = "atk_object_get_accessible_id")] - fn get_accessible_id(&self) -> Option; + fn accessible_id(&self) -> Option; //#[doc(alias = "atk_object_get_attributes")] - //fn get_attributes(&self) -> /*Ignored*/Option; + //fn attributes(&self) -> /*Ignored*/Option; #[doc(alias = "atk_object_get_description")] - fn get_description(&self) -> Option; + fn description(&self) -> Option; #[doc(alias = "atk_object_get_index_in_parent")] - fn get_index_in_parent(&self) -> i32; + fn index_in_parent(&self) -> i32; #[doc(alias = "atk_object_get_layer")] - fn get_layer(&self) -> Layer; + fn layer(&self) -> Layer; #[doc(alias = "atk_object_get_mdi_zorder")] - fn get_mdi_zorder(&self) -> i32; + fn mdi_zorder(&self) -> i32; #[doc(alias = "atk_object_get_n_accessible_children")] - fn get_n_accessible_children(&self) -> i32; + fn n_accessible_children(&self) -> i32; #[doc(alias = "atk_object_get_name")] - fn get_name(&self) -> Option; + fn name(&self) -> Option; #[doc(alias = "atk_object_get_object_locale")] - fn get_object_locale(&self) -> Option; + fn object_locale(&self) -> Option; #[doc(alias = "atk_object_get_parent")] - fn get_parent(&self) -> Option; + fn parent(&self) -> Option; #[doc(alias = "atk_object_get_role")] - fn get_role(&self) -> Role; + fn role(&self) -> Role; //#[doc(alias = "atk_object_initialize")] //fn initialize(&self, data: /*Unimplemented*/Option); @@ -105,77 +105,98 @@ pub trait AtkObjectExt: 'static { #[doc(alias = "atk_object_set_role")] fn set_role(&self, role: Role); - fn get_property_accessible_component_layer(&self) -> i32; + #[doc(alias = "get_property_accessible_component_layer")] + fn accessible_component_layer(&self) -> i32; - fn get_property_accessible_component_mdi_zorder(&self) -> i32; + #[doc(alias = "get_property_accessible_component_mdi_zorder")] + fn accessible_component_mdi_zorder(&self) -> i32; - fn get_property_accessible_description(&self) -> Option; + #[doc(alias = "get_property_accessible_description")] + fn accessible_description(&self) -> Option; - fn set_property_accessible_description(&self, accessible_description: Option<&str>); + #[doc(alias = "set_property_accessible_description")] + fn set_accessible_description(&self, accessible_description: Option<&str>); - fn get_property_accessible_hypertext_nlinks(&self) -> i32; + #[doc(alias = "get_property_accessible_hypertext_nlinks")] + fn accessible_hypertext_nlinks(&self) -> i32; - fn get_property_accessible_name(&self) -> Option; + #[doc(alias = "get_property_accessible_name")] + fn accessible_name(&self) -> Option; - fn set_property_accessible_name(&self, accessible_name: Option<&str>); + #[doc(alias = "set_property_accessible_name")] + fn set_accessible_name(&self, accessible_name: Option<&str>); - fn get_property_accessible_parent(&self) -> Option; + #[doc(alias = "get_property_accessible_parent")] + fn accessible_parent(&self) -> Option; - fn set_property_accessible_parent>(&self, accessible_parent: Option<&P>); + #[doc(alias = "set_property_accessible_parent")] + fn set_accessible_parent>(&self, accessible_parent: Option<&P>); - fn get_property_accessible_role(&self) -> Role; + #[doc(alias = "get_property_accessible_role")] + fn accessible_role(&self) -> Role; - fn set_property_accessible_role(&self, accessible_role: Role); + #[doc(alias = "set_property_accessible_role")] + fn set_accessible_role(&self, accessible_role: Role); - fn get_property_accessible_table_caption(&self) -> Option; + #[doc(alias = "get_property_accessible_table_caption")] + fn accessible_table_caption(&self) -> Option; - fn set_property_accessible_table_caption(&self, accessible_table_caption: Option<&str>); + #[doc(alias = "set_property_accessible_table_caption")] + fn set_accessible_table_caption(&self, accessible_table_caption: Option<&str>); - fn get_property_accessible_table_caption_object(&self) -> Option; + #[doc(alias = "get_property_accessible_table_caption_object")] + fn accessible_table_caption_object(&self) -> Option; - fn set_property_accessible_table_caption_object>( + #[doc(alias = "set_property_accessible_table_caption_object")] + fn set_accessible_table_caption_object>( &self, accessible_table_caption_object: Option<&P>, ); - fn get_property_accessible_table_column_description(&self) -> Option; + #[doc(alias = "get_property_accessible_table_column_description")] + fn accessible_table_column_description(&self) -> Option; - fn set_property_accessible_table_column_description( + #[doc(alias = "set_property_accessible_table_column_description")] + fn set_accessible_table_column_description( &self, accessible_table_column_description: Option<&str>, ); - fn get_property_accessible_table_column_header(&self) -> Option; + #[doc(alias = "get_property_accessible_table_column_header")] + fn accessible_table_column_header(&self) -> Option; - fn set_property_accessible_table_column_header>( + #[doc(alias = "set_property_accessible_table_column_header")] + fn set_accessible_table_column_header>( &self, accessible_table_column_header: Option<&P>, ); - fn get_property_accessible_table_row_description(&self) -> Option; + #[doc(alias = "get_property_accessible_table_row_description")] + fn accessible_table_row_description(&self) -> Option; - fn set_property_accessible_table_row_description( - &self, - accessible_table_row_description: Option<&str>, - ); + #[doc(alias = "set_property_accessible_table_row_description")] + fn set_accessible_table_row_description(&self, accessible_table_row_description: Option<&str>); - fn get_property_accessible_table_row_header(&self) -> Option; + #[doc(alias = "get_property_accessible_table_row_header")] + fn accessible_table_row_header(&self) -> Option; - fn set_property_accessible_table_row_header>( + #[doc(alias = "set_property_accessible_table_row_header")] + fn set_accessible_table_row_header>( &self, accessible_table_row_header: Option<&P>, ); - fn get_property_accessible_table_summary(&self) -> Option; + #[doc(alias = "get_property_accessible_table_summary")] + fn accessible_table_summary(&self) -> Option; - fn set_property_accessible_table_summary>( - &self, - accessible_table_summary: Option<&P>, - ); + #[doc(alias = "set_property_accessible_table_summary")] + fn set_accessible_table_summary>(&self, accessible_table_summary: Option<&P>); - fn get_property_accessible_value(&self) -> f64; + #[doc(alias = "get_property_accessible_value")] + fn accessible_value(&self) -> f64; - fn set_property_accessible_value(&self, accessible_value: f64); + #[doc(alias = "set_property_accessible_value")] + fn set_accessible_value(&self, accessible_value: f64); fn connect_active_descendant_changed( &self, @@ -288,7 +309,7 @@ impl> AtkObjectExt for O { #[cfg(any(feature = "v2_34", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_34")))] - fn get_accessible_id(&self) -> Option { + fn accessible_id(&self) -> Option { unsafe { from_glib_none(ffi::atk_object_get_accessible_id( self.as_ref().to_glib_none().0, @@ -296,11 +317,11 @@ impl> AtkObjectExt for O { } } - //fn get_attributes(&self) -> /*Ignored*/Option { + //fn attributes(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi:atk_object_get_attributes() } //} - fn get_description(&self) -> Option { + fn description(&self) -> Option { unsafe { from_glib_none(ffi::atk_object_get_description( self.as_ref().to_glib_none().0, @@ -308,27 +329,27 @@ impl> AtkObjectExt for O { } } - fn get_index_in_parent(&self) -> i32 { + fn index_in_parent(&self) -> i32 { unsafe { ffi::atk_object_get_index_in_parent(self.as_ref().to_glib_none().0) } } - fn get_layer(&self) -> Layer { + fn layer(&self) -> Layer { unsafe { from_glib(ffi::atk_object_get_layer(self.as_ref().to_glib_none().0)) } } - fn get_mdi_zorder(&self) -> i32 { + fn mdi_zorder(&self) -> i32 { unsafe { ffi::atk_object_get_mdi_zorder(self.as_ref().to_glib_none().0) } } - fn get_n_accessible_children(&self) -> i32 { + fn n_accessible_children(&self) -> i32 { unsafe { ffi::atk_object_get_n_accessible_children(self.as_ref().to_glib_none().0) } } - fn get_name(&self) -> Option { + fn name(&self) -> Option { unsafe { from_glib_none(ffi::atk_object_get_name(self.as_ref().to_glib_none().0)) } } - fn get_object_locale(&self) -> Option { + fn object_locale(&self) -> Option { unsafe { from_glib_none(ffi::atk_object_get_object_locale( self.as_ref().to_glib_none().0, @@ -336,11 +357,11 @@ impl> AtkObjectExt for O { } } - fn get_parent(&self) -> Option { + fn parent(&self) -> Option { unsafe { from_glib_none(ffi::atk_object_get_parent(self.as_ref().to_glib_none().0)) } } - fn get_role(&self) -> Role { + fn role(&self) -> Role { unsafe { from_glib(ffi::atk_object_get_role(self.as_ref().to_glib_none().0)) } } @@ -438,7 +459,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_component_layer(&self) -> i32 { + fn accessible_component_layer(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -453,7 +474,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_component_mdi_zorder(&self) -> i32 { + fn accessible_component_mdi_zorder(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -468,7 +489,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_description(&self) -> Option { + fn accessible_description(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -482,7 +503,7 @@ impl> AtkObjectExt for O { } } - fn set_property_accessible_description(&self, accessible_description: Option<&str>) { + fn set_accessible_description(&self, accessible_description: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -492,7 +513,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_hypertext_nlinks(&self) -> i32 { + fn accessible_hypertext_nlinks(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -507,7 +528,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_name(&self) -> Option { + fn accessible_name(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -521,7 +542,7 @@ impl> AtkObjectExt for O { } } - fn set_property_accessible_name(&self, accessible_name: Option<&str>) { + fn set_accessible_name(&self, accessible_name: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -531,7 +552,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_parent(&self) -> Option { + fn accessible_parent(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -545,7 +566,7 @@ impl> AtkObjectExt for O { } } - fn set_property_accessible_parent>(&self, accessible_parent: Option<&P>) { + fn set_accessible_parent>(&self, accessible_parent: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -555,7 +576,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_role(&self) -> Role { + fn accessible_role(&self) -> Role { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -570,7 +591,7 @@ impl> AtkObjectExt for O { } } - fn set_property_accessible_role(&self, accessible_role: Role) { + fn set_accessible_role(&self, accessible_role: Role) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -580,7 +601,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_table_caption(&self) -> Option { + fn accessible_table_caption(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -594,7 +615,7 @@ impl> AtkObjectExt for O { } } - fn set_property_accessible_table_caption(&self, accessible_table_caption: Option<&str>) { + fn set_accessible_table_caption(&self, accessible_table_caption: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -604,7 +625,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_table_caption_object(&self) -> Option { + fn accessible_table_caption_object(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -618,7 +639,7 @@ impl> AtkObjectExt for O { } } - fn set_property_accessible_table_caption_object>( + fn set_accessible_table_caption_object>( &self, accessible_table_caption_object: Option<&P>, ) { @@ -633,7 +654,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_table_column_description(&self) -> Option { + fn accessible_table_column_description(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -647,7 +668,7 @@ impl> AtkObjectExt for O { } } - fn set_property_accessible_table_column_description( + fn set_accessible_table_column_description( &self, accessible_table_column_description: Option<&str>, ) { @@ -662,7 +683,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_table_column_header(&self) -> Option { + fn accessible_table_column_header(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -676,7 +697,7 @@ impl> AtkObjectExt for O { } } - fn set_property_accessible_table_column_header>( + fn set_accessible_table_column_header>( &self, accessible_table_column_header: Option<&P>, ) { @@ -691,7 +712,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_table_row_description(&self) -> Option { + fn accessible_table_row_description(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -705,10 +726,7 @@ impl> AtkObjectExt for O { } } - fn set_property_accessible_table_row_description( - &self, - accessible_table_row_description: Option<&str>, - ) { + fn set_accessible_table_row_description(&self, accessible_table_row_description: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -720,7 +738,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_table_row_header(&self) -> Option { + fn accessible_table_row_header(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -734,7 +752,7 @@ impl> AtkObjectExt for O { } } - fn set_property_accessible_table_row_header>( + fn set_accessible_table_row_header>( &self, accessible_table_row_header: Option<&P>, ) { @@ -749,7 +767,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_table_summary(&self) -> Option { + fn accessible_table_summary(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -763,10 +781,7 @@ impl> AtkObjectExt for O { } } - fn set_property_accessible_table_summary>( - &self, - accessible_table_summary: Option<&P>, - ) { + fn set_accessible_table_summary>(&self, accessible_table_summary: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -776,7 +791,7 @@ impl> AtkObjectExt for O { } } - fn get_property_accessible_value(&self) -> f64 { + fn accessible_value(&self) -> f64 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -791,7 +806,7 @@ impl> AtkObjectExt for O { } } - fn set_property_accessible_value(&self, accessible_value: f64) { + fn set_accessible_value(&self, accessible_value: f64) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/atk/src/auto/object_factory.rs b/atk/src/auto/object_factory.rs index 81e7482ba1d5..b998d6674fa0 100644 --- a/atk/src/auto/object_factory.rs +++ b/atk/src/auto/object_factory.rs @@ -22,7 +22,7 @@ pub trait ObjectFactoryExt: 'static { fn create_accessible>(&self, obj: &P) -> Option; #[doc(alias = "atk_object_factory_get_accessible_type")] - fn get_accessible_type(&self) -> glib::types::Type; + fn accessible_type(&self) -> glib::types::Type; #[doc(alias = "atk_object_factory_invalidate")] fn invalidate(&self); @@ -38,7 +38,7 @@ impl> ObjectFactoryExt for O { } } - fn get_accessible_type(&self) -> glib::types::Type { + fn accessible_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::atk_object_factory_get_accessible_type( self.as_ref().to_glib_none().0, diff --git a/atk/src/auto/plug.rs b/atk/src/auto/plug.rs index 57d02469ab86..42a28da12bde 100644 --- a/atk/src/auto/plug.rs +++ b/atk/src/auto/plug.rs @@ -35,11 +35,11 @@ pub const NONE_PLUG: Option<&Plug> = None; pub trait AtkPlugExt: 'static { #[doc(alias = "atk_plug_get_id")] - fn get_id(&self) -> Option; + fn id(&self) -> Option; } impl> AtkPlugExt for O { - fn get_id(&self) -> Option { + fn id(&self) -> Option { unsafe { from_glib_full(ffi::atk_plug_get_id(self.as_ref().to_glib_none().0)) } } } diff --git a/atk/src/auto/range.rs b/atk/src/auto/range.rs index f78a29ffd690..3ead41b67fb4 100644 --- a/atk/src/auto/range.rs +++ b/atk/src/auto/range.rs @@ -29,17 +29,17 @@ impl Range { } #[doc(alias = "atk_range_get_description")] - pub fn get_description(&mut self) -> Option { + pub fn description(&mut self) -> Option { unsafe { from_glib_none(ffi::atk_range_get_description(self.to_glib_none_mut().0)) } } #[doc(alias = "atk_range_get_lower_limit")] - pub fn get_lower_limit(&mut self) -> f64 { + pub fn lower_limit(&mut self) -> f64 { unsafe { ffi::atk_range_get_lower_limit(self.to_glib_none_mut().0) } } #[doc(alias = "atk_range_get_upper_limit")] - pub fn get_upper_limit(&mut self) -> f64 { + pub fn upper_limit(&mut self) -> f64 { unsafe { ffi::atk_range_get_upper_limit(self.to_glib_none_mut().0) } } } diff --git a/atk/src/auto/relation.rs b/atk/src/auto/relation.rs index dcc3a59fb5fa..0c0425ccb5ce 100644 --- a/atk/src/auto/relation.rs +++ b/atk/src/auto/relation.rs @@ -43,17 +43,19 @@ pub trait RelationExt: 'static { fn add_target>(&self, target: &P); #[doc(alias = "atk_relation_get_relation_type")] - fn get_relation_type(&self) -> RelationType; + fn relation_type(&self) -> RelationType; #[doc(alias = "atk_relation_get_target")] - fn get_target(&self) -> Vec; + fn target(&self) -> Vec; #[doc(alias = "atk_relation_remove_target")] fn remove_target>(&self, target: &P) -> bool; - fn set_property_relation_type(&self, relation_type: RelationType); + #[doc(alias = "set_property_relation_type")] + fn set_relation_type(&self, relation_type: RelationType); - fn set_property_target(&self, target: Option<&glib::ValueArray>); + #[doc(alias = "set_property_target")] + fn set_target(&self, target: Option<&glib::ValueArray>); fn connect_property_relation_type_notify( &self, @@ -73,7 +75,7 @@ impl> RelationExt for O { } } - fn get_relation_type(&self) -> RelationType { + fn relation_type(&self) -> RelationType { unsafe { from_glib(ffi::atk_relation_get_relation_type( self.as_ref().to_glib_none().0, @@ -81,7 +83,7 @@ impl> RelationExt for O { } } - fn get_target(&self) -> Vec { + fn target(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::atk_relation_get_target( self.as_ref().to_glib_none().0, @@ -98,7 +100,7 @@ impl> RelationExt for O { } } - fn set_property_relation_type(&self, relation_type: RelationType) { + fn set_relation_type(&self, relation_type: RelationType) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -108,7 +110,7 @@ impl> RelationExt for O { } } - fn set_property_target(&self, target: Option<&glib::ValueArray>) { + fn set_target(&self, target: Option<&glib::ValueArray>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/atk/src/auto/relation_set.rs b/atk/src/auto/relation_set.rs index 60444ccc0218..1cf26952f493 100644 --- a/atk/src/auto/relation_set.rs +++ b/atk/src/auto/relation_set.rs @@ -47,7 +47,7 @@ pub trait RelationSetExt: 'static { fn contains_target>(&self, relationship: RelationType, target: &P) -> bool; #[doc(alias = "atk_relation_set_get_n_relations")] - fn get_n_relations(&self) -> i32; + fn n_relations(&self) -> i32; #[doc(alias = "atk_relation_set_get_relation")] fn get_relation(&self, i: i32) -> Option; @@ -98,7 +98,7 @@ impl> RelationSetExt for O { } } - fn get_n_relations(&self) -> i32 { + fn n_relations(&self) -> i32 { unsafe { ffi::atk_relation_set_get_n_relations(self.as_ref().to_glib_none().0) } } diff --git a/atk/src/auto/selection.rs b/atk/src/auto/selection.rs index 5a5e1ca62fdc..68aa69fa3aa9 100644 --- a/atk/src/auto/selection.rs +++ b/atk/src/auto/selection.rs @@ -30,7 +30,7 @@ pub trait SelectionExt: 'static { fn clear_selection(&self) -> bool; #[doc(alias = "atk_selection_get_selection_count")] - fn get_selection_count(&self) -> i32; + fn selection_count(&self) -> i32; #[doc(alias = "atk_selection_is_child_selected")] fn is_child_selected(&self, i: i32) -> bool; @@ -65,7 +65,7 @@ impl> SelectionExt for O { } } - fn get_selection_count(&self) -> i32 { + fn selection_count(&self) -> i32 { unsafe { ffi::atk_selection_get_selection_count(self.as_ref().to_glib_none().0) } } diff --git a/atk/src/auto/streamable_content.rs b/atk/src/auto/streamable_content.rs index d8f7f8848b22..20f6cb2985a9 100644 --- a/atk/src/auto/streamable_content.rs +++ b/atk/src/auto/streamable_content.rs @@ -21,7 +21,7 @@ pub trait StreamableContentExt: 'static { fn get_mime_type(&self, i: i32) -> Option; #[doc(alias = "atk_streamable_content_get_n_mime_types")] - fn get_n_mime_types(&self) -> i32; + fn n_mime_types(&self) -> i32; //#[doc(alias = "atk_streamable_content_get_stream")] //fn get_stream(&self, mime_type: &str) -> /*Ignored*/Option; @@ -40,7 +40,7 @@ impl> StreamableContentExt for O { } } - fn get_n_mime_types(&self) -> i32 { + fn n_mime_types(&self) -> i32 { unsafe { ffi::atk_streamable_content_get_n_mime_types(self.as_ref().to_glib_none().0) } } diff --git a/atk/src/auto/table.rs b/atk/src/auto/table.rs index 52b55b6a4d2b..bb2816fe0e09 100644 --- a/atk/src/auto/table.rs +++ b/atk/src/auto/table.rs @@ -30,7 +30,7 @@ pub trait TableExt: 'static { fn add_row_selection(&self, row: i32) -> bool; #[doc(alias = "atk_table_get_caption")] - fn get_caption(&self) -> Option; + fn caption(&self) -> Option; #[doc(alias = "atk_table_get_column_at_index")] fn get_column_at_index(&self, index_: i32) -> i32; @@ -48,10 +48,10 @@ pub trait TableExt: 'static { fn get_index_at(&self, row: i32, column: i32) -> i32; #[doc(alias = "atk_table_get_n_columns")] - fn get_n_columns(&self) -> i32; + fn n_columns(&self) -> i32; #[doc(alias = "atk_table_get_n_rows")] - fn get_n_rows(&self) -> i32; + fn n_rows(&self) -> i32; #[doc(alias = "atk_table_get_row_at_index")] fn get_row_at_index(&self, index_: i32) -> i32; @@ -66,7 +66,7 @@ pub trait TableExt: 'static { fn get_row_header(&self, row: i32) -> Option; #[doc(alias = "atk_table_get_summary")] - fn get_summary(&self) -> Option; + fn summary(&self) -> Option; #[doc(alias = "atk_table_is_column_selected")] fn is_column_selected(&self, column: i32) -> bool; @@ -138,7 +138,7 @@ impl> TableExt for O { } } - fn get_caption(&self) -> Option { + fn caption(&self) -> Option { unsafe { from_glib_none(ffi::atk_table_get_caption(self.as_ref().to_glib_none().0)) } } @@ -172,11 +172,11 @@ impl> TableExt for O { unsafe { ffi::atk_table_get_index_at(self.as_ref().to_glib_none().0, row, column) } } - fn get_n_columns(&self) -> i32 { + fn n_columns(&self) -> i32 { unsafe { ffi::atk_table_get_n_columns(self.as_ref().to_glib_none().0) } } - fn get_n_rows(&self) -> i32 { + fn n_rows(&self) -> i32 { unsafe { ffi::atk_table_get_n_rows(self.as_ref().to_glib_none().0) } } @@ -206,7 +206,7 @@ impl> TableExt for O { } } - fn get_summary(&self) -> Option { + fn summary(&self) -> Option { unsafe { from_glib_full(ffi::atk_table_get_summary(self.as_ref().to_glib_none().0)) } } diff --git a/atk/src/auto/table_cell.rs b/atk/src/auto/table_cell.rs index e561817ebf6a..b04f3c46e872 100644 --- a/atk/src/auto/table_cell.rs +++ b/atk/src/auto/table_cell.rs @@ -20,29 +20,29 @@ pub const NONE_TABLE_CELL: Option<&TableCell> = None; pub trait TableCellExt: 'static { #[doc(alias = "atk_table_cell_get_column_header_cells")] - fn get_column_header_cells(&self) -> Vec; + fn column_header_cells(&self) -> Vec; #[doc(alias = "atk_table_cell_get_column_span")] - fn get_column_span(&self) -> i32; + fn column_span(&self) -> i32; #[doc(alias = "atk_table_cell_get_position")] - fn get_position(&self) -> Option<(i32, i32)>; + fn position(&self) -> Option<(i32, i32)>; #[doc(alias = "atk_table_cell_get_row_column_span")] - fn get_row_column_span(&self) -> Option<(i32, i32, i32, i32)>; + fn row_column_span(&self) -> Option<(i32, i32, i32, i32)>; #[doc(alias = "atk_table_cell_get_row_header_cells")] - fn get_row_header_cells(&self) -> Vec; + fn row_header_cells(&self) -> Vec; #[doc(alias = "atk_table_cell_get_row_span")] - fn get_row_span(&self) -> i32; + fn row_span(&self) -> i32; #[doc(alias = "atk_table_cell_get_table")] - fn get_table(&self) -> Option; + fn table(&self) -> Option; } impl> TableCellExt for O { - fn get_column_header_cells(&self) -> Vec { + fn column_header_cells(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::atk_table_cell_get_column_header_cells( self.as_ref().to_glib_none().0, @@ -50,11 +50,11 @@ impl> TableCellExt for O { } } - fn get_column_span(&self) -> i32 { + fn column_span(&self) -> i32 { unsafe { ffi::atk_table_cell_get_column_span(self.as_ref().to_glib_none().0) } } - fn get_position(&self) -> Option<(i32, i32)> { + fn position(&self) -> Option<(i32, i32)> { unsafe { let mut row = mem::MaybeUninit::uninit(); let mut column = mem::MaybeUninit::uninit(); @@ -73,7 +73,7 @@ impl> TableCellExt for O { } } - fn get_row_column_span(&self) -> Option<(i32, i32, i32, i32)> { + fn row_column_span(&self) -> Option<(i32, i32, i32, i32)> { unsafe { let mut row = mem::MaybeUninit::uninit(); let mut column = mem::MaybeUninit::uninit(); @@ -98,7 +98,7 @@ impl> TableCellExt for O { } } - fn get_row_header_cells(&self) -> Vec { + fn row_header_cells(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::atk_table_cell_get_row_header_cells( self.as_ref().to_glib_none().0, @@ -106,11 +106,11 @@ impl> TableCellExt for O { } } - fn get_row_span(&self) -> i32 { + fn row_span(&self) -> i32 { unsafe { ffi::atk_table_cell_get_row_span(self.as_ref().to_glib_none().0) } } - fn get_table(&self) -> Option { + fn table(&self) -> Option { unsafe { from_glib_full(ffi::atk_table_cell_get_table( self.as_ref().to_glib_none().0, diff --git a/atk/src/auto/text.rs b/atk/src/auto/text.rs index 0595928ec913..20fac7641dc2 100644 --- a/atk/src/auto/text.rs +++ b/atk/src/auto/text.rs @@ -45,22 +45,22 @@ pub trait TextExt: 'static { ) -> Vec; #[doc(alias = "atk_text_get_caret_offset")] - fn get_caret_offset(&self) -> i32; + fn caret_offset(&self) -> i32; #[doc(alias = "atk_text_get_character_at_offset")] fn get_character_at_offset(&self, offset: i32) -> char; #[doc(alias = "atk_text_get_character_count")] - fn get_character_count(&self) -> i32; + fn character_count(&self) -> i32; #[doc(alias = "atk_text_get_character_extents")] fn get_character_extents(&self, offset: i32, coords: CoordType) -> (i32, i32, i32, i32); //#[doc(alias = "atk_text_get_default_attributes")] - //fn get_default_attributes(&self) -> /*Ignored*/Option; + //fn default_attributes(&self) -> /*Ignored*/Option; #[doc(alias = "atk_text_get_n_selections")] - fn get_n_selections(&self) -> i32; + fn n_selections(&self) -> i32; #[doc(alias = "atk_text_get_offset_at_point")] fn get_offset_at_point(&self, x: i32, y: i32, coords: CoordType) -> i32; @@ -170,7 +170,7 @@ impl> TextExt for O { } } - fn get_caret_offset(&self) -> i32 { + fn caret_offset(&self) -> i32 { unsafe { ffi::atk_text_get_caret_offset(self.as_ref().to_glib_none().0) } } @@ -184,7 +184,7 @@ impl> TextExt for O { } } - fn get_character_count(&self) -> i32 { + fn character_count(&self) -> i32 { unsafe { ffi::atk_text_get_character_count(self.as_ref().to_glib_none().0) } } @@ -211,11 +211,11 @@ impl> TextExt for O { } } - //fn get_default_attributes(&self) -> /*Ignored*/Option { + //fn default_attributes(&self) -> /*Ignored*/Option { // unsafe { TODO: call ffi:atk_text_get_default_attributes() } //} - fn get_n_selections(&self) -> i32 { + fn n_selections(&self) -> i32 { unsafe { ffi::atk_text_get_n_selections(self.as_ref().to_glib_none().0) } } diff --git a/atk/src/auto/value.rs b/atk/src/auto/value.rs index 7666a6e2771e..8a059fafd220 100644 --- a/atk/src/auto/value.rs +++ b/atk/src/auto/value.rs @@ -26,28 +26,28 @@ pub const NONE_VALUE: Option<&Value> = None; pub trait ValueExt: 'static { #[doc(alias = "atk_value_get_current_value")] - fn get_current_value(&self) -> glib::Value; + fn current_value(&self) -> glib::Value; #[doc(alias = "atk_value_get_increment")] - fn get_increment(&self) -> f64; + fn increment(&self) -> f64; #[doc(alias = "atk_value_get_maximum_value")] - fn get_maximum_value(&self) -> glib::Value; + fn maximum_value(&self) -> glib::Value; #[doc(alias = "atk_value_get_minimum_increment")] - fn get_minimum_increment(&self) -> glib::Value; + fn minimum_increment(&self) -> glib::Value; #[doc(alias = "atk_value_get_minimum_value")] - fn get_minimum_value(&self) -> glib::Value; + fn minimum_value(&self) -> glib::Value; #[doc(alias = "atk_value_get_range")] - fn get_range(&self) -> Option; + fn range(&self) -> Option; #[doc(alias = "atk_value_get_sub_ranges")] - fn get_sub_ranges(&self) -> Vec; + fn sub_ranges(&self) -> Vec; #[doc(alias = "atk_value_get_value_and_text")] - fn get_value_and_text(&self) -> (f64, glib::GString); + fn value_and_text(&self) -> (f64, glib::GString); #[doc(alias = "atk_value_set_current_value")] fn set_current_value(&self, value: &glib::Value) -> bool; @@ -59,7 +59,7 @@ pub trait ValueExt: 'static { } impl> ValueExt for O { - fn get_current_value(&self) -> glib::Value { + fn current_value(&self) -> glib::Value { unsafe { let mut value = glib::Value::uninitialized(); ffi::atk_value_get_current_value( @@ -70,11 +70,11 @@ impl> ValueExt for O { } } - fn get_increment(&self) -> f64 { + fn increment(&self) -> f64 { unsafe { ffi::atk_value_get_increment(self.as_ref().to_glib_none().0) } } - fn get_maximum_value(&self) -> glib::Value { + fn maximum_value(&self) -> glib::Value { unsafe { let mut value = glib::Value::uninitialized(); ffi::atk_value_get_maximum_value( @@ -85,7 +85,7 @@ impl> ValueExt for O { } } - fn get_minimum_increment(&self) -> glib::Value { + fn minimum_increment(&self) -> glib::Value { unsafe { let mut value = glib::Value::uninitialized(); ffi::atk_value_get_minimum_increment( @@ -96,7 +96,7 @@ impl> ValueExt for O { } } - fn get_minimum_value(&self) -> glib::Value { + fn minimum_value(&self) -> glib::Value { unsafe { let mut value = glib::Value::uninitialized(); ffi::atk_value_get_minimum_value( @@ -107,11 +107,11 @@ impl> ValueExt for O { } } - fn get_range(&self) -> Option { + fn range(&self) -> Option { unsafe { from_glib_full(ffi::atk_value_get_range(self.as_ref().to_glib_none().0)) } } - fn get_sub_ranges(&self) -> Vec { + fn sub_ranges(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::atk_value_get_sub_ranges( self.as_ref().to_glib_none().0, @@ -119,7 +119,7 @@ impl> ValueExt for O { } } - fn get_value_and_text(&self) -> (f64, glib::GString) { + fn value_and_text(&self) -> (f64, glib::GString) { unsafe { let mut value = mem::MaybeUninit::uninit(); let mut text = ptr::null_mut(); diff --git a/atk/src/auto/versions.txt b/atk/src/auto/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/atk/src/auto/versions.txt +++ b/atk/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/atk/src/table.rs b/atk/src/table.rs index 97628abdbb13..347807e1f7e4 100644 --- a/atk/src/table.rs +++ b/atk/src/table.rs @@ -6,14 +6,14 @@ use glib::translate::*; pub trait TableExtManual: 'static { #[doc(alias = "atk_table_get_selected_columns")] - fn get_selected_columns(&self) -> Vec; + fn selected_columns(&self) -> Vec; #[doc(alias = "atk_table_get_selected_rows")] - fn get_selected_rows(&self) -> Vec; + fn selected_rows(&self) -> Vec; } impl> TableExtManual for O { - fn get_selected_columns(&self) -> Vec { + fn selected_columns(&self) -> Vec { unsafe { let mut selected = ::std::ptr::null_mut(); let nb = @@ -26,7 +26,7 @@ impl> TableExtManual for O { } } - fn get_selected_rows(&self) -> Vec { + fn selected_rows(&self) -> Vec { unsafe { let mut selected = ::std::ptr::null_mut(); let nb = diff --git a/atk/sys/versions.txt b/atk/sys/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/atk/sys/versions.txt +++ b/atk/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/cairo/src/context.rs b/cairo/src/context.rs index 327fa0310bf3..cdf8e7baa8c4 100644 --- a/cairo/src/context.rs +++ b/cairo/src/context.rs @@ -173,7 +173,7 @@ impl Context { self.status() } - pub fn get_target(&self) -> Surface { + pub fn target(&self) -> Surface { unsafe { Surface::from_raw_none(ffi::cairo_get_target(self.0.as_ptr())) } } @@ -193,7 +193,7 @@ impl Context { unsafe { ffi::cairo_pop_group_to_source(self.0.as_ptr()) } } - pub fn get_group_target(&self) -> Surface { + pub fn group_target(&self) -> Surface { unsafe { Surface::from_raw_none(ffi::cairo_get_group_target(self.0.as_ptr())) } } @@ -212,7 +212,7 @@ impl Context { self.status().expect("Failed to set source"); } - pub fn get_source(&self) -> Pattern { + pub fn source(&self) -> Pattern { unsafe { Pattern::from_raw_none(ffi::cairo_get_source(self.0.as_ptr())) } } @@ -227,7 +227,7 @@ impl Context { self.status().expect("Failed to set antialias"); } - pub fn get_antialias(&self) -> Antialias { + pub fn antialias(&self) -> Antialias { unsafe { Antialias::from(ffi::cairo_get_antialias(self.0.as_ptr())) } } @@ -243,12 +243,12 @@ impl Context { self.status().expect("Failed to set a dash"); //Possible invalid dashes value } - pub fn get_dash_count(&self) -> i32 { + pub fn dash_count(&self) -> i32 { unsafe { ffi::cairo_get_dash_count(self.0.as_ptr()) } } - pub fn get_dash(&self) -> (Vec, f64) { - let dash_count = self.get_dash_count() as usize; + pub fn dash(&self) -> (Vec, f64) { + let dash_count = self.dash_count() as usize; let mut dashes: Vec = Vec::with_capacity(dash_count); let mut offset: f64 = 0.0; @@ -259,13 +259,13 @@ impl Context { } } - pub fn get_dash_dashes(&self) -> Vec { - let (dashes, _) = self.get_dash(); + pub fn dash_dashes(&self) -> Vec { + let (dashes, _) = self.dash(); dashes } - pub fn get_dash_offset(&self) -> f64 { - let (_, offset) = self.get_dash(); + pub fn dash_offset(&self) -> f64 { + let (_, offset) = self.dash(); offset } @@ -276,7 +276,7 @@ impl Context { self.status().expect("Failed to set fill rule"); } - pub fn get_fill_rule(&self) -> FillRule { + pub fn fill_rule(&self) -> FillRule { unsafe { FillRule::from(ffi::cairo_get_fill_rule(self.0.as_ptr())) } } @@ -285,7 +285,7 @@ impl Context { self.status().expect("Failed to set line cap"); } - pub fn get_line_cap(&self) -> LineCap { + pub fn line_cap(&self) -> LineCap { unsafe { LineCap::from(ffi::cairo_get_line_cap(self.0.as_ptr())) } } @@ -294,7 +294,7 @@ impl Context { self.status().expect("Failed to set line join"); } - pub fn get_line_join(&self) -> LineJoin { + pub fn line_join(&self) -> LineJoin { unsafe { LineJoin::from(ffi::cairo_get_line_join(self.0.as_ptr())) } } @@ -303,7 +303,7 @@ impl Context { self.status().expect("Failed to set line width"); } - pub fn get_line_width(&self) -> f64 { + pub fn line_width(&self) -> f64 { unsafe { ffi::cairo_get_line_width(self.0.as_ptr()) } } @@ -312,7 +312,7 @@ impl Context { self.status().expect("Failed to set miter limit"); } - pub fn get_miter_limit(&self) -> f64 { + pub fn miter_limit(&self) -> f64 { unsafe { ffi::cairo_get_miter_limit(self.0.as_ptr()) } } @@ -322,7 +322,7 @@ impl Context { } } - pub fn get_operator(&self) -> Operator { + pub fn operator(&self) -> Operator { unsafe { Operator::from(ffi::cairo_get_operator(self.0.as_ptr())) } } @@ -331,7 +331,7 @@ impl Context { self.status().expect("Failed to set tolerance"); } - pub fn get_tolerance(&self) -> f64 { + pub fn tolerance(&self) -> f64 { unsafe { ffi::cairo_get_tolerance(self.0.as_ptr()) } } @@ -450,7 +450,7 @@ impl Context { unsafe { ffi::cairo_show_page(self.0.as_ptr()) } } - pub fn get_reference_count(&self) -> u32 { + pub fn reference_count(&self) -> u32 { unsafe { ffi::cairo_get_reference_count(self.0.as_ptr()) } } @@ -480,7 +480,7 @@ impl Context { } } - pub fn get_matrix(&self) -> Matrix { + pub fn matrix(&self) -> Matrix { let mut matrix = Matrix::null(); unsafe { ffi::cairo_get_matrix(self.0.as_ptr(), matrix.mut_ptr()); @@ -543,7 +543,7 @@ impl Context { unsafe { ffi::cairo_set_font_matrix(self.0.as_ptr(), matrix.ptr()) } } - pub fn get_font_matrix(&self) -> Matrix { + pub fn font_matrix(&self) -> Matrix { let mut matrix = Matrix::null(); unsafe { ffi::cairo_get_font_matrix(self.0.as_ptr(), matrix.mut_ptr()); @@ -555,7 +555,7 @@ impl Context { unsafe { ffi::cairo_set_font_options(self.0.as_ptr(), options.to_raw_none()) } } - pub fn get_font_options(&self) -> FontOptions { + pub fn font_options(&self) -> FontOptions { let out = FontOptions::new(); unsafe { ffi::cairo_get_font_options(self.0.as_ptr(), out.to_raw_none()); @@ -567,7 +567,7 @@ impl Context { unsafe { ffi::cairo_set_font_face(self.0.as_ptr(), font_face.to_raw_none()) } } - pub fn get_font_face(&self) -> FontFace { + pub fn font_face(&self) -> FontFace { unsafe { FontFace::from_raw_none(ffi::cairo_get_font_face(self.0.as_ptr())) } } @@ -575,7 +575,7 @@ impl Context { unsafe { ffi::cairo_set_scaled_font(self.0.as_ptr(), scaled_font.to_raw_none()) } } - pub fn get_scaled_font(&self) -> ScaledFont { + pub fn scaled_font(&self) -> ScaledFont { unsafe { ScaledFont::from_raw_none(ffi::cairo_get_scaled_font(self.0.as_ptr())) } } @@ -685,7 +685,7 @@ impl Context { unsafe { ffi::cairo_has_current_point(self.0.as_ptr()).as_bool() } } - pub fn get_current_point(&self) -> (f64, f64) { + pub fn current_point(&self) -> (f64, f64) { unsafe { let mut x = 0.0; let mut y = 0.0; @@ -804,7 +804,7 @@ mod tests { #[test] fn drop_non_reference_pattern_from_ctx() { let ctx = create_ctx(); - ctx.get_source(); + ctx.source(); } #[test] diff --git a/cairo/src/device.rs b/cairo/src/device.rs index c785e368de9c..be5435a72dce 100644 --- a/cairo/src/device.rs +++ b/cairo/src/device.rs @@ -83,7 +83,7 @@ impl Device { #[cfg(any(feature = "script", feature = "dox"))] #[doc(alias = "cairo_script_get_mode")] - pub fn get_mode(&self) -> ScriptMode { + pub fn mode(&self) -> ScriptMode { unsafe { ScriptMode::from(ffi::cairo_script_get_mode(self.to_raw_none())) } } @@ -145,7 +145,7 @@ impl Device { } #[doc(alias = "cairo_device_get_type")] - pub fn get_type(&self) -> DeviceType { + pub fn type_(&self) -> DeviceType { unsafe { DeviceType::from(ffi::cairo_device_get_type(self.to_raw_none())) } } @@ -196,7 +196,7 @@ impl Device { #[doc(alias = "cairo_xlib_device_debug_cap_xrender_version")] pub fn debug_cap_xrender_version(&self, major_version: i32, minor_version: i32) { unsafe { - match self.get_type() { + match self.type_() { DeviceType::Xlib => { #[cfg(feature = "xlib")] { @@ -234,7 +234,7 @@ impl Device { #[doc(alias = "cairo_xlib_device_debug_get_precision")] pub fn debug_get_precision(&self) -> i32 { unsafe { - match self.get_type() { + match self.type_() { DeviceType::Xlib => { #[cfg(feature = "xlib")] { @@ -264,7 +264,7 @@ impl Device { #[doc(alias = "cairo_xlib_device_debug_set_precision")] pub fn debug_set_precision(&self, precision: i32) { unsafe { - match self.get_type() { + match self.type_() { DeviceType::Xlib => { #[cfg(feature = "xlib")] { diff --git a/cairo/src/font/font_face.rs b/cairo/src/font/font_face.rs index e0f7ff4db90a..952b984e428a 100644 --- a/cairo/src/font/font_face.rs +++ b/cairo/src/font/font_face.rs @@ -122,18 +122,18 @@ impl FontFace { } #[doc(alias = "cairo_font_face_get_type")] - pub fn get_type(&self) -> FontType { + pub fn type_(&self) -> FontType { unsafe { FontType::from(ffi::cairo_font_face_get_type(self.to_raw_none())) } } #[doc(alias = "cairo_font_face_get_reference_count")] - pub fn get_reference_count(&self) -> usize { + pub fn reference_count(&self) -> usize { unsafe { ffi::cairo_font_face_get_reference_count(self.to_raw_none()) as usize } } #[doc(alias = "cairo_ft_font_face_get_synthesize")] #[cfg(any(feature = "freetype", feature = "dox"))] - pub fn get_synthesize(&self) -> FtSynthesize { + pub fn synthesize(&self) -> FtSynthesize { unsafe { FtSynthesize::from(ffi::cairo_ft_font_face_get_synthesize(self.to_raw_none())) } } diff --git a/cairo/src/font/font_options.rs b/cairo/src/font/font_options.rs index 818f881f0804..12e86a7e67b8 100644 --- a/cairo/src/font/font_options.rs +++ b/cairo/src/font/font_options.rs @@ -80,7 +80,7 @@ impl FontOptions { } #[doc(alias = "cairo_font_options_get_antialias")] - pub fn get_antialias(&self) -> Antialias { + pub fn antialias(&self) -> Antialias { unsafe { Antialias::from(ffi::cairo_font_options_get_antialias(self.to_raw_none())) } } @@ -90,7 +90,7 @@ impl FontOptions { } #[doc(alias = "cairo_font_options_get_subpixel_order")] - pub fn get_subpixel_order(&self) -> SubpixelOrder { + pub fn subpixel_order(&self) -> SubpixelOrder { unsafe { SubpixelOrder::from(ffi::cairo_font_options_get_subpixel_order( self.to_raw_none(), @@ -104,7 +104,7 @@ impl FontOptions { } #[doc(alias = "cairo_font_options_get_hint_style")] - pub fn get_hint_style(&self) -> HintStyle { + pub fn hint_style(&self) -> HintStyle { unsafe { HintStyle::from(ffi::cairo_font_options_get_hint_style(self.to_raw_none())) } } @@ -114,13 +114,13 @@ impl FontOptions { } #[doc(alias = "cairo_font_options_get_hint_metrics")] - pub fn get_hint_metrics(&self) -> HintMetrics { + pub fn hint_metrics(&self) -> HintMetrics { unsafe { HintMetrics::from(ffi::cairo_font_options_get_hint_metrics(self.to_raw_none())) } } #[cfg(any(feature = "v1_16", feature = "dox"))] #[doc(alias = "cairo_font_options_get_variations")] - pub fn get_variations(&self) -> Option { + pub fn variations(&self) -> Option { unsafe { to_optional_string(ffi::cairo_font_options_get_variations(self.to_raw_none())) } } diff --git a/cairo/src/font/scaled_font.rs b/cairo/src/font/scaled_font.rs index 1e4270bac14d..e1cd0773a971 100644 --- a/cairo/src/font/scaled_font.rs +++ b/cairo/src/font/scaled_font.rs @@ -83,12 +83,12 @@ impl ScaledFont { } #[doc(alias = "cairo_scaled_font_get_type")] - pub fn get_type(&self) -> FontType { + pub fn type_(&self) -> FontType { unsafe { FontType::from(ffi::cairo_scaled_font_get_type(self.to_raw_none())) } } #[doc(alias = "cairo_scaled_font_get_reference_count")] - pub fn get_reference_count(&self) -> usize { + pub fn reference_count(&self) -> usize { unsafe { ffi::cairo_scaled_font_get_reference_count(self.to_raw_none()) as usize } } @@ -206,12 +206,12 @@ impl ScaledFont { } #[doc(alias = "cairo_scaled_font_get_font_face")] - pub fn get_font_face(&self) -> FontFace { + pub fn font_face(&self) -> FontFace { unsafe { FontFace::from_raw_none(ffi::cairo_scaled_font_get_font_face(self.to_raw_none())) } } #[doc(alias = "cairo_scaled_font_get_font_options")] - pub fn get_font_options(&self) -> FontOptions { + pub fn font_options(&self) -> FontOptions { let options = FontOptions::new(); unsafe { @@ -222,7 +222,7 @@ impl ScaledFont { } #[doc(alias = "cairo_scaled_font_get_font_matrix")] - pub fn get_font_matrix(&self) -> Matrix { + pub fn font_matrix(&self) -> Matrix { let mut matrix = Matrix::null(); unsafe { ffi::cairo_scaled_font_get_font_matrix(self.to_raw_none(), matrix.mut_ptr()) } @@ -231,7 +231,7 @@ impl ScaledFont { } #[doc(alias = "cairo_scaled_font_get_ctm")] - pub fn get_ctm(&self) -> Matrix { + pub fn ctm(&self) -> Matrix { let mut matrix = Matrix::null(); unsafe { ffi::cairo_scaled_font_get_ctm(self.to_raw_none(), matrix.mut_ptr()) } @@ -240,7 +240,7 @@ impl ScaledFont { } #[doc(alias = "cairo_scaled_font_get_scale_matrix")] - pub fn get_scale_matrix(&self) -> Matrix { + pub fn scale_matrix(&self) -> Matrix { let mut matrix = Matrix::null(); unsafe { ffi::cairo_scaled_font_get_scale_matrix(self.to_raw_none(), matrix.mut_ptr()) } diff --git a/cairo/src/image_surface.rs b/cairo/src/image_surface.rs index 1270b42a993c..9e665afbe7b7 100644 --- a/cairo/src/image_surface.rs +++ b/cairo/src/image_surface.rs @@ -87,7 +87,7 @@ impl ImageSurface { } #[doc(alias = "cairo_image_surface_get_data")] - pub fn get_data(&mut self) -> Result { + pub fn data(&mut self) -> Result { unsafe { if ffi::cairo_surface_get_reference_count(self.to_raw_none()) > 1 { return Err(BorrowError::NonExclusive); @@ -117,29 +117,29 @@ impl ImageSurface { if ptr.is_null() || is_finished(self) { return Err(BorrowError::from(Error::SurfaceFinished)); } - let len = self.get_height() as usize * self.get_stride() as usize; + let len = self.height() as usize * self.stride() as usize; f(slice::from_raw_parts(ptr, len)); } Ok(()) } #[doc(alias = "cairo_image_surface_get_format")] - pub fn get_format(&self) -> Format { + pub fn format(&self) -> Format { unsafe { Format::from(ffi::cairo_image_surface_get_format(self.to_raw_none())) } } #[doc(alias = "cairo_image_surface_get_height")] - pub fn get_height(&self) -> i32 { + pub fn height(&self) -> i32 { unsafe { ffi::cairo_image_surface_get_height(self.to_raw_none()) } } #[doc(alias = "cairo_image_surface_get_stride")] - pub fn get_stride(&self) -> i32 { + pub fn stride(&self) -> i32 { unsafe { ffi::cairo_image_surface_get_stride(self.to_raw_none()) } } #[doc(alias = "cairo_image_surface_get_width")] - pub fn get_width(&self) -> i32 { + pub fn width(&self) -> i32 { unsafe { ffi::cairo_image_surface_get_width(self.to_raw_none()) } } } @@ -156,7 +156,7 @@ impl<'a> ImageSurfaceData<'a> { unsafe { let ptr = ffi::cairo_image_surface_get_data(surface.to_raw_none()); debug_assert!(!ptr.is_null()); - let len = (surface.get_stride() as usize) * (surface.get_height() as usize); + let len = (surface.stride() as usize) * (surface.height() as usize); ImageSurfaceData { surface, slice: slice::from_raw_parts_mut(ptr, len), @@ -234,6 +234,6 @@ mod tests { surf.finish(); - assert!(surf.get_data().is_err()); + assert!(surf.data().is_err()); } } diff --git a/cairo/src/image_surface_png.rs b/cairo/src/image_surface_png.rs index 169d08514ac1..d554998e401d 100644 --- a/cairo/src/image_surface_png.rs +++ b/cairo/src/image_surface_png.rs @@ -164,11 +164,11 @@ mod tests { assert!(r.is_ok()); let mut surface = r.unwrap(); - assert!(surface.get_width() == 1); - assert!(surface.get_height() == 1); - assert!(surface.get_format() == Format::Rgb24); + assert!(surface.width() == 1); + assert!(surface.height() == 1); + assert!(surface.format() == Format::Rgb24); - let data = surface.get_data().unwrap(); + let data = surface.data().unwrap(); assert!(data.len() >= 3); let slice = &data[0..3]; diff --git a/cairo/src/patterns.rs b/cairo/src/patterns.rs index 1e94fe7ddf60..0339e834e66a 100644 --- a/cairo/src/patterns.rs +++ b/cairo/src/patterns.rs @@ -44,12 +44,12 @@ impl Pattern { } #[doc(alias = "cairo_pattern_get_type")] - pub fn get_type(&self) -> PatternType { + pub fn type_(&self) -> PatternType { unsafe { ffi::cairo_pattern_get_type(self.pointer).into() } } #[doc(alias = "cairo_pattern_get_reference_count")] - pub fn get_reference_count(&self) -> isize { + pub fn reference_count(&self) -> isize { unsafe { ffi::cairo_pattern_get_reference_count(self.pointer) as isize } } @@ -59,7 +59,7 @@ impl Pattern { } #[doc(alias = "cairo_pattern_get_extend")] - pub fn get_extend(&self) -> Extend { + pub fn extend(&self) -> Extend { unsafe { Extend::from(ffi::cairo_pattern_get_extend(self.pointer)) } } @@ -69,7 +69,7 @@ impl Pattern { } #[doc(alias = "cairo_pattern_get_filter")] - pub fn get_filter(&self) -> Filter { + pub fn filter(&self) -> Filter { unsafe { Filter::from(ffi::cairo_pattern_get_filter(self.pointer)) } } @@ -79,7 +79,7 @@ impl Pattern { } #[doc(alias = "cairo_pattern_get_matrix")] - pub fn get_matrix(&self) -> Matrix { + pub fn matrix(&self) -> Matrix { let mut matrix = Matrix::null(); unsafe { ffi::cairo_pattern_get_matrix(self.pointer, matrix.mut_ptr()); @@ -113,7 +113,7 @@ macro_rules! convert { type Error = $source; fn try_from(pattern: $source) -> Result { - if $( pattern.get_type() == PatternType::$variant )||+ { + if $( pattern.type_() == PatternType::$variant )||+ { $( let pattern = $intermediate(pattern); )* @@ -176,7 +176,7 @@ impl SolidPattern { } #[doc(alias = "cairo_pattern_get_rgba")] - pub fn get_rgba(&self) -> (f64, f64, f64, f64) { + pub fn rgba(&self) -> (f64, f64, f64, f64) { unsafe { let mut red = 0.0; let mut green = 0.0; @@ -214,7 +214,7 @@ impl Gradient { } #[doc(alias = "cairo_pattern_get_color_stop_count")] - pub fn get_color_stop_count(&self) -> isize { + pub fn color_stop_count(&self) -> isize { unsafe { let mut count = 0; let status = ffi::cairo_pattern_get_color_stop_count(self.pointer, &mut count); @@ -285,7 +285,7 @@ impl LinearGradient { } #[doc(alias = "cairo_pattern_get_linear_points")] - pub fn get_linear_points(&self) -> (f64, f64, f64, f64) { + pub fn linear_points(&self) -> (f64, f64, f64, f64) { unsafe { let mut x0 = 0.0; let mut y0 = 0.0; @@ -318,7 +318,7 @@ impl RadialGradient { } #[doc(alias = "cairo_pattern_get_radial_circles")] - pub fn get_radial_circles(&self) -> (f64, f64, f64, f64, f64, f64) { + pub fn radial_circles(&self) -> (f64, f64, f64, f64, f64, f64) { unsafe { let mut x0 = 0.0; let mut y0 = 0.0; @@ -355,7 +355,7 @@ impl SurfacePattern { } #[doc(alias = "cairo_pattern_get_surface")] - pub fn get_surface(&self) -> Surface { + pub fn surface(&self) -> Surface { unsafe { let mut surface_ptr: *mut cairo_surface_t = ptr::null_mut(); let status = ffi::cairo_pattern_get_surface(self.pointer, &mut surface_ptr); @@ -490,7 +490,7 @@ impl Mesh { } #[doc(alias = "cairo_mesh_pattern_get_patch_count")] - pub fn get_patch_count(&self) -> usize { + pub fn patch_count(&self) -> usize { let mut count: c_uint = 0; unsafe { let status = ffi::cairo_mesh_pattern_get_patch_count(self.pointer, &mut count); diff --git a/cairo/src/ps.rs b/cairo/src/ps.rs index 336f6227a477..e910b352e62c 100644 --- a/cairo/src/ps.rs +++ b/cairo/src/ps.rs @@ -60,7 +60,7 @@ impl PsSurface { } #[doc(alias = "cairo_ps_surface_get_eps")] - pub fn get_eps(&self) -> bool { + pub fn is_eps(&self) -> bool { unsafe { ffi::cairo_ps_surface_get_eps(self.0.to_raw_none()).as_bool() } } @@ -150,7 +150,7 @@ mod test { let buffer: Vec = vec![]; let surface = PsSurface::for_stream(100., 100., buffer).unwrap(); surface.set_eps(true); - assert_eq!(surface.get_eps(), true); + assert!(surface.is_eps()); } #[test] diff --git a/cairo/src/quartz_surface.rs b/cairo/src/quartz_surface.rs index a65f13443f81..07dcc1a38a45 100644 --- a/cairo/src/quartz_surface.rs +++ b/cairo/src/quartz_surface.rs @@ -40,7 +40,7 @@ impl QuartzSurface { } #[doc(alias = "cairo_quartz_surface_get_cg_context")] - pub fn get_cg_context(&self) -> CGContextRef { + pub fn cg_context(&self) -> CGContextRef { unsafe { ffi::cairo_quartz_surface_get_cg_context(self.to_raw_none()) } } } diff --git a/cairo/src/recording_surface.rs b/cairo/src/recording_surface.rs index a0f1b636d03c..f823dd5e583b 100644 --- a/cairo/src/recording_surface.rs +++ b/cairo/src/recording_surface.rs @@ -34,7 +34,7 @@ impl RecordingSurface { } #[doc(alias = "cairo_recording_surface_get_extents")] - pub fn get_extents(&self) -> Option { + pub fn extents(&self) -> Option { unsafe { let rectangle: Rectangle = ::std::mem::zeroed(); if ffi::cairo_recording_surface_get_extents(self.to_raw_none(), rectangle.to_raw_none()) diff --git a/cairo/src/surface.rs b/cairo/src/surface.rs index 660506d851dd..b95d0bf3eee2 100644 --- a/cairo/src/surface.rs +++ b/cairo/src/surface.rs @@ -157,7 +157,7 @@ impl Surface { } #[doc(alias = "cairo_surface_get_device")] - pub fn get_device(&self) -> Option { + pub fn device(&self) -> Option { unsafe { let device = ffi::cairo_surface_get_device(self.to_raw_none()); if device.is_null() { @@ -174,7 +174,7 @@ impl Surface { } #[doc(alias = "cairo_surface_get_device_offset")] - pub fn get_device_offset(&self) -> (f64, f64) { + pub fn device_offset(&self) -> (f64, f64) { let mut x_offset = 0.0f64; let mut y_offset = 0.0f64; unsafe { @@ -191,7 +191,7 @@ impl Surface { #[cfg(any(feature = "v1_14", feature = "dox"))] #[doc(alias = "cairo_surface_get_device_scale")] - pub fn get_device_scale(&self) -> (f64, f64) { + pub fn device_scale(&self) -> (f64, f64) { let mut x_scale = 0.0f64; let mut y_scale = 0.0f64; unsafe { @@ -212,7 +212,7 @@ impl Surface { } #[doc(alias = "cairo_surface_get_fallback_resolution")] - pub fn get_fallback_resolution(&self) -> (f64, f64) { + pub fn fallback_resolution(&self) -> (f64, f64) { let mut x_pixels_per_inch = 0.0f64; let mut y_pixels_per_inch = 0.0f64; unsafe { @@ -354,7 +354,7 @@ impl Surface { } #[doc(alias = "cairo_surface_get_type")] - pub fn get_type(&self) -> SurfaceType { + pub fn type_(&self) -> SurfaceType { unsafe { SurfaceType::from(ffi::cairo_surface_get_type(self.0.as_ptr())) } } } diff --git a/cairo/src/surface_macros.rs b/cairo/src/surface_macros.rs index 605e1ac72dc6..749c01da1c9b 100644 --- a/cairo/src/surface_macros.rs +++ b/cairo/src/surface_macros.rs @@ -10,7 +10,7 @@ macro_rules! declare_surface { type Error = Surface; fn try_from(surface: Surface) -> Result<$surf_name, Surface> { - if surface.get_type() == $surf_type { + if surface.type_() == $surf_type { Ok($surf_name(surface)) } else { Err(surface) diff --git a/cairo/src/svg.rs b/cairo/src/svg.rs index e797e6b0b52c..0e330e3c51f1 100644 --- a/cairo/src/svg.rs +++ b/cairo/src/svg.rs @@ -101,7 +101,7 @@ impl SvgSurface { #[cfg(any(all(feature = "svg", feature = "v1_16"), feature = "dox"))] #[doc(alias = "cairo_svg_surface_get_document_unit")] - pub fn get_document_unit(&self) -> SvgUnit { + pub fn document_unit(&self) -> SvgUnit { unsafe { SvgUnit::from(ffi::cairo_svg_surface_get_document_unit( self.0.to_raw_none(), diff --git a/cairo/src/xcb.rs b/cairo/src/xcb.rs index a11f58839b57..156c3a030fa7 100644 --- a/cairo/src/xcb.rs +++ b/cairo/src/xcb.rs @@ -426,7 +426,7 @@ impl fmt::Display for XCBVisualType { impl crate::device::Device { #[doc(alias = "cairo_xcb_device_get_connection")] - pub fn get_connection(&self) -> XCBConnection { + pub fn connection(&self) -> XCBConnection { unsafe { XCBConnection::from_raw_full(ffi::cairo_xcb_device_get_connection(self.to_raw_none())) } diff --git a/examples/accessibility/main.rs b/examples/accessibility/main.rs index c6a3b43f9271..697c62504ada 100644 --- a/examples/accessibility/main.rs +++ b/examples/accessibility/main.rs @@ -11,7 +11,7 @@ fn build_ui(application: >k::Application) { let label = gtk::Label::new(Some("0")); let vbox = gtk::Box::new(gtk::Orientation::Vertical, 0); - if let (Some(button_obj), Some(label_obj)) = (button.get_accessible(), label.get_accessible()) { + if let (Some(button_obj), Some(label_obj)) = (button.accessible(), label.accessible()) { // We set the description button_obj.set_description("Button to increase label value"); @@ -30,7 +30,7 @@ fn build_ui(application: >k::Application) { window.add(&vbox); button.connect_clicked(move |_| { - let value = label.get_text().parse().unwrap_or(0) + 1; + let value = label.text().parse().unwrap_or(0) + 1; label.set_text(&value.to_string()); }); diff --git a/examples/cairo_test/main.rs b/examples/cairo_test/main.rs index a8b78b220d0d..567fa4889e85 100644 --- a/examples/cairo_test/main.rs +++ b/examples/cairo_test/main.rs @@ -8,7 +8,7 @@ use gtk::cairo::{Context, FontSlant, FontWeight}; fn build_ui(application: >k::Application) { drawable(application, 500, 500, |_, cr| { cr.set_dash(&[3., 2., 1.], 1.); - assert_eq!(cr.get_dash(), (vec![3., 2., 1.], 1.)); + assert_eq!(cr.dash(), (vec![3., 2., 1.], 1.)); cr.scale(500f64, 500f64); diff --git a/examples/child_properties/main.rs b/examples/child_properties/main.rs index 3cdebdbc2a39..f57f8fa51dde 100644 --- a/examples/child_properties/main.rs +++ b/examples/child_properties/main.rs @@ -22,7 +22,7 @@ fn build_ui(application: >k::Application) { vbox.add(&minus_button); minus_button.connect_clicked(glib::clone!(@weak counter_label => move |_| { - let nb = counter_label.get_text() + let nb = counter_label.text() .parse() .unwrap_or(0); if nb > 0 { @@ -30,7 +30,7 @@ fn build_ui(application: >k::Application) { } })); plus_button.connect_clicked(glib::clone!(@weak counter_label => move |_| { - let nb = counter_label.get_text() + let nb = counter_label.text() .parse() .unwrap_or(0); counter_label.set_text(&format!("{}", nb + 1)); diff --git a/examples/clipboard_simple/main.rs b/examples/clipboard_simple/main.rs index 6d6028cac686..b6f041cf2967 100644 --- a/examples/clipboard_simple/main.rs +++ b/examples/clipboard_simple/main.rs @@ -76,22 +76,22 @@ fn build_ui(application: >k::Application) { let mut s = String::new(); GLOBAL.with(|global| { if let Some(ref ui) = *global.borrow() { - if ui.button_a1.get_active() { + if ui.button_a1.is_active() { s.push('1'); } else { s.push('0'); } - if ui.button_a2.get_active() { + if ui.button_a2.is_active() { s.push('1'); } else { s.push('0'); } - if ui.button_b1.get_active() { + if ui.button_b1.is_active() { s.push('1'); } else { s.push('0'); } - if ui.button_b2.get_active() { + if ui.button_b2.is_active() { s.push('1'); } else { s.push('0'); diff --git a/examples/drag_drop/main.rs b/examples/drag_drop/main.rs index ae53b4bb78c3..6d8556a6ce53 100644 --- a/examples/drag_drop/main.rs +++ b/examples/drag_drop/main.rs @@ -33,7 +33,7 @@ fn build_ui(application: >k::Application) { let label = gtk::Label::new(Some("Drop here")); label.drag_dest_set(gtk::DestDefaults::ALL, &targets, gdk::DragAction::COPY); label.connect_drag_data_received(|w, _, _, _, s, _, _| { - w.set_text(&s.get_text().expect("Couldn't get text")); + w.set_text(&s.text().expect("Couldn't get text")); }); // Stack the button and label horizontally diff --git a/examples/drag_drop_text_view/main.rs b/examples/drag_drop_text_view/main.rs index 63111efeee24..24ca10fef57a 100644 --- a/examples/drag_drop_text_view/main.rs +++ b/examples/drag_drop_text_view/main.rs @@ -41,17 +41,17 @@ fn build_ui(application: >k::Application) { // the URL list we're looking for. text_view.connect_drag_data_received(|w, _, _, _, d, _, _| { // Get the text buffer for the TextView and clear it to make it ready to accept new text. - let buffer = w.get_buffer().unwrap(); + let buffer = w.buffer().unwrap(); buffer.set_text(""); // Since we only accept `text/uri-list`s here, we don't need to check first, we can simply // iterate through all of the accepted URIs. - for file in d.get_uris() { + for file in d.uris() { let file = gio::File::new_for_uri(&file); let display_name = if file.is_native() { - file.get_path().unwrap().display().to_string() + file.path().unwrap().display().to_string() } else { - file.get_uri().into() + file.uri().into() }; let bulleted_file_path = format!(" • {}\n", &display_name); // We make sure to always insert this at the end of the text buffer so they're in diff --git a/examples/gio_async_tls/main.rs b/examples/gio_async_tls/main.rs index aebcb9b52e19..0d4fec49463b 100644 --- a/examples/gio_async_tls/main.rs +++ b/examples/gio_async_tls/main.rs @@ -24,13 +24,13 @@ async fn run() -> Result<(), Box> { // Get the input/output streams and convert them to the AsyncRead and AsyncWrite adapters let ostream = connection - .get_output_stream() + .output_stream() .dynamic_cast::() .unwrap(); let write = ostream.into_async_write().unwrap(); let istream = connection - .get_input_stream() + .input_stream() .dynamic_cast::() .unwrap(); let read = istream.into_async_read().unwrap(); diff --git a/examples/gio_task/file_size/ffi.rs b/examples/gio_task/file_size/ffi.rs index 2d1ac87c1f57..1d5a09a9da46 100644 --- a/examples/gio_task/file_size/ffi.rs +++ b/examples/gio_task/file_size/ffi.rs @@ -40,11 +40,11 @@ pub unsafe extern "C" fn my_file_size_get_file_size_async( .query_info_async_future("*", gio::FileQueryInfoFlags::NONE, glib::PRIORITY_DEFAULT) .await .unwrap() - .get_size(); + .size(); let source_object = task .upcast_ref::() - .get_source_object() + .source_object() .unwrap(); let source_object = super::imp::FileSize::from_instance( diff --git a/examples/gio_task/file_size/mod.rs b/examples/gio_task/file_size/mod.rs index b4e07b412429..3631674a0e3d 100644 --- a/examples/gio_task/file_size/mod.rs +++ b/examples/gio_task/file_size/mod.rs @@ -51,11 +51,11 @@ impl FileSize { .query_info_async_future("*", gio::FileQueryInfoFlags::NONE, glib::PRIORITY_DEFAULT) .await .unwrap() - .get_size(); + .size(); let source_object = task .upcast_ref::() - .get_source_object() + .source_object() .unwrap(); let source_object = diff --git a/examples/gtk_test/main.rs b/examples/gtk_test/main.rs index 8409b7954736..82771662d801 100644 --- a/examples/gtk_test/main.rs +++ b/examples/gtk_test/main.rs @@ -35,7 +35,7 @@ fn build_ui(application: >k::Application) { let scale: Scale = builder.get_object("scale").expect("Couldn't get scale"); scale.connect_format_value(|scale, value| { - let digits = scale.get_digits() as usize; + let digits = scale.digits() as usize; format!("<{:.*}>", digits, value) }); @@ -43,7 +43,7 @@ fn build_ui(application: >k::Application) { .get_object("spin_button") .expect("Couldn't get spin_button"); spin_button.connect_input(|spin_button| { - let text = spin_button.get_text(); + let text = spin_button.text(); println!("spin_button_input: \"{}\"", text); match text.parse::() { Ok(value) if value >= 90. => { @@ -120,7 +120,7 @@ fn build_ui(application: >k::Application) { dialog.connect_response(|dialog, response| { if response == ResponseType::Ok { - let files = dialog.get_filenames(); + let files = dialog.filenames(); println!("Files: {:?}", files); } dialog.close(); @@ -133,7 +133,7 @@ fn build_ui(application: >k::Application) { .expect("Couldn't get app_button"); app_button.connect_clicked(glib::clone!(@weak window => move |_| { // entry.set_text("Clicked!"); - let dialog = AppChooserDialog::new_for_content_type(Some(&window), + let dialog = AppChooserDialog::for_content_type(Some(&window), gtk::DialogFlags::MODAL, "sh"); @@ -143,7 +143,7 @@ fn build_ui(application: >k::Application) { let switch: Switch = builder.get_object("switch").expect("Couldn't get switch"); switch.connect_changed_active(glib::clone!(@weak entry => move |switch| { - if switch.get_active() { + if switch.is_active() { entry.set_text("Switch On"); } else { entry.set_text("Switch Off"); @@ -158,11 +158,11 @@ fn build_ui(application: >k::Application) { window.connect_key_press_event( glib::clone!(@weak entry => @default-return Inhibit(false), move |_, key| { - let keyval = key.get_keyval(); - let keystate = key.get_state(); + let keyval = key.keyval(); + let keystate = key.state(); println!("key pressed: {} / {:?}", keyval, keystate); - println!("text: {}", entry.get_text()); + println!("text: {}", entry.text()); if keystate.intersects(gdk::ModifierType::CONTROL_MASK) { println!("You pressed Ctrl!"); @@ -176,10 +176,7 @@ fn build_ui(application: >k::Application) { } fn about_clicked(button: &Button, dialog: &AboutDialog) { - if let Some(window) = button - .get_toplevel() - .and_then(|w| w.downcast::().ok()) - { + if let Some(window) = button.toplevel().and_then(|w| w.downcast::().ok()) { dialog.set_transient_for(Some(&window)); } @@ -190,9 +187,9 @@ fn about_clicked(button: &Button, dialog: &AboutDialog) { gtk::Inhibit(true) }); - println!("Authors: {:?}", dialog.get_authors()); - println!("Artists: {:?}", dialog.get_artists()); - println!("Documenters: {:?}", dialog.get_documenters()); + println!("Authors: {:?}", dialog.authors()); + println!("Artists: {:?}", dialog.artists()); + println!("Documenters: {:?}", dialog.documenters()); dialog.show_all(); } diff --git a/examples/list_box_model/main.rs b/examples/list_box_model/main.rs index c2885794533e..81c889fb9a85 100644 --- a/examples/list_box_model/main.rs +++ b/examples/list_box_model/main.rs @@ -78,7 +78,7 @@ fn build_ui(application: >k::Application) { dialog.set_default_response(ResponseType::Close); dialog.connect_response(|dialog, _| dialog.close()); - let content_area = dialog.get_content_area(); + let content_area = dialog.content_area(); // Similarly to the label and spin button inside the listbox, the text entry // and spin button in the edit dialog are connected via property bindings to @@ -134,7 +134,7 @@ fn build_ui(application: >k::Application) { &[("Ok", ResponseType::Ok), ("Cancel", ResponseType::Cancel)]); dialog.set_default_response(ResponseType::Ok); - let content_area = dialog.get_content_area(); + let content_area = dialog.content_area(); let entry = gtk::Entry::new(); entry.connect_activate(clone!(@weak dialog => move |_| { @@ -146,9 +146,9 @@ fn build_ui(application: >k::Application) { content_area.add(&spin_button); dialog.connect_response(clone!(@weak model, @weak entry, @weak spin_button => move |dialog, resp| { - let text = entry.get_text(); + let text = entry.text(); if !text.is_empty() && resp == ResponseType::Ok { - model.append(&RowData::new(&text, spin_button.get_value() as u32)); + model.append(&RowData::new(&text, spin_button.value() as u32)); } dialog.close(); })); @@ -163,10 +163,10 @@ fn build_ui(application: >k::Application) { // model is immediately reflected in the listbox. let delete_button = gtk::Button::with_label("Delete"); delete_button.connect_clicked(clone!(@weak model, @weak listbox => move |_| { - let selected = listbox.get_selected_row(); + let selected = listbox.selected_row(); if let Some(selected) = selected { - let idx = selected.get_index(); + let idx = selected.index(); model.remove(idx as u32); } })); diff --git a/examples/list_box_model/row_data/imp.rs b/examples/list_box_model/row_data/imp.rs index 30f75d59a351..597d527eb291 100644 --- a/examples/list_box_model/row_data/imp.rs +++ b/examples/list_box_model/row_data/imp.rs @@ -58,7 +58,7 @@ impl ObjectImpl for RowData { value: &glib::Value, pspec: &glib::ParamSpec, ) { - match pspec.get_name() { + match pspec.name() { "name" => { let name = value .get() @@ -76,7 +76,7 @@ impl ObjectImpl for RowData { } fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value { - match pspec.get_name() { + match pspec.name() { "name" => self.name.borrow().to_value(), "count" => self.count.borrow().to_value(), _ => unimplemented!(), diff --git a/examples/list_store/main.rs b/examples/list_store/main.rs index 9832162197a5..58244b5424bf 100644 --- a/examples/list_store/main.rs +++ b/examples/list_store/main.rs @@ -298,7 +298,7 @@ fn add_columns(model: &Rc, treeview: >k::TreeView) { } fn spinner_timeout(model: >k::ListStore) -> Continue { - let iter = model.get_iter_first().unwrap(); + let iter = model.iter_first().unwrap(); let pulse = model .get_value(&iter, Columns::Pulse as i32) .get_some::() diff --git a/examples/menu_bar/main.rs b/examples/menu_bar/main.rs index 3acb416b2f7b..ddc6d1a8a64b 100644 --- a/examples/menu_bar/main.rs +++ b/examples/menu_bar/main.rs @@ -102,7 +102,7 @@ fn build_ui(application: >k::Application) { p.show_all(); }); check_item.connect_toggled(|w| { - w.set_label(if w.get_active() { + w.set_label(if w.is_active() { "Checked" } else { "Unchecked" diff --git a/examples/menu_bar_system/main.rs b/examples/menu_bar_system/main.rs index e8e00f8acff3..b108d033e2aa 100644 --- a/examples/menu_bar_system/main.rs +++ b/examples/menu_bar_system/main.rs @@ -86,7 +86,7 @@ fn add_actions( let switch_action = gio::SimpleAction::new_stateful("switch", None, &false.to_variant()); switch_action.connect_activate(glib::clone!(@weak switch => move |g, _| { let mut is_active = false; - if let Some(g) = g.get_state() { + if let Some(g) = g.state() { is_active = g.get().expect("couldn't get bool"); // We update the state of the toggle. switch.set_active(!is_active); @@ -98,7 +98,7 @@ fn add_actions( // The same goes the around way: if we update the switch state, we need to update the menu // item's state. switch.connect_property_active_notify(glib::clone!(@weak switch_action => move |s| { - switch_action.change_state(&s.get_active().to_variant()); + switch_action.change_state(&s.is_active().to_variant()); })); let sub_another = gio::SimpleAction::new("sub_another", None); diff --git a/examples/multi_threading_context/main.rs b/examples/multi_threading_context/main.rs index 23fc343994f3..4a76c4be59e1 100644 --- a/examples/multi_threading_context/main.rs +++ b/examples/multi_threading_context/main.rs @@ -43,7 +43,7 @@ fn build_ui(application: >k::Application) { // Attach receiver to the main context and set the text buffer text from here let text_buffer = text_view - .get_buffer() + .buffer() .expect("Couldn't get buffer from text_view"); rx.attach(None, move |text| { text_buffer.set_text(&text); diff --git a/examples/multi_window/main.rs b/examples/multi_window/main.rs index cb5e18ad4a38..6a807dab94d4 100644 --- a/examples/multi_window/main.rs +++ b/examples/multi_window/main.rs @@ -26,7 +26,7 @@ fn build_ui(application: >k::Application) { windows_title_entry.set_placeholder_text(Some("Update all sub-windows' title")); windows_title_entry.connect_changed(glib::clone!(@weak windows => move |windows_title_entry| { // When the entry's text is updated, we update the title of every sub windows. - let text = windows_title_entry.get_buffer().get_text(); + let text = windows_title_entry.buffer().text(); for window in windows.borrow().values() { if let Some(w) = window.upgrade() { w.set_title(&text) @@ -44,7 +44,7 @@ fn build_ui(application: >k::Application) { glib::clone!(@weak windows_title_entry, @weak entry, @weak application => move |_| { let new_id = generate_new_id(&windows.borrow()); create_sub_window(&application, - &windows_title_entry.get_buffer().get_text(), + &windows_title_entry.buffer().text(), &entry, new_id, &windows); @@ -107,7 +107,7 @@ fn create_sub_window( let button = gtk::Button::with_label(&format!("Notify main window with id {}!", id)); button.connect_clicked(glib::clone!(@weak main_window_entry => move |_| { // When the button is clicked, let's write it on the main window's entry! - main_window_entry.get_buffer().set_text(&format!("sub window {} clicked", id)); + main_window_entry.buffer().set_text(&format!("sub window {} clicked", id)); })); window.add(&button); diff --git a/examples/overlay/main.rs b/examples/overlay/main.rs index c7ecb9c8f94c..61ce99067703 100644 --- a/examples/overlay/main.rs +++ b/examples/overlay/main.rs @@ -6,7 +6,7 @@ use gtk::prelude::*; use gtk::{gdk, gio, glib}; fn button_clicked(button: >k::Button, overlay_text: >k::Label) { - overlay_text.set_text(&button.get_label().expect("Couldn't get button label")); + overlay_text.set_text(&button.label().expect("Couldn't get button label")); } fn build_ui(application: >k::Application) { diff --git a/examples/printing/main.rs b/examples/printing/main.rs index 6934134a09c3..a868a84766f3 100644 --- a/examples/printing/main.rs +++ b/examples/printing/main.rs @@ -17,7 +17,7 @@ fn print(window: >k::Window, value1: String, value2: String) { print_operation.connect_draw_page(move |_, print_context, _| { let cairo = print_context - .get_cairo_context() + .cairo_context() .expect("Couldn't get cairo context"); // This allows you to get the width of the page @@ -69,8 +69,8 @@ fn build_ui(application: >k::Application) { .expect("Couldn't get buttonprint"); button_print.connect_clicked(glib::clone!(@weak window => move |_| { - let text1 = entry1.get_text().to_string(); - let text2 = entry2.get_text().to_string(); + let text1 = entry1.text().to_string(); + let text2 = entry2.text().to_string(); print(&window, text1, text2); })); diff --git a/examples/progress_tracker/main.rs b/examples/progress_tracker/main.rs index 9340f64f4eba..91da92614437 100644 --- a/examples/progress_tracker/main.rs +++ b/examples/progress_tracker/main.rs @@ -123,7 +123,7 @@ impl Widgets { let window = gtk::ApplicationWindow::new(application); window.set_icon_name(Some("package-x-generic")); - window.set_property_window_position(gtk::WindowPosition::Center); + window.set_window_position(gtk::WindowPosition::Center); window.set_titlebar(Some(&header.container)); window.add(&view_stack); window.show_all(); diff --git a/examples/sync_widget/main.rs b/examples/sync_widget/main.rs index 8bef1e6dd6a1..9a6b86ddf96c 100644 --- a/examples/sync_widget/main.rs +++ b/examples/sync_widget/main.rs @@ -12,8 +12,8 @@ fn build_ui(application: >k::Application) { let spin_button: gtk::SpinButton = builder .get_object("spin_button") .expect("Couldn't get spin_button"); - let slider_adj = slider.get_adjustment(); - let spin_button_adj = spin_button.get_adjustment(); + let slider_adj = slider.adjustment(); + let spin_button_adj = spin_button.adjustment(); slider_adj .bind_property("value", &spin_button_adj, "value") .flags( diff --git a/examples/text_viewer/main.rs b/examples/text_viewer/main.rs index 23f91b4884fb..c3a58f22b613 100644 --- a/examples/text_viewer/main.rs +++ b/examples/text_viewer/main.rs @@ -35,7 +35,7 @@ pub fn build_ui(application: >k::Application) { ]); file_chooser.connect_response(glib::clone!(@weak text_view => move |file_chooser, response| { if response == gtk::ResponseType::Ok { - let filename = file_chooser.get_filename().expect("Couldn't get filename"); + let filename = file_chooser.filename().expect("Couldn't get filename"); let file = File::open(&filename).expect("Couldn't open file"); let mut reader = BufReader::new(file); @@ -43,7 +43,7 @@ pub fn build_ui(application: >k::Application) { let _ = reader.read_to_string(&mut contents); text_view - .get_buffer() + .buffer() .expect("Couldn't get window") .set_text(&contents); } diff --git a/examples/transparent_main_window/main.rs b/examples/transparent_main_window/main.rs index 7c1f74d0510a..d54924a0b9da 100644 --- a/examples/transparent_main_window/main.rs +++ b/examples/transparent_main_window/main.rs @@ -34,8 +34,8 @@ fn main() { } fn set_visual(window: &ApplicationWindow, _screen: Option<&gdk::Screen>) { - if let Some(screen) = window.get_screen() { - if let Some(ref visual) = screen.get_rgba_visual() { + if let Some(screen) = window.screen() { + if let Some(ref visual) = screen.rgba_visual() { window.set_visual(Some(visual)); // crucial for transparency } } diff --git a/examples/tree_view/main.rs b/examples/tree_view/main.rs index 58f543d7dee6..ecaf38823cb4 100644 --- a/examples/tree_view/main.rs +++ b/examples/tree_view/main.rs @@ -84,15 +84,15 @@ fn build_ui(application: >k::Application) { // selection and path manipulation - let left_selection = left_tree.get_selection(); + let left_selection = left_tree.selection(); left_selection.connect_changed(glib::clone!(@weak right_tree => move |tree_selection| { - let (left_model, iter) = tree_selection.get_selected().expect("Couldn't get selected"); + let (left_model, iter) = tree_selection.selected().expect("Couldn't get selected"); let mut path = left_model.get_path(&iter).expect("Couldn't get path"); // get the top-level element path - while path.get_depth() > 1 { + while path.depth() > 1 { path.up(); } - right_tree.get_selection().select_path(&path); + right_tree.selection().select_path(&path); })); // display the panes diff --git a/examples/tree_view_model_sort/main.rs b/examples/tree_view_model_sort/main.rs index 0ab092ef4b88..b33a7d1d648e 100644 --- a/examples/tree_view_model_sort/main.rs +++ b/examples/tree_view_model_sort/main.rs @@ -40,8 +40,8 @@ fn build_ui(application: >k::Application) { .expect("Sorted path does not correspond to real path"); println!( "Clicked on sorted: {:?}, real: {:?}", - path.get_indices(), - real_path.get_indices() + path.indices(), + real_path.indices() ); }); diff --git a/examples/tree_view_simple/main.rs b/examples/tree_view_simple/main.rs index 4cf0338660ec..77350b2bd80e 100644 --- a/examples/tree_view_simple/main.rs +++ b/examples/tree_view_simple/main.rs @@ -62,8 +62,8 @@ fn build_ui(application: >k::Application) { // The closure responds to selection changes by connection to "::cursor-changed" signal, // that gets emitted when the cursor moves (focus changes). tree.connect_cursor_changed(move |tree_view| { - let selection = tree_view.get_selection(); - if let Some((model, iter)) = selection.get_selected() { + let selection = tree_view.selection(); + if let Some((model, iter)) = selection.selected() { // Now getting back the values from the row corresponding to the // iterator `iter`. // diff --git a/gdk-pixbuf/src/auto/pixbuf.rs b/gdk-pixbuf/src/auto/pixbuf.rs index efb32276cf0d..9fc1c4f4407c 100644 --- a/gdk-pixbuf/src/auto/pixbuf.rs +++ b/gdk-pixbuf/src/auto/pixbuf.rs @@ -362,32 +362,32 @@ impl Pixbuf { } #[doc(alias = "gdk_pixbuf_get_bits_per_sample")] - pub fn get_bits_per_sample(&self) -> i32 { + pub fn bits_per_sample(&self) -> i32 { unsafe { ffi::gdk_pixbuf_get_bits_per_sample(self.to_glib_none().0) } } #[doc(alias = "gdk_pixbuf_get_byte_length")] - pub fn get_byte_length(&self) -> usize { + pub fn byte_length(&self) -> usize { unsafe { ffi::gdk_pixbuf_get_byte_length(self.to_glib_none().0) } } #[doc(alias = "gdk_pixbuf_get_colorspace")] - pub fn get_colorspace(&self) -> Colorspace { + pub fn colorspace(&self) -> Colorspace { unsafe { from_glib(ffi::gdk_pixbuf_get_colorspace(self.to_glib_none().0)) } } #[doc(alias = "gdk_pixbuf_get_has_alpha")] - pub fn get_has_alpha(&self) -> bool { + pub fn has_alpha(&self) -> bool { unsafe { from_glib(ffi::gdk_pixbuf_get_has_alpha(self.to_glib_none().0)) } } #[doc(alias = "gdk_pixbuf_get_height")] - pub fn get_height(&self) -> i32 { + pub fn height(&self) -> i32 { unsafe { ffi::gdk_pixbuf_get_height(self.to_glib_none().0) } } #[doc(alias = "gdk_pixbuf_get_n_channels")] - pub fn get_n_channels(&self) -> i32 { + pub fn n_channels(&self) -> i32 { unsafe { ffi::gdk_pixbuf_get_n_channels(self.to_glib_none().0) } } @@ -404,17 +404,17 @@ impl Pixbuf { //#[cfg(any(feature = "v2_32", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_32")))] //#[doc(alias = "gdk_pixbuf_get_options")] - //pub fn get_options(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 } { + //pub fn options(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 } { // unsafe { TODO: call ffi:gdk_pixbuf_get_options() } //} #[doc(alias = "gdk_pixbuf_get_rowstride")] - pub fn get_rowstride(&self) -> i32 { + pub fn rowstride(&self) -> i32 { unsafe { ffi::gdk_pixbuf_get_rowstride(self.to_glib_none().0) } } #[doc(alias = "gdk_pixbuf_get_width")] - pub fn get_width(&self) -> i32 { + pub fn width(&self) -> i32 { unsafe { ffi::gdk_pixbuf_get_width(self.to_glib_none().0) } } @@ -582,7 +582,8 @@ impl Pixbuf { } } - pub fn get_property_pixel_bytes(&self) -> Option { + #[doc(alias = "get_property_pixel_bytes")] + pub fn pixel_bytes(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gdk-pixbuf/src/auto/pixbuf_animation.rs b/gdk-pixbuf/src/auto/pixbuf_animation.rs index 636cd36d6293..6817ab3afaee 100644 --- a/gdk-pixbuf/src/auto/pixbuf_animation.rs +++ b/gdk-pixbuf/src/auto/pixbuf_animation.rs @@ -132,24 +132,24 @@ pub const NONE_PIXBUF_ANIMATION: Option<&PixbufAnimation> = None; pub trait PixbufAnimationExt: 'static { #[doc(alias = "gdk_pixbuf_animation_get_height")] - fn get_height(&self) -> i32; + fn height(&self) -> i32; #[doc(alias = "gdk_pixbuf_animation_get_static_image")] - fn get_static_image(&self) -> Option; + fn static_image(&self) -> Option; #[doc(alias = "gdk_pixbuf_animation_get_width")] - fn get_width(&self) -> i32; + fn width(&self) -> i32; #[doc(alias = "gdk_pixbuf_animation_is_static_image")] fn is_static_image(&self) -> bool; } impl> PixbufAnimationExt for O { - fn get_height(&self) -> i32 { + fn height(&self) -> i32 { unsafe { ffi::gdk_pixbuf_animation_get_height(self.as_ref().to_glib_none().0) } } - fn get_static_image(&self) -> Option { + fn static_image(&self) -> Option { unsafe { from_glib_none(ffi::gdk_pixbuf_animation_get_static_image( self.as_ref().to_glib_none().0, @@ -157,7 +157,7 @@ impl> PixbufAnimationExt for O { } } - fn get_width(&self) -> i32 { + fn width(&self) -> i32 { unsafe { ffi::gdk_pixbuf_animation_get_width(self.as_ref().to_glib_none().0) } } diff --git a/gdk-pixbuf/src/auto/pixbuf_format.rs b/gdk-pixbuf/src/auto/pixbuf_format.rs index be5a177b02b7..2f2d5dac1314 100644 --- a/gdk-pixbuf/src/auto/pixbuf_format.rs +++ b/gdk-pixbuf/src/auto/pixbuf_format.rs @@ -17,7 +17,7 @@ glib::wrapper! { impl PixbufFormat { #[doc(alias = "gdk_pixbuf_format_get_description")] - pub fn get_description(&self) -> Option { + pub fn description(&self) -> Option { unsafe { from_glib_full(ffi::gdk_pixbuf_format_get_description(mut_override( self.to_glib_none().0, @@ -26,7 +26,7 @@ impl PixbufFormat { } #[doc(alias = "gdk_pixbuf_format_get_extensions")] - pub fn get_extensions(&self) -> Vec { + pub fn extensions(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gdk_pixbuf_format_get_extensions( mut_override(self.to_glib_none().0), @@ -35,7 +35,7 @@ impl PixbufFormat { } #[doc(alias = "gdk_pixbuf_format_get_license")] - pub fn get_license(&self) -> Option { + pub fn license(&self) -> Option { unsafe { from_glib_full(ffi::gdk_pixbuf_format_get_license(mut_override( self.to_glib_none().0, @@ -44,7 +44,7 @@ impl PixbufFormat { } #[doc(alias = "gdk_pixbuf_format_get_mime_types")] - pub fn get_mime_types(&self) -> Vec { + pub fn mime_types(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gdk_pixbuf_format_get_mime_types( mut_override(self.to_glib_none().0), @@ -53,7 +53,7 @@ impl PixbufFormat { } #[doc(alias = "gdk_pixbuf_format_get_name")] - pub fn get_name(&self) -> Option { + pub fn name(&self) -> Option { unsafe { from_glib_full(ffi::gdk_pixbuf_format_get_name(mut_override( self.to_glib_none().0, diff --git a/gdk-pixbuf/src/auto/pixbuf_loader.rs b/gdk-pixbuf/src/auto/pixbuf_loader.rs index 7643a0cc94ff..4419d52aaa4d 100644 --- a/gdk-pixbuf/src/auto/pixbuf_loader.rs +++ b/gdk-pixbuf/src/auto/pixbuf_loader.rs @@ -70,13 +70,13 @@ pub trait PixbufLoaderExt: 'static { fn close(&self) -> Result<(), glib::Error>; #[doc(alias = "gdk_pixbuf_loader_get_animation")] - fn get_animation(&self) -> Option; + fn animation(&self) -> Option; #[doc(alias = "gdk_pixbuf_loader_get_format")] - fn get_format(&self) -> Option; + fn format(&self) -> Option; #[doc(alias = "gdk_pixbuf_loader_get_pixbuf")] - fn get_pixbuf(&self) -> Option; + fn pixbuf(&self) -> Option; #[doc(alias = "gdk_pixbuf_loader_set_size")] fn set_size(&self, width: i32, height: i32); @@ -112,7 +112,7 @@ impl> PixbufLoaderExt for O { } } - fn get_animation(&self) -> Option { + fn animation(&self) -> Option { unsafe { from_glib_none(ffi::gdk_pixbuf_loader_get_animation( self.as_ref().to_glib_none().0, @@ -120,7 +120,7 @@ impl> PixbufLoaderExt for O { } } - fn get_format(&self) -> Option { + fn format(&self) -> Option { unsafe { from_glib_none(ffi::gdk_pixbuf_loader_get_format( self.as_ref().to_glib_none().0, @@ -128,7 +128,7 @@ impl> PixbufLoaderExt for O { } } - fn get_pixbuf(&self) -> Option { + fn pixbuf(&self) -> Option { unsafe { from_glib_none(ffi::gdk_pixbuf_loader_get_pixbuf( self.as_ref().to_glib_none().0, diff --git a/gdk-pixbuf/src/auto/pixbuf_simple_anim.rs b/gdk-pixbuf/src/auto/pixbuf_simple_anim.rs index dddc539a654f..6a8e1e92034b 100644 --- a/gdk-pixbuf/src/auto/pixbuf_simple_anim.rs +++ b/gdk-pixbuf/src/auto/pixbuf_simple_anim.rs @@ -34,7 +34,7 @@ impl PixbufSimpleAnim { } #[doc(alias = "gdk_pixbuf_simple_anim_get_loop")] - pub fn get_loop(&self) -> bool { + pub fn is_loop(&self) -> bool { unsafe { from_glib(ffi::gdk_pixbuf_simple_anim_get_loop(self.to_glib_none().0)) } } diff --git a/gdk-pixbuf/src/auto/versions.txt b/gdk-pixbuf/src/auto/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/gdk-pixbuf/src/auto/versions.txt +++ b/gdk-pixbuf/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/gdk-pixbuf/src/pixbuf.rs b/gdk-pixbuf/src/pixbuf.rs index 69f3eb628449..896865b28ea8 100644 --- a/gdk-pixbuf/src/pixbuf.rs +++ b/gdk-pixbuf/src/pixbuf.rs @@ -289,7 +289,7 @@ impl Pixbuf { #[allow(clippy::mut_from_ref)] #[allow(clippy::missing_safety_doc)] #[doc(alias = "gdk_pixbuf_get_pixels_with_length")] - pub unsafe fn get_pixels(&self) -> &mut [u8] { + pub unsafe fn pixels(&self) -> &mut [u8] { let mut len = 0; let ptr = ffi::gdk_pixbuf_get_pixels_with_length(self.to_glib_none().0, &mut len); slice::from_raw_parts_mut(ptr, len as usize) @@ -297,21 +297,21 @@ impl Pixbuf { pub fn put_pixel(&self, x: u32, y: u32, red: u8, green: u8, blue: u8, alpha: u8) { assert!( - x < self.get_width() as u32, + x < self.width() as u32, "x must be less than the pixbuf's width" ); assert!( - y < self.get_height() as u32, + y < self.height() as u32, "y must be less than the pixbuf's height" ); unsafe { let x = x as usize; let y = y as usize; - let n_channels = self.get_n_channels() as usize; + let n_channels = self.n_channels() as usize; assert!(n_channels == 3 || n_channels == 4); - let rowstride = self.get_rowstride() as usize; - let pixels = self.get_pixels(); + let rowstride = self.rowstride() as usize; + let pixels = self.pixels(); let pos = y * rowstride + x * n_channels; pixels[pos] = red; diff --git a/gdk-pixbuf/src/pixbuf_animation_iter.rs b/gdk-pixbuf/src/pixbuf_animation_iter.rs index 44bd25d09129..c813cbdd46db 100644 --- a/gdk-pixbuf/src/pixbuf_animation_iter.rs +++ b/gdk-pixbuf/src/pixbuf_animation_iter.rs @@ -32,7 +32,7 @@ impl PixbufAnimationIter { } #[doc(alias = "gdk_pixbuf_animation_iter_get_pixbuf")] - pub fn get_pixbuf(&self) -> Pixbuf { + pub fn pixbuf(&self) -> Pixbuf { unsafe { from_glib_none(ffi::gdk_pixbuf_animation_iter_get_pixbuf( self.to_glib_none().0, @@ -41,7 +41,7 @@ impl PixbufAnimationIter { } #[doc(alias = "gdk_pixbuf_animation_iter_get_delay_time")] - pub fn get_delay_time(&self) -> i32 { + pub fn delay_time(&self) -> i32 { unsafe { ffi::gdk_pixbuf_animation_iter_get_delay_time(self.to_glib_none().0) } } diff --git a/gdk-pixbuf/sys/versions.txt b/gdk-pixbuf/sys/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/gdk-pixbuf/sys/versions.txt +++ b/gdk-pixbuf/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/gdk/Gir.toml b/gdk/Gir.toml index d298399baf38..66ebf6a11bd9 100644 --- a/gdk/Gir.toml +++ b/gdk/Gir.toml @@ -159,6 +159,9 @@ status = "generate" #manual trait ignore = true [[object.function]] + name = "get_event_compression" + rename = "compresses_events" + [[object.function]] name = "get_default_root_window" #manual trait ignore = true @@ -324,6 +327,15 @@ version = "3.8" [[object]] name = "Gdk.Keymap" status = "generate" + [[object.function]] + name = "get_caps_lock_state" + rename = "is_caps_locked" + [[object.function]] + name = "get_num_lock_state" + rename = "is_num_locked" + [[object.function]] + name = "get_scroll_lock_state" + rename = "is_scroll_locked" [[object.function]] name = "get_entries_for_keycode" # Invalid generation of Vec @@ -373,6 +385,26 @@ status = "generate" name = "get_setting" # bool return value signals success manual = true + [[object.function]] + name = "height" + # This is an associated function which clashes with + # the actual method getter after auto-renaming. + rename = "screen_height" + [[object.function]] + name = "height_mm" + # This is an associated function which clashes with + # the actual method getter after auto-renaming. + rename = "screen_height_mm" + [[object.function]] + name = "width" + # This is an associated function which clashes with + # the actual method getter after auto-renaming. + rename = "screen_width" + [[object.function]] + name = "width_mm" + # This is an associated function which clashes with + # the actual method getter after auto-renaming. + rename = "screen_width_mm" [[object]] name = "Gdk.Seat" diff --git a/gdk/src/auto/app_launch_context.rs b/gdk/src/auto/app_launch_context.rs index 31eb15a89030..f96a6c5a621c 100644 --- a/gdk/src/auto/app_launch_context.rs +++ b/gdk/src/auto/app_launch_context.rs @@ -60,7 +60,8 @@ impl AppLaunchContext { } } - pub fn get_property_display(&self) -> Option { + #[doc(alias = "get_property_display")] + pub fn display(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gdk/src/auto/cursor.rs b/gdk/src/auto/cursor.rs index 5c60badb2554..d7149d9d22dd 100644 --- a/gdk/src/auto/cursor.rs +++ b/gdk/src/auto/cursor.rs @@ -25,7 +25,7 @@ impl Cursor { } #[doc(alias = "gdk_cursor_new_for_display")] - pub fn new_for_display(display: &Display, cursor_type: CursorType) -> Cursor { + pub fn for_display(display: &Display, cursor_type: CursorType) -> Cursor { skip_assert_initialized!(); unsafe { from_glib_full(ffi::gdk_cursor_new_for_display( @@ -73,22 +73,22 @@ impl Cursor { } #[doc(alias = "gdk_cursor_get_cursor_type")] - pub fn get_cursor_type(&self) -> CursorType { + pub fn cursor_type(&self) -> CursorType { unsafe { from_glib(ffi::gdk_cursor_get_cursor_type(self.to_glib_none().0)) } } #[doc(alias = "gdk_cursor_get_display")] - pub fn get_display(&self) -> Display { + pub fn display(&self) -> Display { unsafe { from_glib_none(ffi::gdk_cursor_get_display(self.to_glib_none().0)) } } #[doc(alias = "gdk_cursor_get_image")] - pub fn get_image(&self) -> Option { + pub fn image(&self) -> Option { unsafe { from_glib_full(ffi::gdk_cursor_get_image(self.to_glib_none().0)) } } #[doc(alias = "gdk_cursor_get_surface")] - pub fn get_surface(&self) -> (Option, f64, f64) { + pub fn surface(&self) -> (Option, f64, f64) { unsafe { let mut x_hot = mem::MaybeUninit::uninit(); let mut y_hot = mem::MaybeUninit::uninit(); diff --git a/gdk/src/auto/device.rs b/gdk/src/auto/device.rs index e4b161d01480..2fd2a5de14a8 100644 --- a/gdk/src/auto/device.rs +++ b/gdk/src/auto/device.rs @@ -46,14 +46,14 @@ glib::wrapper! { impl Device { #[doc(alias = "gdk_device_get_associated_device")] - pub fn get_associated_device(&self) -> Option { + pub fn associated_device(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_get_associated_device(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_device_get_axes")] - pub fn get_axes(&self) -> AxisFlags { + pub fn axes(&self) -> AxisFlags { unsafe { from_glib(ffi::gdk_device_get_axes(self.to_glib_none().0)) } } @@ -73,17 +73,17 @@ impl Device { //} #[doc(alias = "gdk_device_get_device_type")] - pub fn get_device_type(&self) -> DeviceType { + pub fn device_type(&self) -> DeviceType { unsafe { from_glib(ffi::gdk_device_get_device_type(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_display")] - pub fn get_display(&self) -> Display { + pub fn display(&self) -> Display { unsafe { from_glib_none(ffi::gdk_device_get_display(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_has_cursor")] - pub fn get_has_cursor(&self) -> bool { + pub fn has_cursor(&self) -> bool { unsafe { from_glib(ffi::gdk_device_get_has_cursor(self.to_glib_none().0)) } } @@ -109,32 +109,32 @@ impl Device { } #[doc(alias = "gdk_device_get_last_event_window")] - pub fn get_last_event_window(&self) -> Option { + pub fn last_event_window(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_get_last_event_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_mode")] - pub fn get_mode(&self) -> InputMode { + pub fn mode(&self) -> InputMode { unsafe { from_glib(ffi::gdk_device_get_mode(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_n_axes")] - pub fn get_n_axes(&self) -> i32 { + pub fn n_axes(&self) -> i32 { unsafe { ffi::gdk_device_get_n_axes(self.to_glib_none().0) } } #[doc(alias = "gdk_device_get_n_keys")] - pub fn get_n_keys(&self) -> i32 { + pub fn n_keys(&self) -> i32 { unsafe { ffi::gdk_device_get_n_keys(self.to_glib_none().0) } } #[doc(alias = "gdk_device_get_name")] - pub fn get_name(&self) -> Option { + pub fn name(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_get_name(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_position")] - pub fn get_position(&self) -> (Screen, i32, i32) { + pub fn position(&self) -> (Screen, i32, i32) { unsafe { let mut screen = ptr::null_mut(); let mut x = mem::MaybeUninit::uninit(); @@ -152,7 +152,7 @@ impl Device { } #[doc(alias = "gdk_device_get_position_double")] - pub fn get_position_double(&self) -> (Screen, f64, f64) { + pub fn position_double(&self) -> (Screen, f64, f64) { unsafe { let mut screen = ptr::null_mut(); let mut x = mem::MaybeUninit::uninit(); @@ -172,19 +172,19 @@ impl Device { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] #[doc(alias = "gdk_device_get_product_id")] - pub fn get_product_id(&self) -> Option { + pub fn product_id(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_get_product_id(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_device_get_seat")] - pub fn get_seat(&self) -> Option { + pub fn seat(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_get_seat(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_source")] - pub fn get_source(&self) -> InputSource { + pub fn source(&self) -> InputSource { unsafe { from_glib(ffi::gdk_device_get_source(self.to_glib_none().0)) } } @@ -196,12 +196,12 @@ impl Device { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] #[doc(alias = "gdk_device_get_vendor_id")] - pub fn get_vendor_id(&self) -> Option { + pub fn vendor_id(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_get_vendor_id(self.to_glib_none().0)) } } #[doc(alias = "gdk_device_get_window_at_position")] - pub fn get_window_at_position(&self) -> (Option, i32, i32) { + pub fn window_at_position(&self) -> (Option, i32, i32) { unsafe { let mut win_x = mem::MaybeUninit::uninit(); let mut win_y = mem::MaybeUninit::uninit(); @@ -217,7 +217,7 @@ impl Device { } #[doc(alias = "gdk_device_get_window_at_position_double")] - pub fn get_window_at_position_double(&self) -> (Option, f64, f64) { + pub fn window_at_position_double(&self) -> (Option, f64, f64) { unsafe { let mut win_x = mem::MaybeUninit::uninit(); let mut win_y = mem::MaybeUninit::uninit(); @@ -313,7 +313,8 @@ impl Device { } } - pub fn get_property_device_manager(&self) -> Option { + #[doc(alias = "get_property_device_manager")] + pub fn device_manager(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -327,7 +328,8 @@ impl Device { } } - pub fn get_property_input_mode(&self) -> InputMode { + #[doc(alias = "get_property_input_mode")] + pub fn input_mode(&self) -> InputMode { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -342,7 +344,8 @@ impl Device { } } - pub fn set_property_input_mode(&self, input_mode: InputMode) { + #[doc(alias = "set_property_input_mode")] + pub fn set_input_mode(&self, input_mode: InputMode) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, @@ -352,7 +355,8 @@ impl Device { } } - pub fn get_property_input_source(&self) -> InputSource { + #[doc(alias = "get_property_input_source")] + pub fn input_source(&self) -> InputSource { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -369,7 +373,8 @@ impl Device { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - pub fn get_property_num_touches(&self) -> u32 { + #[doc(alias = "get_property_num_touches")] + pub fn num_touches(&self) -> u32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -386,7 +391,8 @@ impl Device { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - pub fn set_property_seat(&self, seat: Option<&Seat>) { + #[doc(alias = "set_property_seat")] + pub fn set_seat(&self, seat: Option<&Seat>) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, @@ -398,7 +404,8 @@ impl Device { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - pub fn get_property_tool(&self) -> Option { + #[doc(alias = "get_property_tool")] + pub fn tool(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -412,7 +419,8 @@ impl Device { } } - pub fn get_property_type(&self) -> DeviceType { + #[doc(alias = "get_property_type")] + pub fn type_(&self) -> DeviceType { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gdk/src/auto/device_manager.rs b/gdk/src/auto/device_manager.rs index 991527ad5173..4bd015f27cb7 100644 --- a/gdk/src/auto/device_manager.rs +++ b/gdk/src/auto/device_manager.rs @@ -24,7 +24,7 @@ glib::wrapper! { impl DeviceManager { #[cfg_attr(feature = "v3_20", deprecated)] #[doc(alias = "gdk_device_manager_get_client_pointer")] - pub fn get_client_pointer(&self) -> Option { + pub fn client_pointer(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_manager_get_client_pointer( self.to_glib_none().0, @@ -33,7 +33,7 @@ impl DeviceManager { } #[doc(alias = "gdk_device_manager_get_display")] - pub fn get_display(&self) -> Option { + pub fn display(&self) -> Option { unsafe { from_glib_none(ffi::gdk_device_manager_get_display(self.to_glib_none().0)) } } diff --git a/gdk/src/auto/device_pad.rs b/gdk/src/auto/device_pad.rs index 73b8e897254e..e025746b70c0 100644 --- a/gdk/src/auto/device_pad.rs +++ b/gdk/src/auto/device_pad.rs @@ -29,7 +29,7 @@ pub trait DevicePadExt: 'static { fn get_n_features(&self, feature: DevicePadFeature) -> i32; #[doc(alias = "gdk_device_pad_get_n_groups")] - fn get_n_groups(&self) -> i32; + fn n_groups(&self) -> i32; } impl> DevicePadExt for O { @@ -53,7 +53,7 @@ impl> DevicePadExt for O { } } - fn get_n_groups(&self) -> i32 { + fn n_groups(&self) -> i32 { unsafe { ffi::gdk_device_pad_get_n_groups(self.as_ref().to_glib_none().0) } } } diff --git a/gdk/src/auto/device_tool.rs b/gdk/src/auto/device_tool.rs index 8ad53a077161..7a53f2a5938e 100644 --- a/gdk/src/auto/device_tool.rs +++ b/gdk/src/auto/device_tool.rs @@ -19,21 +19,22 @@ glib::wrapper! { impl DeviceTool { #[doc(alias = "gdk_device_tool_get_hardware_id")] - pub fn get_hardware_id(&self) -> u64 { + pub fn hardware_id(&self) -> u64 { unsafe { ffi::gdk_device_tool_get_hardware_id(self.to_glib_none().0) } } #[doc(alias = "gdk_device_tool_get_serial")] - pub fn get_serial(&self) -> u64 { + pub fn serial(&self) -> u64 { unsafe { ffi::gdk_device_tool_get_serial(self.to_glib_none().0) } } #[doc(alias = "gdk_device_tool_get_tool_type")] - pub fn get_tool_type(&self) -> DeviceToolType { + pub fn tool_type(&self) -> DeviceToolType { unsafe { from_glib(ffi::gdk_device_tool_get_tool_type(self.to_glib_none().0)) } } - pub fn get_property_axes(&self) -> AxisFlags { + #[doc(alias = "get_property_axes")] + pub fn axes(&self) -> AxisFlags { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gdk/src/auto/display.rs b/gdk/src/auto/display.rs index df768f4ff3bd..77f6e0acfe67 100644 --- a/gdk/src/auto/display.rs +++ b/gdk/src/auto/display.rs @@ -65,7 +65,7 @@ impl Display { } #[doc(alias = "gdk_display_get_app_launch_context")] - pub fn get_app_launch_context(&self) -> Option { + pub fn app_launch_context(&self) -> Option { unsafe { from_glib_full(ffi::gdk_display_get_app_launch_context( self.to_glib_none().0, @@ -74,40 +74,40 @@ impl Display { } #[doc(alias = "gdk_display_get_default_cursor_size")] - pub fn get_default_cursor_size(&self) -> u32 { + pub fn default_cursor_size(&self) -> u32 { unsafe { ffi::gdk_display_get_default_cursor_size(self.to_glib_none().0) } } #[doc(alias = "gdk_display_get_default_group")] - pub fn get_default_group(&self) -> Window { + pub fn default_group(&self) -> Window { unsafe { from_glib_none(ffi::gdk_display_get_default_group(self.to_glib_none().0)) } } #[doc(alias = "gdk_display_get_default_screen")] - pub fn get_default_screen(&self) -> Screen { + pub fn default_screen(&self) -> Screen { unsafe { from_glib_none(ffi::gdk_display_get_default_screen(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_display_get_default_seat")] - pub fn get_default_seat(&self) -> Option { + pub fn default_seat(&self) -> Option { unsafe { from_glib_none(ffi::gdk_display_get_default_seat(self.to_glib_none().0)) } } #[cfg_attr(feature = "v3_20", deprecated)] #[doc(alias = "gdk_display_get_device_manager")] - pub fn get_device_manager(&self) -> Option { + pub fn device_manager(&self) -> Option { unsafe { from_glib_none(ffi::gdk_display_get_device_manager(self.to_glib_none().0)) } } #[doc(alias = "gdk_display_get_event")] - pub fn get_event(&self) -> Option { + pub fn event(&self) -> Option { unsafe { from_glib_full(ffi::gdk_display_get_event(self.to_glib_none().0)) } } #[doc(alias = "gdk_display_get_maximal_cursor_size")] - pub fn get_maximal_cursor_size(&self) -> (u32, u32) { + pub fn maximal_cursor_size(&self) -> (u32, u32) { unsafe { let mut width = mem::MaybeUninit::uninit(); let mut height = mem::MaybeUninit::uninit(); @@ -162,19 +162,19 @@ impl Display { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_display_get_n_monitors")] - pub fn get_n_monitors(&self) -> i32 { + pub fn n_monitors(&self) -> i32 { unsafe { ffi::gdk_display_get_n_monitors(self.to_glib_none().0) } } #[doc(alias = "gdk_display_get_name")] - pub fn get_name(&self) -> glib::GString { + pub fn name(&self) -> glib::GString { unsafe { from_glib_none(ffi::gdk_display_get_name(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_display_get_primary_monitor")] - pub fn get_primary_monitor(&self) -> Option { + pub fn primary_monitor(&self) -> Option { unsafe { from_glib_none(ffi::gdk_display_get_primary_monitor(self.to_glib_none().0)) } } @@ -501,6 +501,6 @@ impl Display { impl fmt::Display for Display { #[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str(&self.get_name()) + f.write_str(&self.name()) } } diff --git a/gdk/src/auto/display_manager.rs b/gdk/src/auto/display_manager.rs index 988b8ab853c8..482e5f816600 100644 --- a/gdk/src/auto/display_manager.rs +++ b/gdk/src/auto/display_manager.rs @@ -21,7 +21,7 @@ glib::wrapper! { impl DisplayManager { #[doc(alias = "gdk_display_manager_get_default_display")] - pub fn get_default_display(&self) -> Option { + pub fn default_display(&self) -> Option { unsafe { from_glib_none(ffi::gdk_display_manager_get_default_display( self.to_glib_none().0, diff --git a/gdk/src/auto/drag_context.rs b/gdk/src/auto/drag_context.rs index 9804f95f885b..e7d70c6c66ca 100644 --- a/gdk/src/auto/drag_context.rs +++ b/gdk/src/auto/drag_context.rs @@ -38,34 +38,34 @@ glib::wrapper! { impl DragContext { #[doc(alias = "gdk_drag_context_get_actions")] - pub fn get_actions(&self) -> DragAction { + pub fn actions(&self) -> DragAction { unsafe { from_glib(ffi::gdk_drag_context_get_actions(self.to_glib_none().0)) } } #[doc(alias = "gdk_drag_context_get_dest_window")] - pub fn get_dest_window(&self) -> Window { + pub fn dest_window(&self) -> Window { unsafe { from_glib_none(ffi::gdk_drag_context_get_dest_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_drag_context_get_device")] - pub fn get_device(&self) -> Device { + pub fn device(&self) -> Device { unsafe { from_glib_none(ffi::gdk_drag_context_get_device(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_drag_context_get_drag_window")] - pub fn get_drag_window(&self) -> Option { + pub fn drag_window(&self) -> Option { unsafe { from_glib_none(ffi::gdk_drag_context_get_drag_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_drag_context_get_protocol")] - pub fn get_protocol(&self) -> DragProtocol { + pub fn protocol(&self) -> DragProtocol { unsafe { from_glib(ffi::gdk_drag_context_get_protocol(self.to_glib_none().0)) } } #[doc(alias = "gdk_drag_context_get_selected_action")] - pub fn get_selected_action(&self) -> DragAction { + pub fn selected_action(&self) -> DragAction { unsafe { from_glib(ffi::gdk_drag_context_get_selected_action( self.to_glib_none().0, @@ -74,7 +74,7 @@ impl DragContext { } #[doc(alias = "gdk_drag_context_get_source_window")] - pub fn get_source_window(&self) -> Window { + pub fn source_window(&self) -> Window { unsafe { from_glib_none(ffi::gdk_drag_context_get_source_window( self.to_glib_none().0, @@ -83,7 +83,7 @@ impl DragContext { } #[doc(alias = "gdk_drag_context_get_suggested_action")] - pub fn get_suggested_action(&self) -> DragAction { + pub fn suggested_action(&self) -> DragAction { unsafe { from_glib(ffi::gdk_drag_context_get_suggested_action( self.to_glib_none().0, diff --git a/gdk/src/auto/drawing_context.rs b/gdk/src/auto/drawing_context.rs index c34fe512d916..47f3f1c155e6 100644 --- a/gdk/src/auto/drawing_context.rs +++ b/gdk/src/auto/drawing_context.rs @@ -16,7 +16,7 @@ glib::wrapper! { impl DrawingContext { #[doc(alias = "gdk_drawing_context_get_cairo_context")] - pub fn get_cairo_context(&self) -> Option { + pub fn cairo_context(&self) -> Option { unsafe { from_glib_none(ffi::gdk_drawing_context_get_cairo_context( self.to_glib_none().0, @@ -25,12 +25,12 @@ impl DrawingContext { } #[doc(alias = "gdk_drawing_context_get_clip")] - pub fn get_clip(&self) -> Option { + pub fn clip(&self) -> Option { unsafe { from_glib_full(ffi::gdk_drawing_context_get_clip(self.to_glib_none().0)) } } #[doc(alias = "gdk_drawing_context_get_window")] - pub fn get_window(&self) -> Option { + pub fn window(&self) -> Option { unsafe { from_glib_none(ffi::gdk_drawing_context_get_window(self.to_glib_none().0)) } } diff --git a/gdk/src/auto/frame_clock.rs b/gdk/src/auto/frame_clock.rs index d6f125d15d6e..f354c72f478c 100644 --- a/gdk/src/auto/frame_clock.rs +++ b/gdk/src/auto/frame_clock.rs @@ -36,7 +36,7 @@ impl FrameClock { } #[doc(alias = "gdk_frame_clock_get_current_timings")] - pub fn get_current_timings(&self) -> Option { + pub fn current_timings(&self) -> Option { unsafe { from_glib_none(ffi::gdk_frame_clock_get_current_timings( self.to_glib_none().0, @@ -45,17 +45,17 @@ impl FrameClock { } #[doc(alias = "gdk_frame_clock_get_frame_counter")] - pub fn get_frame_counter(&self) -> i64 { + pub fn frame_counter(&self) -> i64 { unsafe { ffi::gdk_frame_clock_get_frame_counter(self.to_glib_none().0) } } #[doc(alias = "gdk_frame_clock_get_frame_time")] - pub fn get_frame_time(&self) -> i64 { + pub fn frame_time(&self) -> i64 { unsafe { ffi::gdk_frame_clock_get_frame_time(self.to_glib_none().0) } } #[doc(alias = "gdk_frame_clock_get_history_start")] - pub fn get_history_start(&self) -> i64 { + pub fn history_start(&self) -> i64 { unsafe { ffi::gdk_frame_clock_get_history_start(self.to_glib_none().0) } } diff --git a/gdk/src/auto/frame_timings.rs b/gdk/src/auto/frame_timings.rs index 8b800a52cbc7..0a22bc215cd1 100644 --- a/gdk/src/auto/frame_timings.rs +++ b/gdk/src/auto/frame_timings.rs @@ -17,17 +17,17 @@ glib::wrapper! { impl FrameTimings { #[doc(alias = "gdk_frame_timings_get_complete")] - pub fn get_complete(&self) -> bool { + pub fn is_complete(&self) -> bool { unsafe { from_glib(ffi::gdk_frame_timings_get_complete(self.to_glib_none().0)) } } #[doc(alias = "gdk_frame_timings_get_frame_counter")] - pub fn get_frame_counter(&self) -> i64 { + pub fn frame_counter(&self) -> i64 { unsafe { ffi::gdk_frame_timings_get_frame_counter(self.to_glib_none().0) } } #[doc(alias = "gdk_frame_timings_get_frame_time")] - pub fn get_frame_time(&self) -> i64 { + pub fn frame_time(&self) -> i64 { unsafe { ffi::gdk_frame_timings_get_frame_time(self.to_glib_none().0) } } } diff --git a/gdk/src/auto/gl_context.rs b/gdk/src/auto/gl_context.rs index 872b83f83df0..9ac8e8a19887 100644 --- a/gdk/src/auto/gl_context.rs +++ b/gdk/src/auto/gl_context.rs @@ -19,17 +19,17 @@ glib::wrapper! { impl GLContext { #[doc(alias = "gdk_gl_context_get_debug_enabled")] - pub fn get_debug_enabled(&self) -> bool { + pub fn is_debug_enabled(&self) -> bool { unsafe { from_glib(ffi::gdk_gl_context_get_debug_enabled(self.to_glib_none().0)) } } #[doc(alias = "gdk_gl_context_get_display")] - pub fn get_display(&self) -> Option { + pub fn display(&self) -> Option { unsafe { from_glib_none(ffi::gdk_gl_context_get_display(self.to_glib_none().0)) } } #[doc(alias = "gdk_gl_context_get_forward_compatible")] - pub fn get_forward_compatible(&self) -> bool { + pub fn is_forward_compatible(&self) -> bool { unsafe { from_glib(ffi::gdk_gl_context_get_forward_compatible( self.to_glib_none().0, @@ -38,7 +38,7 @@ impl GLContext { } #[doc(alias = "gdk_gl_context_get_required_version")] - pub fn get_required_version(&self) -> (i32, i32) { + pub fn required_version(&self) -> (i32, i32) { unsafe { let mut major = mem::MaybeUninit::uninit(); let mut minor = mem::MaybeUninit::uninit(); @@ -54,7 +54,7 @@ impl GLContext { } #[doc(alias = "gdk_gl_context_get_shared_context")] - pub fn get_shared_context(&self) -> Option { + pub fn shared_context(&self) -> Option { unsafe { from_glib_none(ffi::gdk_gl_context_get_shared_context( self.to_glib_none().0, @@ -65,12 +65,12 @@ impl GLContext { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_gl_context_get_use_es")] - pub fn get_use_es(&self) -> bool { + pub fn uses_es(&self) -> bool { unsafe { from_glib(ffi::gdk_gl_context_get_use_es(self.to_glib_none().0)) } } #[doc(alias = "gdk_gl_context_get_version")] - pub fn get_version(&self) -> (i32, i32) { + pub fn version(&self) -> (i32, i32) { unsafe { let mut major = mem::MaybeUninit::uninit(); let mut minor = mem::MaybeUninit::uninit(); @@ -86,7 +86,7 @@ impl GLContext { } #[doc(alias = "gdk_gl_context_get_window")] - pub fn get_window(&self) -> Option { + pub fn window(&self) -> Option { unsafe { from_glib_none(ffi::gdk_gl_context_get_window(self.to_glib_none().0)) } } diff --git a/gdk/src/auto/keymap.rs b/gdk/src/auto/keymap.rs index 534d20516ee1..4f42d5fc9725 100644 --- a/gdk/src/auto/keymap.rs +++ b/gdk/src/auto/keymap.rs @@ -25,12 +25,12 @@ glib::wrapper! { impl Keymap { #[doc(alias = "gdk_keymap_get_caps_lock_state")] - pub fn get_caps_lock_state(&self) -> bool { + pub fn is_caps_locked(&self) -> bool { unsafe { from_glib(ffi::gdk_keymap_get_caps_lock_state(self.to_glib_none().0)) } } #[doc(alias = "gdk_keymap_get_direction")] - pub fn get_direction(&self) -> pango::Direction { + pub fn direction(&self) -> pango::Direction { unsafe { from_glib(ffi::gdk_keymap_get_direction(self.to_glib_none().0)) } } @@ -45,19 +45,19 @@ impl Keymap { } #[doc(alias = "gdk_keymap_get_modifier_state")] - pub fn get_modifier_state(&self) -> u32 { + pub fn modifier_state(&self) -> u32 { unsafe { ffi::gdk_keymap_get_modifier_state(self.to_glib_none().0) } } #[doc(alias = "gdk_keymap_get_num_lock_state")] - pub fn get_num_lock_state(&self) -> bool { + pub fn is_num_locked(&self) -> bool { unsafe { from_glib(ffi::gdk_keymap_get_num_lock_state(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] #[doc(alias = "gdk_keymap_get_scroll_lock_state")] - pub fn get_scroll_lock_state(&self) -> bool { + pub fn is_scroll_locked(&self) -> bool { unsafe { from_glib(ffi::gdk_keymap_get_scroll_lock_state(self.to_glib_none().0)) } } diff --git a/gdk/src/auto/monitor.rs b/gdk/src/auto/monitor.rs index be226d50e706..ce5bf1a26781 100644 --- a/gdk/src/auto/monitor.rs +++ b/gdk/src/auto/monitor.rs @@ -24,12 +24,12 @@ glib::wrapper! { impl Monitor { #[doc(alias = "gdk_monitor_get_display")] - pub fn get_display(&self) -> Option { + pub fn display(&self) -> Option { unsafe { from_glib_none(ffi::gdk_monitor_get_display(self.to_glib_none().0)) } } #[doc(alias = "gdk_monitor_get_geometry")] - pub fn get_geometry(&self) -> Rectangle { + pub fn geometry(&self) -> Rectangle { unsafe { let mut geometry = Rectangle::uninitialized(); ffi::gdk_monitor_get_geometry(self.to_glib_none().0, geometry.to_glib_none_mut().0); @@ -38,42 +38,42 @@ impl Monitor { } #[doc(alias = "gdk_monitor_get_height_mm")] - pub fn get_height_mm(&self) -> i32 { + pub fn height_mm(&self) -> i32 { unsafe { ffi::gdk_monitor_get_height_mm(self.to_glib_none().0) } } #[doc(alias = "gdk_monitor_get_manufacturer")] - pub fn get_manufacturer(&self) -> Option { + pub fn manufacturer(&self) -> Option { unsafe { from_glib_none(ffi::gdk_monitor_get_manufacturer(self.to_glib_none().0)) } } #[doc(alias = "gdk_monitor_get_model")] - pub fn get_model(&self) -> Option { + pub fn model(&self) -> Option { unsafe { from_glib_none(ffi::gdk_monitor_get_model(self.to_glib_none().0)) } } #[doc(alias = "gdk_monitor_get_refresh_rate")] - pub fn get_refresh_rate(&self) -> i32 { + pub fn refresh_rate(&self) -> i32 { unsafe { ffi::gdk_monitor_get_refresh_rate(self.to_glib_none().0) } } #[doc(alias = "gdk_monitor_get_scale_factor")] - pub fn get_scale_factor(&self) -> i32 { + pub fn scale_factor(&self) -> i32 { unsafe { ffi::gdk_monitor_get_scale_factor(self.to_glib_none().0) } } #[doc(alias = "gdk_monitor_get_subpixel_layout")] - pub fn get_subpixel_layout(&self) -> SubpixelLayout { + pub fn subpixel_layout(&self) -> SubpixelLayout { unsafe { from_glib(ffi::gdk_monitor_get_subpixel_layout(self.to_glib_none().0)) } } #[doc(alias = "gdk_monitor_get_width_mm")] - pub fn get_width_mm(&self) -> i32 { + pub fn width_mm(&self) -> i32 { unsafe { ffi::gdk_monitor_get_width_mm(self.to_glib_none().0) } } #[doc(alias = "gdk_monitor_get_workarea")] - pub fn get_workarea(&self) -> Rectangle { + pub fn workarea(&self) -> Rectangle { unsafe { let mut workarea = Rectangle::uninitialized(); ffi::gdk_monitor_get_workarea(self.to_glib_none().0, workarea.to_glib_none_mut().0); diff --git a/gdk/src/auto/screen.rs b/gdk/src/auto/screen.rs index cf1e1540edd7..5fdcb48244fc 100644 --- a/gdk/src/auto/screen.rs +++ b/gdk/src/auto/screen.rs @@ -25,24 +25,24 @@ glib::wrapper! { impl Screen { #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_screen_get_active_window")] - pub fn get_active_window(&self) -> Option { + pub fn active_window(&self) -> Option { unsafe { from_glib_full(ffi::gdk_screen_get_active_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_screen_get_display")] - pub fn get_display(&self) -> Display { + pub fn display(&self) -> Display { unsafe { from_glib_none(ffi::gdk_screen_get_display(self.to_glib_none().0)) } } #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_screen_get_height")] - pub fn get_height(&self) -> i32 { + pub fn height(&self) -> i32 { unsafe { ffi::gdk_screen_get_height(self.to_glib_none().0) } } #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_screen_get_height_mm")] - pub fn get_height_mm(&self) -> i32 { + pub fn height_mm(&self) -> i32 { unsafe { ffi::gdk_screen_get_height_mm(self.to_glib_none().0) } } @@ -119,44 +119,44 @@ impl Screen { #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_screen_get_n_monitors")] - pub fn get_n_monitors(&self) -> i32 { + pub fn n_monitors(&self) -> i32 { unsafe { ffi::gdk_screen_get_n_monitors(self.to_glib_none().0) } } #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_screen_get_number")] - pub fn get_number(&self) -> i32 { + pub fn number(&self) -> i32 { unsafe { ffi::gdk_screen_get_number(self.to_glib_none().0) } } #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_screen_get_primary_monitor")] - pub fn get_primary_monitor(&self) -> i32 { + pub fn primary_monitor(&self) -> i32 { unsafe { ffi::gdk_screen_get_primary_monitor(self.to_glib_none().0) } } #[doc(alias = "gdk_screen_get_resolution")] - pub fn get_resolution(&self) -> f64 { + pub fn resolution(&self) -> f64 { unsafe { ffi::gdk_screen_get_resolution(self.to_glib_none().0) } } #[doc(alias = "gdk_screen_get_rgba_visual")] - pub fn get_rgba_visual(&self) -> Option { + pub fn rgba_visual(&self) -> Option { unsafe { from_glib_none(ffi::gdk_screen_get_rgba_visual(self.to_glib_none().0)) } } #[doc(alias = "gdk_screen_get_root_window")] - pub fn get_root_window(&self) -> Option { + pub fn root_window(&self) -> Option { unsafe { from_glib_none(ffi::gdk_screen_get_root_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_screen_get_system_visual")] - pub fn get_system_visual(&self) -> Option { + pub fn system_visual(&self) -> Option { unsafe { from_glib_none(ffi::gdk_screen_get_system_visual(self.to_glib_none().0)) } } #[doc(alias = "gdk_screen_get_toplevel_windows")] - pub fn get_toplevel_windows(&self) -> Vec { + pub fn toplevel_windows(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gdk_screen_get_toplevel_windows( self.to_glib_none().0, @@ -166,18 +166,18 @@ impl Screen { #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_screen_get_width")] - pub fn get_width(&self) -> i32 { + pub fn width(&self) -> i32 { unsafe { ffi::gdk_screen_get_width(self.to_glib_none().0) } } #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_screen_get_width_mm")] - pub fn get_width_mm(&self) -> i32 { + pub fn width_mm(&self) -> i32 { unsafe { ffi::gdk_screen_get_width_mm(self.to_glib_none().0) } } #[doc(alias = "gdk_screen_get_window_stack")] - pub fn get_window_stack(&self) -> Vec { + pub fn window_stack(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gdk_screen_get_window_stack( self.to_glib_none().0, @@ -227,28 +227,28 @@ impl Screen { #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_screen_height")] - pub fn height() -> i32 { + pub fn screen_height() -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gdk_screen_height() } } #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_screen_height_mm")] - pub fn height_mm() -> i32 { + pub fn screen_height_mm() -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gdk_screen_height_mm() } } #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_screen_width")] - pub fn width() -> i32 { + pub fn screen_width() -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gdk_screen_width() } } #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_screen_width_mm")] - pub fn width_mm() -> i32 { + pub fn screen_width_mm() -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gdk_screen_width_mm() } } diff --git a/gdk/src/auto/seat.rs b/gdk/src/auto/seat.rs index 8e7b8f9d72ec..687bbb214372 100644 --- a/gdk/src/auto/seat.rs +++ b/gdk/src/auto/seat.rs @@ -30,22 +30,22 @@ glib::wrapper! { impl Seat { #[doc(alias = "gdk_seat_get_capabilities")] - pub fn get_capabilities(&self) -> SeatCapabilities { + pub fn capabilities(&self) -> SeatCapabilities { unsafe { from_glib(ffi::gdk_seat_get_capabilities(self.to_glib_none().0)) } } #[doc(alias = "gdk_seat_get_display")] - pub fn get_display(&self) -> Option { + pub fn display(&self) -> Option { unsafe { from_glib_none(ffi::gdk_seat_get_display(self.to_glib_none().0)) } } #[doc(alias = "gdk_seat_get_keyboard")] - pub fn get_keyboard(&self) -> Option { + pub fn keyboard(&self) -> Option { unsafe { from_glib_none(ffi::gdk_seat_get_keyboard(self.to_glib_none().0)) } } #[doc(alias = "gdk_seat_get_pointer")] - pub fn get_pointer(&self) -> Option { + pub fn pointer(&self) -> Option { unsafe { from_glib_none(ffi::gdk_seat_get_pointer(self.to_glib_none().0)) } } diff --git a/gdk/src/auto/versions.txt b/gdk/src/auto/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/gdk/src/auto/versions.txt +++ b/gdk/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/gdk/src/auto/visual.rs b/gdk/src/auto/visual.rs index f9eea2ff6575..5d6b207d4c92 100644 --- a/gdk/src/auto/visual.rs +++ b/gdk/src/auto/visual.rs @@ -20,12 +20,12 @@ glib::wrapper! { impl Visual { #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_visual_get_bits_per_rgb")] - pub fn get_bits_per_rgb(&self) -> i32 { + pub fn bits_per_rgb(&self) -> i32 { unsafe { ffi::gdk_visual_get_bits_per_rgb(self.to_glib_none().0) } } #[doc(alias = "gdk_visual_get_blue_pixel_details")] - pub fn get_blue_pixel_details(&self) -> (u32, i32, i32) { + pub fn blue_pixel_details(&self) -> (u32, i32, i32) { unsafe { let mut mask = mem::MaybeUninit::uninit(); let mut shift = mem::MaybeUninit::uninit(); @@ -45,23 +45,23 @@ impl Visual { #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_visual_get_byte_order")] - pub fn get_byte_order(&self) -> ByteOrder { + pub fn byte_order(&self) -> ByteOrder { unsafe { from_glib(ffi::gdk_visual_get_byte_order(self.to_glib_none().0)) } } #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gdk_visual_get_colormap_size")] - pub fn get_colormap_size(&self) -> i32 { + pub fn colormap_size(&self) -> i32 { unsafe { ffi::gdk_visual_get_colormap_size(self.to_glib_none().0) } } #[doc(alias = "gdk_visual_get_depth")] - pub fn get_depth(&self) -> i32 { + pub fn depth(&self) -> i32 { unsafe { ffi::gdk_visual_get_depth(self.to_glib_none().0) } } #[doc(alias = "gdk_visual_get_green_pixel_details")] - pub fn get_green_pixel_details(&self) -> (u32, i32, i32) { + pub fn green_pixel_details(&self) -> (u32, i32, i32) { unsafe { let mut mask = mem::MaybeUninit::uninit(); let mut shift = mem::MaybeUninit::uninit(); @@ -80,7 +80,7 @@ impl Visual { } #[doc(alias = "gdk_visual_get_red_pixel_details")] - pub fn get_red_pixel_details(&self) -> (u32, i32, i32) { + pub fn red_pixel_details(&self) -> (u32, i32, i32) { unsafe { let mut mask = mem::MaybeUninit::uninit(); let mut shift = mem::MaybeUninit::uninit(); @@ -99,12 +99,12 @@ impl Visual { } #[doc(alias = "gdk_visual_get_screen")] - pub fn get_screen(&self) -> Screen { + pub fn screen(&self) -> Screen { unsafe { from_glib_none(ffi::gdk_visual_get_screen(self.to_glib_none().0)) } } #[doc(alias = "gdk_visual_get_visual_type")] - pub fn get_visual_type(&self) -> VisualType { + pub fn visual_type(&self) -> VisualType { unsafe { from_glib(ffi::gdk_visual_get_visual_type(self.to_glib_none().0)) } } diff --git a/gdk/src/auto/window.rs b/gdk/src/auto/window.rs index cdb9632aa26e..5ea9219f49e2 100644 --- a/gdk/src/auto/window.rs +++ b/gdk/src/auto/window.rs @@ -312,12 +312,12 @@ impl Window { } #[doc(alias = "gdk_window_get_accept_focus")] - pub fn get_accept_focus(&self) -> bool { + pub fn accepts_focus(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_accept_focus(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_children")] - pub fn get_children(&self) -> Vec { + pub fn children(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gdk_window_get_children( self.to_glib_none().0, @@ -331,23 +331,23 @@ impl Window { //} #[doc(alias = "gdk_window_get_clip_region")] - pub fn get_clip_region(&self) -> Option { + pub fn clip_region(&self) -> Option { unsafe { from_glib_full(ffi::gdk_window_get_clip_region(self.to_glib_none().0)) } } #[cfg_attr(feature = "v3_16", deprecated)] #[doc(alias = "gdk_window_get_composited")] - pub fn get_composited(&self) -> bool { + pub fn is_composited(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_composited(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_cursor")] - pub fn get_cursor(&self) -> Option { + pub fn cursor(&self) -> Option { unsafe { from_glib_none(ffi::gdk_window_get_cursor(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_decorations")] - pub fn get_decorations(&self) -> Option { + pub fn decorations(&self) -> Option { unsafe { let mut decorations = mem::MaybeUninit::uninit(); let ret = from_glib(ffi::gdk_window_get_decorations( @@ -427,12 +427,12 @@ impl Window { } #[doc(alias = "gdk_window_get_display")] - pub fn get_display(&self) -> Display { + pub fn display(&self) -> Display { unsafe { from_glib_none(ffi::gdk_window_get_display(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_drag_protocol")] - pub fn get_drag_protocol(&self) -> (DragProtocol, Window) { + pub fn drag_protocol(&self) -> (DragProtocol, Window) { unsafe { let mut target = ptr::null_mut(); let ret = from_glib(ffi::gdk_window_get_drag_protocol( @@ -444,12 +444,12 @@ impl Window { } #[doc(alias = "gdk_window_get_effective_parent")] - pub fn get_effective_parent(&self) -> Option { + pub fn effective_parent(&self) -> Option { unsafe { from_glib_none(ffi::gdk_window_get_effective_parent(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_effective_toplevel")] - pub fn get_effective_toplevel(&self) -> Window { + pub fn effective_toplevel(&self) -> Window { unsafe { from_glib_none(ffi::gdk_window_get_effective_toplevel( self.to_glib_none().0, @@ -458,27 +458,27 @@ impl Window { } #[doc(alias = "gdk_window_get_event_compression")] - pub fn get_event_compression(&self) -> bool { + pub fn is_event_compression(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_event_compression(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_events")] - pub fn get_events(&self) -> EventMask { + pub fn events(&self) -> EventMask { unsafe { from_glib(ffi::gdk_window_get_events(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_focus_on_map")] - pub fn get_focus_on_map(&self) -> bool { + pub fn gets_focus_on_map(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_focus_on_map(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_frame_clock")] - pub fn get_frame_clock(&self) -> Option { + pub fn frame_clock(&self) -> Option { unsafe { from_glib_none(ffi::gdk_window_get_frame_clock(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_frame_extents")] - pub fn get_frame_extents(&self) -> Rectangle { + pub fn frame_extents(&self) -> Rectangle { unsafe { let mut rect = Rectangle::uninitialized(); ffi::gdk_window_get_frame_extents(self.to_glib_none().0, rect.to_glib_none_mut().0); @@ -487,12 +487,12 @@ impl Window { } #[doc(alias = "gdk_window_get_fullscreen_mode")] - pub fn get_fullscreen_mode(&self) -> FullscreenMode { + pub fn fullscreen_mode(&self) -> FullscreenMode { unsafe { from_glib(ffi::gdk_window_get_fullscreen_mode(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_geometry")] - pub fn get_geometry(&self) -> (i32, i32, i32, i32) { + pub fn geometry(&self) -> (i32, i32, i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); @@ -514,22 +514,22 @@ impl Window { } #[doc(alias = "gdk_window_get_group")] - pub fn get_group(&self) -> Option { + pub fn group(&self) -> Option { unsafe { from_glib_none(ffi::gdk_window_get_group(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_height")] - pub fn get_height(&self) -> i32 { + pub fn height(&self) -> i32 { unsafe { ffi::gdk_window_get_height(self.to_glib_none().0) } } #[doc(alias = "gdk_window_get_modal_hint")] - pub fn get_modal_hint(&self) -> bool { + pub fn is_modal_hint(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_modal_hint(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_origin")] - pub fn get_origin(&self) -> (i32, i32, i32) { + pub fn origin(&self) -> (i32, i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); @@ -542,19 +542,19 @@ impl Window { } #[doc(alias = "gdk_window_get_parent")] - pub fn get_parent(&self) -> Option { + pub fn parent(&self) -> Option { unsafe { from_glib_none(ffi::gdk_window_get_parent(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] #[doc(alias = "gdk_window_get_pass_through")] - pub fn get_pass_through(&self) -> bool { + pub fn is_pass_through(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_pass_through(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_position")] - pub fn get_position(&self) -> (i32, i32) { + pub fn position(&self) -> (i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); @@ -584,7 +584,7 @@ impl Window { } #[doc(alias = "gdk_window_get_root_origin")] - pub fn get_root_origin(&self) -> (i32, i32) { + pub fn root_origin(&self) -> (i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); @@ -596,12 +596,12 @@ impl Window { } #[doc(alias = "gdk_window_get_scale_factor")] - pub fn get_scale_factor(&self) -> i32 { + pub fn scale_factor(&self) -> i32 { unsafe { ffi::gdk_window_get_scale_factor(self.to_glib_none().0) } } #[doc(alias = "gdk_window_get_screen")] - pub fn get_screen(&self) -> Screen { + pub fn screen(&self) -> Screen { unsafe { from_glib_none(ffi::gdk_window_get_screen(self.to_glib_none().0)) } } @@ -616,12 +616,12 @@ impl Window { } #[doc(alias = "gdk_window_get_state")] - pub fn get_state(&self) -> WindowState { + pub fn state(&self) -> WindowState { unsafe { from_glib(ffi::gdk_window_get_state(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_support_multidevice")] - pub fn get_support_multidevice(&self) -> bool { + pub fn supports_multidevice(&self) -> bool { unsafe { from_glib(ffi::gdk_window_get_support_multidevice( self.to_glib_none().0, @@ -630,37 +630,37 @@ impl Window { } #[doc(alias = "gdk_window_get_toplevel")] - pub fn get_toplevel(&self) -> Window { + pub fn toplevel(&self) -> Window { unsafe { from_glib_none(ffi::gdk_window_get_toplevel(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_type_hint")] - pub fn get_type_hint(&self) -> WindowTypeHint { + pub fn type_hint(&self) -> WindowTypeHint { unsafe { from_glib(ffi::gdk_window_get_type_hint(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_update_area")] - pub fn get_update_area(&self) -> Option { + pub fn update_area(&self) -> Option { unsafe { from_glib_full(ffi::gdk_window_get_update_area(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_visible_region")] - pub fn get_visible_region(&self) -> Option { + pub fn visible_region(&self) -> Option { unsafe { from_glib_full(ffi::gdk_window_get_visible_region(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_visual")] - pub fn get_visual(&self) -> Visual { + pub fn visual(&self) -> Visual { unsafe { from_glib_none(ffi::gdk_window_get_visual(self.to_glib_none().0)) } } #[doc(alias = "gdk_window_get_width")] - pub fn get_width(&self) -> i32 { + pub fn width(&self) -> i32 { unsafe { ffi::gdk_window_get_width(self.to_glib_none().0) } } #[doc(alias = "gdk_window_get_window_type")] - pub fn get_window_type(&self) -> WindowType { + pub fn window_type(&self) -> WindowType { unsafe { from_glib(ffi::gdk_window_get_window_type(self.to_glib_none().0)) } } diff --git a/gdk/src/cairo_interaction.rs b/gdk/src/cairo_interaction.rs index 5bc5b7ce425d..22d4e90c8b98 100644 --- a/gdk/src/cairo_interaction.rs +++ b/gdk/src/cairo_interaction.rs @@ -62,7 +62,7 @@ pub trait GdkContextExt { height: i32, ); - fn get_clip_rectangle(&self) -> Option; + fn clip_rectangle(&self) -> Option; fn set_source_rgba(&self, rgba: &RGBA); @@ -108,7 +108,7 @@ impl GdkContextExt for Context { ); } - fn get_clip_rectangle(&self) -> Option { + fn clip_rectangle(&self) -> Option { unsafe { let mut rectangle = Rectangle::uninitialized(); if from_glib(ffi::gdk_cairo_get_clip_rectangle( diff --git a/gdk/src/device.rs b/gdk/src/device.rs index 3f8e68d760ca..bae712f1bd4e 100644 --- a/gdk/src/device.rs +++ b/gdk/src/device.rs @@ -12,7 +12,7 @@ use std::ptr; impl Device { #[doc(alias = "gdk_device_get_axis")] - pub fn get_axis(&self, axes: &mut [f64], use_: AxisUse, value: &mut f64) -> bool { + pub fn is_axis(&self, axes: &mut [f64], use_: AxisUse, value: &mut f64) -> bool { unsafe { from_glib(ffi::gdk_device_get_axis( self.to_glib_none().0, diff --git a/gdk/src/event.rs b/gdk/src/event.rs index 4cb50a65a9c4..e692e39ac419 100644 --- a/gdk/src/event.rs +++ b/gdk/src/event.rs @@ -109,7 +109,7 @@ impl Event { } #[doc(alias = "gdk_event_get_button")] - pub fn get_button(&self) -> Option { + pub fn button(&self) -> Option { let mut button = 0u32; if unsafe { from_glib(ffi::gdk_event_get_button( @@ -124,7 +124,7 @@ impl Event { } #[doc(alias = "gdk_event_get_click_count")] - pub fn get_click_count(&self) -> Option { + pub fn click_count(&self) -> Option { let mut click_count = 0u32; if unsafe { from_glib(ffi::gdk_event_get_click_count( @@ -139,7 +139,7 @@ impl Event { } #[doc(alias = "gdk_event_get_coords")] - pub fn get_coords(&self) -> Option<(f64, f64)> { + pub fn coords(&self) -> Option<(f64, f64)> { let mut x_win = 0f64; let mut y_win = 0f64; if unsafe { @@ -156,7 +156,7 @@ impl Event { } #[doc(alias = "gdk_event_get_keycode")] - pub fn get_keycode(&self) -> Option { + pub fn keycode(&self) -> Option { let mut keycode = 0u16; if unsafe { from_glib(ffi::gdk_event_get_keycode( @@ -171,7 +171,7 @@ impl Event { } #[doc(alias = "gdk_event_get_keyval")] - pub fn get_keyval(&self) -> Option { + pub fn keyval(&self) -> Option { let mut keyval = 0u32; if unsafe { from_glib(ffi::gdk_event_get_keyval( @@ -186,7 +186,7 @@ impl Event { } #[doc(alias = "gdk_event_get_root_coords")] - pub fn get_root_coords(&self) -> Option<(f64, f64)> { + pub fn root_coords(&self) -> Option<(f64, f64)> { let mut x_root = 0f64; let mut y_root = 0f64; if unsafe { @@ -203,7 +203,7 @@ impl Event { } #[doc(alias = "gdk_event_get_scroll_direction")] - pub fn get_scroll_direction(&self) -> Option { + pub fn scroll_direction(&self) -> Option { unsafe { let mut direction = mem::MaybeUninit::uninit(); if from_glib(ffi::gdk_event_get_scroll_direction( @@ -218,7 +218,7 @@ impl Event { } #[doc(alias = "gdk_event_get_scroll_deltas")] - pub fn get_scroll_deltas(&self) -> Option<(f64, f64)> { + pub fn scroll_deltas(&self) -> Option<(f64, f64)> { let mut delta_x = 0f64; let mut delta_y = 0f64; if unsafe { @@ -242,7 +242,7 @@ impl Event { } #[doc(alias = "gdk_event_get_scroll_direction")] - pub fn get_state(&self) -> Option { + pub fn state(&self) -> Option { unsafe { let mut state = mem::MaybeUninit::uninit(); if from_glib(ffi::gdk_event_get_scroll_direction( @@ -257,18 +257,18 @@ impl Event { } #[doc(alias = "gdk_event_get_time")] - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { unsafe { ffi::gdk_event_get_time(self.to_glib_none().0) } } /// Returns the associated `Window` if applicable. #[doc(alias = "gdk_event_get_window")] - pub fn get_window(&self) -> Option { + pub fn window(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_window(self.to_glib_none().0)) } } #[doc(alias = "gdk_event_get_event_sequence")] - pub fn get_event_sequence(&self) -> Option { + pub fn event_sequence(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_event_sequence(self.to_glib_none().0)) } } @@ -280,21 +280,21 @@ impl Event { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gdk_event_get_seat")] - pub fn get_seat(&self) -> Option { + pub fn seat(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_seat(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_event_get_scancode")] - pub fn get_scancode(&mut self) -> i32 { + pub fn scancode(&mut self) -> i32 { unsafe { ffi::gdk_event_get_scancode(self.to_glib_none_mut().0) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_event_get_pointer_emulated")] - pub fn get_pointer_emulated(&mut self) -> bool { + pub fn is_pointer_emulated(&mut self) -> bool { unsafe { from_glib(ffi::gdk_event_get_pointer_emulated( self.to_glib_none_mut().0, @@ -308,7 +308,7 @@ impl Event { } #[doc(alias = "gdk_event_get_screen")] - pub fn get_screen(&self) -> Option { + pub fn screen(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_screen(self.to_glib_none().0)) } } @@ -318,7 +318,7 @@ impl Event { } #[doc(alias = "gdk_event_get_device")] - pub fn get_device(&self) -> Option { + pub fn device(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_device(self.to_glib_none().0)) } } @@ -330,7 +330,7 @@ impl Event { } #[doc(alias = "gdk_event_get_source_device")] - pub fn get_source_device(&self) -> Option { + pub fn source_device(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_source_device(self.to_glib_none().0)) } } @@ -346,18 +346,18 @@ impl Event { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gdk_event_get_device_tool")] - pub fn get_device_tool(&self) -> Option { + pub fn device_tool(&self) -> Option { unsafe { from_glib_none(ffi::gdk_event_get_device_tool(self.to_glib_none().0)) } } /// Returns the event type. - pub fn get_event_type(&self) -> EventType { + pub fn event_type(&self) -> EventType { unsafe { from_glib(self.as_ref().type_) } } /// Returns whether the event was sent explicitly. #[allow(clippy::cast_lossless)] - pub fn get_send_event(&self) -> bool { + pub fn is_send_event(&self) -> bool { unsafe { from_glib(self.as_ref().send_event as i32) } } @@ -394,7 +394,7 @@ impl fmt::Debug for Event { fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> { fmt.debug_struct("Event") .field("inner", &self.0) - .field("type", &self.get_event_type()) + .field("type", &self.event_type()) .finish() } } diff --git a/gdk/src/event_button.rs b/gdk/src/event_button.rs index d558b5fe0b9b..9fbeb5095ff9 100644 --- a/gdk/src/event_button.rs +++ b/gdk/src/event_button.rs @@ -15,29 +15,29 @@ event_subtype!( ); impl EventButton { - pub fn get_position(&self) -> (f64, f64) { + pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } - pub fn get_state(&self) -> crate::ModifierType { + pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_button(&self) -> u32 { + pub fn button(&self) -> u32 { self.as_ref().button } - pub fn get_device(&self) -> Option { + pub fn device(&self) -> Option { unsafe { from_glib_none(self.as_ref().device) } } - pub fn get_axes(&self) -> Option<(f64, f64)> { + pub fn axes(&self) -> Option<(f64, f64)> { let axes = self.as_ref().axes; if axes.is_null() { @@ -47,7 +47,7 @@ impl EventButton { } } - pub fn get_root(&self) -> (f64, f64) { + pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) diff --git a/gdk/src/event_configure.rs b/gdk/src/event_configure.rs index 9a2e51477e1a..be497a92d5be 100644 --- a/gdk/src/event_configure.rs +++ b/gdk/src/event_configure.rs @@ -9,11 +9,11 @@ event_wrapper!(EventConfigure, GdkEventConfigure); event_subtype!(EventConfigure, ffi::GDK_CONFIGURE); impl EventConfigure { - pub fn get_position(&self) -> (i32, i32) { + pub fn position(&self) -> (i32, i32) { (self.as_ref().x, self.as_ref().y) } - pub fn get_size(&self) -> (u32, u32) { + pub fn size(&self) -> (u32, u32) { let width = self.as_ref().width; let height = self.as_ref().height; assert!(width >= 0 && height >= 0, "Unexpected negative value"); diff --git a/gdk/src/event_crossing.rs b/gdk/src/event_crossing.rs index a2b4b4e8e828..645aaa3bbd06 100644 --- a/gdk/src/event_crossing.rs +++ b/gdk/src/event_crossing.rs @@ -9,39 +9,39 @@ event_wrapper!(EventCrossing, GdkEventCrossing); event_subtype!(EventCrossing, ffi::GDK_ENTER_NOTIFY | ffi::GDK_LEAVE_NOTIFY); impl EventCrossing { - pub fn get_position(&self) -> (f64, f64) { + pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } - pub fn get_subwindow(&self) -> Option { + pub fn subwindow(&self) -> Option { unsafe { from_glib_none(self.as_ref().subwindow) } } - pub fn get_mode(&self) -> crate::CrossingMode { + pub fn mode(&self) -> crate::CrossingMode { unsafe { from_glib(self.as_ref().mode) } } - pub fn get_detail(&self) -> crate::NotifyType { + pub fn detail(&self) -> crate::NotifyType { unsafe { from_glib(self.as_ref().detail) } } - pub fn get_state(&self) -> crate::ModifierType { + pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_root(&self) -> (f64, f64) { + pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } - pub fn get_focus(&self) -> bool { + pub fn gets_focus(&self) -> bool { unsafe { from_glib(self.as_ref().focus) } } } diff --git a/gdk/src/event_dnd.rs b/gdk/src/event_dnd.rs index b5ad44abfd0d..60306f9aa3db 100644 --- a/gdk/src/event_dnd.rs +++ b/gdk/src/event_dnd.rs @@ -17,15 +17,15 @@ event_subtype!( ); impl EventDND { - pub fn get_context(&self) -> Option { + pub fn context(&self) -> Option { unsafe { from_glib_none(self.as_ref().context) } } - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_root(&self) -> (i16, i16) { + pub fn root(&self) -> (i16, i16) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) diff --git a/gdk/src/event_expose.rs b/gdk/src/event_expose.rs index 9b806c48bf15..b689e8214ab4 100644 --- a/gdk/src/event_expose.rs +++ b/gdk/src/event_expose.rs @@ -10,15 +10,15 @@ event_wrapper!(EventExpose, GdkEventExpose); event_subtype!(EventExpose, ffi::GDK_EXPOSE | ffi::GDK_DAMAGE); impl EventExpose { - pub fn get_region(&self) -> Option { + pub fn region(&self) -> Option { unsafe { from_glib_none(self.as_ref().region) } } - pub fn get_count(&self) -> u32 { + pub fn count(&self) -> u32 { self.as_ref().count as u32 } - pub fn get_area(&self) -> Rectangle { + pub fn area(&self) -> Rectangle { unsafe { from_glib_none(&self.as_ref().area as *const _) } } } diff --git a/gdk/src/event_focus.rs b/gdk/src/event_focus.rs index 42d36636fc16..64faae7bccbd 100644 --- a/gdk/src/event_focus.rs +++ b/gdk/src/event_focus.rs @@ -9,7 +9,7 @@ event_wrapper!(EventFocus, GdkEventFocus); event_subtype!(EventFocus, ffi::GDK_FOCUS_CHANGE); impl EventFocus { - pub fn get_in(&self) -> bool { + pub fn is_in(&self) -> bool { unsafe { from_glib(self.as_ref().in_ as _) } } } diff --git a/gdk/src/event_grab_broken.rs b/gdk/src/event_grab_broken.rs index d8a8cc736427..9c689f747136 100644 --- a/gdk/src/event_grab_broken.rs +++ b/gdk/src/event_grab_broken.rs @@ -17,7 +17,7 @@ impl EventGrabBroken { unsafe { from_glib(self.as_ref().implicit) } } - pub fn get_grab_window(&self) -> Option { + pub fn grab_window(&self) -> Option { unsafe { from_glib_none(self.as_ref().grab_window) } } } diff --git a/gdk/src/event_key.rs b/gdk/src/event_key.rs index 850c475d9806..fd6652ba25e9 100644 --- a/gdk/src/event_key.rs +++ b/gdk/src/event_key.rs @@ -9,33 +9,33 @@ event_wrapper!(EventKey, GdkEventKey); event_subtype!(EventKey, ffi::GDK_KEY_PRESS | ffi::GDK_KEY_RELEASE); impl EventKey { - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_state(&self) -> crate::ModifierType { + pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } - pub fn get_keyval(&self) -> crate::keys::Key { + pub fn keyval(&self) -> crate::keys::Key { unsafe { from_glib(self.as_ref().keyval) } } - pub fn get_length(&self) -> u32 { + pub fn length(&self) -> u32 { let length = self.as_ref().length; assert!(length >= 0, "Unexpected negative value"); length as u32 } - pub fn get_hardware_keycode(&self) -> u16 { + pub fn hardware_keycode(&self) -> u16 { self.as_ref().hardware_keycode } - pub fn get_group(&self) -> u8 { + pub fn group(&self) -> u8 { self.as_ref().group } - pub fn get_is_modifier(&self) -> bool { + pub fn is_modifier(&self) -> bool { self.as_ref().is_modifier & 1 != 0 } } diff --git a/gdk/src/event_motion.rs b/gdk/src/event_motion.rs index f06e8fea55c9..9e800ed76302 100644 --- a/gdk/src/event_motion.rs +++ b/gdk/src/event_motion.rs @@ -9,17 +9,17 @@ event_wrapper!(EventMotion, GdkEventMotion); event_subtype!(EventMotion, ffi::GDK_MOTION_NOTIFY); impl EventMotion { - pub fn get_position(&self) -> (f64, f64) { + pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } - pub fn get_state(&self) -> crate::ModifierType { + pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } @@ -27,11 +27,11 @@ impl EventMotion { unsafe { ffi::gdk_event_request_motions(self.as_ref()) } } - pub fn get_device(&self) -> Option { + pub fn device(&self) -> Option { unsafe { from_glib_none(self.as_ref().device) } } - pub fn get_axes(&self) -> Option<(f64, f64)> { + pub fn axes(&self) -> Option<(f64, f64)> { let axes = self.as_ref().axes; if axes.is_null() { @@ -41,13 +41,13 @@ impl EventMotion { } } - pub fn get_root(&self) -> (f64, f64) { + pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } - pub fn get_is_hint(&self) -> bool { + pub fn is_hint(&self) -> bool { unsafe { from_glib(self.as_ref().is_hint as _) } } } diff --git a/gdk/src/event_owner_change.rs b/gdk/src/event_owner_change.rs index 9c67c70db364..c4e88263f475 100644 --- a/gdk/src/event_owner_change.rs +++ b/gdk/src/event_owner_change.rs @@ -9,23 +9,23 @@ event_wrapper!(EventOwnerChange, GdkEventOwnerChange); event_subtype!(EventOwnerChange, ffi::GDK_OWNER_CHANGE); impl EventOwnerChange { - pub fn get_owner(&self) -> Option { + pub fn owner(&self) -> Option { unsafe { from_glib_none(self.as_ref().owner) } } - pub fn get_reason(&self) -> crate::OwnerChange { + pub fn reason(&self) -> crate::OwnerChange { unsafe { from_glib(self.as_ref().reason) } } - pub fn get_selection(&self) -> crate::Atom { + pub fn selection(&self) -> crate::Atom { unsafe { from_glib_none(self.as_ref().selection as *mut _) } } - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_selection_time(&self) -> u32 { + pub fn selection_time(&self) -> u32 { self.as_ref().selection_time } } diff --git a/gdk/src/event_pad_axis.rs b/gdk/src/event_pad_axis.rs index 829134c698f6..f679de7cf0b4 100644 --- a/gdk/src/event_pad_axis.rs +++ b/gdk/src/event_pad_axis.rs @@ -9,23 +9,23 @@ event_wrapper!(EventPadAxis, GdkEventPadAxis); event_subtype!(EventPadAxis, ffi::GDK_PAD_RING | ffi::GDK_PAD_STRIP); impl EventPadAxis { - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_group(&self) -> u32 { + pub fn group(&self) -> u32 { self.as_ref().group } - pub fn get_index(&self) -> u32 { + pub fn index(&self) -> u32 { self.as_ref().index } - pub fn get_mode(&self) -> u32 { + pub fn mode(&self) -> u32 { self.as_ref().mode } - pub fn get_value(&self) -> f64 { + pub fn value(&self) -> f64 { self.as_ref().value } } diff --git a/gdk/src/event_pad_button.rs b/gdk/src/event_pad_button.rs index 6e49e7241b87..4d6118d2cc07 100644 --- a/gdk/src/event_pad_button.rs +++ b/gdk/src/event_pad_button.rs @@ -12,19 +12,19 @@ event_subtype!( ); impl EventPadButton { - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_group(&self) -> u32 { + pub fn group(&self) -> u32 { self.as_ref().group } - pub fn get_button(&self) -> u32 { + pub fn button(&self) -> u32 { self.as_ref().button } - pub fn get_mode(&self) -> u32 { + pub fn mode(&self) -> u32 { self.as_ref().mode } } diff --git a/gdk/src/event_pad_group_mode.rs b/gdk/src/event_pad_group_mode.rs index 11eb94248c95..5a55c3c26ada 100644 --- a/gdk/src/event_pad_group_mode.rs +++ b/gdk/src/event_pad_group_mode.rs @@ -9,15 +9,15 @@ event_wrapper!(EventPadGroupMode, GdkEventPadGroupMode); event_subtype!(EventPadGroupMode, ffi::GDK_PAD_GROUP_MODE); impl EventPadGroupMode { - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_group(&self) -> u32 { + pub fn group(&self) -> u32 { self.as_ref().group } - pub fn get_mode(&self) -> u32 { + pub fn mode(&self) -> u32 { self.as_ref().mode } } diff --git a/gdk/src/event_property.rs b/gdk/src/event_property.rs index d214818af019..0daad95a694e 100644 --- a/gdk/src/event_property.rs +++ b/gdk/src/event_property.rs @@ -9,15 +9,15 @@ event_wrapper!(EventProperty, GdkEventProperty); event_subtype!(EventProperty, ffi::GDK_PROPERTY_NOTIFY); impl EventProperty { - pub fn get_atom(&self) -> crate::Atom { + pub fn atom(&self) -> crate::Atom { unsafe { from_glib_none(self.as_ref().atom) } } - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_state(&self) -> crate::PropertyState { + pub fn state(&self) -> crate::PropertyState { unsafe { from_glib(self.as_ref().state) } } } diff --git a/gdk/src/event_proximity.rs b/gdk/src/event_proximity.rs index 0194364c636f..dbc71c51aa68 100644 --- a/gdk/src/event_proximity.rs +++ b/gdk/src/event_proximity.rs @@ -12,11 +12,11 @@ event_subtype!( ); impl EventProximity { - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_device(&self) -> Option { + pub fn device(&self) -> Option { unsafe { from_glib_none(self.as_ref().device) } } } diff --git a/gdk/src/event_scroll.rs b/gdk/src/event_scroll.rs index 0f16f4570f89..9f8f11062c90 100644 --- a/gdk/src/event_scroll.rs +++ b/gdk/src/event_scroll.rs @@ -9,41 +9,41 @@ event_wrapper!(EventScroll, GdkEventScroll); event_subtype!(EventScroll, ffi::GDK_SCROLL); impl EventScroll { - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_position(&self) -> (f64, f64) { + pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } - pub fn get_state(&self) -> crate::ModifierType { + pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } - pub fn get_device(&self) -> Option { + pub fn device(&self) -> Option { unsafe { from_glib_none(self.as_ref().device) } } - pub fn get_direction(&self) -> crate::ScrollDirection { + pub fn direction(&self) -> crate::ScrollDirection { unsafe { from_glib(self.as_ref().direction) } } - pub fn get_root(&self) -> (f64, f64) { + pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } - pub fn get_delta(&self) -> (f64, f64) { + pub fn delta(&self) -> (f64, f64) { let dx = self.as_ref().delta_x; let dy = self.as_ref().delta_y; (dx, dy) } - pub fn get_is_stop(&self) -> bool { + pub fn is_stop(&self) -> bool { self.as_ref().is_stop & 1 != 0 } } diff --git a/gdk/src/event_selection.rs b/gdk/src/event_selection.rs index 969e34936518..90e1e3b12a91 100644 --- a/gdk/src/event_selection.rs +++ b/gdk/src/event_selection.rs @@ -12,23 +12,23 @@ event_subtype!( ); impl EventSelection { - pub fn get_selection(&self) -> crate::Atom { + pub fn selection(&self) -> crate::Atom { unsafe { from_glib_none(self.as_ref().selection as *mut _) } } - pub fn get_target(&self) -> crate::Atom { + pub fn target(&self) -> crate::Atom { unsafe { from_glib_none(self.as_ref().target as *mut _) } } - pub fn get_property(&self) -> crate::Atom { + pub fn property(&self) -> crate::Atom { unsafe { from_glib_none(self.as_ref().property as *mut _) } } - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_requestor(&self) -> Option { + pub fn requestor(&self) -> Option { unsafe { from_glib_none(self.as_ref().requestor) } } } diff --git a/gdk/src/event_setting.rs b/gdk/src/event_setting.rs index f00ab59235b7..ac5012ad7677 100644 --- a/gdk/src/event_setting.rs +++ b/gdk/src/event_setting.rs @@ -10,11 +10,11 @@ event_wrapper!(EventSetting, GdkEventSetting); event_subtype!(EventSetting, ffi::GDK_SETTING); impl EventSetting { - pub fn get_name(&self) -> Option { + pub fn name(&self) -> Option { unsafe { from_glib_none(self.as_ref().name) } } - pub fn get_action(&self) -> crate::SettingAction { + pub fn action(&self) -> crate::SettingAction { unsafe { from_glib(self.as_ref().action) } } } diff --git a/gdk/src/event_touch.rs b/gdk/src/event_touch.rs index fda370c6ed61..bd5de4a8bccc 100644 --- a/gdk/src/event_touch.rs +++ b/gdk/src/event_touch.rs @@ -12,17 +12,17 @@ event_subtype!( ); impl EventTouch { - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_position(&self) -> (f64, f64) { + pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } - pub fn get_state(&self) -> crate::ModifierType { + pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } @@ -30,11 +30,11 @@ impl EventTouch { unsafe { from_glib(self.as_ref().emulating_pointer) } } - pub fn get_device(&self) -> Option { + pub fn device(&self) -> Option { unsafe { from_glib_none(self.as_ref().device) } } - pub fn get_axes(&self) -> Option<(f64, f64)> { + pub fn axes(&self) -> Option<(f64, f64)> { let axes = self.as_ref().axes; if axes.is_null() { @@ -44,13 +44,13 @@ impl EventTouch { } } - pub fn get_root(&self) -> (f64, f64) { + pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } - pub fn get_event_sequence(&self) -> Option { + pub fn event_sequence(&self) -> Option { unsafe { from_glib_none(self.as_ref().sequence) } } } diff --git a/gdk/src/event_touchpad_pinch.rs b/gdk/src/event_touchpad_pinch.rs index ac3a4da22f1e..bb1835f8bfe0 100644 --- a/gdk/src/event_touchpad_pinch.rs +++ b/gdk/src/event_touchpad_pinch.rs @@ -13,41 +13,41 @@ impl EventTouchpadPinch { unsafe { from_glib(self.as_ref().phase as _) } } - pub fn get_n_fingers(&self) -> i8 { + pub fn n_fingers(&self) -> i8 { self.as_ref().n_fingers } - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_position(&self) -> (f64, f64) { + pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } - pub fn get_delta(&self) -> (f64, f64) { + pub fn delta(&self) -> (f64, f64) { let dx = self.as_ref().dx; let dy = self.as_ref().dy; (dx, dy) } - pub fn get_angle_delta(&self) -> f64 { + pub fn angle_delta(&self) -> f64 { self.as_ref().angle_delta } - pub fn get_scale(&self) -> f64 { + pub fn scale(&self) -> f64 { self.as_ref().scale } - pub fn get_root(&self) -> (f64, f64) { + pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } - pub fn get_state(&self) -> crate::ModifierType { + pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } } diff --git a/gdk/src/event_touchpad_swipe.rs b/gdk/src/event_touchpad_swipe.rs index a610d1781787..71c5340749b2 100644 --- a/gdk/src/event_touchpad_swipe.rs +++ b/gdk/src/event_touchpad_swipe.rs @@ -13,33 +13,33 @@ impl EventTouchpadSwipe { unsafe { from_glib(self.as_ref().phase as _) } } - pub fn get_n_fingers(&self) -> i8 { + pub fn n_fingers(&self) -> i8 { self.as_ref().n_fingers } - pub fn get_time(&self) -> u32 { + pub fn time(&self) -> u32 { self.as_ref().time } - pub fn get_position(&self) -> (f64, f64) { + pub fn position(&self) -> (f64, f64) { let x = self.as_ref().x; let y = self.as_ref().y; (x, y) } - pub fn get_delta(&self) -> (f64, f64) { + pub fn delta(&self) -> (f64, f64) { let dx = self.as_ref().dx; let dy = self.as_ref().dy; (dx, dy) } - pub fn get_root(&self) -> (f64, f64) { + pub fn root(&self) -> (f64, f64) { let x_root = self.as_ref().x_root; let y_root = self.as_ref().y_root; (x_root, y_root) } - pub fn get_state(&self) -> crate::ModifierType { + pub fn state(&self) -> crate::ModifierType { unsafe { from_glib(self.as_ref().state) } } } diff --git a/gdk/src/event_visibility.rs b/gdk/src/event_visibility.rs index 138f30a2a641..64db942c19f0 100644 --- a/gdk/src/event_visibility.rs +++ b/gdk/src/event_visibility.rs @@ -9,7 +9,7 @@ event_wrapper!(EventVisibility, GdkEventVisibility); event_subtype!(EventVisibility, ffi::GDK_VISIBILITY_NOTIFY); impl EventVisibility { - pub fn get_state(&self) -> crate::VisibilityState { + pub fn state(&self) -> crate::VisibilityState { unsafe { from_glib(self.as_ref().state) } } } diff --git a/gdk/src/event_window_state.rs b/gdk/src/event_window_state.rs index e23d940cc566..d240bceb4061 100644 --- a/gdk/src/event_window_state.rs +++ b/gdk/src/event_window_state.rs @@ -9,11 +9,11 @@ event_wrapper!(EventWindowState, GdkEventWindowState); event_subtype!(EventWindowState, ffi::GDK_WINDOW_STATE); impl EventWindowState { - pub fn get_changed_mask(&self) -> crate::WindowState { + pub fn changed_mask(&self) -> crate::WindowState { unsafe { from_glib(self.as_ref().changed_mask) } } - pub fn get_new_window_state(&self) -> crate::WindowState { + pub fn new_window_state(&self) -> crate::WindowState { unsafe { from_glib(self.as_ref().new_window_state) } } } diff --git a/gdk/src/frame_timings.rs b/gdk/src/frame_timings.rs index 797b796bae6f..703f9569bc01 100644 --- a/gdk/src/frame_timings.rs +++ b/gdk/src/frame_timings.rs @@ -6,7 +6,7 @@ use std::num::NonZeroU64; impl FrameTimings { #[doc(alias = "gdk_frame_timings_get_predicted_presentation_time")] - pub fn get_predicted_presentation_time(&self) -> Option { + pub fn predicted_presentation_time(&self) -> Option { let predicted_presentation_time = unsafe { ffi::gdk_frame_timings_get_predicted_presentation_time(self.to_glib_none().0) }; @@ -17,7 +17,7 @@ impl FrameTimings { } #[doc(alias = "gdk_frame_timings_get_presentation_time")] - pub fn get_presentation_time(&self) -> Option { + pub fn presentation_time(&self) -> Option { let presentation_time = unsafe { ffi::gdk_frame_timings_get_presentation_time(self.to_glib_none().0) }; // assuming presentation time is always positive @@ -27,7 +27,7 @@ impl FrameTimings { } #[doc(alias = "gdk_frame_timings_get_refresh_interval")] - pub fn get_refresh_interval(&self) -> Option { + pub fn refresh_interval(&self) -> Option { let refresh_interval = unsafe { ffi::gdk_frame_timings_get_refresh_interval(self.to_glib_none().0) }; // assuming refresh interval is always positive diff --git a/gdk/src/screen.rs b/gdk/src/screen.rs index 7f35550f9907..483248cae490 100644 --- a/gdk/src/screen.rs +++ b/gdk/src/screen.rs @@ -5,7 +5,7 @@ use glib::translate::*; impl Screen { #[doc(alias = "gdk_screen_get_font_options")] - pub fn get_font_options(&self) -> Option { + pub fn font_options(&self) -> Option { unsafe { from_glib_none(mut_override(ffi::gdk_screen_get_font_options( self.to_glib_none().0, diff --git a/gdk/src/window.rs b/gdk/src/window.rs index c840dc6c27bd..d2c98e40c7f7 100644 --- a/gdk/src/window.rs +++ b/gdk/src/window.rs @@ -48,7 +48,7 @@ impl Default for WindowAttr { } impl WindowAttr { - fn get_mask(&self) -> u32 { + fn mask(&self) -> u32 { let mut mask: ffi::GdkWindowAttributesType = 0; if self.title.is_some() { mask |= ffi::GDK_WA_TITLE; @@ -118,7 +118,7 @@ impl Window { from_glib_full(ffi::gdk_window_new( parent.to_glib_none().0, attributes.to_glib_none().0, - attributes.get_mask() as c_int, + attributes.mask() as c_int, )) } } @@ -190,7 +190,7 @@ pub trait WindowExtManual: 'static { ) -> Option; #[doc(alias = "gdk_window_get_background_pattern")] - fn get_background_pattern(&self) -> Option; + fn background_pattern(&self) -> Option; #[doc(alias = "gdk_window_set_background_pattern")] fn set_background_pattern(&self, pattern: Option<&cairo::Pattern>); @@ -260,7 +260,7 @@ impl> WindowExtManual for O { } } - fn get_background_pattern(&self) -> Option { + fn background_pattern(&self) -> Option { unsafe { let ret = ffi::gdk_window_get_background_pattern(self.as_ref().to_glib_none().0); if ret.is_null() { diff --git a/gdk/sys/versions.txt b/gdk/sys/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/gdk/sys/versions.txt +++ b/gdk/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/gdk/tests/check_event.rs b/gdk/tests/check_event.rs index 1376ce99c9a0..11e9ea4a2527 100644 --- a/gdk/tests/check_event.rs +++ b/gdk/tests/check_event.rs @@ -5,11 +5,11 @@ fn check_event() { let mut ev: gdk::EventKey = base_ev.downcast().unwrap(); ev.as_mut().keyval = *gdk::keys::constants::A; - let keyval_unicode = ev.get_keyval().to_unicode(); + let keyval_unicode = ev.keyval().to_unicode(); assert_eq!(keyval_unicode, Some('A')); - let keyval_name = ev.get_keyval().name(); + let keyval_name = ev.keyval().name(); assert_eq!(keyval_name, Some("A".into())); } diff --git a/gdkx11/src/auto/versions.txt b/gdkx11/src/auto/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/gdkx11/src/auto/versions.txt +++ b/gdkx11/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/gdkx11/src/auto/x11_cursor.rs b/gdkx11/src/auto/x11_cursor.rs index b03c2d0ee01e..d15acfaf910c 100644 --- a/gdkx11/src/auto/x11_cursor.rs +++ b/gdkx11/src/auto/x11_cursor.rs @@ -16,7 +16,7 @@ glib::wrapper! { impl X11Cursor { #[doc(alias = "gdk_x11_cursor_get_xcursor")] - pub fn get_xcursor(&self) -> xlib::Cursor { + pub fn xcursor(&self) -> xlib::Cursor { unsafe { ffi::gdk_x11_cursor_get_xcursor(self.to_glib_none().0) } } } diff --git a/gdkx11/src/auto/x11_device_manager_xi2.rs b/gdkx11/src/auto/x11_device_manager_xi2.rs index e56ead8d6da5..4bce82b11d92 100644 --- a/gdkx11/src/auto/x11_device_manager_xi2.rs +++ b/gdkx11/src/auto/x11_device_manager_xi2.rs @@ -20,7 +20,8 @@ glib::wrapper! { } impl X11DeviceManagerXI2 { - pub fn get_property_major(&self) -> i32 { + #[doc(alias = "get_property_major")] + pub fn major(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -35,7 +36,8 @@ impl X11DeviceManagerXI2 { } } - pub fn get_property_minor(&self) -> i32 { + #[doc(alias = "get_property_minor")] + pub fn minor(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -50,7 +52,8 @@ impl X11DeviceManagerXI2 { } } - pub fn get_property_opcode(&self) -> i32 { + #[doc(alias = "get_property_opcode")] + pub fn opcode(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gdkx11/src/auto/x11_device_xi2.rs b/gdkx11/src/auto/x11_device_xi2.rs index f1c339b27cbd..245b08b0c1bf 100644 --- a/gdkx11/src/auto/x11_device_xi2.rs +++ b/gdkx11/src/auto/x11_device_xi2.rs @@ -19,7 +19,8 @@ glib::wrapper! { } impl X11DeviceXI2 { - pub fn get_property_device_id(&self) -> i32 { + #[doc(alias = "get_property_device_id")] + pub fn device_id(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gdkx11/src/auto/x11_display.rs b/gdkx11/src/auto/x11_display.rs index 4b25b1257ebf..b04d53f2aa8f 100644 --- a/gdkx11/src/auto/x11_display.rs +++ b/gdkx11/src/auto/x11_display.rs @@ -44,7 +44,7 @@ impl X11Display { } #[doc(alias = "gdk_x11_display_get_startup_notification_id")] - pub fn get_startup_notification_id(&self) -> Option { + pub fn startup_notification_id(&self) -> Option { unsafe { from_glib_none(ffi::gdk_x11_display_get_startup_notification_id( self.to_glib_none().0, @@ -53,7 +53,7 @@ impl X11Display { } #[doc(alias = "gdk_x11_display_get_user_time")] - pub fn get_user_time(&self) -> u32 { + pub fn user_time(&self) -> u32 { unsafe { ffi::gdk_x11_display_get_user_time(self.to_glib_none().0) } } diff --git a/gdkx11/src/auto/x11_screen.rs b/gdkx11/src/auto/x11_screen.rs index 8a8ca20a9f55..e7ec9766ddd0 100644 --- a/gdkx11/src/auto/x11_screen.rs +++ b/gdkx11/src/auto/x11_screen.rs @@ -22,7 +22,7 @@ glib::wrapper! { impl X11Screen { #[doc(alias = "gdk_x11_screen_get_current_desktop")] - pub fn get_current_desktop(&self) -> u32 { + pub fn current_desktop(&self) -> u32 { unsafe { ffi::gdk_x11_screen_get_current_desktop(self.to_glib_none().0) } } @@ -32,17 +32,17 @@ impl X11Screen { } #[doc(alias = "gdk_x11_screen_get_number_of_desktops")] - pub fn get_number_of_desktops(&self) -> u32 { + pub fn number_of_desktops(&self) -> u32 { unsafe { ffi::gdk_x11_screen_get_number_of_desktops(self.to_glib_none().0) } } #[doc(alias = "gdk_x11_screen_get_screen_number")] - pub fn get_screen_number(&self) -> i32 { + pub fn screen_number(&self) -> i32 { unsafe { ffi::gdk_x11_screen_get_screen_number(self.to_glib_none().0) } } #[doc(alias = "gdk_x11_screen_get_window_manager_name")] - pub fn get_window_manager_name(&self) -> Option { + pub fn window_manager_name(&self) -> Option { unsafe { from_glib_none(ffi::gdk_x11_screen_get_window_manager_name( self.to_glib_none().0, diff --git a/gdkx11/src/auto/x11_window.rs b/gdkx11/src/auto/x11_window.rs index 457b2aa6b26a..99ba2a8f64eb 100644 --- a/gdkx11/src/auto/x11_window.rs +++ b/gdkx11/src/auto/x11_window.rs @@ -30,12 +30,12 @@ impl X11Window { } #[doc(alias = "gdk_x11_window_get_desktop")] - pub fn get_desktop(&self) -> u32 { + pub fn desktop(&self) -> u32 { unsafe { ffi::gdk_x11_window_get_desktop(self.to_glib_none().0) } } #[doc(alias = "gdk_x11_window_get_xid")] - pub fn get_xid(&self) -> xlib::Window { + pub fn xid(&self) -> xlib::Window { unsafe { ffi::gdk_x11_window_get_xid(self.to_glib_none().0) } } diff --git a/gdkx11/sys/versions.txt b/gdkx11/sys/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/gdkx11/sys/versions.txt +++ b/gdkx11/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/gio/Gir.toml b/gio/Gir.toml index 8267ecd77dbe..9cb60b6c6b8d 100644 --- a/gio/Gir.toml +++ b/gio/Gir.toml @@ -81,11 +81,8 @@ generate = [ "Gio.MemoryMonitor", "Gio.MemoryMonitorWarningLevel", "Gio.Menu", - "Gio.MenuAttributeIter", "Gio.MenuItem", - "Gio.MenuLinkIter", "Gio.MenuModel", - "Gio.Mount", "Gio.MountMountFlags", "Gio.MountOperation", "Gio.MountOperationResult", @@ -147,7 +144,6 @@ generate = [ "Gio.TlsPasswordFlags", "Gio.TlsRehandshakeMode", "Gio.TlsServerConnection", - "Gio.Volume", "Gio.VolumeMonitor", "Gio.ZlibCompressor", "Gio.ZlibCompressorFormat", @@ -304,6 +300,9 @@ generate_builder = true name = "Gio.BufferedOutputStream" status = "generate" generate_builder = true + [[object.function]] + name = "get_auto_grow" + rename = "auto_grows" [[object]] name = "Gio.BytesIcon" @@ -718,6 +717,46 @@ status = "generate" #unsupported memory allocators ignore = true +[[object]] +name = "Gio.MenuAttributeIter" +status = "generate" + [[object.function]] + name = "get_name" + # Users shoud use `next` (automatically renamed from `get_next`). + ignore= true + [[object.function]] + name = "get_value" + # Users shoud use `next` (automatically renamed from `get_next`). + ignore= true + [[object.function]] + name = "next" + # this one advances the iter and returns a boolean + # `get_next` (which will be automatically renamed as `next`) + # matches what we expect from an iterator in Rust. + ignore= true + +[[object]] +name = "Gio.MenuLinkIter" +status = "generate" + [[object.function]] + name = "get_name" + # Users shoud use `next` (automatically renamed from `get_next`). + ignore= true + [[object.function]] + name = "get_value" + # Users shoud use `next` (automatically renamed from `get_next`). + ignore= true + [[object.function]] + name = "next" + # this one advances the iter and returns a boolean + # `get_next` (which will be automatically renamed as `next`) + # matches what we expect from an iterator in Rust. + ignore= true + +[[object]] +name = "Gio.Mount" +status = "generate" + [[object]] name = "Gio.NetworkAddress" status = "generate" @@ -885,6 +924,20 @@ status = "generate" name = "communicate_utf8_async" manual = true [[object.function]] + name = "get_if_exited" + # NOTE: this might be controversial: + # the C fct is named after the WIFEXITED macro + # but this seems like a nicer name to use in Rust: + # if suprocess.has_exited() ... + rename = "has_exited" + [[object.function]] + name = "get_if_signaled" + # NOTE: this might be controversial: + # the C fct is named after the WIFSIGNALED macro + # but this seems like a nicer name to use in Rust: + # if suprocess.has_signaled() ... + rename = "has_signaled" + [[object.function]] name = "send_signal" cfg_condition = "not(windows)" @@ -1168,13 +1221,32 @@ name = "Gio.Vfs" status = "generate" concurrency = "send+sync" +[[object]] +name = "Gio.Volume" +status = "generate" + [[object.function]] + name = "get_icon" + [object.function.return] + nullable = false + [[object.function]] + name = "get_mount" + # Avoid clash with the `mount` operation. + bypass_auto_rename = true + [[object.function]] + name = "get_name" + [object.function.return] + nullable = false + [[object.function]] + name = "get_symbolic_icon" + [object.function.return] + nullable = false + [[object]] name = "Gio.Win32InputStream" status = "manual" cfg_condition = "windows" manual_traits = ["Win32InputStreamExtManual"] - [[object]] name = "Gio.Win32OutputStream" status = "manual" diff --git a/gio/src/auto/action.rs b/gio/src/auto/action.rs index 0caff923c601..659943088aec 100644 --- a/gio/src/auto/action.rs +++ b/gio/src/auto/action.rs @@ -72,22 +72,22 @@ pub trait ActionExt: 'static { fn change_state(&self, value: &glib::Variant); #[doc(alias = "g_action_get_enabled")] - fn get_enabled(&self) -> bool; + fn is_enabled(&self) -> bool; #[doc(alias = "g_action_get_name")] - fn get_name(&self) -> glib::GString; + fn name(&self) -> glib::GString; #[doc(alias = "g_action_get_parameter_type")] - fn get_parameter_type(&self) -> Option; + fn parameter_type(&self) -> Option; #[doc(alias = "g_action_get_state")] - fn get_state(&self) -> Option; + fn state(&self) -> Option; #[doc(alias = "g_action_get_state_hint")] - fn get_state_hint(&self) -> Option; + fn state_hint(&self) -> Option; #[doc(alias = "g_action_get_state_type")] - fn get_state_type(&self) -> Option; + fn state_type(&self) -> Option; fn connect_property_enabled_notify(&self, f: F) -> SignalHandlerId; @@ -116,15 +116,15 @@ impl> ActionExt for O { } } - fn get_enabled(&self) -> bool { + fn is_enabled(&self) -> bool { unsafe { from_glib(ffi::g_action_get_enabled(self.as_ref().to_glib_none().0)) } } - fn get_name(&self) -> glib::GString { + fn name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_action_get_name(self.as_ref().to_glib_none().0)) } } - fn get_parameter_type(&self) -> Option { + fn parameter_type(&self) -> Option { unsafe { from_glib_none(ffi::g_action_get_parameter_type( self.as_ref().to_glib_none().0, @@ -132,15 +132,15 @@ impl> ActionExt for O { } } - fn get_state(&self) -> Option { + fn state(&self) -> Option { unsafe { from_glib_full(ffi::g_action_get_state(self.as_ref().to_glib_none().0)) } } - fn get_state_hint(&self) -> Option { + fn state_hint(&self) -> Option { unsafe { from_glib_full(ffi::g_action_get_state_hint(self.as_ref().to_glib_none().0)) } } - fn get_state_type(&self) -> Option { + fn state_type(&self) -> Option { unsafe { from_glib_none(ffi::g_action_get_state_type(self.as_ref().to_glib_none().0)) } } diff --git a/gio/src/auto/app_info.rs b/gio/src/auto/app_info.rs index c379f6d22347..5f1d409d9e93 100644 --- a/gio/src/auto/app_info.rs +++ b/gio/src/auto/app_info.rs @@ -221,28 +221,28 @@ pub trait AppInfoExt: 'static { fn equal>(&self, appinfo2: &P) -> bool; #[doc(alias = "g_app_info_get_commandline")] - fn get_commandline(&self) -> Option; + fn commandline(&self) -> Option; #[doc(alias = "g_app_info_get_description")] - fn get_description(&self) -> Option; + fn description(&self) -> Option; #[doc(alias = "g_app_info_get_display_name")] - fn get_display_name(&self) -> glib::GString; + fn display_name(&self) -> glib::GString; #[doc(alias = "g_app_info_get_executable")] - fn get_executable(&self) -> std::path::PathBuf; + fn executable(&self) -> std::path::PathBuf; #[doc(alias = "g_app_info_get_icon")] - fn get_icon(&self) -> Option; + fn icon(&self) -> Option; #[doc(alias = "g_app_info_get_id")] - fn get_id(&self) -> Option; + fn id(&self) -> Option; #[doc(alias = "g_app_info_get_name")] - fn get_name(&self) -> glib::GString; + fn name(&self) -> glib::GString; #[doc(alias = "g_app_info_get_supported_types")] - fn get_supported_types(&self) -> Vec; + fn supported_types(&self) -> Vec; #[doc(alias = "g_app_info_launch")] fn launch>( @@ -329,7 +329,7 @@ impl> AppInfoExt for O { } } - fn get_commandline(&self) -> Option { + fn commandline(&self) -> Option { unsafe { from_glib_none(ffi::g_app_info_get_commandline( self.as_ref().to_glib_none().0, @@ -337,7 +337,7 @@ impl> AppInfoExt for O { } } - fn get_description(&self) -> Option { + fn description(&self) -> Option { unsafe { from_glib_none(ffi::g_app_info_get_description( self.as_ref().to_glib_none().0, @@ -345,7 +345,7 @@ impl> AppInfoExt for O { } } - fn get_display_name(&self) -> glib::GString { + fn display_name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_app_info_get_display_name( self.as_ref().to_glib_none().0, @@ -353,7 +353,7 @@ impl> AppInfoExt for O { } } - fn get_executable(&self) -> std::path::PathBuf { + fn executable(&self) -> std::path::PathBuf { unsafe { from_glib_none(ffi::g_app_info_get_executable( self.as_ref().to_glib_none().0, @@ -361,19 +361,19 @@ impl> AppInfoExt for O { } } - fn get_icon(&self) -> Option { + fn icon(&self) -> Option { unsafe { from_glib_none(ffi::g_app_info_get_icon(self.as_ref().to_glib_none().0)) } } - fn get_id(&self) -> Option { + fn id(&self) -> Option { unsafe { from_glib_none(ffi::g_app_info_get_id(self.as_ref().to_glib_none().0)) } } - fn get_name(&self) -> glib::GString { + fn name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_app_info_get_name(self.as_ref().to_glib_none().0)) } } - fn get_supported_types(&self) -> Vec { + fn supported_types(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_app_info_get_supported_types( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/app_launch_context.rs b/gio/src/auto/app_launch_context.rs index 5327fe3ecdb6..def2e038cade 100644 --- a/gio/src/auto/app_launch_context.rs +++ b/gio/src/auto/app_launch_context.rs @@ -41,7 +41,7 @@ pub trait AppLaunchContextExt: 'static { fn get_display>(&self, info: &P, files: &[File]) -> Option; #[doc(alias = "g_app_launch_context_get_environment")] - fn get_environment(&self) -> Vec; + fn environment(&self) -> Vec; #[doc(alias = "g_app_launch_context_get_startup_notify_id")] fn get_startup_notify_id>( @@ -78,7 +78,7 @@ impl> AppLaunchContextExt for O { } } - fn get_environment(&self) -> Vec { + fn environment(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_app_launch_context_get_environment( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/application.rs b/gio/src/auto/application.rs index 15ef36576b94..426e4c00d427 100644 --- a/gio/src/auto/application.rs +++ b/gio/src/auto/application.rs @@ -146,33 +146,33 @@ pub trait ApplicationExt: 'static { fn bind_busy_property>(&self, object: &P, property: &str); #[doc(alias = "g_application_get_application_id")] - fn get_application_id(&self) -> Option; + fn application_id(&self) -> Option; #[doc(alias = "g_application_get_dbus_connection")] - fn get_dbus_connection(&self) -> Option; + fn dbus_connection(&self) -> Option; #[doc(alias = "g_application_get_dbus_object_path")] - fn get_dbus_object_path(&self) -> Option; + fn dbus_object_path(&self) -> Option; #[doc(alias = "g_application_get_flags")] - fn get_flags(&self) -> ApplicationFlags; + fn flags(&self) -> ApplicationFlags; #[doc(alias = "g_application_get_inactivity_timeout")] - fn get_inactivity_timeout(&self) -> u32; + fn inactivity_timeout(&self) -> u32; #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] #[doc(alias = "g_application_get_is_busy")] - fn get_is_busy(&self) -> bool; + fn is_busy(&self) -> bool; #[doc(alias = "g_application_get_is_registered")] - fn get_is_registered(&self) -> bool; + fn is_registered(&self) -> bool; #[doc(alias = "g_application_get_is_remote")] - fn get_is_remote(&self) -> bool; + fn is_remote(&self) -> bool; #[doc(alias = "g_application_get_resource_base_path")] - fn get_resource_base_path(&self) -> Option; + fn resource_base_path(&self) -> Option; #[doc(alias = "g_application_hold")] fn hold(&self); @@ -236,7 +236,8 @@ pub trait ApplicationExt: 'static { #[doc(alias = "g_application_withdraw_notification")] fn withdraw_notification(&self, id: &str); - fn set_property_action_group>(&self, action_group: Option<&P>); + #[doc(alias = "set_property_action_group")] + fn set_action_group>(&self, action_group: Option<&P>); fn connect_activate(&self, f: F) -> SignalHandlerId; @@ -339,7 +340,7 @@ impl> ApplicationExt for O { } } - fn get_application_id(&self) -> Option { + fn application_id(&self) -> Option { unsafe { from_glib_none(ffi::g_application_get_application_id( self.as_ref().to_glib_none().0, @@ -347,7 +348,7 @@ impl> ApplicationExt for O { } } - fn get_dbus_connection(&self) -> Option { + fn dbus_connection(&self) -> Option { unsafe { from_glib_none(ffi::g_application_get_dbus_connection( self.as_ref().to_glib_none().0, @@ -355,7 +356,7 @@ impl> ApplicationExt for O { } } - fn get_dbus_object_path(&self) -> Option { + fn dbus_object_path(&self) -> Option { unsafe { from_glib_none(ffi::g_application_get_dbus_object_path( self.as_ref().to_glib_none().0, @@ -363,17 +364,17 @@ impl> ApplicationExt for O { } } - fn get_flags(&self) -> ApplicationFlags { + fn flags(&self) -> ApplicationFlags { unsafe { from_glib(ffi::g_application_get_flags(self.as_ref().to_glib_none().0)) } } - fn get_inactivity_timeout(&self) -> u32 { + fn inactivity_timeout(&self) -> u32 { unsafe { ffi::g_application_get_inactivity_timeout(self.as_ref().to_glib_none().0) } } #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - fn get_is_busy(&self) -> bool { + fn is_busy(&self) -> bool { unsafe { from_glib(ffi::g_application_get_is_busy( self.as_ref().to_glib_none().0, @@ -381,7 +382,7 @@ impl> ApplicationExt for O { } } - fn get_is_registered(&self) -> bool { + fn is_registered(&self) -> bool { unsafe { from_glib(ffi::g_application_get_is_registered( self.as_ref().to_glib_none().0, @@ -389,7 +390,7 @@ impl> ApplicationExt for O { } } - fn get_is_remote(&self) -> bool { + fn is_remote(&self) -> bool { unsafe { from_glib(ffi::g_application_get_is_remote( self.as_ref().to_glib_none().0, @@ -397,7 +398,7 @@ impl> ApplicationExt for O { } } - fn get_resource_base_path(&self) -> Option { + fn resource_base_path(&self) -> Option { unsafe { from_glib_none(ffi::g_application_get_resource_base_path( self.as_ref().to_glib_none().0, @@ -566,7 +567,7 @@ impl> ApplicationExt for O { } } - fn set_property_action_group>(&self, action_group: Option<&P>) { + fn set_action_group>(&self, action_group: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gio/src/auto/application_command_line.rs b/gio/src/auto/application_command_line.rs index 029f7fadcb9e..d8ae26fc14e9 100644 --- a/gio/src/auto/application_command_line.rs +++ b/gio/src/auto/application_command_line.rs @@ -29,28 +29,28 @@ pub trait ApplicationCommandLineExt: 'static { fn create_file_for_arg>(&self, arg: P) -> File; #[doc(alias = "g_application_command_line_get_arguments")] - fn get_arguments(&self) -> Vec; + fn arguments(&self) -> Vec; #[doc(alias = "g_application_command_line_get_cwd")] - fn get_cwd(&self) -> Option; + fn cwd(&self) -> Option; #[doc(alias = "g_application_command_line_get_environ")] - fn get_environ(&self) -> Vec; + fn environ(&self) -> Vec; #[doc(alias = "g_application_command_line_get_exit_status")] - fn get_exit_status(&self) -> i32; + fn exit_status(&self) -> i32; #[doc(alias = "g_application_command_line_get_is_remote")] - fn get_is_remote(&self) -> bool; + fn is_remote(&self) -> bool; #[doc(alias = "g_application_command_line_get_options_dict")] - fn get_options_dict(&self) -> glib::VariantDict; + fn options_dict(&self) -> glib::VariantDict; #[doc(alias = "g_application_command_line_get_platform_data")] - fn get_platform_data(&self) -> Option; + fn platform_data(&self) -> Option; #[doc(alias = "g_application_command_line_get_stdin")] - fn get_stdin(&self) -> Option; + fn stdin(&self) -> Option; #[doc(alias = "g_application_command_line_getenv")] fn getenv>(&self, name: P) -> Option; @@ -77,7 +77,7 @@ impl> ApplicationCommandLineExt for O { } } - fn get_arguments(&self) -> Vec { + fn arguments(&self) -> Vec { unsafe { let mut argc = mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_full_num( @@ -91,7 +91,7 @@ impl> ApplicationCommandLineExt for O { } } - fn get_cwd(&self) -> Option { + fn cwd(&self) -> Option { unsafe { from_glib_none(ffi::g_application_command_line_get_cwd( self.as_ref().to_glib_none().0, @@ -99,7 +99,7 @@ impl> ApplicationCommandLineExt for O { } } - fn get_environ(&self) -> Vec { + fn environ(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_application_command_line_get_environ( self.as_ref().to_glib_none().0, @@ -107,11 +107,11 @@ impl> ApplicationCommandLineExt for O { } } - fn get_exit_status(&self) -> i32 { + fn exit_status(&self) -> i32 { unsafe { ffi::g_application_command_line_get_exit_status(self.as_ref().to_glib_none().0) } } - fn get_is_remote(&self) -> bool { + fn is_remote(&self) -> bool { unsafe { from_glib(ffi::g_application_command_line_get_is_remote( self.as_ref().to_glib_none().0, @@ -119,7 +119,7 @@ impl> ApplicationCommandLineExt for O { } } - fn get_options_dict(&self) -> glib::VariantDict { + fn options_dict(&self) -> glib::VariantDict { unsafe { from_glib_none(ffi::g_application_command_line_get_options_dict( self.as_ref().to_glib_none().0, @@ -127,7 +127,7 @@ impl> ApplicationCommandLineExt for O { } } - fn get_platform_data(&self) -> Option { + fn platform_data(&self) -> Option { unsafe { from_glib_full(ffi::g_application_command_line_get_platform_data( self.as_ref().to_glib_none().0, @@ -135,7 +135,7 @@ impl> ApplicationCommandLineExt for O { } } - fn get_stdin(&self) -> Option { + fn stdin(&self) -> Option { unsafe { from_glib_full(ffi::g_application_command_line_get_stdin( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/async_result.rs b/gio/src/auto/async_result.rs index 44e6e6eb4257..92a8f6a1b7f8 100644 --- a/gio/src/auto/async_result.rs +++ b/gio/src/auto/async_result.rs @@ -19,10 +19,10 @@ pub const NONE_ASYNC_RESULT: Option<&AsyncResult> = None; pub trait AsyncResultExt: 'static { #[doc(alias = "g_async_result_get_source_object")] - fn get_source_object(&self) -> Option; + fn source_object(&self) -> Option; //#[doc(alias = "g_async_result_get_user_data")] - //fn get_user_data(&self) -> /*Unimplemented*/Option; + //fn user_data(&self) -> /*Unimplemented*/Option; //#[doc(alias = "g_async_result_is_tagged")] //fn is_tagged(&self, source_tag: /*Unimplemented*/Option) -> bool; @@ -32,7 +32,7 @@ pub trait AsyncResultExt: 'static { } impl> AsyncResultExt for O { - fn get_source_object(&self) -> Option { + fn source_object(&self) -> Option { unsafe { from_glib_full(ffi::g_async_result_get_source_object( self.as_ref().to_glib_none().0, @@ -40,7 +40,7 @@ impl> AsyncResultExt for O { } } - //fn get_user_data(&self) -> /*Unimplemented*/Option { + //fn user_data(&self) -> /*Unimplemented*/Option { // unsafe { TODO: call ffi:g_async_result_get_user_data() } //} diff --git a/gio/src/auto/buffered_input_stream.rs b/gio/src/auto/buffered_input_stream.rs index ff5c3b46c798..c80c1758c1ed 100644 --- a/gio/src/auto/buffered_input_stream.rs +++ b/gio/src/auto/buffered_input_stream.rs @@ -121,10 +121,10 @@ pub trait BufferedInputStreamExt: 'static { ) -> Pin> + 'static>>; #[doc(alias = "g_buffered_input_stream_get_available")] - fn get_available(&self) -> usize; + fn available(&self) -> usize; #[doc(alias = "g_buffered_input_stream_get_buffer_size")] - fn get_buffer_size(&self) -> usize; + fn buffer_size(&self) -> usize; #[doc(alias = "g_buffered_input_stream_peek_buffer")] fn peek_buffer(&self) -> Vec; @@ -214,11 +214,11 @@ impl> BufferedInputStreamExt for O { })) } - fn get_available(&self) -> usize { + fn available(&self) -> usize { unsafe { ffi::g_buffered_input_stream_get_available(self.as_ref().to_glib_none().0) } } - fn get_buffer_size(&self) -> usize { + fn buffer_size(&self) -> usize { unsafe { ffi::g_buffered_input_stream_get_buffer_size(self.as_ref().to_glib_none().0) } } diff --git a/gio/src/auto/buffered_output_stream.rs b/gio/src/auto/buffered_output_stream.rs index e22fd0b5b136..ab20318f3d75 100644 --- a/gio/src/auto/buffered_output_stream.rs +++ b/gio/src/auto/buffered_output_stream.rs @@ -103,10 +103,10 @@ pub const NONE_BUFFERED_OUTPUT_STREAM: Option<&BufferedOutputStream> = None; pub trait BufferedOutputStreamExt: 'static { #[doc(alias = "g_buffered_output_stream_get_auto_grow")] - fn get_auto_grow(&self) -> bool; + fn auto_grows(&self) -> bool; #[doc(alias = "g_buffered_output_stream_get_buffer_size")] - fn get_buffer_size(&self) -> usize; + fn buffer_size(&self) -> usize; #[doc(alias = "g_buffered_output_stream_set_auto_grow")] fn set_auto_grow(&self, auto_grow: bool); @@ -120,7 +120,7 @@ pub trait BufferedOutputStreamExt: 'static { } impl> BufferedOutputStreamExt for O { - fn get_auto_grow(&self) -> bool { + fn auto_grows(&self) -> bool { unsafe { from_glib(ffi::g_buffered_output_stream_get_auto_grow( self.as_ref().to_glib_none().0, @@ -128,7 +128,7 @@ impl> BufferedOutputStreamExt for O { } } - fn get_buffer_size(&self) -> usize { + fn buffer_size(&self) -> usize { unsafe { ffi::g_buffered_output_stream_get_buffer_size(self.as_ref().to_glib_none().0) } } diff --git a/gio/src/auto/bytes_icon.rs b/gio/src/auto/bytes_icon.rs index 75f0853e0c0f..ad3cb690e5fe 100644 --- a/gio/src/auto/bytes_icon.rs +++ b/gio/src/auto/bytes_icon.rs @@ -22,7 +22,7 @@ impl BytesIcon { } #[doc(alias = "g_bytes_icon_get_bytes")] - pub fn get_bytes(&self) -> glib::Bytes { + pub fn bytes(&self) -> glib::Bytes { unsafe { from_glib_none(ffi::g_bytes_icon_get_bytes(self.to_glib_none().0)) } } } diff --git a/gio/src/auto/cancellable.rs b/gio/src/auto/cancellable.rs index 5dc93d04aa92..6b11edf4800a 100644 --- a/gio/src/auto/cancellable.rs +++ b/gio/src/auto/cancellable.rs @@ -54,7 +54,7 @@ pub trait CancellableExt: 'static { fn disconnect(&self, handler_id: libc::c_ulong); #[doc(alias = "g_cancellable_get_fd")] - fn get_fd(&self) -> i32; + fn fd(&self) -> i32; #[doc(alias = "g_cancellable_is_cancelled")] fn is_cancelled(&self) -> bool; @@ -94,7 +94,7 @@ impl> CancellableExt for O { } } - fn get_fd(&self) -> i32 { + fn fd(&self) -> i32 { unsafe { ffi::g_cancellable_get_fd(self.as_ref().to_glib_none().0) } } diff --git a/gio/src/auto/charset_converter.rs b/gio/src/auto/charset_converter.rs index d516e24918ce..c04f7e8d7877 100644 --- a/gio/src/auto/charset_converter.rs +++ b/gio/src/auto/charset_converter.rs @@ -42,12 +42,12 @@ impl CharsetConverter { } #[doc(alias = "g_charset_converter_get_num_fallbacks")] - pub fn get_num_fallbacks(&self) -> u32 { + pub fn num_fallbacks(&self) -> u32 { unsafe { ffi::g_charset_converter_get_num_fallbacks(self.to_glib_none().0) } } #[doc(alias = "g_charset_converter_get_use_fallback")] - pub fn get_use_fallback(&self) -> bool { + pub fn uses_fallback(&self) -> bool { unsafe { from_glib(ffi::g_charset_converter_get_use_fallback( self.to_glib_none().0, @@ -65,7 +65,8 @@ impl CharsetConverter { } } - pub fn get_property_from_charset(&self) -> Option { + #[doc(alias = "get_property_from_charset")] + pub fn from_charset(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -79,7 +80,8 @@ impl CharsetConverter { } } - pub fn get_property_to_charset(&self) -> Option { + #[doc(alias = "get_property_to_charset")] + pub fn to_charset(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/converter_input_stream.rs b/gio/src/auto/converter_input_stream.rs index 12452fb37a7a..ca9e663f3572 100644 --- a/gio/src/auto/converter_input_stream.rs +++ b/gio/src/auto/converter_input_stream.rs @@ -84,11 +84,11 @@ pub const NONE_CONVERTER_INPUT_STREAM: Option<&ConverterInputStream> = None; pub trait ConverterInputStreamExt: 'static { #[doc(alias = "g_converter_input_stream_get_converter")] - fn get_converter(&self) -> Converter; + fn converter(&self) -> Converter; } impl> ConverterInputStreamExt for O { - fn get_converter(&self) -> Converter { + fn converter(&self) -> Converter { unsafe { from_glib_none(ffi::g_converter_input_stream_get_converter( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/converter_output_stream.rs b/gio/src/auto/converter_output_stream.rs index ff9529b8dd2f..5b2bd60a80fa 100644 --- a/gio/src/auto/converter_output_stream.rs +++ b/gio/src/auto/converter_output_stream.rs @@ -84,11 +84,11 @@ pub const NONE_CONVERTER_OUTPUT_STREAM: Option<&ConverterOutputStream> = None; pub trait ConverterOutputStreamExt: 'static { #[doc(alias = "g_converter_output_stream_get_converter")] - fn get_converter(&self) -> Converter; + fn converter(&self) -> Converter; } impl> ConverterOutputStreamExt for O { - fn get_converter(&self) -> Converter { + fn converter(&self) -> Converter { unsafe { from_glib_none(ffi::g_converter_output_stream_get_converter( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/credentials.rs b/gio/src/auto/credentials.rs index eef044bc4a42..a70a7a7e26ea 100644 --- a/gio/src/auto/credentials.rs +++ b/gio/src/auto/credentials.rs @@ -28,7 +28,7 @@ impl Credentials { #[cfg(any(unix, feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(unix)))] #[doc(alias = "g_credentials_get_unix_pid")] - pub fn get_unix_pid(&self) -> Result { + pub fn unix_pid(&self) -> Result { unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_credentials_get_unix_pid(self.to_glib_none().0, &mut error); @@ -43,7 +43,7 @@ impl Credentials { #[cfg(any(unix, feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(unix)))] #[doc(alias = "g_credentials_get_unix_user")] - pub fn get_unix_user(&self) -> Result { + pub fn unix_user(&self) -> Result { unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_credentials_get_unix_user(self.to_glib_none().0, &mut error); diff --git a/gio/src/auto/data_input_stream.rs b/gio/src/auto/data_input_stream.rs index 07492f021197..f4d65cae7c59 100644 --- a/gio/src/auto/data_input_stream.rs +++ b/gio/src/auto/data_input_stream.rs @@ -107,10 +107,10 @@ pub const NONE_DATA_INPUT_STREAM: Option<&DataInputStream> = None; pub trait DataInputStreamExt: 'static { #[doc(alias = "g_data_input_stream_get_byte_order")] - fn get_byte_order(&self) -> DataStreamByteOrder; + fn byte_order(&self) -> DataStreamByteOrder; #[doc(alias = "g_data_input_stream_get_newline_type")] - fn get_newline_type(&self) -> DataStreamNewlineType; + fn newline_type(&self) -> DataStreamNewlineType; #[doc(alias = "g_data_input_stream_read_byte")] fn read_byte>(&self, cancellable: Option<&P>) -> Result; @@ -149,7 +149,7 @@ pub trait DataInputStreamExt: 'static { } impl> DataInputStreamExt for O { - fn get_byte_order(&self) -> DataStreamByteOrder { + fn byte_order(&self) -> DataStreamByteOrder { unsafe { from_glib(ffi::g_data_input_stream_get_byte_order( self.as_ref().to_glib_none().0, @@ -157,7 +157,7 @@ impl> DataInputStreamExt for O { } } - fn get_newline_type(&self) -> DataStreamNewlineType { + fn newline_type(&self) -> DataStreamNewlineType { unsafe { from_glib(ffi::g_data_input_stream_get_newline_type( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/data_output_stream.rs b/gio/src/auto/data_output_stream.rs index 124dcf123e7f..90592563e56b 100644 --- a/gio/src/auto/data_output_stream.rs +++ b/gio/src/auto/data_output_stream.rs @@ -85,7 +85,7 @@ pub const NONE_DATA_OUTPUT_STREAM: Option<&DataOutputStream> = None; pub trait DataOutputStreamExt: 'static { #[doc(alias = "g_data_output_stream_get_byte_order")] - fn get_byte_order(&self) -> DataStreamByteOrder; + fn byte_order(&self) -> DataStreamByteOrder; #[doc(alias = "g_data_output_stream_put_byte")] fn put_byte>( @@ -150,7 +150,7 @@ pub trait DataOutputStreamExt: 'static { } impl> DataOutputStreamExt for O { - fn get_byte_order(&self) -> DataStreamByteOrder { + fn byte_order(&self) -> DataStreamByteOrder { unsafe { from_glib(ffi::g_data_output_stream_get_byte_order( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/dbus_connection.rs b/gio/src/auto/dbus_connection.rs index ea978ea5e7b9..82bcdb9d27f5 100644 --- a/gio/src/auto/dbus_connection.rs +++ b/gio/src/auto/dbus_connection.rs @@ -38,7 +38,7 @@ glib::wrapper! { impl DBusConnection { #[doc(alias = "g_dbus_connection_new_for_address_sync")] - pub fn new_for_address_sync>( + pub fn for_address_sync>( address: &str, flags: DBusConnectionFlags, observer: Option<&DBusAuthObserver>, @@ -536,7 +536,7 @@ impl DBusConnection { } #[doc(alias = "g_dbus_connection_get_capabilities")] - pub fn get_capabilities(&self) -> DBusCapabilityFlags { + pub fn capabilities(&self) -> DBusCapabilityFlags { unsafe { from_glib(ffi::g_dbus_connection_get_capabilities( self.to_glib_none().0, @@ -545,7 +545,7 @@ impl DBusConnection { } #[doc(alias = "g_dbus_connection_get_exit_on_close")] - pub fn get_exit_on_close(&self) -> bool { + pub fn exits_on_close(&self) -> bool { unsafe { from_glib(ffi::g_dbus_connection_get_exit_on_close( self.to_glib_none().0, @@ -556,22 +556,22 @@ impl DBusConnection { #[cfg(any(feature = "v2_60", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] #[doc(alias = "g_dbus_connection_get_flags")] - pub fn get_flags(&self) -> DBusConnectionFlags { + pub fn flags(&self) -> DBusConnectionFlags { unsafe { from_glib(ffi::g_dbus_connection_get_flags(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_connection_get_guid")] - pub fn get_guid(&self) -> glib::GString { + pub fn guid(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_connection_get_guid(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_connection_get_last_serial")] - pub fn get_last_serial(&self) -> u32 { + pub fn last_serial(&self) -> u32 { unsafe { ffi::g_dbus_connection_get_last_serial(self.to_glib_none().0) } } #[doc(alias = "g_dbus_connection_get_peer_credentials")] - pub fn get_peer_credentials(&self) -> Option { + pub fn peer_credentials(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_connection_get_peer_credentials( self.to_glib_none().0, @@ -580,12 +580,12 @@ impl DBusConnection { } #[doc(alias = "g_dbus_connection_get_stream")] - pub fn get_stream(&self) -> IOStream { + pub fn stream(&self) -> IOStream { unsafe { from_glib_none(ffi::g_dbus_connection_get_stream(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_connection_get_unique_name")] - pub fn get_unique_name(&self) -> Option { + pub fn unique_name(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_connection_get_unique_name( self.to_glib_none().0, @@ -750,21 +750,6 @@ impl DBusConnection { } } - pub fn get_property_closed(&self) -> bool { - unsafe { - let mut value = glib::Value::from_type(::static_type()); - glib::gobject_ffi::g_object_get_property( - self.as_ptr() as *mut glib::gobject_ffi::GObject, - b"closed\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `closed` getter") - .unwrap() - } - } - pub fn get_property_flags(&self) -> DBusConnectionFlags { unsafe { let mut value = diff --git a/gio/src/auto/dbus_interface.rs b/gio/src/auto/dbus_interface.rs index 5fa7059f85b7..06e85bac4881 100644 --- a/gio/src/auto/dbus_interface.rs +++ b/gio/src/auto/dbus_interface.rs @@ -23,7 +23,7 @@ pub trait DBusInterfaceExt: 'static { fn get(&self) -> Option; #[doc(alias = "g_dbus_interface_get_info")] - fn get_info(&self) -> DBusInterfaceInfo; + fn info(&self) -> DBusInterfaceInfo; #[doc(alias = "g_dbus_interface_set_object")] fn set_object>(&self, object: Option<&P>); @@ -38,7 +38,7 @@ impl> DBusInterfaceExt for O { } } - fn get_info(&self) -> DBusInterfaceInfo { + fn info(&self) -> DBusInterfaceInfo { unsafe { from_glib_none(ffi::g_dbus_interface_get_info( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/dbus_interface_skeleton.rs b/gio/src/auto/dbus_interface_skeleton.rs index 6151725b9ae6..99e7704c5337 100644 --- a/gio/src/auto/dbus_interface_skeleton.rs +++ b/gio/src/auto/dbus_interface_skeleton.rs @@ -35,22 +35,22 @@ pub trait DBusInterfaceSkeletonExt: 'static { fn flush(&self); #[doc(alias = "g_dbus_interface_skeleton_get_connection")] - fn get_connection(&self) -> Option; + fn connection(&self) -> Option; #[doc(alias = "g_dbus_interface_skeleton_get_connections")] - fn get_connections(&self) -> Vec; + fn connections(&self) -> Vec; #[doc(alias = "g_dbus_interface_skeleton_get_flags")] - fn get_flags(&self) -> DBusInterfaceSkeletonFlags; + fn flags(&self) -> DBusInterfaceSkeletonFlags; #[doc(alias = "g_dbus_interface_skeleton_get_object_path")] - fn get_object_path(&self) -> Option; + fn object_path(&self) -> Option; #[doc(alias = "g_dbus_interface_skeleton_get_properties")] - fn get_properties(&self) -> glib::Variant; + fn properties(&self) -> glib::Variant; //#[doc(alias = "g_dbus_interface_skeleton_get_vtable")] - //fn get_vtable(&self) -> /*Ignored*/DBusInterfaceVTable; + //fn vtable(&self) -> /*Ignored*/DBusInterfaceVTable; #[doc(alias = "g_dbus_interface_skeleton_has_connection")] fn has_connection(&self, connection: &DBusConnection) -> bool; @@ -64,9 +64,11 @@ pub trait DBusInterfaceSkeletonExt: 'static { #[doc(alias = "g_dbus_interface_skeleton_unexport_from_connection")] fn unexport_from_connection(&self, connection: &DBusConnection); - fn get_property_g_flags(&self) -> DBusInterfaceSkeletonFlags; + #[doc(alias = "get_property_g_flags")] + fn g_flags(&self) -> DBusInterfaceSkeletonFlags; - fn set_property_g_flags(&self, g_flags: DBusInterfaceSkeletonFlags); + #[doc(alias = "set_property_g_flags")] + fn set_g_flags(&self, g_flags: DBusInterfaceSkeletonFlags); fn connect_g_authorize_method bool + 'static>( &self, @@ -100,7 +102,7 @@ impl> DBusInterfaceSkeletonExt for O { } } - fn get_connection(&self) -> Option { + fn connection(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_interface_skeleton_get_connection( self.as_ref().to_glib_none().0, @@ -108,7 +110,7 @@ impl> DBusInterfaceSkeletonExt for O { } } - fn get_connections(&self) -> Vec { + fn connections(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_dbus_interface_skeleton_get_connections( self.as_ref().to_glib_none().0, @@ -116,7 +118,7 @@ impl> DBusInterfaceSkeletonExt for O { } } - fn get_flags(&self) -> DBusInterfaceSkeletonFlags { + fn flags(&self) -> DBusInterfaceSkeletonFlags { unsafe { from_glib(ffi::g_dbus_interface_skeleton_get_flags( self.as_ref().to_glib_none().0, @@ -124,7 +126,7 @@ impl> DBusInterfaceSkeletonExt for O { } } - fn get_object_path(&self) -> Option { + fn object_path(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_interface_skeleton_get_object_path( self.as_ref().to_glib_none().0, @@ -132,7 +134,7 @@ impl> DBusInterfaceSkeletonExt for O { } } - fn get_properties(&self) -> glib::Variant { + fn properties(&self) -> glib::Variant { unsafe { from_glib_full(ffi::g_dbus_interface_skeleton_get_properties( self.as_ref().to_glib_none().0, @@ -140,7 +142,7 @@ impl> DBusInterfaceSkeletonExt for O { } } - //fn get_vtable(&self) -> /*Ignored*/DBusInterfaceVTable { + //fn vtable(&self) -> /*Ignored*/DBusInterfaceVTable { // unsafe { TODO: call ffi:g_dbus_interface_skeleton_get_vtable() } //} @@ -177,7 +179,7 @@ impl> DBusInterfaceSkeletonExt for O { } } - fn get_property_g_flags(&self) -> DBusInterfaceSkeletonFlags { + fn g_flags(&self) -> DBusInterfaceSkeletonFlags { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -193,7 +195,7 @@ impl> DBusInterfaceSkeletonExt for O { } } - fn set_property_g_flags(&self, g_flags: DBusInterfaceSkeletonFlags) { + fn set_g_flags(&self, g_flags: DBusInterfaceSkeletonFlags) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gio/src/auto/dbus_message.rs b/gio/src/auto/dbus_message.rs index cb3ab778454b..a302e6b0cee7 100644 --- a/gio/src/auto/dbus_message.rs +++ b/gio/src/auto/dbus_message.rs @@ -100,32 +100,32 @@ impl DBusMessage { } #[doc(alias = "g_dbus_message_get_arg0")] - pub fn get_arg0(&self) -> Option { + pub fn arg0(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_message_get_arg0(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_message_get_body")] - pub fn get_body(&self) -> Option { + pub fn body(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_message_get_body(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_message_get_byte_order")] - pub fn get_byte_order(&self) -> DBusMessageByteOrder { + pub fn byte_order(&self) -> DBusMessageByteOrder { unsafe { from_glib(ffi::g_dbus_message_get_byte_order(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_message_get_destination")] - pub fn get_destination(&self) -> Option { + pub fn destination(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_message_get_destination(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_message_get_error_name")] - pub fn get_error_name(&self) -> Option { + pub fn error_name(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_message_get_error_name(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_message_get_flags")] - pub fn get_flags(&self) -> DBusMessageFlags { + pub fn flags(&self) -> DBusMessageFlags { unsafe { from_glib(ffi::g_dbus_message_get_flags(self.to_glib_none().0)) } } @@ -140,61 +140,61 @@ impl DBusMessage { } #[doc(alias = "g_dbus_message_get_interface")] - pub fn get_interface(&self) -> Option { + pub fn interface(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_message_get_interface(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_message_get_locked")] - pub fn get_locked(&self) -> bool { + pub fn is_locked(&self) -> bool { unsafe { from_glib(ffi::g_dbus_message_get_locked(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_message_get_member")] - pub fn get_member(&self) -> Option { + pub fn member(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_message_get_member(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_message_get_message_type")] - pub fn get_message_type(&self) -> DBusMessageType { + pub fn message_type(&self) -> DBusMessageType { unsafe { from_glib(ffi::g_dbus_message_get_message_type(self.to_glib_none().0)) } } #[cfg(any(unix, feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(unix)))] #[doc(alias = "g_dbus_message_get_num_unix_fds")] - pub fn get_num_unix_fds(&self) -> u32 { + pub fn num_unix_fds(&self) -> u32 { unsafe { ffi::g_dbus_message_get_num_unix_fds(self.to_glib_none().0) } } #[doc(alias = "g_dbus_message_get_path")] - pub fn get_path(&self) -> Option { + pub fn path(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_message_get_path(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_message_get_reply_serial")] - pub fn get_reply_serial(&self) -> u32 { + pub fn reply_serial(&self) -> u32 { unsafe { ffi::g_dbus_message_get_reply_serial(self.to_glib_none().0) } } #[doc(alias = "g_dbus_message_get_sender")] - pub fn get_sender(&self) -> Option { + pub fn sender(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_message_get_sender(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_message_get_serial")] - pub fn get_serial(&self) -> u32 { + pub fn serial(&self) -> u32 { unsafe { ffi::g_dbus_message_get_serial(self.to_glib_none().0) } } #[doc(alias = "g_dbus_message_get_signature")] - pub fn get_signature(&self) -> glib::GString { + pub fn signature(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_message_get_signature(self.to_glib_none().0)) } } #[cfg(any(unix, feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(unix)))] #[doc(alias = "g_dbus_message_get_unix_fd_list")] - pub fn get_unix_fd_list(&self) -> Option { + pub fn unix_fd_list(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_message_get_unix_fd_list(self.to_glib_none().0)) } } diff --git a/gio/src/auto/dbus_method_invocation.rs b/gio/src/auto/dbus_method_invocation.rs index 8eb76feba511..ef2d6467e408 100644 --- a/gio/src/auto/dbus_method_invocation.rs +++ b/gio/src/auto/dbus_method_invocation.rs @@ -25,7 +25,7 @@ glib::wrapper! { impl DBusMethodInvocation { #[doc(alias = "g_dbus_method_invocation_get_connection")] - pub fn get_connection(&self) -> DBusConnection { + pub fn connection(&self) -> DBusConnection { unsafe { from_glib_none(ffi::g_dbus_method_invocation_get_connection( self.to_glib_none().0, @@ -34,7 +34,7 @@ impl DBusMethodInvocation { } #[doc(alias = "g_dbus_method_invocation_get_interface_name")] - pub fn get_interface_name(&self) -> glib::GString { + pub fn interface_name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_method_invocation_get_interface_name( self.to_glib_none().0, @@ -43,7 +43,7 @@ impl DBusMethodInvocation { } #[doc(alias = "g_dbus_method_invocation_get_message")] - pub fn get_message(&self) -> DBusMessage { + pub fn message(&self) -> DBusMessage { unsafe { from_glib_none(ffi::g_dbus_method_invocation_get_message( self.to_glib_none().0, @@ -52,7 +52,7 @@ impl DBusMethodInvocation { } #[doc(alias = "g_dbus_method_invocation_get_method_info")] - pub fn get_method_info(&self) -> Option { + pub fn method_info(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_method_invocation_get_method_info( self.to_glib_none().0, @@ -61,7 +61,7 @@ impl DBusMethodInvocation { } #[doc(alias = "g_dbus_method_invocation_get_method_name")] - pub fn get_method_name(&self) -> glib::GString { + pub fn method_name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_method_invocation_get_method_name( self.to_glib_none().0, @@ -70,7 +70,7 @@ impl DBusMethodInvocation { } #[doc(alias = "g_dbus_method_invocation_get_object_path")] - pub fn get_object_path(&self) -> glib::GString { + pub fn object_path(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_method_invocation_get_object_path( self.to_glib_none().0, @@ -79,7 +79,7 @@ impl DBusMethodInvocation { } #[doc(alias = "g_dbus_method_invocation_get_parameters")] - pub fn get_parameters(&self) -> glib::Variant { + pub fn parameters(&self) -> glib::Variant { unsafe { from_glib_none(ffi::g_dbus_method_invocation_get_parameters( self.to_glib_none().0, @@ -88,7 +88,7 @@ impl DBusMethodInvocation { } #[doc(alias = "g_dbus_method_invocation_get_property_info")] - pub fn get_property_info(&self) -> Option { + pub fn property_info(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_method_invocation_get_property_info( self.to_glib_none().0, @@ -97,7 +97,7 @@ impl DBusMethodInvocation { } #[doc(alias = "g_dbus_method_invocation_get_sender")] - pub fn get_sender(&self) -> glib::GString { + pub fn sender(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_method_invocation_get_sender( self.to_glib_none().0, @@ -106,7 +106,7 @@ impl DBusMethodInvocation { } //#[doc(alias = "g_dbus_method_invocation_get_user_data")] - //pub fn get_user_data(&self) -> /*Unimplemented*/Option { + //pub fn user_data(&self) -> /*Unimplemented*/Option { // unsafe { TODO: call ffi:g_dbus_method_invocation_get_user_data() } //} diff --git a/gio/src/auto/dbus_node_info.rs b/gio/src/auto/dbus_node_info.rs index b6ebcfc1f3bc..0025e23891d5 100644 --- a/gio/src/auto/dbus_node_info.rs +++ b/gio/src/auto/dbus_node_info.rs @@ -19,7 +19,7 @@ glib::wrapper! { impl DBusNodeInfo { #[doc(alias = "g_dbus_node_info_new_for_xml")] - pub fn new_for_xml(xml_data: &str) -> Result { + pub fn for_xml(xml_data: &str) -> Result { unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_dbus_node_info_new_for_xml(xml_data.to_glib_none().0, &mut error); diff --git a/gio/src/auto/dbus_object.rs b/gio/src/auto/dbus_object.rs index f19d575ad4b1..db0a83f4a6b9 100644 --- a/gio/src/auto/dbus_object.rs +++ b/gio/src/auto/dbus_object.rs @@ -27,10 +27,10 @@ pub trait DBusObjectExt: 'static { fn get_interface(&self, interface_name: &str) -> Option; #[doc(alias = "g_dbus_object_get_interfaces")] - fn get_interfaces(&self) -> Vec; + fn interfaces(&self) -> Vec; #[doc(alias = "g_dbus_object_get_object_path")] - fn get_object_path(&self) -> glib::GString; + fn object_path(&self) -> glib::GString; fn connect_interface_added( &self, @@ -53,7 +53,7 @@ impl> DBusObjectExt for O { } } - fn get_interfaces(&self) -> Vec { + fn interfaces(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_dbus_object_get_interfaces( self.as_ref().to_glib_none().0, @@ -61,7 +61,7 @@ impl> DBusObjectExt for O { } } - fn get_object_path(&self) -> glib::GString { + fn object_path(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_object_get_object_path( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/dbus_proxy.rs b/gio/src/auto/dbus_proxy.rs index ac70a1be4684..d46ffc317975 100644 --- a/gio/src/auto/dbus_proxy.rs +++ b/gio/src/auto/dbus_proxy.rs @@ -35,7 +35,7 @@ glib::wrapper! { impl DBusProxy { #[doc(alias = "g_dbus_proxy_new_for_bus_sync")] - pub fn new_for_bus_sync>( + pub fn for_bus_sync>( bus_type: BusType, flags: DBusProxyFlags, info: Option<&DBusInterfaceInfo>, @@ -254,7 +254,7 @@ impl DBusProxy { impl fmt::Display for DBusProxy { #[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str(&DBusProxyExt::get_name(self)) + f.write_str(&DBusProxyExt::name(self)) } } @@ -344,31 +344,31 @@ pub trait DBusProxyExt: 'static { fn get_cached_property(&self, property_name: &str) -> Option; #[doc(alias = "g_dbus_proxy_get_cached_property_names")] - fn get_cached_property_names(&self) -> Vec; + fn cached_property_names(&self) -> Vec; #[doc(alias = "g_dbus_proxy_get_connection")] - fn get_connection(&self) -> DBusConnection; + fn connection(&self) -> DBusConnection; #[doc(alias = "g_dbus_proxy_get_default_timeout")] - fn get_default_timeout(&self) -> i32; + fn default_timeout(&self) -> i32; #[doc(alias = "g_dbus_proxy_get_flags")] - fn get_flags(&self) -> DBusProxyFlags; + fn flags(&self) -> DBusProxyFlags; #[doc(alias = "g_dbus_proxy_get_interface_info")] - fn get_interface_info(&self) -> Option; + fn interface_info(&self) -> Option; #[doc(alias = "g_dbus_proxy_get_interface_name")] - fn get_interface_name(&self) -> glib::GString; + fn interface_name(&self) -> glib::GString; #[doc(alias = "g_dbus_proxy_get_name")] - fn get_name(&self) -> glib::GString; + fn name(&self) -> glib::GString; #[doc(alias = "g_dbus_proxy_get_name_owner")] - fn get_name_owner(&self) -> Option; + fn name_owner(&self) -> Option; #[doc(alias = "g_dbus_proxy_get_object_path")] - fn get_object_path(&self) -> glib::GString; + fn object_path(&self) -> glib::GString; #[doc(alias = "g_dbus_proxy_set_cached_property")] fn set_cached_property(&self, property_name: &str, value: Option<&glib::Variant>); @@ -379,25 +379,35 @@ pub trait DBusProxyExt: 'static { #[doc(alias = "g_dbus_proxy_set_interface_info")] fn set_interface_info(&self, info: Option<&DBusInterfaceInfo>); - fn get_property_g_connection(&self) -> Option; + #[doc(alias = "get_property_g_connection")] + fn g_connection(&self) -> Option; - fn get_property_g_default_timeout(&self) -> i32; + #[doc(alias = "get_property_g_default_timeout")] + fn g_default_timeout(&self) -> i32; - fn set_property_g_default_timeout(&self, g_default_timeout: i32); + #[doc(alias = "set_property_g_default_timeout")] + fn set_g_default_timeout(&self, g_default_timeout: i32); - fn get_property_g_flags(&self) -> DBusProxyFlags; + #[doc(alias = "get_property_g_flags")] + fn g_flags(&self) -> DBusProxyFlags; - fn get_property_g_interface_info(&self) -> Option; + #[doc(alias = "get_property_g_interface_info")] + fn g_interface_info(&self) -> Option; - fn set_property_g_interface_info(&self, g_interface_info: Option<&DBusInterfaceInfo>); + #[doc(alias = "set_property_g_interface_info")] + fn set_g_interface_info(&self, g_interface_info: Option<&DBusInterfaceInfo>); - fn get_property_g_interface_name(&self) -> Option; + #[doc(alias = "get_property_g_interface_name")] + fn g_interface_name(&self) -> Option; - fn get_property_g_name(&self) -> Option; + #[doc(alias = "get_property_g_name")] + fn g_name(&self) -> Option; - fn get_property_g_name_owner(&self) -> Option; + #[doc(alias = "get_property_g_name_owner")] + fn g_name_owner(&self) -> Option; - fn get_property_g_object_path(&self) -> Option; + #[doc(alias = "get_property_g_object_path")] + fn g_object_path(&self) -> Option; fn connect_property_g_default_timeout_notify( &self, @@ -646,7 +656,7 @@ impl> DBusProxyExt for O { } } - fn get_cached_property_names(&self) -> Vec { + fn cached_property_names(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_dbus_proxy_get_cached_property_names( self.as_ref().to_glib_none().0, @@ -654,7 +664,7 @@ impl> DBusProxyExt for O { } } - fn get_connection(&self) -> DBusConnection { + fn connection(&self) -> DBusConnection { unsafe { from_glib_none(ffi::g_dbus_proxy_get_connection( self.as_ref().to_glib_none().0, @@ -662,15 +672,15 @@ impl> DBusProxyExt for O { } } - fn get_default_timeout(&self) -> i32 { + fn default_timeout(&self) -> i32 { unsafe { ffi::g_dbus_proxy_get_default_timeout(self.as_ref().to_glib_none().0) } } - fn get_flags(&self) -> DBusProxyFlags { + fn flags(&self) -> DBusProxyFlags { unsafe { from_glib(ffi::g_dbus_proxy_get_flags(self.as_ref().to_glib_none().0)) } } - fn get_interface_info(&self) -> Option { + fn interface_info(&self) -> Option { unsafe { from_glib_none(ffi::g_dbus_proxy_get_interface_info( self.as_ref().to_glib_none().0, @@ -678,7 +688,7 @@ impl> DBusProxyExt for O { } } - fn get_interface_name(&self) -> glib::GString { + fn interface_name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_proxy_get_interface_name( self.as_ref().to_glib_none().0, @@ -686,11 +696,11 @@ impl> DBusProxyExt for O { } } - fn get_name(&self) -> glib::GString { + fn name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_proxy_get_name(self.as_ref().to_glib_none().0)) } } - fn get_name_owner(&self) -> Option { + fn name_owner(&self) -> Option { unsafe { from_glib_full(ffi::g_dbus_proxy_get_name_owner( self.as_ref().to_glib_none().0, @@ -698,7 +708,7 @@ impl> DBusProxyExt for O { } } - fn get_object_path(&self) -> glib::GString { + fn object_path(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_proxy_get_object_path( self.as_ref().to_glib_none().0, @@ -731,7 +741,7 @@ impl> DBusProxyExt for O { } } - fn get_property_g_connection(&self) -> Option { + fn g_connection(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -745,7 +755,7 @@ impl> DBusProxyExt for O { } } - fn get_property_g_default_timeout(&self) -> i32 { + fn g_default_timeout(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -760,7 +770,7 @@ impl> DBusProxyExt for O { } } - fn set_property_g_default_timeout(&self, g_default_timeout: i32) { + fn set_g_default_timeout(&self, g_default_timeout: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -770,7 +780,7 @@ impl> DBusProxyExt for O { } } - fn get_property_g_flags(&self) -> DBusProxyFlags { + fn g_flags(&self) -> DBusProxyFlags { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -785,7 +795,7 @@ impl> DBusProxyExt for O { } } - fn get_property_g_interface_info(&self) -> Option { + fn g_interface_info(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -800,7 +810,7 @@ impl> DBusProxyExt for O { } } - fn set_property_g_interface_info(&self, g_interface_info: Option<&DBusInterfaceInfo>) { + fn set_g_interface_info(&self, g_interface_info: Option<&DBusInterfaceInfo>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -810,7 +820,7 @@ impl> DBusProxyExt for O { } } - fn get_property_g_interface_name(&self) -> Option { + fn g_interface_name(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -824,7 +834,7 @@ impl> DBusProxyExt for O { } } - fn get_property_g_name(&self) -> Option { + fn g_name(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -838,7 +848,7 @@ impl> DBusProxyExt for O { } } - fn get_property_g_name_owner(&self) -> Option { + fn g_name_owner(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -852,7 +862,7 @@ impl> DBusProxyExt for O { } } - fn get_property_g_object_path(&self) -> Option { + fn g_object_path(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/dbus_server.rs b/gio/src/auto/dbus_server.rs index 5828fd1c5368..01c345a8cbd5 100644 --- a/gio/src/auto/dbus_server.rs +++ b/gio/src/auto/dbus_server.rs @@ -53,17 +53,17 @@ impl DBusServer { } #[doc(alias = "g_dbus_server_get_client_address")] - pub fn get_client_address(&self) -> glib::GString { + pub fn client_address(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_server_get_client_address(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_server_get_flags")] - pub fn get_flags(&self) -> DBusServerFlags { + pub fn flags(&self) -> DBusServerFlags { unsafe { from_glib(ffi::g_dbus_server_get_flags(self.to_glib_none().0)) } } #[doc(alias = "g_dbus_server_get_guid")] - pub fn get_guid(&self) -> glib::GString { + pub fn guid(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_dbus_server_get_guid(self.to_glib_none().0)) } } @@ -86,22 +86,8 @@ impl DBusServer { } } - pub fn get_property_active(&self) -> bool { - unsafe { - let mut value = glib::Value::from_type(::static_type()); - glib::gobject_ffi::g_object_get_property( - self.as_ptr() as *mut glib::gobject_ffi::GObject, - b"active\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `active` getter") - .unwrap() - } - } - - pub fn get_property_address(&self) -> Option { + #[doc(alias = "get_property_address")] + pub fn address(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -115,7 +101,8 @@ impl DBusServer { } } - pub fn get_property_authentication_observer(&self) -> Option { + #[doc(alias = "get_property_authentication_observer")] + pub fn authentication_observer(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/desktop_app_info.rs b/gio/src/auto/desktop_app_info.rs index 587174eed29f..34d240fce32e 100644 --- a/gio/src/auto/desktop_app_info.rs +++ b/gio/src/auto/desktop_app_info.rs @@ -66,7 +66,7 @@ impl DesktopAppInfo { } #[doc(alias = "g_desktop_app_info_get_categories")] - pub fn get_categories(&self) -> Option { + pub fn categories(&self) -> Option { unsafe { from_glib_none(ffi::g_desktop_app_info_get_categories( self.to_glib_none().0, @@ -75,12 +75,12 @@ impl DesktopAppInfo { } #[doc(alias = "g_desktop_app_info_get_filename")] - pub fn get_filename(&self) -> Option { + pub fn filename(&self) -> Option { unsafe { from_glib_none(ffi::g_desktop_app_info_get_filename(self.to_glib_none().0)) } } #[doc(alias = "g_desktop_app_info_get_generic_name")] - pub fn get_generic_name(&self) -> Option { + pub fn generic_name(&self) -> Option { unsafe { from_glib_none(ffi::g_desktop_app_info_get_generic_name( self.to_glib_none().0, @@ -89,12 +89,12 @@ impl DesktopAppInfo { } #[doc(alias = "g_desktop_app_info_get_is_hidden")] - pub fn get_is_hidden(&self) -> bool { + pub fn is_hidden(&self) -> bool { unsafe { from_glib(ffi::g_desktop_app_info_get_is_hidden(self.to_glib_none().0)) } } #[doc(alias = "g_desktop_app_info_get_keywords")] - pub fn get_keywords(&self) -> Vec { + pub fn keywords(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_desktop_app_info_get_keywords( self.to_glib_none().0, @@ -115,7 +115,7 @@ impl DesktopAppInfo { } #[doc(alias = "g_desktop_app_info_get_nodisplay")] - pub fn get_nodisplay(&self) -> bool { + pub fn is_nodisplay(&self) -> bool { unsafe { from_glib(ffi::g_desktop_app_info_get_nodisplay(self.to_glib_none().0)) } } @@ -130,7 +130,7 @@ impl DesktopAppInfo { } #[doc(alias = "g_desktop_app_info_get_startup_wm_class")] - pub fn get_startup_wm_class(&self) -> Option { + pub fn startup_wm_class(&self) -> Option { unsafe { from_glib_none(ffi::g_desktop_app_info_get_startup_wm_class( self.to_glib_none().0, diff --git a/gio/src/auto/drive.rs b/gio/src/auto/drive.rs index 1f122d9d0177..b5db96458ed0 100644 --- a/gio/src/auto/drive.rs +++ b/gio/src/auto/drive.rs @@ -70,25 +70,25 @@ pub trait DriveExt: 'static { fn enumerate_identifiers(&self) -> Vec; #[doc(alias = "g_drive_get_icon")] - fn get_icon(&self) -> Icon; + fn icon(&self) -> Icon; #[doc(alias = "g_drive_get_identifier")] fn get_identifier(&self, kind: &str) -> Option; #[doc(alias = "g_drive_get_name")] - fn get_name(&self) -> glib::GString; + fn name(&self) -> glib::GString; #[doc(alias = "g_drive_get_sort_key")] - fn get_sort_key(&self) -> Option; + fn sort_key(&self) -> Option; #[doc(alias = "g_drive_get_start_stop_type")] - fn get_start_stop_type(&self) -> DriveStartStopType; + fn start_stop_type(&self) -> DriveStartStopType; #[doc(alias = "g_drive_get_symbolic_icon")] - fn get_symbolic_icon(&self) -> Icon; + fn symbolic_icon(&self) -> Icon; #[doc(alias = "g_drive_get_volumes")] - fn get_volumes(&self) -> Vec; + fn volumes(&self) -> Vec; #[doc(alias = "g_drive_has_media")] fn has_media(&self) -> bool; @@ -266,7 +266,7 @@ impl> DriveExt for O { } } - fn get_icon(&self) -> Icon { + fn icon(&self) -> Icon { unsafe { from_glib_full(ffi::g_drive_get_icon(self.as_ref().to_glib_none().0)) } } @@ -279,15 +279,15 @@ impl> DriveExt for O { } } - fn get_name(&self) -> glib::GString { + fn name(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_drive_get_name(self.as_ref().to_glib_none().0)) } } - fn get_sort_key(&self) -> Option { + fn sort_key(&self) -> Option { unsafe { from_glib_none(ffi::g_drive_get_sort_key(self.as_ref().to_glib_none().0)) } } - fn get_start_stop_type(&self) -> DriveStartStopType { + fn start_stop_type(&self) -> DriveStartStopType { unsafe { from_glib(ffi::g_drive_get_start_stop_type( self.as_ref().to_glib_none().0, @@ -295,7 +295,7 @@ impl> DriveExt for O { } } - fn get_symbolic_icon(&self) -> Icon { + fn symbolic_icon(&self) -> Icon { unsafe { from_glib_full(ffi::g_drive_get_symbolic_icon( self.as_ref().to_glib_none().0, @@ -303,7 +303,7 @@ impl> DriveExt for O { } } - fn get_volumes(&self) -> Vec { + fn volumes(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_drive_get_volumes( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/emblem.rs b/gio/src/auto/emblem.rs index 26b956558cfb..434b356a2f99 100644 --- a/gio/src/auto/emblem.rs +++ b/gio/src/auto/emblem.rs @@ -33,12 +33,12 @@ impl Emblem { } #[doc(alias = "g_emblem_get_icon")] - pub fn get_icon(&self) -> Icon { + pub fn icon(&self) -> Icon { unsafe { from_glib_none(ffi::g_emblem_get_icon(self.to_glib_none().0)) } } #[doc(alias = "g_emblem_get_origin")] - pub fn get_origin(&self) -> EmblemOrigin { + pub fn origin(&self) -> EmblemOrigin { unsafe { from_glib(ffi::g_emblem_get_origin(self.to_glib_none().0)) } } } diff --git a/gio/src/auto/emblemed_icon.rs b/gio/src/auto/emblemed_icon.rs index a81f9c96c4b0..46b084eae01d 100644 --- a/gio/src/auto/emblemed_icon.rs +++ b/gio/src/auto/emblemed_icon.rs @@ -39,12 +39,13 @@ pub trait EmblemedIconExt: 'static { fn clear_emblems(&self); #[doc(alias = "g_emblemed_icon_get_emblems")] - fn get_emblems(&self) -> Vec; + fn emblems(&self) -> Vec; #[doc(alias = "g_emblemed_icon_get_icon")] - fn get_icon(&self) -> Icon; + fn icon(&self) -> Icon; - fn get_property_gicon(&self) -> Option; + #[doc(alias = "get_property_gicon")] + fn gicon(&self) -> Option; } impl> EmblemedIconExt for O { @@ -63,7 +64,7 @@ impl> EmblemedIconExt for O { } } - fn get_emblems(&self) -> Vec { + fn emblems(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_emblemed_icon_get_emblems( self.as_ref().to_glib_none().0, @@ -71,7 +72,7 @@ impl> EmblemedIconExt for O { } } - fn get_icon(&self) -> Icon { + fn icon(&self) -> Icon { unsafe { from_glib_none(ffi::g_emblemed_icon_get_icon( self.as_ref().to_glib_none().0, @@ -79,7 +80,7 @@ impl> EmblemedIconExt for O { } } - fn get_property_gicon(&self) -> Option { + fn gicon(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/file.rs b/gio/src/auto/file.rs index 8718130006c5..aa37e8ffa255 100644 --- a/gio/src/auto/file.rs +++ b/gio/src/auto/file.rs @@ -261,7 +261,7 @@ pub trait FileExt: 'static { ) -> Result; #[doc(alias = "g_file_get_basename")] - fn get_basename(&self) -> Option; + fn basename(&self) -> Option; #[doc(alias = "g_file_get_child")] fn get_child>(&self, name: P) -> File; @@ -270,22 +270,22 @@ pub trait FileExt: 'static { fn get_child_for_display_name(&self, display_name: &str) -> Result; #[doc(alias = "g_file_get_parent")] - fn get_parent(&self) -> Option; + fn parent(&self) -> Option; #[doc(alias = "g_file_get_parse_name")] - fn get_parse_name(&self) -> glib::GString; + fn parse_name(&self) -> glib::GString; #[doc(alias = "g_file_get_path")] - fn get_path(&self) -> Option; + fn path(&self) -> Option; #[doc(alias = "g_file_get_relative_path")] fn get_relative_path>(&self, descendant: &P) -> Option; #[doc(alias = "g_file_get_uri")] - fn get_uri(&self) -> glib::GString; + fn uri(&self) -> glib::GString; #[doc(alias = "g_file_get_uri_scheme")] - fn get_uri_scheme(&self) -> Option; + fn uri_scheme(&self) -> Option; #[doc(alias = "g_file_has_parent")] fn has_parent>(&self, parent: Option<&P>) -> bool; @@ -1418,7 +1418,7 @@ impl> FileExt for O { } } - fn get_basename(&self) -> Option { + fn basename(&self) -> Option { unsafe { from_glib_full(ffi::g_file_get_basename(self.as_ref().to_glib_none().0)) } } @@ -1447,15 +1447,15 @@ impl> FileExt for O { } } - fn get_parent(&self) -> Option { + fn parent(&self) -> Option { unsafe { from_glib_full(ffi::g_file_get_parent(self.as_ref().to_glib_none().0)) } } - fn get_parse_name(&self) -> glib::GString { + fn parse_name(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_file_get_parse_name(self.as_ref().to_glib_none().0)) } } - fn get_path(&self) -> Option { + fn path(&self) -> Option { unsafe { from_glib_full(ffi::g_file_get_path(self.as_ref().to_glib_none().0)) } } @@ -1468,11 +1468,11 @@ impl> FileExt for O { } } - fn get_uri(&self) -> glib::GString { + fn uri(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_file_get_uri(self.as_ref().to_glib_none().0)) } } - fn get_uri_scheme(&self) -> Option { + fn uri_scheme(&self) -> Option { unsafe { from_glib_full(ffi::g_file_get_uri_scheme(self.as_ref().to_glib_none().0)) } } diff --git a/gio/src/auto/file_enumerator.rs b/gio/src/auto/file_enumerator.rs index b082658cd81d..ec89cfb0fd23 100644 --- a/gio/src/auto/file_enumerator.rs +++ b/gio/src/auto/file_enumerator.rs @@ -44,7 +44,7 @@ pub trait FileEnumeratorExt: 'static { fn get_child(&self, info: &FileInfo) -> File; #[doc(alias = "g_file_enumerator_get_container")] - fn get_container(&self) -> File; + fn container(&self) -> File; #[doc(alias = "g_file_enumerator_has_pending")] fn has_pending(&self) -> bool; @@ -156,7 +156,7 @@ impl> FileEnumeratorExt for O { } } - fn get_container(&self) -> File { + fn container(&self) -> File { unsafe { from_glib_none(ffi::g_file_enumerator_get_container( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/file_icon.rs b/gio/src/auto/file_icon.rs index f73f344324c0..ffc2a1e7b84a 100644 --- a/gio/src/auto/file_icon.rs +++ b/gio/src/auto/file_icon.rs @@ -24,7 +24,7 @@ impl FileIcon { } #[doc(alias = "g_file_icon_get_file")] - pub fn get_file(&self) -> File { + pub fn file(&self) -> File { unsafe { from_glib_none(ffi::g_file_icon_get_file(self.to_glib_none().0)) } } } diff --git a/gio/src/auto/file_info.rs b/gio/src/auto/file_info.rs index 04e8fc5c1dd4..5a8923693241 100644 --- a/gio/src/auto/file_info.rs +++ b/gio/src/auto/file_info.rs @@ -158,59 +158,59 @@ impl FileInfo { } #[doc(alias = "g_file_info_get_content_type")] - pub fn get_content_type(&self) -> Option { + pub fn content_type(&self) -> Option { unsafe { from_glib_none(ffi::g_file_info_get_content_type(self.to_glib_none().0)) } } #[doc(alias = "g_file_info_get_deletion_date")] - pub fn get_deletion_date(&self) -> Option { + pub fn deletion_date(&self) -> Option { unsafe { from_glib_full(ffi::g_file_info_get_deletion_date(self.to_glib_none().0)) } } #[doc(alias = "g_file_info_get_display_name")] - pub fn get_display_name(&self) -> glib::GString { + pub fn display_name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_file_info_get_display_name(self.to_glib_none().0)) } } #[doc(alias = "g_file_info_get_edit_name")] - pub fn get_edit_name(&self) -> glib::GString { + pub fn edit_name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_file_info_get_edit_name(self.to_glib_none().0)) } } #[doc(alias = "g_file_info_get_etag")] - pub fn get_etag(&self) -> Option { + pub fn etag(&self) -> Option { unsafe { from_glib_none(ffi::g_file_info_get_etag(self.to_glib_none().0)) } } #[doc(alias = "g_file_info_get_file_type")] - pub fn get_file_type(&self) -> FileType { + pub fn file_type(&self) -> FileType { unsafe { from_glib(ffi::g_file_info_get_file_type(self.to_glib_none().0)) } } #[doc(alias = "g_file_info_get_icon")] - pub fn get_icon(&self) -> Option { + pub fn icon(&self) -> Option { unsafe { from_glib_none(ffi::g_file_info_get_icon(self.to_glib_none().0)) } } #[doc(alias = "g_file_info_get_is_backup")] - pub fn get_is_backup(&self) -> bool { + pub fn is_backup(&self) -> bool { unsafe { from_glib(ffi::g_file_info_get_is_backup(self.to_glib_none().0)) } } #[doc(alias = "g_file_info_get_is_hidden")] - pub fn get_is_hidden(&self) -> bool { + pub fn is_hidden(&self) -> bool { unsafe { from_glib(ffi::g_file_info_get_is_hidden(self.to_glib_none().0)) } } #[doc(alias = "g_file_info_get_is_symlink")] - pub fn get_is_symlink(&self) -> bool { + pub fn is_symlink(&self) -> bool { unsafe { from_glib(ffi::g_file_info_get_is_symlink(self.to_glib_none().0)) } } #[cfg(any(feature = "v2_62", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_62")))] #[doc(alias = "g_file_info_get_modification_date_time")] - pub fn get_modification_date_time(&self) -> Option { + pub fn modification_date_time(&self) -> Option { unsafe { from_glib_full(ffi::g_file_info_get_modification_date_time( self.to_glib_none().0, @@ -219,27 +219,27 @@ impl FileInfo { } #[doc(alias = "g_file_info_get_name")] - pub fn get_name(&self) -> std::path::PathBuf { + pub fn name(&self) -> std::path::PathBuf { unsafe { from_glib_none(ffi::g_file_info_get_name(self.to_glib_none().0)) } } #[doc(alias = "g_file_info_get_size")] - pub fn get_size(&self) -> i64 { + pub fn size(&self) -> i64 { unsafe { ffi::g_file_info_get_size(self.to_glib_none().0) } } #[doc(alias = "g_file_info_get_sort_order")] - pub fn get_sort_order(&self) -> i32 { + pub fn sort_order(&self) -> i32 { unsafe { ffi::g_file_info_get_sort_order(self.to_glib_none().0) } } #[doc(alias = "g_file_info_get_symbolic_icon")] - pub fn get_symbolic_icon(&self) -> Option { + pub fn symbolic_icon(&self) -> Option { unsafe { from_glib_none(ffi::g_file_info_get_symbolic_icon(self.to_glib_none().0)) } } #[doc(alias = "g_file_info_get_symlink_target")] - pub fn get_symlink_target(&self) -> Option { + pub fn symlink_target(&self) -> Option { unsafe { from_glib_none(ffi::g_file_info_get_symlink_target(self.to_glib_none().0)) } } diff --git a/gio/src/auto/file_io_stream.rs b/gio/src/auto/file_io_stream.rs index 4f0983011481..3694962a1094 100644 --- a/gio/src/auto/file_io_stream.rs +++ b/gio/src/auto/file_io_stream.rs @@ -26,7 +26,7 @@ pub const NONE_FILE_IO_STREAM: Option<&FileIOStream> = None; pub trait FileIOStreamExt: 'static { #[doc(alias = "g_file_io_stream_get_etag")] - fn get_etag(&self) -> Option; + fn etag(&self) -> Option; #[doc(alias = "g_file_io_stream_query_info")] fn query_info>( @@ -55,7 +55,7 @@ pub trait FileIOStreamExt: 'static { } impl> FileIOStreamExt for O { - fn get_etag(&self) -> Option { + fn etag(&self) -> Option { unsafe { from_glib_full(ffi::g_file_io_stream_get_etag( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/file_monitor.rs b/gio/src/auto/file_monitor.rs index b0e9e061ba6f..2f8d0a3be951 100644 --- a/gio/src/auto/file_monitor.rs +++ b/gio/src/auto/file_monitor.rs @@ -42,9 +42,8 @@ pub trait FileMonitorExt: 'static { #[doc(alias = "g_file_monitor_set_rate_limit")] fn set_rate_limit(&self, limit_msecs: i32); - fn get_property_cancelled(&self) -> bool; - - fn get_property_rate_limit(&self) -> i32; + #[doc(alias = "get_property_rate_limit")] + fn rate_limit(&self) -> i32; fn connect_changed, FileMonitorEvent) + 'static>( &self, @@ -91,22 +90,7 @@ impl> FileMonitorExt for O { } } - fn get_property_cancelled(&self) -> bool { - unsafe { - let mut value = glib::Value::from_type(::static_type()); - glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, - b"cancelled\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `cancelled` getter") - .unwrap() - } - } - - fn get_property_rate_limit(&self) -> i32 { + fn rate_limit(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/file_output_stream.rs b/gio/src/auto/file_output_stream.rs index a1b748187336..2d68882727ea 100644 --- a/gio/src/auto/file_output_stream.rs +++ b/gio/src/auto/file_output_stream.rs @@ -26,7 +26,7 @@ pub const NONE_FILE_OUTPUT_STREAM: Option<&FileOutputStream> = None; pub trait FileOutputStreamExt: 'static { #[doc(alias = "g_file_output_stream_get_etag")] - fn get_etag(&self) -> Option; + fn etag(&self) -> Option; #[doc(alias = "g_file_output_stream_query_info")] fn query_info>( @@ -55,7 +55,7 @@ pub trait FileOutputStreamExt: 'static { } impl> FileOutputStreamExt for O { - fn get_etag(&self) -> Option { + fn etag(&self) -> Option { unsafe { from_glib_full(ffi::g_file_output_stream_get_etag( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/filter_input_stream.rs b/gio/src/auto/filter_input_stream.rs index b6305fad4cad..204cf7f3d4b0 100644 --- a/gio/src/auto/filter_input_stream.rs +++ b/gio/src/auto/filter_input_stream.rs @@ -24,10 +24,10 @@ pub const NONE_FILTER_INPUT_STREAM: Option<&FilterInputStream> = None; pub trait FilterInputStreamExt: 'static { #[doc(alias = "g_filter_input_stream_get_base_stream")] - fn get_base_stream(&self) -> InputStream; + fn base_stream(&self) -> InputStream; #[doc(alias = "g_filter_input_stream_get_close_base_stream")] - fn get_close_base_stream(&self) -> bool; + fn closes_base_stream(&self) -> bool; #[doc(alias = "g_filter_input_stream_set_close_base_stream")] fn set_close_base_stream(&self, close_base: bool); @@ -39,7 +39,7 @@ pub trait FilterInputStreamExt: 'static { } impl> FilterInputStreamExt for O { - fn get_base_stream(&self) -> InputStream { + fn base_stream(&self) -> InputStream { unsafe { from_glib_none(ffi::g_filter_input_stream_get_base_stream( self.as_ref().to_glib_none().0, @@ -47,7 +47,7 @@ impl> FilterInputStreamExt for O { } } - fn get_close_base_stream(&self) -> bool { + fn closes_base_stream(&self) -> bool { unsafe { from_glib(ffi::g_filter_input_stream_get_close_base_stream( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/filter_output_stream.rs b/gio/src/auto/filter_output_stream.rs index 7c87205f1bee..08990b2b3231 100644 --- a/gio/src/auto/filter_output_stream.rs +++ b/gio/src/auto/filter_output_stream.rs @@ -24,10 +24,10 @@ pub const NONE_FILTER_OUTPUT_STREAM: Option<&FilterOutputStream> = None; pub trait FilterOutputStreamExt: 'static { #[doc(alias = "g_filter_output_stream_get_base_stream")] - fn get_base_stream(&self) -> OutputStream; + fn base_stream(&self) -> OutputStream; #[doc(alias = "g_filter_output_stream_get_close_base_stream")] - fn get_close_base_stream(&self) -> bool; + fn closes_base_stream(&self) -> bool; #[doc(alias = "g_filter_output_stream_set_close_base_stream")] fn set_close_base_stream(&self, close_base: bool); @@ -39,7 +39,7 @@ pub trait FilterOutputStreamExt: 'static { } impl> FilterOutputStreamExt for O { - fn get_base_stream(&self) -> OutputStream { + fn base_stream(&self) -> OutputStream { unsafe { from_glib_none(ffi::g_filter_output_stream_get_base_stream( self.as_ref().to_glib_none().0, @@ -47,7 +47,7 @@ impl> FilterOutputStreamExt for O { } } - fn get_close_base_stream(&self) -> bool { + fn closes_base_stream(&self) -> bool { unsafe { from_glib(ffi::g_filter_output_stream_get_close_base_stream( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/inet_address.rs b/gio/src/auto/inet_address.rs index 0e65b0b2a919..133811b2733e 100644 --- a/gio/src/auto/inet_address.rs +++ b/gio/src/auto/inet_address.rs @@ -54,45 +54,46 @@ pub trait InetAddressExt: 'static { fn equal>(&self, other_address: &P) -> bool; #[doc(alias = "g_inet_address_get_family")] - fn get_family(&self) -> SocketFamily; + fn family(&self) -> SocketFamily; #[doc(alias = "g_inet_address_get_is_any")] - fn get_is_any(&self) -> bool; + fn is_any(&self) -> bool; #[doc(alias = "g_inet_address_get_is_link_local")] - fn get_is_link_local(&self) -> bool; + fn is_link_local(&self) -> bool; #[doc(alias = "g_inet_address_get_is_loopback")] - fn get_is_loopback(&self) -> bool; + fn is_loopback(&self) -> bool; #[doc(alias = "g_inet_address_get_is_mc_global")] - fn get_is_mc_global(&self) -> bool; + fn is_mc_global(&self) -> bool; #[doc(alias = "g_inet_address_get_is_mc_link_local")] - fn get_is_mc_link_local(&self) -> bool; + fn is_mc_link_local(&self) -> bool; #[doc(alias = "g_inet_address_get_is_mc_node_local")] - fn get_is_mc_node_local(&self) -> bool; + fn is_mc_node_local(&self) -> bool; #[doc(alias = "g_inet_address_get_is_mc_org_local")] - fn get_is_mc_org_local(&self) -> bool; + fn is_mc_org_local(&self) -> bool; #[doc(alias = "g_inet_address_get_is_mc_site_local")] - fn get_is_mc_site_local(&self) -> bool; + fn is_mc_site_local(&self) -> bool; #[doc(alias = "g_inet_address_get_is_multicast")] - fn get_is_multicast(&self) -> bool; + fn is_multicast(&self) -> bool; #[doc(alias = "g_inet_address_get_is_site_local")] - fn get_is_site_local(&self) -> bool; + fn is_site_local(&self) -> bool; #[doc(alias = "g_inet_address_get_native_size")] - fn get_native_size(&self) -> usize; + fn native_size(&self) -> usize; #[doc(alias = "g_inet_address_to_string")] fn to_str(&self) -> glib::GString; - //fn get_property_bytes(&self) -> /*Unimplemented*/Fundamental: Pointer; + //#[doc(alias = "get_property_bytes")] + //fn bytes(&self) -> /*Unimplemented*/Fundamental: Pointer; fn connect_property_is_any_notify( &self, @@ -155,7 +156,7 @@ impl> InetAddressExt for O { } } - fn get_family(&self) -> SocketFamily { + fn family(&self) -> SocketFamily { unsafe { from_glib(ffi::g_inet_address_get_family( self.as_ref().to_glib_none().0, @@ -163,7 +164,7 @@ impl> InetAddressExt for O { } } - fn get_is_any(&self) -> bool { + fn is_any(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_any( self.as_ref().to_glib_none().0, @@ -171,7 +172,7 @@ impl> InetAddressExt for O { } } - fn get_is_link_local(&self) -> bool { + fn is_link_local(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_link_local( self.as_ref().to_glib_none().0, @@ -179,7 +180,7 @@ impl> InetAddressExt for O { } } - fn get_is_loopback(&self) -> bool { + fn is_loopback(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_loopback( self.as_ref().to_glib_none().0, @@ -187,7 +188,7 @@ impl> InetAddressExt for O { } } - fn get_is_mc_global(&self) -> bool { + fn is_mc_global(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_mc_global( self.as_ref().to_glib_none().0, @@ -195,7 +196,7 @@ impl> InetAddressExt for O { } } - fn get_is_mc_link_local(&self) -> bool { + fn is_mc_link_local(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_mc_link_local( self.as_ref().to_glib_none().0, @@ -203,7 +204,7 @@ impl> InetAddressExt for O { } } - fn get_is_mc_node_local(&self) -> bool { + fn is_mc_node_local(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_mc_node_local( self.as_ref().to_glib_none().0, @@ -211,7 +212,7 @@ impl> InetAddressExt for O { } } - fn get_is_mc_org_local(&self) -> bool { + fn is_mc_org_local(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_mc_org_local( self.as_ref().to_glib_none().0, @@ -219,7 +220,7 @@ impl> InetAddressExt for O { } } - fn get_is_mc_site_local(&self) -> bool { + fn is_mc_site_local(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_mc_site_local( self.as_ref().to_glib_none().0, @@ -227,7 +228,7 @@ impl> InetAddressExt for O { } } - fn get_is_multicast(&self) -> bool { + fn is_multicast(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_multicast( self.as_ref().to_glib_none().0, @@ -235,7 +236,7 @@ impl> InetAddressExt for O { } } - fn get_is_site_local(&self) -> bool { + fn is_site_local(&self) -> bool { unsafe { from_glib(ffi::g_inet_address_get_is_site_local( self.as_ref().to_glib_none().0, @@ -243,7 +244,7 @@ impl> InetAddressExt for O { } } - fn get_native_size(&self) -> usize { + fn native_size(&self) -> usize { unsafe { ffi::g_inet_address_get_native_size(self.as_ref().to_glib_none().0) } } @@ -255,7 +256,7 @@ impl> InetAddressExt for O { } } - //fn get_property_bytes(&self) -> /*Unimplemented*/Fundamental: Pointer { + //fn bytes(&self) -> /*Unimplemented*/Fundamental: Pointer { // unsafe { // let mut value = glib::Value::from_type(::static_type()); // glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"bytes\0".as_ptr() as *const _, value.to_glib_none_mut().0); diff --git a/gio/src/auto/inet_address_mask.rs b/gio/src/auto/inet_address_mask.rs index 4cf1b16dd122..d0a918e2d210 100644 --- a/gio/src/auto/inet_address_mask.rs +++ b/gio/src/auto/inet_address_mask.rs @@ -69,13 +69,13 @@ pub trait InetAddressMaskExt: 'static { fn equal>(&self, mask2: &P) -> bool; #[doc(alias = "g_inet_address_mask_get_address")] - fn get_address(&self) -> InetAddress; + fn address(&self) -> InetAddress; #[doc(alias = "g_inet_address_mask_get_family")] - fn get_family(&self) -> SocketFamily; + fn family(&self) -> SocketFamily; #[doc(alias = "g_inet_address_mask_get_length")] - fn get_length(&self) -> u32; + fn length(&self) -> u32; #[doc(alias = "g_inet_address_mask_matches")] fn matches>(&self, address: &P) -> bool; @@ -83,9 +83,11 @@ pub trait InetAddressMaskExt: 'static { #[doc(alias = "g_inet_address_mask_to_string")] fn to_str(&self) -> glib::GString; - fn set_property_address>(&self, address: Option<&P>); + #[doc(alias = "set_property_address")] + fn set_address>(&self, address: Option<&P>); - fn set_property_length(&self, length: u32); + #[doc(alias = "set_property_length")] + fn set_length(&self, length: u32); fn connect_property_address_notify( &self, @@ -113,7 +115,7 @@ impl> InetAddressMaskExt for O { } } - fn get_address(&self) -> InetAddress { + fn address(&self) -> InetAddress { unsafe { from_glib_none(ffi::g_inet_address_mask_get_address( self.as_ref().to_glib_none().0, @@ -121,7 +123,7 @@ impl> InetAddressMaskExt for O { } } - fn get_family(&self) -> SocketFamily { + fn family(&self) -> SocketFamily { unsafe { from_glib(ffi::g_inet_address_mask_get_family( self.as_ref().to_glib_none().0, @@ -129,7 +131,7 @@ impl> InetAddressMaskExt for O { } } - fn get_length(&self) -> u32 { + fn length(&self) -> u32 { unsafe { ffi::g_inet_address_mask_get_length(self.as_ref().to_glib_none().0) } } @@ -150,7 +152,7 @@ impl> InetAddressMaskExt for O { } } - fn set_property_address>(&self, address: Option<&P>) { + fn set_address>(&self, address: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -160,7 +162,7 @@ impl> InetAddressMaskExt for O { } } - fn set_property_length(&self, length: u32) { + fn set_length(&self, length: u32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gio/src/auto/inet_socket_address.rs b/gio/src/auto/inet_socket_address.rs index 3efbee7ec777..dc6f5e19cc7b 100644 --- a/gio/src/auto/inet_socket_address.rs +++ b/gio/src/auto/inet_socket_address.rs @@ -49,20 +49,20 @@ pub const NONE_INET_SOCKET_ADDRESS: Option<&InetSocketAddress> = None; pub trait InetSocketAddressExt: 'static { #[doc(alias = "g_inet_socket_address_get_address")] - fn get_address(&self) -> InetAddress; + fn address(&self) -> InetAddress; #[doc(alias = "g_inet_socket_address_get_flowinfo")] - fn get_flowinfo(&self) -> u32; + fn flowinfo(&self) -> u32; #[doc(alias = "g_inet_socket_address_get_port")] - fn get_port(&self) -> u16; + fn port(&self) -> u16; #[doc(alias = "g_inet_socket_address_get_scope_id")] - fn get_scope_id(&self) -> u32; + fn scope_id(&self) -> u32; } impl> InetSocketAddressExt for O { - fn get_address(&self) -> InetAddress { + fn address(&self) -> InetAddress { unsafe { from_glib_none(ffi::g_inet_socket_address_get_address( self.as_ref().to_glib_none().0, @@ -70,15 +70,15 @@ impl> InetSocketAddressExt for O { } } - fn get_flowinfo(&self) -> u32 { + fn flowinfo(&self) -> u32 { unsafe { ffi::g_inet_socket_address_get_flowinfo(self.as_ref().to_glib_none().0) } } - fn get_port(&self) -> u16 { + fn port(&self) -> u16 { unsafe { ffi::g_inet_socket_address_get_port(self.as_ref().to_glib_none().0) } } - fn get_scope_id(&self) -> u32 { + fn scope_id(&self) -> u32 { unsafe { ffi::g_inet_socket_address_get_scope_id(self.as_ref().to_glib_none().0) } } } diff --git a/gio/src/auto/io_stream.rs b/gio/src/auto/io_stream.rs index b9d742198733..81dd13faf51a 100644 --- a/gio/src/auto/io_stream.rs +++ b/gio/src/auto/io_stream.rs @@ -11,7 +11,6 @@ use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; -use glib::StaticType; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; @@ -51,10 +50,10 @@ pub trait IOStreamExt: 'static { ) -> Pin> + 'static>>; #[doc(alias = "g_io_stream_get_input_stream")] - fn get_input_stream(&self) -> InputStream; + fn input_stream(&self) -> InputStream; #[doc(alias = "g_io_stream_get_output_stream")] - fn get_output_stream(&self) -> OutputStream; + fn output_stream(&self) -> OutputStream; #[doc(alias = "g_io_stream_has_pending")] fn has_pending(&self) -> bool; @@ -65,8 +64,6 @@ pub trait IOStreamExt: 'static { #[doc(alias = "g_io_stream_set_pending")] fn set_pending(&self) -> Result<(), glib::Error>; - fn get_property_closed(&self) -> bool; - fn connect_property_closed_notify(&self, f: F) -> SignalHandlerId; } @@ -143,7 +140,7 @@ impl> IOStreamExt for O { })) } - fn get_input_stream(&self) -> InputStream { + fn input_stream(&self) -> InputStream { unsafe { from_glib_none(ffi::g_io_stream_get_input_stream( self.as_ref().to_glib_none().0, @@ -151,7 +148,7 @@ impl> IOStreamExt for O { } } - fn get_output_stream(&self) -> OutputStream { + fn output_stream(&self) -> OutputStream { unsafe { from_glib_none(ffi::g_io_stream_get_output_stream( self.as_ref().to_glib_none().0, @@ -179,21 +176,6 @@ impl> IOStreamExt for O { } } - fn get_property_closed(&self) -> bool { - unsafe { - let mut value = glib::Value::from_type(::static_type()); - glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, - b"closed\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `closed` getter") - .unwrap() - } - } - fn connect_property_closed_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_closed_trampoline( this: *mut ffi::GIOStream, diff --git a/gio/src/auto/list_model.rs b/gio/src/auto/list_model.rs index 594cfa1e025f..ab8109d678c8 100644 --- a/gio/src/auto/list_model.rs +++ b/gio/src/auto/list_model.rs @@ -26,10 +26,10 @@ pub trait ListModelExt: 'static { //fn get_item(&self, position: u32) -> /*Unimplemented*/Option; #[doc(alias = "g_list_model_get_item_type")] - fn get_item_type(&self) -> glib::types::Type; + fn item_type(&self) -> glib::types::Type; #[doc(alias = "g_list_model_get_n_items")] - fn get_n_items(&self) -> u32; + fn n_items(&self) -> u32; #[doc(alias = "g_list_model_get_object")] fn get_object(&self, position: u32) -> Option; @@ -48,7 +48,7 @@ impl> ListModelExt for O { // unsafe { TODO: call ffi:g_list_model_get_item() } //} - fn get_item_type(&self) -> glib::types::Type { + fn item_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_list_model_get_item_type( self.as_ref().to_glib_none().0, @@ -56,7 +56,7 @@ impl> ListModelExt for O { } } - fn get_n_items(&self) -> u32 { + fn n_items(&self) -> u32 { unsafe { ffi::g_list_model_get_n_items(self.as_ref().to_glib_none().0) } } diff --git a/gio/src/auto/memory_output_stream.rs b/gio/src/auto/memory_output_stream.rs index 5937f52dd8ec..42edb6127893 100644 --- a/gio/src/auto/memory_output_stream.rs +++ b/gio/src/auto/memory_output_stream.rs @@ -35,7 +35,7 @@ pub const NONE_MEMORY_OUTPUT_STREAM: Option<&MemoryOutputStream> = None; pub trait MemoryOutputStreamExt: 'static { #[doc(alias = "g_memory_output_stream_get_data_size")] - fn get_data_size(&self) -> usize; + fn data_size(&self) -> usize; #[doc(alias = "g_memory_output_stream_steal_as_bytes")] fn steal_as_bytes(&self) -> glib::Bytes; @@ -44,7 +44,7 @@ pub trait MemoryOutputStreamExt: 'static { } impl> MemoryOutputStreamExt for O { - fn get_data_size(&self) -> usize { + fn data_size(&self) -> usize { unsafe { ffi::g_memory_output_stream_get_data_size(self.as_ref().to_glib_none().0) } } diff --git a/gio/src/auto/menu_attribute_iter.rs b/gio/src/auto/menu_attribute_iter.rs index 45d24a1ad782..e37b2c576921 100644 --- a/gio/src/auto/menu_attribute_iter.rs +++ b/gio/src/auto/menu_attribute_iter.rs @@ -15,39 +15,15 @@ glib::wrapper! { } } -impl fmt::Display for MenuAttributeIter { - #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str(&MenuAttributeIterExt::get_name(self)) - } -} - pub const NONE_MENU_ATTRIBUTE_ITER: Option<&MenuAttributeIter> = None; pub trait MenuAttributeIterExt: 'static { - #[doc(alias = "g_menu_attribute_iter_get_name")] - fn get_name(&self) -> glib::GString; - #[doc(alias = "g_menu_attribute_iter_get_next")] - fn get_next(&self) -> Option<(glib::GString, glib::Variant)>; - - #[doc(alias = "g_menu_attribute_iter_get_value")] - fn get_value(&self) -> glib::Variant; - - #[doc(alias = "g_menu_attribute_iter_next")] - fn next(&self) -> bool; + fn next(&self) -> Option<(glib::GString, glib::Variant)>; } impl> MenuAttributeIterExt for O { - fn get_name(&self) -> glib::GString { - unsafe { - from_glib_none(ffi::g_menu_attribute_iter_get_name( - self.as_ref().to_glib_none().0, - )) - } - } - - fn get_next(&self) -> Option<(glib::GString, glib::Variant)> { + fn next(&self) -> Option<(glib::GString, glib::Variant)> { unsafe { let mut out_name = ptr::null(); let mut value = ptr::null_mut(); @@ -63,20 +39,10 @@ impl> MenuAttributeIterExt for O { } } } +} - fn get_value(&self) -> glib::Variant { - unsafe { - from_glib_full(ffi::g_menu_attribute_iter_get_value( - self.as_ref().to_glib_none().0, - )) - } - } - - fn next(&self) -> bool { - unsafe { - from_glib(ffi::g_menu_attribute_iter_next( - self.as_ref().to_glib_none().0, - )) - } +impl fmt::Display for MenuAttributeIter { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str("MenuAttributeIter") } } diff --git a/gio/src/auto/menu_link_iter.rs b/gio/src/auto/menu_link_iter.rs index 48ffd847c664..4fa399db4230 100644 --- a/gio/src/auto/menu_link_iter.rs +++ b/gio/src/auto/menu_link_iter.rs @@ -16,39 +16,15 @@ glib::wrapper! { } } -impl fmt::Display for MenuLinkIter { - #[inline] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str(&MenuLinkIterExt::get_name(self)) - } -} - pub const NONE_MENU_LINK_ITER: Option<&MenuLinkIter> = None; pub trait MenuLinkIterExt: 'static { - #[doc(alias = "g_menu_link_iter_get_name")] - fn get_name(&self) -> glib::GString; - #[doc(alias = "g_menu_link_iter_get_next")] - fn get_next(&self) -> Option<(glib::GString, MenuModel)>; - - #[doc(alias = "g_menu_link_iter_get_value")] - fn get_value(&self) -> MenuModel; - - #[doc(alias = "g_menu_link_iter_next")] - fn next(&self) -> bool; + fn next(&self) -> Option<(glib::GString, MenuModel)>; } impl> MenuLinkIterExt for O { - fn get_name(&self) -> glib::GString { - unsafe { - from_glib_none(ffi::g_menu_link_iter_get_name( - self.as_ref().to_glib_none().0, - )) - } - } - - fn get_next(&self) -> Option<(glib::GString, MenuModel)> { + fn next(&self) -> Option<(glib::GString, MenuModel)> { unsafe { let mut out_link = ptr::null(); let mut value = ptr::null_mut(); @@ -64,16 +40,10 @@ impl> MenuLinkIterExt for O { } } } +} - fn get_value(&self) -> MenuModel { - unsafe { - from_glib_full(ffi::g_menu_link_iter_get_value( - self.as_ref().to_glib_none().0, - )) - } - } - - fn next(&self) -> bool { - unsafe { from_glib(ffi::g_menu_link_iter_next(self.as_ref().to_glib_none().0)) } +impl fmt::Display for MenuLinkIter { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str("MenuLinkIter") } } diff --git a/gio/src/auto/menu_model.rs b/gio/src/auto/menu_model.rs index 8ff024980659..cfb4a216add1 100644 --- a/gio/src/auto/menu_model.rs +++ b/gio/src/auto/menu_model.rs @@ -39,7 +39,7 @@ pub trait MenuModelExt: 'static { fn get_item_link(&self, item_index: i32, link: &str) -> Option; #[doc(alias = "g_menu_model_get_n_items")] - fn get_n_items(&self) -> i32; + fn n_items(&self) -> i32; #[doc(alias = "g_menu_model_is_mutable")] fn is_mutable(&self) -> bool; @@ -88,7 +88,7 @@ impl> MenuModelExt for O { } } - fn get_n_items(&self) -> i32 { + fn n_items(&self) -> i32 { unsafe { ffi::g_menu_model_get_n_items(self.as_ref().to_glib_none().0) } } diff --git a/gio/src/auto/mount.rs b/gio/src/auto/mount.rs index 7b0d2df53280..3d7514daf8f0 100644 --- a/gio/src/auto/mount.rs +++ b/gio/src/auto/mount.rs @@ -59,31 +59,31 @@ pub trait MountExt: 'static { ) -> Pin> + 'static>>; #[doc(alias = "g_mount_get_default_location")] - fn get_default_location(&self) -> File; + fn default_location(&self) -> File; #[doc(alias = "g_mount_get_drive")] - fn get_drive(&self) -> Option; + fn drive(&self) -> Option; #[doc(alias = "g_mount_get_icon")] - fn get_icon(&self) -> Icon; + fn icon(&self) -> Icon; #[doc(alias = "g_mount_get_name")] - fn get_name(&self) -> glib::GString; + fn name(&self) -> glib::GString; #[doc(alias = "g_mount_get_root")] - fn get_root(&self) -> File; + fn root(&self) -> File; #[doc(alias = "g_mount_get_sort_key")] - fn get_sort_key(&self) -> Option; + fn sort_key(&self) -> Option; #[doc(alias = "g_mount_get_symbolic_icon")] - fn get_symbolic_icon(&self) -> Icon; + fn symbolic_icon(&self) -> Icon; #[doc(alias = "g_mount_get_uuid")] - fn get_uuid(&self) -> Option; + fn uuid(&self) -> Option; #[doc(alias = "g_mount_get_volume")] - fn get_volume(&self) -> Option; + fn volume(&self) -> Option; #[doc(alias = "g_mount_guess_content_type")] fn guess_content_type< @@ -237,7 +237,7 @@ impl> MountExt for O { })) } - fn get_default_location(&self) -> File { + fn default_location(&self) -> File { unsafe { from_glib_full(ffi::g_mount_get_default_location( self.as_ref().to_glib_none().0, @@ -245,27 +245,27 @@ impl> MountExt for O { } } - fn get_drive(&self) -> Option { + fn drive(&self) -> Option { unsafe { from_glib_full(ffi::g_mount_get_drive(self.as_ref().to_glib_none().0)) } } - fn get_icon(&self) -> Icon { + fn icon(&self) -> Icon { unsafe { from_glib_full(ffi::g_mount_get_icon(self.as_ref().to_glib_none().0)) } } - fn get_name(&self) -> glib::GString { + fn name(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_mount_get_name(self.as_ref().to_glib_none().0)) } } - fn get_root(&self) -> File { + fn root(&self) -> File { unsafe { from_glib_full(ffi::g_mount_get_root(self.as_ref().to_glib_none().0)) } } - fn get_sort_key(&self) -> Option { + fn sort_key(&self) -> Option { unsafe { from_glib_none(ffi::g_mount_get_sort_key(self.as_ref().to_glib_none().0)) } } - fn get_symbolic_icon(&self) -> Icon { + fn symbolic_icon(&self) -> Icon { unsafe { from_glib_full(ffi::g_mount_get_symbolic_icon( self.as_ref().to_glib_none().0, @@ -273,11 +273,11 @@ impl> MountExt for O { } } - fn get_uuid(&self) -> Option { + fn uuid(&self) -> Option { unsafe { from_glib_full(ffi::g_mount_get_uuid(self.as_ref().to_glib_none().0)) } } - fn get_volume(&self) -> Option { + fn volume(&self) -> Option { unsafe { from_glib_full(ffi::g_mount_get_volume(self.as_ref().to_glib_none().0)) } } diff --git a/gio/src/auto/mount_operation.rs b/gio/src/auto/mount_operation.rs index f41dee009cf2..7ac7f6fe9960 100644 --- a/gio/src/auto/mount_operation.rs +++ b/gio/src/auto/mount_operation.rs @@ -39,37 +39,37 @@ pub const NONE_MOUNT_OPERATION: Option<&MountOperation> = None; pub trait MountOperationExt: 'static { #[doc(alias = "g_mount_operation_get_anonymous")] - fn get_anonymous(&self) -> bool; + fn is_anonymous(&self) -> bool; #[doc(alias = "g_mount_operation_get_choice")] - fn get_choice(&self) -> i32; + fn choice(&self) -> i32; #[doc(alias = "g_mount_operation_get_domain")] - fn get_domain(&self) -> Option; + fn domain(&self) -> Option; #[cfg(any(feature = "v2_58", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_58")))] #[doc(alias = "g_mount_operation_get_is_tcrypt_hidden_volume")] - fn get_is_tcrypt_hidden_volume(&self) -> bool; + fn is_tcrypt_hidden_volume(&self) -> bool; #[cfg(any(feature = "v2_58", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_58")))] #[doc(alias = "g_mount_operation_get_is_tcrypt_system_volume")] - fn get_is_tcrypt_system_volume(&self) -> bool; + fn is_tcrypt_system_volume(&self) -> bool; #[doc(alias = "g_mount_operation_get_password")] - fn get_password(&self) -> Option; + fn password(&self) -> Option; #[doc(alias = "g_mount_operation_get_password_save")] - fn get_password_save(&self) -> PasswordSave; + fn password_save(&self) -> PasswordSave; #[cfg(any(feature = "v2_58", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_58")))] #[doc(alias = "g_mount_operation_get_pim")] - fn get_pim(&self) -> u32; + fn pim(&self) -> u32; #[doc(alias = "g_mount_operation_get_username")] - fn get_username(&self) -> Option; + fn username(&self) -> Option; #[doc(alias = "g_mount_operation_reply")] fn reply(&self, result: MountOperationResult); @@ -160,7 +160,7 @@ pub trait MountOperationExt: 'static { } impl> MountOperationExt for O { - fn get_anonymous(&self) -> bool { + fn is_anonymous(&self) -> bool { unsafe { from_glib(ffi::g_mount_operation_get_anonymous( self.as_ref().to_glib_none().0, @@ -168,11 +168,11 @@ impl> MountOperationExt for O { } } - fn get_choice(&self) -> i32 { + fn choice(&self) -> i32 { unsafe { ffi::g_mount_operation_get_choice(self.as_ref().to_glib_none().0) } } - fn get_domain(&self) -> Option { + fn domain(&self) -> Option { unsafe { from_glib_none(ffi::g_mount_operation_get_domain( self.as_ref().to_glib_none().0, @@ -182,7 +182,7 @@ impl> MountOperationExt for O { #[cfg(any(feature = "v2_58", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_58")))] - fn get_is_tcrypt_hidden_volume(&self) -> bool { + fn is_tcrypt_hidden_volume(&self) -> bool { unsafe { from_glib(ffi::g_mount_operation_get_is_tcrypt_hidden_volume( self.as_ref().to_glib_none().0, @@ -192,7 +192,7 @@ impl> MountOperationExt for O { #[cfg(any(feature = "v2_58", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_58")))] - fn get_is_tcrypt_system_volume(&self) -> bool { + fn is_tcrypt_system_volume(&self) -> bool { unsafe { from_glib(ffi::g_mount_operation_get_is_tcrypt_system_volume( self.as_ref().to_glib_none().0, @@ -200,7 +200,7 @@ impl> MountOperationExt for O { } } - fn get_password(&self) -> Option { + fn password(&self) -> Option { unsafe { from_glib_none(ffi::g_mount_operation_get_password( self.as_ref().to_glib_none().0, @@ -208,7 +208,7 @@ impl> MountOperationExt for O { } } - fn get_password_save(&self) -> PasswordSave { + fn password_save(&self) -> PasswordSave { unsafe { from_glib(ffi::g_mount_operation_get_password_save( self.as_ref().to_glib_none().0, @@ -218,11 +218,11 @@ impl> MountOperationExt for O { #[cfg(any(feature = "v2_58", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_58")))] - fn get_pim(&self) -> u32 { + fn pim(&self) -> u32 { unsafe { ffi::g_mount_operation_get_pim(self.as_ref().to_glib_none().0) } } - fn get_username(&self) -> Option { + fn username(&self) -> Option { unsafe { from_glib_none(ffi::g_mount_operation_get_username( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/network_address.rs b/gio/src/auto/network_address.rs index 7b69fc683a84..97f71f4fb1cf 100644 --- a/gio/src/auto/network_address.rs +++ b/gio/src/auto/network_address.rs @@ -68,17 +68,17 @@ pub const NONE_NETWORK_ADDRESS: Option<&NetworkAddress> = None; pub trait NetworkAddressExt: 'static { #[doc(alias = "g_network_address_get_hostname")] - fn get_hostname(&self) -> glib::GString; + fn hostname(&self) -> glib::GString; #[doc(alias = "g_network_address_get_port")] - fn get_port(&self) -> u16; + fn port(&self) -> u16; #[doc(alias = "g_network_address_get_scheme")] - fn get_scheme(&self) -> Option; + fn scheme(&self) -> Option; } impl> NetworkAddressExt for O { - fn get_hostname(&self) -> glib::GString { + fn hostname(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_network_address_get_hostname( self.as_ref().to_glib_none().0, @@ -86,11 +86,11 @@ impl> NetworkAddressExt for O { } } - fn get_port(&self) -> u16 { + fn port(&self) -> u16 { unsafe { ffi::g_network_address_get_port(self.as_ref().to_glib_none().0) } } - fn get_scheme(&self) -> Option { + fn scheme(&self) -> Option { unsafe { from_glib_none(ffi::g_network_address_get_scheme( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/network_monitor.rs b/gio/src/auto/network_monitor.rs index eea69df47e3d..81c6f08a534c 100644 --- a/gio/src/auto/network_monitor.rs +++ b/gio/src/auto/network_monitor.rs @@ -64,15 +64,15 @@ pub trait NetworkMonitorExt: 'static { #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] #[doc(alias = "g_network_monitor_get_connectivity")] - fn get_connectivity(&self) -> NetworkConnectivity; + fn connectivity(&self) -> NetworkConnectivity; #[doc(alias = "g_network_monitor_get_network_available")] - fn get_network_available(&self) -> bool; + fn is_network_available(&self) -> bool; #[cfg(any(feature = "v2_46", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_46")))] #[doc(alias = "g_network_monitor_get_network_metered")] - fn get_network_metered(&self) -> bool; + fn is_network_metered(&self) -> bool; fn connect_network_changed(&self, f: F) -> SignalHandlerId; @@ -174,7 +174,7 @@ impl> NetworkMonitorExt for O { #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] - fn get_connectivity(&self) -> NetworkConnectivity { + fn connectivity(&self) -> NetworkConnectivity { unsafe { from_glib(ffi::g_network_monitor_get_connectivity( self.as_ref().to_glib_none().0, @@ -182,7 +182,7 @@ impl> NetworkMonitorExt for O { } } - fn get_network_available(&self) -> bool { + fn is_network_available(&self) -> bool { unsafe { from_glib(ffi::g_network_monitor_get_network_available( self.as_ref().to_glib_none().0, @@ -192,7 +192,7 @@ impl> NetworkMonitorExt for O { #[cfg(any(feature = "v2_46", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_46")))] - fn get_network_metered(&self) -> bool { + fn is_network_metered(&self) -> bool { unsafe { from_glib(ffi::g_network_monitor_get_network_metered( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/network_service.rs b/gio/src/auto/network_service.rs index 5a643cd5332f..75838c0612b7 100644 --- a/gio/src/auto/network_service.rs +++ b/gio/src/auto/network_service.rs @@ -37,16 +37,16 @@ pub const NONE_NETWORK_SERVICE: Option<&NetworkService> = None; pub trait NetworkServiceExt: 'static { #[doc(alias = "g_network_service_get_domain")] - fn get_domain(&self) -> glib::GString; + fn domain(&self) -> glib::GString; #[doc(alias = "g_network_service_get_protocol")] - fn get_protocol(&self) -> glib::GString; + fn protocol(&self) -> glib::GString; #[doc(alias = "g_network_service_get_scheme")] - fn get_scheme(&self) -> glib::GString; + fn scheme(&self) -> glib::GString; #[doc(alias = "g_network_service_get_service")] - fn get_service(&self) -> glib::GString; + fn service(&self) -> glib::GString; #[doc(alias = "g_network_service_set_scheme")] fn set_scheme(&self, scheme: &str); @@ -55,7 +55,7 @@ pub trait NetworkServiceExt: 'static { } impl> NetworkServiceExt for O { - fn get_domain(&self) -> glib::GString { + fn domain(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_network_service_get_domain( self.as_ref().to_glib_none().0, @@ -63,7 +63,7 @@ impl> NetworkServiceExt for O { } } - fn get_protocol(&self) -> glib::GString { + fn protocol(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_network_service_get_protocol( self.as_ref().to_glib_none().0, @@ -71,7 +71,7 @@ impl> NetworkServiceExt for O { } } - fn get_scheme(&self) -> glib::GString { + fn scheme(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_network_service_get_scheme( self.as_ref().to_glib_none().0, @@ -79,7 +79,7 @@ impl> NetworkServiceExt for O { } } - fn get_service(&self) -> glib::GString { + fn service(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_network_service_get_service( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/permission.rs b/gio/src/auto/permission.rs index 02babd3ec4ef..2f3a7eb7478b 100644 --- a/gio/src/auto/permission.rs +++ b/gio/src/auto/permission.rs @@ -41,13 +41,13 @@ pub trait PermissionExt: 'static { ) -> Pin> + 'static>>; #[doc(alias = "g_permission_get_allowed")] - fn get_allowed(&self) -> bool; + fn is_allowed(&self) -> bool; #[doc(alias = "g_permission_get_can_acquire")] - fn get_can_acquire(&self) -> bool; + fn can_acquire(&self) -> bool; #[doc(alias = "g_permission_get_can_release")] - fn get_can_release(&self) -> bool; + fn can_release(&self) -> bool; #[doc(alias = "g_permission_impl_update")] fn impl_update(&self, allowed: bool, can_acquire: bool, can_release: bool); @@ -137,7 +137,7 @@ impl> PermissionExt for O { })) } - fn get_allowed(&self) -> bool { + fn is_allowed(&self) -> bool { unsafe { from_glib(ffi::g_permission_get_allowed( self.as_ref().to_glib_none().0, @@ -145,7 +145,7 @@ impl> PermissionExt for O { } } - fn get_can_acquire(&self) -> bool { + fn can_acquire(&self) -> bool { unsafe { from_glib(ffi::g_permission_get_can_acquire( self.as_ref().to_glib_none().0, @@ -153,7 +153,7 @@ impl> PermissionExt for O { } } - fn get_can_release(&self) -> bool { + fn can_release(&self) -> bool { unsafe { from_glib(ffi::g_permission_get_can_release( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/property_action.rs b/gio/src/auto/property_action.rs index 122afd889a5f..d36256844cbc 100644 --- a/gio/src/auto/property_action.rs +++ b/gio/src/auto/property_action.rs @@ -41,7 +41,8 @@ impl PropertyAction { #[cfg(any(feature = "v2_46", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_46")))] - pub fn get_property_invert_boolean(&self) -> bool { + #[doc(alias = "get_property_invert_boolean")] + pub fn inverts_boolean(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/proxy_address.rs b/gio/src/auto/proxy_address.rs index 08eab78becde..3a7e42f51843 100644 --- a/gio/src/auto/proxy_address.rs +++ b/gio/src/auto/proxy_address.rs @@ -52,29 +52,29 @@ pub const NONE_PROXY_ADDRESS: Option<&ProxyAddress> = None; pub trait ProxyAddressExt: 'static { #[doc(alias = "g_proxy_address_get_destination_hostname")] - fn get_destination_hostname(&self) -> glib::GString; + fn destination_hostname(&self) -> glib::GString; #[doc(alias = "g_proxy_address_get_destination_port")] - fn get_destination_port(&self) -> u16; + fn destination_port(&self) -> u16; #[doc(alias = "g_proxy_address_get_destination_protocol")] - fn get_destination_protocol(&self) -> glib::GString; + fn destination_protocol(&self) -> glib::GString; #[doc(alias = "g_proxy_address_get_password")] - fn get_password(&self) -> Option; + fn password(&self) -> Option; #[doc(alias = "g_proxy_address_get_protocol")] - fn get_protocol(&self) -> glib::GString; + fn protocol(&self) -> glib::GString; #[doc(alias = "g_proxy_address_get_uri")] - fn get_uri(&self) -> Option; + fn uri(&self) -> Option; #[doc(alias = "g_proxy_address_get_username")] - fn get_username(&self) -> Option; + fn username(&self) -> Option; } impl> ProxyAddressExt for O { - fn get_destination_hostname(&self) -> glib::GString { + fn destination_hostname(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_proxy_address_get_destination_hostname( self.as_ref().to_glib_none().0, @@ -82,11 +82,11 @@ impl> ProxyAddressExt for O { } } - fn get_destination_port(&self) -> u16 { + fn destination_port(&self) -> u16 { unsafe { ffi::g_proxy_address_get_destination_port(self.as_ref().to_glib_none().0) } } - fn get_destination_protocol(&self) -> glib::GString { + fn destination_protocol(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_proxy_address_get_destination_protocol( self.as_ref().to_glib_none().0, @@ -94,7 +94,7 @@ impl> ProxyAddressExt for O { } } - fn get_password(&self) -> Option { + fn password(&self) -> Option { unsafe { from_glib_none(ffi::g_proxy_address_get_password( self.as_ref().to_glib_none().0, @@ -102,7 +102,7 @@ impl> ProxyAddressExt for O { } } - fn get_protocol(&self) -> glib::GString { + fn protocol(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_proxy_address_get_protocol( self.as_ref().to_glib_none().0, @@ -110,11 +110,11 @@ impl> ProxyAddressExt for O { } } - fn get_uri(&self) -> Option { + fn uri(&self) -> Option { unsafe { from_glib_none(ffi::g_proxy_address_get_uri(self.as_ref().to_glib_none().0)) } } - fn get_username(&self) -> Option { + fn username(&self) -> Option { unsafe { from_glib_none(ffi::g_proxy_address_get_username( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/settings.rs b/gio/src/auto/settings.rs index c988a2340a59..5587ba47f5e6 100644 --- a/gio/src/auto/settings.rs +++ b/gio/src/auto/settings.rs @@ -137,7 +137,7 @@ pub trait SettingsExt: 'static { fn get_flags(&self, key: &str) -> u32; #[doc(alias = "g_settings_get_has_unapplied")] - fn get_has_unapplied(&self) -> bool; + fn has_unapplied(&self) -> bool; #[doc(alias = "g_settings_get_int")] fn get_int(&self, key: &str) -> i32; @@ -226,15 +226,20 @@ pub trait SettingsExt: 'static { #[doc(alias = "g_settings_set_value")] fn set_value(&self, key: &str, value: &glib::Variant) -> Result<(), glib::error::BoolError>; - fn get_property_backend(&self) -> Option; + #[doc(alias = "get_property_backend")] + fn backend(&self) -> Option; - fn get_property_delay_apply(&self) -> bool; + #[doc(alias = "get_property_delay_apply")] + fn is_delay_apply(&self) -> bool; - fn get_property_path(&self) -> Option; + #[doc(alias = "get_property_path")] + fn path(&self) -> Option; - fn get_property_schema_id(&self) -> Option; + #[doc(alias = "get_property_schema_id")] + fn schema_id(&self) -> Option; - fn get_property_settings_schema(&self) -> Option; + #[doc(alias = "get_property_settings_schema")] + fn settings_schema(&self) -> Option; //fn connect_change_event(&self, f: F) -> SignalHandlerId; @@ -346,7 +351,7 @@ impl> SettingsExt for O { unsafe { ffi::g_settings_get_flags(self.as_ref().to_glib_none().0, key.to_glib_none().0) } } - fn get_has_unapplied(&self) -> bool { + fn has_unapplied(&self) -> bool { unsafe { from_glib(ffi::g_settings_get_has_unapplied( self.as_ref().to_glib_none().0, @@ -602,7 +607,7 @@ impl> SettingsExt for O { } } - fn get_property_backend(&self) -> Option { + fn backend(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -616,7 +621,7 @@ impl> SettingsExt for O { } } - fn get_property_delay_apply(&self) -> bool { + fn is_delay_apply(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -631,7 +636,7 @@ impl> SettingsExt for O { } } - fn get_property_path(&self) -> Option { + fn path(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -645,7 +650,7 @@ impl> SettingsExt for O { } } - fn get_property_schema_id(&self) -> Option { + fn schema_id(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -659,7 +664,7 @@ impl> SettingsExt for O { } } - fn get_property_settings_schema(&self) -> Option { + fn settings_schema(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/settings_schema.rs b/gio/src/auto/settings_schema.rs index c6ee79095407..d17640109afd 100644 --- a/gio/src/auto/settings_schema.rs +++ b/gio/src/auto/settings_schema.rs @@ -18,7 +18,7 @@ glib::wrapper! { impl SettingsSchema { #[doc(alias = "g_settings_schema_get_id")] - pub fn get_id(&self) -> glib::GString { + pub fn id(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_settings_schema_get_id(self.to_glib_none().0)) } } @@ -33,7 +33,7 @@ impl SettingsSchema { } #[doc(alias = "g_settings_schema_get_path")] - pub fn get_path(&self) -> Option { + pub fn path(&self) -> Option { unsafe { from_glib_none(ffi::g_settings_schema_get_path(self.to_glib_none().0)) } } diff --git a/gio/src/auto/settings_schema_key.rs b/gio/src/auto/settings_schema_key.rs index 0805c141d13a..4e624431d6d8 100644 --- a/gio/src/auto/settings_schema_key.rs +++ b/gio/src/auto/settings_schema_key.rs @@ -20,7 +20,7 @@ glib::wrapper! { impl SettingsSchemaKey { #[doc(alias = "g_settings_schema_key_get_default_value")] - pub fn get_default_value(&self) -> glib::Variant { + pub fn default_value(&self) -> glib::Variant { unsafe { from_glib_full(ffi::g_settings_schema_key_get_default_value( self.to_glib_none().0, @@ -29,7 +29,7 @@ impl SettingsSchemaKey { } #[doc(alias = "g_settings_schema_key_get_description")] - pub fn get_description(&self) -> Option { + pub fn description(&self) -> Option { unsafe { from_glib_none(ffi::g_settings_schema_key_get_description( self.to_glib_none().0, @@ -40,17 +40,17 @@ impl SettingsSchemaKey { #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] #[doc(alias = "g_settings_schema_key_get_name")] - pub fn get_name(&self) -> glib::GString { + pub fn name(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_settings_schema_key_get_name(self.to_glib_none().0)) } } #[doc(alias = "g_settings_schema_key_get_range")] - pub fn get_range(&self) -> glib::Variant { + pub fn range(&self) -> glib::Variant { unsafe { from_glib_full(ffi::g_settings_schema_key_get_range(self.to_glib_none().0)) } } #[doc(alias = "g_settings_schema_key_get_summary")] - pub fn get_summary(&self) -> Option { + pub fn summary(&self) -> Option { unsafe { from_glib_none(ffi::g_settings_schema_key_get_summary( self.to_glib_none().0, @@ -59,7 +59,7 @@ impl SettingsSchemaKey { } #[doc(alias = "g_settings_schema_key_get_value_type")] - pub fn get_value_type(&self) -> glib::VariantType { + pub fn value_type(&self) -> glib::VariantType { unsafe { from_glib_none(ffi::g_settings_schema_key_get_value_type( self.to_glib_none().0, @@ -83,6 +83,6 @@ impl SettingsSchemaKey { impl fmt::Display for SettingsSchemaKey { #[inline] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str(&self.get_name()) + f.write_str(&self.name()) } } diff --git a/gio/src/auto/socket.rs b/gio/src/auto/socket.rs index 012da7a4887d..2c9c43be5527 100644 --- a/gio/src/auto/socket.rs +++ b/gio/src/auto/socket.rs @@ -109,52 +109,52 @@ pub trait SocketExt: 'static { fn connection_factory_create_connection(&self) -> SocketConnection; #[doc(alias = "g_socket_get_available_bytes")] - fn get_available_bytes(&self) -> isize; + fn available_bytes(&self) -> isize; #[doc(alias = "g_socket_get_blocking")] - fn get_blocking(&self) -> bool; + fn is_blocking(&self) -> bool; #[doc(alias = "g_socket_get_broadcast")] - fn get_broadcast(&self) -> bool; + fn is_broadcast(&self) -> bool; #[doc(alias = "g_socket_get_credentials")] - fn get_credentials(&self) -> Result; + fn credentials(&self) -> Result; #[doc(alias = "g_socket_get_family")] - fn get_family(&self) -> SocketFamily; + fn family(&self) -> SocketFamily; #[doc(alias = "g_socket_get_keepalive")] - fn get_keepalive(&self) -> bool; + fn is_keepalive(&self) -> bool; #[doc(alias = "g_socket_get_listen_backlog")] - fn get_listen_backlog(&self) -> i32; + fn listen_backlog(&self) -> i32; #[doc(alias = "g_socket_get_local_address")] - fn get_local_address(&self) -> Result; + fn local_address(&self) -> Result; #[doc(alias = "g_socket_get_multicast_loopback")] - fn get_multicast_loopback(&self) -> bool; + fn is_multicast_loopback(&self) -> bool; #[doc(alias = "g_socket_get_multicast_ttl")] - fn get_multicast_ttl(&self) -> u32; + fn multicast_ttl(&self) -> u32; #[doc(alias = "g_socket_get_option")] fn get_option(&self, level: i32, optname: i32) -> Result; #[doc(alias = "g_socket_get_protocol")] - fn get_protocol(&self) -> SocketProtocol; + fn protocol(&self) -> SocketProtocol; #[doc(alias = "g_socket_get_remote_address")] - fn get_remote_address(&self) -> Result; + fn remote_address(&self) -> Result; #[doc(alias = "g_socket_get_socket_type")] - fn get_socket_type(&self) -> SocketType; + fn socket_type(&self) -> SocketType; #[doc(alias = "g_socket_get_timeout")] - fn get_timeout(&self) -> u32; + fn timeout(&self) -> u32; #[doc(alias = "g_socket_get_ttl")] - fn get_ttl(&self) -> u32; + fn ttl(&self) -> u32; #[doc(alias = "g_socket_is_closed")] fn is_closed(&self) -> bool; @@ -234,7 +234,8 @@ pub trait SocketExt: 'static { #[doc(alias = "g_socket_speaks_ipv4")] fn speaks_ipv4(&self) -> bool; - fn get_property_type(&self) -> SocketType; + #[doc(alias = "get_property_type")] + fn type_(&self) -> SocketType; fn connect_property_blocking_notify( &self, @@ -428,19 +429,19 @@ impl> SocketExt for O { } } - fn get_available_bytes(&self) -> isize { + fn available_bytes(&self) -> isize { unsafe { ffi::g_socket_get_available_bytes(self.as_ref().to_glib_none().0) } } - fn get_blocking(&self) -> bool { + fn is_blocking(&self) -> bool { unsafe { from_glib(ffi::g_socket_get_blocking(self.as_ref().to_glib_none().0)) } } - fn get_broadcast(&self) -> bool { + fn is_broadcast(&self) -> bool { unsafe { from_glib(ffi::g_socket_get_broadcast(self.as_ref().to_glib_none().0)) } } - fn get_credentials(&self) -> Result { + fn credentials(&self) -> Result { unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_socket_get_credentials(self.as_ref().to_glib_none().0, &mut error); @@ -452,19 +453,19 @@ impl> SocketExt for O { } } - fn get_family(&self) -> SocketFamily { + fn family(&self) -> SocketFamily { unsafe { from_glib(ffi::g_socket_get_family(self.as_ref().to_glib_none().0)) } } - fn get_keepalive(&self) -> bool { + fn is_keepalive(&self) -> bool { unsafe { from_glib(ffi::g_socket_get_keepalive(self.as_ref().to_glib_none().0)) } } - fn get_listen_backlog(&self) -> i32 { + fn listen_backlog(&self) -> i32 { unsafe { ffi::g_socket_get_listen_backlog(self.as_ref().to_glib_none().0) } } - fn get_local_address(&self) -> Result { + fn local_address(&self) -> Result { unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_socket_get_local_address(self.as_ref().to_glib_none().0, &mut error); @@ -476,7 +477,7 @@ impl> SocketExt for O { } } - fn get_multicast_loopback(&self) -> bool { + fn is_multicast_loopback(&self) -> bool { unsafe { from_glib(ffi::g_socket_get_multicast_loopback( self.as_ref().to_glib_none().0, @@ -484,7 +485,7 @@ impl> SocketExt for O { } } - fn get_multicast_ttl(&self) -> u32 { + fn multicast_ttl(&self) -> u32 { unsafe { ffi::g_socket_get_multicast_ttl(self.as_ref().to_glib_none().0) } } @@ -508,11 +509,11 @@ impl> SocketExt for O { } } - fn get_protocol(&self) -> SocketProtocol { + fn protocol(&self) -> SocketProtocol { unsafe { from_glib(ffi::g_socket_get_protocol(self.as_ref().to_glib_none().0)) } } - fn get_remote_address(&self) -> Result { + fn remote_address(&self) -> Result { unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_socket_get_remote_address(self.as_ref().to_glib_none().0, &mut error); @@ -524,7 +525,7 @@ impl> SocketExt for O { } } - fn get_socket_type(&self) -> SocketType { + fn socket_type(&self) -> SocketType { unsafe { from_glib(ffi::g_socket_get_socket_type( self.as_ref().to_glib_none().0, @@ -532,11 +533,11 @@ impl> SocketExt for O { } } - fn get_timeout(&self) -> u32 { + fn timeout(&self) -> u32 { unsafe { ffi::g_socket_get_timeout(self.as_ref().to_glib_none().0) } } - fn get_ttl(&self) -> u32 { + fn ttl(&self) -> u32 { unsafe { ffi::g_socket_get_ttl(self.as_ref().to_glib_none().0) } } @@ -746,7 +747,7 @@ impl> SocketExt for O { unsafe { from_glib(ffi::g_socket_speaks_ipv4(self.as_ref().to_glib_none().0)) } } - fn get_property_type(&self) -> SocketType { + fn type_(&self) -> SocketType { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/socket_address.rs b/gio/src/auto/socket_address.rs index 54eb6a6778cf..935fe5b07110 100644 --- a/gio/src/auto/socket_address.rs +++ b/gio/src/auto/socket_address.rs @@ -35,10 +35,10 @@ pub const NONE_SOCKET_ADDRESS: Option<&SocketAddress> = None; pub trait SocketAddressExt: 'static { #[doc(alias = "g_socket_address_get_family")] - fn get_family(&self) -> SocketFamily; + fn family(&self) -> SocketFamily; #[doc(alias = "g_socket_address_get_native_size")] - fn get_native_size(&self) -> isize; + fn native_size(&self) -> isize; //#[doc(alias = "g_socket_address_to_native")] //fn to_native(&self, dest: /*Unimplemented*/Option, destlen: usize) -> Result<(), glib::Error>; @@ -50,7 +50,7 @@ pub trait SocketAddressExt: 'static { } impl> SocketAddressExt for O { - fn get_family(&self) -> SocketFamily { + fn family(&self) -> SocketFamily { unsafe { from_glib(ffi::g_socket_address_get_family( self.as_ref().to_glib_none().0, @@ -58,7 +58,7 @@ impl> SocketAddressExt for O { } } - fn get_native_size(&self) -> isize { + fn native_size(&self) -> isize { unsafe { ffi::g_socket_address_get_native_size(self.as_ref().to_glib_none().0) } } diff --git a/gio/src/auto/socket_client.rs b/gio/src/auto/socket_client.rs index 6c830783e1e8..10a2c1474ba1 100644 --- a/gio/src/auto/socket_client.rs +++ b/gio/src/auto/socket_client.rs @@ -156,31 +156,31 @@ pub trait SocketClientExt: 'static { ) -> Pin> + 'static>>; #[doc(alias = "g_socket_client_get_enable_proxy")] - fn get_enable_proxy(&self) -> bool; + fn enables_proxy(&self) -> bool; #[doc(alias = "g_socket_client_get_family")] - fn get_family(&self) -> SocketFamily; + fn family(&self) -> SocketFamily; #[doc(alias = "g_socket_client_get_local_address")] - fn get_local_address(&self) -> Option; + fn local_address(&self) -> Option; #[doc(alias = "g_socket_client_get_protocol")] - fn get_protocol(&self) -> SocketProtocol; + fn protocol(&self) -> SocketProtocol; #[doc(alias = "g_socket_client_get_proxy_resolver")] - fn get_proxy_resolver(&self) -> ProxyResolver; + fn proxy_resolver(&self) -> ProxyResolver; #[doc(alias = "g_socket_client_get_socket_type")] - fn get_socket_type(&self) -> SocketType; + fn socket_type(&self) -> SocketType; #[doc(alias = "g_socket_client_get_timeout")] - fn get_timeout(&self) -> u32; + fn timeout(&self) -> u32; #[doc(alias = "g_socket_client_get_tls")] - fn get_tls(&self) -> bool; + fn is_tls(&self) -> bool; #[doc(alias = "g_socket_client_get_tls_validation_flags")] - fn get_tls_validation_flags(&self) -> TlsCertificateFlags; + fn tls_validation_flags(&self) -> TlsCertificateFlags; #[doc(alias = "g_socket_client_set_enable_proxy")] fn set_enable_proxy(&self, enable: bool); @@ -209,9 +209,11 @@ pub trait SocketClientExt: 'static { #[doc(alias = "g_socket_client_set_tls_validation_flags")] fn set_tls_validation_flags(&self, flags: TlsCertificateFlags); - fn get_property_type(&self) -> SocketType; + #[doc(alias = "get_property_type")] + fn type_(&self) -> SocketType; - fn set_property_type(&self, type_: SocketType); + #[doc(alias = "set_property_type")] + fn set_type(&self, type_: SocketType); fn connect_event< F: Fn(&Self, SocketClientEvent, &SocketConnectable, Option<&IOStream>) + 'static, @@ -598,7 +600,7 @@ impl> SocketClientExt for O { })) } - fn get_enable_proxy(&self) -> bool { + fn enables_proxy(&self) -> bool { unsafe { from_glib(ffi::g_socket_client_get_enable_proxy( self.as_ref().to_glib_none().0, @@ -606,7 +608,7 @@ impl> SocketClientExt for O { } } - fn get_family(&self) -> SocketFamily { + fn family(&self) -> SocketFamily { unsafe { from_glib(ffi::g_socket_client_get_family( self.as_ref().to_glib_none().0, @@ -614,7 +616,7 @@ impl> SocketClientExt for O { } } - fn get_local_address(&self) -> Option { + fn local_address(&self) -> Option { unsafe { from_glib_none(ffi::g_socket_client_get_local_address( self.as_ref().to_glib_none().0, @@ -622,7 +624,7 @@ impl> SocketClientExt for O { } } - fn get_protocol(&self) -> SocketProtocol { + fn protocol(&self) -> SocketProtocol { unsafe { from_glib(ffi::g_socket_client_get_protocol( self.as_ref().to_glib_none().0, @@ -630,7 +632,7 @@ impl> SocketClientExt for O { } } - fn get_proxy_resolver(&self) -> ProxyResolver { + fn proxy_resolver(&self) -> ProxyResolver { unsafe { from_glib_none(ffi::g_socket_client_get_proxy_resolver( self.as_ref().to_glib_none().0, @@ -638,7 +640,7 @@ impl> SocketClientExt for O { } } - fn get_socket_type(&self) -> SocketType { + fn socket_type(&self) -> SocketType { unsafe { from_glib(ffi::g_socket_client_get_socket_type( self.as_ref().to_glib_none().0, @@ -646,15 +648,15 @@ impl> SocketClientExt for O { } } - fn get_timeout(&self) -> u32 { + fn timeout(&self) -> u32 { unsafe { ffi::g_socket_client_get_timeout(self.as_ref().to_glib_none().0) } } - fn get_tls(&self) -> bool { + fn is_tls(&self) -> bool { unsafe { from_glib(ffi::g_socket_client_get_tls(self.as_ref().to_glib_none().0)) } } - fn get_tls_validation_flags(&self) -> TlsCertificateFlags { + fn tls_validation_flags(&self) -> TlsCertificateFlags { unsafe { from_glib(ffi::g_socket_client_get_tls_validation_flags( self.as_ref().to_glib_none().0, @@ -725,7 +727,7 @@ impl> SocketClientExt for O { } } - fn get_property_type(&self) -> SocketType { + fn type_(&self) -> SocketType { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -740,7 +742,7 @@ impl> SocketClientExt for O { } } - fn set_property_type(&self, type_: SocketType) { + fn set_type(&self, type_: SocketType) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gio/src/auto/socket_connection.rs b/gio/src/auto/socket_connection.rs index ced8bece94b1..fbf67e80a8c7 100644 --- a/gio/src/auto/socket_connection.rs +++ b/gio/src/auto/socket_connection.rs @@ -86,13 +86,13 @@ pub trait SocketConnectionExt: 'static { ) -> Pin> + 'static>>; #[doc(alias = "g_socket_connection_get_local_address")] - fn get_local_address(&self) -> Result; + fn local_address(&self) -> Result; #[doc(alias = "g_socket_connection_get_remote_address")] - fn get_remote_address(&self) -> Result; + fn remote_address(&self) -> Result; #[doc(alias = "g_socket_connection_get_socket")] - fn get_socket(&self) -> Socket; + fn socket(&self) -> Socket; #[doc(alias = "g_socket_connection_is_connected")] fn is_connected(&self) -> bool; @@ -176,7 +176,7 @@ impl> SocketConnectionExt for O { })) } - fn get_local_address(&self) -> Result { + fn local_address(&self) -> Result { unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_socket_connection_get_local_address( @@ -191,7 +191,7 @@ impl> SocketConnectionExt for O { } } - fn get_remote_address(&self) -> Result { + fn remote_address(&self) -> Result { unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_socket_connection_get_remote_address( @@ -206,7 +206,7 @@ impl> SocketConnectionExt for O { } } - fn get_socket(&self) -> Socket { + fn socket(&self) -> Socket { unsafe { from_glib_none(ffi::g_socket_connection_get_socket( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/socket_listener.rs b/gio/src/auto/socket_listener.rs index 511b9136137a..eadd9ace9d5c 100644 --- a/gio/src/auto/socket_listener.rs +++ b/gio/src/auto/socket_listener.rs @@ -134,9 +134,11 @@ pub trait SocketListenerExt: 'static { #[doc(alias = "g_socket_listener_set_backlog")] fn set_backlog(&self, listen_backlog: i32); - fn get_property_listen_backlog(&self) -> i32; + #[doc(alias = "get_property_listen_backlog")] + fn listen_backlog(&self) -> i32; - fn set_property_listen_backlog(&self, listen_backlog: i32); + #[doc(alias = "set_property_listen_backlog")] + fn set_listen_backlog(&self, listen_backlog: i32); #[cfg(any(feature = "v2_46", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_46")))] @@ -417,7 +419,7 @@ impl> SocketListenerExt for O { } } - fn get_property_listen_backlog(&self) -> i32 { + fn listen_backlog(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -432,7 +434,7 @@ impl> SocketListenerExt for O { } } - fn set_property_listen_backlog(&self, listen_backlog: i32) { + fn set_listen_backlog(&self, listen_backlog: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gio/src/auto/socket_service.rs b/gio/src/auto/socket_service.rs index 4024f72fac29..fbff6a8f0770 100644 --- a/gio/src/auto/socket_service.rs +++ b/gio/src/auto/socket_service.rs @@ -9,9 +9,6 @@ use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; -#[cfg(any(feature = "v2_46", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v2_46")))] -use glib::StaticType; use std::boxed::Box as Box_; use std::fmt; use std::mem::transmute; @@ -51,11 +48,8 @@ pub trait SocketServiceExt: 'static { #[cfg(any(feature = "v2_46", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_46")))] - fn get_property_active(&self) -> bool; - - #[cfg(any(feature = "v2_46", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_46")))] - fn set_property_active(&self, active: bool); + #[doc(alias = "set_property_active")] + fn set_active(&self, active: bool); fn connect_incoming) -> bool + 'static>( &self, @@ -90,24 +84,7 @@ impl> SocketServiceExt for O { #[cfg(any(feature = "v2_46", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_46")))] - fn get_property_active(&self) -> bool { - unsafe { - let mut value = glib::Value::from_type(::static_type()); - glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, - b"active\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `active` getter") - .unwrap() - } - } - - #[cfg(any(feature = "v2_46", feature = "dox"))] - #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_46")))] - fn set_property_active(&self, active: bool) { + fn set_active(&self, active: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gio/src/auto/srv_target.rs b/gio/src/auto/srv_target.rs index 02be902aa6e1..d93d6a65faa3 100644 --- a/gio/src/auto/srv_target.rs +++ b/gio/src/auto/srv_target.rs @@ -29,22 +29,22 @@ impl SrvTarget { } #[doc(alias = "g_srv_target_get_hostname")] - pub fn get_hostname(&mut self) -> glib::GString { + pub fn hostname(&mut self) -> glib::GString { unsafe { from_glib_none(ffi::g_srv_target_get_hostname(self.to_glib_none_mut().0)) } } #[doc(alias = "g_srv_target_get_port")] - pub fn get_port(&mut self) -> u16 { + pub fn port(&mut self) -> u16 { unsafe { ffi::g_srv_target_get_port(self.to_glib_none_mut().0) } } #[doc(alias = "g_srv_target_get_priority")] - pub fn get_priority(&mut self) -> u16 { + pub fn priority(&mut self) -> u16 { unsafe { ffi::g_srv_target_get_priority(self.to_glib_none_mut().0) } } #[doc(alias = "g_srv_target_get_weight")] - pub fn get_weight(&mut self) -> u16 { + pub fn weight(&mut self) -> u16 { unsafe { ffi::g_srv_target_get_weight(self.to_glib_none_mut().0) } } diff --git a/gio/src/auto/subprocess.rs b/gio/src/auto/subprocess.rs index 67587f56a174..e21512a77dfc 100644 --- a/gio/src/auto/subprocess.rs +++ b/gio/src/auto/subprocess.rs @@ -179,52 +179,52 @@ impl Subprocess { } #[doc(alias = "g_subprocess_get_exit_status")] - pub fn get_exit_status(&self) -> i32 { + pub fn exit_status(&self) -> i32 { unsafe { ffi::g_subprocess_get_exit_status(self.to_glib_none().0) } } #[doc(alias = "g_subprocess_get_identifier")] - pub fn get_identifier(&self) -> Option { + pub fn identifier(&self) -> Option { unsafe { from_glib_none(ffi::g_subprocess_get_identifier(self.to_glib_none().0)) } } #[doc(alias = "g_subprocess_get_if_exited")] - pub fn get_if_exited(&self) -> bool { + pub fn has_exited(&self) -> bool { unsafe { from_glib(ffi::g_subprocess_get_if_exited(self.to_glib_none().0)) } } #[doc(alias = "g_subprocess_get_if_signaled")] - pub fn get_if_signaled(&self) -> bool { + pub fn has_signaled(&self) -> bool { unsafe { from_glib(ffi::g_subprocess_get_if_signaled(self.to_glib_none().0)) } } #[doc(alias = "g_subprocess_get_status")] - pub fn get_status(&self) -> i32 { + pub fn status(&self) -> i32 { unsafe { ffi::g_subprocess_get_status(self.to_glib_none().0) } } #[doc(alias = "g_subprocess_get_stderr_pipe")] - pub fn get_stderr_pipe(&self) -> Option { + pub fn stderr_pipe(&self) -> Option { unsafe { from_glib_none(ffi::g_subprocess_get_stderr_pipe(self.to_glib_none().0)) } } #[doc(alias = "g_subprocess_get_stdin_pipe")] - pub fn get_stdin_pipe(&self) -> Option { + pub fn stdin_pipe(&self) -> Option { unsafe { from_glib_none(ffi::g_subprocess_get_stdin_pipe(self.to_glib_none().0)) } } #[doc(alias = "g_subprocess_get_stdout_pipe")] - pub fn get_stdout_pipe(&self) -> Option { + pub fn stdout_pipe(&self) -> Option { unsafe { from_glib_none(ffi::g_subprocess_get_stdout_pipe(self.to_glib_none().0)) } } #[doc(alias = "g_subprocess_get_successful")] - pub fn get_successful(&self) -> bool { + pub fn is_successful(&self) -> bool { unsafe { from_glib(ffi::g_subprocess_get_successful(self.to_glib_none().0)) } } #[doc(alias = "g_subprocess_get_term_sig")] - pub fn get_term_sig(&self) -> i32 { + pub fn term_sig(&self) -> i32 { unsafe { ffi::g_subprocess_get_term_sig(self.to_glib_none().0) } } diff --git a/gio/src/auto/task.rs b/gio/src/auto/task.rs index bafb060d134b..d77baf67e546 100644 --- a/gio/src/auto/task.rs +++ b/gio/src/auto/task.rs @@ -38,46 +38,46 @@ impl Task { //} #[doc(alias = "g_task_get_cancellable")] - pub fn get_cancellable(&self) -> Cancellable { + pub fn cancellable(&self) -> Cancellable { unsafe { from_glib_none(ffi::g_task_get_cancellable(self.to_glib_none().0)) } } #[doc(alias = "g_task_get_check_cancellable")] - pub fn get_check_cancellable(&self) -> bool { + pub fn is_check_cancellable(&self) -> bool { unsafe { from_glib(ffi::g_task_get_check_cancellable(self.to_glib_none().0)) } } #[cfg(any(feature = "v2_44", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_44")))] #[doc(alias = "g_task_get_completed")] - pub fn get_completed(&self) -> bool { + pub fn is_completed(&self) -> bool { unsafe { from_glib(ffi::g_task_get_completed(self.to_glib_none().0)) } } #[doc(alias = "g_task_get_context")] - pub fn get_context(&self) -> glib::MainContext { + pub fn context(&self) -> glib::MainContext { unsafe { from_glib_none(ffi::g_task_get_context(self.to_glib_none().0)) } } #[cfg(any(feature = "v2_60", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] #[doc(alias = "g_task_get_name")] - pub fn get_name(&self) -> Option { + pub fn name(&self) -> Option { unsafe { from_glib_none(ffi::g_task_get_name(self.to_glib_none().0)) } } #[doc(alias = "g_task_get_return_on_cancel")] - pub fn get_return_on_cancel(&self) -> bool { + pub fn is_return_on_cancel(&self) -> bool { unsafe { from_glib(ffi::g_task_get_return_on_cancel(self.to_glib_none().0)) } } //#[doc(alias = "g_task_get_source_tag")] - //pub fn get_source_tag(&self) -> /*Unimplemented*/Option { + //pub fn source_tag(&self) -> /*Unimplemented*/Option { // unsafe { TODO: call ffi:g_task_get_source_tag() } //} //#[doc(alias = "g_task_get_task_data")] - //pub fn get_task_data(&self) -> /*Unimplemented*/Option { + //pub fn task_data(&self) -> /*Unimplemented*/Option { // unsafe { TODO: call ffi:g_task_get_task_data() } //} diff --git a/gio/src/auto/tcp_connection.rs b/gio/src/auto/tcp_connection.rs index 601d69678a69..547e23be599e 100644 --- a/gio/src/auto/tcp_connection.rs +++ b/gio/src/auto/tcp_connection.rs @@ -25,7 +25,7 @@ pub const NONE_TCP_CONNECTION: Option<&TcpConnection> = None; pub trait TcpConnectionExt: 'static { #[doc(alias = "g_tcp_connection_get_graceful_disconnect")] - fn get_graceful_disconnect(&self) -> bool; + fn is_graceful_disconnect(&self) -> bool; #[doc(alias = "g_tcp_connection_set_graceful_disconnect")] fn set_graceful_disconnect(&self, graceful_disconnect: bool); @@ -37,7 +37,7 @@ pub trait TcpConnectionExt: 'static { } impl> TcpConnectionExt for O { - fn get_graceful_disconnect(&self) -> bool { + fn is_graceful_disconnect(&self) -> bool { unsafe { from_glib(ffi::g_tcp_connection_get_graceful_disconnect( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/themed_icon.rs b/gio/src/auto/themed_icon.rs index f61e74cf667b..60fd9750304c 100644 --- a/gio/src/auto/themed_icon.rs +++ b/gio/src/auto/themed_icon.rs @@ -54,7 +54,7 @@ impl ThemedIcon { } #[doc(alias = "g_themed_icon_get_names")] - pub fn get_names(&self) -> Vec { + pub fn names(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_themed_icon_get_names( self.to_glib_none().0, @@ -69,7 +69,8 @@ impl ThemedIcon { } } - pub fn get_property_use_default_fallbacks(&self) -> bool { + #[doc(alias = "get_property_use_default_fallbacks")] + pub fn uses_default_fallbacks(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/threaded_socket_service.rs b/gio/src/auto/threaded_socket_service.rs index 92c7a4f34f37..5ea2f912759d 100644 --- a/gio/src/auto/threaded_socket_service.rs +++ b/gio/src/auto/threaded_socket_service.rs @@ -26,7 +26,8 @@ glib::wrapper! { pub const NONE_THREADED_SOCKET_SERVICE: Option<&ThreadedSocketService> = None; pub trait ThreadedSocketServiceExt: 'static { - fn get_property_max_threads(&self) -> i32; + #[doc(alias = "get_property_max_threads")] + fn max_threads(&self) -> i32; fn connect_run) -> bool + 'static>( &self, @@ -35,7 +36,7 @@ pub trait ThreadedSocketServiceExt: 'static { } impl> ThreadedSocketServiceExt for O { - fn get_property_max_threads(&self) -> i32 { + fn max_threads(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/tls_backend.rs b/gio/src/auto/tls_backend.rs index 8f24171a3d86..b2e17a767760 100644 --- a/gio/src/auto/tls_backend.rs +++ b/gio/src/auto/tls_backend.rs @@ -26,29 +26,29 @@ pub const NONE_TLS_BACKEND: Option<&TlsBackend> = None; pub trait TlsBackendExt: 'static { #[doc(alias = "g_tls_backend_get_certificate_type")] - fn get_certificate_type(&self) -> glib::types::Type; + fn certificate_type(&self) -> glib::types::Type; #[doc(alias = "g_tls_backend_get_client_connection_type")] - fn get_client_connection_type(&self) -> glib::types::Type; + fn client_connection_type(&self) -> glib::types::Type; #[doc(alias = "g_tls_backend_get_default_database")] - fn get_default_database(&self) -> TlsDatabase; + fn default_database(&self) -> TlsDatabase; #[cfg(any(feature = "v2_48", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_48")))] #[doc(alias = "g_tls_backend_get_dtls_client_connection_type")] - fn get_dtls_client_connection_type(&self) -> glib::types::Type; + fn dtls_client_connection_type(&self) -> glib::types::Type; #[cfg(any(feature = "v2_48", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_48")))] #[doc(alias = "g_tls_backend_get_dtls_server_connection_type")] - fn get_dtls_server_connection_type(&self) -> glib::types::Type; + fn dtls_server_connection_type(&self) -> glib::types::Type; #[doc(alias = "g_tls_backend_get_file_database_type")] - fn get_file_database_type(&self) -> glib::types::Type; + fn file_database_type(&self) -> glib::types::Type; #[doc(alias = "g_tls_backend_get_server_connection_type")] - fn get_server_connection_type(&self) -> glib::types::Type; + fn server_connection_type(&self) -> glib::types::Type; #[cfg(any(feature = "v2_60", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] @@ -65,7 +65,7 @@ pub trait TlsBackendExt: 'static { } impl> TlsBackendExt for O { - fn get_certificate_type(&self) -> glib::types::Type { + fn certificate_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_tls_backend_get_certificate_type( self.as_ref().to_glib_none().0, @@ -73,7 +73,7 @@ impl> TlsBackendExt for O { } } - fn get_client_connection_type(&self) -> glib::types::Type { + fn client_connection_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_tls_backend_get_client_connection_type( self.as_ref().to_glib_none().0, @@ -81,7 +81,7 @@ impl> TlsBackendExt for O { } } - fn get_default_database(&self) -> TlsDatabase { + fn default_database(&self) -> TlsDatabase { unsafe { from_glib_full(ffi::g_tls_backend_get_default_database( self.as_ref().to_glib_none().0, @@ -91,7 +91,7 @@ impl> TlsBackendExt for O { #[cfg(any(feature = "v2_48", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_48")))] - fn get_dtls_client_connection_type(&self) -> glib::types::Type { + fn dtls_client_connection_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_tls_backend_get_dtls_client_connection_type( self.as_ref().to_glib_none().0, @@ -101,7 +101,7 @@ impl> TlsBackendExt for O { #[cfg(any(feature = "v2_48", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_48")))] - fn get_dtls_server_connection_type(&self) -> glib::types::Type { + fn dtls_server_connection_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_tls_backend_get_dtls_server_connection_type( self.as_ref().to_glib_none().0, @@ -109,7 +109,7 @@ impl> TlsBackendExt for O { } } - fn get_file_database_type(&self) -> glib::types::Type { + fn file_database_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_tls_backend_get_file_database_type( self.as_ref().to_glib_none().0, @@ -117,7 +117,7 @@ impl> TlsBackendExt for O { } } - fn get_server_connection_type(&self) -> glib::types::Type { + fn server_connection_type(&self) -> glib::types::Type { unsafe { from_glib(ffi::g_tls_backend_get_server_connection_type( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/tls_certificate.rs b/gio/src/auto/tls_certificate.rs index 037aa93c31a8..7badd232f66f 100644 --- a/gio/src/auto/tls_certificate.rs +++ b/gio/src/auto/tls_certificate.rs @@ -91,7 +91,7 @@ pub const NONE_TLS_CERTIFICATE: Option<&TlsCertificate> = None; pub trait TlsCertificateExt: 'static { #[doc(alias = "g_tls_certificate_get_issuer")] - fn get_issuer(&self) -> Option; + fn issuer(&self) -> Option; #[doc(alias = "g_tls_certificate_is_same")] fn is_same>(&self, cert_two: &P) -> bool; @@ -103,13 +103,15 @@ pub trait TlsCertificateExt: 'static { trusted_ca: Option<&Q>, ) -> TlsCertificateFlags; - fn get_property_certificate(&self) -> Option; + #[doc(alias = "get_property_certificate")] + fn certificate(&self) -> Option; - fn get_property_certificate_pem(&self) -> Option; + #[doc(alias = "get_property_certificate_pem")] + fn certificate_pem(&self) -> Option; } impl> TlsCertificateExt for O { - fn get_issuer(&self) -> Option { + fn issuer(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_certificate_get_issuer( self.as_ref().to_glib_none().0, @@ -140,7 +142,7 @@ impl> TlsCertificateExt for O { } } - fn get_property_certificate(&self) -> Option { + fn certificate(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -154,7 +156,7 @@ impl> TlsCertificateExt for O { } } - fn get_property_certificate_pem(&self) -> Option { + fn certificate_pem(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/tls_client_connection.rs b/gio/src/auto/tls_client_connection.rs index a79f34145f50..f107e4659d92 100644 --- a/gio/src/auto/tls_client_connection.rs +++ b/gio/src/auto/tls_client_connection.rs @@ -55,17 +55,17 @@ pub trait TlsClientConnectionExt: 'static { fn copy_session_state>(&self, source: &P); #[doc(alias = "g_tls_client_connection_get_accepted_cas")] - fn get_accepted_cas(&self) -> Vec; + fn accepted_cas(&self) -> Vec; #[doc(alias = "g_tls_client_connection_get_server_identity")] - fn get_server_identity(&self) -> Option; + fn server_identity(&self) -> Option; #[cfg_attr(feature = "v2_56", deprecated)] #[doc(alias = "g_tls_client_connection_get_use_ssl3")] - fn get_use_ssl3(&self) -> bool; + fn uses_ssl3(&self) -> bool; #[doc(alias = "g_tls_client_connection_get_validation_flags")] - fn get_validation_flags(&self) -> TlsCertificateFlags; + fn validation_flags(&self) -> TlsCertificateFlags; #[doc(alias = "g_tls_client_connection_set_server_identity")] fn set_server_identity>(&self, identity: &P); @@ -106,7 +106,7 @@ impl> TlsClientConnectionExt for O { } } - fn get_accepted_cas(&self) -> Vec { + fn accepted_cas(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_tls_client_connection_get_accepted_cas( self.as_ref().to_glib_none().0, @@ -114,7 +114,7 @@ impl> TlsClientConnectionExt for O { } } - fn get_server_identity(&self) -> Option { + fn server_identity(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_client_connection_get_server_identity( self.as_ref().to_glib_none().0, @@ -122,7 +122,7 @@ impl> TlsClientConnectionExt for O { } } - fn get_use_ssl3(&self) -> bool { + fn uses_ssl3(&self) -> bool { unsafe { from_glib(ffi::g_tls_client_connection_get_use_ssl3( self.as_ref().to_glib_none().0, @@ -130,7 +130,7 @@ impl> TlsClientConnectionExt for O { } } - fn get_validation_flags(&self) -> TlsCertificateFlags { + fn validation_flags(&self) -> TlsCertificateFlags { unsafe { from_glib(ffi::g_tls_client_connection_get_validation_flags( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/tls_connection.rs b/gio/src/auto/tls_connection.rs index 2382b5b903b8..659aaf3a4c37 100644 --- a/gio/src/auto/tls_connection.rs +++ b/gio/src/auto/tls_connection.rs @@ -41,31 +41,31 @@ pub trait TlsConnectionExt: 'static { ) -> bool; #[doc(alias = "g_tls_connection_get_certificate")] - fn get_certificate(&self) -> Option; + fn certificate(&self) -> Option; #[doc(alias = "g_tls_connection_get_database")] - fn get_database(&self) -> Option; + fn database(&self) -> Option; #[doc(alias = "g_tls_connection_get_interaction")] - fn get_interaction(&self) -> Option; + fn interaction(&self) -> Option; #[cfg(any(feature = "v2_60", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] #[doc(alias = "g_tls_connection_get_negotiated_protocol")] - fn get_negotiated_protocol(&self) -> Option; + fn negotiated_protocol(&self) -> Option; #[doc(alias = "g_tls_connection_get_peer_certificate")] - fn get_peer_certificate(&self) -> Option; + fn peer_certificate(&self) -> Option; #[doc(alias = "g_tls_connection_get_peer_certificate_errors")] - fn get_peer_certificate_errors(&self) -> TlsCertificateFlags; + fn peer_certificate_errors(&self) -> TlsCertificateFlags; #[cfg_attr(feature = "v2_60", deprecated)] #[doc(alias = "g_tls_connection_get_rehandshake_mode")] - fn get_rehandshake_mode(&self) -> TlsRehandshakeMode; + fn rehandshake_mode(&self) -> TlsRehandshakeMode; #[doc(alias = "g_tls_connection_get_require_close_notify")] - fn get_require_close_notify(&self) -> bool; + fn requires_close_notify(&self) -> bool; #[doc(alias = "g_tls_connection_handshake")] fn handshake>(&self, cancellable: Option<&P>) -> Result<(), glib::Error>; @@ -106,9 +106,11 @@ pub trait TlsConnectionExt: 'static { #[cfg(any(feature = "v2_60", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] - fn get_property_advertised_protocols(&self) -> Vec; + #[doc(alias = "get_property_advertised_protocols")] + fn advertised_protocols(&self) -> Vec; - fn get_property_base_io_stream(&self) -> Option; + #[doc(alias = "get_property_base_io_stream")] + fn base_io_stream(&self) -> Option; fn connect_accept_certificate< F: Fn(&Self, &TlsCertificate, TlsCertificateFlags) -> bool + 'static, @@ -174,7 +176,7 @@ impl> TlsConnectionExt for O { } } - fn get_certificate(&self) -> Option { + fn certificate(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_connection_get_certificate( self.as_ref().to_glib_none().0, @@ -182,7 +184,7 @@ impl> TlsConnectionExt for O { } } - fn get_database(&self) -> Option { + fn database(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_connection_get_database( self.as_ref().to_glib_none().0, @@ -190,7 +192,7 @@ impl> TlsConnectionExt for O { } } - fn get_interaction(&self) -> Option { + fn interaction(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_connection_get_interaction( self.as_ref().to_glib_none().0, @@ -200,7 +202,7 @@ impl> TlsConnectionExt for O { #[cfg(any(feature = "v2_60", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] - fn get_negotiated_protocol(&self) -> Option { + fn negotiated_protocol(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_connection_get_negotiated_protocol( self.as_ref().to_glib_none().0, @@ -208,7 +210,7 @@ impl> TlsConnectionExt for O { } } - fn get_peer_certificate(&self) -> Option { + fn peer_certificate(&self) -> Option { unsafe { from_glib_none(ffi::g_tls_connection_get_peer_certificate( self.as_ref().to_glib_none().0, @@ -216,7 +218,7 @@ impl> TlsConnectionExt for O { } } - fn get_peer_certificate_errors(&self) -> TlsCertificateFlags { + fn peer_certificate_errors(&self) -> TlsCertificateFlags { unsafe { from_glib(ffi::g_tls_connection_get_peer_certificate_errors( self.as_ref().to_glib_none().0, @@ -224,7 +226,7 @@ impl> TlsConnectionExt for O { } } - fn get_rehandshake_mode(&self) -> TlsRehandshakeMode { + fn rehandshake_mode(&self) -> TlsRehandshakeMode { unsafe { from_glib(ffi::g_tls_connection_get_rehandshake_mode( self.as_ref().to_glib_none().0, @@ -232,7 +234,7 @@ impl> TlsConnectionExt for O { } } - fn get_require_close_notify(&self) -> bool { + fn requires_close_notify(&self) -> bool { unsafe { from_glib(ffi::g_tls_connection_get_require_close_notify( self.as_ref().to_glib_none().0, @@ -365,7 +367,7 @@ impl> TlsConnectionExt for O { #[cfg(any(feature = "v2_60", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] - fn get_property_advertised_protocols(&self) -> Vec { + fn advertised_protocols(&self) -> Vec { unsafe { let mut value = glib::Value::from_type( as StaticType>::static_type()); @@ -381,7 +383,7 @@ impl> TlsConnectionExt for O { } } - fn get_property_base_io_stream(&self) -> Option { + fn base_io_stream(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/tls_file_database.rs b/gio/src/auto/tls_file_database.rs index 98345f8398bc..25a2b591d0ed 100644 --- a/gio/src/auto/tls_file_database.rs +++ b/gio/src/auto/tls_file_database.rs @@ -40,15 +40,17 @@ impl TlsFileDatabase { pub const NONE_TLS_FILE_DATABASE: Option<&TlsFileDatabase> = None; pub trait TlsFileDatabaseExt: 'static { - fn get_property_anchors(&self) -> Option; + #[doc(alias = "get_property_anchors")] + fn anchors(&self) -> Option; - fn set_property_anchors(&self, anchors: Option<&str>); + #[doc(alias = "set_property_anchors")] + fn set_anchors(&self, anchors: Option<&str>); fn connect_property_anchors_notify(&self, f: F) -> SignalHandlerId; } impl> TlsFileDatabaseExt for O { - fn get_property_anchors(&self) -> Option { + fn anchors(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -62,7 +64,7 @@ impl> TlsFileDatabaseExt for O { } } - fn set_property_anchors(&self, anchors: Option<&str>) { + fn set_anchors(&self, anchors: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gio/src/auto/tls_password.rs b/gio/src/auto/tls_password.rs index f0a8fa5af29e..6b74e0ab3aab 100644 --- a/gio/src/auto/tls_password.rs +++ b/gio/src/auto/tls_password.rs @@ -36,13 +36,13 @@ pub const NONE_TLS_PASSWORD: Option<&TlsPassword> = None; pub trait TlsPasswordExt: 'static { #[doc(alias = "g_tls_password_get_description")] - fn get_description(&self) -> glib::GString; + fn description(&self) -> glib::GString; #[doc(alias = "g_tls_password_get_flags")] - fn get_flags(&self) -> TlsPasswordFlags; + fn flags(&self) -> TlsPasswordFlags; #[doc(alias = "g_tls_password_get_warning")] - fn get_warning(&self) -> glib::GString; + fn warning(&self) -> glib::GString; #[doc(alias = "g_tls_password_set_description")] fn set_description(&self, description: &str); @@ -64,7 +64,7 @@ pub trait TlsPasswordExt: 'static { } impl> TlsPasswordExt for O { - fn get_description(&self) -> glib::GString { + fn description(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_tls_password_get_description( self.as_ref().to_glib_none().0, @@ -72,7 +72,7 @@ impl> TlsPasswordExt for O { } } - fn get_flags(&self) -> TlsPasswordFlags { + fn flags(&self) -> TlsPasswordFlags { unsafe { from_glib(ffi::g_tls_password_get_flags( self.as_ref().to_glib_none().0, @@ -80,7 +80,7 @@ impl> TlsPasswordExt for O { } } - fn get_warning(&self) -> glib::GString { + fn warning(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_tls_password_get_warning( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/tls_server_connection.rs b/gio/src/auto/tls_server_connection.rs index 2f5fea4983a8..f59334a853fa 100644 --- a/gio/src/auto/tls_server_connection.rs +++ b/gio/src/auto/tls_server_connection.rs @@ -50,9 +50,11 @@ impl TlsServerConnection { pub const NONE_TLS_SERVER_CONNECTION: Option<&TlsServerConnection> = None; pub trait TlsServerConnectionExt: 'static { - fn get_property_authentication_mode(&self) -> TlsAuthenticationMode; + #[doc(alias = "get_property_authentication_mode")] + fn authentication_mode(&self) -> TlsAuthenticationMode; - fn set_property_authentication_mode(&self, authentication_mode: TlsAuthenticationMode); + #[doc(alias = "set_property_authentication_mode")] + fn set_authentication_mode(&self, authentication_mode: TlsAuthenticationMode); fn connect_property_authentication_mode_notify( &self, @@ -61,7 +63,7 @@ pub trait TlsServerConnectionExt: 'static { } impl> TlsServerConnectionExt for O { - fn get_property_authentication_mode(&self) -> TlsAuthenticationMode { + fn authentication_mode(&self) -> TlsAuthenticationMode { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -77,7 +79,7 @@ impl> TlsServerConnectionExt for O { } } - fn set_property_authentication_mode(&self, authentication_mode: TlsAuthenticationMode) { + fn set_authentication_mode(&self, authentication_mode: TlsAuthenticationMode) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gio/src/auto/unix_fd_list.rs b/gio/src/auto/unix_fd_list.rs index 86898c4f9361..0423cb094605 100644 --- a/gio/src/auto/unix_fd_list.rs +++ b/gio/src/auto/unix_fd_list.rs @@ -31,11 +31,11 @@ pub const NONE_UNIX_FD_LIST: Option<&UnixFDList> = None; pub trait UnixFDListExt: 'static { #[doc(alias = "g_unix_fd_list_get_length")] - fn get_length(&self) -> i32; + fn length(&self) -> i32; } impl> UnixFDListExt for O { - fn get_length(&self) -> i32 { + fn length(&self) -> i32 { unsafe { ffi::g_unix_fd_list_get_length(self.as_ref().to_glib_none().0) } } } diff --git a/gio/src/auto/unix_input_stream.rs b/gio/src/auto/unix_input_stream.rs index def45951ae0e..abfe04cdc781 100644 --- a/gio/src/auto/unix_input_stream.rs +++ b/gio/src/auto/unix_input_stream.rs @@ -20,11 +20,11 @@ pub const NONE_UNIX_INPUT_STREAM: Option<&UnixInputStream> = None; pub trait UnixInputStreamExt: 'static { #[doc(alias = "g_unix_input_stream_get_close_fd")] - fn get_close_fd(&self) -> bool; + fn closes_fd(&self) -> bool; } impl> UnixInputStreamExt for O { - fn get_close_fd(&self) -> bool { + fn closes_fd(&self) -> bool { unsafe { from_glib(ffi::g_unix_input_stream_get_close_fd( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/unix_mount_point.rs b/gio/src/auto/unix_mount_point.rs index 0b2728469084..44eb4db23670 100644 --- a/gio/src/auto/unix_mount_point.rs +++ b/gio/src/auto/unix_mount_point.rs @@ -32,7 +32,7 @@ impl UnixMountPoint { } #[doc(alias = "g_unix_mount_point_get_device_path")] - pub fn get_device_path(&self) -> std::path::PathBuf { + pub fn device_path(&self) -> std::path::PathBuf { unsafe { from_glib_none(ffi::g_unix_mount_point_get_device_path(mut_override( self.to_glib_none().0, @@ -41,7 +41,7 @@ impl UnixMountPoint { } #[doc(alias = "g_unix_mount_point_get_fs_type")] - pub fn get_fs_type(&self) -> glib::GString { + pub fn fs_type(&self) -> glib::GString { unsafe { from_glib_none(ffi::g_unix_mount_point_get_fs_type(mut_override( self.to_glib_none().0, @@ -50,7 +50,7 @@ impl UnixMountPoint { } #[doc(alias = "g_unix_mount_point_get_mount_path")] - pub fn get_mount_path(&self) -> std::path::PathBuf { + pub fn mount_path(&self) -> std::path::PathBuf { unsafe { from_glib_none(ffi::g_unix_mount_point_get_mount_path(mut_override( self.to_glib_none().0, @@ -59,7 +59,7 @@ impl UnixMountPoint { } #[doc(alias = "g_unix_mount_point_get_options")] - pub fn get_options(&self) -> Option { + pub fn options(&self) -> Option { unsafe { from_glib_none(ffi::g_unix_mount_point_get_options(mut_override( self.to_glib_none().0, diff --git a/gio/src/auto/unix_output_stream.rs b/gio/src/auto/unix_output_stream.rs index fdbc82d6fc11..50c04eab298d 100644 --- a/gio/src/auto/unix_output_stream.rs +++ b/gio/src/auto/unix_output_stream.rs @@ -20,11 +20,11 @@ pub const NONE_UNIX_OUTPUT_STREAM: Option<&UnixOutputStream> = None; pub trait UnixOutputStreamExt: 'static { #[doc(alias = "g_unix_output_stream_get_close_fd")] - fn get_close_fd(&self) -> bool; + fn closes_fd(&self) -> bool; } impl> UnixOutputStreamExt for O { - fn get_close_fd(&self) -> bool { + fn closes_fd(&self) -> bool { unsafe { from_glib(ffi::g_unix_output_stream_get_close_fd( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/unix_socket_address.rs b/gio/src/auto/unix_socket_address.rs index add28f91db85..12ef5fa98e7c 100644 --- a/gio/src/auto/unix_socket_address.rs +++ b/gio/src/auto/unix_socket_address.rs @@ -42,21 +42,20 @@ pub const NONE_UNIX_SOCKET_ADDRESS: Option<&UnixSocketAddress> = None; pub trait UnixSocketAddressExt: 'static { #[doc(alias = "g_unix_socket_address_get_address_type")] - fn get_address_type(&self) -> UnixSocketAddressType; + fn address_type(&self) -> UnixSocketAddressType; #[doc(alias = "g_unix_socket_address_get_is_abstract")] - fn get_is_abstract(&self) -> bool; + fn is_abstract(&self) -> bool; #[doc(alias = "g_unix_socket_address_get_path_len")] - fn get_path_len(&self) -> usize; + fn path_len(&self) -> usize; - fn get_property_abstract(&self) -> bool; - - fn get_property_path_as_array(&self) -> Option; + #[doc(alias = "get_property_path_as_array")] + fn path_as_array(&self) -> Option; } impl> UnixSocketAddressExt for O { - fn get_address_type(&self) -> UnixSocketAddressType { + fn address_type(&self) -> UnixSocketAddressType { unsafe { from_glib(ffi::g_unix_socket_address_get_address_type( self.as_ref().to_glib_none().0, @@ -64,7 +63,7 @@ impl> UnixSocketAddressExt for O { } } - fn get_is_abstract(&self) -> bool { + fn is_abstract(&self) -> bool { unsafe { from_glib(ffi::g_unix_socket_address_get_is_abstract( self.as_ref().to_glib_none().0, @@ -72,26 +71,11 @@ impl> UnixSocketAddressExt for O { } } - fn get_path_len(&self) -> usize { + fn path_len(&self) -> usize { unsafe { ffi::g_unix_socket_address_get_path_len(self.as_ref().to_glib_none().0) } } - fn get_property_abstract(&self) -> bool { - unsafe { - let mut value = glib::Value::from_type(::static_type()); - glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, - b"abstract\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `abstract` getter") - .unwrap() - } - } - - fn get_property_path_as_array(&self) -> Option { + fn path_as_array(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/versions.txt b/gio/src/auto/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/gio/src/auto/versions.txt +++ b/gio/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/gio/src/auto/vfs.rs b/gio/src/auto/vfs.rs index b26711e5e968..f4216c95b35b 100644 --- a/gio/src/auto/vfs.rs +++ b/gio/src/auto/vfs.rs @@ -43,7 +43,7 @@ pub trait VfsExt: 'static { fn get_file_for_uri(&self, uri: &str) -> File; #[doc(alias = "g_vfs_get_supported_uri_schemes")] - fn get_supported_uri_schemes(&self) -> Vec; + fn supported_uri_schemes(&self) -> Vec; #[doc(alias = "g_vfs_is_active")] fn is_active(&self) -> bool; @@ -86,7 +86,7 @@ impl> VfsExt for O { } } - fn get_supported_uri_schemes(&self) -> Vec { + fn supported_uri_schemes(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::g_vfs_get_supported_uri_schemes( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/volume.rs b/gio/src/auto/volume.rs index 3d9a55cad669..aa296543dfc9 100644 --- a/gio/src/auto/volume.rs +++ b/gio/src/auto/volume.rs @@ -62,13 +62,13 @@ pub trait VolumeExt: 'static { fn enumerate_identifiers(&self) -> Vec; #[doc(alias = "g_volume_get_activation_root")] - fn get_activation_root(&self) -> Option; + fn activation_root(&self) -> Option; #[doc(alias = "g_volume_get_drive")] - fn get_drive(&self) -> Option; + fn drive(&self) -> Option; #[doc(alias = "g_volume_get_icon")] - fn get_icon(&self) -> Icon; + fn icon(&self) -> Icon; #[doc(alias = "g_volume_get_identifier")] fn get_identifier(&self, kind: &str) -> Option; @@ -77,16 +77,16 @@ pub trait VolumeExt: 'static { fn get_mount(&self) -> Option; #[doc(alias = "g_volume_get_name")] - fn get_name(&self) -> glib::GString; + fn name(&self) -> glib::GString; #[doc(alias = "g_volume_get_sort_key")] - fn get_sort_key(&self) -> Option; + fn sort_key(&self) -> Option; #[doc(alias = "g_volume_get_symbolic_icon")] - fn get_symbolic_icon(&self) -> Icon; + fn symbolic_icon(&self) -> Icon; #[doc(alias = "g_volume_get_uuid")] - fn get_uuid(&self) -> Option; + fn uuid(&self) -> Option; #[doc(alias = "g_volume_mount")] fn mount< @@ -199,7 +199,7 @@ impl> VolumeExt for O { } } - fn get_activation_root(&self) -> Option { + fn activation_root(&self) -> Option { unsafe { from_glib_full(ffi::g_volume_get_activation_root( self.as_ref().to_glib_none().0, @@ -207,11 +207,11 @@ impl> VolumeExt for O { } } - fn get_drive(&self) -> Option { + fn drive(&self) -> Option { unsafe { from_glib_full(ffi::g_volume_get_drive(self.as_ref().to_glib_none().0)) } } - fn get_icon(&self) -> Icon { + fn icon(&self) -> Icon { unsafe { from_glib_full(ffi::g_volume_get_icon(self.as_ref().to_glib_none().0)) } } @@ -228,15 +228,15 @@ impl> VolumeExt for O { unsafe { from_glib_full(ffi::g_volume_get_mount(self.as_ref().to_glib_none().0)) } } - fn get_name(&self) -> glib::GString { + fn name(&self) -> glib::GString { unsafe { from_glib_full(ffi::g_volume_get_name(self.as_ref().to_glib_none().0)) } } - fn get_sort_key(&self) -> Option { + fn sort_key(&self) -> Option { unsafe { from_glib_none(ffi::g_volume_get_sort_key(self.as_ref().to_glib_none().0)) } } - fn get_symbolic_icon(&self) -> Icon { + fn symbolic_icon(&self) -> Icon { unsafe { from_glib_full(ffi::g_volume_get_symbolic_icon( self.as_ref().to_glib_none().0, @@ -244,7 +244,7 @@ impl> VolumeExt for O { } } - fn get_uuid(&self) -> Option { + fn uuid(&self) -> Option { unsafe { from_glib_full(ffi::g_volume_get_uuid(self.as_ref().to_glib_none().0)) } } diff --git a/gio/src/auto/volume_monitor.rs b/gio/src/auto/volume_monitor.rs index ce1823eea575..ed807004586b 100644 --- a/gio/src/auto/volume_monitor.rs +++ b/gio/src/auto/volume_monitor.rs @@ -33,19 +33,19 @@ pub const NONE_VOLUME_MONITOR: Option<&VolumeMonitor> = None; pub trait VolumeMonitorExt: 'static { #[doc(alias = "g_volume_monitor_get_connected_drives")] - fn get_connected_drives(&self) -> Vec; + fn connected_drives(&self) -> Vec; #[doc(alias = "g_volume_monitor_get_mount_for_uuid")] fn get_mount_for_uuid(&self, uuid: &str) -> Option; #[doc(alias = "g_volume_monitor_get_mounts")] - fn get_mounts(&self) -> Vec; + fn mounts(&self) -> Vec; #[doc(alias = "g_volume_monitor_get_volume_for_uuid")] fn get_volume_for_uuid(&self, uuid: &str) -> Option; #[doc(alias = "g_volume_monitor_get_volumes")] - fn get_volumes(&self) -> Vec; + fn volumes(&self) -> Vec; fn connect_drive_changed(&self, f: F) -> SignalHandlerId; @@ -73,7 +73,7 @@ pub trait VolumeMonitorExt: 'static { } impl> VolumeMonitorExt for O { - fn get_connected_drives(&self) -> Vec { + fn connected_drives(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_volume_monitor_get_connected_drives( self.as_ref().to_glib_none().0, @@ -90,7 +90,7 @@ impl> VolumeMonitorExt for O { } } - fn get_mounts(&self) -> Vec { + fn mounts(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_volume_monitor_get_mounts( self.as_ref().to_glib_none().0, @@ -107,7 +107,7 @@ impl> VolumeMonitorExt for O { } } - fn get_volumes(&self) -> Vec { + fn volumes(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::g_volume_monitor_get_volumes( self.as_ref().to_glib_none().0, diff --git a/gio/src/auto/zlib_compressor.rs b/gio/src/auto/zlib_compressor.rs index 658234784275..814ab142ff50 100644 --- a/gio/src/auto/zlib_compressor.rs +++ b/gio/src/auto/zlib_compressor.rs @@ -29,7 +29,7 @@ impl ZlibCompressor { } #[doc(alias = "g_zlib_compressor_get_file_info")] - pub fn get_file_info(&self) -> Option { + pub fn file_info(&self) -> Option { unsafe { from_glib_none(ffi::g_zlib_compressor_get_file_info(self.to_glib_none().0)) } } @@ -40,7 +40,8 @@ impl ZlibCompressor { } } - pub fn get_property_format(&self) -> ZlibCompressorFormat { + #[doc(alias = "get_property_format")] + pub fn format(&self) -> ZlibCompressorFormat { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -56,7 +57,8 @@ impl ZlibCompressor { } } - pub fn get_property_level(&self) -> i32 { + #[doc(alias = "get_property_level")] + pub fn level(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gio/src/auto/zlib_decompressor.rs b/gio/src/auto/zlib_decompressor.rs index 68038cbf7db7..703b118f044e 100644 --- a/gio/src/auto/zlib_decompressor.rs +++ b/gio/src/auto/zlib_decompressor.rs @@ -29,7 +29,7 @@ impl ZlibDecompressor { } #[doc(alias = "g_zlib_decompressor_get_file_info")] - pub fn get_file_info(&self) -> Option { + pub fn file_info(&self) -> Option { unsafe { from_glib_none(ffi::g_zlib_decompressor_get_file_info( self.to_glib_none().0, @@ -37,7 +37,8 @@ impl ZlibDecompressor { } } - pub fn get_property_format(&self) -> ZlibCompressorFormat { + #[doc(alias = "get_property_format")] + pub fn format(&self) -> ZlibCompressorFormat { unsafe { let mut value = glib::Value::from_type(::static_type()); diff --git a/gio/src/file_info.rs b/gio/src/file_info.rs index 001d2eb011c3..3563b7463221 100644 --- a/gio/src/file_info.rs +++ b/gio/src/file_info.rs @@ -8,7 +8,7 @@ use std::time::{Duration, SystemTime}; impl FileInfo { #[cfg_attr(feature = "v2_62", deprecated)] #[doc(alias = "g_file_info_get_modification_time")] - pub fn get_modification_time(&self) -> SystemTime { + pub fn modification_time(&self) -> SystemTime { unsafe { let mut result = mem::MaybeUninit::uninit(); ffi::g_file_info_get_modification_time(self.to_glib_none().0, result.as_mut_ptr()); diff --git a/gio/src/inet_address.rs b/gio/src/inet_address.rs index c0aba46be572..072363a01613 100644 --- a/gio/src/inet_address.rs +++ b/gio/src/inet_address.rs @@ -52,7 +52,7 @@ impl> InetAddressExtManual for O { /// Returns `None` in case the address has a native size different than 4 and 16. #[doc(alias = "g_inet_address_to_bytes")] fn to_bytes(&self) -> Option> { - let size = self.get_native_size(); + let size = self.native_size(); unsafe { let bytes = ffi::g_inet_address_to_bytes(self.as_ref().to_glib_none().0); if size == 4 { @@ -77,7 +77,7 @@ impl From for InetAddress { impl From for IpAddr { fn from(addr: InetAddress) -> IpAddr { - let size = addr.get_native_size(); + let size = addr.native_size(); unsafe { let bytes = ffi::g_inet_address_to_bytes(addr.to_glib_none().0); if size == 4 { diff --git a/gio/src/inet_socket_address.rs b/gio/src/inet_socket_address.rs index a73d185fadcd..34f6263a6901 100644 --- a/gio/src/inet_socket_address.rs +++ b/gio/src/inet_socket_address.rs @@ -14,6 +14,6 @@ impl From for InetSocketAddress { impl From for SocketAddr { fn from(addr: InetSocketAddress) -> Self { - SocketAddr::new(addr.get_address().into(), addr.get_port()) + SocketAddr::new(addr.address().into(), addr.port()) } } diff --git a/gio/src/input_stream.rs b/gio/src/input_stream.rs index fdc374c69ada..3bc6afb5c813 100644 --- a/gio/src/input_stream.rs +++ b/gio/src/input_stream.rs @@ -377,7 +377,7 @@ impl State { } } - fn get_pending( + fn pending( &mut self, ) -> &mut Pin< Box< @@ -434,10 +434,10 @@ impl> InputStreamAsyncBufRead { _ => panic!("Invalid state"), }; - self.state.get_pending() + self.state.pending() } - fn get_data(&self) -> Poll> { + fn data(&self) -> Poll> { if let State::HasData { ref buffer, valid: (i, j), @@ -470,7 +470,7 @@ impl> InputStreamAsyncBufRead { io::ErrorKind::from(kind), BufReadError::Failed, ))), - State::HasData { .. } => self.get_data(), + State::HasData { .. } => self.data(), State::Transitioning => panic!("Invalid state"), State::Waiting { .. } | State::Reading { .. } => { let pending = self.set_reading(); @@ -481,7 +481,7 @@ impl> InputStreamAsyncBufRead { Poll::Ready(Ok(&[])) } else { self.set_has_data(buffer, (0, res)); - self.get_data() + self.data() } } Poll::Ready(Err((_, err))) => { diff --git a/gio/src/io_stream.rs b/gio/src/io_stream.rs index ca8a3f81a779..1b6ec88f5322 100644 --- a/gio/src/io_stream.rs +++ b/gio/src/io_stream.rs @@ -17,13 +17,13 @@ use std::pin::Pin; pub trait IOStreamExtManual: Sized + IsA { fn into_async_read_write(self) -> Result, Self> { let write = self - .get_output_stream() + .output_stream() .dynamic_cast::() .ok() .and_then(|s| s.into_async_write().ok()); let read = self - .get_input_stream() + .input_stream() .dynamic_cast::() .ok() .and_then(|s| s.into_async_read().ok()); diff --git a/gio/src/memory_output_stream.rs b/gio/src/memory_output_stream.rs index 041052fa9069..4e79a09a23d6 100644 --- a/gio/src/memory_output_stream.rs +++ b/gio/src/memory_output_stream.rs @@ -8,7 +8,7 @@ mod tests { #[test] fn steal_empty() { let strm = MemoryOutputStream::new_resizable(); - assert_eq!(strm.get_data_size(), 0); + assert_eq!(strm.data_size(), 0); assert!(strm.close(crate::NONE_CANCELLABLE).is_ok()); assert_eq!(strm.steal_as_bytes(), [].as_ref()); @@ -19,10 +19,10 @@ mod tests { let strm = MemoryOutputStream::new_resizable(); assert!(strm.write(&[1, 2, 3], crate::NONE_CANCELLABLE).is_ok()); - assert_eq!(strm.get_data_size(), 3); + assert_eq!(strm.data_size(), 3); assert!(strm.write(&[4, 5], crate::NONE_CANCELLABLE).is_ok()); - assert_eq!(strm.get_data_size(), 5); + assert_eq!(strm.data_size(), 5); assert!(strm.close(crate::NONE_CANCELLABLE).is_ok()); assert_eq!(strm.steal_as_bytes(), [1, 2, 3, 4, 5].as_ref()); diff --git a/gio/src/subclass/action_group.rs b/gio/src/subclass/action_group.rs index 9caa96536a01..48886ce8eede 100644 --- a/gio/src/subclass/action_group.rs +++ b/gio/src/subclass/action_group.rs @@ -38,7 +38,7 @@ pub trait ActionGroupImpl: ObjectImpl { self.parent_change_action_state(action_group, action_name, value) } - fn get_action_enabled(&self, action_group: &Self::Type, action_name: &str) -> bool { + fn is_action_enabled(&self, action_group: &Self::Type, action_name: &str) -> bool { self.parent_get_action_enabled(action_group, action_name) } @@ -525,7 +525,7 @@ unsafe extern "C" fn action_group_has_action( ) -> glib::ffi::gboolean { let instance = &*(action_group as *mut T::Instance); let action_name = GString::from_glib_borrow(action_nameptr); - let imp = instance.get_impl(); + let imp = instance.impl_(); imp.has_action( from_glib_borrow::<_, ActionGroup>(action_group).unsafe_cast_ref(), @@ -539,10 +539,10 @@ unsafe extern "C" fn action_group_get_action_enabled( action_nameptr: *const libc::c_char, ) -> glib::ffi::gboolean { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); - imp.get_action_enabled( + imp.is_action_enabled( from_glib_borrow::<_, ActionGroup>(action_group).unsafe_cast_ref(), &action_name, ) @@ -557,7 +557,7 @@ unsafe extern "C" fn action_group_get_action_parameter_type( action_nameptr: *const libc::c_char, ) -> *const glib::ffi::GVariantType { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); let wrap = from_glib_borrow::<_, ActionGroup>(action_group); @@ -580,7 +580,7 @@ unsafe extern "C" fn action_group_get_action_state_type( action_nameptr: *const libc::c_char, ) -> *const glib::ffi::GVariantType { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); let wrap = from_glib_borrow::<_, ActionGroup>(action_group); @@ -603,7 +603,7 @@ unsafe extern "C" fn action_group_get_action_state_hint( action_nameptr: *const libc::c_char, ) -> *mut glib::ffi::GVariant { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); let wrap = from_glib_borrow::<_, ActionGroup>(action_group); @@ -625,7 +625,7 @@ unsafe extern "C" fn action_group_get_action_state( action_nameptr: *const libc::c_char, ) -> *mut glib::ffi::GVariant { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); let wrap = from_glib_borrow::<_, ActionGroup>(action_group); @@ -645,7 +645,7 @@ unsafe extern "C" fn action_group_change_action_state( stateptr: *mut glib::ffi::GVariant, ) { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); let state = Variant::from_glib_borrow(stateptr); @@ -662,7 +662,7 @@ unsafe extern "C" fn action_group_activate_action( parameterptr: *mut glib::ffi::GVariant, ) { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); let param: Borrowed> = from_glib_borrow(parameterptr); @@ -678,7 +678,7 @@ unsafe extern "C" fn action_group_action_added( action_nameptr: *const libc::c_char, ) { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); imp.action_added( @@ -692,7 +692,7 @@ unsafe extern "C" fn action_group_action_removed( action_nameptr: *const libc::c_char, ) { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); imp.action_removed( @@ -707,7 +707,7 @@ unsafe extern "C" fn action_group_action_enabled_changed( enabled: glib::ffi::gboolean, ) { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); imp.action_enabled_changed( @@ -723,7 +723,7 @@ unsafe extern "C" fn action_group_action_state_changed( stateptr: *mut glib::ffi::GVariant, ) { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); let state = Variant::from_glib_borrow(stateptr); @@ -741,7 +741,7 @@ unsafe extern "C" fn action_group_list_actions( action_group: *mut ffi::GActionGroup, ) -> *mut *mut libc::c_char { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap = from_glib_borrow::<_, ActionGroup>(action_group); let actions = imp.list_actions(wrap.unsafe_cast_ref()); @@ -775,7 +775,7 @@ unsafe extern "C" fn action_group_query_action( state: *mut *mut glib::ffi::GVariant, ) -> glib::ffi::gboolean { let instance = &*(action_group as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); let wrap = from_glib_borrow::<_, ActionGroup>(action_group); diff --git a/gio/src/subclass/action_map.rs b/gio/src/subclass/action_map.rs index 70169e3be1a4..cd9acc2ede87 100644 --- a/gio/src/subclass/action_map.rs +++ b/gio/src/subclass/action_map.rs @@ -94,7 +94,7 @@ unsafe extern "C" fn action_map_lookup_action( ) -> *mut ffi::GAction { let instance = &*(action_map as *mut T::Instance); let action_name = GString::from_glib_borrow(action_nameptr); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap = from_glib_borrow::<_, ActionMap>(action_map); let ret = imp.lookup_action(wrap.unsafe_cast_ref(), &action_name); @@ -118,7 +118,7 @@ unsafe extern "C" fn action_map_add_action( actionptr: *mut ffi::GAction, ) { let instance = &*(action_map as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action: Borrowed = from_glib_borrow(actionptr); imp.add_action( @@ -132,7 +132,7 @@ unsafe extern "C" fn action_map_remove_action( action_nameptr: *const libc::c_char, ) { let instance = &*(action_map as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let action_name = GString::from_glib_borrow(action_nameptr); imp.remove_action( diff --git a/gio/src/subclass/application.rs b/gio/src/subclass/application.rs index 91c790b9c66b..102836f69f49 100644 --- a/gio/src/subclass/application.rs +++ b/gio/src/subclass/application.rs @@ -150,7 +150,7 @@ impl ApplicationImplExt for T { fn parent_activate(&self, application: &Self::Type) { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GApplicationClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GApplicationClass; let f = (*parent_class) .activate .expect("No parent class implementation for \"activate\""); @@ -164,7 +164,7 @@ impl ApplicationImplExt for T { fn parent_after_emit(&self, application: &Self::Type, platform_data: &glib::Variant) { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GApplicationClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GApplicationClass; let f = (*parent_class) .after_emit .expect("No parent class implementation for \"after_emit\""); @@ -181,7 +181,7 @@ impl ApplicationImplExt for T { fn parent_before_emit(&self, application: &Self::Type, platform_data: &glib::Variant) { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GApplicationClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GApplicationClass; let f = (*parent_class) .before_emit .expect("No parent class implementation for \"before_emit\""); @@ -202,7 +202,7 @@ impl ApplicationImplExt for T { ) -> i32 { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GApplicationClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GApplicationClass; let f = (*parent_class) .command_line .expect("No parent class implementation for \"command_line\""); @@ -223,7 +223,7 @@ impl ApplicationImplExt for T { ) -> Option { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GApplicationClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GApplicationClass; let f = (*parent_class) .local_command_line .expect("No parent class implementation for \"local_command_line\""); @@ -249,7 +249,7 @@ impl ApplicationImplExt for T { fn parent_open(&self, application: &Self::Type, files: &[crate::File], hint: &str) { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GApplicationClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GApplicationClass; let f = (*parent_class) .open .expect("No parent class implementation for \"open\""); @@ -268,7 +268,7 @@ impl ApplicationImplExt for T { fn parent_quit_mainloop(&self, application: &Self::Type) { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GApplicationClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GApplicationClass; let f = (*parent_class) .quit_mainloop .expect("No parent class implementation for \"quit_mainloop\""); @@ -282,7 +282,7 @@ impl ApplicationImplExt for T { fn parent_run_mainloop(&self, application: &Self::Type) { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GApplicationClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GApplicationClass; let f = (*parent_class) .run_mainloop .expect("No parent class implementation for \"run_mainloop\""); @@ -296,7 +296,7 @@ impl ApplicationImplExt for T { fn parent_shutdown(&self, application: &Self::Type) { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GApplicationClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GApplicationClass; let f = (*parent_class) .shutdown .expect("No parent class implementation for \"shutdown\""); @@ -310,7 +310,7 @@ impl ApplicationImplExt for T { fn parent_startup(&self, application: &Self::Type) { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GApplicationClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GApplicationClass; let f = (*parent_class) .startup .expect("No parent class implementation for \"startup\""); @@ -324,7 +324,7 @@ impl ApplicationImplExt for T { fn parent_handle_local_options(&self, application: &Self::Type, options: &VariantDict) -> i32 { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GApplicationClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GApplicationClass; if let Some(f) = (*parent_class).handle_local_options { f( application @@ -366,7 +366,7 @@ unsafe impl IsSubclassable for Application { unsafe extern "C" fn application_activate(ptr: *mut ffi::GApplication) { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); imp.activate(wrap.unsafe_cast_ref()) @@ -377,7 +377,7 @@ unsafe extern "C" fn application_after_emit( platform_data: *mut glib::ffi::GVariant, ) { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); imp.after_emit(wrap.unsafe_cast_ref(), &from_glib_borrow(platform_data)) @@ -387,7 +387,7 @@ unsafe extern "C" fn application_before_emit( platform_data: *mut glib::ffi::GVariant, ) { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); imp.before_emit(wrap.unsafe_cast_ref(), &from_glib_borrow(platform_data)) @@ -397,7 +397,7 @@ unsafe extern "C" fn application_command_line( command_line: *mut ffi::GApplicationCommandLine, ) -> i32 { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); imp.command_line(wrap.unsafe_cast_ref(), &from_glib_borrow(command_line)) @@ -408,7 +408,7 @@ unsafe extern "C" fn application_local_command_line( exit_status: *mut i32, ) -> glib::ffi::gboolean { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); let mut args = ArgumentList::new(arguments); @@ -430,7 +430,7 @@ unsafe extern "C" fn application_open( hint: *const c_char, ) { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); let files: Vec = FromGlibContainer::from_glib_none_num(files, num_files as usize); @@ -442,28 +442,28 @@ unsafe extern "C" fn application_open( } unsafe extern "C" fn application_quit_mainloop(ptr: *mut ffi::GApplication) { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); imp.quit_mainloop(wrap.unsafe_cast_ref()) } unsafe extern "C" fn application_run_mainloop(ptr: *mut ffi::GApplication) { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); imp.run_mainloop(wrap.unsafe_cast_ref()) } unsafe extern "C" fn application_shutdown(ptr: *mut ffi::GApplication) { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); imp.shutdown(wrap.unsafe_cast_ref()) } unsafe extern "C" fn application_startup(ptr: *mut ffi::GApplication) { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); imp.startup(wrap.unsafe_cast_ref()) @@ -474,7 +474,7 @@ unsafe extern "C" fn application_handle_local_options( options: *mut glib::ffi::GVariantDict, ) -> c_int { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); imp.handle_local_options(wrap.unsafe_cast_ref(), &from_glib_borrow(options)) @@ -532,7 +532,7 @@ mod tests { _application: &Self::Type, cmd_line: &crate::ApplicationCommandLine, ) -> i32 { - let arguments = cmd_line.get_arguments(); + let arguments = cmd_line.arguments(); for arg in arguments { // TODO: we need https://github.com/rust-lang/rust/issues/49802 diff --git a/gio/src/subclass/input_stream.rs b/gio/src/subclass/input_stream.rs index e45323af6495..39f694353919 100644 --- a/gio/src/subclass/input_stream.rs +++ b/gio/src/subclass/input_stream.rs @@ -65,7 +65,7 @@ impl InputStreamImplExt for T { ) -> Result { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GInputStreamClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GInputStreamClass; let f = (*parent_class) .read_fn .expect("No parent class implementation for \"read\""); @@ -95,7 +95,7 @@ impl InputStreamImplExt for T { ) -> Result<(), Error> { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GInputStreamClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GInputStreamClass; let mut err = ptr::null_mut(); if let Some(f) = (*parent_class).close_fn { if from_glib(f( @@ -121,7 +121,7 @@ impl InputStreamImplExt for T { ) -> Result { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GInputStreamClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GInputStreamClass; let mut err = ptr::null_mut(); let f = (*parent_class) .skip @@ -172,7 +172,7 @@ unsafe extern "C" fn stream_read( assert!(count <= isize::MAX as usize); let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); match imp.read( @@ -200,7 +200,7 @@ unsafe extern "C" fn stream_close( err: *mut *mut glib::ffi::GError, ) -> glib::ffi::gboolean { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); match imp.close( @@ -228,7 +228,7 @@ unsafe extern "C" fn stream_skip( assert!(count <= isize::MAX as usize); let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); match imp.skip( diff --git a/gio/src/subclass/io_stream.rs b/gio/src/subclass/io_stream.rs index e7b30e1b901c..e54c624529a8 100644 --- a/gio/src/subclass/io_stream.rs +++ b/gio/src/subclass/io_stream.rs @@ -43,7 +43,7 @@ impl IOStreamImplExt for T { fn parent_get_input_stream(&self, stream: &Self::Type) -> InputStream { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GIOStreamClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GIOStreamClass; let f = (*parent_class) .get_input_stream .expect("No parent class implementation for \"get_input_stream\""); @@ -54,7 +54,7 @@ impl IOStreamImplExt for T { fn parent_get_output_stream(&self, stream: &Self::Type) -> OutputStream { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GIOStreamClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GIOStreamClass; let f = (*parent_class) .get_output_stream .expect("No parent class implementation for \"get_output_stream\""); @@ -69,7 +69,7 @@ impl IOStreamImplExt for T { ) -> Result<(), Error> { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GIOStreamClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GIOStreamClass; let mut err = ptr::null_mut(); if let Some(f) = (*parent_class).close_fn { if from_glib(f( @@ -112,7 +112,7 @@ unsafe extern "C" fn stream_get_input_stream( ptr: *mut ffi::GIOStream, ) -> *mut ffi::GInputStream { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); let ret = imp.get_input_stream(wrap.unsafe_cast_ref()); @@ -135,7 +135,7 @@ unsafe extern "C" fn stream_get_output_stream( ptr: *mut ffi::GIOStream, ) -> *mut ffi::GOutputStream { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); let ret = imp.get_output_stream(wrap.unsafe_cast_ref()); @@ -160,7 +160,7 @@ unsafe extern "C" fn stream_close( err: *mut *mut glib::ffi::GError, ) -> glib::ffi::gboolean { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); match imp.close( diff --git a/gio/src/subclass/list_model.rs b/gio/src/subclass/list_model.rs index 72880ec2afee..c156acbc7c48 100644 --- a/gio/src/subclass/list_model.rs +++ b/gio/src/subclass/list_model.rs @@ -89,7 +89,7 @@ where ::Type: IsA, { let instance = &*(list_model as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap = from_glib_borrow::<_, ListModel>(list_model); let type_ = imp.get_item_type(wrap.unsafe_cast_ref()).to_glib(); @@ -117,7 +117,7 @@ where ::Type: IsA, { let instance = &*(list_model as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); imp.get_n_items(from_glib_borrow::<_, ListModel>(list_model).unsafe_cast_ref()) } @@ -130,7 +130,7 @@ where ::Type: IsA, { let instance = &*(list_model as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap = from_glib_borrow::<_, ListModel>(list_model); let item = imp.get_item(wrap.unsafe_cast_ref(), position); @@ -138,7 +138,7 @@ where if let Some(ref i) = item { let type_ = imp.get_item_type(wrap.unsafe_cast_ref()); assert!( - type_.is_a(i.get_type()), + type_.is_a(i.type_()), "All ListModel items should be of the same type" ); }; diff --git a/gio/src/subclass/output_stream.rs b/gio/src/subclass/output_stream.rs index 552f5b9008bc..1c3ead72111c 100644 --- a/gio/src/subclass/output_stream.rs +++ b/gio/src/subclass/output_stream.rs @@ -79,7 +79,7 @@ impl OutputStreamImplExt for T { ) -> Result { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GOutputStreamClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GOutputStreamClass; let f = (*parent_class) .write_fn .expect("No parent class implementation for \"write\""); @@ -109,7 +109,7 @@ impl OutputStreamImplExt for T { ) -> Result<(), Error> { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GOutputStreamClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GOutputStreamClass; let mut err = ptr::null_mut(); if let Some(f) = (*parent_class).close_fn { if from_glib(f( @@ -134,7 +134,7 @@ impl OutputStreamImplExt for T { ) -> Result<(), Error> { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GOutputStreamClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GOutputStreamClass; let mut err = ptr::null_mut(); if let Some(f) = (*parent_class).flush { if from_glib(f( @@ -161,7 +161,7 @@ impl OutputStreamImplExt for T { ) -> Result { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut ffi::GOutputStreamClass; + let parent_class = data.as_ref().parent_class() as *mut ffi::GOutputStreamClass; let mut err = ptr::null_mut(); let f = (*parent_class) .splice @@ -213,7 +213,7 @@ unsafe extern "C" fn stream_write( assert!(count <= isize::MAX as usize); let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); match imp.write( @@ -241,7 +241,7 @@ unsafe extern "C" fn stream_close( err: *mut *mut glib::ffi::GError, ) -> glib::ffi::gboolean { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); match imp.close( @@ -264,7 +264,7 @@ unsafe extern "C" fn stream_flush( err: *mut *mut glib::ffi::GError, ) -> glib::ffi::gboolean { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); match imp.flush( @@ -289,7 +289,7 @@ unsafe extern "C" fn stream_splice( err: *mut *mut glib::ffi::GError, ) -> isize { let instance = &*(ptr as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let wrap: Borrowed = from_glib_borrow(ptr); match imp.splice( diff --git a/gio/src/subclass/seekable.rs b/gio/src/subclass/seekable.rs index 168cee765ae5..75b30e379ffe 100644 --- a/gio/src/subclass/seekable.rs +++ b/gio/src/subclass/seekable.rs @@ -173,7 +173,7 @@ unsafe impl IsImplementable for Seekable { unsafe extern "C" fn seekable_tell(seekable: *mut ffi::GSeekable) -> i64 { let instance = &*(seekable as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); imp.tell(from_glib_borrow::<_, Seekable>(seekable).unsafe_cast_ref()) } @@ -182,7 +182,7 @@ unsafe extern "C" fn seekable_can_seek( seekable: *mut ffi::GSeekable, ) -> glib::ffi::gboolean { let instance = &*(seekable as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); imp.can_seek(from_glib_borrow::<_, Seekable>(seekable).unsafe_cast_ref()) .to_glib() @@ -196,7 +196,7 @@ unsafe extern "C" fn seekable_seek( err: *mut *mut glib::ffi::GError, ) -> glib::ffi::gboolean { let instance = &*(seekable as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); match imp.seek( from_glib_borrow::<_, Seekable>(seekable).unsafe_cast_ref(), @@ -218,7 +218,7 @@ unsafe extern "C" fn seekable_can_truncate( seekable: *mut ffi::GSeekable, ) -> glib::ffi::gboolean { let instance = &*(seekable as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); imp.can_truncate(from_glib_borrow::<_, Seekable>(seekable).unsafe_cast_ref()) .to_glib() @@ -231,7 +231,7 @@ unsafe extern "C" fn seekable_truncate( err: *mut *mut glib::ffi::GError, ) -> glib::ffi::gboolean { let instance = &*(seekable as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); match imp.truncate( from_glib_borrow::<_, Seekable>(seekable).unsafe_cast_ref(), diff --git a/gio/src/task.rs b/gio/src/task.rs index 234eef388630..e2839d00cb19 100644 --- a/gio/src/task.rs +++ b/gio/src/task.rs @@ -45,7 +45,7 @@ impl Task { } } - pub fn get_priority(&self) -> glib::source::Priority { + pub fn priority(&self) -> glib::source::Priority { unsafe { FromGlib::from_glib(ffi::g_task_get_priority(self.to_glib_none().0)) } } @@ -148,7 +148,7 @@ mod test { glib::Object::new(&[]).expect("Failed to create MySimpleObject") } - pub fn get_size(&self) -> Option { + pub fn size(&self) -> Option { let imp = MySimpleObjectPrivate::from_instance(self); *imp.size.borrow() } @@ -189,7 +189,7 @@ mod test { .downcast::() .unwrap(); - assert!(o.get_size() == Some(100)); + assert!(o.size() == Some(100)); } } } diff --git a/gio/src/unix_mount_entry.rs b/gio/src/unix_mount_entry.rs index 1affa6f8f2b4..a7a01fa0a0d8 100644 --- a/gio/src/unix_mount_entry.rs +++ b/gio/src/unix_mount_entry.rs @@ -59,7 +59,7 @@ impl UnixMountEntry { } #[doc(alias = "g_unix_mount_get_device_path")] - pub fn get_device_path(&self) -> Option { + pub fn device_path(&self) -> Option { unsafe { from_glib_none(ffi::g_unix_mount_get_device_path(mut_override( self.to_glib_none().0, @@ -68,7 +68,7 @@ impl UnixMountEntry { } #[doc(alias = "g_unix_mount_get_fs_type")] - pub fn get_fs_type(&self) -> Option { + pub fn fs_type(&self) -> Option { unsafe { from_glib_none(ffi::g_unix_mount_get_fs_type(mut_override( self.to_glib_none().0, @@ -88,7 +88,7 @@ impl UnixMountEntry { #[cfg(any(feature = "v2_58", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_58")))] #[doc(alias = "g_unix_mount_get_options")] - pub fn get_options(&self) -> Option { + pub fn options(&self) -> Option { unsafe { from_glib_none(ffi::g_unix_mount_get_options(mut_override( self.to_glib_none().0, @@ -99,7 +99,7 @@ impl UnixMountEntry { #[cfg(any(feature = "v2_60", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_60")))] #[doc(alias = "g_unix_mount_get_root_path")] - pub fn get_root_path(&self) -> Option { + pub fn root_path(&self) -> Option { unsafe { from_glib_none(ffi::g_unix_mount_get_root_path(mut_override( self.to_glib_none().0, diff --git a/gio/src/unix_socket_address.rs b/gio/src/unix_socket_address.rs index f27dd58d77c1..26d384d74179 100644 --- a/gio/src/unix_socket_address.rs +++ b/gio/src/unix_socket_address.rs @@ -70,11 +70,11 @@ impl UnixSocketAddress { pub trait UnixSocketAddressExtManual { #[doc(alias = "g_unix_socket_address_get_path")] - fn get_path(&self) -> Option; + fn path(&self) -> Option; } impl> UnixSocketAddressExtManual for O { - fn get_path(&self) -> Option { + fn path(&self) -> Option { use self::UnixSocketAddressPath::*; let path = unsafe { @@ -82,10 +82,10 @@ impl> UnixSocketAddressExtManual for O { if path.is_null() { &[] } else { - slice::from_raw_parts(path as *const u8, self.get_path_len()) + slice::from_raw_parts(path as *const u8, self.path_len()) } }; - match self.get_address_type() { + match self.address_type() { UnixSocketAddressType::Anonymous => Some(Anonymous), #[cfg(not(feature = "dox"))] UnixSocketAddressType::Path => Some(Path(path::Path::new(OsStr::from_bytes(path)))), diff --git a/gio/src/win32_input_stream.rs b/gio/src/win32_input_stream.rs index 08e00e6c7863..fb0d895ea4aa 100644 --- a/gio/src/win32_input_stream.rs +++ b/gio/src/win32_input_stream.rs @@ -19,11 +19,11 @@ pub const NONE_WIN32_INPUT_STREAM: Option<&Win32InputStream> = None; pub trait Win32InputStreamExt: 'static { #[doc(alias = "g_win32_input_stream_get_close_handle")] - fn get_close_handle(&self) -> bool; + fn closes_handle(&self) -> bool; } impl> Win32InputStreamExt for O { - fn get_close_handle(&self) -> bool { + fn closes_handle(&self) -> bool { unsafe { from_glib(ffi::g_win32_input_stream_get_close_handle( self.as_ref().to_glib_none().0, diff --git a/gio/src/win32_output_stream.rs b/gio/src/win32_output_stream.rs index 95db03779067..812c0f564a56 100644 --- a/gio/src/win32_output_stream.rs +++ b/gio/src/win32_output_stream.rs @@ -19,11 +19,11 @@ pub const NONE_WIN32_OUTPUT_STREAM: Option<&Win32OutputStream> = None; pub trait Win32OutputStreamExt: 'static { #[doc(alias = "g_win32_output_stream_get_close_handle")] - fn get_close_handle(&self) -> bool; + fn closes_handle(&self) -> bool; } impl> Win32OutputStreamExt for O { - fn get_close_handle(&self) -> bool { + fn closes_handle(&self) -> bool { unsafe { from_glib(ffi::g_win32_output_stream_get_close_handle( self.as_ref().to_glib_none().0, diff --git a/gio/sys/versions.txt b/gio/sys/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/gio/sys/versions.txt +++ b/gio/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/gir b/gir index 56b95acee76e..3c6ebf46353f 160000 --- a/gir +++ b/gir @@ -1 +1 @@ -Subproject commit 56b95acee76e9c60d1c0ca7cf788df0b0c5f7cbb +Subproject commit 3c6ebf46353f5356f5ca7591476cedb5e8da8542 diff --git a/glib-macros/src/clone.rs b/glib-macros/src/clone.rs index 71eebc8451d3..b958995e704f 100644 --- a/glib-macros/src/clone.rs +++ b/glib-macros/src/clone.rs @@ -467,7 +467,7 @@ enum BlockKind { } impl BlockKind { - fn get_closure(self) -> Option> { + fn closure(self) -> Option> { match self { Self::AsyncBlock => None, Self::Closure(c) | Self::ClosureWrappingAsync(c) | Self::AsyncClosure(c) => Some(c), @@ -669,7 +669,7 @@ fn build_closure( } let is_async_closure_kind = matches!(kind, BlockKind::AsyncClosure(_)); - if let Some(closure) = kind.get_closure() { + if let Some(closure) = kind.closure() { if is_async_closure_kind { ret.push(TokenTree::Ident(Ident::new("async", Span::call_site()))); } diff --git a/glib-macros/src/object_subclass_attribute.rs b/glib-macros/src/object_subclass_attribute.rs index b2d00cf81d4c..39a99c26f0de 100644 --- a/glib-macros/src/object_subclass_attribute.rs +++ b/glib-macros/src/object_subclass_attribute.rs @@ -113,7 +113,7 @@ pub fn impl_object_subclass(input: &syn::ItemImpl) -> TokenStream { unsafe { let data = Self::type_data(); - let type_ = data.as_ref().get_type(); + let type_ = data.as_ref().type_(); assert!(type_.is_valid()); type_ diff --git a/glib-macros/tests/test.rs b/glib-macros/tests/test.rs index 4bf8375b5bfc..fbe4452339d0 100644 --- a/glib-macros/tests/test.rs +++ b/glib-macros/tests/test.rs @@ -63,14 +63,14 @@ fn derive_genum() { let e = glib::EnumClass::new(t).expect("EnumClass::new failed"); let v = e.get_value(0).expect("EnumClass::get_value(0) failed"); - assert_eq!(v.get_name(), "Goat"); - assert_eq!(v.get_nick(), "goat"); + assert_eq!(v.name(), "Goat"); + assert_eq!(v.nick(), "goat"); let v = e.get_value(1).expect("EnumClass::get_value(1) failed"); - assert_eq!(v.get_name(), "The Dog"); - assert_eq!(v.get_nick(), "dog"); + assert_eq!(v.name(), "The Dog"); + assert_eq!(v.nick(), "dog"); let v = e.get_value(5).expect("EnumClass::get_value(5) failed"); - assert_eq!(v.get_name(), "The Cat"); - assert_eq!(v.get_nick(), "chat"); + assert_eq!(v.name(), "The Cat"); + assert_eq!(v.nick(), "chat"); assert_eq!(e.get_value(2), None); } @@ -154,14 +154,14 @@ fn attr_gflags() { let e = glib::FlagsClass::new(t).expect("FlagsClass::new failed"); let v = e.get_value(1).expect("FlagsClass::get_value(1) failed"); - assert_eq!(v.get_name(), "Flag A"); - assert_eq!(v.get_nick(), "nick-a"); + assert_eq!(v.name(), "Flag A"); + assert_eq!(v.nick(), "nick-a"); let v = e.get_value(2).expect("FlagsClass::get_value(2) failed"); - assert_eq!(v.get_name(), "Flag B"); - assert_eq!(v.get_nick(), "b"); + assert_eq!(v.name(), "Flag B"); + assert_eq!(v.nick(), "b"); let v = e.get_value(4).expect("FlagsClass::get_value(4) failed"); - assert_eq!(v.get_name(), "C"); - assert_eq!(v.get_nick(), "c"); + assert_eq!(v.name(), "C"); + assert_eq!(v.nick(), "c"); assert!(e.get_value_by_name("Flag A").is_some()); assert!(e.get_value_by_name("Flag B").is_some()); diff --git a/glib/gobject-sys/versions.txt b/glib/gobject-sys/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/glib/gobject-sys/versions.txt +++ b/glib/gobject-sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/glib/src/auto/date_time.rs b/glib/src/auto/date_time.rs index 800b0b820c4f..4e516cbe2045 100644 --- a/glib/src/auto/date_time.rs +++ b/glib/src/auto/date_time.rs @@ -286,59 +286,59 @@ impl DateTime { } #[doc(alias = "g_date_time_get_day_of_month")] - pub fn get_day_of_month(&self) -> i32 { + pub fn day_of_month(&self) -> i32 { unsafe { ffi::g_date_time_get_day_of_month(self.to_glib_none().0) } } #[doc(alias = "g_date_time_get_day_of_week")] - pub fn get_day_of_week(&self) -> i32 { + pub fn day_of_week(&self) -> i32 { unsafe { ffi::g_date_time_get_day_of_week(self.to_glib_none().0) } } #[doc(alias = "g_date_time_get_day_of_year")] - pub fn get_day_of_year(&self) -> i32 { + pub fn day_of_year(&self) -> i32 { unsafe { ffi::g_date_time_get_day_of_year(self.to_glib_none().0) } } #[doc(alias = "g_date_time_get_hour")] - pub fn get_hour(&self) -> i32 { + pub fn hour(&self) -> i32 { unsafe { ffi::g_date_time_get_hour(self.to_glib_none().0) } } #[doc(alias = "g_date_time_get_microsecond")] - pub fn get_microsecond(&self) -> i32 { + pub fn microsecond(&self) -> i32 { unsafe { ffi::g_date_time_get_microsecond(self.to_glib_none().0) } } #[doc(alias = "g_date_time_get_minute")] - pub fn get_minute(&self) -> i32 { + pub fn minute(&self) -> i32 { unsafe { ffi::g_date_time_get_minute(self.to_glib_none().0) } } #[doc(alias = "g_date_time_get_month")] - pub fn get_month(&self) -> i32 { + pub fn month(&self) -> i32 { unsafe { ffi::g_date_time_get_month(self.to_glib_none().0) } } #[doc(alias = "g_date_time_get_second")] - pub fn get_second(&self) -> i32 { + pub fn second(&self) -> i32 { unsafe { ffi::g_date_time_get_second(self.to_glib_none().0) } } #[doc(alias = "g_date_time_get_seconds")] - pub fn get_seconds(&self) -> f64 { + pub fn seconds(&self) -> f64 { unsafe { ffi::g_date_time_get_seconds(self.to_glib_none().0) } } #[cfg(any(feature = "v2_58", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_58")))] #[doc(alias = "g_date_time_get_timezone")] - pub fn get_timezone(&self) -> TimeZone { + pub fn timezone(&self) -> TimeZone { unsafe { from_glib_none(ffi::g_date_time_get_timezone(self.to_glib_none().0)) } } #[doc(alias = "g_date_time_get_timezone_abbreviation")] - pub fn get_timezone_abbreviation(&self) -> crate::GString { + pub fn timezone_abbreviation(&self) -> crate::GString { unsafe { from_glib_none(ffi::g_date_time_get_timezone_abbreviation( self.to_glib_none().0, @@ -347,27 +347,27 @@ impl DateTime { } #[doc(alias = "g_date_time_get_utc_offset")] - pub fn get_utc_offset(&self) -> TimeSpan { + pub fn utc_offset(&self) -> TimeSpan { unsafe { ffi::g_date_time_get_utc_offset(self.to_glib_none().0) } } #[doc(alias = "g_date_time_get_week_numbering_year")] - pub fn get_week_numbering_year(&self) -> i32 { + pub fn week_numbering_year(&self) -> i32 { unsafe { ffi::g_date_time_get_week_numbering_year(self.to_glib_none().0) } } #[doc(alias = "g_date_time_get_week_of_year")] - pub fn get_week_of_year(&self) -> i32 { + pub fn week_of_year(&self) -> i32 { unsafe { ffi::g_date_time_get_week_of_year(self.to_glib_none().0) } } #[doc(alias = "g_date_time_get_year")] - pub fn get_year(&self) -> i32 { + pub fn year(&self) -> i32 { unsafe { ffi::g_date_time_get_year(self.to_glib_none().0) } } #[doc(alias = "g_date_time_get_ymd")] - pub fn get_ymd(&self) -> (i32, i32, i32) { + pub fn ymd(&self) -> (i32, i32, i32) { unsafe { let mut year = mem::MaybeUninit::uninit(); let mut month = mem::MaybeUninit::uninit(); diff --git a/glib/src/auto/key_file.rs b/glib/src/auto/key_file.rs index 938c41408bb4..85ace8200a2b 100644 --- a/glib/src/auto/key_file.rs +++ b/glib/src/auto/key_file.rs @@ -92,7 +92,7 @@ impl KeyFile { } #[doc(alias = "g_key_file_get_groups")] - pub fn get_groups(&self) -> (Vec, usize) { + pub fn groups(&self) -> (Vec, usize) { unsafe { let mut length = mem::MaybeUninit::uninit(); let ret = FromGlibPtrContainer::from_glib_full(ffi::g_key_file_get_groups( @@ -203,7 +203,7 @@ impl KeyFile { } #[doc(alias = "g_key_file_get_start_group")] - pub fn get_start_group(&self) -> Option { + pub fn start_group(&self) -> Option { unsafe { from_glib_full(ffi::g_key_file_get_start_group(self.to_glib_none().0)) } } diff --git a/glib/src/auto/main_context.rs b/glib/src/auto/main_context.rs index dac6eabef253..7f09ea50ca88 100644 --- a/glib/src/auto/main_context.rs +++ b/glib/src/auto/main_context.rs @@ -54,7 +54,7 @@ impl MainContext { //} //#[doc(alias = "g_main_context_get_poll_func")] - //pub fn get_poll_func(&self) -> /*Unimplemented*/Fn(/*Ignored*/PollFD, u32, i32) -> i32 { + //pub fn poll_func(&self) -> /*Unimplemented*/Fn(/*Ignored*/PollFD, u32, i32) -> i32 { // unsafe { TODO: call ffi:g_main_context_get_poll_func() } //} diff --git a/glib/src/auto/main_loop.rs b/glib/src/auto/main_loop.rs index 3e5e89ef20fd..ed19ec75f84f 100644 --- a/glib/src/auto/main_loop.rs +++ b/glib/src/auto/main_loop.rs @@ -28,7 +28,7 @@ impl MainLoop { } #[doc(alias = "g_main_loop_get_context")] - pub fn get_context(&self) -> MainContext { + pub fn context(&self) -> MainContext { unsafe { from_glib_none(ffi::g_main_loop_get_context(self.to_glib_none().0)) } } diff --git a/glib/src/auto/source.rs b/glib/src/auto/source.rs index 67602786aa64..d319e6d454fc 100644 --- a/glib/src/auto/source.rs +++ b/glib/src/auto/source.rs @@ -47,32 +47,32 @@ impl Source { } #[doc(alias = "g_source_get_can_recurse")] - pub fn get_can_recurse(&self) -> bool { + pub fn can_recurse(&self) -> bool { unsafe { from_glib(ffi::g_source_get_can_recurse(self.to_glib_none().0)) } } #[doc(alias = "g_source_get_context")] - pub fn get_context(&self) -> Option { + pub fn context(&self) -> Option { unsafe { from_glib_none(ffi::g_source_get_context(self.to_glib_none().0)) } } #[doc(alias = "g_source_get_name")] - pub fn get_name(&self) -> Option { + pub fn name(&self) -> Option { unsafe { from_glib_none(ffi::g_source_get_name(self.to_glib_none().0)) } } #[doc(alias = "g_source_get_priority")] - pub fn get_priority(&self) -> i32 { + pub fn priority(&self) -> i32 { unsafe { ffi::g_source_get_priority(self.to_glib_none().0) } } #[doc(alias = "g_source_get_ready_time")] - pub fn get_ready_time(&self) -> i64 { + pub fn ready_time(&self) -> i64 { unsafe { ffi::g_source_get_ready_time(self.to_glib_none().0) } } #[doc(alias = "g_source_get_time")] - pub fn get_time(&self) -> i64 { + pub fn time(&self) -> i64 { unsafe { ffi::g_source_get_time(self.to_glib_none().0) } } diff --git a/glib/src/auto/time_zone.rs b/glib/src/auto/time_zone.rs index eee0bbb3c151..eb389445255f 100644 --- a/glib/src/auto/time_zone.rs +++ b/glib/src/auto/time_zone.rs @@ -58,7 +58,7 @@ impl TimeZone { #[cfg(any(feature = "v2_58", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_58")))] #[doc(alias = "g_time_zone_get_identifier")] - pub fn get_identifier(&self) -> crate::GString { + pub fn identifier(&self) -> crate::GString { unsafe { from_glib_none(ffi::g_time_zone_get_identifier(self.to_glib_none().0)) } } diff --git a/glib/src/auto/uri.rs b/glib/src/auto/uri.rs index 94debd182378..8ebc0255454e 100644 --- a/glib/src/auto/uri.rs +++ b/glib/src/auto/uri.rs @@ -24,57 +24,57 @@ crate::wrapper! { impl Uri { #[doc(alias = "g_uri_get_auth_params")] - pub fn get_auth_params(&self) -> Option { + pub fn auth_params(&self) -> Option { unsafe { from_glib_none(ffi::g_uri_get_auth_params(self.to_glib_none().0)) } } #[doc(alias = "g_uri_get_flags")] - pub fn get_flags(&self) -> UriFlags { + pub fn flags(&self) -> UriFlags { unsafe { from_glib(ffi::g_uri_get_flags(self.to_glib_none().0)) } } #[doc(alias = "g_uri_get_fragment")] - pub fn get_fragment(&self) -> Option { + pub fn fragment(&self) -> Option { unsafe { from_glib_none(ffi::g_uri_get_fragment(self.to_glib_none().0)) } } #[doc(alias = "g_uri_get_host")] - pub fn get_host(&self) -> Option { + pub fn host(&self) -> Option { unsafe { from_glib_none(ffi::g_uri_get_host(self.to_glib_none().0)) } } #[doc(alias = "g_uri_get_password")] - pub fn get_password(&self) -> Option { + pub fn password(&self) -> Option { unsafe { from_glib_none(ffi::g_uri_get_password(self.to_glib_none().0)) } } #[doc(alias = "g_uri_get_path")] - pub fn get_path(&self) -> crate::GString { + pub fn path(&self) -> crate::GString { unsafe { from_glib_none(ffi::g_uri_get_path(self.to_glib_none().0)) } } #[doc(alias = "g_uri_get_port")] - pub fn get_port(&self) -> i32 { + pub fn port(&self) -> i32 { unsafe { ffi::g_uri_get_port(self.to_glib_none().0) } } #[doc(alias = "g_uri_get_query")] - pub fn get_query(&self) -> Option { + pub fn query(&self) -> Option { unsafe { from_glib_none(ffi::g_uri_get_query(self.to_glib_none().0)) } } #[doc(alias = "g_uri_get_scheme")] - pub fn get_scheme(&self) -> crate::GString { + pub fn scheme(&self) -> crate::GString { unsafe { from_glib_none(ffi::g_uri_get_scheme(self.to_glib_none().0)) } } #[doc(alias = "g_uri_get_user")] - pub fn get_user(&self) -> Option { + pub fn user(&self) -> Option { unsafe { from_glib_none(ffi::g_uri_get_user(self.to_glib_none().0)) } } #[doc(alias = "g_uri_get_userinfo")] - pub fn get_userinfo(&self) -> Option { + pub fn userinfo(&self) -> Option { unsafe { from_glib_none(ffi::g_uri_get_userinfo(self.to_glib_none().0)) } } diff --git a/glib/src/auto/versions.txt b/glib/src/auto/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/glib/src/auto/versions.txt +++ b/glib/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/glib/src/checksum.rs b/glib/src/checksum.rs index f9a7e2d8637f..0b626ed95e6c 100644 --- a/glib/src/checksum.rs +++ b/glib/src/checksum.rs @@ -7,7 +7,7 @@ use std::vec::Vec; impl Checksum { #[doc(alias = "g_checksum_get_digest")] - pub fn get_digest(self) -> Vec { + pub fn digest(self) -> Vec { unsafe { //Don't forget update when `ChecksumType` contains type bigger that Sha512. let mut digest_len: size_t = 512 / 8; @@ -25,7 +25,7 @@ impl Checksum { } #[doc(alias = "g_checksum_get_string")] - pub fn get_string(self) -> Option { + pub fn string(self) -> Option { unsafe { from_glib_none(ffi::g_checksum_get_string(mut_override( self.to_glib_none().0, @@ -49,7 +49,7 @@ mod tests { fn update() { let mut cs = Checksum::new(CS_TYPE).unwrap(); cs.update(b"hello world!"); - assert_eq!(cs.get_string().unwrap(), CS_VALUE); + assert_eq!(cs.string().unwrap(), CS_VALUE); } #[test] @@ -57,14 +57,14 @@ mod tests { let mut cs = Checksum::new(CS_TYPE).unwrap(); cs.update(b"hello "); cs.update(b"world!"); - assert_eq!(cs.get_string().unwrap(), CS_VALUE); + assert_eq!(cs.string().unwrap(), CS_VALUE); } #[test] fn get_digest() { let mut cs = Checksum::new(CS_TYPE).unwrap(); cs.update(b"hello world!"); - let vec = cs.get_digest(); + let vec = cs.digest(); assert_eq!(vec, CS_SLICE); } } diff --git a/glib/src/date.rs b/glib/src/date.rs index eaa27870fc43..2e2573491ff4 100644 --- a/glib/src/date.rs +++ b/glib/src/date.rs @@ -50,7 +50,7 @@ impl Date { #[doc(alias = "g_date_add_days")] pub fn add_days(&mut self, n_days: u32) -> Result<(), BoolError> { - let julian_days = self.get_julian(); + let julian_days = self.julian(); if julian_days == 0 || n_days > std::u32::MAX - julian_days { Err(bool_error!("Invalid date")) } else { @@ -73,7 +73,7 @@ impl Date { #[doc(alias = "g_date_add_years")] pub fn add_years(&mut self, n_years: u16) -> Result<(), BoolError> { - let year = self.get_year(); + let year = self.year(); if n_years > std::u16::MAX - year { Err(bool_error!("Invalid date")) } else { @@ -111,47 +111,47 @@ impl Date { } #[doc(alias = "g_date_get_day")] - pub fn get_day(&self) -> DateDay { + pub fn day(&self) -> DateDay { unsafe { ffi::g_date_get_day(self.to_glib_none().0) } } #[doc(alias = "g_date_get_day_of_year")] - pub fn get_day_of_year(&self) -> u32 { + pub fn day_of_year(&self) -> u32 { unsafe { ffi::g_date_get_day_of_year(self.to_glib_none().0) } } #[doc(alias = "g_date_get_iso8601_week_of_year")] - pub fn get_iso8601_week_of_year(&self) -> u32 { + pub fn iso8601_week_of_year(&self) -> u32 { unsafe { ffi::g_date_get_iso8601_week_of_year(self.to_glib_none().0) } } #[doc(alias = "g_date_get_julian")] - pub fn get_julian(&self) -> u32 { + pub fn julian(&self) -> u32 { unsafe { ffi::g_date_get_julian(self.to_glib_none().0) } } #[doc(alias = "g_date_get_monday_week_of_year")] - pub fn get_monday_week_of_year(&self) -> u32 { + pub fn monday_week_of_year(&self) -> u32 { unsafe { ffi::g_date_get_monday_week_of_year(self.to_glib_none().0) } } #[doc(alias = "g_date_get_month")] - pub fn get_month(&self) -> DateMonth { + pub fn month(&self) -> DateMonth { unsafe { from_glib(ffi::g_date_get_month(self.to_glib_none().0)) } } #[doc(alias = "g_date_get_sunday_week_of_year")] - pub fn get_sunday_week_of_year(&self) -> u32 { + pub fn sunday_week_of_year(&self) -> u32 { unsafe { ffi::g_date_get_sunday_week_of_year(self.to_glib_none().0) } } #[doc(alias = "g_date_get_weekday")] - pub fn get_weekday(&self) -> DateWeekday { + pub fn weekday(&self) -> DateWeekday { unsafe { from_glib(ffi::g_date_get_weekday(self.to_glib_none().0)) } } #[doc(alias = "g_date_get_year")] - pub fn get_year(&self) -> DateYear { + pub fn year(&self) -> DateYear { unsafe { ffi::g_date_get_year(self.to_glib_none().0) } } @@ -174,7 +174,7 @@ impl Date { #[doc(alias = "g_date_set_day")] pub fn set_day(&mut self, day: DateDay) -> Result<(), BoolError> { - if !Self::valid_dmy(day, self.get_month(), self.get_year()) { + if !Self::valid_dmy(day, self.month(), self.year()) { Err(bool_error!("invalid day")) } else { unsafe { @@ -215,7 +215,7 @@ impl Date { #[doc(alias = "g_date_set_month")] pub fn set_month(&mut self, month: DateMonth) -> Result<(), BoolError> { - if !Self::valid_dmy(self.get_day(), month, self.get_year()) { + if !Self::valid_dmy(self.day(), month, self.year()) { Err(bool_error!("invalid month")) } else { unsafe { @@ -245,7 +245,7 @@ impl Date { unsafe { ffi::g_date_set_time_t(c.to_glib_none_mut().0, time_ as _); } - if !Self::valid_dmy(c.get_day(), c.get_month(), c.get_year()) { + if !Self::valid_dmy(c.day(), c.month(), c.year()) { Err(bool_error!("invalid time")) } else { *self = c; @@ -259,7 +259,7 @@ impl Date { #[doc(alias = "g_date_set_year")] pub fn set_year(&mut self, year: DateYear) -> Result<(), BoolError> { - if !Self::valid_dmy(self.get_day(), self.get_month(), year) { + if !Self::valid_dmy(self.day(), self.month(), year) { Err(bool_error!("invalid year")) } else { unsafe { @@ -271,7 +271,7 @@ impl Date { #[doc(alias = "g_date_subtract_days")] pub fn subtract_days(&mut self, n_days: u32) -> Result<(), BoolError> { - let julian = self.get_julian(); + let julian = self.julian(); if julian > n_days { Err(bool_error!("invalid number of days")) } else { @@ -294,7 +294,7 @@ impl Date { #[doc(alias = "g_date_subtract_years")] pub fn subtract_years(&mut self, n_years: u16) -> Result<(), BoolError> { - if self.get_year() < n_years { + if self.year() < n_years { Err(bool_error!("invalid number of years")) } else { unsafe { @@ -404,9 +404,9 @@ impl Ord for Date { impl fmt::Debug for Date { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_struct("Date") - .field("year", &self.get_year()) - .field("month", &self.get_month()) - .field("day", &self.get_day()) + .field("year", &self.year()) + .field("month", &self.month()) + .field("day", &self.day()) .finish() } } @@ -416,8 +416,8 @@ impl hash::Hash for Date { where H: hash::Hasher, { - self.get_year().hash(state); - self.get_month().hash(state); - self.get_day().hash(state); + self.year().hash(state); + self.month().hash(state); + self.day().hash(state); } } diff --git a/glib/src/enums.rs b/glib/src/enums.rs index 09f27cf85a12..0323200aaf0f 100644 --- a/glib/src/enums.rs +++ b/glib/src/enums.rs @@ -121,7 +121,7 @@ impl EnumClass { } /// Gets all `EnumValue` of this `EnumClass`. - pub fn get_values(&self) -> Vec { + pub fn values(&self) -> Vec { unsafe { let n = (*self.0).n_values; let mut res = Vec::with_capacity(n as usize); @@ -171,17 +171,17 @@ unsafe impl Sync for EnumValue {} impl EnumValue { /// Get integer value corresponding to the value. - pub fn get_value(&self) -> i32 { + pub fn value(&self) -> i32 { unsafe { (*self.0).value } } /// Get name corresponding to the value. - pub fn get_name(&self) -> &str { + pub fn name(&self) -> &str { unsafe { CStr::from_ptr((*self.0).value_name).to_str().unwrap() } } /// Get nick corresponding to the value. - pub fn get_nick(&self) -> &str { + pub fn nick(&self) -> &str { unsafe { CStr::from_ptr((*self.0).value_nick).to_str().unwrap() } } @@ -204,14 +204,14 @@ impl EnumValue { } /// Get `EnumClass` to which the enum value belongs. - pub fn get_class(&self) -> &EnumClass { + pub fn class(&self) -> &EnumClass { &self.1 } } impl PartialEq for EnumValue { fn eq(&self, other: &Self) -> bool { - self.get_value().eq(&other.get_value()) + self.value().eq(&other.value()) } } @@ -219,13 +219,13 @@ impl Eq for EnumValue {} impl PartialOrd for EnumValue { fn partial_cmp(&self, other: &Self) -> Option { - self.get_value().partial_cmp(&other.get_value()) + self.value().partial_cmp(&other.value()) } } impl Ord for EnumValue { fn cmp(&self, other: &Self) -> cmp::Ordering { - self.get_value().cmp(&other.get_value()) + self.value().cmp(&other.value()) } } @@ -311,7 +311,7 @@ impl FlagsClass { } /// Gets all `FlagsValue` of this `FlagsClass`. - pub fn get_values(&self) -> Vec { + pub fn values(&self) -> Vec { unsafe { let n = (*self.0).n_values; let mut res = Vec::with_capacity(n as usize); @@ -358,7 +358,7 @@ impl FlagsClass { if let Some(f) = self.get_value_by_name(name) { let flags = gobject_ffi::g_value_get_flags(value.to_glib_none().0); - flags & f.get_value() != 0 + flags & f.value() != 0 } else { false } @@ -374,7 +374,7 @@ impl FlagsClass { if let Some(f) = self.get_value_by_nick(nick) { let flags = gobject_ffi::g_value_get_flags(value.to_glib_none().0); - flags & f.get_value() != 0 + flags & f.value() != 0 } else { false } @@ -395,7 +395,7 @@ impl FlagsClass { if let Some(f) = self.get_value(f) { let flags = gobject_ffi::g_value_get_flags(value.to_glib_none().0); - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, flags | f.get_value()); + gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, flags | f.value()); Ok(value) } else { Err(value) @@ -416,7 +416,7 @@ impl FlagsClass { if let Some(f) = self.get_value_by_name(name) { let flags = gobject_ffi::g_value_get_flags(value.to_glib_none().0); - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, flags | f.get_value()); + gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, flags | f.value()); Ok(value) } else { Err(value) @@ -437,7 +437,7 @@ impl FlagsClass { if let Some(f) = self.get_value_by_nick(nick) { let flags = gobject_ffi::g_value_get_flags(value.to_glib_none().0); - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, flags | f.get_value()); + gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, flags | f.value()); Ok(value) } else { Err(value) @@ -458,7 +458,7 @@ impl FlagsClass { if let Some(f) = self.get_value(f) { let flags = gobject_ffi::g_value_get_flags(value.to_glib_none().0); - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, flags & !f.get_value()); + gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, flags & !f.value()); Ok(value) } else { Err(value) @@ -479,7 +479,7 @@ impl FlagsClass { if let Some(f) = self.get_value_by_name(name) { let flags = gobject_ffi::g_value_get_flags(value.to_glib_none().0); - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, flags & !f.get_value()); + gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, flags & !f.value()); Ok(value) } else { Err(value) @@ -500,7 +500,7 @@ impl FlagsClass { if let Some(f) = self.get_value_by_nick(nick) { let flags = gobject_ffi::g_value_get_flags(value.to_glib_none().0); - gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, flags & !f.get_value()); + gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, flags & !f.value()); Ok(value) } else { Err(value) @@ -548,17 +548,17 @@ unsafe impl Sync for FlagsValue {} impl FlagsValue { /// Get integer value corresponding to the value. - pub fn get_value(&self) -> u32 { + pub fn value(&self) -> u32 { unsafe { (*self.0).value } } /// Get name corresponding to the value. - pub fn get_name(&self) -> &str { + pub fn name(&self) -> &str { unsafe { CStr::from_ptr((*self.0).value_name).to_str().unwrap() } } /// Get nick corresponding to the value. - pub fn get_nick(&self) -> &str { + pub fn nick(&self) -> &str { unsafe { CStr::from_ptr((*self.0).value_nick).to_str().unwrap() } } @@ -578,8 +578,8 @@ impl FlagsValue { let mut res = Vec::new(); if let Some(flags_class) = flags_class { let f = gobject_ffi::g_value_get_flags(value.to_glib_none().0); - for v in flags_class.get_values() { - if v.get_value() & f != 0 { + for v in flags_class.values() { + if v.value() & f != 0 { res.push(v); } } @@ -589,14 +589,14 @@ impl FlagsValue { } /// Get `FlagsClass` to which the flags value belongs. - pub fn get_class(&self) -> &FlagsClass { + pub fn class(&self) -> &FlagsClass { &self.1 } } impl PartialEq for FlagsValue { fn eq(&self, other: &Self) -> bool { - self.get_value().eq(&other.get_value()) + self.value().eq(&other.value()) } } diff --git a/glib/src/gobject/auto/binding.rs b/glib/src/gobject/auto/binding.rs index 0236115a60fa..eb26f2455924 100644 --- a/glib/src/gobject/auto/binding.rs +++ b/glib/src/gobject/auto/binding.rs @@ -16,12 +16,12 @@ crate::wrapper! { impl Binding { #[doc(alias = "g_binding_get_flags")] - pub fn get_flags(&self) -> BindingFlags { + pub fn flags(&self) -> BindingFlags { unsafe { from_glib(gobject_ffi::g_binding_get_flags(self.to_glib_none().0)) } } #[doc(alias = "g_binding_get_source_property")] - pub fn get_source_property(&self) -> crate::GString { + pub fn source_property(&self) -> crate::GString { unsafe { from_glib_none(gobject_ffi::g_binding_get_source_property( self.to_glib_none().0, @@ -30,7 +30,7 @@ impl Binding { } #[doc(alias = "g_binding_get_target_property")] - pub fn get_target_property(&self) -> crate::GString { + pub fn target_property(&self) -> crate::GString { unsafe { from_glib_none(gobject_ffi::g_binding_get_target_property( self.to_glib_none().0, diff --git a/glib/src/gobject/binding.rs b/glib/src/gobject/binding.rs index fcad2d486a44..1f8c00b7dcf4 100644 --- a/glib/src/gobject/binding.rs +++ b/glib/src/gobject/binding.rs @@ -7,7 +7,7 @@ use crate::ObjectType; use crate::StaticType; impl Binding { - pub fn get_source(&self) -> Option { + pub fn source(&self) -> Option { unsafe { let mut value = crate::Value::from_type(::static_type()); crate::gobject_ffi::g_object_get_property( @@ -21,7 +21,7 @@ impl Binding { } } - pub fn get_target(&self) -> Option { + pub fn target(&self) -> Option { unsafe { let mut value = crate::Value::from_type(::static_type()); crate::gobject_ffi::g_object_get_property( diff --git a/glib/src/object.rs b/glib/src/object.rs index b350fbbe4772..f95948ef0cf3 100644 --- a/glib/src/object.rs +++ b/glib/src/object.rs @@ -315,7 +315,7 @@ impl fmt::Debug for ObjectRef { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let type_ = unsafe { let klass = (*self.inner.as_ptr()).g_type_instance.g_class as *const ObjectClass; - (&*klass).get_type() + (&*klass).type_() }; f.debug_struct("ObjectRef") @@ -1079,12 +1079,9 @@ impl Object { let params = properties .iter() .map(|(name, value)| { - let pspec = pspecs - .iter() - .find(|p| p.get_name() == *name) - .ok_or_else(|| { - bool_error!("Can't find property '{}' for type '{}'", name, type_) - })?; + let pspec = pspecs.iter().find(|p| p.name() == *name).ok_or_else(|| { + bool_error!("Can't find property '{}' for type '{}'", name, type_) + })?; let mut value = value.to_value(); validate_property_type(type_, true, &pspec, &mut value)?; @@ -1105,12 +1102,9 @@ impl Object { let params = properties .iter() .map(|(name, value)| { - let pspec = pspecs - .iter() - .find(|p| p.get_name() == *name) - .ok_or_else(|| { - bool_error!("Can't find property '{}' for type '{}'", name, type_) - })?; + let pspec = pspecs.iter().find(|p| p.name() == *name).ok_or_else(|| { + bool_error!("Can't find property '{}' for type '{}'", name, type_) + })?; let mut value = value.clone(); validate_property_type(type_, true, &pspec, &mut value)?; @@ -1172,9 +1166,9 @@ pub trait ObjectExt: ObjectType { /// Returns `true` if the object is an instance of (can be cast to) `T`. fn is(&self) -> bool; - fn get_type(&self) -> Type; - fn get_object_class(&self) -> &ObjectClass; - fn get_class(&self) -> &Class + fn type_(&self) -> Type; + fn object_class(&self) -> &ObjectClass; + fn class(&self) -> &Class where Self: IsClass; fn get_class_of(&self) -> Option<&Class>; @@ -1366,14 +1360,14 @@ pub trait ObjectExt: ObjectType { impl ObjectExt for T { fn is(&self) -> bool { - self.get_type().is_a(U::static_type()) + self.type_().is_a(U::static_type()) } - fn get_type(&self) -> Type { - self.get_object_class().get_type() + fn type_(&self) -> Type { + self.object_class().type_() } - fn get_object_class(&self) -> &ObjectClass { + fn object_class(&self) -> &ObjectClass { unsafe { let obj: *mut gobject_ffi::GObject = self.as_object_ref().to_glib_none().0; let klass = (*obj).g_type_instance.g_class as *const ObjectClass; @@ -1381,7 +1375,7 @@ impl ObjectExt for T { } } - fn get_class(&self) -> &Class + fn class(&self) -> &Class where Self: IsClass, { @@ -1405,7 +1399,7 @@ impl ObjectExt for T { } fn get_interface(&self) -> Option> { - Interface::from_class(self.get_object_class()) + Interface::from_class(self.object_class()) } fn set_properties(&self, property_values: &[(&str, &dyn ToValue)]) -> Result<(), BoolError> { @@ -1416,19 +1410,12 @@ impl ObjectExt for T { let params = property_values .iter() .map(|&(name, value)| { - let pspec = pspecs - .iter() - .find(|p| p.get_name() == name) - .ok_or_else(|| { - bool_error!( - "Can't find property '{}' for type '{}'", - name, - self.get_type() - ) - })?; + let pspec = pspecs.iter().find(|p| p.name() == name).ok_or_else(|| { + bool_error!("Can't find property '{}' for type '{}'", name, self.type_()) + })?; let mut value = value.to_value(); - validate_property_type(self.get_type(), false, &pspec, &mut value)?; + validate_property_type(self.type_(), false, &pspec, &mut value)?; Ok((CString::new(name).unwrap(), value)) }) .collect::, _>>()?; @@ -1457,19 +1444,12 @@ impl ObjectExt for T { let params = property_values .iter() .map(|(name, value)| { - let pspec = pspecs - .iter() - .find(|p| p.get_name() == *name) - .ok_or_else(|| { - bool_error!( - "Can't find property '{}' for type '{}'", - name, - self.get_type() - ) - })?; + let pspec = pspecs.iter().find(|p| p.name() == *name).ok_or_else(|| { + bool_error!("Can't find property '{}' for type '{}'", name, self.type_()) + })?; let mut value = value.clone(); - validate_property_type(self.get_type(), false, &pspec, &mut value)?; + validate_property_type(self.type_(), false, &pspec, &mut value)?; Ok((CString::new(*name).unwrap(), value)) }) .collect::, _>>()?; @@ -1500,13 +1480,13 @@ impl ObjectExt for T { return Err(bool_error!( "property '{}' of type '{}' not found", property_name, - self.get_type() + self.type_() )); } }; let mut property_value = value.to_value(); - validate_property_type(self.get_type(), false, &pspec, &mut property_value)?; + validate_property_type(self.type_(), false, &pspec, &mut property_value)?; unsafe { gobject_ffi::g_object_set_property( self.as_object_ref().to_glib_none().0, @@ -1531,13 +1511,13 @@ impl ObjectExt for T { return Err(bool_error!( "property '{}' of type '{}' not found", property_name, - self.get_type() + self.type_() )); } }; let mut property_value = value.clone(); - validate_property_type(self.get_type(), false, &pspec, &mut property_value)?; + validate_property_type(self.type_(), false, &pspec, &mut property_value)?; unsafe { gobject_ffi::g_object_set_property( self.as_object_ref().to_glib_none().0, @@ -1558,21 +1538,21 @@ impl ObjectExt for T { return Err(bool_error!( "property '{}' of type '{}' not found", property_name, - self.get_type() + self.type_() )); } }; - if !pspec.get_flags().contains(crate::ParamFlags::READABLE) { + if !pspec.flags().contains(crate::ParamFlags::READABLE) { return Err(bool_error!( "property '{}' of type '{}' is not readable", property_name, - self.get_type() + self.type_() )); } unsafe { - let mut value = Value::from_type(pspec.get_value_type()); + let mut value = Value::from_type(pspec.value_type()); gobject_ffi::g_object_get_property( self.as_object_ref().to_glib_none().0, property_name.to_glib_none().0, @@ -1584,7 +1564,7 @@ impl ObjectExt for T { bool_error!( "Failed to get property value for property '{}' of type '{}'", property_name, - self.get_type() + self.type_() ) }) } @@ -1751,19 +1731,19 @@ impl ObjectExt for T { } fn has_property<'a, N: Into<&'a str>>(&self, property_name: N, type_: Option) -> bool { - self.get_object_class().has_property(property_name, type_) + self.object_class().has_property(property_name, type_) } fn get_property_type<'a, N: Into<&'a str>>(&self, property_name: N) -> Option { - self.get_object_class().get_property_type(property_name) + self.object_class().get_property_type(property_name) } fn find_property<'a, N: Into<&'a str>>(&self, property_name: N) -> Option { - self.get_object_class().find_property(property_name) + self.object_class().find_property(property_name) } fn list_properties(&self) -> Vec { - self.get_object_class().list_properties() + self.object_class().list_properties() } fn connect<'a, N, F>( @@ -1841,7 +1821,7 @@ impl ObjectExt for T { F: Fn(&[Value]) -> Option, { let signal_name: &str = signal_name.into(); - let type_ = self.get_type(); + let type_ = self.type_(); let (signal_id, details) = SignalId::parse_name(signal_name, type_, true) .ok_or_else(|| bool_error!("Signal '{}' of type '{}' not found", signal_name, type_))?; self.connect_unsafe_id(signal_id, Some(details), after, callback) @@ -1858,7 +1838,7 @@ impl ObjectExt for T { F: Fn(&[Value]) -> Option, { let signal_query = signal_id.query(); - let type_ = self.get_type(); + let type_ = self.type_(); let return_type: Type = signal_query.return_type().into(); let signal_name = signal_id.name(); @@ -1916,7 +1896,7 @@ impl ObjectExt for T { ); }); - let actual_type = opt_obj.map_or_else(|| ret.type_(), |obj| obj.get_type()); + let actual_type = opt_obj.map_or_else(|| ret.type_(), |obj| obj.type_()); if !actual_type.is_a(return_type) { panic!( "Signal '{}' of type '{}' required return value of type '{}' but got '{}' (actual '{}')", @@ -1954,11 +1934,11 @@ impl ObjectExt for T { fn emit(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Result, BoolError> { let signal_query = signal_id.query(); unsafe { - let type_ = self.get_type(); + let type_ = self.type_(); let self_v = { let mut v = Value::uninitialized(); - gobject_ffi::g_value_init(v.to_glib_none_mut().0, self.get_type().to_glib()); + gobject_ffi::g_value_init(v.to_glib_none_mut().0, self.type_().to_glib()); gobject_ffi::g_value_set_object( v.to_glib_none_mut().0, self.as_object_ref().to_glib_none().0, @@ -2003,11 +1983,11 @@ impl ObjectExt for T { assert!(signal_query.flags().contains(crate::SignalFlags::DETAILED)); unsafe { - let type_ = self.get_type(); + let type_ = self.type_(); let self_v = { let mut v = Value::uninitialized(); - gobject_ffi::g_value_init(v.to_glib_none_mut().0, self.get_type().to_glib()); + gobject_ffi::g_value_init(v.to_glib_none_mut().0, self.type_().to_glib()); gobject_ffi::g_value_set_object( v.to_glib_none_mut().0, self.as_object_ref().to_glib_none().0, @@ -2048,7 +2028,7 @@ impl ObjectExt for T { args: &[&dyn ToValue], ) -> Result, BoolError> { let signal_name: &str = signal_name.into(); - let type_ = self.get_type(); + let type_ = self.type_(); let signal_id = SignalId::lookup(signal_name, type_) .ok_or_else(|| bool_error!("Signal '{}' of type '{}' not found", signal_name, type_))?; self.emit(signal_id, args) @@ -2090,13 +2070,13 @@ impl ObjectExt for T { args: &[Value], ) -> Result, BoolError> { unsafe { - let type_ = self.get_type(); + let type_ = self.type_(); let signal_query = signal_id.query(); let self_v = { let mut v = Value::uninitialized(); - gobject_ffi::g_value_init(v.to_glib_none_mut().0, self.get_type().to_glib()); + gobject_ffi::g_value_init(v.to_glib_none_mut().0, self.type_().to_glib()); gobject_ffi::g_value_set_object( v.to_glib_none_mut().0, self.as_object_ref().to_glib_none().0, @@ -2134,7 +2114,7 @@ impl ObjectExt for T { args: &[Value], ) -> Result, BoolError> { let signal_name: &str = signal_name.into(); - let type_ = self.get_type(); + let type_ = self.type_(); let signal_id = SignalId::lookup(signal_name, type_) .ok_or_else(|| bool_error!("Signal '{}' of type '{}' not found", signal_name, type_))?; self.emit_with_values(signal_id, args) @@ -2150,11 +2130,11 @@ impl ObjectExt for T { assert!(signal_query.flags().contains(crate::SignalFlags::DETAILED)); unsafe { - let type_ = self.get_type(); + let type_ = self.type_(); let self_v = { let mut v = Value::uninitialized(); - gobject_ffi::g_value_init(v.to_glib_none_mut().0, self.get_type().to_glib()); + gobject_ffi::g_value_init(v.to_glib_none_mut().0, self.type_().to_glib()); gobject_ffi::g_value_set_object( v.to_glib_none_mut().0, self.as_object_ref().to_glib_none().0, @@ -2195,15 +2175,12 @@ fn validate_property_type( pspec: &crate::ParamSpec, property_value: &mut Value, ) -> Result<(), BoolError> { - if !pspec.get_flags().contains(crate::ParamFlags::WRITABLE) - || (!allow_construct_only - && pspec - .get_flags() - .contains(crate::ParamFlags::CONSTRUCT_ONLY)) + if !pspec.flags().contains(crate::ParamFlags::WRITABLE) + || (!allow_construct_only && pspec.flags().contains(crate::ParamFlags::CONSTRUCT_ONLY)) { return Err(bool_error!( "property '{}' of type '{}' is not writable", - pspec.get_name(), + pspec.name(), type_ )); } @@ -2215,7 +2192,7 @@ fn validate_property_type( // value type is a subtype of the property type let valid_type: bool = from_glib(gobject_ffi::g_type_check_value_holds( mut_override(property_value.to_glib_none().0), - pspec.get_value_type().to_glib(), + pspec.value_type().to_glib(), )); // If it's not directly a valid type but an object type, we check if the @@ -2225,32 +2202,32 @@ fn validate_property_type( if !valid_type && property_value.type_().is_a(Object::static_type()) { match property_value.get::() { Ok(Some(obj)) => { - if obj.get_type().is_a(pspec.get_value_type()) { - property_value.0.g_type = pspec.get_value_type().to_glib(); + if obj.type_().is_a(pspec.value_type()) { + property_value.0.g_type = pspec.value_type().to_glib(); } else { return Err( bool_error!( "property '{}' of type '{}' can't be set from the given object type (expected: '{}', got: '{}')", - pspec.get_name(), + pspec.name(), type_, - pspec.get_value_type(), - obj.get_type(), + pspec.value_type(), + obj.type_(), ) ); } } Ok(None) => { // If the value is None then the type is compatible too - property_value.0.g_type = pspec.get_value_type().to_glib(); + property_value.0.g_type = pspec.value_type().to_glib(); } Err(_) => unreachable!("property_value type conformity already checked"), } } else if !valid_type { return Err(bool_error!(format!( "property '{}' of type '{}' can't be set from the given type (expected: '{}', got: '{}')", - pspec.get_name(), + pspec.name(), type_, - pspec.get_value_type(), + pspec.value_type(), property_value.type_(), ))); } @@ -2259,13 +2236,11 @@ fn validate_property_type( pspec.to_glib_none().0, property_value.to_glib_none_mut().0, )); - let change_allowed = pspec - .get_flags() - .contains(crate::ParamFlags::LAX_VALIDATION); + let change_allowed = pspec.flags().contains(crate::ParamFlags::LAX_VALIDATION); if changed && !change_allowed { return Err(bool_error!( "property '{}' of type '{}' can't be set from given value, it is invalid or out of range", - pspec.get_name(), + pspec.name(), type_, )); } @@ -2302,7 +2277,7 @@ fn validate_signal_arguments( if arg.type_().is_a(Object::static_type()) { match arg.get::() { Ok(Some(obj)) => { - if obj.get_type().is_a(param_type) { + if obj.type_().is_a(param_type) { arg.0.g_type = param_type.to_glib(); } else { return Err( @@ -2358,7 +2333,7 @@ impl ObjectClass { pub fn get_property_type<'a, N: Into<&'a str>>(&self, property_name: N) -> Option { self.find_property(property_name) - .map(|pspec| pspec.get_value_type()) + .map(|pspec| pspec.value_type()) } pub fn find_property<'a, N: Into<&'a str>>( @@ -2646,7 +2621,7 @@ impl Class { /// /// This is not equivalent to `T::static_type()` but is the type of the subclass of `T` where /// this class belongs to. - pub fn get_type(&self) -> Type { + pub fn type_(&self) -> Type { unsafe { // This also works for interfaces because they also have the type // as the first struct field. @@ -2683,7 +2658,7 @@ impl Class { where U: IsA, { - if !self.get_type().is_a(U::static_type()) { + if !self.type_().is_a(U::static_type()) { return None; } @@ -2699,7 +2674,7 @@ impl Class { where U: IsA, { - if !self.get_type().is_a(U::static_type()) { + if !self.type_().is_a(U::static_type()) { return None; } @@ -2830,7 +2805,7 @@ impl Interface { /// Get the type id for this interface. /// /// This is equivalent to `T::static_type()`. - pub fn get_type(&self) -> Type { + pub fn type_(&self) -> Type { unsafe { let klass = self as *const _ as *const gobject_ffi::GTypeInterface; from_glib((*klass).g_type) @@ -2841,7 +2816,7 @@ impl Interface { /// /// This is not equivalent to `T::static_type()` but is the type id of the type this specific /// interface belongs to. - pub fn get_instance_type(&self) -> Type { + pub fn instance_type(&self) -> Type { unsafe { // This also works for interfaces because they also have the type // as the first struct field. @@ -2854,7 +2829,7 @@ impl Interface { /// /// This will return `None` if `klass` is not implementing `Self`. pub fn from_class(klass: &Class) -> Option> { - if !klass.get_type().is_a(T::static_type()) { + if !klass.type_().is_a(T::static_type()) { return None; } diff --git a/glib/src/param_spec.rs b/glib/src/param_spec.rs index 2656b0525d65..da5eac04bae9 100644 --- a/glib/src/param_spec.rs +++ b/glib/src/param_spec.rs @@ -56,7 +56,7 @@ unsafe impl Sync for ParamSpec {} impl ParamSpec { pub fn downcast(self) -> Result { unsafe { - if self.get_type() == T::static_type() { + if self.type_() == T::static_type() { Ok(from_glib_full(self.to_glib_full())) } else { Err(self) @@ -66,7 +66,7 @@ impl ParamSpec { pub fn downcast_ref(&self) -> Option<&T> { unsafe { - if self.get_type() == T::static_type() { + if self.type_() == T::static_type() { Some(&*(self as *const ParamSpec as *const T)) } else { None @@ -74,7 +74,7 @@ impl ParamSpec { } } - pub fn get_type(&self) -> Type { + pub fn type_(&self) -> Type { unsafe { let ptr = self.to_glib_none().0; @@ -82,20 +82,20 @@ impl ParamSpec { } } - pub fn get_value_type(&self) -> crate::Type { + pub fn value_type(&self) -> crate::Type { unsafe { from_glib((*self.to_glib_none().0).value_type) } } - pub fn get_owner_type(&self) -> crate::Type { + pub fn owner_type(&self) -> crate::Type { unsafe { from_glib((*self.to_glib_none().0).owner_type) } } - pub fn get_flags(&self) -> ParamFlags { + pub fn flags(&self) -> ParamFlags { unsafe { from_glib((*self.to_glib_none().0).flags) } } #[doc(alias = "g_param_spec_get_blurb")] - pub fn get_blurb(&self) -> &str { + pub fn blurb(&self) -> &str { unsafe { CStr::from_ptr(gobject_ffi::g_param_spec_get_blurb(self.to_glib_none().0)) .to_str() @@ -104,7 +104,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_get_default_value")] - pub fn get_default_value(&self) -> &Value { + pub fn default_value(&self) -> &Value { unsafe { &*(gobject_ffi::g_param_spec_get_default_value(self.to_glib_none().0) as *const crate::Value) @@ -112,7 +112,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_get_name")] - pub fn get_name<'a>(&self) -> &'a str { + pub fn name<'a>(&self) -> &'a str { unsafe { CStr::from_ptr(gobject_ffi::g_param_spec_get_name(self.to_glib_none().0)) .to_str() @@ -123,7 +123,7 @@ impl ParamSpec { #[cfg(any(feature = "v2_46", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_46")))] #[doc(alias = "g_param_spec_get_name_quark")] - pub fn get_name_quark(&self) -> crate::Quark { + pub fn name_quark(&self) -> crate::Quark { unsafe { from_glib(gobject_ffi::g_param_spec_get_name_quark( self.to_glib_none().0, @@ -132,7 +132,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_get_nick")] - pub fn get_nick(&self) -> &str { + pub fn nick(&self) -> &str { unsafe { CStr::from_ptr(gobject_ffi::g_param_spec_get_nick(self.to_glib_none().0)) .to_str() @@ -145,7 +145,7 @@ impl ParamSpec { //} #[doc(alias = "g_param_spec_get_redirect_target")] - pub fn get_redirect_target(&self) -> Option { + pub fn redirect_target(&self) -> Option { unsafe { from_glib_none(gobject_ffi::g_param_spec_get_redirect_target( self.to_glib_none().0, @@ -166,7 +166,7 @@ impl ParamSpec { //} #[doc(alias = "g_param_spec_boolean")] - pub fn boolean( + pub fn new_boolean( name: &str, nick: &str, blurb: &str, @@ -190,7 +190,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_boxed")] - pub fn boxed( + pub fn new_boxed( name: &str, nick: &str, blurb: &str, @@ -214,7 +214,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_char")] - pub fn char( + pub fn new_char( name: &str, nick: &str, blurb: &str, @@ -242,7 +242,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_double")] - pub fn double( + pub fn new_double( name: &str, nick: &str, blurb: &str, @@ -270,7 +270,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_enum")] - pub fn enum_( + pub fn new_enum( name: &str, nick: &str, blurb: &str, @@ -296,7 +296,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_flags")] - pub fn flags( + pub fn new_flags( name: &str, nick: &str, blurb: &str, @@ -322,7 +322,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_float")] - pub fn float( + pub fn new_float( name: &str, nick: &str, blurb: &str, @@ -350,7 +350,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_gtype")] - pub fn gtype( + pub fn new_type( name: &str, nick: &str, blurb: &str, @@ -374,7 +374,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_int")] - pub fn int( + pub fn new_int( name: &str, nick: &str, blurb: &str, @@ -402,7 +402,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_int64")] - pub fn int64( + pub fn new_int64( name: &str, nick: &str, blurb: &str, @@ -430,7 +430,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_long")] - pub fn long( + pub fn new_long( name: &str, nick: &str, blurb: &str, @@ -458,7 +458,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_object")] - pub fn object( + pub fn new_object( name: &str, nick: &str, blurb: &str, @@ -482,7 +482,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_override")] - pub fn override_(name: &str, overridden: &ParamSpec) -> ParamSpec { + pub fn new_override(name: &str, overridden: &ParamSpec) -> ParamSpec { assert!( is_canonical_pspec_name(name), "{} is not a valid canonical parameter name", @@ -497,7 +497,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_param")] - pub fn param( + pub fn new_param( name: &str, nick: &str, blurb: &str, @@ -521,7 +521,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_pointer")] - pub fn pointer(name: &str, nick: &str, blurb: &str, flags: ParamFlags) -> ParamSpec { + pub fn new_pointer(name: &str, nick: &str, blurb: &str, flags: ParamFlags) -> ParamSpec { assert!( is_canonical_pspec_name(name), "{} is not a valid canonical parameter name", @@ -538,7 +538,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_string")] - pub fn string( + pub fn new_string( name: &str, nick: &str, blurb: &str, @@ -563,7 +563,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_uchar")] - pub fn uchar( + pub fn new_uchar( name: &str, nick: &str, blurb: &str, @@ -591,7 +591,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_uint")] - pub fn uint( + pub fn new_uint( name: &str, nick: &str, blurb: &str, @@ -619,7 +619,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_uint64")] - pub fn uint64( + pub fn new_uint64( name: &str, nick: &str, blurb: &str, @@ -647,7 +647,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_ulong")] - pub fn ulong( + pub fn new_ulong( name: &str, nick: &str, blurb: &str, @@ -675,7 +675,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_unichar")] - pub fn unichar( + pub fn new_unichar( name: &str, nick: &str, blurb: &str, @@ -699,7 +699,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_value_array")] - pub fn value_array( + pub fn new_value_array( name: &str, nick: &str, blurb: &str, @@ -723,7 +723,7 @@ impl ParamSpec { } #[doc(alias = "g_param_spec_variant")] - pub fn variant( + pub fn new_variant( name: &str, nick: &str, blurb: &str, @@ -840,7 +840,7 @@ macro_rules! define_param_spec { macro_rules! define_param_spec_default { ($rust_type:ident, $value_type:ty, $from_glib:expr) => { impl $rust_type { - pub fn get_default_value(&self) -> $value_type { + pub fn default_value(&self) -> $value_type { unsafe { let ptr = self.to_glib_none().0; $from_glib((*ptr).default_value) @@ -853,14 +853,14 @@ macro_rules! define_param_spec_default { macro_rules! define_param_spec_min_max { ($rust_type:ident, $value_type:ty, $from_glib:expr) => { impl $rust_type { - pub fn get_minimum(&self) -> $value_type { + pub fn minimum(&self) -> $value_type { unsafe { let ptr = self.to_glib_none().0; $from_glib((*ptr).minimum) } } - pub fn get_maximum(&self) -> $value_type { + pub fn maximum(&self) -> $value_type { unsafe { let ptr = self.to_glib_none().0; $from_glib((*ptr).maximum) @@ -978,7 +978,7 @@ define_param_spec!( define_param_spec_default!(ParamSpecEnum, i32, |x| x); impl ParamSpecEnum { - pub fn get_enum_class(&self) -> crate::EnumClass { + pub fn enum_class(&self) -> crate::EnumClass { unsafe { let ptr = self.to_glib_none().0; @@ -1000,7 +1000,7 @@ define_param_spec!( define_param_spec_default!(ParamSpecFlags, u32, |x| x); impl ParamSpecFlags { - pub fn get_flags_class(&self) -> crate::FlagsClass { + pub fn flags_class(&self) -> crate::FlagsClass { unsafe { let ptr = self.to_glib_none().0; @@ -1076,7 +1076,7 @@ define_param_spec!( ); impl ParamSpecValueArray { - pub fn get_element_spec(&self) -> Option { + pub fn element_spec(&self) -> Option { unsafe { let ptr = self.to_glib_none().0; @@ -1084,7 +1084,7 @@ impl ParamSpecValueArray { } } - pub fn get_fixed_n_elements(&self) -> u32 { + pub fn fixed_n_elements(&self) -> u32 { unsafe { let ptr = self.to_glib_none().0; @@ -1108,7 +1108,7 @@ define_param_spec!( ); impl ParamSpecOverride { - pub fn get_overridden(&self) -> ParamSpec { + pub fn overridden(&self) -> ParamSpec { unsafe { let ptr = self.to_glib_none().0; @@ -1138,7 +1138,7 @@ define_param_spec_default!( ); impl ParamSpecVariant { - pub fn get_type(&self) -> Option<&crate::VariantTy> { + pub fn type_(&self) -> Option<&crate::VariantTy> { unsafe { let ptr = self.to_glib_none().0; @@ -1157,7 +1157,7 @@ mod tests { #[test] fn test_param_spec_string() { - let pspec = ParamSpec::string( + let pspec = ParamSpec::new_string( "name", "nick", "blurb", @@ -1165,23 +1165,23 @@ mod tests { ParamFlags::READWRITE, ); - assert_eq!(pspec.get_name(), "name"); - assert_eq!(pspec.get_nick(), "nick"); - assert_eq!(pspec.get_blurb(), "blurb"); - let default_value = pspec.get_default_value(); + assert_eq!(pspec.name(), "name"); + assert_eq!(pspec.nick(), "nick"); + assert_eq!(pspec.blurb(), "blurb"); + let default_value = pspec.default_value(); assert_eq!(default_value.get::<&str>().unwrap(), Some("default")); - assert_eq!(pspec.get_flags(), ParamFlags::READWRITE); - assert_eq!(pspec.get_value_type(), Type::STRING); - assert_eq!(pspec.get_type(), ParamSpecString::static_type()); + assert_eq!(pspec.flags(), ParamFlags::READWRITE); + assert_eq!(pspec.value_type(), Type::STRING); + assert_eq!(pspec.type_(), ParamSpecString::static_type()); let pspec_ref = pspec .downcast_ref::() .expect("Not a string param spec"); - assert_eq!(pspec_ref.get_default_value(), Some("default")); + assert_eq!(pspec_ref.default_value(), Some("default")); let pspec = pspec .downcast::() .expect("Not a string param spec"); - assert_eq!(pspec.get_default_value(), Some("default")); + assert_eq!(pspec.default_value(), Some("default")); } } diff --git a/glib/src/subclass/interface.rs b/glib/src/subclass/interface.rs index e4c8852affc1..c24c7ea83cab 100644 --- a/glib/src/subclass/interface.rs +++ b/glib/src/subclass/interface.rs @@ -125,7 +125,7 @@ pub trait ObjectInterfaceExt: ObjectInterface { /// /// This will panic if `obj` does not implement the interface. fn from_instance>(obj: &T) -> &Self { - assert!(obj.as_ref().get_type().is_a(Self::get_type())); + assert!(obj.as_ref().type_().is_a(Self::get_type())); unsafe { let klass = (*(obj.as_ptr() as *const gobject_ffi::GTypeInstance)).g_class; diff --git a/glib/src/subclass/mod.rs b/glib/src/subclass/mod.rs index 23cd1d4c5077..be6339a90071 100644 --- a/glib/src/subclass/mod.rs +++ b/glib/src/subclass/mod.rs @@ -102,14 +102,14 @@ //! use once_cell::sync::Lazy; //! static PROPERTIES: Lazy> = Lazy::new(|| { //! vec![ -//! glib::ParamSpec::string( +//! glib::ParamSpec::new_string( //! "name", //! "Name", //! "Name of this object", //! None, //! glib::ParamFlags::READWRITE, //! ), -//! glib::ParamSpec::enum_( +//! glib::ParamSpec::new_enum( //! "animal", //! "Animal", //! "Animal", @@ -117,7 +117,7 @@ //! Animal::default() as i32, //! glib::ParamFlags::READWRITE, //! ), -//! glib::ParamSpec::flags( +//! glib::ParamSpec::new_flags( //! "flags", //! "Flags", //! "Flags", @@ -134,7 +134,7 @@ //! // Called whenever a property is set on this instance. The id //! // is the same as the index of the property in the PROPERTIES array. //! fn set_property(&self, _obj: &Self::Type, _id: usize, value: &glib::Value, pspec: &glib::ParamSpec) { -//! match pspec.get_name() { +//! match pspec.name() { //! "name" => { //! let name = value //! .get() @@ -160,7 +160,7 @@ //! // Called whenever a property is retrieved from this instance. The id //! // is the same as the index of the property in the PROPERTIES array. //! fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value { -//! match pspec.get_name() { +//! match pspec.name() { //! "name" => self.name.borrow().to_value(), //! "animal" => self.animal.get().to_value(), //! "flags" => self.flags.get().to_value(), diff --git a/glib/src/subclass/object.rs b/glib/src/subclass/object.rs index d93457f62e2f..b4d327238eb3 100644 --- a/glib/src/subclass/object.rs +++ b/glib/src/subclass/object.rs @@ -65,7 +65,7 @@ unsafe extern "C" fn get_property( pspec: *mut gobject_ffi::GParamSpec, ) { let instance = &*(obj as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); let v = imp.get_property( &from_glib_borrow::<_, Object>(obj).unsafe_cast_ref(), @@ -93,7 +93,7 @@ unsafe extern "C" fn set_property( pspec: *mut gobject_ffi::GParamSpec, ) { let instance = &*(obj as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); imp.set_property( &from_glib_borrow::<_, Object>(obj).unsafe_cast_ref(), id as usize, @@ -104,20 +104,20 @@ unsafe extern "C" fn set_property( unsafe extern "C" fn constructed(obj: *mut gobject_ffi::GObject) { let instance = &*(obj as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); imp.constructed(&from_glib_borrow::<_, Object>(obj).unsafe_cast_ref()); } unsafe extern "C" fn dispose(obj: *mut gobject_ffi::GObject) { let instance = &*(obj as *mut T::Instance); - let imp = instance.get_impl(); + let imp = instance.impl_(); imp.dispose(&from_glib_borrow::<_, Object>(obj).unsafe_cast_ref()); // Chain up to the parent's dispose. let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut gobject_ffi::GObjectClass; + let parent_class = data.as_ref().parent_class() as *mut gobject_ffi::GObjectClass; if let Some(ref func) = (*parent_class).dispose { func(obj); } @@ -196,7 +196,7 @@ impl ObjectImplExt for T { fn parent_constructed(&self, obj: &Self::Type) { unsafe { let data = T::type_data(); - let parent_class = data.as_ref().get_parent_class() as *mut gobject_ffi::GObjectClass; + let parent_class = data.as_ref().parent_class() as *mut gobject_ffi::GObjectClass; if let Some(ref func) = (*parent_class).constructed { func(obj.unsafe_cast_ref::().to_glib_none().0); @@ -211,7 +211,7 @@ impl ObjectImplExt for T { ) -> Option { unsafe { super::types::signal_chain_from_overridden( - self.get_instance().as_ptr() as *mut _, + self.instance().as_ptr() as *mut _, token, values, ) @@ -315,28 +315,28 @@ mod test { use once_cell::sync::Lazy; static PROPERTIES: Lazy> = Lazy::new(|| { vec![ - crate::ParamSpec::string( + crate::ParamSpec::new_string( "name", "Name", "Name of this object", None, crate::ParamFlags::READWRITE, ), - crate::ParamSpec::string( + crate::ParamSpec::new_string( "construct-name", "Construct Name", "Construct Name of this object", None, crate::ParamFlags::READWRITE | crate::ParamFlags::CONSTRUCT_ONLY, ), - crate::ParamSpec::boolean( + crate::ParamSpec::new_boolean( "constructed", "Constructed", "True if the constructed() virtual method was called", false, crate::ParamFlags::READABLE, ), - crate::ParamSpec::object( + crate::ParamSpec::new_object( "child", "Child", "Child object", @@ -356,7 +356,7 @@ mod test { value: &Value, pspec: &crate::ParamSpec, ) { - match pspec.get_name() { + match pspec.name() { "name" => { let name = value .get() @@ -384,7 +384,7 @@ mod test { _id: usize, pspec: &crate::ParamSpec, ) -> Value { - match pspec.get_name() { + match pspec.name() { "name" => self.name.borrow().to_value(), "construct-name" => self.construct_name.borrow().to_value(), "constructed" => self.constructed.borrow().to_value(), @@ -395,7 +395,7 @@ mod test { fn constructed(&self, obj: &Self::Type) { self.parent_constructed(obj); - assert_eq!(obj, &self.get_instance()); + assert_eq!(obj, &self.instance()); assert_eq!(self as *const _, Self::from_instance(obj) as *const _); *self.constructed.borrow_mut() = true; @@ -436,7 +436,7 @@ mod test { let type_ = SimpleObject::static_type(); let obj = Object::with_type(type_, &[]).expect("Object::new failed"); - assert!(obj.get_type().is_a(Dummy::static_type())); + assert!(obj.type_().is_a(Dummy::static_type())); assert_eq!( obj.get_property("constructed") @@ -456,7 +456,7 @@ mod test { let obj: ChildObject = Object::new(&[]).expect("Object::new failed"); let imp = imp::ChildObject::from_instance(&obj); - assert_eq!(obj, imp.get_instance()); + assert_eq!(obj, imp.instance()); } #[test] diff --git a/glib/src/subclass/types.rs b/glib/src/subclass/types.rs index f8da46943fd0..de17c39dd7e4 100644 --- a/glib/src/subclass/types.rs +++ b/glib/src/subclass/types.rs @@ -50,10 +50,10 @@ pub unsafe trait InstanceStruct: Sized + 'static { /// is the implementor of [`ObjectImpl`] or subtraits. /// /// [`ObjectImpl`]: ../object/trait.ObjectImpl.html - fn get_impl(&self) -> &Self::Type { + fn impl_(&self) -> &Self::Type { unsafe { let data = Self::Type::type_data(); - let private_offset = data.as_ref().get_impl_offset(); + let private_offset = data.as_ref().impl_offset(); let ptr: *const u8 = self as *const _ as *const u8; let imp_ptr = ptr.offset(private_offset); let imp = imp_ptr as *const Self::Type; @@ -63,7 +63,7 @@ pub unsafe trait InstanceStruct: Sized + 'static { } /// Returns the class struct for this specific instance. - fn get_class(&self) -> &::Class { + fn class(&self) -> &::Class { unsafe { &**(self as *const _ as *const *const ::Class) } } @@ -281,7 +281,7 @@ unsafe impl Sync for TypeData {} impl TypeData { /// Returns the type ID. - pub fn get_type(&self) -> Type { + pub fn type_(&self) -> Type { self.type_ } @@ -289,7 +289,7 @@ impl TypeData { /// /// This is used for chaining up to the parent class' implementation /// of virtual methods. - pub fn get_parent_class(&self) -> ffi::gpointer { + pub fn parent_class(&self) -> ffi::gpointer { debug_assert!(!self.parent_class.is_null()); self.parent_class } @@ -362,7 +362,7 @@ impl TypeData { /// Returns the offset of the private implementation struct in bytes relative to the beginning /// of the instance struct. - pub fn get_impl_offset(&self) -> isize { + pub fn impl_offset(&self) -> isize { self.private_offset + self.private_imp_offset } } @@ -496,7 +496,7 @@ pub trait ObjectSubclass: ObjectSubclassType + Sized + 'static { /// Extension methods for all `ObjectSubclass` impls. pub trait ObjectSubclassExt: ObjectSubclass { /// Returns the corresponding object instance. - fn get_instance(&self) -> Self::Type; + fn instance(&self) -> Self::Type; /// Returns the implementation from an instance. fn from_instance(obj: &Self::Type) -> &Self; @@ -508,13 +508,13 @@ pub trait ObjectSubclassExt: ObjectSubclass { } impl ObjectSubclassExt for T { - fn get_instance(&self) -> Self::Type { + fn instance(&self) -> Self::Type { unsafe { let data = Self::type_data(); - let type_ = data.as_ref().get_type(); + let type_ = data.as_ref().type_(); assert!(type_.is_valid()); - let offset = -data.as_ref().get_impl_offset(); + let offset = -data.as_ref().impl_offset(); let ptr = self as *const Self as *const u8; let ptr = ptr.offset(offset); @@ -535,7 +535,7 @@ impl ObjectSubclassExt for T { fn from_instance(obj: &Self::Type) -> &Self { unsafe { let ptr = obj.as_ptr() as *const Self::Instance; - (*ptr).get_impl() + (*ptr).impl_() } } @@ -545,7 +545,7 @@ impl ObjectSubclassExt for T { fn get_instance_data(&self, type_: Type) -> Option<&U> { unsafe { let type_data = Self::type_data(); - let self_type_ = type_data.as_ref().get_type(); + let self_type_ = type_data.as_ref().type_(); assert!(self_type_.is_valid()); let offset = -type_data.as_ref().private_imp_offset; @@ -600,7 +600,7 @@ impl InitializingObject { pub fn set_instance_data(&mut self, type_: Type, data: U) { unsafe { let type_data = T::type_data(); - let self_type_ = type_data.as_ref().get_type(); + let self_type_ = type_data.as_ref().type_(); assert!(self_type_.is_valid()); let offset = type_data.as_ref().private_offset; @@ -707,7 +707,7 @@ unsafe extern "C" fn finalize(obj: *mut gobject_ffi::GObject) } // Chain up to the parent class' finalize implementation, if any. - let parent_class = &*(data.as_ref().get_parent_class() as *const gobject_ffi::GObjectClass); + let parent_class = &*(data.as_ref().parent_class() as *const gobject_ffi::GObjectClass); if let Some(ref func) = parent_class.finalize { func(obj); } diff --git a/glib/src/thread_pool.rs b/glib/src/thread_pool.rs index 2d2bba1d9f65..21ba6c443526 100644 --- a/glib/src/thread_pool.rs +++ b/glib/src/thread_pool.rs @@ -104,7 +104,7 @@ impl ThreadPool { } #[doc(alias = "g_thread_pool_get_max_threads")] - pub fn get_max_threads(&self) -> Option { + pub fn max_threads(&self) -> Option { unsafe { let max_threads = ffi::g_thread_pool_get_max_threads(self.0.as_ptr()); if max_threads == -1 { @@ -116,12 +116,12 @@ impl ThreadPool { } #[doc(alias = "g_thread_pool_get_num_threads")] - pub fn get_num_threads(&self) -> u32 { + pub fn num_threads(&self) -> u32 { unsafe { ffi::g_thread_pool_get_num_threads(self.0.as_ptr()) } } #[doc(alias = "g_thread_pool_unprocessed")] - pub fn get_unprocessed(&self) -> u32 { + pub fn unprocessed(&self) -> u32 { unsafe { ffi::g_thread_pool_unprocessed(self.0.as_ptr()) } } diff --git a/glib/src/variant.rs b/glib/src/variant.rs index 73ef10e5bfa3..c2d93232fa6f 100644 --- a/glib/src/variant.rs +++ b/glib/src/variant.rs @@ -31,20 +31,20 @@ //! //! // `get_str` tries to borrow a string slice. //! let hello = "Hello!".to_variant(); -//! assert_eq!(hello.get_str(), Some("Hello!")); -//! assert_eq!(num.get_str(), None); +//! assert_eq!(hello.str(), Some("Hello!")); +//! assert_eq!(num.str(), None); //! //! // Variant carrying a Variant -//! let variant = Variant::variant(&hello); -//! let variant = variant.get_variant().unwrap(); -//! assert_eq!(variant.get_str(), Some("Hello!")); +//! let variant = Variant::from_variant(&hello); +//! let variant = variant.as_variant().unwrap(); +//! assert_eq!(variant.str(), Some("Hello!")); //! //! // Variant carrying an array //! let array = ["Hello".to_variant(), "there!".to_variant()]; -//! let variant = Variant::array::<&str>(&array); +//! let variant = Variant::from_array::<&str>(&array); //! assert_eq!(variant.n_children(), 2); -//! assert_eq!(variant.get_child_value(0).get_str(), Some("Hello")); -//! assert_eq!(variant.get_child_value(1).get_str(), Some("there!")); +//! assert_eq!(variant.get_child_value(0).str(), Some("Hello")); +//! assert_eq!(variant.get_child_value(1).str(), Some("there!")); //! //! // You can also convert from and to a Vec //! let array = vec!["Hello", "there!"].to_variant(); @@ -170,7 +170,7 @@ impl Variant { /// Boxes value. #[inline] - pub fn variant(value: &Variant) -> Self { + pub fn from_variant(value: &Variant) -> Self { unsafe { from_glib_none(ffi::g_variant_new_variant(value.to_glib_none().0)) } } @@ -178,7 +178,7 @@ impl Variant { /// /// Returns `Some` if self contains a `Variant`. #[inline] - pub fn get_variant(&self) -> Option { + pub fn as_variant(&self) -> Option { unsafe { from_glib_none(ffi::g_variant_get_variant(self.to_glib_none().0)) } } @@ -199,7 +199,7 @@ impl Variant { /// /// Returns `Some` if the variant has a string type (`s`, `o` or `g` type /// strings). - pub fn get_str(&self) -> Option<&str> { + pub fn str(&self) -> Option<&str> { unsafe { match self.type_().to_str() { "s" | "o" | "g" => { @@ -219,7 +219,7 @@ impl Variant { /// Creates a new GVariant array from children. /// /// All children must be of type `T`. - pub fn array(children: &[Variant]) -> Self { + pub fn from_array(children: &[Variant]) -> Self { let type_ = T::static_variant_type(); for child in children { @@ -235,7 +235,7 @@ impl Variant { } /// Creates a new GVariant tuple from children. - pub fn tuple(children: &[Variant]) -> Self { + pub fn from_tuple(children: &[Variant]) -> Self { unsafe { from_glib_none(ffi::g_variant_new_tuple( children.to_glib_none().0, @@ -245,7 +245,7 @@ impl Variant { } /// Creates a new maybe Variant. - pub fn maybe(child: Option<&Variant>) -> Self { + pub fn from_maybe(child: Option<&Variant>) -> Self { let type_ = T::static_variant_type(); let ptr = match child { Some(child) => { @@ -295,7 +295,7 @@ impl Variant { } /// Returns the serialised form of a GVariant instance. - pub fn get_data_as_bytes(&self) -> Bytes { + pub fn data_as_bytes(&self) -> Bytes { unsafe { from_glib_full(ffi::g_variant_get_data_as_bytes(self.to_glib_none().0)) } } @@ -497,7 +497,7 @@ impl ToVariant for String { impl FromVariant for String { fn from_variant(variant: &Variant) -> Option { - variant.get_str().map(String::from) + variant.str().map(String::from) } } @@ -526,7 +526,7 @@ impl StaticVariantType for Option { impl ToVariant for Option { fn to_variant(&self) -> Variant { - Variant::maybe::(self.as_ref().map(|m| m.to_variant()).as_ref()) + Variant::from_maybe::(self.as_ref().map(|m| m.to_variant()).as_ref()) } } @@ -581,7 +581,7 @@ impl ToVariant for Vec { for child in self { vec.push(child.to_variant()); } - Variant::array::(&vec) + Variant::from_array::(&vec) } } @@ -629,7 +629,7 @@ where let entry = DictEntry::new(key, value).to_variant(); vec.push(entry); } - Variant::array::>(&vec) + Variant::from_array::>(&vec) } } @@ -648,7 +648,7 @@ where /// DictEntry::new("uuid", 1000u32).to_variant(), /// DictEntry::new("guid", 1001u32).to_variant(), /// ]; -/// let dict = Variant::array::>(&entries); +/// let dict = Variant::from_array::>(&entries); /// assert_eq!(dict.n_children(), 2); /// assert_eq!(dict.type_().to_str(), "a{su}"); /// ``` @@ -711,13 +711,13 @@ where impl ToVariant for Variant { fn to_variant(&self) -> Variant { - Variant::variant(self) + Variant::from_variant(self) } } impl FromVariant for Variant { fn from_variant(variant: &Variant) -> Option { - variant.get_variant() + variant.as_variant() } } @@ -795,7 +795,7 @@ macro_rules! tuple_impls { let field = self.$n.to_variant(); fields.push(field); )+ - Variant::tuple(&fields) + Variant::from_tuple(&fields) } } )+ @@ -868,7 +868,7 @@ mod tests { fn test_str() { let s = "this is a test"; let v = s.to_variant(); - assert_eq!(v.get_str(), Some(s)); + assert_eq!(v.str(), Some(s)); } #[test] diff --git a/glib/src/variant_iter.rs b/glib/src/variant_iter.rs index df3e6c43d6f9..6259f4aeea9e 100644 --- a/glib/src/variant_iter.rs +++ b/glib/src/variant_iter.rs @@ -67,14 +67,14 @@ mod tests { #[test] fn test_variant_iter_variant() { - let v = Variant::variant(&"foo".to_string().to_variant()); + let v = Variant::from_variant(&"foo".to_string().to_variant()); let vec: Vec = v.iter().map(|i| i.get().unwrap()).collect(); assert_eq!(vec, vec!["foo".to_string()]); } #[test] fn test_variant_iter_array() { - let v = Variant::array::(&[ + let v = Variant::from_array::(&[ "foo".to_string().to_variant(), "bar".to_string().to_variant(), ]); @@ -84,7 +84,7 @@ mod tests { #[test] fn test_variant_iter_tuple() { - let v = Variant::tuple(&[ + let v = Variant::from_tuple(&[ "foo".to_string().to_variant(), "bar".to_string().to_variant(), ]); diff --git a/glib/sys/versions.txt b/glib/sys/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/glib/sys/versions.txt +++ b/glib/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/graphene/src/auto/box_.rs b/graphene/src/auto/box_.rs index 0a67ead228bc..637b2ff93c9f 100644 --- a/graphene/src/auto/box_.rs +++ b/graphene/src/auto/box_.rs @@ -91,7 +91,7 @@ impl Box { } #[doc(alias = "graphene_box_get_bounding_sphere")] - pub fn get_bounding_sphere(&self) -> Sphere { + pub fn bounding_sphere(&self) -> Sphere { unsafe { let mut sphere = Sphere::uninitialized(); ffi::graphene_box_get_bounding_sphere( @@ -103,7 +103,7 @@ impl Box { } #[doc(alias = "graphene_box_get_center")] - pub fn get_center(&self) -> Point3D { + pub fn center(&self) -> Point3D { unsafe { let mut center = Point3D::uninitialized(); ffi::graphene_box_get_center(self.to_glib_none().0, center.to_glib_none_mut().0); @@ -112,17 +112,17 @@ impl Box { } #[doc(alias = "graphene_box_get_depth")] - pub fn get_depth(&self) -> f32 { + pub fn depth(&self) -> f32 { unsafe { ffi::graphene_box_get_depth(self.to_glib_none().0) } } #[doc(alias = "graphene_box_get_height")] - pub fn get_height(&self) -> f32 { + pub fn height(&self) -> f32 { unsafe { ffi::graphene_box_get_height(self.to_glib_none().0) } } #[doc(alias = "graphene_box_get_max")] - pub fn get_max(&self) -> Point3D { + pub fn max(&self) -> Point3D { unsafe { let mut max = Point3D::uninitialized(); ffi::graphene_box_get_max(self.to_glib_none().0, max.to_glib_none_mut().0); @@ -131,7 +131,7 @@ impl Box { } #[doc(alias = "graphene_box_get_min")] - pub fn get_min(&self) -> Point3D { + pub fn min(&self) -> Point3D { unsafe { let mut min = Point3D::uninitialized(); ffi::graphene_box_get_min(self.to_glib_none().0, min.to_glib_none_mut().0); @@ -140,7 +140,7 @@ impl Box { } #[doc(alias = "graphene_box_get_size")] - pub fn get_size(&self) -> Vec3 { + pub fn size(&self) -> Vec3 { unsafe { let mut size = Vec3::uninitialized(); ffi::graphene_box_get_size(self.to_glib_none().0, size.to_glib_none_mut().0); @@ -149,12 +149,12 @@ impl Box { } //#[doc(alias = "graphene_box_get_vertices")] - //pub fn get_vertices(&self, vertices: /*Unimplemented*/FixedArray TypeId { ns_id: 1, id: 0 }; 8) { + //pub fn vertices(&self, vertices: /*Unimplemented*/FixedArray TypeId { ns_id: 1, id: 0 }; 8) { // unsafe { TODO: call ffi:graphene_box_get_vertices() } //} #[doc(alias = "graphene_box_get_width")] - pub fn get_width(&self) -> f32 { + pub fn width(&self) -> f32 { unsafe { ffi::graphene_box_get_width(self.to_glib_none().0) } } diff --git a/graphene/src/auto/euler.rs b/graphene/src/auto/euler.rs index c1ee4efa18fa..6870b86c3111 100644 --- a/graphene/src/auto/euler.rs +++ b/graphene/src/auto/euler.rs @@ -35,41 +35,41 @@ impl Euler { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "graphene_euler_get_alpha")] - pub fn get_alpha(&self) -> f32 { + pub fn alpha(&self) -> f32 { unsafe { ffi::graphene_euler_get_alpha(self.to_glib_none().0) } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "graphene_euler_get_beta")] - pub fn get_beta(&self) -> f32 { + pub fn beta(&self) -> f32 { unsafe { ffi::graphene_euler_get_beta(self.to_glib_none().0) } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "graphene_euler_get_gamma")] - pub fn get_gamma(&self) -> f32 { + pub fn gamma(&self) -> f32 { unsafe { ffi::graphene_euler_get_gamma(self.to_glib_none().0) } } #[doc(alias = "graphene_euler_get_order")] - pub fn get_order(&self) -> EulerOrder { + pub fn order(&self) -> EulerOrder { unsafe { from_glib(ffi::graphene_euler_get_order(self.to_glib_none().0)) } } #[doc(alias = "graphene_euler_get_x")] - pub fn get_x(&self) -> f32 { + pub fn x(&self) -> f32 { unsafe { ffi::graphene_euler_get_x(self.to_glib_none().0) } } #[doc(alias = "graphene_euler_get_y")] - pub fn get_y(&self) -> f32 { + pub fn y(&self) -> f32 { unsafe { ffi::graphene_euler_get_y(self.to_glib_none().0) } } #[doc(alias = "graphene_euler_get_z")] - pub fn get_z(&self) -> f32 { + pub fn z(&self) -> f32 { unsafe { ffi::graphene_euler_get_z(self.to_glib_none().0) } } diff --git a/graphene/src/auto/frustum.rs b/graphene/src/auto/frustum.rs index 104506898960..3ea97f3a189b 100644 --- a/graphene/src/auto/frustum.rs +++ b/graphene/src/auto/frustum.rs @@ -44,7 +44,7 @@ impl Frustum { } //#[doc(alias = "graphene_frustum_get_planes")] - //pub fn get_planes(&self, planes: /*Unimplemented*/FixedArray TypeId { ns_id: 1, id: 8 }; 6) { + //pub fn planes(&self, planes: /*Unimplemented*/FixedArray TypeId { ns_id: 1, id: 8 }; 6) { // unsafe { TODO: call ffi:graphene_frustum_get_planes() } //} diff --git a/graphene/src/auto/matrix.rs b/graphene/src/auto/matrix.rs index 1b4e156b5a0b..62c50df21a0f 100644 --- a/graphene/src/auto/matrix.rs +++ b/graphene/src/auto/matrix.rs @@ -98,38 +98,38 @@ impl Matrix { } #[doc(alias = "graphene_matrix_get_x_scale")] - pub fn get_x_scale(&self) -> f32 { + pub fn x_scale(&self) -> f32 { unsafe { ffi::graphene_matrix_get_x_scale(self.to_glib_none().0) } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "graphene_matrix_get_x_translation")] - pub fn get_x_translation(&self) -> f32 { + pub fn x_translation(&self) -> f32 { unsafe { ffi::graphene_matrix_get_x_translation(self.to_glib_none().0) } } #[doc(alias = "graphene_matrix_get_y_scale")] - pub fn get_y_scale(&self) -> f32 { + pub fn y_scale(&self) -> f32 { unsafe { ffi::graphene_matrix_get_y_scale(self.to_glib_none().0) } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "graphene_matrix_get_y_translation")] - pub fn get_y_translation(&self) -> f32 { + pub fn y_translation(&self) -> f32 { unsafe { ffi::graphene_matrix_get_y_translation(self.to_glib_none().0) } } #[doc(alias = "graphene_matrix_get_z_scale")] - pub fn get_z_scale(&self) -> f32 { + pub fn z_scale(&self) -> f32 { unsafe { ffi::graphene_matrix_get_z_scale(self.to_glib_none().0) } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "graphene_matrix_get_z_translation")] - pub fn get_z_translation(&self) -> f32 { + pub fn z_translation(&self) -> f32 { unsafe { ffi::graphene_matrix_get_z_translation(self.to_glib_none().0) } } diff --git a/graphene/src/auto/plane.rs b/graphene/src/auto/plane.rs index 09e2b0f02afd..fa3cb8e20b56 100644 --- a/graphene/src/auto/plane.rs +++ b/graphene/src/auto/plane.rs @@ -40,12 +40,12 @@ impl Plane { } #[doc(alias = "graphene_plane_get_constant")] - pub fn get_constant(&self) -> f32 { + pub fn constant(&self) -> f32 { unsafe { ffi::graphene_plane_get_constant(self.to_glib_none().0) } } #[doc(alias = "graphene_plane_get_normal")] - pub fn get_normal(&self) -> Vec3 { + pub fn normal(&self) -> Vec3 { unsafe { let mut normal = Vec3::uninitialized(); ffi::graphene_plane_get_normal(self.to_glib_none().0, normal.to_glib_none_mut().0); diff --git a/graphene/src/auto/ray.rs b/graphene/src/auto/ray.rs index 2f2e27827ec5..f58a30d891a1 100644 --- a/graphene/src/auto/ray.rs +++ b/graphene/src/auto/ray.rs @@ -60,7 +60,7 @@ impl Ray { } #[doc(alias = "graphene_ray_get_direction")] - pub fn get_direction(&self) -> Vec3 { + pub fn direction(&self) -> Vec3 { unsafe { let mut direction = Vec3::uninitialized(); ffi::graphene_ray_get_direction(self.to_glib_none().0, direction.to_glib_none_mut().0); @@ -83,7 +83,7 @@ impl Ray { } #[doc(alias = "graphene_ray_get_origin")] - pub fn get_origin(&self) -> Point3D { + pub fn origin(&self) -> Point3D { unsafe { let mut origin = Point3D::uninitialized(); ffi::graphene_ray_get_origin(self.to_glib_none().0, origin.to_glib_none_mut().0); diff --git a/graphene/src/auto/rect.rs b/graphene/src/auto/rect.rs index febb7185ed71..570485c1d1d2 100644 --- a/graphene/src/auto/rect.rs +++ b/graphene/src/auto/rect.rs @@ -65,12 +65,12 @@ impl Rect { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(alias = "graphene_rect_get_area")] - pub fn get_area(&self) -> f32 { + pub fn area(&self) -> f32 { unsafe { ffi::graphene_rect_get_area(self.to_glib_none().0) } } #[doc(alias = "graphene_rect_get_bottom_left")] - pub fn get_bottom_left(&self) -> Point { + pub fn bottom_left(&self) -> Point { unsafe { let mut p = Point::uninitialized(); ffi::graphene_rect_get_bottom_left(self.to_glib_none().0, p.to_glib_none_mut().0); @@ -79,7 +79,7 @@ impl Rect { } #[doc(alias = "graphene_rect_get_bottom_right")] - pub fn get_bottom_right(&self) -> Point { + pub fn bottom_right(&self) -> Point { unsafe { let mut p = Point::uninitialized(); ffi::graphene_rect_get_bottom_right(self.to_glib_none().0, p.to_glib_none_mut().0); @@ -88,7 +88,7 @@ impl Rect { } #[doc(alias = "graphene_rect_get_center")] - pub fn get_center(&self) -> Point { + pub fn center(&self) -> Point { unsafe { let mut p = Point::uninitialized(); ffi::graphene_rect_get_center(self.to_glib_none().0, p.to_glib_none_mut().0); @@ -97,12 +97,12 @@ impl Rect { } #[doc(alias = "graphene_rect_get_height")] - pub fn get_height(&self) -> f32 { + pub fn height(&self) -> f32 { unsafe { ffi::graphene_rect_get_height(self.to_glib_none().0) } } #[doc(alias = "graphene_rect_get_top_left")] - pub fn get_top_left(&self) -> Point { + pub fn top_left(&self) -> Point { unsafe { let mut p = Point::uninitialized(); ffi::graphene_rect_get_top_left(self.to_glib_none().0, p.to_glib_none_mut().0); @@ -111,7 +111,7 @@ impl Rect { } #[doc(alias = "graphene_rect_get_top_right")] - pub fn get_top_right(&self) -> Point { + pub fn top_right(&self) -> Point { unsafe { let mut p = Point::uninitialized(); ffi::graphene_rect_get_top_right(self.to_glib_none().0, p.to_glib_none_mut().0); @@ -120,22 +120,22 @@ impl Rect { } //#[doc(alias = "graphene_rect_get_vertices")] - //pub fn get_vertices(&self, vertices: /*Unimplemented*/FixedArray TypeId { ns_id: 1, id: 16 }; 4) { + //pub fn vertices(&self, vertices: /*Unimplemented*/FixedArray TypeId { ns_id: 1, id: 16 }; 4) { // unsafe { TODO: call ffi:graphene_rect_get_vertices() } //} #[doc(alias = "graphene_rect_get_width")] - pub fn get_width(&self) -> f32 { + pub fn width(&self) -> f32 { unsafe { ffi::graphene_rect_get_width(self.to_glib_none().0) } } #[doc(alias = "graphene_rect_get_x")] - pub fn get_x(&self) -> f32 { + pub fn x(&self) -> f32 { unsafe { ffi::graphene_rect_get_x(self.to_glib_none().0) } } #[doc(alias = "graphene_rect_get_y")] - pub fn get_y(&self) -> f32 { + pub fn y(&self) -> f32 { unsafe { ffi::graphene_rect_get_y(self.to_glib_none().0) } } diff --git a/graphene/src/auto/sphere.rs b/graphene/src/auto/sphere.rs index 473409e0753a..9c1fe2cf610c 100644 --- a/graphene/src/auto/sphere.rs +++ b/graphene/src/auto/sphere.rs @@ -46,7 +46,7 @@ impl Sphere { } #[doc(alias = "graphene_sphere_get_bounding_box")] - pub fn get_bounding_box(&self) -> Box { + pub fn bounding_box(&self) -> Box { unsafe { let mut box_ = Box::uninitialized(); ffi::graphene_sphere_get_bounding_box(self.to_glib_none().0, box_.to_glib_none_mut().0); @@ -55,7 +55,7 @@ impl Sphere { } #[doc(alias = "graphene_sphere_get_center")] - pub fn get_center(&self) -> Point3D { + pub fn center(&self) -> Point3D { unsafe { let mut center = Point3D::uninitialized(); ffi::graphene_sphere_get_center(self.to_glib_none().0, center.to_glib_none_mut().0); @@ -64,7 +64,7 @@ impl Sphere { } #[doc(alias = "graphene_sphere_get_radius")] - pub fn get_radius(&self) -> f32 { + pub fn radius(&self) -> f32 { unsafe { ffi::graphene_sphere_get_radius(self.to_glib_none().0) } } diff --git a/graphene/src/auto/triangle.rs b/graphene/src/auto/triangle.rs index 5edc28f7718f..69650c413cc6 100644 --- a/graphene/src/auto/triangle.rs +++ b/graphene/src/auto/triangle.rs @@ -44,7 +44,7 @@ impl Triangle { } #[doc(alias = "graphene_triangle_get_area")] - pub fn get_area(&self) -> f32 { + pub fn area(&self) -> f32 { unsafe { ffi::graphene_triangle_get_area(self.to_glib_none().0) } } @@ -66,7 +66,7 @@ impl Triangle { } #[doc(alias = "graphene_triangle_get_bounding_box")] - pub fn get_bounding_box(&self) -> Box { + pub fn bounding_box(&self) -> Box { unsafe { let mut res = Box::uninitialized(); ffi::graphene_triangle_get_bounding_box( @@ -78,7 +78,7 @@ impl Triangle { } #[doc(alias = "graphene_triangle_get_midpoint")] - pub fn get_midpoint(&self) -> Point3D { + pub fn midpoint(&self) -> Point3D { unsafe { let mut res = Point3D::uninitialized(); ffi::graphene_triangle_get_midpoint(self.to_glib_none().0, res.to_glib_none_mut().0); @@ -87,7 +87,7 @@ impl Triangle { } #[doc(alias = "graphene_triangle_get_normal")] - pub fn get_normal(&self) -> Vec3 { + pub fn normal(&self) -> Vec3 { unsafe { let mut res = Vec3::uninitialized(); ffi::graphene_triangle_get_normal(self.to_glib_none().0, res.to_glib_none_mut().0); @@ -96,7 +96,7 @@ impl Triangle { } #[doc(alias = "graphene_triangle_get_plane")] - pub fn get_plane(&self) -> Plane { + pub fn plane(&self) -> Plane { unsafe { let mut res = Plane::uninitialized(); ffi::graphene_triangle_get_plane(self.to_glib_none().0, res.to_glib_none_mut().0); @@ -105,7 +105,7 @@ impl Triangle { } #[doc(alias = "graphene_triangle_get_points")] - pub fn get_points(&self) -> (Point3D, Point3D, Point3D) { + pub fn points(&self) -> (Point3D, Point3D, Point3D) { unsafe { let mut a = Point3D::uninitialized(); let mut b = Point3D::uninitialized(); @@ -149,7 +149,7 @@ impl Triangle { } #[doc(alias = "graphene_triangle_get_vertices")] - pub fn get_vertices(&self) -> (Vec3, Vec3, Vec3) { + pub fn vertices(&self) -> (Vec3, Vec3, Vec3) { unsafe { let mut a = Vec3::uninitialized(); let mut b = Vec3::uninitialized(); diff --git a/graphene/src/auto/vec2.rs b/graphene/src/auto/vec2.rs index b0ef2b6853fa..aa97c80b15af 100644 --- a/graphene/src/auto/vec2.rs +++ b/graphene/src/auto/vec2.rs @@ -60,12 +60,12 @@ impl Vec2 { } #[doc(alias = "graphene_vec2_get_x")] - pub fn get_x(&self) -> f32 { + pub fn x(&self) -> f32 { unsafe { ffi::graphene_vec2_get_x(self.to_glib_none().0) } } #[doc(alias = "graphene_vec2_get_y")] - pub fn get_y(&self) -> f32 { + pub fn y(&self) -> f32 { unsafe { ffi::graphene_vec2_get_y(self.to_glib_none().0) } } diff --git a/graphene/src/auto/vec3.rs b/graphene/src/auto/vec3.rs index bef3782a8a14..9daff049c895 100644 --- a/graphene/src/auto/vec3.rs +++ b/graphene/src/auto/vec3.rs @@ -75,12 +75,12 @@ impl Vec3 { } #[doc(alias = "graphene_vec3_get_x")] - pub fn get_x(&self) -> f32 { + pub fn x(&self) -> f32 { unsafe { ffi::graphene_vec3_get_x(self.to_glib_none().0) } } #[doc(alias = "graphene_vec3_get_xy")] - pub fn get_xy(&self) -> Vec2 { + pub fn xy(&self) -> Vec2 { unsafe { let mut res = Vec2::uninitialized(); ffi::graphene_vec3_get_xy(self.to_glib_none().0, res.to_glib_none_mut().0); @@ -89,7 +89,7 @@ impl Vec3 { } #[doc(alias = "graphene_vec3_get_xy0")] - pub fn get_xy0(&self) -> Vec3 { + pub fn xy0(&self) -> Vec3 { unsafe { let mut res = Vec3::uninitialized(); ffi::graphene_vec3_get_xy0(self.to_glib_none().0, res.to_glib_none_mut().0); @@ -98,7 +98,7 @@ impl Vec3 { } #[doc(alias = "graphene_vec3_get_xyz0")] - pub fn get_xyz0(&self) -> Vec4 { + pub fn xyz0(&self) -> Vec4 { unsafe { let mut res = Vec4::uninitialized(); ffi::graphene_vec3_get_xyz0(self.to_glib_none().0, res.to_glib_none_mut().0); @@ -107,7 +107,7 @@ impl Vec3 { } #[doc(alias = "graphene_vec3_get_xyz1")] - pub fn get_xyz1(&self) -> Vec4 { + pub fn xyz1(&self) -> Vec4 { unsafe { let mut res = Vec4::uninitialized(); ffi::graphene_vec3_get_xyz1(self.to_glib_none().0, res.to_glib_none_mut().0); @@ -125,12 +125,12 @@ impl Vec3 { } #[doc(alias = "graphene_vec3_get_y")] - pub fn get_y(&self) -> f32 { + pub fn y(&self) -> f32 { unsafe { ffi::graphene_vec3_get_y(self.to_glib_none().0) } } #[doc(alias = "graphene_vec3_get_z")] - pub fn get_z(&self) -> f32 { + pub fn z(&self) -> f32 { unsafe { ffi::graphene_vec3_get_z(self.to_glib_none().0) } } diff --git a/graphene/src/auto/vec4.rs b/graphene/src/auto/vec4.rs index 4d80096a234c..eb5f2929158c 100644 --- a/graphene/src/auto/vec4.rs +++ b/graphene/src/auto/vec4.rs @@ -62,17 +62,17 @@ impl Vec4 { } #[doc(alias = "graphene_vec4_get_w")] - pub fn get_w(&self) -> f32 { + pub fn w(&self) -> f32 { unsafe { ffi::graphene_vec4_get_w(self.to_glib_none().0) } } #[doc(alias = "graphene_vec4_get_x")] - pub fn get_x(&self) -> f32 { + pub fn x(&self) -> f32 { unsafe { ffi::graphene_vec4_get_x(self.to_glib_none().0) } } #[doc(alias = "graphene_vec4_get_xy")] - pub fn get_xy(&self) -> Vec2 { + pub fn xy(&self) -> Vec2 { unsafe { let mut res = Vec2::uninitialized(); ffi::graphene_vec4_get_xy(self.to_glib_none().0, res.to_glib_none_mut().0); @@ -81,7 +81,7 @@ impl Vec4 { } #[doc(alias = "graphene_vec4_get_xyz")] - pub fn get_xyz(&self) -> Vec3 { + pub fn xyz(&self) -> Vec3 { unsafe { let mut res = Vec3::uninitialized(); ffi::graphene_vec4_get_xyz(self.to_glib_none().0, res.to_glib_none_mut().0); @@ -90,12 +90,12 @@ impl Vec4 { } #[doc(alias = "graphene_vec4_get_y")] - pub fn get_y(&self) -> f32 { + pub fn y(&self) -> f32 { unsafe { ffi::graphene_vec4_get_y(self.to_glib_none().0) } } #[doc(alias = "graphene_vec4_get_z")] - pub fn get_z(&self) -> f32 { + pub fn z(&self) -> f32 { unsafe { ffi::graphene_vec4_get_z(self.to_glib_none().0) } } diff --git a/graphene/src/auto/versions.txt b/graphene/src/auto/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/graphene/src/auto/versions.txt +++ b/graphene/src/auto/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/graphene/src/box_.rs b/graphene/src/box_.rs index 0556ab5f550b..c0bcde25486f 100644 --- a/graphene/src/box_.rs +++ b/graphene/src/box_.rs @@ -7,7 +7,7 @@ use glib::translate::*; impl Box { #[doc(alias = "graphene_box_get_vertices")] - pub fn get_vertices(&self) -> [Vec3; 8] { + pub fn vertices(&self) -> [Vec3; 8] { unsafe { let mut out: [ffi::graphene_vec3_t; 8] = std::mem::uninitialized(); ffi::graphene_box_get_vertices(self.to_glib_none().0, &mut out as *mut _); diff --git a/graphene/src/frustum.rs b/graphene/src/frustum.rs index f573b94c0dbb..b9cad48fb6b1 100644 --- a/graphene/src/frustum.rs +++ b/graphene/src/frustum.rs @@ -7,7 +7,7 @@ use glib::translate::*; impl Frustum { #[doc(alias = "graphene_frustum_get_planes")] - pub fn get_planes(&self) -> [Plane; 6] { + pub fn planes(&self) -> [Plane; 6] { unsafe { let mut out: [ffi::graphene_plane_t; 6] = std::mem::uninitialized(); ffi::graphene_frustum_get_planes(self.to_glib_none().0, &mut out as *mut _); diff --git a/graphene/src/rect.rs b/graphene/src/rect.rs index 2be92d9bb335..d93be50948eb 100644 --- a/graphene/src/rect.rs +++ b/graphene/src/rect.rs @@ -6,7 +6,7 @@ use glib::translate::*; impl Rect { #[doc(alias = "graphene_rect_get_vertices")] - pub fn get_vertices(&self) -> [Vec2; 4] { + pub fn vertices(&self) -> [Vec2; 4] { unsafe { let mut out: [ffi::graphene_vec2_t; 4] = std::mem::uninitialized(); ffi::graphene_rect_get_vertices(self.to_glib_none().0, &mut out as *mut _); diff --git a/graphene/sys/versions.txt b/graphene/sys/versions.txt index 1a8bfc6e267d..7c3faf664169 100644 --- a/graphene/sys/versions.txt +++ b/graphene/sys/versions.txt @@ -1,2 +1,2 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 56b95ac) +Generated by gir (https://github.com/gtk-rs/gir @ 3c6ebf4) from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6) diff --git a/gtk/Gir.toml b/gtk/Gir.toml index 8391a5cfec29..545d644984ce 100644 --- a/gtk/Gir.toml +++ b/gtk/Gir.toml @@ -1043,6 +1043,10 @@ version = "3.14" [[object.function.parameter]] name = "sequence" const = true + [[object.function]] + name = "group" + # Precise the purpose and avoid clash with `get_group`. + rename = "group_with" [[object.signal]] name = "begin" @@ -2032,6 +2036,9 @@ generate_builder = true [[object.child_prop]] name = "title" type = "utf8" + [[object.function]] + name = "get_interpolate_size" + rename = "interpolates_size" [[object]] name = "Gtk.StackSidebar" @@ -2088,6 +2095,11 @@ name = "Gtk.TextBuffer" status = "generate" generate_builder = true manual_traits = ["TextBufferExtManual"] + [[object.function]] + name = "get_insert" + # Avoid clash with the `insert` operation. + # This one retrieves the insert mark. + bypass_auto_rename = true [[object.function]] name = "register_deserialize_tagset" [object.function.return] @@ -2363,6 +2375,8 @@ status = "generate" const = true [[object.function]] name = "iter_is_valid" + # Bypass auto-rename so as to avoid automatic is prefixing + bypass_auto_rename = true [[object.function.parameter]] name = "iter" const = true @@ -2657,10 +2671,30 @@ manual_traits = ["WidgetExtManual"] manual = true doc_trait_name = "WidgetExtManual" [[object.function]] + name = "get_sensitive" + # Avoid clash with `is_sensitive`. Differences: + # - `get_sensitive`: returns the widget `sensitive` property. + # - `is_sensitive`: returns whether the widget’s is effectively sensitivity. + # meaning that the widget and all its parents are `sensitive`. + bypass_auto_rename = true + [[object.function]] + name = "get_visible" + # Avoid clash with `is_visible`. Differences: + # - `get_visible`: returns the widget `visible` property. + # - `is_visible`: returns whether the widget’s is effectively visibility. + # meaning that the widget and all its parents are `visible`. + bypass_auto_rename = true + [[object.function]] + name = "get_hexpand" + rename = "hexpands" + [[object.function]] name = "get_style_context" [object.function.return] nullable = false [[object.function]] + name = "get_vexpand" + rename = "vexpands" + [[object.function]] name = "size_allocate" [[object.function.parameter]] name = "allocation" @@ -2791,7 +2825,7 @@ manual_traits = ["WidgetExtManual"] rename = "set_widget_name" [[object.function]] name = "get_name" - rename = "get_widget_name" + rename = "widget_name" [object.function.return] nullable = false [[object.function]] diff --git a/gtk/src/app_chooser.rs b/gtk/src/app_chooser.rs index 036f76ed1d50..01bc6fa30212 100644 --- a/gtk/src/app_chooser.rs +++ b/gtk/src/app_chooser.rs @@ -15,17 +15,17 @@ glib::wrapper! { pub trait AppChooserExt: 'static { #[doc(alias = "gtk_app_chooser_get_app_info")] - fn get_app_info(&self) -> Option; + fn app_info(&self) -> Option; #[doc(alias = "gtk_app_chooser_get_content_type")] - fn get_content_type(&self) -> Option; + fn content_type(&self) -> Option; #[doc(alias = "gtk_app_chooser_refresh")] fn refresh(&self); } impl> AppChooserExt for O { - fn get_app_info(&self) -> Option { + fn app_info(&self) -> Option { unsafe { from_glib_full(ffi::gtk_app_chooser_get_app_info( self.as_ref().to_glib_none().0, @@ -33,7 +33,7 @@ impl> AppChooserExt for O { } } - fn get_content_type(&self) -> Option { + fn content_type(&self) -> Option { unsafe { from_glib_full(ffi::gtk_app_chooser_get_content_type( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/about_dialog.rs b/gtk/src/auto/about_dialog.rs index 4d790accc811..24280ab7fb86 100644 --- a/gtk/src/auto/about_dialog.rs +++ b/gtk/src/auto/about_dialog.rs @@ -786,49 +786,49 @@ pub trait AboutDialogExt: 'static { fn add_credit_section(&self, section_name: &str, people: &[&str]); #[doc(alias = "gtk_about_dialog_get_artists")] - fn get_artists(&self) -> Vec; + fn artists(&self) -> Vec; #[doc(alias = "gtk_about_dialog_get_authors")] - fn get_authors(&self) -> Vec; + fn authors(&self) -> Vec; #[doc(alias = "gtk_about_dialog_get_comments")] - fn get_comments(&self) -> Option; + fn comments(&self) -> Option; #[doc(alias = "gtk_about_dialog_get_copyright")] - fn get_copyright(&self) -> Option; + fn copyright(&self) -> Option; #[doc(alias = "gtk_about_dialog_get_documenters")] - fn get_documenters(&self) -> Vec; + fn documenters(&self) -> Vec; #[doc(alias = "gtk_about_dialog_get_license")] - fn get_license(&self) -> Option; + fn license(&self) -> Option; #[doc(alias = "gtk_about_dialog_get_license_type")] - fn get_license_type(&self) -> License; + fn license_type(&self) -> License; #[doc(alias = "gtk_about_dialog_get_logo")] - fn get_logo(&self) -> Option; + fn logo(&self) -> Option; #[doc(alias = "gtk_about_dialog_get_logo_icon_name")] - fn get_logo_icon_name(&self) -> Option; + fn logo_icon_name(&self) -> Option; #[doc(alias = "gtk_about_dialog_get_program_name")] - fn get_program_name(&self) -> Option; + fn program_name(&self) -> Option; #[doc(alias = "gtk_about_dialog_get_translator_credits")] - fn get_translator_credits(&self) -> Option; + fn translator_credits(&self) -> Option; #[doc(alias = "gtk_about_dialog_get_version")] - fn get_version(&self) -> Option; + fn version(&self) -> Option; #[doc(alias = "gtk_about_dialog_get_website")] - fn get_website(&self) -> Option; + fn website(&self) -> Option; #[doc(alias = "gtk_about_dialog_get_website_label")] - fn get_website_label(&self) -> Option; + fn website_label(&self) -> Option; #[doc(alias = "gtk_about_dialog_get_wrap_license")] - fn get_wrap_license(&self) -> bool; + fn wraps_license(&self) -> bool; #[doc(alias = "gtk_about_dialog_set_artists")] fn set_artists(&self, artists: &[&str]); @@ -934,7 +934,7 @@ impl> AboutDialogExt for O { } } - fn get_artists(&self) -> Vec { + fn artists(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gtk_about_dialog_get_artists( self.as_ref().to_glib_none().0, @@ -942,7 +942,7 @@ impl> AboutDialogExt for O { } } - fn get_authors(&self) -> Vec { + fn authors(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gtk_about_dialog_get_authors( self.as_ref().to_glib_none().0, @@ -950,7 +950,7 @@ impl> AboutDialogExt for O { } } - fn get_comments(&self) -> Option { + fn comments(&self) -> Option { unsafe { from_glib_none(ffi::gtk_about_dialog_get_comments( self.as_ref().to_glib_none().0, @@ -958,7 +958,7 @@ impl> AboutDialogExt for O { } } - fn get_copyright(&self) -> Option { + fn copyright(&self) -> Option { unsafe { from_glib_none(ffi::gtk_about_dialog_get_copyright( self.as_ref().to_glib_none().0, @@ -966,7 +966,7 @@ impl> AboutDialogExt for O { } } - fn get_documenters(&self) -> Vec { + fn documenters(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gtk_about_dialog_get_documenters( self.as_ref().to_glib_none().0, @@ -974,7 +974,7 @@ impl> AboutDialogExt for O { } } - fn get_license(&self) -> Option { + fn license(&self) -> Option { unsafe { from_glib_none(ffi::gtk_about_dialog_get_license( self.as_ref().to_glib_none().0, @@ -982,7 +982,7 @@ impl> AboutDialogExt for O { } } - fn get_license_type(&self) -> License { + fn license_type(&self) -> License { unsafe { from_glib(ffi::gtk_about_dialog_get_license_type( self.as_ref().to_glib_none().0, @@ -990,7 +990,7 @@ impl> AboutDialogExt for O { } } - fn get_logo(&self) -> Option { + fn logo(&self) -> Option { unsafe { from_glib_none(ffi::gtk_about_dialog_get_logo( self.as_ref().to_glib_none().0, @@ -998,7 +998,7 @@ impl> AboutDialogExt for O { } } - fn get_logo_icon_name(&self) -> Option { + fn logo_icon_name(&self) -> Option { unsafe { from_glib_none(ffi::gtk_about_dialog_get_logo_icon_name( self.as_ref().to_glib_none().0, @@ -1006,7 +1006,7 @@ impl> AboutDialogExt for O { } } - fn get_program_name(&self) -> Option { + fn program_name(&self) -> Option { unsafe { from_glib_none(ffi::gtk_about_dialog_get_program_name( self.as_ref().to_glib_none().0, @@ -1014,7 +1014,7 @@ impl> AboutDialogExt for O { } } - fn get_translator_credits(&self) -> Option { + fn translator_credits(&self) -> Option { unsafe { from_glib_none(ffi::gtk_about_dialog_get_translator_credits( self.as_ref().to_glib_none().0, @@ -1022,7 +1022,7 @@ impl> AboutDialogExt for O { } } - fn get_version(&self) -> Option { + fn version(&self) -> Option { unsafe { from_glib_none(ffi::gtk_about_dialog_get_version( self.as_ref().to_glib_none().0, @@ -1030,7 +1030,7 @@ impl> AboutDialogExt for O { } } - fn get_website(&self) -> Option { + fn website(&self) -> Option { unsafe { from_glib_none(ffi::gtk_about_dialog_get_website( self.as_ref().to_glib_none().0, @@ -1038,7 +1038,7 @@ impl> AboutDialogExt for O { } } - fn get_website_label(&self) -> Option { + fn website_label(&self) -> Option { unsafe { from_glib_none(ffi::gtk_about_dialog_get_website_label( self.as_ref().to_glib_none().0, @@ -1046,7 +1046,7 @@ impl> AboutDialogExt for O { } } - fn get_wrap_license(&self) -> bool { + fn wraps_license(&self) -> bool { unsafe { from_glib(ffi::gtk_about_dialog_get_wrap_license( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/accel_group.rs b/gtk/src/auto/accel_group.rs index e0cd0caf8db4..a80f34ea1c2e 100644 --- a/gtk/src/auto/accel_group.rs +++ b/gtk/src/auto/accel_group.rs @@ -65,10 +65,10 @@ pub trait AccelGroupExt: 'static { //fn find(&self, find_func: /*Unimplemented*/FnMut(/*Ignored*/AccelKey, &glib::Closure) -> bool, data: /*Unimplemented*/Option) -> /*Ignored*/Option; #[doc(alias = "gtk_accel_group_get_is_locked")] - fn get_is_locked(&self) -> bool; + fn is_locked(&self) -> bool; #[doc(alias = "gtk_accel_group_get_modifier_mask")] - fn get_modifier_mask(&self) -> gdk::ModifierType; + fn modifier_mask(&self) -> gdk::ModifierType; #[doc(alias = "gtk_accel_group_lock")] fn lock(&self); @@ -140,7 +140,7 @@ impl> AccelGroupExt for O { // unsafe { TODO: call ffi:gtk_accel_group_find() } //} - fn get_is_locked(&self) -> bool { + fn is_locked(&self) -> bool { unsafe { from_glib(ffi::gtk_accel_group_get_is_locked( self.as_ref().to_glib_none().0, @@ -148,7 +148,7 @@ impl> AccelGroupExt for O { } } - fn get_modifier_mask(&self) -> gdk::ModifierType { + fn modifier_mask(&self) -> gdk::ModifierType { unsafe { from_glib(ffi::gtk_accel_group_get_modifier_mask( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/accel_label.rs b/gtk/src/auto/accel_label.rs index c83abe0f7ede..04ee0604e06f 100644 --- a/gtk/src/auto/accel_label.rs +++ b/gtk/src/auto/accel_label.rs @@ -551,13 +551,13 @@ pub const NONE_ACCEL_LABEL: Option<&AccelLabel> = None; pub trait AccelLabelExt: 'static { #[doc(alias = "gtk_accel_label_get_accel")] - fn get_accel(&self) -> (u32, gdk::ModifierType); + fn accel(&self) -> (u32, gdk::ModifierType); #[doc(alias = "gtk_accel_label_get_accel_widget")] - fn get_accel_widget(&self) -> Option; + fn accel_widget(&self) -> Option; #[doc(alias = "gtk_accel_label_get_accel_width")] - fn get_accel_width(&self) -> u32; + fn accel_width(&self) -> u32; #[doc(alias = "gtk_accel_label_refetch")] fn refetch(&self) -> bool; @@ -571,7 +571,8 @@ pub trait AccelLabelExt: 'static { #[doc(alias = "gtk_accel_label_set_accel_widget")] fn set_accel_widget>(&self, accel_widget: Option<&P>); - fn get_property_accel_closure(&self) -> Option; + #[doc(alias = "get_property_accel_closure")] + fn accel_closure(&self) -> Option; fn connect_property_accel_closure_notify( &self, @@ -583,7 +584,7 @@ pub trait AccelLabelExt: 'static { } impl> AccelLabelExt for O { - fn get_accel(&self) -> (u32, gdk::ModifierType) { + fn accel(&self) -> (u32, gdk::ModifierType) { unsafe { let mut accelerator_key = mem::MaybeUninit::uninit(); let mut accelerator_mods = mem::MaybeUninit::uninit(); @@ -598,7 +599,7 @@ impl> AccelLabelExt for O { } } - fn get_accel_widget(&self) -> Option { + fn accel_widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_accel_label_get_accel_widget( self.as_ref().to_glib_none().0, @@ -606,7 +607,7 @@ impl> AccelLabelExt for O { } } - fn get_accel_width(&self) -> u32 { + fn accel_width(&self) -> u32 { unsafe { ffi::gtk_accel_label_get_accel_width(self.as_ref().to_glib_none().0) } } @@ -642,7 +643,7 @@ impl> AccelLabelExt for O { } } - fn get_property_accel_closure(&self) -> Option { + fn accel_closure(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/action_bar.rs b/gtk/src/auto/action_bar.rs index 04c69c0320d4..7aef9755ff52 100644 --- a/gtk/src/auto/action_bar.rs +++ b/gtk/src/auto/action_bar.rs @@ -378,7 +378,7 @@ pub const NONE_ACTION_BAR: Option<&ActionBar> = None; pub trait ActionBarExt: 'static { #[doc(alias = "gtk_action_bar_get_center_widget")] - fn get_center_widget(&self) -> Option; + fn center_widget(&self) -> Option; #[doc(alias = "gtk_action_bar_pack_end")] fn pack_end>(&self, child: &P); @@ -399,7 +399,7 @@ pub trait ActionBarExt: 'static { } impl> ActionBarExt for O { - fn get_center_widget(&self) -> Option { + fn center_widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_action_bar_get_center_widget( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/actionable.rs b/gtk/src/auto/actionable.rs index 358827f7912c..56b261a91170 100644 --- a/gtk/src/auto/actionable.rs +++ b/gtk/src/auto/actionable.rs @@ -25,10 +25,10 @@ pub const NONE_ACTIONABLE: Option<&Actionable> = None; pub trait ActionableExt: 'static { #[doc(alias = "gtk_actionable_get_action_name")] - fn get_action_name(&self) -> Option; + fn action_name(&self) -> Option; #[doc(alias = "gtk_actionable_get_action_target_value")] - fn get_action_target_value(&self) -> Option; + fn action_target_value(&self) -> Option; #[doc(alias = "gtk_actionable_set_action_name")] fn set_action_name(&self, action_name: Option<&str>); @@ -51,7 +51,7 @@ pub trait ActionableExt: 'static { } impl> ActionableExt for O { - fn get_action_name(&self) -> Option { + fn action_name(&self) -> Option { unsafe { from_glib_none(ffi::gtk_actionable_get_action_name( self.as_ref().to_glib_none().0, @@ -59,7 +59,7 @@ impl> ActionableExt for O { } } - fn get_action_target_value(&self) -> Option { + fn action_target_value(&self) -> Option { unsafe { from_glib_none(ffi::gtk_actionable_get_action_target_value( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/adjustment.rs b/gtk/src/auto/adjustment.rs index 5f8d8c4a45c8..040776c92671 100644 --- a/gtk/src/auto/adjustment.rs +++ b/gtk/src/auto/adjustment.rs @@ -137,25 +137,25 @@ pub trait AdjustmentExt: 'static { ); #[doc(alias = "gtk_adjustment_get_lower")] - fn get_lower(&self) -> f64; + fn lower(&self) -> f64; #[doc(alias = "gtk_adjustment_get_minimum_increment")] - fn get_minimum_increment(&self) -> f64; + fn minimum_increment(&self) -> f64; #[doc(alias = "gtk_adjustment_get_page_increment")] - fn get_page_increment(&self) -> f64; + fn page_increment(&self) -> f64; #[doc(alias = "gtk_adjustment_get_page_size")] - fn get_page_size(&self) -> f64; + fn page_size(&self) -> f64; #[doc(alias = "gtk_adjustment_get_step_increment")] - fn get_step_increment(&self) -> f64; + fn step_increment(&self) -> f64; #[doc(alias = "gtk_adjustment_get_upper")] - fn get_upper(&self) -> f64; + fn upper(&self) -> f64; #[doc(alias = "gtk_adjustment_get_value")] - fn get_value(&self) -> f64; + fn value(&self) -> f64; #[doc(alias = "gtk_adjustment_set_lower")] fn set_lower(&self, lower: f64); @@ -237,31 +237,31 @@ impl> AdjustmentExt for O { } } - fn get_lower(&self) -> f64 { + fn lower(&self) -> f64 { unsafe { ffi::gtk_adjustment_get_lower(self.as_ref().to_glib_none().0) } } - fn get_minimum_increment(&self) -> f64 { + fn minimum_increment(&self) -> f64 { unsafe { ffi::gtk_adjustment_get_minimum_increment(self.as_ref().to_glib_none().0) } } - fn get_page_increment(&self) -> f64 { + fn page_increment(&self) -> f64 { unsafe { ffi::gtk_adjustment_get_page_increment(self.as_ref().to_glib_none().0) } } - fn get_page_size(&self) -> f64 { + fn page_size(&self) -> f64 { unsafe { ffi::gtk_adjustment_get_page_size(self.as_ref().to_glib_none().0) } } - fn get_step_increment(&self) -> f64 { + fn step_increment(&self) -> f64 { unsafe { ffi::gtk_adjustment_get_step_increment(self.as_ref().to_glib_none().0) } } - fn get_upper(&self) -> f64 { + fn upper(&self) -> f64 { unsafe { ffi::gtk_adjustment_get_upper(self.as_ref().to_glib_none().0) } } - fn get_value(&self) -> f64 { + fn value(&self) -> f64 { unsafe { ffi::gtk_adjustment_get_value(self.as_ref().to_glib_none().0) } } diff --git a/gtk/src/auto/app_chooser_button.rs b/gtk/src/auto/app_chooser_button.rs index d3af57e400bf..9e4763c45e7e 100644 --- a/gtk/src/auto/app_chooser_button.rs +++ b/gtk/src/auto/app_chooser_button.rs @@ -555,13 +555,13 @@ pub trait AppChooserButtonExt: 'static { fn append_separator(&self); #[doc(alias = "gtk_app_chooser_button_get_heading")] - fn get_heading(&self) -> Option; + fn heading(&self) -> Option; #[doc(alias = "gtk_app_chooser_button_get_show_default_item")] - fn get_show_default_item(&self) -> bool; + fn shows_default_item(&self) -> bool; #[doc(alias = "gtk_app_chooser_button_get_show_dialog_item")] - fn get_show_dialog_item(&self) -> bool; + fn shows_dialog_item(&self) -> bool; #[doc(alias = "gtk_app_chooser_button_set_active_custom_item")] fn set_active_custom_item(&self, name: &str); @@ -612,7 +612,7 @@ impl> AppChooserButtonExt for O { } } - fn get_heading(&self) -> Option { + fn heading(&self) -> Option { unsafe { from_glib_none(ffi::gtk_app_chooser_button_get_heading( self.as_ref().to_glib_none().0, @@ -620,7 +620,7 @@ impl> AppChooserButtonExt for O { } } - fn get_show_default_item(&self) -> bool { + fn shows_default_item(&self) -> bool { unsafe { from_glib(ffi::gtk_app_chooser_button_get_show_default_item( self.as_ref().to_glib_none().0, @@ -628,7 +628,7 @@ impl> AppChooserButtonExt for O { } } - fn get_show_dialog_item(&self) -> bool { + fn shows_dialog_item(&self) -> bool { unsafe { from_glib(ffi::gtk_app_chooser_button_get_show_dialog_item( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/app_chooser_dialog.rs b/gtk/src/auto/app_chooser_dialog.rs index eaaf35335e95..692f8ca76c0b 100644 --- a/gtk/src/auto/app_chooser_dialog.rs +++ b/gtk/src/auto/app_chooser_dialog.rs @@ -53,7 +53,7 @@ impl AppChooserDialog { } #[doc(alias = "gtk_app_chooser_dialog_new_for_content_type")] - pub fn new_for_content_type>( + pub fn for_content_type>( parent: Option<&P>, flags: DialogFlags, content_type: &str, @@ -698,21 +698,22 @@ pub const NONE_APP_CHOOSER_DIALOG: Option<&AppChooserDialog> = None; pub trait AppChooserDialogExt: 'static { #[doc(alias = "gtk_app_chooser_dialog_get_heading")] - fn get_heading(&self) -> Option; + fn heading(&self) -> Option; #[doc(alias = "gtk_app_chooser_dialog_get_widget")] - fn get_widget(&self) -> Widget; + fn widget(&self) -> Widget; #[doc(alias = "gtk_app_chooser_dialog_set_heading")] fn set_heading(&self, heading: &str); - fn get_property_gfile(&self) -> Option; + #[doc(alias = "get_property_gfile")] + fn gfile(&self) -> Option; fn connect_property_heading_notify(&self, f: F) -> SignalHandlerId; } impl> AppChooserDialogExt for O { - fn get_heading(&self) -> Option { + fn heading(&self) -> Option { unsafe { from_glib_none(ffi::gtk_app_chooser_dialog_get_heading( self.as_ref().to_glib_none().0, @@ -720,7 +721,7 @@ impl> AppChooserDialogExt for O { } } - fn get_widget(&self) -> Widget { + fn widget(&self) -> Widget { unsafe { from_glib_none(ffi::gtk_app_chooser_dialog_get_widget( self.as_ref().to_glib_none().0, @@ -737,7 +738,7 @@ impl> AppChooserDialogExt for O { } } - fn get_property_gfile(&self) -> Option { + fn gfile(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/app_chooser_widget.rs b/gtk/src/auto/app_chooser_widget.rs index 83128a358b18..0666eafa257d 100644 --- a/gtk/src/auto/app_chooser_widget.rs +++ b/gtk/src/auto/app_chooser_widget.rs @@ -484,22 +484,22 @@ pub const NONE_APP_CHOOSER_WIDGET: Option<&AppChooserWidget> = None; pub trait AppChooserWidgetExt: 'static { #[doc(alias = "gtk_app_chooser_widget_get_default_text")] - fn get_default_text(&self) -> Option; + fn default_text(&self) -> Option; #[doc(alias = "gtk_app_chooser_widget_get_show_all")] - fn get_show_all(&self) -> bool; + fn shows_all(&self) -> bool; #[doc(alias = "gtk_app_chooser_widget_get_show_default")] - fn get_show_default(&self) -> bool; + fn shows_default(&self) -> bool; #[doc(alias = "gtk_app_chooser_widget_get_show_fallback")] - fn get_show_fallback(&self) -> bool; + fn shows_fallback(&self) -> bool; #[doc(alias = "gtk_app_chooser_widget_get_show_other")] - fn get_show_other(&self) -> bool; + fn shows_other(&self) -> bool; #[doc(alias = "gtk_app_chooser_widget_get_show_recommended")] - fn get_show_recommended(&self) -> bool; + fn shows_recommended(&self) -> bool; #[doc(alias = "gtk_app_chooser_widget_set_default_text")] fn set_default_text(&self, text: &str); @@ -556,7 +556,7 @@ pub trait AppChooserWidgetExt: 'static { } impl> AppChooserWidgetExt for O { - fn get_default_text(&self) -> Option { + fn default_text(&self) -> Option { unsafe { from_glib_none(ffi::gtk_app_chooser_widget_get_default_text( self.as_ref().to_glib_none().0, @@ -564,7 +564,7 @@ impl> AppChooserWidgetExt for O { } } - fn get_show_all(&self) -> bool { + fn shows_all(&self) -> bool { unsafe { from_glib(ffi::gtk_app_chooser_widget_get_show_all( self.as_ref().to_glib_none().0, @@ -572,7 +572,7 @@ impl> AppChooserWidgetExt for O { } } - fn get_show_default(&self) -> bool { + fn shows_default(&self) -> bool { unsafe { from_glib(ffi::gtk_app_chooser_widget_get_show_default( self.as_ref().to_glib_none().0, @@ -580,7 +580,7 @@ impl> AppChooserWidgetExt for O { } } - fn get_show_fallback(&self) -> bool { + fn shows_fallback(&self) -> bool { unsafe { from_glib(ffi::gtk_app_chooser_widget_get_show_fallback( self.as_ref().to_glib_none().0, @@ -588,7 +588,7 @@ impl> AppChooserWidgetExt for O { } } - fn get_show_other(&self) -> bool { + fn shows_other(&self) -> bool { unsafe { from_glib(ffi::gtk_app_chooser_widget_get_show_other( self.as_ref().to_glib_none().0, @@ -596,7 +596,7 @@ impl> AppChooserWidgetExt for O { } } - fn get_show_recommended(&self) -> bool { + fn shows_recommended(&self) -> bool { unsafe { from_glib(ffi::gtk_app_chooser_widget_get_show_recommended( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/application.rs b/gtk/src/auto/application.rs index 770399977e17..fe546920f12e 100644 --- a/gtk/src/auto/application.rs +++ b/gtk/src/auto/application.rs @@ -127,22 +127,22 @@ pub trait GtkApplicationExt: 'static { fn get_actions_for_accel(&self, accel: &str) -> Vec; #[doc(alias = "gtk_application_get_active_window")] - fn get_active_window(&self) -> Option; + fn active_window(&self) -> Option; #[doc(alias = "gtk_application_get_app_menu")] - fn get_app_menu(&self) -> Option; + fn app_menu(&self) -> Option; #[doc(alias = "gtk_application_get_menu_by_id")] fn get_menu_by_id(&self, id: &str) -> Option; #[doc(alias = "gtk_application_get_menubar")] - fn get_menubar(&self) -> Option; + fn menubar(&self) -> Option; #[doc(alias = "gtk_application_get_window_by_id")] fn get_window_by_id(&self, id: u32) -> Option; #[doc(alias = "gtk_application_get_windows")] - fn get_windows(&self) -> Vec; + fn windows(&self) -> Vec; #[doc(alias = "gtk_application_inhibit")] fn inhibit>( @@ -176,13 +176,16 @@ pub trait GtkApplicationExt: 'static { #[doc(alias = "gtk_application_uninhibit")] fn uninhibit(&self, cookie: u32); - fn get_property_register_session(&self) -> bool; + #[doc(alias = "get_property_register_session")] + fn is_register_session(&self) -> bool; - fn set_property_register_session(&self, register_session: bool); + #[doc(alias = "set_property_register_session")] + fn set_register_session(&self, register_session: bool); #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] - fn get_property_screensaver_active(&self) -> bool; + #[doc(alias = "get_property_screensaver_active")] + fn is_screensaver_active(&self) -> bool; #[cfg(any(feature = "v3_24_8", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24_8")))] @@ -242,7 +245,7 @@ impl> GtkApplicationExt for O { } } - fn get_active_window(&self) -> Option { + fn active_window(&self) -> Option { unsafe { from_glib_none(ffi::gtk_application_get_active_window( self.as_ref().to_glib_none().0, @@ -250,7 +253,7 @@ impl> GtkApplicationExt for O { } } - fn get_app_menu(&self) -> Option { + fn app_menu(&self) -> Option { unsafe { from_glib_none(ffi::gtk_application_get_app_menu( self.as_ref().to_glib_none().0, @@ -267,7 +270,7 @@ impl> GtkApplicationExt for O { } } - fn get_menubar(&self) -> Option { + fn menubar(&self) -> Option { unsafe { from_glib_none(ffi::gtk_application_get_menubar( self.as_ref().to_glib_none().0, @@ -284,7 +287,7 @@ impl> GtkApplicationExt for O { } } - fn get_windows(&self) -> Vec { + fn windows(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gtk_application_get_windows( self.as_ref().to_glib_none().0, @@ -376,7 +379,7 @@ impl> GtkApplicationExt for O { } } - fn get_property_register_session(&self) -> bool { + fn is_register_session(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -391,7 +394,7 @@ impl> GtkApplicationExt for O { } } - fn set_property_register_session(&self, register_session: bool) { + fn set_register_session(&self, register_session: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -403,7 +406,7 @@ impl> GtkApplicationExt for O { #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] - fn get_property_screensaver_active(&self) -> bool { + fn is_screensaver_active(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/application_window.rs b/gtk/src/auto/application_window.rs index ab39c0b0c081..044fdd3169a7 100644 --- a/gtk/src/auto/application_window.rs +++ b/gtk/src/auto/application_window.rs @@ -637,13 +637,13 @@ pub trait ApplicationWindowExt: 'static { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gtk_application_window_get_help_overlay")] - fn get_help_overlay(&self) -> Option; + fn help_overlay(&self) -> Option; #[doc(alias = "gtk_application_window_get_id")] - fn get_id(&self) -> u32; + fn id(&self) -> u32; #[doc(alias = "gtk_application_window_get_show_menubar")] - fn get_show_menubar(&self) -> bool; + fn shows_menubar(&self) -> bool; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] @@ -660,7 +660,7 @@ pub trait ApplicationWindowExt: 'static { impl> ApplicationWindowExt for O { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn get_help_overlay(&self) -> Option { + fn help_overlay(&self) -> Option { unsafe { from_glib_none(ffi::gtk_application_window_get_help_overlay( self.as_ref().to_glib_none().0, @@ -668,11 +668,11 @@ impl> ApplicationWindowExt for O { } } - fn get_id(&self) -> u32 { + fn id(&self) -> u32 { unsafe { ffi::gtk_application_window_get_id(self.as_ref().to_glib_none().0) } } - fn get_show_menubar(&self) -> bool { + fn shows_menubar(&self) -> bool { unsafe { from_glib(ffi::gtk_application_window_get_show_menubar( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/aspect_frame.rs b/gtk/src/auto/aspect_frame.rs index 1bef080db845..0f92dc1f8969 100644 --- a/gtk/src/auto/aspect_frame.rs +++ b/gtk/src/auto/aspect_frame.rs @@ -475,21 +475,29 @@ pub trait AspectFrameExt: 'static { #[doc(alias = "gtk_aspect_frame_set")] fn set(&self, xalign: f32, yalign: f32, ratio: f32, obey_child: bool); - fn get_property_obey_child(&self) -> bool; + #[doc(alias = "get_property_obey_child")] + fn is_obey_child(&self) -> bool; - fn set_property_obey_child(&self, obey_child: bool); + #[doc(alias = "set_property_obey_child")] + fn set_obey_child(&self, obey_child: bool); - fn get_property_ratio(&self) -> f32; + #[doc(alias = "get_property_ratio")] + fn ratio(&self) -> f32; - fn set_property_ratio(&self, ratio: f32); + #[doc(alias = "set_property_ratio")] + fn set_ratio(&self, ratio: f32); - fn get_property_xalign(&self) -> f32; + #[doc(alias = "get_property_xalign")] + fn xalign(&self) -> f32; - fn set_property_xalign(&self, xalign: f32); + #[doc(alias = "set_property_xalign")] + fn set_xalign(&self, xalign: f32); - fn get_property_yalign(&self) -> f32; + #[doc(alias = "get_property_yalign")] + fn yalign(&self) -> f32; - fn set_property_yalign(&self, yalign: f32); + #[doc(alias = "set_property_yalign")] + fn set_yalign(&self, yalign: f32); fn connect_property_obey_child_notify(&self, f: F) -> SignalHandlerId; @@ -513,7 +521,7 @@ impl> AspectFrameExt for O { } } - fn get_property_obey_child(&self) -> bool { + fn is_obey_child(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -528,7 +536,7 @@ impl> AspectFrameExt for O { } } - fn set_property_obey_child(&self, obey_child: bool) { + fn set_obey_child(&self, obey_child: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -538,7 +546,7 @@ impl> AspectFrameExt for O { } } - fn get_property_ratio(&self) -> f32 { + fn ratio(&self) -> f32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -553,7 +561,7 @@ impl> AspectFrameExt for O { } } - fn set_property_ratio(&self, ratio: f32) { + fn set_ratio(&self, ratio: f32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -563,7 +571,7 @@ impl> AspectFrameExt for O { } } - fn get_property_xalign(&self) -> f32 { + fn xalign(&self) -> f32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -578,7 +586,7 @@ impl> AspectFrameExt for O { } } - fn set_property_xalign(&self, xalign: f32) { + fn set_xalign(&self, xalign: f32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -588,7 +596,7 @@ impl> AspectFrameExt for O { } } - fn get_property_yalign(&self) -> f32 { + fn yalign(&self) -> f32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -603,7 +611,7 @@ impl> AspectFrameExt for O { } } - fn set_property_yalign(&self, yalign: f32) { + fn set_yalign(&self, yalign: f32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/assistant.rs b/gtk/src/auto/assistant.rs index b15708407f51..414e36b4b3df 100644 --- a/gtk/src/auto/assistant.rs +++ b/gtk/src/auto/assistant.rs @@ -657,10 +657,10 @@ pub trait AssistantExt: 'static { fn commit(&self); #[doc(alias = "gtk_assistant_get_current_page")] - fn get_current_page(&self) -> i32; + fn current_page(&self) -> i32; #[doc(alias = "gtk_assistant_get_n_pages")] - fn get_n_pages(&self) -> i32; + fn n_pages(&self) -> i32; #[doc(alias = "gtk_assistant_get_nth_page")] fn get_nth_page(&self, page_num: i32) -> Option; @@ -720,7 +720,8 @@ pub trait AssistantExt: 'static { #[doc(alias = "gtk_assistant_update_buttons_state")] fn update_buttons_state(&self); - fn get_property_use_header_bar(&self) -> i32; + #[doc(alias = "get_property_use_header_bar")] + fn use_header_bar(&self) -> i32; fn get_child_complete>(&self, item: &T) -> bool; @@ -776,11 +777,11 @@ impl> AssistantExt for O { } } - fn get_current_page(&self) -> i32 { + fn current_page(&self) -> i32 { unsafe { ffi::gtk_assistant_get_current_page(self.as_ref().to_glib_none().0) } } - fn get_n_pages(&self) -> i32 { + fn n_pages(&self) -> i32 { unsafe { ffi::gtk_assistant_get_n_pages(self.as_ref().to_glib_none().0) } } @@ -966,7 +967,7 @@ impl> AssistantExt for O { } } - fn get_property_use_header_bar(&self) -> i32 { + fn use_header_bar(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/bin.rs b/gtk/src/auto/bin.rs index 1774e0297611..bf7fecf822ef 100644 --- a/gtk/src/auto/bin.rs +++ b/gtk/src/auto/bin.rs @@ -21,11 +21,11 @@ pub const NONE_BIN: Option<&Bin> = None; pub trait BinExt: 'static { #[doc(alias = "gtk_bin_get_child")] - fn get_child(&self) -> Option; + fn child(&self) -> Option; } impl> BinExt for O { - fn get_child(&self) -> Option { + fn child(&self) -> Option { unsafe { from_glib_none(ffi::gtk_bin_get_child(self.as_ref().to_glib_none().0)) } } } diff --git a/gtk/src/auto/box_.rs b/gtk/src/auto/box_.rs index ac72dd4177f4..87376c332915 100644 --- a/gtk/src/auto/box_.rs +++ b/gtk/src/auto/box_.rs @@ -417,16 +417,16 @@ pub const NONE_BOX: Option<&Box> = None; pub trait BoxExt: 'static { #[doc(alias = "gtk_box_get_baseline_position")] - fn get_baseline_position(&self) -> BaselinePosition; + fn baseline_position(&self) -> BaselinePosition; #[doc(alias = "gtk_box_get_center_widget")] - fn get_center_widget(&self) -> Option; + fn center_widget(&self) -> Option; #[doc(alias = "gtk_box_get_homogeneous")] - fn get_homogeneous(&self) -> bool; + fn is_homogeneous(&self) -> bool; #[doc(alias = "gtk_box_get_spacing")] - fn get_spacing(&self) -> i32; + fn spacing(&self) -> i32; #[doc(alias = "gtk_box_pack_end")] fn pack_end>(&self, child: &P, expand: bool, fill: bool, padding: u32); @@ -501,7 +501,7 @@ pub trait BoxExt: 'static { } impl> BoxExt for O { - fn get_baseline_position(&self) -> BaselinePosition { + fn baseline_position(&self) -> BaselinePosition { unsafe { from_glib(ffi::gtk_box_get_baseline_position( self.as_ref().to_glib_none().0, @@ -509,7 +509,7 @@ impl> BoxExt for O { } } - fn get_center_widget(&self) -> Option { + fn center_widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_box_get_center_widget( self.as_ref().to_glib_none().0, @@ -517,11 +517,11 @@ impl> BoxExt for O { } } - fn get_homogeneous(&self) -> bool { + fn is_homogeneous(&self) -> bool { unsafe { from_glib(ffi::gtk_box_get_homogeneous(self.as_ref().to_glib_none().0)) } } - fn get_spacing(&self) -> i32 { + fn spacing(&self) -> i32 { unsafe { ffi::gtk_box_get_spacing(self.as_ref().to_glib_none().0) } } diff --git a/gtk/src/auto/builder.rs b/gtk/src/auto/builder.rs index 1bd82e484c3d..1be30002d010 100644 --- a/gtk/src/auto/builder.rs +++ b/gtk/src/auto/builder.rs @@ -99,13 +99,13 @@ pub trait BuilderExt: 'static { ) -> Result<(), glib::Error>; #[doc(alias = "gtk_builder_get_application")] - fn get_application(&self) -> Option; + fn application(&self) -> Option; #[doc(alias = "gtk_builder_get_objects")] - fn get_objects(&self) -> Vec; + fn objects(&self) -> Vec; #[doc(alias = "gtk_builder_get_translation_domain")] - fn get_translation_domain(&self) -> Option; + fn translation_domain(&self) -> Option; #[doc(alias = "gtk_builder_get_type_from_name")] fn get_type_from_name(&self, type_name: &str) -> glib::types::Type; @@ -265,7 +265,7 @@ impl> BuilderExt for O { } } - fn get_application(&self) -> Option { + fn application(&self) -> Option { unsafe { from_glib_none(ffi::gtk_builder_get_application( self.as_ref().to_glib_none().0, @@ -273,7 +273,7 @@ impl> BuilderExt for O { } } - fn get_objects(&self) -> Vec { + fn objects(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gtk_builder_get_objects( self.as_ref().to_glib_none().0, @@ -281,7 +281,7 @@ impl> BuilderExt for O { } } - fn get_translation_domain(&self) -> Option { + fn translation_domain(&self) -> Option { unsafe { from_glib_none(ffi::gtk_builder_get_translation_domain( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/button.rs b/gtk/src/auto/button.rs index a3cba88a2e2e..00e0ce78aa20 100644 --- a/gtk/src/auto/button.rs +++ b/gtk/src/auto/button.rs @@ -491,31 +491,31 @@ pub trait ButtonExt: 'static { fn clicked(&self); #[doc(alias = "gtk_button_get_always_show_image")] - fn get_always_show_image(&self) -> bool; + fn must_always_show_image(&self) -> bool; #[doc(alias = "gtk_button_get_event_window")] - fn get_event_window(&self) -> Option; + fn event_window(&self) -> Option; #[cfg_attr(feature = "v3_20", deprecated)] #[cfg(any(not(feature = "v3_20"), feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(not(feature = "v3_20"))))] #[doc(alias = "gtk_button_get_focus_on_click")] - fn get_focus_on_click(&self) -> bool; + fn gets_focus_on_click(&self) -> bool; #[doc(alias = "gtk_button_get_image")] - fn get_image(&self) -> Option; + fn image(&self) -> Option; #[doc(alias = "gtk_button_get_image_position")] - fn get_image_position(&self) -> PositionType; + fn image_position(&self) -> PositionType; #[doc(alias = "gtk_button_get_label")] - fn get_label(&self) -> Option; + fn label(&self) -> Option; #[doc(alias = "gtk_button_get_relief")] - fn get_relief(&self) -> ReliefStyle; + fn relief(&self) -> ReliefStyle; #[doc(alias = "gtk_button_get_use_underline")] - fn get_use_underline(&self) -> bool; + fn uses_underline(&self) -> bool; #[doc(alias = "gtk_button_set_always_show_image")] fn set_always_show_image(&self, always_show: bool); @@ -578,7 +578,7 @@ impl> ButtonExt for O { } } - fn get_always_show_image(&self) -> bool { + fn must_always_show_image(&self) -> bool { unsafe { from_glib(ffi::gtk_button_get_always_show_image( self.as_ref().to_glib_none().0, @@ -586,7 +586,7 @@ impl> ButtonExt for O { } } - fn get_event_window(&self) -> Option { + fn event_window(&self) -> Option { unsafe { from_glib_none(ffi::gtk_button_get_event_window( self.as_ref().to_glib_none().0, @@ -596,7 +596,7 @@ impl> ButtonExt for O { #[cfg(any(not(feature = "v3_20"), feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(not(feature = "v3_20"))))] - fn get_focus_on_click(&self) -> bool { + fn gets_focus_on_click(&self) -> bool { unsafe { from_glib(ffi::gtk_button_get_focus_on_click( self.as_ref().to_glib_none().0, @@ -604,11 +604,11 @@ impl> ButtonExt for O { } } - fn get_image(&self) -> Option { + fn image(&self) -> Option { unsafe { from_glib_none(ffi::gtk_button_get_image(self.as_ref().to_glib_none().0)) } } - fn get_image_position(&self) -> PositionType { + fn image_position(&self) -> PositionType { unsafe { from_glib(ffi::gtk_button_get_image_position( self.as_ref().to_glib_none().0, @@ -616,15 +616,15 @@ impl> ButtonExt for O { } } - fn get_label(&self) -> Option { + fn label(&self) -> Option { unsafe { from_glib_none(ffi::gtk_button_get_label(self.as_ref().to_glib_none().0)) } } - fn get_relief(&self) -> ReliefStyle { + fn relief(&self) -> ReliefStyle { unsafe { from_glib(ffi::gtk_button_get_relief(self.as_ref().to_glib_none().0)) } } - fn get_use_underline(&self) -> bool { + fn uses_underline(&self) -> bool { unsafe { from_glib(ffi::gtk_button_get_use_underline( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/button_box.rs b/gtk/src/auto/button_box.rs index 5c7c192ce00d..657ed8c1d056 100644 --- a/gtk/src/auto/button_box.rs +++ b/gtk/src/auto/button_box.rs @@ -432,7 +432,7 @@ pub trait ButtonBoxExt: 'static { fn get_child_secondary>(&self, child: &P) -> bool; #[doc(alias = "gtk_button_box_get_layout")] - fn get_layout(&self) -> ButtonBoxStyle; + fn layout(&self) -> ButtonBoxStyle; #[doc(alias = "gtk_button_box_set_child_non_homogeneous")] fn set_child_non_homogeneous>(&self, child: &P, non_homogeneous: bool); @@ -443,9 +443,11 @@ pub trait ButtonBoxExt: 'static { #[doc(alias = "gtk_button_box_set_layout")] fn set_layout(&self, layout_style: ButtonBoxStyle); - fn get_property_layout_style(&self) -> ButtonBoxStyle; + #[doc(alias = "get_property_layout_style")] + fn layout_style(&self) -> ButtonBoxStyle; - fn set_property_layout_style(&self, layout_style: ButtonBoxStyle); + #[doc(alias = "set_property_layout_style")] + fn set_layout_style(&self, layout_style: ButtonBoxStyle); fn connect_property_layout_style_notify(&self, f: F) -> SignalHandlerId; @@ -470,7 +472,7 @@ impl> ButtonBoxExt for O { } } - fn get_layout(&self) -> ButtonBoxStyle { + fn layout(&self) -> ButtonBoxStyle { unsafe { from_glib(ffi::gtk_button_box_get_layout( self.as_ref().to_glib_none().0, @@ -504,7 +506,7 @@ impl> ButtonBoxExt for O { } } - fn get_property_layout_style(&self) -> ButtonBoxStyle { + fn layout_style(&self) -> ButtonBoxStyle { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -519,7 +521,7 @@ impl> ButtonBoxExt for O { } } - fn set_property_layout_style(&self, layout_style: ButtonBoxStyle) { + fn set_layout_style(&self, layout_style: ButtonBoxStyle) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/calendar.rs b/gtk/src/auto/calendar.rs index ad2521d256a3..3af9f002f762 100644 --- a/gtk/src/auto/calendar.rs +++ b/gtk/src/auto/calendar.rs @@ -447,19 +447,19 @@ pub trait CalendarExt: 'static { fn clear_marks(&self); #[doc(alias = "gtk_calendar_get_date")] - fn get_date(&self) -> (u32, u32, u32); + fn date(&self) -> (u32, u32, u32); #[doc(alias = "gtk_calendar_get_day_is_marked")] fn get_day_is_marked(&self, day: u32) -> bool; #[doc(alias = "gtk_calendar_get_detail_height_rows")] - fn get_detail_height_rows(&self) -> i32; + fn detail_height_rows(&self) -> i32; #[doc(alias = "gtk_calendar_get_detail_width_chars")] - fn get_detail_width_chars(&self) -> i32; + fn detail_width_chars(&self) -> i32; #[doc(alias = "gtk_calendar_get_display_options")] - fn get_display_options(&self) -> CalendarDisplayOptions; + fn display_options(&self) -> CalendarDisplayOptions; #[doc(alias = "gtk_calendar_mark_day")] fn mark_day(&self, day: u32); @@ -485,37 +485,53 @@ pub trait CalendarExt: 'static { #[doc(alias = "gtk_calendar_unmark_day")] fn unmark_day(&self, day: u32); - fn get_property_day(&self) -> i32; + #[doc(alias = "get_property_day")] + fn day(&self) -> i32; - fn set_property_day(&self, day: i32); + #[doc(alias = "set_property_day")] + fn set_day(&self, day: i32); - fn get_property_month(&self) -> i32; + #[doc(alias = "get_property_month")] + fn month(&self) -> i32; - fn set_property_month(&self, month: i32); + #[doc(alias = "set_property_month")] + fn set_month(&self, month: i32); - fn get_property_no_month_change(&self) -> bool; + #[doc(alias = "get_property_no_month_change")] + fn is_no_month_change(&self) -> bool; - fn set_property_no_month_change(&self, no_month_change: bool); + #[doc(alias = "set_property_no_month_change")] + fn set_no_month_change(&self, no_month_change: bool); - fn get_property_show_day_names(&self) -> bool; + #[doc(alias = "get_property_show_day_names")] + fn shows_day_names(&self) -> bool; - fn set_property_show_day_names(&self, show_day_names: bool); + #[doc(alias = "set_property_show_day_names")] + fn set_show_day_names(&self, show_day_names: bool); - fn get_property_show_details(&self) -> bool; + #[doc(alias = "get_property_show_details")] + fn shows_details(&self) -> bool; - fn set_property_show_details(&self, show_details: bool); + #[doc(alias = "set_property_show_details")] + fn set_show_details(&self, show_details: bool); - fn get_property_show_heading(&self) -> bool; + #[doc(alias = "get_property_show_heading")] + fn shows_heading(&self) -> bool; - fn set_property_show_heading(&self, show_heading: bool); + #[doc(alias = "set_property_show_heading")] + fn set_show_heading(&self, show_heading: bool); - fn get_property_show_week_numbers(&self) -> bool; + #[doc(alias = "get_property_show_week_numbers")] + fn shows_week_numbers(&self) -> bool; - fn set_property_show_week_numbers(&self, show_week_numbers: bool); + #[doc(alias = "set_property_show_week_numbers")] + fn set_show_week_numbers(&self, show_week_numbers: bool); - fn get_property_year(&self) -> i32; + #[doc(alias = "get_property_year")] + fn year(&self) -> i32; - fn set_property_year(&self, year: i32); + #[doc(alias = "set_property_year")] + fn set_year(&self, year: i32); fn connect_day_selected(&self, f: F) -> SignalHandlerId; @@ -576,7 +592,7 @@ impl> CalendarExt for O { } } - fn get_date(&self) -> (u32, u32, u32) { + fn date(&self) -> (u32, u32, u32) { unsafe { let mut year = mem::MaybeUninit::uninit(); let mut month = mem::MaybeUninit::uninit(); @@ -603,15 +619,15 @@ impl> CalendarExt for O { } } - fn get_detail_height_rows(&self) -> i32 { + fn detail_height_rows(&self) -> i32 { unsafe { ffi::gtk_calendar_get_detail_height_rows(self.as_ref().to_glib_none().0) } } - fn get_detail_width_chars(&self) -> i32 { + fn detail_width_chars(&self) -> i32 { unsafe { ffi::gtk_calendar_get_detail_width_chars(self.as_ref().to_glib_none().0) } } - fn get_display_options(&self) -> CalendarDisplayOptions { + fn display_options(&self) -> CalendarDisplayOptions { unsafe { from_glib(ffi::gtk_calendar_get_display_options( self.as_ref().to_glib_none().0, @@ -700,7 +716,7 @@ impl> CalendarExt for O { } } - fn get_property_day(&self) -> i32 { + fn day(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -715,7 +731,7 @@ impl> CalendarExt for O { } } - fn set_property_day(&self, day: i32) { + fn set_day(&self, day: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -725,7 +741,7 @@ impl> CalendarExt for O { } } - fn get_property_month(&self) -> i32 { + fn month(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -740,7 +756,7 @@ impl> CalendarExt for O { } } - fn set_property_month(&self, month: i32) { + fn set_month(&self, month: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -750,7 +766,7 @@ impl> CalendarExt for O { } } - fn get_property_no_month_change(&self) -> bool { + fn is_no_month_change(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -765,7 +781,7 @@ impl> CalendarExt for O { } } - fn set_property_no_month_change(&self, no_month_change: bool) { + fn set_no_month_change(&self, no_month_change: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -775,7 +791,7 @@ impl> CalendarExt for O { } } - fn get_property_show_day_names(&self) -> bool { + fn shows_day_names(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -790,7 +806,7 @@ impl> CalendarExt for O { } } - fn set_property_show_day_names(&self, show_day_names: bool) { + fn set_show_day_names(&self, show_day_names: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -800,7 +816,7 @@ impl> CalendarExt for O { } } - fn get_property_show_details(&self) -> bool { + fn shows_details(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -815,7 +831,7 @@ impl> CalendarExt for O { } } - fn set_property_show_details(&self, show_details: bool) { + fn set_show_details(&self, show_details: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -825,7 +841,7 @@ impl> CalendarExt for O { } } - fn get_property_show_heading(&self) -> bool { + fn shows_heading(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -840,7 +856,7 @@ impl> CalendarExt for O { } } - fn set_property_show_heading(&self, show_heading: bool) { + fn set_show_heading(&self, show_heading: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -850,7 +866,7 @@ impl> CalendarExt for O { } } - fn get_property_show_week_numbers(&self) -> bool { + fn shows_week_numbers(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -865,7 +881,7 @@ impl> CalendarExt for O { } } - fn set_property_show_week_numbers(&self, show_week_numbers: bool) { + fn set_show_week_numbers(&self, show_week_numbers: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -875,7 +891,7 @@ impl> CalendarExt for O { } } - fn get_property_year(&self) -> i32 { + fn year(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -890,7 +906,7 @@ impl> CalendarExt for O { } } - fn set_property_year(&self, year: i32) { + fn set_year(&self, year: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/cell_area.rs b/gtk/src/auto/cell_area.rs index 44d4ee5128fb..b58cf9cb26a3 100644 --- a/gtk/src/auto/cell_area.rs +++ b/gtk/src/auto/cell_area.rs @@ -170,16 +170,16 @@ pub trait CellAreaExt: 'static { ) -> (CellRenderer, gdk::Rectangle); #[doc(alias = "gtk_cell_area_get_current_path_string")] - fn get_current_path_string(&self) -> Option; + fn current_path_string(&self) -> Option; #[doc(alias = "gtk_cell_area_get_edit_widget")] - fn get_edit_widget(&self) -> Option; + fn edit_widget(&self) -> Option; #[doc(alias = "gtk_cell_area_get_edited_cell")] - fn get_edited_cell(&self) -> Option; + fn edited_cell(&self) -> Option; #[doc(alias = "gtk_cell_area_get_focus_cell")] - fn get_focus_cell(&self) -> Option; + fn focus_cell(&self) -> Option; #[doc(alias = "gtk_cell_area_get_focus_from_sibling")] fn get_focus_from_sibling>(&self, renderer: &P) -> Option; @@ -218,7 +218,7 @@ pub trait CellAreaExt: 'static { ) -> (i32, i32); #[doc(alias = "gtk_cell_area_get_request_mode")] - fn get_request_mode(&self) -> SizeRequestMode; + fn request_mode(&self) -> SizeRequestMode; #[doc(alias = "gtk_cell_area_has_renderer")] fn has_renderer>(&self, renderer: &P) -> bool; @@ -629,7 +629,7 @@ impl> CellAreaExt for O { } } - fn get_current_path_string(&self) -> Option { + fn current_path_string(&self) -> Option { unsafe { from_glib_none(ffi::gtk_cell_area_get_current_path_string( self.as_ref().to_glib_none().0, @@ -637,7 +637,7 @@ impl> CellAreaExt for O { } } - fn get_edit_widget(&self) -> Option { + fn edit_widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_cell_area_get_edit_widget( self.as_ref().to_glib_none().0, @@ -645,7 +645,7 @@ impl> CellAreaExt for O { } } - fn get_edited_cell(&self) -> Option { + fn edited_cell(&self) -> Option { unsafe { from_glib_none(ffi::gtk_cell_area_get_edited_cell( self.as_ref().to_glib_none().0, @@ -653,7 +653,7 @@ impl> CellAreaExt for O { } } - fn get_focus_cell(&self) -> Option { + fn focus_cell(&self) -> Option { unsafe { from_glib_none(ffi::gtk_cell_area_get_focus_cell( self.as_ref().to_glib_none().0, @@ -767,7 +767,7 @@ impl> CellAreaExt for O { } } - fn get_request_mode(&self) -> SizeRequestMode { + fn request_mode(&self) -> SizeRequestMode { unsafe { from_glib(ffi::gtk_cell_area_get_request_mode( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/cell_area_box.rs b/gtk/src/auto/cell_area_box.rs index 93755975500a..1e53355c097c 100644 --- a/gtk/src/auto/cell_area_box.rs +++ b/gtk/src/auto/cell_area_box.rs @@ -88,7 +88,7 @@ pub const NONE_CELL_AREA_BOX: Option<&CellAreaBox> = None; pub trait CellAreaBoxExt: 'static { #[doc(alias = "gtk_cell_area_box_get_spacing")] - fn get_spacing(&self) -> i32; + fn spacing(&self) -> i32; #[doc(alias = "gtk_cell_area_box_pack_end")] fn pack_end>(&self, renderer: &P, expand: bool, align: bool, fixed: bool); @@ -109,7 +109,7 @@ pub trait CellAreaBoxExt: 'static { } impl> CellAreaBoxExt for O { - fn get_spacing(&self) -> i32 { + fn spacing(&self) -> i32 { unsafe { ffi::gtk_cell_area_box_get_spacing(self.as_ref().to_glib_none().0) } } diff --git a/gtk/src/auto/cell_area_context.rs b/gtk/src/auto/cell_area_context.rs index 4ef07be9af56..669b30eb012c 100644 --- a/gtk/src/auto/cell_area_context.rs +++ b/gtk/src/auto/cell_area_context.rs @@ -29,19 +29,19 @@ pub trait CellAreaContextExt: 'static { fn allocate(&self, width: i32, height: i32); #[doc(alias = "gtk_cell_area_context_get_allocation")] - fn get_allocation(&self) -> (i32, i32); + fn allocation(&self) -> (i32, i32); #[doc(alias = "gtk_cell_area_context_get_area")] - fn get_area(&self) -> Option; + fn area(&self) -> Option; #[doc(alias = "gtk_cell_area_context_get_preferred_height")] - fn get_preferred_height(&self) -> (i32, i32); + fn preferred_height(&self) -> (i32, i32); #[doc(alias = "gtk_cell_area_context_get_preferred_height_for_width")] fn get_preferred_height_for_width(&self, width: i32) -> (i32, i32); #[doc(alias = "gtk_cell_area_context_get_preferred_width")] - fn get_preferred_width(&self) -> (i32, i32); + fn preferred_width(&self) -> (i32, i32); #[doc(alias = "gtk_cell_area_context_get_preferred_width_for_height")] fn get_preferred_width_for_height(&self, height: i32) -> (i32, i32); @@ -55,13 +55,17 @@ pub trait CellAreaContextExt: 'static { #[doc(alias = "gtk_cell_area_context_reset")] fn reset(&self); - fn get_property_minimum_height(&self) -> i32; + #[doc(alias = "get_property_minimum_height")] + fn minimum_height(&self) -> i32; - fn get_property_minimum_width(&self) -> i32; + #[doc(alias = "get_property_minimum_width")] + fn minimum_width(&self) -> i32; - fn get_property_natural_height(&self) -> i32; + #[doc(alias = "get_property_natural_height")] + fn natural_height(&self) -> i32; - fn get_property_natural_width(&self) -> i32; + #[doc(alias = "get_property_natural_width")] + fn natural_width(&self) -> i32; fn connect_property_minimum_height_notify( &self, @@ -91,7 +95,7 @@ impl> CellAreaContextExt for O { } } - fn get_allocation(&self) -> (i32, i32) { + fn allocation(&self) -> (i32, i32) { unsafe { let mut width = mem::MaybeUninit::uninit(); let mut height = mem::MaybeUninit::uninit(); @@ -106,7 +110,7 @@ impl> CellAreaContextExt for O { } } - fn get_area(&self) -> Option { + fn area(&self) -> Option { unsafe { from_glib_none(ffi::gtk_cell_area_context_get_area( self.as_ref().to_glib_none().0, @@ -114,7 +118,7 @@ impl> CellAreaContextExt for O { } } - fn get_preferred_height(&self) -> (i32, i32) { + fn preferred_height(&self) -> (i32, i32) { unsafe { let mut minimum_height = mem::MaybeUninit::uninit(); let mut natural_height = mem::MaybeUninit::uninit(); @@ -145,7 +149,7 @@ impl> CellAreaContextExt for O { } } - fn get_preferred_width(&self) -> (i32, i32) { + fn preferred_width(&self) -> (i32, i32) { unsafe { let mut minimum_width = mem::MaybeUninit::uninit(); let mut natural_width = mem::MaybeUninit::uninit(); @@ -202,7 +206,7 @@ impl> CellAreaContextExt for O { } } - fn get_property_minimum_height(&self) -> i32 { + fn minimum_height(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -217,7 +221,7 @@ impl> CellAreaContextExt for O { } } - fn get_property_minimum_width(&self) -> i32 { + fn minimum_width(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -232,7 +236,7 @@ impl> CellAreaContextExt for O { } } - fn get_property_natural_height(&self) -> i32 { + fn natural_height(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -247,7 +251,7 @@ impl> CellAreaContextExt for O { } } - fn get_property_natural_width(&self) -> i32 { + fn natural_width(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/cell_editable.rs b/gtk/src/auto/cell_editable.rs index 4c7a57493339..68233c1f5409 100644 --- a/gtk/src/auto/cell_editable.rs +++ b/gtk/src/auto/cell_editable.rs @@ -34,9 +34,11 @@ pub trait CellEditableExt: 'static { #[doc(alias = "gtk_cell_editable_start_editing")] fn start_editing(&self, event: Option<&gdk::Event>); - fn get_property_editing_canceled(&self) -> bool; + #[doc(alias = "get_property_editing_canceled")] + fn is_editing_canceled(&self) -> bool; - fn set_property_editing_canceled(&self, editing_canceled: bool); + #[doc(alias = "set_property_editing_canceled")] + fn set_editing_canceled(&self, editing_canceled: bool); fn connect_editing_done(&self, f: F) -> SignalHandlerId; @@ -70,7 +72,7 @@ impl> CellEditableExt for O { } } - fn get_property_editing_canceled(&self) -> bool { + fn is_editing_canceled(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -85,7 +87,7 @@ impl> CellEditableExt for O { } } - fn set_property_editing_canceled(&self, editing_canceled: bool) { + fn set_editing_canceled(&self, editing_canceled: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/cell_layout.rs b/gtk/src/auto/cell_layout.rs index 0ff797bd0bbf..72fcf0409d13 100644 --- a/gtk/src/auto/cell_layout.rs +++ b/gtk/src/auto/cell_layout.rs @@ -32,10 +32,10 @@ pub trait CellLayoutExt: 'static { fn clear_attributes>(&self, cell: &P); #[doc(alias = "gtk_cell_layout_get_area")] - fn get_area(&self) -> Option; + fn area(&self) -> Option; #[doc(alias = "gtk_cell_layout_get_cells")] - fn get_cells(&self) -> Vec; + fn cells(&self) -> Vec; #[doc(alias = "gtk_cell_layout_pack_end")] fn pack_end>(&self, cell: &P, expand: bool); @@ -84,7 +84,7 @@ impl> CellLayoutExt for O { } } - fn get_area(&self) -> Option { + fn area(&self) -> Option { unsafe { from_glib_none(ffi::gtk_cell_layout_get_area( self.as_ref().to_glib_none().0, @@ -92,7 +92,7 @@ impl> CellLayoutExt for O { } } - fn get_cells(&self) -> Vec { + fn cells(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gtk_cell_layout_get_cells( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/cell_renderer.rs b/gtk/src/auto/cell_renderer.rs index 2a8a02328e9b..ea9ce5df6801 100644 --- a/gtk/src/auto/cell_renderer.rs +++ b/gtk/src/auto/cell_renderer.rs @@ -52,13 +52,13 @@ pub trait CellRendererExt: 'static { ) -> gdk::Rectangle; #[doc(alias = "gtk_cell_renderer_get_alignment")] - fn get_alignment(&self) -> (f32, f32); + fn alignment(&self) -> (f32, f32); #[doc(alias = "gtk_cell_renderer_get_fixed_size")] - fn get_fixed_size(&self) -> (i32, i32); + fn fixed_size(&self) -> (i32, i32); #[doc(alias = "gtk_cell_renderer_get_padding")] - fn get_padding(&self) -> (i32, i32); + fn padding(&self) -> (i32, i32); #[doc(alias = "gtk_cell_renderer_get_preferred_height")] fn get_preferred_height>(&self, widget: &P) -> (i32, i32); @@ -77,10 +77,10 @@ pub trait CellRendererExt: 'static { -> (i32, i32); #[doc(alias = "gtk_cell_renderer_get_request_mode")] - fn get_request_mode(&self) -> SizeRequestMode; + fn request_mode(&self) -> SizeRequestMode; #[doc(alias = "gtk_cell_renderer_get_sensitive")] - fn get_sensitive(&self) -> bool; + fn is_sensitive(&self) -> bool; #[doc(alias = "gtk_cell_renderer_get_state")] fn get_state>( @@ -90,7 +90,7 @@ pub trait CellRendererExt: 'static { ) -> StateFlags; #[doc(alias = "gtk_cell_renderer_get_visible")] - fn get_visible(&self) -> bool; + fn is_visible(&self) -> bool; #[doc(alias = "gtk_cell_renderer_is_activatable")] fn is_activatable(&self) -> bool; @@ -134,53 +134,77 @@ pub trait CellRendererExt: 'static { #[doc(alias = "gtk_cell_renderer_stop_editing")] fn stop_editing(&self, canceled: bool); - fn set_property_cell_background(&self, cell_background: Option<&str>); + #[doc(alias = "set_property_cell_background")] + fn set_cell_background(&self, cell_background: Option<&str>); - fn get_property_cell_background_rgba(&self) -> Option; + #[doc(alias = "get_property_cell_background_rgba")] + fn cell_background_rgba(&self) -> Option; - fn set_property_cell_background_rgba(&self, cell_background_rgba: Option<&gdk::RGBA>); + #[doc(alias = "set_property_cell_background_rgba")] + fn set_cell_background_rgba(&self, cell_background_rgba: Option<&gdk::RGBA>); - fn get_property_cell_background_set(&self) -> bool; + #[doc(alias = "get_property_cell_background_set")] + fn is_cell_background_set(&self) -> bool; - fn set_property_cell_background_set(&self, cell_background_set: bool); + #[doc(alias = "set_property_cell_background_set")] + fn set_cell_background_set(&self, cell_background_set: bool); - fn get_property_editing(&self) -> bool; + #[doc(alias = "get_property_editing")] + fn is_editing(&self) -> bool; - fn get_property_height(&self) -> i32; + #[doc(alias = "get_property_height")] + fn height(&self) -> i32; - fn set_property_height(&self, height: i32); + #[doc(alias = "set_property_height")] + fn set_height(&self, height: i32); - fn get_property_is_expanded(&self) -> bool; + #[doc(alias = "get_property_is_expanded")] + fn is_expanded(&self) -> bool; - fn set_property_is_expanded(&self, is_expanded: bool); + #[doc(alias = "set_property_is_expanded")] + fn set_is_expanded(&self, is_expanded: bool); - fn get_property_is_expander(&self) -> bool; + #[doc(alias = "get_property_is_expander")] + fn is_expander(&self) -> bool; - fn set_property_is_expander(&self, is_expander: bool); + #[doc(alias = "set_property_is_expander")] + fn set_is_expander(&self, is_expander: bool); - fn get_property_mode(&self) -> CellRendererMode; + #[doc(alias = "get_property_mode")] + fn mode(&self) -> CellRendererMode; - fn set_property_mode(&self, mode: CellRendererMode); + #[doc(alias = "set_property_mode")] + fn set_mode(&self, mode: CellRendererMode); - fn get_property_width(&self) -> i32; + #[doc(alias = "get_property_width")] + fn width(&self) -> i32; - fn set_property_width(&self, width: i32); + #[doc(alias = "set_property_width")] + fn set_width(&self, width: i32); - fn get_property_xalign(&self) -> f32; + #[doc(alias = "get_property_xalign")] + fn xalign(&self) -> f32; - fn set_property_xalign(&self, xalign: f32); + #[doc(alias = "set_property_xalign")] + fn set_xalign(&self, xalign: f32); - fn get_property_xpad(&self) -> u32; + #[doc(alias = "get_property_xpad")] + fn xpad(&self) -> u32; - fn set_property_xpad(&self, xpad: u32); + #[doc(alias = "set_property_xpad")] + fn set_xpad(&self, xpad: u32); - fn get_property_yalign(&self) -> f32; + #[doc(alias = "get_property_yalign")] + fn yalign(&self) -> f32; - fn set_property_yalign(&self, yalign: f32); + #[doc(alias = "set_property_yalign")] + fn set_yalign(&self, yalign: f32); - fn get_property_ypad(&self) -> u32; + #[doc(alias = "get_property_ypad")] + fn ypad(&self) -> u32; - fn set_property_ypad(&self, ypad: u32); + #[doc(alias = "set_property_ypad")] + fn set_ypad(&self, ypad: u32); fn connect_editing_canceled(&self, f: F) -> SignalHandlerId; @@ -271,7 +295,7 @@ impl> CellRendererExt for O { } } - fn get_alignment(&self) -> (f32, f32) { + fn alignment(&self) -> (f32, f32) { unsafe { let mut xalign = mem::MaybeUninit::uninit(); let mut yalign = mem::MaybeUninit::uninit(); @@ -286,7 +310,7 @@ impl> CellRendererExt for O { } } - fn get_fixed_size(&self) -> (i32, i32) { + fn fixed_size(&self) -> (i32, i32) { unsafe { let mut width = mem::MaybeUninit::uninit(); let mut height = mem::MaybeUninit::uninit(); @@ -301,7 +325,7 @@ impl> CellRendererExt for O { } } - fn get_padding(&self) -> (i32, i32) { + fn padding(&self) -> (i32, i32) { unsafe { let mut xpad = mem::MaybeUninit::uninit(); let mut ypad = mem::MaybeUninit::uninit(); @@ -400,7 +424,7 @@ impl> CellRendererExt for O { } } - fn get_request_mode(&self) -> SizeRequestMode { + fn request_mode(&self) -> SizeRequestMode { unsafe { from_glib(ffi::gtk_cell_renderer_get_request_mode( self.as_ref().to_glib_none().0, @@ -408,7 +432,7 @@ impl> CellRendererExt for O { } } - fn get_sensitive(&self) -> bool { + fn is_sensitive(&self) -> bool { unsafe { from_glib(ffi::gtk_cell_renderer_get_sensitive( self.as_ref().to_glib_none().0, @@ -430,7 +454,7 @@ impl> CellRendererExt for O { } } - fn get_visible(&self) -> bool { + fn is_visible(&self) -> bool { unsafe { from_glib(ffi::gtk_cell_renderer_get_visible( self.as_ref().to_glib_none().0, @@ -527,7 +551,7 @@ impl> CellRendererExt for O { } } - fn set_property_cell_background(&self, cell_background: Option<&str>) { + fn set_cell_background(&self, cell_background: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -537,7 +561,7 @@ impl> CellRendererExt for O { } } - fn get_property_cell_background_rgba(&self) -> Option { + fn cell_background_rgba(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -551,7 +575,7 @@ impl> CellRendererExt for O { } } - fn set_property_cell_background_rgba(&self, cell_background_rgba: Option<&gdk::RGBA>) { + fn set_cell_background_rgba(&self, cell_background_rgba: Option<&gdk::RGBA>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -561,7 +585,7 @@ impl> CellRendererExt for O { } } - fn get_property_cell_background_set(&self) -> bool { + fn is_cell_background_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -576,7 +600,7 @@ impl> CellRendererExt for O { } } - fn set_property_cell_background_set(&self, cell_background_set: bool) { + fn set_cell_background_set(&self, cell_background_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -586,7 +610,7 @@ impl> CellRendererExt for O { } } - fn get_property_editing(&self) -> bool { + fn is_editing(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -601,7 +625,7 @@ impl> CellRendererExt for O { } } - fn get_property_height(&self) -> i32 { + fn height(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -616,7 +640,7 @@ impl> CellRendererExt for O { } } - fn set_property_height(&self, height: i32) { + fn set_height(&self, height: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -626,7 +650,7 @@ impl> CellRendererExt for O { } } - fn get_property_is_expanded(&self) -> bool { + fn is_expanded(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -641,7 +665,7 @@ impl> CellRendererExt for O { } } - fn set_property_is_expanded(&self, is_expanded: bool) { + fn set_is_expanded(&self, is_expanded: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -651,7 +675,7 @@ impl> CellRendererExt for O { } } - fn get_property_is_expander(&self) -> bool { + fn is_expander(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -666,7 +690,7 @@ impl> CellRendererExt for O { } } - fn set_property_is_expander(&self, is_expander: bool) { + fn set_is_expander(&self, is_expander: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -676,7 +700,7 @@ impl> CellRendererExt for O { } } - fn get_property_mode(&self) -> CellRendererMode { + fn mode(&self) -> CellRendererMode { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -691,7 +715,7 @@ impl> CellRendererExt for O { } } - fn set_property_mode(&self, mode: CellRendererMode) { + fn set_mode(&self, mode: CellRendererMode) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -701,7 +725,7 @@ impl> CellRendererExt for O { } } - fn get_property_width(&self) -> i32 { + fn width(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -716,7 +740,7 @@ impl> CellRendererExt for O { } } - fn set_property_width(&self, width: i32) { + fn set_width(&self, width: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -726,7 +750,7 @@ impl> CellRendererExt for O { } } - fn get_property_xalign(&self) -> f32 { + fn xalign(&self) -> f32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -741,7 +765,7 @@ impl> CellRendererExt for O { } } - fn set_property_xalign(&self, xalign: f32) { + fn set_xalign(&self, xalign: f32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -751,7 +775,7 @@ impl> CellRendererExt for O { } } - fn get_property_xpad(&self) -> u32 { + fn xpad(&self) -> u32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -766,7 +790,7 @@ impl> CellRendererExt for O { } } - fn set_property_xpad(&self, xpad: u32) { + fn set_xpad(&self, xpad: u32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -776,7 +800,7 @@ impl> CellRendererExt for O { } } - fn get_property_yalign(&self) -> f32 { + fn yalign(&self) -> f32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -791,7 +815,7 @@ impl> CellRendererExt for O { } } - fn set_property_yalign(&self, yalign: f32) { + fn set_yalign(&self, yalign: f32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -801,7 +825,7 @@ impl> CellRendererExt for O { } } - fn get_property_ypad(&self) -> u32 { + fn ypad(&self) -> u32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -816,7 +840,7 @@ impl> CellRendererExt for O { } } - fn set_property_ypad(&self, ypad: u32) { + fn set_ypad(&self, ypad: u32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/cell_renderer_accel.rs b/gtk/src/auto/cell_renderer_accel.rs index 3e430969acfd..88bc921f1215 100644 --- a/gtk/src/auto/cell_renderer_accel.rs +++ b/gtk/src/auto/cell_renderer_accel.rs @@ -635,21 +635,29 @@ impl CellRendererAccelBuilder { pub const NONE_CELL_RENDERER_ACCEL: Option<&CellRendererAccel> = None; pub trait CellRendererAccelExt: 'static { - fn get_property_accel_key(&self) -> u32; + #[doc(alias = "get_property_accel_key")] + fn accel_key(&self) -> u32; - fn set_property_accel_key(&self, accel_key: u32); + #[doc(alias = "set_property_accel_key")] + fn set_accel_key(&self, accel_key: u32); - fn get_property_accel_mode(&self) -> CellRendererAccelMode; + #[doc(alias = "get_property_accel_mode")] + fn accel_mode(&self) -> CellRendererAccelMode; - fn set_property_accel_mode(&self, accel_mode: CellRendererAccelMode); + #[doc(alias = "set_property_accel_mode")] + fn set_accel_mode(&self, accel_mode: CellRendererAccelMode); - fn get_property_accel_mods(&self) -> gdk::ModifierType; + #[doc(alias = "get_property_accel_mods")] + fn accel_mods(&self) -> gdk::ModifierType; - fn set_property_accel_mods(&self, accel_mods: gdk::ModifierType); + #[doc(alias = "set_property_accel_mods")] + fn set_accel_mods(&self, accel_mods: gdk::ModifierType); - fn get_property_keycode(&self) -> u32; + #[doc(alias = "get_property_keycode")] + fn keycode(&self) -> u32; - fn set_property_keycode(&self, keycode: u32); + #[doc(alias = "set_property_keycode")] + fn set_keycode(&self, keycode: u32); fn connect_accel_cleared(&self, f: F) -> SignalHandlerId; @@ -668,7 +676,7 @@ pub trait CellRendererAccelExt: 'static { } impl> CellRendererAccelExt for O { - fn get_property_accel_key(&self) -> u32 { + fn accel_key(&self) -> u32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -683,7 +691,7 @@ impl> CellRendererAccelExt for O { } } - fn set_property_accel_key(&self, accel_key: u32) { + fn set_accel_key(&self, accel_key: u32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -693,7 +701,7 @@ impl> CellRendererAccelExt for O { } } - fn get_property_accel_mode(&self) -> CellRendererAccelMode { + fn accel_mode(&self) -> CellRendererAccelMode { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -709,7 +717,7 @@ impl> CellRendererAccelExt for O { } } - fn set_property_accel_mode(&self, accel_mode: CellRendererAccelMode) { + fn set_accel_mode(&self, accel_mode: CellRendererAccelMode) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -719,7 +727,7 @@ impl> CellRendererAccelExt for O { } } - fn get_property_accel_mods(&self) -> gdk::ModifierType { + fn accel_mods(&self) -> gdk::ModifierType { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -735,7 +743,7 @@ impl> CellRendererAccelExt for O { } } - fn set_property_accel_mods(&self, accel_mods: gdk::ModifierType) { + fn set_accel_mods(&self, accel_mods: gdk::ModifierType) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -745,7 +753,7 @@ impl> CellRendererAccelExt for O { } } - fn get_property_keycode(&self) -> u32 { + fn keycode(&self) -> u32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -760,7 +768,7 @@ impl> CellRendererAccelExt for O { } } - fn set_property_keycode(&self, keycode: u32) { + fn set_keycode(&self, keycode: u32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/cell_renderer_combo.rs b/gtk/src/auto/cell_renderer_combo.rs index 443fe0c39fc1..1e6d0eff5f9e 100644 --- a/gtk/src/auto/cell_renderer_combo.rs +++ b/gtk/src/auto/cell_renderer_combo.rs @@ -627,17 +627,23 @@ impl CellRendererComboBuilder { pub const NONE_CELL_RENDERER_COMBO: Option<&CellRendererCombo> = None; pub trait CellRendererComboExt: 'static { - fn get_property_has_entry(&self) -> bool; + #[doc(alias = "get_property_has_entry")] + fn has_entry(&self) -> bool; - fn set_property_has_entry(&self, has_entry: bool); + #[doc(alias = "set_property_has_entry")] + fn set_has_entry(&self, has_entry: bool); - fn get_property_model(&self) -> Option; + #[doc(alias = "get_property_model")] + fn model(&self) -> Option; - fn set_property_model>(&self, model: Option<&P>); + #[doc(alias = "set_property_model")] + fn set_model>(&self, model: Option<&P>); - fn get_property_text_column(&self) -> i32; + #[doc(alias = "get_property_text_column")] + fn text_column(&self) -> i32; - fn set_property_text_column(&self, text_column: i32); + #[doc(alias = "set_property_text_column")] + fn set_text_column(&self, text_column: i32); fn connect_changed(&self, f: F) -> SignalHandlerId; @@ -650,7 +656,7 @@ pub trait CellRendererComboExt: 'static { } impl> CellRendererComboExt for O { - fn get_property_has_entry(&self) -> bool { + fn has_entry(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -665,7 +671,7 @@ impl> CellRendererComboExt for O { } } - fn set_property_has_entry(&self, has_entry: bool) { + fn set_has_entry(&self, has_entry: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -675,7 +681,7 @@ impl> CellRendererComboExt for O { } } - fn get_property_model(&self) -> Option { + fn model(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -689,7 +695,7 @@ impl> CellRendererComboExt for O { } } - fn set_property_model>(&self, model: Option<&P>) { + fn set_model>(&self, model: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -699,7 +705,7 @@ impl> CellRendererComboExt for O { } } - fn get_property_text_column(&self) -> i32 { + fn text_column(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -714,7 +720,7 @@ impl> CellRendererComboExt for O { } } - fn set_property_text_column(&self, text_column: i32) { + fn set_text_column(&self, text_column: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/cell_renderer_pixbuf.rs b/gtk/src/auto/cell_renderer_pixbuf.rs index 39e1da77e10e..bcb3a2267337 100644 --- a/gtk/src/auto/cell_renderer_pixbuf.rs +++ b/gtk/src/auto/cell_renderer_pixbuf.rs @@ -264,41 +264,54 @@ pub const NONE_CELL_RENDERER_PIXBUF: Option<&CellRendererPixbuf> = None; pub trait CellRendererPixbufExt: 'static { #[cfg_attr(feature = "v3_16", deprecated)] - fn get_property_follow_state(&self) -> bool; + #[doc(alias = "get_property_follow_state")] + fn follows_state(&self) -> bool; #[cfg_attr(feature = "v3_16", deprecated)] - fn set_property_follow_state(&self, follow_state: bool); + #[doc(alias = "set_property_follow_state")] + fn set_follow_state(&self, follow_state: bool); - fn get_property_gicon(&self) -> Option; + #[doc(alias = "get_property_gicon")] + fn gicon(&self) -> Option; - fn set_property_gicon>(&self, gicon: Option<&P>); + #[doc(alias = "set_property_gicon")] + fn set_gicon>(&self, gicon: Option<&P>); - fn get_property_icon_name(&self) -> Option; + #[doc(alias = "get_property_icon_name")] + fn icon_name(&self) -> Option; - fn set_property_icon_name(&self, icon_name: Option<&str>); + #[doc(alias = "set_property_icon_name")] + fn set_icon_name(&self, icon_name: Option<&str>); - fn get_property_pixbuf(&self) -> Option; + #[doc(alias = "get_property_pixbuf")] + fn pixbuf(&self) -> Option; - fn set_property_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>); + #[doc(alias = "set_property_pixbuf")] + fn set_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>); - fn get_property_pixbuf_expander_closed(&self) -> Option; + #[doc(alias = "get_property_pixbuf_expander_closed")] + fn pixbuf_expander_closed(&self) -> Option; - fn set_property_pixbuf_expander_closed( - &self, - pixbuf_expander_closed: Option<&gdk_pixbuf::Pixbuf>, - ); + #[doc(alias = "set_property_pixbuf_expander_closed")] + fn set_pixbuf_expander_closed(&self, pixbuf_expander_closed: Option<&gdk_pixbuf::Pixbuf>); - fn get_property_pixbuf_expander_open(&self) -> Option; + #[doc(alias = "get_property_pixbuf_expander_open")] + fn pixbuf_expander_open(&self) -> Option; - fn set_property_pixbuf_expander_open(&self, pixbuf_expander_open: Option<&gdk_pixbuf::Pixbuf>); + #[doc(alias = "set_property_pixbuf_expander_open")] + fn set_pixbuf_expander_open(&self, pixbuf_expander_open: Option<&gdk_pixbuf::Pixbuf>); - fn get_property_stock_detail(&self) -> Option; + #[doc(alias = "get_property_stock_detail")] + fn stock_detail(&self) -> Option; - fn set_property_stock_detail(&self, stock_detail: Option<&str>); + #[doc(alias = "set_property_stock_detail")] + fn set_stock_detail(&self, stock_detail: Option<&str>); - fn get_property_surface(&self) -> Option; + #[doc(alias = "get_property_surface")] + fn surface(&self) -> Option; - fn set_property_surface(&self, surface: Option<&cairo::Surface>); + #[doc(alias = "set_property_surface")] + fn set_surface(&self, surface: Option<&cairo::Surface>); #[cfg_attr(feature = "v3_16", deprecated)] fn connect_property_follow_state_notify(&self, f: F) @@ -329,7 +342,7 @@ pub trait CellRendererPixbufExt: 'static { } impl> CellRendererPixbufExt for O { - fn get_property_follow_state(&self) -> bool { + fn follows_state(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -344,7 +357,7 @@ impl> CellRendererPixbufExt for O { } } - fn set_property_follow_state(&self, follow_state: bool) { + fn set_follow_state(&self, follow_state: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -354,7 +367,7 @@ impl> CellRendererPixbufExt for O { } } - fn get_property_gicon(&self) -> Option { + fn gicon(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -368,7 +381,7 @@ impl> CellRendererPixbufExt for O { } } - fn set_property_gicon>(&self, gicon: Option<&P>) { + fn set_gicon>(&self, gicon: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -378,7 +391,7 @@ impl> CellRendererPixbufExt for O { } } - fn get_property_icon_name(&self) -> Option { + fn icon_name(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -392,7 +405,7 @@ impl> CellRendererPixbufExt for O { } } - fn set_property_icon_name(&self, icon_name: Option<&str>) { + fn set_icon_name(&self, icon_name: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -402,7 +415,7 @@ impl> CellRendererPixbufExt for O { } } - fn get_property_pixbuf(&self) -> Option { + fn pixbuf(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -417,7 +430,7 @@ impl> CellRendererPixbufExt for O { } } - fn set_property_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>) { + fn set_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -427,7 +440,7 @@ impl> CellRendererPixbufExt for O { } } - fn get_property_pixbuf_expander_closed(&self) -> Option { + fn pixbuf_expander_closed(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -442,10 +455,7 @@ impl> CellRendererPixbufExt for O { } } - fn set_property_pixbuf_expander_closed( - &self, - pixbuf_expander_closed: Option<&gdk_pixbuf::Pixbuf>, - ) { + fn set_pixbuf_expander_closed(&self, pixbuf_expander_closed: Option<&gdk_pixbuf::Pixbuf>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -455,7 +465,7 @@ impl> CellRendererPixbufExt for O { } } - fn get_property_pixbuf_expander_open(&self) -> Option { + fn pixbuf_expander_open(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -470,7 +480,7 @@ impl> CellRendererPixbufExt for O { } } - fn set_property_pixbuf_expander_open(&self, pixbuf_expander_open: Option<&gdk_pixbuf::Pixbuf>) { + fn set_pixbuf_expander_open(&self, pixbuf_expander_open: Option<&gdk_pixbuf::Pixbuf>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -480,7 +490,7 @@ impl> CellRendererPixbufExt for O { } } - fn get_property_stock_detail(&self) -> Option { + fn stock_detail(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -494,7 +504,7 @@ impl> CellRendererPixbufExt for O { } } - fn set_property_stock_detail(&self, stock_detail: Option<&str>) { + fn set_stock_detail(&self, stock_detail: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -504,7 +514,7 @@ impl> CellRendererPixbufExt for O { } } - fn get_property_surface(&self) -> Option { + fn surface(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -518,7 +528,7 @@ impl> CellRendererPixbufExt for O { } } - fn set_property_surface(&self, surface: Option<&cairo::Surface>) { + fn set_surface(&self, surface: Option<&cairo::Surface>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/cell_renderer_progress.rs b/gtk/src/auto/cell_renderer_progress.rs index 36c3a59ed522..355228fdf3d7 100644 --- a/gtk/src/auto/cell_renderer_progress.rs +++ b/gtk/src/auto/cell_renderer_progress.rs @@ -247,29 +247,41 @@ impl CellRendererProgressBuilder { pub const NONE_CELL_RENDERER_PROGRESS: Option<&CellRendererProgress> = None; pub trait CellRendererProgressExt: 'static { - fn get_property_inverted(&self) -> bool; + #[doc(alias = "get_property_inverted")] + fn is_inverted(&self) -> bool; - fn set_property_inverted(&self, inverted: bool); + #[doc(alias = "set_property_inverted")] + fn set_inverted(&self, inverted: bool); - fn get_property_pulse(&self) -> i32; + #[doc(alias = "get_property_pulse")] + fn pulse(&self) -> i32; - fn set_property_pulse(&self, pulse: i32); + #[doc(alias = "set_property_pulse")] + fn set_pulse(&self, pulse: i32); - fn get_property_text(&self) -> Option; + #[doc(alias = "get_property_text")] + fn text(&self) -> Option; - fn set_property_text(&self, text: Option<&str>); + #[doc(alias = "set_property_text")] + fn set_text(&self, text: Option<&str>); - fn get_property_text_xalign(&self) -> f32; + #[doc(alias = "get_property_text_xalign")] + fn text_xalign(&self) -> f32; - fn set_property_text_xalign(&self, text_xalign: f32); + #[doc(alias = "set_property_text_xalign")] + fn set_text_xalign(&self, text_xalign: f32); - fn get_property_text_yalign(&self) -> f32; + #[doc(alias = "get_property_text_yalign")] + fn text_yalign(&self) -> f32; - fn set_property_text_yalign(&self, text_yalign: f32); + #[doc(alias = "set_property_text_yalign")] + fn set_text_yalign(&self, text_yalign: f32); - fn get_property_value(&self) -> i32; + #[doc(alias = "get_property_value")] + fn value(&self) -> i32; - fn set_property_value(&self, value: i32); + #[doc(alias = "set_property_value")] + fn set_value(&self, value: i32); fn connect_property_inverted_notify(&self, f: F) -> SignalHandlerId; @@ -285,7 +297,7 @@ pub trait CellRendererProgressExt: 'static { } impl> CellRendererProgressExt for O { - fn get_property_inverted(&self) -> bool { + fn is_inverted(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -300,7 +312,7 @@ impl> CellRendererProgressExt for O { } } - fn set_property_inverted(&self, inverted: bool) { + fn set_inverted(&self, inverted: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -310,7 +322,7 @@ impl> CellRendererProgressExt for O { } } - fn get_property_pulse(&self) -> i32 { + fn pulse(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -325,7 +337,7 @@ impl> CellRendererProgressExt for O { } } - fn set_property_pulse(&self, pulse: i32) { + fn set_pulse(&self, pulse: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -335,7 +347,7 @@ impl> CellRendererProgressExt for O { } } - fn get_property_text(&self) -> Option { + fn text(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -349,7 +361,7 @@ impl> CellRendererProgressExt for O { } } - fn set_property_text(&self, text: Option<&str>) { + fn set_text(&self, text: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -359,7 +371,7 @@ impl> CellRendererProgressExt for O { } } - fn get_property_text_xalign(&self) -> f32 { + fn text_xalign(&self) -> f32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -374,7 +386,7 @@ impl> CellRendererProgressExt for O { } } - fn set_property_text_xalign(&self, text_xalign: f32) { + fn set_text_xalign(&self, text_xalign: f32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -384,7 +396,7 @@ impl> CellRendererProgressExt for O { } } - fn get_property_text_yalign(&self) -> f32 { + fn text_yalign(&self) -> f32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -399,7 +411,7 @@ impl> CellRendererProgressExt for O { } } - fn set_property_text_yalign(&self, text_yalign: f32) { + fn set_text_yalign(&self, text_yalign: f32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -409,7 +421,7 @@ impl> CellRendererProgressExt for O { } } - fn get_property_value(&self) -> i32 { + fn value(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -424,7 +436,7 @@ impl> CellRendererProgressExt for O { } } - fn set_property_value(&self, value: i32) { + fn set_value(&self, value: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/cell_renderer_spin.rs b/gtk/src/auto/cell_renderer_spin.rs index cde076b2220f..9e23abf42ffb 100644 --- a/gtk/src/auto/cell_renderer_spin.rs +++ b/gtk/src/auto/cell_renderer_spin.rs @@ -625,17 +625,23 @@ impl CellRendererSpinBuilder { pub const NONE_CELL_RENDERER_SPIN: Option<&CellRendererSpin> = None; pub trait CellRendererSpinExt: 'static { - fn get_property_adjustment(&self) -> Option; + #[doc(alias = "get_property_adjustment")] + fn adjustment(&self) -> Option; - fn set_property_adjustment>(&self, adjustment: Option<&P>); + #[doc(alias = "set_property_adjustment")] + fn set_adjustment>(&self, adjustment: Option<&P>); - fn get_property_climb_rate(&self) -> f64; + #[doc(alias = "get_property_climb_rate")] + fn climb_rate(&self) -> f64; - fn set_property_climb_rate(&self, climb_rate: f64); + #[doc(alias = "set_property_climb_rate")] + fn set_climb_rate(&self, climb_rate: f64); - fn get_property_digits(&self) -> u32; + #[doc(alias = "get_property_digits")] + fn digits(&self) -> u32; - fn set_property_digits(&self, digits: u32); + #[doc(alias = "set_property_digits")] + fn set_digits(&self, digits: u32); fn connect_property_adjustment_notify(&self, f: F) -> SignalHandlerId; @@ -645,7 +651,7 @@ pub trait CellRendererSpinExt: 'static { } impl> CellRendererSpinExt for O { - fn get_property_adjustment(&self) -> Option { + fn adjustment(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -659,7 +665,7 @@ impl> CellRendererSpinExt for O { } } - fn set_property_adjustment>(&self, adjustment: Option<&P>) { + fn set_adjustment>(&self, adjustment: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -669,7 +675,7 @@ impl> CellRendererSpinExt for O { } } - fn get_property_climb_rate(&self) -> f64 { + fn climb_rate(&self) -> f64 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -684,7 +690,7 @@ impl> CellRendererSpinExt for O { } } - fn set_property_climb_rate(&self, climb_rate: f64) { + fn set_climb_rate(&self, climb_rate: f64) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -694,7 +700,7 @@ impl> CellRendererSpinExt for O { } } - fn get_property_digits(&self) -> u32 { + fn digits(&self) -> u32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -709,7 +715,7 @@ impl> CellRendererSpinExt for O { } } - fn set_property_digits(&self, digits: u32) { + fn set_digits(&self, digits: u32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/cell_renderer_spinner.rs b/gtk/src/auto/cell_renderer_spinner.rs index c6e18fd17d1b..99006fb28931 100644 --- a/gtk/src/auto/cell_renderer_spinner.rs +++ b/gtk/src/auto/cell_renderer_spinner.rs @@ -210,17 +210,23 @@ impl CellRendererSpinnerBuilder { pub const NONE_CELL_RENDERER_SPINNER: Option<&CellRendererSpinner> = None; pub trait CellRendererSpinnerExt: 'static { - fn get_property_active(&self) -> bool; + #[doc(alias = "get_property_active")] + fn is_active(&self) -> bool; - fn set_property_active(&self, active: bool); + #[doc(alias = "set_property_active")] + fn set_active(&self, active: bool); - fn get_property_pulse(&self) -> u32; + #[doc(alias = "get_property_pulse")] + fn pulse(&self) -> u32; - fn set_property_pulse(&self, pulse: u32); + #[doc(alias = "set_property_pulse")] + fn set_pulse(&self, pulse: u32); - fn get_property_size(&self) -> IconSize; + #[doc(alias = "get_property_size")] + fn size(&self) -> IconSize; - fn set_property_size(&self, size: IconSize); + #[doc(alias = "set_property_size")] + fn set_size(&self, size: IconSize); fn connect_property_active_notify(&self, f: F) -> SignalHandlerId; @@ -230,7 +236,7 @@ pub trait CellRendererSpinnerExt: 'static { } impl> CellRendererSpinnerExt for O { - fn get_property_active(&self) -> bool { + fn is_active(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -245,7 +251,7 @@ impl> CellRendererSpinnerExt for O { } } - fn set_property_active(&self, active: bool) { + fn set_active(&self, active: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -255,7 +261,7 @@ impl> CellRendererSpinnerExt for O { } } - fn get_property_pulse(&self) -> u32 { + fn pulse(&self) -> u32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -270,7 +276,7 @@ impl> CellRendererSpinnerExt for O { } } - fn set_property_pulse(&self, pulse: u32) { + fn set_pulse(&self, pulse: u32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -280,7 +286,7 @@ impl> CellRendererSpinnerExt for O { } } - fn get_property_size(&self) -> IconSize { + fn size(&self) -> IconSize { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -295,7 +301,7 @@ impl> CellRendererSpinnerExt for O { } } - fn set_property_size(&self, size: IconSize) { + fn set_size(&self, size: IconSize) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/cell_renderer_text.rs b/gtk/src/auto/cell_renderer_text.rs index 1b7d650155c6..7d8cb12872c6 100644 --- a/gtk/src/auto/cell_renderer_text.rs +++ b/gtk/src/auto/cell_renderer_text.rs @@ -600,183 +600,272 @@ pub trait CellRendererTextExt: 'static { #[doc(alias = "gtk_cell_renderer_text_set_fixed_height_from_font")] fn set_fixed_height_from_font(&self, number_of_rows: i32); - fn get_property_align_set(&self) -> bool; + #[doc(alias = "get_property_align_set")] + fn is_align_set(&self) -> bool; - fn set_property_align_set(&self, align_set: bool); + #[doc(alias = "set_property_align_set")] + fn set_align_set(&self, align_set: bool); - fn get_property_alignment(&self) -> pango::Alignment; + #[doc(alias = "get_property_alignment")] + fn alignment(&self) -> pango::Alignment; - fn set_property_alignment(&self, alignment: pango::Alignment); + #[doc(alias = "set_property_alignment")] + fn set_alignment(&self, alignment: pango::Alignment); - fn get_property_attributes(&self) -> Option; + #[doc(alias = "get_property_attributes")] + fn attributes(&self) -> Option; - fn set_property_attributes(&self, attributes: Option<&pango::AttrList>); + #[doc(alias = "set_property_attributes")] + fn set_attributes(&self, attributes: Option<&pango::AttrList>); - fn set_property_background(&self, background: Option<&str>); + #[doc(alias = "set_property_background")] + fn set_background(&self, background: Option<&str>); - fn get_property_background_rgba(&self) -> Option; + #[doc(alias = "get_property_background_rgba")] + fn background_rgba(&self) -> Option; - fn set_property_background_rgba(&self, background_rgba: Option<&gdk::RGBA>); + #[doc(alias = "set_property_background_rgba")] + fn set_background_rgba(&self, background_rgba: Option<&gdk::RGBA>); - fn get_property_background_set(&self) -> bool; + #[doc(alias = "get_property_background_set")] + fn is_background_set(&self) -> bool; - fn set_property_background_set(&self, background_set: bool); + #[doc(alias = "set_property_background_set")] + fn set_background_set(&self, background_set: bool); - fn get_property_editable(&self) -> bool; + #[doc(alias = "get_property_editable")] + fn is_editable(&self) -> bool; - fn set_property_editable(&self, editable: bool); + #[doc(alias = "set_property_editable")] + fn set_editable(&self, editable: bool); - fn get_property_editable_set(&self) -> bool; + #[doc(alias = "get_property_editable_set")] + fn is_editable_set(&self) -> bool; - fn set_property_editable_set(&self, editable_set: bool); + #[doc(alias = "set_property_editable_set")] + fn set_editable_set(&self, editable_set: bool); - fn get_property_ellipsize(&self) -> pango::EllipsizeMode; + #[doc(alias = "get_property_ellipsize")] + fn ellipsize(&self) -> pango::EllipsizeMode; - fn set_property_ellipsize(&self, ellipsize: pango::EllipsizeMode); + #[doc(alias = "set_property_ellipsize")] + fn set_ellipsize(&self, ellipsize: pango::EllipsizeMode); - fn get_property_ellipsize_set(&self) -> bool; + #[doc(alias = "get_property_ellipsize_set")] + fn is_ellipsize_set(&self) -> bool; - fn set_property_ellipsize_set(&self, ellipsize_set: bool); + #[doc(alias = "set_property_ellipsize_set")] + fn set_ellipsize_set(&self, ellipsize_set: bool); - fn get_property_family(&self) -> Option; + #[doc(alias = "get_property_family")] + fn family(&self) -> Option; - fn set_property_family(&self, family: Option<&str>); + #[doc(alias = "set_property_family")] + fn set_family(&self, family: Option<&str>); - fn get_property_family_set(&self) -> bool; + #[doc(alias = "get_property_family_set")] + fn is_family_set(&self) -> bool; - fn set_property_family_set(&self, family_set: bool); + #[doc(alias = "set_property_family_set")] + fn set_family_set(&self, family_set: bool); - fn get_property_font(&self) -> Option; + #[doc(alias = "get_property_font")] + fn font(&self) -> Option; - fn set_property_font(&self, font: Option<&str>); + #[doc(alias = "set_property_font")] + fn set_font(&self, font: Option<&str>); - fn get_property_font_desc(&self) -> Option; + #[doc(alias = "get_property_font_desc")] + fn font_desc(&self) -> Option; - fn set_property_font_desc(&self, font_desc: Option<&pango::FontDescription>); + #[doc(alias = "set_property_font_desc")] + fn set_font_desc(&self, font_desc: Option<&pango::FontDescription>); - fn set_property_foreground(&self, foreground: Option<&str>); + #[doc(alias = "set_property_foreground")] + fn set_foreground(&self, foreground: Option<&str>); - fn get_property_foreground_rgba(&self) -> Option; + #[doc(alias = "get_property_foreground_rgba")] + fn foreground_rgba(&self) -> Option; - fn set_property_foreground_rgba(&self, foreground_rgba: Option<&gdk::RGBA>); + #[doc(alias = "set_property_foreground_rgba")] + fn set_foreground_rgba(&self, foreground_rgba: Option<&gdk::RGBA>); - fn get_property_foreground_set(&self) -> bool; + #[doc(alias = "get_property_foreground_set")] + fn is_foreground_set(&self) -> bool; - fn set_property_foreground_set(&self, foreground_set: bool); + #[doc(alias = "set_property_foreground_set")] + fn set_foreground_set(&self, foreground_set: bool); - fn get_property_language(&self) -> Option; + #[doc(alias = "get_property_language")] + fn language(&self) -> Option; - fn set_property_language(&self, language: Option<&str>); + #[doc(alias = "set_property_language")] + fn set_language(&self, language: Option<&str>); - fn get_property_language_set(&self) -> bool; + #[doc(alias = "get_property_language_set")] + fn is_language_set(&self) -> bool; - fn set_property_language_set(&self, language_set: bool); + #[doc(alias = "set_property_language_set")] + fn set_language_set(&self, language_set: bool); - fn set_property_markup(&self, markup: Option<&str>); + #[doc(alias = "set_property_markup")] + fn set_markup(&self, markup: Option<&str>); - fn get_property_max_width_chars(&self) -> i32; + #[doc(alias = "get_property_max_width_chars")] + fn max_width_chars(&self) -> i32; - fn set_property_max_width_chars(&self, max_width_chars: i32); + #[doc(alias = "set_property_max_width_chars")] + fn set_max_width_chars(&self, max_width_chars: i32); - fn get_property_placeholder_text(&self) -> Option; + #[doc(alias = "get_property_placeholder_text")] + fn placeholder_text(&self) -> Option; - fn set_property_placeholder_text(&self, placeholder_text: Option<&str>); + #[doc(alias = "set_property_placeholder_text")] + fn set_placeholder_text(&self, placeholder_text: Option<&str>); - fn get_property_rise(&self) -> i32; + #[doc(alias = "get_property_rise")] + fn rise(&self) -> i32; - fn set_property_rise(&self, rise: i32); + #[doc(alias = "set_property_rise")] + fn set_rise(&self, rise: i32); - fn get_property_rise_set(&self) -> bool; + #[doc(alias = "get_property_rise_set")] + fn is_rise_set(&self) -> bool; - fn set_property_rise_set(&self, rise_set: bool); + #[doc(alias = "set_property_rise_set")] + fn set_rise_set(&self, rise_set: bool); - fn get_property_scale(&self) -> f64; + #[doc(alias = "get_property_scale")] + fn scale(&self) -> f64; - fn set_property_scale(&self, scale: f64); + #[doc(alias = "set_property_scale")] + fn set_scale(&self, scale: f64); - fn get_property_scale_set(&self) -> bool; + #[doc(alias = "get_property_scale_set")] + fn is_scale_set(&self) -> bool; - fn set_property_scale_set(&self, scale_set: bool); + #[doc(alias = "set_property_scale_set")] + fn set_scale_set(&self, scale_set: bool); - fn get_property_single_paragraph_mode(&self) -> bool; + #[doc(alias = "get_property_single_paragraph_mode")] + fn is_single_paragraph_mode(&self) -> bool; - fn set_property_single_paragraph_mode(&self, single_paragraph_mode: bool); + #[doc(alias = "set_property_single_paragraph_mode")] + fn set_single_paragraph_mode(&self, single_paragraph_mode: bool); - fn get_property_size(&self) -> i32; + #[doc(alias = "get_property_size")] + fn size(&self) -> i32; - fn set_property_size(&self, size: i32); + #[doc(alias = "set_property_size")] + fn set_size(&self, size: i32); - fn get_property_size_points(&self) -> f64; + #[doc(alias = "get_property_size_points")] + fn size_points(&self) -> f64; - fn set_property_size_points(&self, size_points: f64); + #[doc(alias = "set_property_size_points")] + fn set_size_points(&self, size_points: f64); - fn get_property_size_set(&self) -> bool; + #[doc(alias = "get_property_size_set")] + fn is_size_set(&self) -> bool; - fn set_property_size_set(&self, size_set: bool); + #[doc(alias = "set_property_size_set")] + fn set_size_set(&self, size_set: bool); - fn get_property_stretch(&self) -> pango::Stretch; + #[doc(alias = "get_property_stretch")] + fn stretch(&self) -> pango::Stretch; - fn set_property_stretch(&self, stretch: pango::Stretch); + #[doc(alias = "set_property_stretch")] + fn set_stretch(&self, stretch: pango::Stretch); - fn get_property_stretch_set(&self) -> bool; + #[doc(alias = "get_property_stretch_set")] + fn is_stretch_set(&self) -> bool; - fn set_property_stretch_set(&self, stretch_set: bool); + #[doc(alias = "set_property_stretch_set")] + fn set_stretch_set(&self, stretch_set: bool); - fn get_property_strikethrough(&self) -> bool; + #[doc(alias = "get_property_strikethrough")] + fn is_strikethrough(&self) -> bool; - fn set_property_strikethrough(&self, strikethrough: bool); + #[doc(alias = "set_property_strikethrough")] + fn set_strikethrough(&self, strikethrough: bool); - fn get_property_strikethrough_set(&self) -> bool; + #[doc(alias = "get_property_strikethrough_set")] + fn is_strikethrough_set(&self) -> bool; - fn set_property_strikethrough_set(&self, strikethrough_set: bool); + #[doc(alias = "set_property_strikethrough_set")] + fn set_strikethrough_set(&self, strikethrough_set: bool); - fn get_property_style(&self) -> pango::Style; + #[doc(alias = "get_property_style")] + fn style(&self) -> pango::Style; - fn set_property_style(&self, style: pango::Style); + #[doc(alias = "set_property_style")] + fn set_style(&self, style: pango::Style); - fn get_property_style_set(&self) -> bool; + #[doc(alias = "get_property_style_set")] + fn is_style_set(&self) -> bool; - fn set_property_style_set(&self, style_set: bool); + #[doc(alias = "set_property_style_set")] + fn set_style_set(&self, style_set: bool); - fn get_property_text(&self) -> Option; + #[doc(alias = "get_property_text")] + fn text(&self) -> Option; - fn set_property_text(&self, text: Option<&str>); + #[doc(alias = "set_property_text")] + fn set_text(&self, text: Option<&str>); - fn get_property_underline(&self) -> pango::Underline; + #[doc(alias = "get_property_underline")] + fn underline(&self) -> pango::Underline; - fn set_property_underline(&self, underline: pango::Underline); + #[doc(alias = "set_property_underline")] + fn set_underline(&self, underline: pango::Underline); - fn get_property_underline_set(&self) -> bool; + #[doc(alias = "get_property_underline_set")] + fn is_underline_set(&self) -> bool; - fn set_property_underline_set(&self, underline_set: bool); + #[doc(alias = "set_property_underline_set")] + fn set_underline_set(&self, underline_set: bool); - fn get_property_variant(&self) -> pango::Variant; + #[doc(alias = "get_property_variant")] + fn variant(&self) -> pango::Variant; - fn set_property_variant(&self, variant: pango::Variant); + #[doc(alias = "set_property_variant")] + fn set_variant(&self, variant: pango::Variant); - fn get_property_variant_set(&self) -> bool; + #[doc(alias = "get_property_variant_set")] + fn is_variant_set(&self) -> bool; - fn set_property_variant_set(&self, variant_set: bool); + #[doc(alias = "set_property_variant_set")] + fn set_variant_set(&self, variant_set: bool); - fn get_property_weight(&self) -> i32; + #[doc(alias = "get_property_weight")] + fn weight(&self) -> i32; - fn set_property_weight(&self, weight: i32); + #[doc(alias = "set_property_weight")] + fn set_weight(&self, weight: i32); - fn get_property_weight_set(&self) -> bool; + #[doc(alias = "get_property_weight_set")] + fn is_weight_set(&self) -> bool; - fn set_property_weight_set(&self, weight_set: bool); + #[doc(alias = "set_property_weight_set")] + fn set_weight_set(&self, weight_set: bool); - fn get_property_width_chars(&self) -> i32; + #[doc(alias = "get_property_width_chars")] + fn width_chars(&self) -> i32; - fn set_property_width_chars(&self, width_chars: i32); + #[doc(alias = "set_property_width_chars")] + fn set_width_chars(&self, width_chars: i32); - fn get_property_wrap_mode(&self) -> pango::WrapMode; + #[doc(alias = "get_property_wrap_mode")] + fn wrap_mode(&self) -> pango::WrapMode; - fn set_property_wrap_mode(&self, wrap_mode: pango::WrapMode); + #[doc(alias = "set_property_wrap_mode")] + fn set_wrap_mode(&self, wrap_mode: pango::WrapMode); - fn get_property_wrap_width(&self) -> i32; + #[doc(alias = "get_property_wrap_width")] + fn wrap_width(&self) -> i32; - fn set_property_wrap_width(&self, wrap_width: i32); + #[doc(alias = "set_property_wrap_width")] + fn set_wrap_width(&self, wrap_width: i32); fn connect_edited(&self, f: F) -> SignalHandlerId; @@ -918,7 +1007,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_align_set(&self) -> bool { + fn is_align_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -933,7 +1022,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_align_set(&self, align_set: bool) { + fn set_align_set(&self, align_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -943,7 +1032,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_alignment(&self) -> pango::Alignment { + fn alignment(&self) -> pango::Alignment { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -958,7 +1047,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_alignment(&self, alignment: pango::Alignment) { + fn set_alignment(&self, alignment: pango::Alignment) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -968,7 +1057,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_attributes(&self) -> Option { + fn attributes(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -982,7 +1071,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_attributes(&self, attributes: Option<&pango::AttrList>) { + fn set_attributes(&self, attributes: Option<&pango::AttrList>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -992,7 +1081,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_background(&self, background: Option<&str>) { + fn set_background(&self, background: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1002,7 +1091,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_background_rgba(&self) -> Option { + fn background_rgba(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1016,7 +1105,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_background_rgba(&self, background_rgba: Option<&gdk::RGBA>) { + fn set_background_rgba(&self, background_rgba: Option<&gdk::RGBA>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1026,7 +1115,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_background_set(&self) -> bool { + fn is_background_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1041,7 +1130,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_background_set(&self, background_set: bool) { + fn set_background_set(&self, background_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1051,7 +1140,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_editable(&self) -> bool { + fn is_editable(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1066,7 +1155,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_editable(&self, editable: bool) { + fn set_editable(&self, editable: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1076,7 +1165,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_editable_set(&self) -> bool { + fn is_editable_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1091,7 +1180,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_editable_set(&self, editable_set: bool) { + fn set_editable_set(&self, editable_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1101,7 +1190,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_ellipsize(&self) -> pango::EllipsizeMode { + fn ellipsize(&self) -> pango::EllipsizeMode { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -1117,7 +1206,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_ellipsize(&self, ellipsize: pango::EllipsizeMode) { + fn set_ellipsize(&self, ellipsize: pango::EllipsizeMode) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1127,7 +1216,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_ellipsize_set(&self) -> bool { + fn is_ellipsize_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1142,7 +1231,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_ellipsize_set(&self, ellipsize_set: bool) { + fn set_ellipsize_set(&self, ellipsize_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1152,7 +1241,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_family(&self) -> Option { + fn family(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1166,7 +1255,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_family(&self, family: Option<&str>) { + fn set_family(&self, family: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1176,7 +1265,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_family_set(&self) -> bool { + fn is_family_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1191,7 +1280,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_family_set(&self, family_set: bool) { + fn set_family_set(&self, family_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1201,7 +1290,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_font(&self) -> Option { + fn font(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1215,7 +1304,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_font(&self, font: Option<&str>) { + fn set_font(&self, font: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1225,7 +1314,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_font_desc(&self) -> Option { + fn font_desc(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -1240,7 +1329,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_font_desc(&self, font_desc: Option<&pango::FontDescription>) { + fn set_font_desc(&self, font_desc: Option<&pango::FontDescription>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1250,7 +1339,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_foreground(&self, foreground: Option<&str>) { + fn set_foreground(&self, foreground: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1260,7 +1349,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_foreground_rgba(&self) -> Option { + fn foreground_rgba(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1274,7 +1363,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_foreground_rgba(&self, foreground_rgba: Option<&gdk::RGBA>) { + fn set_foreground_rgba(&self, foreground_rgba: Option<&gdk::RGBA>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1284,7 +1373,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_foreground_set(&self) -> bool { + fn is_foreground_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1299,7 +1388,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_foreground_set(&self, foreground_set: bool) { + fn set_foreground_set(&self, foreground_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1309,7 +1398,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_language(&self) -> Option { + fn language(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1323,7 +1412,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_language(&self, language: Option<&str>) { + fn set_language(&self, language: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1333,7 +1422,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_language_set(&self) -> bool { + fn is_language_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1348,7 +1437,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_language_set(&self, language_set: bool) { + fn set_language_set(&self, language_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1358,7 +1447,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_markup(&self, markup: Option<&str>) { + fn set_markup(&self, markup: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1368,7 +1457,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_max_width_chars(&self) -> i32 { + fn max_width_chars(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1383,7 +1472,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_max_width_chars(&self, max_width_chars: i32) { + fn set_max_width_chars(&self, max_width_chars: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1393,7 +1482,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_placeholder_text(&self) -> Option { + fn placeholder_text(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1407,7 +1496,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_placeholder_text(&self, placeholder_text: Option<&str>) { + fn set_placeholder_text(&self, placeholder_text: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1417,7 +1506,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_rise(&self) -> i32 { + fn rise(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1432,7 +1521,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_rise(&self, rise: i32) { + fn set_rise(&self, rise: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1442,7 +1531,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_rise_set(&self) -> bool { + fn is_rise_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1457,7 +1546,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_rise_set(&self, rise_set: bool) { + fn set_rise_set(&self, rise_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1467,7 +1556,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_scale(&self) -> f64 { + fn scale(&self) -> f64 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1482,7 +1571,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_scale(&self, scale: f64) { + fn set_scale(&self, scale: f64) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1492,7 +1581,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_scale_set(&self) -> bool { + fn is_scale_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1507,7 +1596,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_scale_set(&self, scale_set: bool) { + fn set_scale_set(&self, scale_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1517,7 +1606,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_single_paragraph_mode(&self) -> bool { + fn is_single_paragraph_mode(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1532,7 +1621,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_single_paragraph_mode(&self, single_paragraph_mode: bool) { + fn set_single_paragraph_mode(&self, single_paragraph_mode: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1542,7 +1631,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_size(&self) -> i32 { + fn size(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1557,7 +1646,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_size(&self, size: i32) { + fn set_size(&self, size: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1567,7 +1656,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_size_points(&self) -> f64 { + fn size_points(&self) -> f64 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1582,7 +1671,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_size_points(&self, size_points: f64) { + fn set_size_points(&self, size_points: f64) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1592,7 +1681,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_size_set(&self) -> bool { + fn is_size_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1607,7 +1696,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_size_set(&self, size_set: bool) { + fn set_size_set(&self, size_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1617,7 +1706,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_stretch(&self) -> pango::Stretch { + fn stretch(&self) -> pango::Stretch { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1632,7 +1721,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_stretch(&self, stretch: pango::Stretch) { + fn set_stretch(&self, stretch: pango::Stretch) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1642,7 +1731,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_stretch_set(&self) -> bool { + fn is_stretch_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1657,7 +1746,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_stretch_set(&self, stretch_set: bool) { + fn set_stretch_set(&self, stretch_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1667,7 +1756,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_strikethrough(&self) -> bool { + fn is_strikethrough(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1682,7 +1771,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_strikethrough(&self, strikethrough: bool) { + fn set_strikethrough(&self, strikethrough: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1692,7 +1781,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_strikethrough_set(&self) -> bool { + fn is_strikethrough_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1707,7 +1796,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_strikethrough_set(&self, strikethrough_set: bool) { + fn set_strikethrough_set(&self, strikethrough_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1717,7 +1806,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_style(&self) -> pango::Style { + fn style(&self) -> pango::Style { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1732,7 +1821,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_style(&self, style: pango::Style) { + fn set_style(&self, style: pango::Style) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1742,7 +1831,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_style_set(&self) -> bool { + fn is_style_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1757,7 +1846,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_style_set(&self, style_set: bool) { + fn set_style_set(&self, style_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1767,7 +1856,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_text(&self) -> Option { + fn text(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1781,7 +1870,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_text(&self, text: Option<&str>) { + fn set_text(&self, text: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1791,7 +1880,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_underline(&self) -> pango::Underline { + fn underline(&self) -> pango::Underline { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1806,7 +1895,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_underline(&self, underline: pango::Underline) { + fn set_underline(&self, underline: pango::Underline) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1816,7 +1905,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_underline_set(&self) -> bool { + fn is_underline_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1831,7 +1920,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_underline_set(&self, underline_set: bool) { + fn set_underline_set(&self, underline_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1841,7 +1930,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_variant(&self) -> pango::Variant { + fn variant(&self) -> pango::Variant { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1856,7 +1945,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_variant(&self, variant: pango::Variant) { + fn set_variant(&self, variant: pango::Variant) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1866,7 +1955,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_variant_set(&self) -> bool { + fn is_variant_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1881,7 +1970,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_variant_set(&self, variant_set: bool) { + fn set_variant_set(&self, variant_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1891,7 +1980,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_weight(&self) -> i32 { + fn weight(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1906,7 +1995,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_weight(&self, weight: i32) { + fn set_weight(&self, weight: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1916,7 +2005,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_weight_set(&self) -> bool { + fn is_weight_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1931,7 +2020,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_weight_set(&self, weight_set: bool) { + fn set_weight_set(&self, weight_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1941,7 +2030,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_width_chars(&self) -> i32 { + fn width_chars(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1956,7 +2045,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_width_chars(&self, width_chars: i32) { + fn set_width_chars(&self, width_chars: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1966,7 +2055,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_wrap_mode(&self) -> pango::WrapMode { + fn wrap_mode(&self) -> pango::WrapMode { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1981,7 +2070,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_wrap_mode(&self, wrap_mode: pango::WrapMode) { + fn set_wrap_mode(&self, wrap_mode: pango::WrapMode) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1991,7 +2080,7 @@ impl> CellRendererTextExt for O { } } - fn get_property_wrap_width(&self) -> i32 { + fn wrap_width(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2006,7 +2095,7 @@ impl> CellRendererTextExt for O { } } - fn set_property_wrap_width(&self, wrap_width: i32) { + fn set_wrap_width(&self, wrap_width: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/cell_renderer_toggle.rs b/gtk/src/auto/cell_renderer_toggle.rs index edc733f79f18..ddbe0a7e1c71 100644 --- a/gtk/src/auto/cell_renderer_toggle.rs +++ b/gtk/src/auto/cell_renderer_toggle.rs @@ -229,13 +229,13 @@ pub const NONE_CELL_RENDERER_TOGGLE: Option<&CellRendererToggle> = None; pub trait CellRendererToggleExt: 'static { #[doc(alias = "gtk_cell_renderer_toggle_get_activatable")] - fn get_activatable(&self) -> bool; + fn is_activatable(&self) -> bool; #[doc(alias = "gtk_cell_renderer_toggle_get_active")] - fn get_active(&self) -> bool; + fn is_active(&self) -> bool; #[doc(alias = "gtk_cell_renderer_toggle_get_radio")] - fn get_radio(&self) -> bool; + fn is_radio(&self) -> bool; #[doc(alias = "gtk_cell_renderer_toggle_set_activatable")] fn set_activatable(&self, setting: bool); @@ -246,13 +246,17 @@ pub trait CellRendererToggleExt: 'static { #[doc(alias = "gtk_cell_renderer_toggle_set_radio")] fn set_radio(&self, radio: bool); - fn get_property_inconsistent(&self) -> bool; + #[doc(alias = "get_property_inconsistent")] + fn is_inconsistent(&self) -> bool; - fn set_property_inconsistent(&self, inconsistent: bool); + #[doc(alias = "set_property_inconsistent")] + fn set_inconsistent(&self, inconsistent: bool); - fn get_property_indicator_size(&self) -> i32; + #[doc(alias = "get_property_indicator_size")] + fn indicator_size(&self) -> i32; - fn set_property_indicator_size(&self, indicator_size: i32); + #[doc(alias = "set_property_indicator_size")] + fn set_indicator_size(&self, indicator_size: i32); fn connect_toggled(&self, f: F) -> SignalHandlerId; @@ -272,7 +276,7 @@ pub trait CellRendererToggleExt: 'static { } impl> CellRendererToggleExt for O { - fn get_activatable(&self) -> bool { + fn is_activatable(&self) -> bool { unsafe { from_glib(ffi::gtk_cell_renderer_toggle_get_activatable( self.as_ref().to_glib_none().0, @@ -280,7 +284,7 @@ impl> CellRendererToggleExt for O { } } - fn get_active(&self) -> bool { + fn is_active(&self) -> bool { unsafe { from_glib(ffi::gtk_cell_renderer_toggle_get_active( self.as_ref().to_glib_none().0, @@ -288,7 +292,7 @@ impl> CellRendererToggleExt for O { } } - fn get_radio(&self) -> bool { + fn is_radio(&self) -> bool { unsafe { from_glib(ffi::gtk_cell_renderer_toggle_get_radio( self.as_ref().to_glib_none().0, @@ -323,7 +327,7 @@ impl> CellRendererToggleExt for O { } } - fn get_property_inconsistent(&self) -> bool { + fn is_inconsistent(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -338,7 +342,7 @@ impl> CellRendererToggleExt for O { } } - fn set_property_inconsistent(&self, inconsistent: bool) { + fn set_inconsistent(&self, inconsistent: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -348,7 +352,7 @@ impl> CellRendererToggleExt for O { } } - fn get_property_indicator_size(&self) -> i32 { + fn indicator_size(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -363,7 +367,7 @@ impl> CellRendererToggleExt for O { } } - fn set_property_indicator_size(&self, indicator_size: i32) { + fn set_indicator_size(&self, indicator_size: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/cell_view.rs b/gtk/src/auto/cell_view.rs index f1f916c65275..a06426f58d4a 100644 --- a/gtk/src/auto/cell_view.rs +++ b/gtk/src/auto/cell_view.rs @@ -482,16 +482,16 @@ pub const NONE_CELL_VIEW: Option<&CellView> = None; pub trait CellViewExt: 'static { #[doc(alias = "gtk_cell_view_get_displayed_row")] - fn get_displayed_row(&self) -> Option; + fn displayed_row(&self) -> Option; #[doc(alias = "gtk_cell_view_get_draw_sensitive")] - fn get_draw_sensitive(&self) -> bool; + fn draws_sensitive(&self) -> bool; #[doc(alias = "gtk_cell_view_get_fit_model")] - fn get_fit_model(&self) -> bool; + fn fits_model(&self) -> bool; #[doc(alias = "gtk_cell_view_get_model")] - fn get_model(&self) -> Option; + fn model(&self) -> Option; #[doc(alias = "gtk_cell_view_set_background_rgba")] fn set_background_rgba(&self, rgba: &gdk::RGBA); @@ -508,17 +508,23 @@ pub trait CellViewExt: 'static { #[doc(alias = "gtk_cell_view_set_model")] fn set_model>(&self, model: Option<&P>); - fn set_property_background(&self, background: Option<&str>); + #[doc(alias = "set_property_background")] + fn set_background(&self, background: Option<&str>); - fn get_property_background_rgba(&self) -> Option; + #[doc(alias = "get_property_background_rgba")] + fn background_rgba(&self) -> Option; - fn get_property_background_set(&self) -> bool; + #[doc(alias = "get_property_background_set")] + fn is_background_set(&self) -> bool; - fn set_property_background_set(&self, background_set: bool); + #[doc(alias = "set_property_background_set")] + fn set_background_set(&self, background_set: bool); - fn get_property_cell_area(&self) -> Option; + #[doc(alias = "get_property_cell_area")] + fn cell_area(&self) -> Option; - fn get_property_cell_area_context(&self) -> Option; + #[doc(alias = "get_property_cell_area_context")] + fn cell_area_context(&self) -> Option; fn connect_property_background_notify(&self, f: F) -> SignalHandlerId; @@ -543,7 +549,7 @@ pub trait CellViewExt: 'static { } impl> CellViewExt for O { - fn get_displayed_row(&self) -> Option { + fn displayed_row(&self) -> Option { unsafe { from_glib_full(ffi::gtk_cell_view_get_displayed_row( self.as_ref().to_glib_none().0, @@ -551,7 +557,7 @@ impl> CellViewExt for O { } } - fn get_draw_sensitive(&self) -> bool { + fn draws_sensitive(&self) -> bool { unsafe { from_glib(ffi::gtk_cell_view_get_draw_sensitive( self.as_ref().to_glib_none().0, @@ -559,7 +565,7 @@ impl> CellViewExt for O { } } - fn get_fit_model(&self) -> bool { + fn fits_model(&self) -> bool { unsafe { from_glib(ffi::gtk_cell_view_get_fit_model( self.as_ref().to_glib_none().0, @@ -567,7 +573,7 @@ impl> CellViewExt for O { } } - fn get_model(&self) -> Option { + fn model(&self) -> Option { unsafe { from_glib_none(ffi::gtk_cell_view_get_model(self.as_ref().to_glib_none().0)) } } @@ -613,7 +619,7 @@ impl> CellViewExt for O { } } - fn set_property_background(&self, background: Option<&str>) { + fn set_background(&self, background: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -623,7 +629,7 @@ impl> CellViewExt for O { } } - fn get_property_background_rgba(&self) -> Option { + fn background_rgba(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -637,7 +643,7 @@ impl> CellViewExt for O { } } - fn get_property_background_set(&self) -> bool { + fn is_background_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -652,7 +658,7 @@ impl> CellViewExt for O { } } - fn set_property_background_set(&self, background_set: bool) { + fn set_background_set(&self, background_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -662,7 +668,7 @@ impl> CellViewExt for O { } } - fn get_property_cell_area(&self) -> Option { + fn cell_area(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -676,7 +682,7 @@ impl> CellViewExt for O { } } - fn get_property_cell_area_context(&self) -> Option { + fn cell_area_context(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/check_menu_item.rs b/gtk/src/auto/check_menu_item.rs index 761c149ca738..deac75be9dcf 100644 --- a/gtk/src/auto/check_menu_item.rs +++ b/gtk/src/auto/check_menu_item.rs @@ -496,13 +496,13 @@ pub const NONE_CHECK_MENU_ITEM: Option<&CheckMenuItem> = None; pub trait CheckMenuItemExt: 'static { #[doc(alias = "gtk_check_menu_item_get_active")] - fn get_active(&self) -> bool; + fn is_active(&self) -> bool; #[doc(alias = "gtk_check_menu_item_get_draw_as_radio")] - fn get_draw_as_radio(&self) -> bool; + fn draws_as_radio(&self) -> bool; #[doc(alias = "gtk_check_menu_item_get_inconsistent")] - fn get_inconsistent(&self) -> bool; + fn is_inconsistent(&self) -> bool; #[doc(alias = "gtk_check_menu_item_set_active")] fn set_active(&self, is_active: bool); @@ -530,7 +530,7 @@ pub trait CheckMenuItemExt: 'static { } impl> CheckMenuItemExt for O { - fn get_active(&self) -> bool { + fn is_active(&self) -> bool { unsafe { from_glib(ffi::gtk_check_menu_item_get_active( self.as_ref().to_glib_none().0, @@ -538,7 +538,7 @@ impl> CheckMenuItemExt for O { } } - fn get_draw_as_radio(&self) -> bool { + fn draws_as_radio(&self) -> bool { unsafe { from_glib(ffi::gtk_check_menu_item_get_draw_as_radio( self.as_ref().to_glib_none().0, @@ -546,7 +546,7 @@ impl> CheckMenuItemExt for O { } } - fn get_inconsistent(&self) -> bool { + fn is_inconsistent(&self) -> bool { unsafe { from_glib(ffi::gtk_check_menu_item_get_inconsistent( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/clipboard.rs b/gtk/src/auto/clipboard.rs index 4f2f98781fdf..80b62a47d015 100644 --- a/gtk/src/auto/clipboard.rs +++ b/gtk/src/auto/clipboard.rs @@ -28,19 +28,19 @@ impl Clipboard { } #[doc(alias = "gtk_clipboard_get_display")] - pub fn get_display(&self) -> Option { + pub fn display(&self) -> Option { unsafe { from_glib_none(ffi::gtk_clipboard_get_display(self.to_glib_none().0)) } } #[doc(alias = "gtk_clipboard_get_owner")] - pub fn get_owner(&self) -> Option { + pub fn owner(&self) -> Option { unsafe { from_glib_none(ffi::gtk_clipboard_get_owner(self.to_glib_none().0)) } } #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gtk_clipboard_get_selection")] - pub fn get_selection(&self) -> Option { + pub fn selection(&self) -> Option { unsafe { from_glib_none(ffi::gtk_clipboard_get_selection(self.to_glib_none().0)) } } diff --git a/gtk/src/auto/color_button.rs b/gtk/src/auto/color_button.rs index e26562dc1d6c..ebfb67a02ece 100644 --- a/gtk/src/auto/color_button.rs +++ b/gtk/src/auto/color_button.rs @@ -517,22 +517,26 @@ pub const NONE_COLOR_BUTTON: Option<&ColorButton> = None; pub trait ColorButtonExt: 'static { #[doc(alias = "gtk_color_button_get_title")] - fn get_title(&self) -> Option; + fn title(&self) -> Option; #[doc(alias = "gtk_color_button_set_title")] fn set_title(&self, title: &str); - fn get_property_alpha(&self) -> u32; + #[doc(alias = "get_property_alpha")] + fn alpha(&self) -> u32; - fn set_property_alpha(&self, alpha: u32); + #[doc(alias = "set_property_alpha")] + fn set_alpha(&self, alpha: u32); #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn get_property_show_editor(&self) -> bool; + #[doc(alias = "get_property_show_editor")] + fn shows_editor(&self) -> bool; #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn set_property_show_editor(&self, show_editor: bool); + #[doc(alias = "set_property_show_editor")] + fn set_show_editor(&self, show_editor: bool); fn connect_color_set(&self, f: F) -> SignalHandlerId; @@ -550,7 +554,7 @@ pub trait ColorButtonExt: 'static { } impl> ColorButtonExt for O { - fn get_title(&self) -> Option { + fn title(&self) -> Option { unsafe { from_glib_none(ffi::gtk_color_button_get_title( self.as_ref().to_glib_none().0, @@ -564,7 +568,7 @@ impl> ColorButtonExt for O { } } - fn get_property_alpha(&self) -> u32 { + fn alpha(&self) -> u32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -579,7 +583,7 @@ impl> ColorButtonExt for O { } } - fn set_property_alpha(&self, alpha: u32) { + fn set_alpha(&self, alpha: u32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -591,7 +595,7 @@ impl> ColorButtonExt for O { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn get_property_show_editor(&self) -> bool { + fn shows_editor(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -608,7 +612,7 @@ impl> ColorButtonExt for O { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn set_property_show_editor(&self, show_editor: bool) { + fn set_show_editor(&self, show_editor: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/color_chooser.rs b/gtk/src/auto/color_chooser.rs index 36e761ad54ab..c00e827831ea 100644 --- a/gtk/src/auto/color_chooser.rs +++ b/gtk/src/auto/color_chooser.rs @@ -23,10 +23,10 @@ pub const NONE_COLOR_CHOOSER: Option<&ColorChooser> = None; pub trait ColorChooserExt: 'static { #[doc(alias = "gtk_color_chooser_get_rgba")] - fn get_rgba(&self) -> gdk::RGBA; + fn rgba(&self) -> gdk::RGBA; #[doc(alias = "gtk_color_chooser_get_use_alpha")] - fn get_use_alpha(&self) -> bool; + fn uses_alpha(&self) -> bool; #[doc(alias = "gtk_color_chooser_set_rgba")] fn set_rgba(&self, color: &gdk::RGBA); @@ -42,7 +42,7 @@ pub trait ColorChooserExt: 'static { } impl> ColorChooserExt for O { - fn get_rgba(&self) -> gdk::RGBA { + fn rgba(&self) -> gdk::RGBA { unsafe { let mut color = gdk::RGBA::uninitialized(); ffi::gtk_color_chooser_get_rgba( @@ -53,7 +53,7 @@ impl> ColorChooserExt for O { } } - fn get_use_alpha(&self) -> bool { + fn uses_alpha(&self) -> bool { unsafe { from_glib(ffi::gtk_color_chooser_get_use_alpha( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/color_chooser_dialog.rs b/gtk/src/auto/color_chooser_dialog.rs index 5a5ee9c77cf3..e29a769839d8 100644 --- a/gtk/src/auto/color_chooser_dialog.rs +++ b/gtk/src/auto/color_chooser_dialog.rs @@ -674,15 +674,17 @@ impl ColorChooserDialogBuilder { pub const NONE_COLOR_CHOOSER_DIALOG: Option<&ColorChooserDialog> = None; pub trait ColorChooserDialogExt: 'static { - fn get_property_show_editor(&self) -> bool; + #[doc(alias = "get_property_show_editor")] + fn shows_editor(&self) -> bool; - fn set_property_show_editor(&self, show_editor: bool); + #[doc(alias = "set_property_show_editor")] + fn set_show_editor(&self, show_editor: bool); fn connect_property_show_editor_notify(&self, f: F) -> SignalHandlerId; } impl> ColorChooserDialogExt for O { - fn get_property_show_editor(&self) -> bool { + fn shows_editor(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -697,7 +699,7 @@ impl> ColorChooserDialogExt for O { } } - fn set_property_show_editor(&self, show_editor: bool) { + fn set_show_editor(&self, show_editor: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/color_chooser_widget.rs b/gtk/src/auto/color_chooser_widget.rs index b833badf03b0..8d10116b8db0 100644 --- a/gtk/src/auto/color_chooser_widget.rs +++ b/gtk/src/auto/color_chooser_widget.rs @@ -447,15 +447,17 @@ impl ColorChooserWidgetBuilder { pub const NONE_COLOR_CHOOSER_WIDGET: Option<&ColorChooserWidget> = None; pub trait ColorChooserWidgetExt: 'static { - fn get_property_show_editor(&self) -> bool; + #[doc(alias = "get_property_show_editor")] + fn shows_editor(&self) -> bool; - fn set_property_show_editor(&self, show_editor: bool); + #[doc(alias = "set_property_show_editor")] + fn set_show_editor(&self, show_editor: bool); fn connect_property_show_editor_notify(&self, f: F) -> SignalHandlerId; } impl> ColorChooserWidgetExt for O { - fn get_property_show_editor(&self) -> bool { + fn shows_editor(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -470,7 +472,7 @@ impl> ColorChooserWidgetExt for O { } } - fn set_property_show_editor(&self, show_editor: bool) { + fn set_show_editor(&self, show_editor: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/combo_box.rs b/gtk/src/auto/combo_box.rs index cec5fb068a8d..2ce54f399763 100644 --- a/gtk/src/auto/combo_box.rs +++ b/gtk/src/auto/combo_box.rs @@ -565,49 +565,49 @@ pub const NONE_COMBO_BOX: Option<&ComboBox> = None; pub trait ComboBoxExt: 'static { #[doc(alias = "gtk_combo_box_get_active_id")] - fn get_active_id(&self) -> Option; + fn active_id(&self) -> Option; #[doc(alias = "gtk_combo_box_get_active_iter")] - fn get_active_iter(&self) -> Option; + fn active_iter(&self) -> Option; #[doc(alias = "gtk_combo_box_get_button_sensitivity")] - fn get_button_sensitivity(&self) -> SensitivityType; + fn button_sensitivity(&self) -> SensitivityType; #[doc(alias = "gtk_combo_box_get_column_span_column")] - fn get_column_span_column(&self) -> i32; + fn column_span_column(&self) -> i32; #[doc(alias = "gtk_combo_box_get_entry_text_column")] - fn get_entry_text_column(&self) -> i32; + fn entry_text_column(&self) -> i32; #[cfg_attr(feature = "v3_20", deprecated)] #[cfg(any(not(feature = "v3_20"), feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(not(feature = "v3_20"))))] #[doc(alias = "gtk_combo_box_get_focus_on_click")] - fn get_focus_on_click(&self) -> bool; + fn gets_focus_on_click(&self) -> bool; #[doc(alias = "gtk_combo_box_get_has_entry")] - fn get_has_entry(&self) -> bool; + fn has_entry(&self) -> bool; #[doc(alias = "gtk_combo_box_get_id_column")] - fn get_id_column(&self) -> i32; + fn id_column(&self) -> i32; #[doc(alias = "gtk_combo_box_get_model")] - fn get_model(&self) -> Option; + fn model(&self) -> Option; #[doc(alias = "gtk_combo_box_get_popup_accessible")] - fn get_popup_accessible(&self) -> Option; + fn popup_accessible(&self) -> Option; #[doc(alias = "gtk_combo_box_get_popup_fixed_width")] - fn get_popup_fixed_width(&self) -> bool; + fn is_popup_fixed_width(&self) -> bool; //#[doc(alias = "gtk_combo_box_get_row_separator_func")] - //fn get_row_separator_func(&self) -> Option bool + 'static>>; + //fn row_separator_func(&self) -> Option bool + 'static>>; #[doc(alias = "gtk_combo_box_get_row_span_column")] - fn get_row_span_column(&self) -> i32; + fn row_span_column(&self) -> i32; #[doc(alias = "gtk_combo_box_get_wrap_width")] - fn get_wrap_width(&self) -> i32; + fn wrap_width(&self) -> i32; #[doc(alias = "gtk_combo_box_popdown")] fn popdown(&self); @@ -657,13 +657,17 @@ pub trait ComboBoxExt: 'static { #[doc(alias = "gtk_combo_box_set_wrap_width")] fn set_wrap_width(&self, width: i32); - fn get_property_cell_area(&self) -> Option; + #[doc(alias = "get_property_cell_area")] + fn cell_area(&self) -> Option; - fn get_property_has_frame(&self) -> bool; + #[doc(alias = "get_property_has_frame")] + fn has_frame(&self) -> bool; - fn set_property_has_frame(&self, has_frame: bool); + #[doc(alias = "set_property_has_frame")] + fn set_has_frame(&self, has_frame: bool); - fn get_property_popup_shown(&self) -> bool; + #[doc(alias = "get_property_popup_shown")] + fn is_popup_shown(&self) -> bool; fn connect_changed(&self, f: F) -> SignalHandlerId; @@ -725,7 +729,7 @@ pub trait ComboBoxExt: 'static { } impl> ComboBoxExt for O { - fn get_active_id(&self) -> Option { + fn active_id(&self) -> Option { unsafe { from_glib_none(ffi::gtk_combo_box_get_active_id( self.as_ref().to_glib_none().0, @@ -733,7 +737,7 @@ impl> ComboBoxExt for O { } } - fn get_active_iter(&self) -> Option { + fn active_iter(&self) -> Option { unsafe { let mut iter = TreeIter::uninitialized(); let ret = from_glib(ffi::gtk_combo_box_get_active_iter( @@ -748,7 +752,7 @@ impl> ComboBoxExt for O { } } - fn get_button_sensitivity(&self) -> SensitivityType { + fn button_sensitivity(&self) -> SensitivityType { unsafe { from_glib(ffi::gtk_combo_box_get_button_sensitivity( self.as_ref().to_glib_none().0, @@ -756,17 +760,17 @@ impl> ComboBoxExt for O { } } - fn get_column_span_column(&self) -> i32 { + fn column_span_column(&self) -> i32 { unsafe { ffi::gtk_combo_box_get_column_span_column(self.as_ref().to_glib_none().0) } } - fn get_entry_text_column(&self) -> i32 { + fn entry_text_column(&self) -> i32 { unsafe { ffi::gtk_combo_box_get_entry_text_column(self.as_ref().to_glib_none().0) } } #[cfg(any(not(feature = "v3_20"), feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(not(feature = "v3_20"))))] - fn get_focus_on_click(&self) -> bool { + fn gets_focus_on_click(&self) -> bool { unsafe { from_glib(ffi::gtk_combo_box_get_focus_on_click( self.as_ref().to_glib_none().0, @@ -774,7 +778,7 @@ impl> ComboBoxExt for O { } } - fn get_has_entry(&self) -> bool { + fn has_entry(&self) -> bool { unsafe { from_glib(ffi::gtk_combo_box_get_has_entry( self.as_ref().to_glib_none().0, @@ -782,15 +786,15 @@ impl> ComboBoxExt for O { } } - fn get_id_column(&self) -> i32 { + fn id_column(&self) -> i32 { unsafe { ffi::gtk_combo_box_get_id_column(self.as_ref().to_glib_none().0) } } - fn get_model(&self) -> Option { + fn model(&self) -> Option { unsafe { from_glib_none(ffi::gtk_combo_box_get_model(self.as_ref().to_glib_none().0)) } } - fn get_popup_accessible(&self) -> Option { + fn popup_accessible(&self) -> Option { unsafe { from_glib_none(ffi::gtk_combo_box_get_popup_accessible( self.as_ref().to_glib_none().0, @@ -798,7 +802,7 @@ impl> ComboBoxExt for O { } } - fn get_popup_fixed_width(&self) -> bool { + fn is_popup_fixed_width(&self) -> bool { unsafe { from_glib(ffi::gtk_combo_box_get_popup_fixed_width( self.as_ref().to_glib_none().0, @@ -806,15 +810,15 @@ impl> ComboBoxExt for O { } } - //fn get_row_separator_func(&self) -> Option bool + 'static>> { + //fn row_separator_func(&self) -> Option bool + 'static>> { // unsafe { TODO: call ffi:gtk_combo_box_get_row_separator_func() } //} - fn get_row_span_column(&self) -> i32 { + fn row_span_column(&self) -> i32 { unsafe { ffi::gtk_combo_box_get_row_span_column(self.as_ref().to_glib_none().0) } } - fn get_wrap_width(&self) -> i32 { + fn wrap_width(&self) -> i32 { unsafe { ffi::gtk_combo_box_get_wrap_width(self.as_ref().to_glib_none().0) } } @@ -956,7 +960,7 @@ impl> ComboBoxExt for O { } } - fn get_property_cell_area(&self) -> Option { + fn cell_area(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -970,7 +974,7 @@ impl> ComboBoxExt for O { } } - fn get_property_has_frame(&self) -> bool { + fn has_frame(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -985,7 +989,7 @@ impl> ComboBoxExt for O { } } - fn set_property_has_frame(&self, has_frame: bool) { + fn set_has_frame(&self, has_frame: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -995,7 +999,7 @@ impl> ComboBoxExt for O { } } - fn get_property_popup_shown(&self) -> bool { + fn is_popup_shown(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/combo_box_text.rs b/gtk/src/auto/combo_box_text.rs index 8394fec5c460..da69cd45033b 100644 --- a/gtk/src/auto/combo_box_text.rs +++ b/gtk/src/auto/combo_box_text.rs @@ -521,7 +521,7 @@ pub trait ComboBoxTextExt: 'static { fn append_text(&self, text: &str); #[doc(alias = "gtk_combo_box_text_get_active_text")] - fn get_active_text(&self) -> Option; + fn active_text(&self) -> Option; #[doc(alias = "gtk_combo_box_text_insert")] fn insert(&self, position: i32, id: Option<&str>, text: &str); @@ -562,7 +562,7 @@ impl> ComboBoxTextExt for O { } } - fn get_active_text(&self) -> Option { + fn active_text(&self) -> Option { unsafe { from_glib_full(ffi::gtk_combo_box_text_get_active_text( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/container.rs b/gtk/src/auto/container.rs index a80609410d5e..35db2a37d7b8 100644 --- a/gtk/src/auto/container.rs +++ b/gtk/src/auto/container.rs @@ -67,23 +67,23 @@ pub trait ContainerExt: 'static { fn foreach(&self, callback: P); #[doc(alias = "gtk_container_get_border_width")] - fn get_border_width(&self) -> u32; + fn border_width(&self) -> u32; #[doc(alias = "gtk_container_get_children")] - fn get_children(&self) -> Vec; + fn children(&self) -> Vec; //#[cfg_attr(feature = "v3_24", deprecated)] //#[doc(alias = "gtk_container_get_focus_chain")] - //fn get_focus_chain(&self, focusable_widgets: /*Unimplemented*/Vec) -> bool; + //fn focus_chain(&self, focusable_widgets: /*Unimplemented*/Vec) -> bool; #[doc(alias = "gtk_container_get_focus_child")] - fn get_focus_child(&self) -> Option; + fn focus_child(&self) -> Option; #[doc(alias = "gtk_container_get_focus_hadjustment")] - fn get_focus_hadjustment(&self) -> Option; + fn focus_hadjustment(&self) -> Option; #[doc(alias = "gtk_container_get_focus_vadjustment")] - fn get_focus_vadjustment(&self) -> Option; + fn focus_vadjustment(&self) -> Option; #[doc(alias = "gtk_container_get_path_for_child")] fn get_path_for_child>(&self, child: &P) -> Option; @@ -114,11 +114,14 @@ pub trait ContainerExt: 'static { #[doc(alias = "gtk_container_unset_focus_chain")] fn unset_focus_chain(&self); - fn set_property_child>(&self, child: Option<&P>); + #[doc(alias = "set_property_child")] + fn set_child>(&self, child: Option<&P>); - fn get_property_resize_mode(&self) -> ResizeMode; + #[doc(alias = "get_property_resize_mode")] + fn resize_mode(&self) -> ResizeMode; - fn set_property_resize_mode(&self, resize_mode: ResizeMode); + #[doc(alias = "set_property_resize_mode")] + fn set_resize_mode(&self, resize_mode: ResizeMode); fn connect_add(&self, f: F) -> SignalHandlerId; @@ -244,11 +247,11 @@ impl> ContainerExt for O { } } - fn get_border_width(&self) -> u32 { + fn border_width(&self) -> u32 { unsafe { ffi::gtk_container_get_border_width(self.as_ref().to_glib_none().0) } } - fn get_children(&self) -> Vec { + fn children(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gtk_container_get_children( self.as_ref().to_glib_none().0, @@ -256,11 +259,11 @@ impl> ContainerExt for O { } } - //fn get_focus_chain(&self, focusable_widgets: /*Unimplemented*/Vec) -> bool { + //fn focus_chain(&self, focusable_widgets: /*Unimplemented*/Vec) -> bool { // unsafe { TODO: call ffi:gtk_container_get_focus_chain() } //} - fn get_focus_child(&self) -> Option { + fn focus_child(&self) -> Option { unsafe { from_glib_none(ffi::gtk_container_get_focus_child( self.as_ref().to_glib_none().0, @@ -268,7 +271,7 @@ impl> ContainerExt for O { } } - fn get_focus_hadjustment(&self) -> Option { + fn focus_hadjustment(&self) -> Option { unsafe { from_glib_none(ffi::gtk_container_get_focus_hadjustment( self.as_ref().to_glib_none().0, @@ -276,7 +279,7 @@ impl> ContainerExt for O { } } - fn get_focus_vadjustment(&self) -> Option { + fn focus_vadjustment(&self) -> Option { unsafe { from_glib_none(ffi::gtk_container_get_focus_vadjustment( self.as_ref().to_glib_none().0, @@ -360,7 +363,7 @@ impl> ContainerExt for O { } } - fn set_property_child>(&self, child: Option<&P>) { + fn set_child>(&self, child: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -370,7 +373,7 @@ impl> ContainerExt for O { } } - fn get_property_resize_mode(&self) -> ResizeMode { + fn resize_mode(&self) -> ResizeMode { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -385,7 +388,7 @@ impl> ContainerExt for O { } } - fn set_property_resize_mode(&self, resize_mode: ResizeMode) { + fn set_resize_mode(&self, resize_mode: ResizeMode) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/css_section.rs b/gtk/src/auto/css_section.rs index 8202fea2b6eb..86b23d0a4fc0 100644 --- a/gtk/src/auto/css_section.rs +++ b/gtk/src/auto/css_section.rs @@ -18,37 +18,37 @@ glib::wrapper! { impl CssSection { #[doc(alias = "gtk_css_section_get_end_line")] - pub fn get_end_line(&self) -> u32 { + pub fn end_line(&self) -> u32 { unsafe { ffi::gtk_css_section_get_end_line(self.to_glib_none().0) } } #[doc(alias = "gtk_css_section_get_end_position")] - pub fn get_end_position(&self) -> u32 { + pub fn end_position(&self) -> u32 { unsafe { ffi::gtk_css_section_get_end_position(self.to_glib_none().0) } } #[doc(alias = "gtk_css_section_get_file")] - pub fn get_file(&self) -> Option { + pub fn file(&self) -> Option { unsafe { from_glib_none(ffi::gtk_css_section_get_file(self.to_glib_none().0)) } } #[doc(alias = "gtk_css_section_get_parent")] - pub fn get_parent(&self) -> Option { + pub fn parent(&self) -> Option { unsafe { from_glib_none(ffi::gtk_css_section_get_parent(self.to_glib_none().0)) } } #[doc(alias = "gtk_css_section_get_section_type")] - pub fn get_section_type(&self) -> CssSectionType { + pub fn section_type(&self) -> CssSectionType { unsafe { from_glib(ffi::gtk_css_section_get_section_type(self.to_glib_none().0)) } } #[doc(alias = "gtk_css_section_get_start_line")] - pub fn get_start_line(&self) -> u32 { + pub fn start_line(&self) -> u32 { unsafe { ffi::gtk_css_section_get_start_line(self.to_glib_none().0) } } #[doc(alias = "gtk_css_section_get_start_position")] - pub fn get_start_position(&self) -> u32 { + pub fn start_position(&self) -> u32 { unsafe { ffi::gtk_css_section_get_start_position(self.to_glib_none().0) } } } diff --git a/gtk/src/auto/dialog.rs b/gtk/src/auto/dialog.rs index ddd186b1b4b0..f6dee2a4631f 100644 --- a/gtk/src/auto/dialog.rs +++ b/gtk/src/auto/dialog.rs @@ -664,10 +664,10 @@ pub trait DialogExt: 'static { //fn add_buttons(&self, first_button_text: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs); #[doc(alias = "gtk_dialog_get_content_area")] - fn get_content_area(&self) -> Box; + fn content_area(&self) -> Box; #[doc(alias = "gtk_dialog_get_header_bar")] - fn get_header_bar(&self) -> Option; + fn header_bar(&self) -> Option; #[doc(alias = "gtk_dialog_get_response_for_widget")] fn get_response_for_widget>(&self, widget: &P) -> ResponseType; @@ -687,7 +687,8 @@ pub trait DialogExt: 'static { #[doc(alias = "gtk_dialog_set_response_sensitive")] fn set_response_sensitive(&self, response_id: ResponseType, setting: bool); - fn get_property_use_header_bar(&self) -> i32; + #[doc(alias = "get_property_use_header_bar")] + fn use_header_bar(&self) -> i32; fn connect_close(&self, f: F) -> SignalHandlerId; @@ -721,7 +722,7 @@ impl> DialogExt for O { // unsafe { TODO: call ffi:gtk_dialog_add_buttons() } //} - fn get_content_area(&self) -> Box { + fn content_area(&self) -> Box { unsafe { from_glib_none(ffi::gtk_dialog_get_content_area( self.as_ref().to_glib_none().0, @@ -729,7 +730,7 @@ impl> DialogExt for O { } } - fn get_header_bar(&self) -> Option { + fn header_bar(&self) -> Option { unsafe { from_glib_none(ffi::gtk_dialog_get_header_bar( self.as_ref().to_glib_none().0, @@ -784,7 +785,7 @@ impl> DialogExt for O { } } - fn get_property_use_header_bar(&self) -> i32 { + fn use_header_bar(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/editable.rs b/gtk/src/auto/editable.rs index bcff64ec7687..1e880b0ce731 100644 --- a/gtk/src/auto/editable.rs +++ b/gtk/src/auto/editable.rs @@ -34,13 +34,13 @@ pub trait EditableExt: 'static { fn get_chars(&self, start_pos: i32, end_pos: i32) -> Option; #[doc(alias = "gtk_editable_get_editable")] - fn get_editable(&self) -> bool; + fn is_editable(&self) -> bool; #[doc(alias = "gtk_editable_get_position")] - fn get_position(&self) -> i32; + fn position(&self) -> i32; #[doc(alias = "gtk_editable_get_selection_bounds")] - fn get_selection_bounds(&self) -> Option<(i32, i32)>; + fn selection_bounds(&self) -> Option<(i32, i32)>; #[doc(alias = "gtk_editable_insert_text")] fn insert_text(&self, new_text: &str, position: &mut i32); @@ -93,7 +93,7 @@ impl> EditableExt for O { } } - fn get_editable(&self) -> bool { + fn is_editable(&self) -> bool { unsafe { from_glib(ffi::gtk_editable_get_editable( self.as_ref().to_glib_none().0, @@ -101,11 +101,11 @@ impl> EditableExt for O { } } - fn get_position(&self) -> i32 { + fn position(&self) -> i32 { unsafe { ffi::gtk_editable_get_position(self.as_ref().to_glib_none().0) } } - fn get_selection_bounds(&self) -> Option<(i32, i32)> { + fn selection_bounds(&self) -> Option<(i32, i32)> { unsafe { let mut start_pos = mem::MaybeUninit::uninit(); let mut end_pos = mem::MaybeUninit::uninit(); diff --git a/gtk/src/auto/entry.rs b/gtk/src/auto/entry.rs index d012a0c328ee..e93d91226502 100644 --- a/gtk/src/auto/entry.rs +++ b/gtk/src/auto/entry.rs @@ -768,28 +768,28 @@ pub const NONE_ENTRY: Option<&Entry> = None; pub trait EntryExt: 'static { #[doc(alias = "gtk_entry_get_activates_default")] - fn get_activates_default(&self) -> bool; + fn activates_default(&self) -> bool; #[doc(alias = "gtk_entry_get_alignment")] - fn get_alignment(&self) -> f32; + fn alignment(&self) -> f32; #[doc(alias = "gtk_entry_get_attributes")] - fn get_attributes(&self) -> Option; + fn attributes(&self) -> Option; #[doc(alias = "gtk_entry_get_buffer")] - fn get_buffer(&self) -> EntryBuffer; + fn buffer(&self) -> EntryBuffer; #[doc(alias = "gtk_entry_get_completion")] - fn get_completion(&self) -> Option; + fn completion(&self) -> Option; #[doc(alias = "gtk_entry_get_current_icon_drag_source")] - fn get_current_icon_drag_source(&self) -> i32; + fn current_icon_drag_source(&self) -> i32; #[doc(alias = "gtk_entry_get_cursor_hadjustment")] - fn get_cursor_hadjustment(&self) -> Option; + fn cursor_hadjustment(&self) -> Option; #[doc(alias = "gtk_entry_get_has_frame")] - fn get_has_frame(&self) -> bool; + fn has_frame(&self) -> bool; #[doc(alias = "gtk_entry_get_icon_activatable")] fn get_icon_activatable(&self, icon_pos: EntryIconPosition) -> bool; @@ -822,52 +822,52 @@ pub trait EntryExt: 'static { fn get_icon_tooltip_text(&self, icon_pos: EntryIconPosition) -> Option; #[doc(alias = "gtk_entry_get_input_hints")] - fn get_input_hints(&self) -> InputHints; + fn input_hints(&self) -> InputHints; #[doc(alias = "gtk_entry_get_input_purpose")] - fn get_input_purpose(&self) -> InputPurpose; + fn input_purpose(&self) -> InputPurpose; #[doc(alias = "gtk_entry_get_layout")] - fn get_layout(&self) -> Option; + fn layout(&self) -> Option; #[doc(alias = "gtk_entry_get_layout_offsets")] - fn get_layout_offsets(&self) -> (i32, i32); + fn layout_offsets(&self) -> (i32, i32); #[doc(alias = "gtk_entry_get_max_length")] - fn get_max_length(&self) -> i32; + fn max_length(&self) -> i32; #[doc(alias = "gtk_entry_get_max_width_chars")] - fn get_max_width_chars(&self) -> i32; + fn max_width_chars(&self) -> i32; #[doc(alias = "gtk_entry_get_overwrite_mode")] - fn get_overwrite_mode(&self) -> bool; + fn is_overwrite_mode(&self) -> bool; #[doc(alias = "gtk_entry_get_placeholder_text")] - fn get_placeholder_text(&self) -> Option; + fn placeholder_text(&self) -> Option; #[doc(alias = "gtk_entry_get_progress_fraction")] - fn get_progress_fraction(&self) -> f64; + fn progress_fraction(&self) -> f64; #[doc(alias = "gtk_entry_get_progress_pulse_step")] - fn get_progress_pulse_step(&self) -> f64; + fn progress_pulse_step(&self) -> f64; #[doc(alias = "gtk_entry_get_tabs")] - fn get_tabs(&self) -> Option; + fn tabs(&self) -> Option; #[doc(alias = "gtk_entry_get_text")] - fn get_text(&self) -> glib::GString; + fn text(&self) -> glib::GString; #[doc(alias = "gtk_entry_get_text_area")] - fn get_text_area(&self) -> gdk::Rectangle; + fn text_area(&self) -> gdk::Rectangle; #[doc(alias = "gtk_entry_get_text_length")] - fn get_text_length(&self) -> u16; + fn text_length(&self) -> u16; #[doc(alias = "gtk_entry_get_visibility")] - fn get_visibility(&self) -> bool; + fn is_visible(&self) -> bool; #[doc(alias = "gtk_entry_get_width_chars")] - fn get_width_chars(&self) -> i32; + fn width_chars(&self) -> i32; #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] @@ -985,118 +985,160 @@ pub trait EntryExt: 'static { #[doc(alias = "gtk_entry_unset_invisible_char")] fn unset_invisible_char(&self); - fn get_property_caps_lock_warning(&self) -> bool; + #[doc(alias = "get_property_caps_lock_warning")] + fn is_caps_lock_warning(&self) -> bool; - fn set_property_caps_lock_warning(&self, caps_lock_warning: bool); + #[doc(alias = "set_property_caps_lock_warning")] + fn set_caps_lock_warning(&self, caps_lock_warning: bool); - fn get_property_cursor_position(&self) -> i32; + #[doc(alias = "get_property_cursor_position")] + fn cursor_position(&self) -> i32; - fn get_property_enable_emoji_completion(&self) -> bool; + #[doc(alias = "get_property_enable_emoji_completion")] + fn enables_emoji_completion(&self) -> bool; - fn set_property_enable_emoji_completion(&self, enable_emoji_completion: bool); + #[doc(alias = "set_property_enable_emoji_completion")] + fn set_enable_emoji_completion(&self, enable_emoji_completion: bool); - fn get_property_im_module(&self) -> Option; + #[doc(alias = "get_property_im_module")] + fn im_module(&self) -> Option; - fn set_property_im_module(&self, im_module: Option<&str>); + #[doc(alias = "set_property_im_module")] + fn set_im_module(&self, im_module: Option<&str>); - fn get_property_invisible_char_set(&self) -> bool; + #[doc(alias = "get_property_invisible_char_set")] + fn is_invisible_char_set(&self) -> bool; - fn set_property_invisible_char_set(&self, invisible_char_set: bool); + #[doc(alias = "set_property_invisible_char_set")] + fn set_invisible_char_set(&self, invisible_char_set: bool); - fn get_property_populate_all(&self) -> bool; + #[doc(alias = "get_property_populate_all")] + fn populates_all(&self) -> bool; - fn set_property_populate_all(&self, populate_all: bool); + #[doc(alias = "set_property_populate_all")] + fn set_populate_all(&self, populate_all: bool); - fn get_property_primary_icon_activatable(&self) -> bool; + #[doc(alias = "get_property_primary_icon_activatable")] + fn is_primary_icon_activatable(&self) -> bool; - fn set_property_primary_icon_activatable(&self, primary_icon_activatable: bool); + #[doc(alias = "set_property_primary_icon_activatable")] + fn set_primary_icon_activatable(&self, primary_icon_activatable: bool); - fn get_property_primary_icon_gicon(&self) -> Option; + #[doc(alias = "get_property_primary_icon_gicon")] + fn primary_icon_gicon(&self) -> Option; - fn set_property_primary_icon_gicon>(&self, primary_icon_gicon: Option<&P>); + #[doc(alias = "set_property_primary_icon_gicon")] + fn set_primary_icon_gicon>(&self, primary_icon_gicon: Option<&P>); - fn get_property_primary_icon_name(&self) -> Option; + #[doc(alias = "get_property_primary_icon_name")] + fn primary_icon_name(&self) -> Option; - fn set_property_primary_icon_name(&self, primary_icon_name: Option<&str>); + #[doc(alias = "set_property_primary_icon_name")] + fn set_primary_icon_name(&self, primary_icon_name: Option<&str>); - fn get_property_primary_icon_pixbuf(&self) -> Option; + #[doc(alias = "get_property_primary_icon_pixbuf")] + fn primary_icon_pixbuf(&self) -> Option; - fn set_property_primary_icon_pixbuf(&self, primary_icon_pixbuf: Option<&gdk_pixbuf::Pixbuf>); + #[doc(alias = "set_property_primary_icon_pixbuf")] + fn set_primary_icon_pixbuf(&self, primary_icon_pixbuf: Option<&gdk_pixbuf::Pixbuf>); - fn get_property_primary_icon_sensitive(&self) -> bool; + #[doc(alias = "get_property_primary_icon_sensitive")] + fn is_primary_icon_sensitive(&self) -> bool; - fn set_property_primary_icon_sensitive(&self, primary_icon_sensitive: bool); + #[doc(alias = "set_property_primary_icon_sensitive")] + fn set_primary_icon_sensitive(&self, primary_icon_sensitive: bool); - fn get_property_primary_icon_storage_type(&self) -> ImageType; + #[doc(alias = "get_property_primary_icon_storage_type")] + fn primary_icon_storage_type(&self) -> ImageType; - fn get_property_primary_icon_tooltip_markup(&self) -> Option; + #[doc(alias = "get_property_primary_icon_tooltip_markup")] + fn primary_icon_tooltip_markup(&self) -> Option; - fn set_property_primary_icon_tooltip_markup(&self, primary_icon_tooltip_markup: Option<&str>); + #[doc(alias = "set_property_primary_icon_tooltip_markup")] + fn set_primary_icon_tooltip_markup(&self, primary_icon_tooltip_markup: Option<&str>); - fn get_property_primary_icon_tooltip_text(&self) -> Option; + #[doc(alias = "get_property_primary_icon_tooltip_text")] + fn primary_icon_tooltip_text(&self) -> Option; - fn set_property_primary_icon_tooltip_text(&self, primary_icon_tooltip_text: Option<&str>); + #[doc(alias = "set_property_primary_icon_tooltip_text")] + fn set_primary_icon_tooltip_text(&self, primary_icon_tooltip_text: Option<&str>); - fn get_property_scroll_offset(&self) -> i32; + #[doc(alias = "get_property_scroll_offset")] + fn scroll_offset(&self) -> i32; - fn get_property_secondary_icon_activatable(&self) -> bool; + #[doc(alias = "get_property_secondary_icon_activatable")] + fn is_secondary_icon_activatable(&self) -> bool; - fn set_property_secondary_icon_activatable(&self, secondary_icon_activatable: bool); + #[doc(alias = "set_property_secondary_icon_activatable")] + fn set_secondary_icon_activatable(&self, secondary_icon_activatable: bool); - fn get_property_secondary_icon_gicon(&self) -> Option; + #[doc(alias = "get_property_secondary_icon_gicon")] + fn secondary_icon_gicon(&self) -> Option; - fn set_property_secondary_icon_gicon>( - &self, - secondary_icon_gicon: Option<&P>, - ); + #[doc(alias = "set_property_secondary_icon_gicon")] + fn set_secondary_icon_gicon>(&self, secondary_icon_gicon: Option<&P>); - fn get_property_secondary_icon_name(&self) -> Option; + #[doc(alias = "get_property_secondary_icon_name")] + fn secondary_icon_name(&self) -> Option; - fn set_property_secondary_icon_name(&self, secondary_icon_name: Option<&str>); + #[doc(alias = "set_property_secondary_icon_name")] + fn set_secondary_icon_name(&self, secondary_icon_name: Option<&str>); - fn get_property_secondary_icon_pixbuf(&self) -> Option; + #[doc(alias = "get_property_secondary_icon_pixbuf")] + fn secondary_icon_pixbuf(&self) -> Option; - fn set_property_secondary_icon_pixbuf( - &self, - secondary_icon_pixbuf: Option<&gdk_pixbuf::Pixbuf>, - ); + #[doc(alias = "set_property_secondary_icon_pixbuf")] + fn set_secondary_icon_pixbuf(&self, secondary_icon_pixbuf: Option<&gdk_pixbuf::Pixbuf>); - fn get_property_secondary_icon_sensitive(&self) -> bool; + #[doc(alias = "get_property_secondary_icon_sensitive")] + fn is_secondary_icon_sensitive(&self) -> bool; - fn set_property_secondary_icon_sensitive(&self, secondary_icon_sensitive: bool); + #[doc(alias = "set_property_secondary_icon_sensitive")] + fn set_secondary_icon_sensitive(&self, secondary_icon_sensitive: bool); - fn get_property_secondary_icon_storage_type(&self) -> ImageType; + #[doc(alias = "get_property_secondary_icon_storage_type")] + fn secondary_icon_storage_type(&self) -> ImageType; - fn get_property_secondary_icon_tooltip_markup(&self) -> Option; + #[doc(alias = "get_property_secondary_icon_tooltip_markup")] + fn secondary_icon_tooltip_markup(&self) -> Option; - fn set_property_secondary_icon_tooltip_markup( - &self, - secondary_icon_tooltip_markup: Option<&str>, - ); + #[doc(alias = "set_property_secondary_icon_tooltip_markup")] + fn set_secondary_icon_tooltip_markup(&self, secondary_icon_tooltip_markup: Option<&str>); - fn get_property_secondary_icon_tooltip_text(&self) -> Option; + #[doc(alias = "get_property_secondary_icon_tooltip_text")] + fn secondary_icon_tooltip_text(&self) -> Option; - fn set_property_secondary_icon_tooltip_text(&self, secondary_icon_tooltip_text: Option<&str>); + #[doc(alias = "set_property_secondary_icon_tooltip_text")] + fn set_secondary_icon_tooltip_text(&self, secondary_icon_tooltip_text: Option<&str>); - fn get_property_selection_bound(&self) -> i32; + #[doc(alias = "get_property_selection_bound")] + fn selection_bound(&self) -> i32; #[cfg_attr(feature = "v3_20", deprecated)] - fn get_property_shadow_type(&self) -> ShadowType; + #[doc(alias = "get_property_shadow_type")] + fn shadow_type(&self) -> ShadowType; #[cfg_attr(feature = "v3_20", deprecated)] - fn set_property_shadow_type(&self, shadow_type: ShadowType); + #[doc(alias = "set_property_shadow_type")] + fn set_shadow_type(&self, shadow_type: ShadowType); - fn get_property_show_emoji_icon(&self) -> bool; + #[doc(alias = "get_property_show_emoji_icon")] + fn shows_emoji_icon(&self) -> bool; - fn set_property_show_emoji_icon(&self, show_emoji_icon: bool); + #[doc(alias = "set_property_show_emoji_icon")] + fn set_show_emoji_icon(&self, show_emoji_icon: bool); - fn get_property_truncate_multiline(&self) -> bool; + #[doc(alias = "get_property_truncate_multiline")] + fn must_truncate_multiline(&self) -> bool; - fn set_property_truncate_multiline(&self, truncate_multiline: bool); + #[doc(alias = "set_property_truncate_multiline")] + fn set_truncate_multiline(&self, truncate_multiline: bool); - fn get_property_xalign(&self) -> f32; + #[doc(alias = "get_property_xalign")] + fn xalign(&self) -> f32; - fn set_property_xalign(&self, xalign: f32); + #[doc(alias = "set_property_xalign")] + fn set_xalign(&self, xalign: f32); fn connect_activate(&self, f: F) -> SignalHandlerId; @@ -1360,7 +1402,7 @@ pub trait EntryExt: 'static { } impl> EntryExt for O { - fn get_activates_default(&self) -> bool { + fn activates_default(&self) -> bool { unsafe { from_glib(ffi::gtk_entry_get_activates_default( self.as_ref().to_glib_none().0, @@ -1368,11 +1410,11 @@ impl> EntryExt for O { } } - fn get_alignment(&self) -> f32 { + fn alignment(&self) -> f32 { unsafe { ffi::gtk_entry_get_alignment(self.as_ref().to_glib_none().0) } } - fn get_attributes(&self) -> Option { + fn attributes(&self) -> Option { unsafe { from_glib_none(ffi::gtk_entry_get_attributes( self.as_ref().to_glib_none().0, @@ -1380,11 +1422,11 @@ impl> EntryExt for O { } } - fn get_buffer(&self) -> EntryBuffer { + fn buffer(&self) -> EntryBuffer { unsafe { from_glib_none(ffi::gtk_entry_get_buffer(self.as_ref().to_glib_none().0)) } } - fn get_completion(&self) -> Option { + fn completion(&self) -> Option { unsafe { from_glib_none(ffi::gtk_entry_get_completion( self.as_ref().to_glib_none().0, @@ -1392,11 +1434,11 @@ impl> EntryExt for O { } } - fn get_current_icon_drag_source(&self) -> i32 { + fn current_icon_drag_source(&self) -> i32 { unsafe { ffi::gtk_entry_get_current_icon_drag_source(self.as_ref().to_glib_none().0) } } - fn get_cursor_hadjustment(&self) -> Option { + fn cursor_hadjustment(&self) -> Option { unsafe { from_glib_none(ffi::gtk_entry_get_cursor_hadjustment( self.as_ref().to_glib_none().0, @@ -1404,7 +1446,7 @@ impl> EntryExt for O { } } - fn get_has_frame(&self) -> bool { + fn has_frame(&self) -> bool { unsafe { from_glib(ffi::gtk_entry_get_has_frame(self.as_ref().to_glib_none().0)) } } @@ -1496,7 +1538,7 @@ impl> EntryExt for O { } } - fn get_input_hints(&self) -> InputHints { + fn input_hints(&self) -> InputHints { unsafe { from_glib(ffi::gtk_entry_get_input_hints( self.as_ref().to_glib_none().0, @@ -1504,7 +1546,7 @@ impl> EntryExt for O { } } - fn get_input_purpose(&self) -> InputPurpose { + fn input_purpose(&self) -> InputPurpose { unsafe { from_glib(ffi::gtk_entry_get_input_purpose( self.as_ref().to_glib_none().0, @@ -1512,11 +1554,11 @@ impl> EntryExt for O { } } - fn get_layout(&self) -> Option { + fn layout(&self) -> Option { unsafe { from_glib_none(ffi::gtk_entry_get_layout(self.as_ref().to_glib_none().0)) } } - fn get_layout_offsets(&self) -> (i32, i32) { + fn layout_offsets(&self) -> (i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); @@ -1531,15 +1573,15 @@ impl> EntryExt for O { } } - fn get_max_length(&self) -> i32 { + fn max_length(&self) -> i32 { unsafe { ffi::gtk_entry_get_max_length(self.as_ref().to_glib_none().0) } } - fn get_max_width_chars(&self) -> i32 { + fn max_width_chars(&self) -> i32 { unsafe { ffi::gtk_entry_get_max_width_chars(self.as_ref().to_glib_none().0) } } - fn get_overwrite_mode(&self) -> bool { + fn is_overwrite_mode(&self) -> bool { unsafe { from_glib(ffi::gtk_entry_get_overwrite_mode( self.as_ref().to_glib_none().0, @@ -1547,7 +1589,7 @@ impl> EntryExt for O { } } - fn get_placeholder_text(&self) -> Option { + fn placeholder_text(&self) -> Option { unsafe { from_glib_none(ffi::gtk_entry_get_placeholder_text( self.as_ref().to_glib_none().0, @@ -1555,23 +1597,23 @@ impl> EntryExt for O { } } - fn get_progress_fraction(&self) -> f64 { + fn progress_fraction(&self) -> f64 { unsafe { ffi::gtk_entry_get_progress_fraction(self.as_ref().to_glib_none().0) } } - fn get_progress_pulse_step(&self) -> f64 { + fn progress_pulse_step(&self) -> f64 { unsafe { ffi::gtk_entry_get_progress_pulse_step(self.as_ref().to_glib_none().0) } } - fn get_tabs(&self) -> Option { + fn tabs(&self) -> Option { unsafe { from_glib_none(ffi::gtk_entry_get_tabs(self.as_ref().to_glib_none().0)) } } - fn get_text(&self) -> glib::GString { + fn text(&self) -> glib::GString { unsafe { from_glib_none(ffi::gtk_entry_get_text(self.as_ref().to_glib_none().0)) } } - fn get_text_area(&self) -> gdk::Rectangle { + fn text_area(&self) -> gdk::Rectangle { unsafe { let mut text_area = gdk::Rectangle::uninitialized(); ffi::gtk_entry_get_text_area( @@ -1582,11 +1624,11 @@ impl> EntryExt for O { } } - fn get_text_length(&self) -> u16 { + fn text_length(&self) -> u16 { unsafe { ffi::gtk_entry_get_text_length(self.as_ref().to_glib_none().0) } } - fn get_visibility(&self) -> bool { + fn is_visible(&self) -> bool { unsafe { from_glib(ffi::gtk_entry_get_visibility( self.as_ref().to_glib_none().0, @@ -1594,7 +1636,7 @@ impl> EntryExt for O { } } - fn get_width_chars(&self) -> i32 { + fn width_chars(&self) -> i32 { unsafe { ffi::gtk_entry_get_width_chars(self.as_ref().to_glib_none().0) } } @@ -1874,7 +1916,7 @@ impl> EntryExt for O { } } - fn get_property_caps_lock_warning(&self) -> bool { + fn is_caps_lock_warning(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1889,7 +1931,7 @@ impl> EntryExt for O { } } - fn set_property_caps_lock_warning(&self, caps_lock_warning: bool) { + fn set_caps_lock_warning(&self, caps_lock_warning: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1899,7 +1941,7 @@ impl> EntryExt for O { } } - fn get_property_cursor_position(&self) -> i32 { + fn cursor_position(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1914,7 +1956,7 @@ impl> EntryExt for O { } } - fn get_property_enable_emoji_completion(&self) -> bool { + fn enables_emoji_completion(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1929,7 +1971,7 @@ impl> EntryExt for O { } } - fn set_property_enable_emoji_completion(&self, enable_emoji_completion: bool) { + fn set_enable_emoji_completion(&self, enable_emoji_completion: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1939,7 +1981,7 @@ impl> EntryExt for O { } } - fn get_property_im_module(&self) -> Option { + fn im_module(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1953,7 +1995,7 @@ impl> EntryExt for O { } } - fn set_property_im_module(&self, im_module: Option<&str>) { + fn set_im_module(&self, im_module: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1963,7 +2005,7 @@ impl> EntryExt for O { } } - fn get_property_invisible_char_set(&self) -> bool { + fn is_invisible_char_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1978,7 +2020,7 @@ impl> EntryExt for O { } } - fn set_property_invisible_char_set(&self, invisible_char_set: bool) { + fn set_invisible_char_set(&self, invisible_char_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1988,7 +2030,7 @@ impl> EntryExt for O { } } - fn get_property_populate_all(&self) -> bool { + fn populates_all(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2003,7 +2045,7 @@ impl> EntryExt for O { } } - fn set_property_populate_all(&self, populate_all: bool) { + fn set_populate_all(&self, populate_all: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2013,7 +2055,7 @@ impl> EntryExt for O { } } - fn get_property_primary_icon_activatable(&self) -> bool { + fn is_primary_icon_activatable(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2028,7 +2070,7 @@ impl> EntryExt for O { } } - fn set_property_primary_icon_activatable(&self, primary_icon_activatable: bool) { + fn set_primary_icon_activatable(&self, primary_icon_activatable: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2040,7 +2082,7 @@ impl> EntryExt for O { } } - fn get_property_primary_icon_gicon(&self) -> Option { + fn primary_icon_gicon(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2054,7 +2096,7 @@ impl> EntryExt for O { } } - fn set_property_primary_icon_gicon>(&self, primary_icon_gicon: Option<&P>) { + fn set_primary_icon_gicon>(&self, primary_icon_gicon: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2064,7 +2106,7 @@ impl> EntryExt for O { } } - fn get_property_primary_icon_name(&self) -> Option { + fn primary_icon_name(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2078,7 +2120,7 @@ impl> EntryExt for O { } } - fn set_property_primary_icon_name(&self, primary_icon_name: Option<&str>) { + fn set_primary_icon_name(&self, primary_icon_name: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2088,7 +2130,7 @@ impl> EntryExt for O { } } - fn get_property_primary_icon_pixbuf(&self) -> Option { + fn primary_icon_pixbuf(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -2103,7 +2145,7 @@ impl> EntryExt for O { } } - fn set_property_primary_icon_pixbuf(&self, primary_icon_pixbuf: Option<&gdk_pixbuf::Pixbuf>) { + fn set_primary_icon_pixbuf(&self, primary_icon_pixbuf: Option<&gdk_pixbuf::Pixbuf>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2113,7 +2155,7 @@ impl> EntryExt for O { } } - fn get_property_primary_icon_sensitive(&self) -> bool { + fn is_primary_icon_sensitive(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2128,7 +2170,7 @@ impl> EntryExt for O { } } - fn set_property_primary_icon_sensitive(&self, primary_icon_sensitive: bool) { + fn set_primary_icon_sensitive(&self, primary_icon_sensitive: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2138,7 +2180,7 @@ impl> EntryExt for O { } } - fn get_property_primary_icon_storage_type(&self) -> ImageType { + fn primary_icon_storage_type(&self) -> ImageType { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2153,7 +2195,7 @@ impl> EntryExt for O { } } - fn get_property_primary_icon_tooltip_markup(&self) -> Option { + fn primary_icon_tooltip_markup(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2167,7 +2209,7 @@ impl> EntryExt for O { } } - fn set_property_primary_icon_tooltip_markup(&self, primary_icon_tooltip_markup: Option<&str>) { + fn set_primary_icon_tooltip_markup(&self, primary_icon_tooltip_markup: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2179,7 +2221,7 @@ impl> EntryExt for O { } } - fn get_property_primary_icon_tooltip_text(&self) -> Option { + fn primary_icon_tooltip_text(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2193,7 +2235,7 @@ impl> EntryExt for O { } } - fn set_property_primary_icon_tooltip_text(&self, primary_icon_tooltip_text: Option<&str>) { + fn set_primary_icon_tooltip_text(&self, primary_icon_tooltip_text: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2205,7 +2247,7 @@ impl> EntryExt for O { } } - fn get_property_scroll_offset(&self) -> i32 { + fn scroll_offset(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2220,7 +2262,7 @@ impl> EntryExt for O { } } - fn get_property_secondary_icon_activatable(&self) -> bool { + fn is_secondary_icon_activatable(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2235,7 +2277,7 @@ impl> EntryExt for O { } } - fn set_property_secondary_icon_activatable(&self, secondary_icon_activatable: bool) { + fn set_secondary_icon_activatable(&self, secondary_icon_activatable: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2247,7 +2289,7 @@ impl> EntryExt for O { } } - fn get_property_secondary_icon_gicon(&self) -> Option { + fn secondary_icon_gicon(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2261,10 +2303,7 @@ impl> EntryExt for O { } } - fn set_property_secondary_icon_gicon>( - &self, - secondary_icon_gicon: Option<&P>, - ) { + fn set_secondary_icon_gicon>(&self, secondary_icon_gicon: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2274,7 +2313,7 @@ impl> EntryExt for O { } } - fn get_property_secondary_icon_name(&self) -> Option { + fn secondary_icon_name(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2288,7 +2327,7 @@ impl> EntryExt for O { } } - fn set_property_secondary_icon_name(&self, secondary_icon_name: Option<&str>) { + fn set_secondary_icon_name(&self, secondary_icon_name: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2298,7 +2337,7 @@ impl> EntryExt for O { } } - fn get_property_secondary_icon_pixbuf(&self) -> Option { + fn secondary_icon_pixbuf(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -2313,10 +2352,7 @@ impl> EntryExt for O { } } - fn set_property_secondary_icon_pixbuf( - &self, - secondary_icon_pixbuf: Option<&gdk_pixbuf::Pixbuf>, - ) { + fn set_secondary_icon_pixbuf(&self, secondary_icon_pixbuf: Option<&gdk_pixbuf::Pixbuf>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2326,7 +2362,7 @@ impl> EntryExt for O { } } - fn get_property_secondary_icon_sensitive(&self) -> bool { + fn is_secondary_icon_sensitive(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2341,7 +2377,7 @@ impl> EntryExt for O { } } - fn set_property_secondary_icon_sensitive(&self, secondary_icon_sensitive: bool) { + fn set_secondary_icon_sensitive(&self, secondary_icon_sensitive: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2353,7 +2389,7 @@ impl> EntryExt for O { } } - fn get_property_secondary_icon_storage_type(&self) -> ImageType { + fn secondary_icon_storage_type(&self) -> ImageType { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2368,7 +2404,7 @@ impl> EntryExt for O { } } - fn get_property_secondary_icon_tooltip_markup(&self) -> Option { + fn secondary_icon_tooltip_markup(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2382,10 +2418,7 @@ impl> EntryExt for O { } } - fn set_property_secondary_icon_tooltip_markup( - &self, - secondary_icon_tooltip_markup: Option<&str>, - ) { + fn set_secondary_icon_tooltip_markup(&self, secondary_icon_tooltip_markup: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2397,7 +2430,7 @@ impl> EntryExt for O { } } - fn get_property_secondary_icon_tooltip_text(&self) -> Option { + fn secondary_icon_tooltip_text(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2411,7 +2444,7 @@ impl> EntryExt for O { } } - fn set_property_secondary_icon_tooltip_text(&self, secondary_icon_tooltip_text: Option<&str>) { + fn set_secondary_icon_tooltip_text(&self, secondary_icon_tooltip_text: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2423,7 +2456,7 @@ impl> EntryExt for O { } } - fn get_property_selection_bound(&self) -> i32 { + fn selection_bound(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2438,7 +2471,7 @@ impl> EntryExt for O { } } - fn get_property_shadow_type(&self) -> ShadowType { + fn shadow_type(&self) -> ShadowType { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2453,7 +2486,7 @@ impl> EntryExt for O { } } - fn set_property_shadow_type(&self, shadow_type: ShadowType) { + fn set_shadow_type(&self, shadow_type: ShadowType) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2463,7 +2496,7 @@ impl> EntryExt for O { } } - fn get_property_show_emoji_icon(&self) -> bool { + fn shows_emoji_icon(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2478,7 +2511,7 @@ impl> EntryExt for O { } } - fn set_property_show_emoji_icon(&self, show_emoji_icon: bool) { + fn set_show_emoji_icon(&self, show_emoji_icon: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2488,7 +2521,7 @@ impl> EntryExt for O { } } - fn get_property_truncate_multiline(&self) -> bool { + fn must_truncate_multiline(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2503,7 +2536,7 @@ impl> EntryExt for O { } } - fn set_property_truncate_multiline(&self, truncate_multiline: bool) { + fn set_truncate_multiline(&self, truncate_multiline: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -2513,7 +2546,7 @@ impl> EntryExt for O { } } - fn get_property_xalign(&self) -> f32 { + fn xalign(&self) -> f32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -2528,7 +2561,7 @@ impl> EntryExt for O { } } - fn set_property_xalign(&self, xalign: f32) { + fn set_xalign(&self, xalign: f32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/entry_completion.rs b/gtk/src/auto/entry_completion.rs index 52517f6cf8c8..b378f7227e7a 100644 --- a/gtk/src/auto/entry_completion.rs +++ b/gtk/src/auto/entry_completion.rs @@ -160,31 +160,31 @@ pub trait EntryCompletionExt: 'static { fn delete_action(&self, index_: i32); #[doc(alias = "gtk_entry_completion_get_completion_prefix")] - fn get_completion_prefix(&self) -> Option; + fn completion_prefix(&self) -> Option; #[doc(alias = "gtk_entry_completion_get_inline_completion")] - fn get_inline_completion(&self) -> bool; + fn is_inline_completion(&self) -> bool; #[doc(alias = "gtk_entry_completion_get_inline_selection")] - fn get_inline_selection(&self) -> bool; + fn is_inline_selection(&self) -> bool; #[doc(alias = "gtk_entry_completion_get_minimum_key_length")] - fn get_minimum_key_length(&self) -> i32; + fn minimum_key_length(&self) -> i32; #[doc(alias = "gtk_entry_completion_get_model")] - fn get_model(&self) -> Option; + fn model(&self) -> Option; #[doc(alias = "gtk_entry_completion_get_popup_completion")] - fn get_popup_completion(&self) -> bool; + fn is_popup_completion(&self) -> bool; #[doc(alias = "gtk_entry_completion_get_popup_set_width")] - fn get_popup_set_width(&self) -> bool; + fn is_popup_set_width(&self) -> bool; #[doc(alias = "gtk_entry_completion_get_popup_single_match")] - fn get_popup_single_match(&self) -> bool; + fn is_popup_single_match(&self) -> bool; #[doc(alias = "gtk_entry_completion_get_text_column")] - fn get_text_column(&self) -> i32; + fn text_column(&self) -> i32; #[doc(alias = "gtk_entry_completion_insert_action_markup")] fn insert_action_markup(&self, index_: i32, markup: &str); @@ -222,7 +222,8 @@ pub trait EntryCompletionExt: 'static { #[doc(alias = "gtk_entry_completion_set_text_column")] fn set_text_column(&self, column: i32); - fn get_property_cell_area(&self) -> Option; + #[doc(alias = "get_property_cell_area")] + fn cell_area(&self) -> Option; fn connect_action_activated(&self, f: F) -> SignalHandlerId; @@ -304,7 +305,7 @@ impl> EntryCompletionExt for O { } } - fn get_completion_prefix(&self) -> Option { + fn completion_prefix(&self) -> Option { unsafe { from_glib_none(ffi::gtk_entry_completion_get_completion_prefix( self.as_ref().to_glib_none().0, @@ -312,7 +313,7 @@ impl> EntryCompletionExt for O { } } - fn get_inline_completion(&self) -> bool { + fn is_inline_completion(&self) -> bool { unsafe { from_glib(ffi::gtk_entry_completion_get_inline_completion( self.as_ref().to_glib_none().0, @@ -320,7 +321,7 @@ impl> EntryCompletionExt for O { } } - fn get_inline_selection(&self) -> bool { + fn is_inline_selection(&self) -> bool { unsafe { from_glib(ffi::gtk_entry_completion_get_inline_selection( self.as_ref().to_glib_none().0, @@ -328,11 +329,11 @@ impl> EntryCompletionExt for O { } } - fn get_minimum_key_length(&self) -> i32 { + fn minimum_key_length(&self) -> i32 { unsafe { ffi::gtk_entry_completion_get_minimum_key_length(self.as_ref().to_glib_none().0) } } - fn get_model(&self) -> Option { + fn model(&self) -> Option { unsafe { from_glib_none(ffi::gtk_entry_completion_get_model( self.as_ref().to_glib_none().0, @@ -340,7 +341,7 @@ impl> EntryCompletionExt for O { } } - fn get_popup_completion(&self) -> bool { + fn is_popup_completion(&self) -> bool { unsafe { from_glib(ffi::gtk_entry_completion_get_popup_completion( self.as_ref().to_glib_none().0, @@ -348,7 +349,7 @@ impl> EntryCompletionExt for O { } } - fn get_popup_set_width(&self) -> bool { + fn is_popup_set_width(&self) -> bool { unsafe { from_glib(ffi::gtk_entry_completion_get_popup_set_width( self.as_ref().to_glib_none().0, @@ -356,7 +357,7 @@ impl> EntryCompletionExt for O { } } - fn get_popup_single_match(&self) -> bool { + fn is_popup_single_match(&self) -> bool { unsafe { from_glib(ffi::gtk_entry_completion_get_popup_single_match( self.as_ref().to_glib_none().0, @@ -364,7 +365,7 @@ impl> EntryCompletionExt for O { } } - fn get_text_column(&self) -> i32 { + fn text_column(&self) -> i32 { unsafe { ffi::gtk_entry_completion_get_text_column(self.as_ref().to_glib_none().0) } } @@ -500,7 +501,7 @@ impl> EntryCompletionExt for O { } } - fn get_property_cell_area(&self) -> Option { + fn cell_area(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/event_box.rs b/gtk/src/auto/event_box.rs index 492ddf27a67d..2218324e10cd 100644 --- a/gtk/src/auto/event_box.rs +++ b/gtk/src/auto/event_box.rs @@ -399,10 +399,10 @@ pub const NONE_EVENT_BOX: Option<&EventBox> = None; pub trait EventBoxExt: 'static { #[doc(alias = "gtk_event_box_get_above_child")] - fn get_above_child(&self) -> bool; + fn is_above_child(&self) -> bool; #[doc(alias = "gtk_event_box_get_visible_window")] - fn get_visible_window(&self) -> bool; + fn is_visible_window(&self) -> bool; #[doc(alias = "gtk_event_box_set_above_child")] fn set_above_child(&self, above_child: bool); @@ -419,7 +419,7 @@ pub trait EventBoxExt: 'static { } impl> EventBoxExt for O { - fn get_above_child(&self) -> bool { + fn is_above_child(&self) -> bool { unsafe { from_glib(ffi::gtk_event_box_get_above_child( self.as_ref().to_glib_none().0, @@ -427,7 +427,7 @@ impl> EventBoxExt for O { } } - fn get_visible_window(&self) -> bool { + fn is_visible_window(&self) -> bool { unsafe { from_glib(ffi::gtk_event_box_get_visible_window( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/event_controller.rs b/gtk/src/auto/event_controller.rs index 48394b3a54ac..406561c172b2 100644 --- a/gtk/src/auto/event_controller.rs +++ b/gtk/src/auto/event_controller.rs @@ -25,10 +25,10 @@ pub const NONE_EVENT_CONTROLLER: Option<&EventController> = None; pub trait EventControllerExt: 'static { #[doc(alias = "gtk_event_controller_get_propagation_phase")] - fn get_propagation_phase(&self) -> PropagationPhase; + fn propagation_phase(&self) -> PropagationPhase; #[doc(alias = "gtk_event_controller_get_widget")] - fn get_widget(&self) -> Option; + fn widget(&self) -> Option; #[doc(alias = "gtk_event_controller_handle_event")] fn handle_event(&self, event: &gdk::Event) -> bool; @@ -46,7 +46,7 @@ pub trait EventControllerExt: 'static { } impl> EventControllerExt for O { - fn get_propagation_phase(&self) -> PropagationPhase { + fn propagation_phase(&self) -> PropagationPhase { unsafe { from_glib(ffi::gtk_event_controller_get_propagation_phase( self.as_ref().to_glib_none().0, @@ -54,7 +54,7 @@ impl> EventControllerExt for O { } } - fn get_widget(&self) -> Option { + fn widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_event_controller_get_widget( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/event_controller_key.rs b/gtk/src/auto/event_controller_key.rs index 1bcad1c5cb99..266e80f960a6 100644 --- a/gtk/src/auto/event_controller_key.rs +++ b/gtk/src/auto/event_controller_key.rs @@ -46,12 +46,12 @@ impl EventControllerKey { } #[doc(alias = "gtk_event_controller_key_get_group")] - pub fn get_group(&self) -> u32 { + pub fn group(&self) -> u32 { unsafe { ffi::gtk_event_controller_key_get_group(self.to_glib_none().0) } } #[doc(alias = "gtk_event_controller_key_get_im_context")] - pub fn get_im_context(&self) -> Option { + pub fn im_context(&self) -> Option { unsafe { from_glib_none(ffi::gtk_event_controller_key_get_im_context( self.to_glib_none().0, diff --git a/gtk/src/auto/event_controller_scroll.rs b/gtk/src/auto/event_controller_scroll.rs index 3fb3e4b68f23..4de6454daae5 100644 --- a/gtk/src/auto/event_controller_scroll.rs +++ b/gtk/src/auto/event_controller_scroll.rs @@ -40,7 +40,7 @@ impl EventControllerScroll { } #[doc(alias = "gtk_event_controller_scroll_get_flags")] - pub fn get_flags(&self) -> EventControllerScrollFlags { + pub fn flags(&self) -> EventControllerScrollFlags { unsafe { from_glib(ffi::gtk_event_controller_scroll_get_flags( self.to_glib_none().0, diff --git a/gtk/src/auto/expander.rs b/gtk/src/auto/expander.rs index 10c2e07dc7ac..91c39d42ae80 100644 --- a/gtk/src/auto/expander.rs +++ b/gtk/src/auto/expander.rs @@ -459,29 +459,29 @@ pub const NONE_EXPANDER: Option<&Expander> = None; pub trait ExpanderExt: 'static { #[doc(alias = "gtk_expander_get_expanded")] - fn get_expanded(&self) -> bool; + fn is_expanded(&self) -> bool; #[doc(alias = "gtk_expander_get_label")] - fn get_label(&self) -> Option; + fn label(&self) -> Option; #[doc(alias = "gtk_expander_get_label_fill")] - fn get_label_fill(&self) -> bool; + fn is_label_fill(&self) -> bool; #[doc(alias = "gtk_expander_get_label_widget")] - fn get_label_widget(&self) -> Option; + fn label_widget(&self) -> Option; #[doc(alias = "gtk_expander_get_resize_toplevel")] - fn get_resize_toplevel(&self) -> bool; + fn resizes_toplevel(&self) -> bool; #[cfg_attr(feature = "v3_20", deprecated)] #[doc(alias = "gtk_expander_get_spacing")] - fn get_spacing(&self) -> i32; + fn spacing(&self) -> i32; #[doc(alias = "gtk_expander_get_use_markup")] - fn get_use_markup(&self) -> bool; + fn uses_markup(&self) -> bool; #[doc(alias = "gtk_expander_get_use_underline")] - fn get_use_underline(&self) -> bool; + fn uses_underline(&self) -> bool; #[doc(alias = "gtk_expander_set_expanded")] fn set_expanded(&self, expanded: bool); @@ -538,7 +538,7 @@ pub trait ExpanderExt: 'static { } impl> ExpanderExt for O { - fn get_expanded(&self) -> bool { + fn is_expanded(&self) -> bool { unsafe { from_glib(ffi::gtk_expander_get_expanded( self.as_ref().to_glib_none().0, @@ -546,11 +546,11 @@ impl> ExpanderExt for O { } } - fn get_label(&self) -> Option { + fn label(&self) -> Option { unsafe { from_glib_none(ffi::gtk_expander_get_label(self.as_ref().to_glib_none().0)) } } - fn get_label_fill(&self) -> bool { + fn is_label_fill(&self) -> bool { unsafe { from_glib(ffi::gtk_expander_get_label_fill( self.as_ref().to_glib_none().0, @@ -558,7 +558,7 @@ impl> ExpanderExt for O { } } - fn get_label_widget(&self) -> Option { + fn label_widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_expander_get_label_widget( self.as_ref().to_glib_none().0, @@ -566,7 +566,7 @@ impl> ExpanderExt for O { } } - fn get_resize_toplevel(&self) -> bool { + fn resizes_toplevel(&self) -> bool { unsafe { from_glib(ffi::gtk_expander_get_resize_toplevel( self.as_ref().to_glib_none().0, @@ -574,11 +574,11 @@ impl> ExpanderExt for O { } } - fn get_spacing(&self) -> i32 { + fn spacing(&self) -> i32 { unsafe { ffi::gtk_expander_get_spacing(self.as_ref().to_glib_none().0) } } - fn get_use_markup(&self) -> bool { + fn uses_markup(&self) -> bool { unsafe { from_glib(ffi::gtk_expander_get_use_markup( self.as_ref().to_glib_none().0, @@ -586,7 +586,7 @@ impl> ExpanderExt for O { } } - fn get_use_underline(&self) -> bool { + fn uses_underline(&self) -> bool { unsafe { from_glib(ffi::gtk_expander_get_use_underline( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/file_chooser.rs b/gtk/src/auto/file_chooser.rs index 1e019f5f25cb..7ae94e8ad893 100644 --- a/gtk/src/auto/file_chooser.rs +++ b/gtk/src/auto/file_chooser.rs @@ -37,7 +37,7 @@ pub trait FileChooserExt: 'static { fn add_shortcut_folder_uri(&self, uri: &str) -> Result<(), glib::Error>; #[doc(alias = "gtk_file_chooser_get_action")] - fn get_action(&self) -> FileChooserAction; + fn action(&self) -> FileChooserAction; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] @@ -45,73 +45,73 @@ pub trait FileChooserExt: 'static { fn get_choice(&self, id: &str) -> Option; #[doc(alias = "gtk_file_chooser_get_create_folders")] - fn get_create_folders(&self) -> bool; + fn creates_folders(&self) -> bool; #[doc(alias = "gtk_file_chooser_get_current_folder")] - fn get_current_folder(&self) -> Option; + fn current_folder(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_current_folder_file")] - fn get_current_folder_file(&self) -> Option; + fn current_folder_file(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_current_folder_uri")] - fn get_current_folder_uri(&self) -> Option; + fn current_folder_uri(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_current_name")] - fn get_current_name(&self) -> Option; + fn current_name(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_do_overwrite_confirmation")] - fn get_do_overwrite_confirmation(&self) -> bool; + fn does_overwrite_confirmation(&self) -> bool; #[doc(alias = "gtk_file_chooser_get_extra_widget")] - fn get_extra_widget(&self) -> Option; + fn extra_widget(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_file")] - fn get_file(&self) -> Option; + fn file(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_filename")] - fn get_filename(&self) -> Option; + fn filename(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_filenames")] - fn get_filenames(&self) -> Vec; + fn filenames(&self) -> Vec; #[doc(alias = "gtk_file_chooser_get_files")] - fn get_files(&self) -> Vec; + fn files(&self) -> Vec; #[doc(alias = "gtk_file_chooser_get_filter")] - fn get_filter(&self) -> Option; + fn filter(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_local_only")] - fn get_local_only(&self) -> bool; + fn is_local_only(&self) -> bool; #[doc(alias = "gtk_file_chooser_get_preview_file")] - fn get_preview_file(&self) -> Option; + fn preview_file(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_preview_filename")] - fn get_preview_filename(&self) -> Option; + fn preview_filename(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_preview_uri")] - fn get_preview_uri(&self) -> Option; + fn preview_uri(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_preview_widget")] - fn get_preview_widget(&self) -> Option; + fn preview_widget(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_preview_widget_active")] - fn get_preview_widget_active(&self) -> bool; + fn is_preview_widget_active(&self) -> bool; #[doc(alias = "gtk_file_chooser_get_select_multiple")] - fn get_select_multiple(&self) -> bool; + fn selects_multiple(&self) -> bool; #[doc(alias = "gtk_file_chooser_get_show_hidden")] - fn get_show_hidden(&self) -> bool; + fn shows_hidden(&self) -> bool; #[doc(alias = "gtk_file_chooser_get_uri")] - fn get_uri(&self) -> Option; + fn uri(&self) -> Option; #[doc(alias = "gtk_file_chooser_get_uris")] - fn get_uris(&self) -> Vec; + fn uris(&self) -> Vec; #[doc(alias = "gtk_file_chooser_get_use_preview_label")] - fn get_use_preview_label(&self) -> bool; + fn uses_preview_label(&self) -> bool; #[doc(alias = "gtk_file_chooser_list_filters")] fn list_filters(&self) -> Vec; @@ -316,7 +316,7 @@ impl> FileChooserExt for O { } } - fn get_action(&self) -> FileChooserAction { + fn action(&self) -> FileChooserAction { unsafe { from_glib(ffi::gtk_file_chooser_get_action( self.as_ref().to_glib_none().0, @@ -335,7 +335,7 @@ impl> FileChooserExt for O { } } - fn get_create_folders(&self) -> bool { + fn creates_folders(&self) -> bool { unsafe { from_glib(ffi::gtk_file_chooser_get_create_folders( self.as_ref().to_glib_none().0, @@ -343,7 +343,7 @@ impl> FileChooserExt for O { } } - fn get_current_folder(&self) -> Option { + fn current_folder(&self) -> Option { unsafe { from_glib_full(ffi::gtk_file_chooser_get_current_folder( self.as_ref().to_glib_none().0, @@ -351,7 +351,7 @@ impl> FileChooserExt for O { } } - fn get_current_folder_file(&self) -> Option { + fn current_folder_file(&self) -> Option { unsafe { from_glib_full(ffi::gtk_file_chooser_get_current_folder_file( self.as_ref().to_glib_none().0, @@ -359,7 +359,7 @@ impl> FileChooserExt for O { } } - fn get_current_folder_uri(&self) -> Option { + fn current_folder_uri(&self) -> Option { unsafe { from_glib_full(ffi::gtk_file_chooser_get_current_folder_uri( self.as_ref().to_glib_none().0, @@ -367,7 +367,7 @@ impl> FileChooserExt for O { } } - fn get_current_name(&self) -> Option { + fn current_name(&self) -> Option { unsafe { from_glib_full(ffi::gtk_file_chooser_get_current_name( self.as_ref().to_glib_none().0, @@ -375,7 +375,7 @@ impl> FileChooserExt for O { } } - fn get_do_overwrite_confirmation(&self) -> bool { + fn does_overwrite_confirmation(&self) -> bool { unsafe { from_glib(ffi::gtk_file_chooser_get_do_overwrite_confirmation( self.as_ref().to_glib_none().0, @@ -383,7 +383,7 @@ impl> FileChooserExt for O { } } - fn get_extra_widget(&self) -> Option { + fn extra_widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_file_chooser_get_extra_widget( self.as_ref().to_glib_none().0, @@ -391,7 +391,7 @@ impl> FileChooserExt for O { } } - fn get_file(&self) -> Option { + fn file(&self) -> Option { unsafe { from_glib_full(ffi::gtk_file_chooser_get_file( self.as_ref().to_glib_none().0, @@ -399,7 +399,7 @@ impl> FileChooserExt for O { } } - fn get_filename(&self) -> Option { + fn filename(&self) -> Option { unsafe { from_glib_full(ffi::gtk_file_chooser_get_filename( self.as_ref().to_glib_none().0, @@ -407,7 +407,7 @@ impl> FileChooserExt for O { } } - fn get_filenames(&self) -> Vec { + fn filenames(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gtk_file_chooser_get_filenames( self.as_ref().to_glib_none().0, @@ -415,7 +415,7 @@ impl> FileChooserExt for O { } } - fn get_files(&self) -> Vec { + fn files(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gtk_file_chooser_get_files( self.as_ref().to_glib_none().0, @@ -423,7 +423,7 @@ impl> FileChooserExt for O { } } - fn get_filter(&self) -> Option { + fn filter(&self) -> Option { unsafe { from_glib_none(ffi::gtk_file_chooser_get_filter( self.as_ref().to_glib_none().0, @@ -431,7 +431,7 @@ impl> FileChooserExt for O { } } - fn get_local_only(&self) -> bool { + fn is_local_only(&self) -> bool { unsafe { from_glib(ffi::gtk_file_chooser_get_local_only( self.as_ref().to_glib_none().0, @@ -439,7 +439,7 @@ impl> FileChooserExt for O { } } - fn get_preview_file(&self) -> Option { + fn preview_file(&self) -> Option { unsafe { from_glib_full(ffi::gtk_file_chooser_get_preview_file( self.as_ref().to_glib_none().0, @@ -447,7 +447,7 @@ impl> FileChooserExt for O { } } - fn get_preview_filename(&self) -> Option { + fn preview_filename(&self) -> Option { unsafe { from_glib_full(ffi::gtk_file_chooser_get_preview_filename( self.as_ref().to_glib_none().0, @@ -455,7 +455,7 @@ impl> FileChooserExt for O { } } - fn get_preview_uri(&self) -> Option { + fn preview_uri(&self) -> Option { unsafe { from_glib_full(ffi::gtk_file_chooser_get_preview_uri( self.as_ref().to_glib_none().0, @@ -463,7 +463,7 @@ impl> FileChooserExt for O { } } - fn get_preview_widget(&self) -> Option { + fn preview_widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_file_chooser_get_preview_widget( self.as_ref().to_glib_none().0, @@ -471,7 +471,7 @@ impl> FileChooserExt for O { } } - fn get_preview_widget_active(&self) -> bool { + fn is_preview_widget_active(&self) -> bool { unsafe { from_glib(ffi::gtk_file_chooser_get_preview_widget_active( self.as_ref().to_glib_none().0, @@ -479,7 +479,7 @@ impl> FileChooserExt for O { } } - fn get_select_multiple(&self) -> bool { + fn selects_multiple(&self) -> bool { unsafe { from_glib(ffi::gtk_file_chooser_get_select_multiple( self.as_ref().to_glib_none().0, @@ -487,7 +487,7 @@ impl> FileChooserExt for O { } } - fn get_show_hidden(&self) -> bool { + fn shows_hidden(&self) -> bool { unsafe { from_glib(ffi::gtk_file_chooser_get_show_hidden( self.as_ref().to_glib_none().0, @@ -495,7 +495,7 @@ impl> FileChooserExt for O { } } - fn get_uri(&self) -> Option { + fn uri(&self) -> Option { unsafe { from_glib_full(ffi::gtk_file_chooser_get_uri( self.as_ref().to_glib_none().0, @@ -503,7 +503,7 @@ impl> FileChooserExt for O { } } - fn get_uris(&self) -> Vec { + fn uris(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gtk_file_chooser_get_uris( self.as_ref().to_glib_none().0, @@ -511,7 +511,7 @@ impl> FileChooserExt for O { } } - fn get_use_preview_label(&self) -> bool { + fn uses_preview_label(&self) -> bool { unsafe { from_glib(ffi::gtk_file_chooser_get_use_preview_label( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/file_chooser_button.rs b/gtk/src/auto/file_chooser_button.rs index 3b502aab900f..1ea6c040598c 100644 --- a/gtk/src/auto/file_chooser_button.rs +++ b/gtk/src/auto/file_chooser_button.rs @@ -564,13 +564,13 @@ pub trait FileChooserButtonExt: 'static { #[cfg(any(not(feature = "v3_20"), feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(not(feature = "v3_20"))))] #[doc(alias = "gtk_file_chooser_button_get_focus_on_click")] - fn get_focus_on_click(&self) -> bool; + fn gets_focus_on_click(&self) -> bool; #[doc(alias = "gtk_file_chooser_button_get_title")] - fn get_title(&self) -> Option; + fn title(&self) -> Option; #[doc(alias = "gtk_file_chooser_button_get_width_chars")] - fn get_width_chars(&self) -> i32; + fn width_chars(&self) -> i32; #[cfg_attr(feature = "v3_20", deprecated)] #[cfg(any(not(feature = "v3_20"), feature = "dox"))] @@ -594,7 +594,7 @@ pub trait FileChooserButtonExt: 'static { impl> FileChooserButtonExt for O { #[cfg(any(not(feature = "v3_20"), feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(not(feature = "v3_20"))))] - fn get_focus_on_click(&self) -> bool { + fn gets_focus_on_click(&self) -> bool { unsafe { from_glib(ffi::gtk_file_chooser_button_get_focus_on_click( self.as_ref().to_glib_none().0, @@ -602,7 +602,7 @@ impl> FileChooserButtonExt for O { } } - fn get_title(&self) -> Option { + fn title(&self) -> Option { unsafe { from_glib_none(ffi::gtk_file_chooser_button_get_title( self.as_ref().to_glib_none().0, @@ -610,7 +610,7 @@ impl> FileChooserButtonExt for O { } } - fn get_width_chars(&self) -> i32 { + fn width_chars(&self) -> i32 { unsafe { ffi::gtk_file_chooser_button_get_width_chars(self.as_ref().to_glib_none().0) } } diff --git a/gtk/src/auto/file_chooser_native.rs b/gtk/src/auto/file_chooser_native.rs index 64cc1ece4110..f256fac01bc4 100644 --- a/gtk/src/auto/file_chooser_native.rs +++ b/gtk/src/auto/file_chooser_native.rs @@ -50,7 +50,7 @@ impl FileChooserNative { } #[doc(alias = "gtk_file_chooser_native_get_accept_label")] - pub fn get_accept_label(&self) -> Option { + pub fn accept_label(&self) -> Option { unsafe { from_glib_none(ffi::gtk_file_chooser_native_get_accept_label( self.to_glib_none().0, @@ -59,7 +59,7 @@ impl FileChooserNative { } #[doc(alias = "gtk_file_chooser_native_get_cancel_label")] - pub fn get_cancel_label(&self) -> Option { + pub fn cancel_label(&self) -> Option { unsafe { from_glib_none(ffi::gtk_file_chooser_native_get_cancel_label( self.to_glib_none().0, diff --git a/gtk/src/auto/file_chooser_widget.rs b/gtk/src/auto/file_chooser_widget.rs index 68030b502f0c..6224a275661e 100644 --- a/gtk/src/auto/file_chooser_widget.rs +++ b/gtk/src/auto/file_chooser_widget.rs @@ -527,11 +527,14 @@ impl FileChooserWidgetBuilder { pub const NONE_FILE_CHOOSER_WIDGET: Option<&FileChooserWidget> = None; pub trait FileChooserWidgetExt: 'static { - fn get_property_search_mode(&self) -> bool; + #[doc(alias = "get_property_search_mode")] + fn is_search_mode(&self) -> bool; - fn set_property_search_mode(&self, search_mode: bool); + #[doc(alias = "set_property_search_mode")] + fn set_search_mode(&self, search_mode: bool); - fn get_property_subtitle(&self) -> Option; + #[doc(alias = "get_property_subtitle")] + fn subtitle(&self) -> Option; fn connect_desktop_folder(&self, f: F) -> SignalHandlerId; @@ -587,7 +590,7 @@ pub trait FileChooserWidgetExt: 'static { } impl> FileChooserWidgetExt for O { - fn get_property_search_mode(&self) -> bool { + fn is_search_mode(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -602,7 +605,7 @@ impl> FileChooserWidgetExt for O { } } - fn set_property_search_mode(&self, search_mode: bool) { + fn set_search_mode(&self, search_mode: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -612,7 +615,7 @@ impl> FileChooserWidgetExt for O { } } - fn get_property_subtitle(&self) -> Option { + fn subtitle(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/file_filter.rs b/gtk/src/auto/file_filter.rs index 4cae150c1118..ffb7953965c2 100644 --- a/gtk/src/auto/file_filter.rs +++ b/gtk/src/auto/file_filter.rs @@ -66,12 +66,12 @@ impl FileFilter { //} #[doc(alias = "gtk_file_filter_get_name")] - pub fn get_name(&self) -> Option { + pub fn name(&self) -> Option { unsafe { from_glib_none(ffi::gtk_file_filter_get_name(self.to_glib_none().0)) } } #[doc(alias = "gtk_file_filter_get_needed")] - pub fn get_needed(&self) -> FileFilterFlags { + pub fn needed(&self) -> FileFilterFlags { unsafe { from_glib(ffi::gtk_file_filter_get_needed(self.to_glib_none().0)) } } diff --git a/gtk/src/auto/flow_box.rs b/gtk/src/auto/flow_box.rs index fe8bb1204132..604bcf6fe9a6 100644 --- a/gtk/src/auto/flow_box.rs +++ b/gtk/src/auto/flow_box.rs @@ -468,7 +468,7 @@ pub trait FlowBoxExt: 'static { ); #[doc(alias = "gtk_flow_box_get_activate_on_single_click")] - fn get_activate_on_single_click(&self) -> bool; + fn activates_on_single_click(&self) -> bool; #[doc(alias = "gtk_flow_box_get_child_at_index")] fn get_child_at_index(&self, idx: i32) -> Option; @@ -479,25 +479,25 @@ pub trait FlowBoxExt: 'static { fn get_child_at_pos(&self, x: i32, y: i32) -> Option; #[doc(alias = "gtk_flow_box_get_column_spacing")] - fn get_column_spacing(&self) -> u32; + fn column_spacing(&self) -> u32; #[doc(alias = "gtk_flow_box_get_homogeneous")] - fn get_homogeneous(&self) -> bool; + fn is_homogeneous(&self) -> bool; #[doc(alias = "gtk_flow_box_get_max_children_per_line")] - fn get_max_children_per_line(&self) -> u32; + fn max_children_per_line(&self) -> u32; #[doc(alias = "gtk_flow_box_get_min_children_per_line")] - fn get_min_children_per_line(&self) -> u32; + fn min_children_per_line(&self) -> u32; #[doc(alias = "gtk_flow_box_get_row_spacing")] - fn get_row_spacing(&self) -> u32; + fn row_spacing(&self) -> u32; #[doc(alias = "gtk_flow_box_get_selected_children")] - fn get_selected_children(&self) -> Vec; + fn selected_children(&self) -> Vec; #[doc(alias = "gtk_flow_box_get_selection_mode")] - fn get_selection_mode(&self) -> SelectionMode; + fn selection_mode(&self) -> SelectionMode; #[doc(alias = "gtk_flow_box_insert")] fn insert>(&self, widget: &P, position: i32); @@ -662,7 +662,7 @@ impl> FlowBoxExt for O { } } - fn get_activate_on_single_click(&self) -> bool { + fn activates_on_single_click(&self) -> bool { unsafe { from_glib(ffi::gtk_flow_box_get_activate_on_single_click( self.as_ref().to_glib_none().0, @@ -691,11 +691,11 @@ impl> FlowBoxExt for O { } } - fn get_column_spacing(&self) -> u32 { + fn column_spacing(&self) -> u32 { unsafe { ffi::gtk_flow_box_get_column_spacing(self.as_ref().to_glib_none().0) } } - fn get_homogeneous(&self) -> bool { + fn is_homogeneous(&self) -> bool { unsafe { from_glib(ffi::gtk_flow_box_get_homogeneous( self.as_ref().to_glib_none().0, @@ -703,19 +703,19 @@ impl> FlowBoxExt for O { } } - fn get_max_children_per_line(&self) -> u32 { + fn max_children_per_line(&self) -> u32 { unsafe { ffi::gtk_flow_box_get_max_children_per_line(self.as_ref().to_glib_none().0) } } - fn get_min_children_per_line(&self) -> u32 { + fn min_children_per_line(&self) -> u32 { unsafe { ffi::gtk_flow_box_get_min_children_per_line(self.as_ref().to_glib_none().0) } } - fn get_row_spacing(&self) -> u32 { + fn row_spacing(&self) -> u32 { unsafe { ffi::gtk_flow_box_get_row_spacing(self.as_ref().to_glib_none().0) } } - fn get_selected_children(&self) -> Vec { + fn selected_children(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gtk_flow_box_get_selected_children( self.as_ref().to_glib_none().0, @@ -723,7 +723,7 @@ impl> FlowBoxExt for O { } } - fn get_selection_mode(&self) -> SelectionMode { + fn selection_mode(&self) -> SelectionMode { unsafe { from_glib(ffi::gtk_flow_box_get_selection_mode( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/flow_box_child.rs b/gtk/src/auto/flow_box_child.rs index 584253c78a91..500276e666e0 100644 --- a/gtk/src/auto/flow_box_child.rs +++ b/gtk/src/auto/flow_box_child.rs @@ -385,7 +385,7 @@ pub trait FlowBoxChildExt: 'static { fn changed(&self); #[doc(alias = "gtk_flow_box_child_get_index")] - fn get_index(&self) -> i32; + fn index(&self) -> i32; #[doc(alias = "gtk_flow_box_child_is_selected")] fn is_selected(&self) -> bool; @@ -402,7 +402,7 @@ impl> FlowBoxChildExt for O { } } - fn get_index(&self) -> i32 { + fn index(&self) -> i32 { unsafe { ffi::gtk_flow_box_child_get_index(self.as_ref().to_glib_none().0) } } diff --git a/gtk/src/auto/font_button.rs b/gtk/src/auto/font_button.rs index b5db9222eec8..1fe4db8fafdf 100644 --- a/gtk/src/auto/font_button.rs +++ b/gtk/src/auto/font_button.rs @@ -591,22 +591,22 @@ pub const NONE_FONT_BUTTON: Option<&FontButton> = None; pub trait FontButtonExt: 'static { #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gtk_font_button_get_font_name")] - fn get_font_name(&self) -> Option; + fn font_name(&self) -> Option; #[doc(alias = "gtk_font_button_get_show_size")] - fn get_show_size(&self) -> bool; + fn shows_size(&self) -> bool; #[doc(alias = "gtk_font_button_get_show_style")] - fn get_show_style(&self) -> bool; + fn shows_style(&self) -> bool; #[doc(alias = "gtk_font_button_get_title")] - fn get_title(&self) -> Option; + fn title(&self) -> Option; #[doc(alias = "gtk_font_button_get_use_font")] - fn get_use_font(&self) -> bool; + fn uses_font(&self) -> bool; #[doc(alias = "gtk_font_button_get_use_size")] - fn get_use_size(&self) -> bool; + fn uses_size(&self) -> bool; #[cfg_attr(feature = "v3_22", deprecated)] #[doc(alias = "gtk_font_button_set_font_name")] @@ -644,7 +644,7 @@ pub trait FontButtonExt: 'static { } impl> FontButtonExt for O { - fn get_font_name(&self) -> Option { + fn font_name(&self) -> Option { unsafe { from_glib_none(ffi::gtk_font_button_get_font_name( self.as_ref().to_glib_none().0, @@ -652,7 +652,7 @@ impl> FontButtonExt for O { } } - fn get_show_size(&self) -> bool { + fn shows_size(&self) -> bool { unsafe { from_glib(ffi::gtk_font_button_get_show_size( self.as_ref().to_glib_none().0, @@ -660,7 +660,7 @@ impl> FontButtonExt for O { } } - fn get_show_style(&self) -> bool { + fn shows_style(&self) -> bool { unsafe { from_glib(ffi::gtk_font_button_get_show_style( self.as_ref().to_glib_none().0, @@ -668,7 +668,7 @@ impl> FontButtonExt for O { } } - fn get_title(&self) -> Option { + fn title(&self) -> Option { unsafe { from_glib_none(ffi::gtk_font_button_get_title( self.as_ref().to_glib_none().0, @@ -676,7 +676,7 @@ impl> FontButtonExt for O { } } - fn get_use_font(&self) -> bool { + fn uses_font(&self) -> bool { unsafe { from_glib(ffi::gtk_font_button_get_use_font( self.as_ref().to_glib_none().0, @@ -684,7 +684,7 @@ impl> FontButtonExt for O { } } - fn get_use_size(&self) -> bool { + fn uses_size(&self) -> bool { unsafe { from_glib(ffi::gtk_font_button_get_use_size( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/font_chooser.rs b/gtk/src/auto/font_chooser.rs index a1deb35308b0..aa9bbb363ef8 100644 --- a/gtk/src/auto/font_chooser.rs +++ b/gtk/src/auto/font_chooser.rs @@ -26,45 +26,45 @@ pub const NONE_FONT_CHOOSER: Option<&FontChooser> = None; pub trait FontChooserExt: 'static { #[doc(alias = "gtk_font_chooser_get_font")] - fn get_font(&self) -> Option; + fn font(&self) -> Option; #[doc(alias = "gtk_font_chooser_get_font_desc")] - fn get_font_desc(&self) -> Option; + fn font_desc(&self) -> Option; #[doc(alias = "gtk_font_chooser_get_font_face")] - fn get_font_face(&self) -> Option; + fn font_face(&self) -> Option; #[doc(alias = "gtk_font_chooser_get_font_family")] - fn get_font_family(&self) -> Option; + fn font_family(&self) -> Option; #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] #[doc(alias = "gtk_font_chooser_get_font_features")] - fn get_font_features(&self) -> Option; + fn font_features(&self) -> Option; #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] #[doc(alias = "gtk_font_chooser_get_font_map")] - fn get_font_map(&self) -> Option; + fn font_map(&self) -> Option; #[doc(alias = "gtk_font_chooser_get_font_size")] - fn get_font_size(&self) -> i32; + fn font_size(&self) -> i32; #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] #[doc(alias = "gtk_font_chooser_get_language")] - fn get_language(&self) -> Option; + fn language(&self) -> Option; #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] #[doc(alias = "gtk_font_chooser_get_level")] - fn get_level(&self) -> FontChooserLevel; + fn level(&self) -> FontChooserLevel; #[doc(alias = "gtk_font_chooser_get_preview_text")] - fn get_preview_text(&self) -> Option; + fn preview_text(&self) -> Option; #[doc(alias = "gtk_font_chooser_get_show_preview_entry")] - fn get_show_preview_entry(&self) -> bool; + fn shows_preview_entry(&self) -> bool; #[doc(alias = "gtk_font_chooser_set_filter_func")] fn set_filter_func( @@ -130,7 +130,7 @@ pub trait FontChooserExt: 'static { } impl> FontChooserExt for O { - fn get_font(&self) -> Option { + fn font(&self) -> Option { unsafe { from_glib_full(ffi::gtk_font_chooser_get_font( self.as_ref().to_glib_none().0, @@ -138,7 +138,7 @@ impl> FontChooserExt for O { } } - fn get_font_desc(&self) -> Option { + fn font_desc(&self) -> Option { unsafe { from_glib_full(ffi::gtk_font_chooser_get_font_desc( self.as_ref().to_glib_none().0, @@ -146,7 +146,7 @@ impl> FontChooserExt for O { } } - fn get_font_face(&self) -> Option { + fn font_face(&self) -> Option { unsafe { from_glib_none(ffi::gtk_font_chooser_get_font_face( self.as_ref().to_glib_none().0, @@ -154,7 +154,7 @@ impl> FontChooserExt for O { } } - fn get_font_family(&self) -> Option { + fn font_family(&self) -> Option { unsafe { from_glib_none(ffi::gtk_font_chooser_get_font_family( self.as_ref().to_glib_none().0, @@ -164,7 +164,7 @@ impl> FontChooserExt for O { #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] - fn get_font_features(&self) -> Option { + fn font_features(&self) -> Option { unsafe { from_glib_full(ffi::gtk_font_chooser_get_font_features( self.as_ref().to_glib_none().0, @@ -174,7 +174,7 @@ impl> FontChooserExt for O { #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] - fn get_font_map(&self) -> Option { + fn font_map(&self) -> Option { unsafe { from_glib_full(ffi::gtk_font_chooser_get_font_map( self.as_ref().to_glib_none().0, @@ -182,13 +182,13 @@ impl> FontChooserExt for O { } } - fn get_font_size(&self) -> i32 { + fn font_size(&self) -> i32 { unsafe { ffi::gtk_font_chooser_get_font_size(self.as_ref().to_glib_none().0) } } #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] - fn get_language(&self) -> Option { + fn language(&self) -> Option { unsafe { from_glib_full(ffi::gtk_font_chooser_get_language( self.as_ref().to_glib_none().0, @@ -198,7 +198,7 @@ impl> FontChooserExt for O { #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] - fn get_level(&self) -> FontChooserLevel { + fn level(&self) -> FontChooserLevel { unsafe { from_glib(ffi::gtk_font_chooser_get_level( self.as_ref().to_glib_none().0, @@ -206,7 +206,7 @@ impl> FontChooserExt for O { } } - fn get_preview_text(&self) -> Option { + fn preview_text(&self) -> Option { unsafe { from_glib_full(ffi::gtk_font_chooser_get_preview_text( self.as_ref().to_glib_none().0, @@ -214,7 +214,7 @@ impl> FontChooserExt for O { } } - fn get_show_preview_entry(&self) -> bool { + fn shows_preview_entry(&self) -> bool { unsafe { from_glib(ffi::gtk_font_chooser_get_show_preview_entry( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/font_chooser_widget.rs b/gtk/src/auto/font_chooser_widget.rs index c869e0c4b26e..00eba0f66e8e 100644 --- a/gtk/src/auto/font_chooser_widget.rs +++ b/gtk/src/auto/font_chooser_widget.rs @@ -487,14 +487,15 @@ impl FontChooserWidgetBuilder { pub const NONE_FONT_CHOOSER_WIDGET: Option<&FontChooserWidget> = None; pub trait FontChooserWidgetExt: 'static { - //fn get_property_tweak_action(&self) -> /*Ignored*/Option; + //#[doc(alias = "get_property_tweak_action")] + //fn tweak_action(&self) -> /*Ignored*/Option; fn connect_property_tweak_action_notify(&self, f: F) -> SignalHandlerId; } impl> FontChooserWidgetExt for O { - //fn get_property_tweak_action(&self) -> /*Ignored*/Option { + //fn tweak_action(&self) -> /*Ignored*/Option { // unsafe { // let mut value = glib::Value::from_type(::static_type()); // glib::gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"tweak-action\0".as_ptr() as *const _, value.to_glib_none_mut().0); diff --git a/gtk/src/auto/frame.rs b/gtk/src/auto/frame.rs index 9622b95ca51f..5a177fcc0d48 100644 --- a/gtk/src/auto/frame.rs +++ b/gtk/src/auto/frame.rs @@ -422,16 +422,16 @@ pub const NONE_FRAME: Option<&Frame> = None; pub trait FrameExt: 'static { #[doc(alias = "gtk_frame_get_label")] - fn get_label(&self) -> Option; + fn label(&self) -> Option; #[doc(alias = "gtk_frame_get_label_align")] - fn get_label_align(&self) -> (f32, f32); + fn label_align(&self) -> (f32, f32); #[doc(alias = "gtk_frame_get_label_widget")] - fn get_label_widget(&self) -> Option; + fn label_widget(&self) -> Option; #[doc(alias = "gtk_frame_get_shadow_type")] - fn get_shadow_type(&self) -> ShadowType; + fn shadow_type(&self) -> ShadowType; #[doc(alias = "gtk_frame_set_label")] fn set_label(&self, label: Option<&str>); @@ -445,13 +445,17 @@ pub trait FrameExt: 'static { #[doc(alias = "gtk_frame_set_shadow_type")] fn set_shadow_type(&self, type_: ShadowType); - fn get_property_label_xalign(&self) -> f32; + #[doc(alias = "get_property_label_xalign")] + fn label_xalign(&self) -> f32; - fn set_property_label_xalign(&self, label_xalign: f32); + #[doc(alias = "set_property_label_xalign")] + fn set_label_xalign(&self, label_xalign: f32); - fn get_property_label_yalign(&self) -> f32; + #[doc(alias = "get_property_label_yalign")] + fn label_yalign(&self) -> f32; - fn set_property_label_yalign(&self, label_yalign: f32); + #[doc(alias = "set_property_label_yalign")] + fn set_label_yalign(&self, label_yalign: f32); fn connect_property_label_notify(&self, f: F) -> SignalHandlerId; @@ -468,11 +472,11 @@ pub trait FrameExt: 'static { } impl> FrameExt for O { - fn get_label(&self) -> Option { + fn label(&self) -> Option { unsafe { from_glib_none(ffi::gtk_frame_get_label(self.as_ref().to_glib_none().0)) } } - fn get_label_align(&self) -> (f32, f32) { + fn label_align(&self) -> (f32, f32) { unsafe { let mut xalign = mem::MaybeUninit::uninit(); let mut yalign = mem::MaybeUninit::uninit(); @@ -487,7 +491,7 @@ impl> FrameExt for O { } } - fn get_label_widget(&self) -> Option { + fn label_widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_frame_get_label_widget( self.as_ref().to_glib_none().0, @@ -495,7 +499,7 @@ impl> FrameExt for O { } } - fn get_shadow_type(&self) -> ShadowType { + fn shadow_type(&self) -> ShadowType { unsafe { from_glib(ffi::gtk_frame_get_shadow_type( self.as_ref().to_glib_none().0, @@ -530,7 +534,7 @@ impl> FrameExt for O { } } - fn get_property_label_xalign(&self) -> f32 { + fn label_xalign(&self) -> f32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -545,7 +549,7 @@ impl> FrameExt for O { } } - fn set_property_label_xalign(&self, label_xalign: f32) { + fn set_label_xalign(&self, label_xalign: f32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -555,7 +559,7 @@ impl> FrameExt for O { } } - fn get_property_label_yalign(&self) -> f32 { + fn label_yalign(&self) -> f32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -570,7 +574,7 @@ impl> FrameExt for O { } } - fn set_property_label_yalign(&self, label_yalign: f32) { + fn set_label_yalign(&self, label_yalign: f32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/gesture.rs b/gtk/src/auto/gesture.rs index cc53c7177935..96600ee352bb 100644 --- a/gtk/src/auto/gesture.rs +++ b/gtk/src/auto/gesture.rs @@ -27,22 +27,22 @@ pub const NONE_GESTURE: Option<&Gesture> = None; pub trait GestureExt: 'static { #[doc(alias = "gtk_gesture_get_bounding_box")] - fn get_bounding_box(&self) -> Option; + fn bounding_box(&self) -> Option; #[doc(alias = "gtk_gesture_get_bounding_box_center")] - fn get_bounding_box_center(&self) -> Option<(f64, f64)>; + fn bounding_box_center(&self) -> Option<(f64, f64)>; #[doc(alias = "gtk_gesture_get_device")] - fn get_device(&self) -> Option; + fn device(&self) -> Option; #[doc(alias = "gtk_gesture_get_group")] - fn get_group(&self) -> Vec; + fn group(&self) -> Vec; #[doc(alias = "gtk_gesture_get_last_event")] fn get_last_event(&self, sequence: Option<&gdk::EventSequence>) -> Option; #[doc(alias = "gtk_gesture_get_last_updated_sequence")] - fn get_last_updated_sequence(&self) -> Option; + fn last_updated_sequence(&self) -> Option; #[doc(alias = "gtk_gesture_get_point")] fn get_point(&self, sequence: Option<&gdk::EventSequence>) -> Option<(f64, f64)>; @@ -51,13 +51,13 @@ pub trait GestureExt: 'static { fn get_sequence_state(&self, sequence: &gdk::EventSequence) -> EventSequenceState; #[doc(alias = "gtk_gesture_get_sequences")] - fn get_sequences(&self) -> Vec; + fn sequences(&self) -> Vec; #[doc(alias = "gtk_gesture_get_window")] - fn get_window(&self) -> Option; + fn window(&self) -> Option; #[doc(alias = "gtk_gesture_group")] - fn group>(&self, gesture: &P); + fn group_with>(&self, gesture: &P); #[doc(alias = "gtk_gesture_handles_sequence")] fn handles_sequence(&self, sequence: Option<&gdk::EventSequence>) -> bool; @@ -83,7 +83,8 @@ pub trait GestureExt: 'static { #[doc(alias = "gtk_gesture_ungroup")] fn ungroup(&self); - fn get_property_n_points(&self) -> u32; + #[doc(alias = "get_property_n_points")] + fn n_points(&self) -> u32; fn connect_begin) + 'static>( &self, @@ -116,7 +117,7 @@ pub trait GestureExt: 'static { } impl> GestureExt for O { - fn get_bounding_box(&self) -> Option { + fn bounding_box(&self) -> Option { unsafe { let mut rect = gdk::Rectangle::uninitialized(); let ret = from_glib(ffi::gtk_gesture_get_bounding_box( @@ -131,7 +132,7 @@ impl> GestureExt for O { } } - fn get_bounding_box_center(&self) -> Option<(f64, f64)> { + fn bounding_box_center(&self) -> Option<(f64, f64)> { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); @@ -150,11 +151,11 @@ impl> GestureExt for O { } } - fn get_device(&self) -> Option { + fn device(&self) -> Option { unsafe { from_glib_none(ffi::gtk_gesture_get_device(self.as_ref().to_glib_none().0)) } } - fn get_group(&self) -> Vec { + fn group(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gtk_gesture_get_group( self.as_ref().to_glib_none().0, @@ -171,7 +172,7 @@ impl> GestureExt for O { } } - fn get_last_updated_sequence(&self) -> Option { + fn last_updated_sequence(&self) -> Option { unsafe { from_glib_none(ffi::gtk_gesture_get_last_updated_sequence( self.as_ref().to_glib_none().0, @@ -208,7 +209,7 @@ impl> GestureExt for O { } } - fn get_sequences(&self) -> Vec { + fn sequences(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gtk_gesture_get_sequences( self.as_ref().to_glib_none().0, @@ -216,11 +217,11 @@ impl> GestureExt for O { } } - fn get_window(&self) -> Option { + fn window(&self) -> Option { unsafe { from_glib_none(ffi::gtk_gesture_get_window(self.as_ref().to_glib_none().0)) } } - fn group>(&self, gesture: &P) { + fn group_with>(&self, gesture: &P) { unsafe { ffi::gtk_gesture_group( self.as_ref().to_glib_none().0, @@ -290,7 +291,7 @@ impl> GestureExt for O { } } - fn get_property_n_points(&self) -> u32 { + fn n_points(&self) -> u32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/gesture_drag.rs b/gtk/src/auto/gesture_drag.rs index b96b8462b89f..97b0b0e8feda 100644 --- a/gtk/src/auto/gesture_drag.rs +++ b/gtk/src/auto/gesture_drag.rs @@ -121,10 +121,10 @@ pub const NONE_GESTURE_DRAG: Option<&GestureDrag> = None; pub trait GestureDragExt: 'static { #[doc(alias = "gtk_gesture_drag_get_offset")] - fn get_offset(&self) -> Option<(f64, f64)>; + fn offset(&self) -> Option<(f64, f64)>; #[doc(alias = "gtk_gesture_drag_get_start_point")] - fn get_start_point(&self) -> Option<(f64, f64)>; + fn start_point(&self) -> Option<(f64, f64)>; fn connect_drag_begin(&self, f: F) -> SignalHandlerId; @@ -134,7 +134,7 @@ pub trait GestureDragExt: 'static { } impl> GestureDragExt for O { - fn get_offset(&self) -> Option<(f64, f64)> { + fn offset(&self) -> Option<(f64, f64)> { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); @@ -153,7 +153,7 @@ impl> GestureDragExt for O { } } - fn get_start_point(&self) -> Option<(f64, f64)> { + fn start_point(&self) -> Option<(f64, f64)> { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); diff --git a/gtk/src/auto/gesture_long_press.rs b/gtk/src/auto/gesture_long_press.rs index 485c5c9222ad..051c32aef420 100644 --- a/gtk/src/auto/gesture_long_press.rs +++ b/gtk/src/auto/gesture_long_press.rs @@ -39,7 +39,8 @@ impl GestureLongPress { } } - pub fn get_property_delay_factor(&self) -> f64 { + #[doc(alias = "get_property_delay_factor")] + pub fn delay_factor(&self) -> f64 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -54,7 +55,8 @@ impl GestureLongPress { } } - pub fn set_property_delay_factor(&self, delay_factor: f64) { + #[doc(alias = "set_property_delay_factor")] + pub fn set_delay_factor(&self, delay_factor: f64) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/gesture_multi_press.rs b/gtk/src/auto/gesture_multi_press.rs index 5405da3b7642..4eaa252eb428 100644 --- a/gtk/src/auto/gesture_multi_press.rs +++ b/gtk/src/auto/gesture_multi_press.rs @@ -40,7 +40,7 @@ impl GestureMultiPress { } #[doc(alias = "gtk_gesture_multi_press_get_area")] - pub fn get_area(&self) -> Option { + pub fn area(&self) -> Option { unsafe { let mut rect = gdk::Rectangle::uninitialized(); let ret = from_glib(ffi::gtk_gesture_multi_press_get_area( diff --git a/gtk/src/auto/gesture_pan.rs b/gtk/src/auto/gesture_pan.rs index b2c8c0f00caa..c015474d3c81 100644 --- a/gtk/src/auto/gesture_pan.rs +++ b/gtk/src/auto/gesture_pan.rs @@ -44,7 +44,7 @@ impl GesturePan { } #[doc(alias = "gtk_gesture_pan_get_orientation")] - pub fn get_orientation(&self) -> Orientation { + pub fn orientation(&self) -> Orientation { unsafe { from_glib(ffi::gtk_gesture_pan_get_orientation(self.to_glib_none().0)) } } diff --git a/gtk/src/auto/gesture_rotate.rs b/gtk/src/auto/gesture_rotate.rs index 4167095ace27..e39cd3c966a6 100644 --- a/gtk/src/auto/gesture_rotate.rs +++ b/gtk/src/auto/gesture_rotate.rs @@ -39,7 +39,7 @@ impl GestureRotate { } #[doc(alias = "gtk_gesture_rotate_get_angle_delta")] - pub fn get_angle_delta(&self) -> f64 { + pub fn angle_delta(&self) -> f64 { unsafe { ffi::gtk_gesture_rotate_get_angle_delta(self.to_glib_none().0) } } diff --git a/gtk/src/auto/gesture_single.rs b/gtk/src/auto/gesture_single.rs index e29cb8ec0e2c..1a26bbf84865 100644 --- a/gtk/src/auto/gesture_single.rs +++ b/gtk/src/auto/gesture_single.rs @@ -25,19 +25,19 @@ pub const NONE_GESTURE_SINGLE: Option<&GestureSingle> = None; pub trait GestureSingleExt: 'static { #[doc(alias = "gtk_gesture_single_get_button")] - fn get_button(&self) -> u32; + fn button(&self) -> u32; #[doc(alias = "gtk_gesture_single_get_current_button")] - fn get_current_button(&self) -> u32; + fn current_button(&self) -> u32; #[doc(alias = "gtk_gesture_single_get_current_sequence")] - fn get_current_sequence(&self) -> Option; + fn current_sequence(&self) -> Option; #[doc(alias = "gtk_gesture_single_get_exclusive")] - fn get_exclusive(&self) -> bool; + fn is_exclusive(&self) -> bool; #[doc(alias = "gtk_gesture_single_get_touch_only")] - fn get_touch_only(&self) -> bool; + fn is_touch_only(&self) -> bool; #[doc(alias = "gtk_gesture_single_set_button")] fn set_button(&self, button: u32); @@ -56,15 +56,15 @@ pub trait GestureSingleExt: 'static { } impl> GestureSingleExt for O { - fn get_button(&self) -> u32 { + fn button(&self) -> u32 { unsafe { ffi::gtk_gesture_single_get_button(self.as_ref().to_glib_none().0) } } - fn get_current_button(&self) -> u32 { + fn current_button(&self) -> u32 { unsafe { ffi::gtk_gesture_single_get_current_button(self.as_ref().to_glib_none().0) } } - fn get_current_sequence(&self) -> Option { + fn current_sequence(&self) -> Option { unsafe { from_glib_full(ffi::gtk_gesture_single_get_current_sequence( self.as_ref().to_glib_none().0, @@ -72,7 +72,7 @@ impl> GestureSingleExt for O { } } - fn get_exclusive(&self) -> bool { + fn is_exclusive(&self) -> bool { unsafe { from_glib(ffi::gtk_gesture_single_get_exclusive( self.as_ref().to_glib_none().0, @@ -80,7 +80,7 @@ impl> GestureSingleExt for O { } } - fn get_touch_only(&self) -> bool { + fn is_touch_only(&self) -> bool { unsafe { from_glib(ffi::gtk_gesture_single_get_touch_only( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/gesture_stylus.rs b/gtk/src/auto/gesture_stylus.rs index b43e16d389d8..42b2076f1dc5 100644 --- a/gtk/src/auto/gesture_stylus.rs +++ b/gtk/src/auto/gesture_stylus.rs @@ -56,7 +56,7 @@ impl GestureStylus { } #[doc(alias = "gtk_gesture_stylus_get_device_tool")] - pub fn get_device_tool(&self) -> Option { + pub fn device_tool(&self) -> Option { unsafe { from_glib_none(ffi::gtk_gesture_stylus_get_device_tool( self.to_glib_none().0, diff --git a/gtk/src/auto/gesture_swipe.rs b/gtk/src/auto/gesture_swipe.rs index cf8eec289434..997cd88687a2 100644 --- a/gtk/src/auto/gesture_swipe.rs +++ b/gtk/src/auto/gesture_swipe.rs @@ -39,7 +39,7 @@ impl GestureSwipe { } #[doc(alias = "gtk_gesture_swipe_get_velocity")] - pub fn get_velocity(&self) -> Option<(f64, f64)> { + pub fn velocity(&self) -> Option<(f64, f64)> { unsafe { let mut velocity_x = mem::MaybeUninit::uninit(); let mut velocity_y = mem::MaybeUninit::uninit(); diff --git a/gtk/src/auto/gesture_zoom.rs b/gtk/src/auto/gesture_zoom.rs index 9a25a173ed15..b608d5ddfd9a 100644 --- a/gtk/src/auto/gesture_zoom.rs +++ b/gtk/src/auto/gesture_zoom.rs @@ -37,7 +37,7 @@ impl GestureZoom { } #[doc(alias = "gtk_gesture_zoom_get_scale_delta")] - pub fn get_scale_delta(&self) -> f64 { + pub fn scale_delta(&self) -> f64 { unsafe { ffi::gtk_gesture_zoom_get_scale_delta(self.to_glib_none().0) } } diff --git a/gtk/src/auto/gl_area.rs b/gtk/src/auto/gl_area.rs index 1b69f5d9d139..1b6e5519c556 100644 --- a/gtk/src/auto/gl_area.rs +++ b/gtk/src/auto/gl_area.rs @@ -428,30 +428,30 @@ pub trait GLAreaExt: 'static { fn attach_buffers(&self); #[doc(alias = "gtk_gl_area_get_auto_render")] - fn get_auto_render(&self) -> bool; + fn is_auto_render(&self) -> bool; #[doc(alias = "gtk_gl_area_get_context")] - fn get_context(&self) -> Option; + fn context(&self) -> Option; #[doc(alias = "gtk_gl_area_get_error")] - fn get_error(&self) -> Option; + fn error(&self) -> Option; #[doc(alias = "gtk_gl_area_get_has_alpha")] - fn get_has_alpha(&self) -> bool; + fn has_alpha(&self) -> bool; #[doc(alias = "gtk_gl_area_get_has_depth_buffer")] - fn get_has_depth_buffer(&self) -> bool; + fn has_depth_buffer(&self) -> bool; #[doc(alias = "gtk_gl_area_get_has_stencil_buffer")] - fn get_has_stencil_buffer(&self) -> bool; + fn has_stencil_buffer(&self) -> bool; #[doc(alias = "gtk_gl_area_get_required_version")] - fn get_required_version(&self) -> (i32, i32); + fn required_version(&self) -> (i32, i32); #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] #[doc(alias = "gtk_gl_area_get_use_es")] - fn get_use_es(&self) -> bool; + fn uses_es(&self) -> bool; #[doc(alias = "gtk_gl_area_make_current")] fn make_current(&self); @@ -538,7 +538,7 @@ impl> GLAreaExt for O { } } - fn get_auto_render(&self) -> bool { + fn is_auto_render(&self) -> bool { unsafe { from_glib(ffi::gtk_gl_area_get_auto_render( self.as_ref().to_glib_none().0, @@ -546,15 +546,15 @@ impl> GLAreaExt for O { } } - fn get_context(&self) -> Option { + fn context(&self) -> Option { unsafe { from_glib_none(ffi::gtk_gl_area_get_context(self.as_ref().to_glib_none().0)) } } - fn get_error(&self) -> Option { + fn error(&self) -> Option { unsafe { from_glib_none(ffi::gtk_gl_area_get_error(self.as_ref().to_glib_none().0)) } } - fn get_has_alpha(&self) -> bool { + fn has_alpha(&self) -> bool { unsafe { from_glib(ffi::gtk_gl_area_get_has_alpha( self.as_ref().to_glib_none().0, @@ -562,7 +562,7 @@ impl> GLAreaExt for O { } } - fn get_has_depth_buffer(&self) -> bool { + fn has_depth_buffer(&self) -> bool { unsafe { from_glib(ffi::gtk_gl_area_get_has_depth_buffer( self.as_ref().to_glib_none().0, @@ -570,7 +570,7 @@ impl> GLAreaExt for O { } } - fn get_has_stencil_buffer(&self) -> bool { + fn has_stencil_buffer(&self) -> bool { unsafe { from_glib(ffi::gtk_gl_area_get_has_stencil_buffer( self.as_ref().to_glib_none().0, @@ -578,7 +578,7 @@ impl> GLAreaExt for O { } } - fn get_required_version(&self) -> (i32, i32) { + fn required_version(&self) -> (i32, i32) { unsafe { let mut major = mem::MaybeUninit::uninit(); let mut minor = mem::MaybeUninit::uninit(); @@ -595,7 +595,7 @@ impl> GLAreaExt for O { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn get_use_es(&self) -> bool { + fn uses_es(&self) -> bool { unsafe { from_glib(ffi::gtk_gl_area_get_use_es(self.as_ref().to_glib_none().0)) } } diff --git a/gtk/src/auto/grid.rs b/gtk/src/auto/grid.rs index d362598f1dfa..94cd370a2575 100644 --- a/gtk/src/auto/grid.rs +++ b/gtk/src/auto/grid.rs @@ -451,25 +451,25 @@ pub trait GridExt: 'static { ); #[doc(alias = "gtk_grid_get_baseline_row")] - fn get_baseline_row(&self) -> i32; + fn baseline_row(&self) -> i32; #[doc(alias = "gtk_grid_get_child_at")] fn get_child_at(&self, left: i32, top: i32) -> Option; #[doc(alias = "gtk_grid_get_column_homogeneous")] - fn get_column_homogeneous(&self) -> bool; + fn is_column_homogeneous(&self) -> bool; #[doc(alias = "gtk_grid_get_column_spacing")] - fn get_column_spacing(&self) -> u32; + fn column_spacing(&self) -> u32; #[doc(alias = "gtk_grid_get_row_baseline_position")] fn get_row_baseline_position(&self, row: i32) -> BaselinePosition; #[doc(alias = "gtk_grid_get_row_homogeneous")] - fn get_row_homogeneous(&self) -> bool; + fn is_row_homogeneous(&self) -> bool; #[doc(alias = "gtk_grid_get_row_spacing")] - fn get_row_spacing(&self) -> u32; + fn row_spacing(&self) -> u32; #[doc(alias = "gtk_grid_insert_column")] fn insert_column(&self, position: i32); @@ -575,7 +575,7 @@ impl> GridExt for O { } } - fn get_baseline_row(&self) -> i32 { + fn baseline_row(&self) -> i32 { unsafe { ffi::gtk_grid_get_baseline_row(self.as_ref().to_glib_none().0) } } @@ -589,7 +589,7 @@ impl> GridExt for O { } } - fn get_column_homogeneous(&self) -> bool { + fn is_column_homogeneous(&self) -> bool { unsafe { from_glib(ffi::gtk_grid_get_column_homogeneous( self.as_ref().to_glib_none().0, @@ -597,7 +597,7 @@ impl> GridExt for O { } } - fn get_column_spacing(&self) -> u32 { + fn column_spacing(&self) -> u32 { unsafe { ffi::gtk_grid_get_column_spacing(self.as_ref().to_glib_none().0) } } @@ -610,7 +610,7 @@ impl> GridExt for O { } } - fn get_row_homogeneous(&self) -> bool { + fn is_row_homogeneous(&self) -> bool { unsafe { from_glib(ffi::gtk_grid_get_row_homogeneous( self.as_ref().to_glib_none().0, @@ -618,7 +618,7 @@ impl> GridExt for O { } } - fn get_row_spacing(&self) -> u32 { + fn row_spacing(&self) -> u32 { unsafe { ffi::gtk_grid_get_row_spacing(self.as_ref().to_glib_none().0) } } diff --git a/gtk/src/auto/header_bar.rs b/gtk/src/auto/header_bar.rs index 18ab3a259a82..946e96fba21d 100644 --- a/gtk/src/auto/header_bar.rs +++ b/gtk/src/auto/header_bar.rs @@ -453,22 +453,22 @@ pub const NONE_HEADER_BAR: Option<&HeaderBar> = None; pub trait HeaderBarExt: 'static { #[doc(alias = "gtk_header_bar_get_custom_title")] - fn get_custom_title(&self) -> Option; + fn custom_title(&self) -> Option; #[doc(alias = "gtk_header_bar_get_decoration_layout")] - fn get_decoration_layout(&self) -> Option; + fn decoration_layout(&self) -> Option; #[doc(alias = "gtk_header_bar_get_has_subtitle")] - fn get_has_subtitle(&self) -> bool; + fn has_subtitle(&self) -> bool; #[doc(alias = "gtk_header_bar_get_show_close_button")] - fn get_show_close_button(&self) -> bool; + fn shows_close_button(&self) -> bool; #[doc(alias = "gtk_header_bar_get_subtitle")] - fn get_subtitle(&self) -> Option; + fn subtitle(&self) -> Option; #[doc(alias = "gtk_header_bar_get_title")] - fn get_title(&self) -> Option; + fn title(&self) -> Option; #[doc(alias = "gtk_header_bar_pack_end")] fn pack_end>(&self, child: &P); @@ -494,13 +494,17 @@ pub trait HeaderBarExt: 'static { #[doc(alias = "gtk_header_bar_set_title")] fn set_title(&self, title: Option<&str>); - fn get_property_decoration_layout_set(&self) -> bool; + #[doc(alias = "get_property_decoration_layout_set")] + fn is_decoration_layout_set(&self) -> bool; - fn set_property_decoration_layout_set(&self, decoration_layout_set: bool); + #[doc(alias = "set_property_decoration_layout_set")] + fn set_decoration_layout_set(&self, decoration_layout_set: bool); - fn get_property_spacing(&self) -> i32; + #[doc(alias = "get_property_spacing")] + fn spacing(&self) -> i32; - fn set_property_spacing(&self, spacing: i32); + #[doc(alias = "set_property_spacing")] + fn set_spacing(&self, spacing: i32); fn get_child_pack_type>(&self, item: &T) -> PackType; @@ -539,7 +543,7 @@ pub trait HeaderBarExt: 'static { } impl> HeaderBarExt for O { - fn get_custom_title(&self) -> Option { + fn custom_title(&self) -> Option { unsafe { from_glib_none(ffi::gtk_header_bar_get_custom_title( self.as_ref().to_glib_none().0, @@ -547,7 +551,7 @@ impl> HeaderBarExt for O { } } - fn get_decoration_layout(&self) -> Option { + fn decoration_layout(&self) -> Option { unsafe { from_glib_none(ffi::gtk_header_bar_get_decoration_layout( self.as_ref().to_glib_none().0, @@ -555,7 +559,7 @@ impl> HeaderBarExt for O { } } - fn get_has_subtitle(&self) -> bool { + fn has_subtitle(&self) -> bool { unsafe { from_glib(ffi::gtk_header_bar_get_has_subtitle( self.as_ref().to_glib_none().0, @@ -563,7 +567,7 @@ impl> HeaderBarExt for O { } } - fn get_show_close_button(&self) -> bool { + fn shows_close_button(&self) -> bool { unsafe { from_glib(ffi::gtk_header_bar_get_show_close_button( self.as_ref().to_glib_none().0, @@ -571,7 +575,7 @@ impl> HeaderBarExt for O { } } - fn get_subtitle(&self) -> Option { + fn subtitle(&self) -> Option { unsafe { from_glib_none(ffi::gtk_header_bar_get_subtitle( self.as_ref().to_glib_none().0, @@ -579,7 +583,7 @@ impl> HeaderBarExt for O { } } - fn get_title(&self) -> Option { + fn title(&self) -> Option { unsafe { from_glib_none(ffi::gtk_header_bar_get_title( self.as_ref().to_glib_none().0, @@ -653,7 +657,7 @@ impl> HeaderBarExt for O { } } - fn get_property_decoration_layout_set(&self) -> bool { + fn is_decoration_layout_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -668,7 +672,7 @@ impl> HeaderBarExt for O { } } - fn set_property_decoration_layout_set(&self, decoration_layout_set: bool) { + fn set_decoration_layout_set(&self, decoration_layout_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -678,7 +682,7 @@ impl> HeaderBarExt for O { } } - fn get_property_spacing(&self) -> i32 { + fn spacing(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -693,7 +697,7 @@ impl> HeaderBarExt for O { } } - fn set_property_spacing(&self, spacing: i32) { + fn set_spacing(&self, spacing: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/icon_info.rs b/gtk/src/auto/icon_info.rs index 19c5abf3c5f0..c3f8f3c1f293 100644 --- a/gtk/src/auto/icon_info.rs +++ b/gtk/src/auto/icon_info.rs @@ -22,10 +22,7 @@ glib::wrapper! { impl IconInfo { #[doc(alias = "gtk_icon_info_new_for_pixbuf")] - pub fn new_for_pixbuf>( - icon_theme: &P, - pixbuf: &gdk_pixbuf::Pixbuf, - ) -> IconInfo { + pub fn for_pixbuf>(icon_theme: &P, pixbuf: &gdk_pixbuf::Pixbuf) -> IconInfo { skip_assert_initialized!(); unsafe { from_glib_full(ffi::gtk_icon_info_new_for_pixbuf( @@ -36,17 +33,17 @@ impl IconInfo { } #[doc(alias = "gtk_icon_info_get_base_scale")] - pub fn get_base_scale(&self) -> i32 { + pub fn base_scale(&self) -> i32 { unsafe { ffi::gtk_icon_info_get_base_scale(self.to_glib_none().0) } } #[doc(alias = "gtk_icon_info_get_base_size")] - pub fn get_base_size(&self) -> i32 { + pub fn base_size(&self) -> i32 { unsafe { ffi::gtk_icon_info_get_base_size(self.to_glib_none().0) } } #[doc(alias = "gtk_icon_info_get_filename")] - pub fn get_filename(&self) -> Option { + pub fn filename(&self) -> Option { unsafe { from_glib_none(ffi::gtk_icon_info_get_filename(self.to_glib_none().0)) } } diff --git a/gtk/src/auto/icon_theme.rs b/gtk/src/auto/icon_theme.rs index bf1902c5a0dd..41627e3e8ac6 100644 --- a/gtk/src/auto/icon_theme.rs +++ b/gtk/src/auto/icon_theme.rs @@ -58,7 +58,7 @@ pub trait IconThemeExt: 'static { fn append_search_path>(&self, path: P); #[doc(alias = "gtk_icon_theme_get_example_icon_name")] - fn get_example_icon_name(&self) -> Option; + fn example_icon_name(&self) -> Option; #[doc(alias = "gtk_icon_theme_has_icon")] fn has_icon(&self, icon_name: &str) -> bool; @@ -159,7 +159,7 @@ impl> IconThemeExt for O { } } - fn get_example_icon_name(&self) -> Option { + fn example_icon_name(&self) -> Option { unsafe { from_glib_full(ffi::gtk_icon_theme_get_example_icon_name( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/icon_view.rs b/gtk/src/auto/icon_view.rs index 08ae3dc8f54e..323b3f6b7b97 100644 --- a/gtk/src/auto/icon_view.rs +++ b/gtk/src/auto/icon_view.rs @@ -605,7 +605,7 @@ pub trait IconViewExt: 'static { fn create_drag_icon(&self, path: &TreePath) -> Option; #[doc(alias = "gtk_icon_view_get_activate_on_single_click")] - fn get_activate_on_single_click(&self) -> bool; + fn activates_on_single_click(&self) -> bool; #[doc(alias = "gtk_icon_view_get_cell_rect")] fn get_cell_rect>( @@ -615,13 +615,13 @@ pub trait IconViewExt: 'static { ) -> Option; #[doc(alias = "gtk_icon_view_get_column_spacing")] - fn get_column_spacing(&self) -> i32; + fn column_spacing(&self) -> i32; #[doc(alias = "gtk_icon_view_get_columns")] - fn get_columns(&self) -> i32; + fn columns(&self) -> i32; #[doc(alias = "gtk_icon_view_get_cursor")] - fn get_cursor(&self) -> Option<(TreePath, CellRenderer)>; + fn cursor(&self) -> Option<(TreePath, CellRenderer)>; #[doc(alias = "gtk_icon_view_get_dest_item_at_pos")] fn get_dest_item_at_pos( @@ -631,7 +631,7 @@ pub trait IconViewExt: 'static { ) -> Option<(TreePath, IconViewDropPosition)>; #[doc(alias = "gtk_icon_view_get_drag_dest_item")] - fn get_drag_dest_item(&self) -> (TreePath, IconViewDropPosition); + fn drag_dest_item(&self) -> (TreePath, IconViewDropPosition); #[doc(alias = "gtk_icon_view_get_item_at_pos")] fn get_item_at_pos(&self, x: i32, y: i32) -> Option<(TreePath, CellRenderer)>; @@ -640,52 +640,52 @@ pub trait IconViewExt: 'static { fn get_item_column(&self, path: &TreePath) -> i32; #[doc(alias = "gtk_icon_view_get_item_orientation")] - fn get_item_orientation(&self) -> Orientation; + fn item_orientation(&self) -> Orientation; #[doc(alias = "gtk_icon_view_get_item_padding")] - fn get_item_padding(&self) -> i32; + fn item_padding(&self) -> i32; #[doc(alias = "gtk_icon_view_get_item_row")] fn get_item_row(&self, path: &TreePath) -> i32; #[doc(alias = "gtk_icon_view_get_item_width")] - fn get_item_width(&self) -> i32; + fn item_width(&self) -> i32; #[doc(alias = "gtk_icon_view_get_margin")] - fn get_margin(&self) -> i32; + fn margin(&self) -> i32; #[doc(alias = "gtk_icon_view_get_markup_column")] - fn get_markup_column(&self) -> i32; + fn markup_column(&self) -> i32; #[doc(alias = "gtk_icon_view_get_model")] - fn get_model(&self) -> Option; + fn model(&self) -> Option; #[doc(alias = "gtk_icon_view_get_path_at_pos")] fn get_path_at_pos(&self, x: i32, y: i32) -> Option; #[doc(alias = "gtk_icon_view_get_pixbuf_column")] - fn get_pixbuf_column(&self) -> i32; + fn pixbuf_column(&self) -> i32; #[doc(alias = "gtk_icon_view_get_reorderable")] - fn get_reorderable(&self) -> bool; + fn is_reorderable(&self) -> bool; #[doc(alias = "gtk_icon_view_get_row_spacing")] - fn get_row_spacing(&self) -> i32; + fn row_spacing(&self) -> i32; #[doc(alias = "gtk_icon_view_get_selected_items")] - fn get_selected_items(&self) -> Vec; + fn selected_items(&self) -> Vec; #[doc(alias = "gtk_icon_view_get_selection_mode")] - fn get_selection_mode(&self) -> SelectionMode; + fn selection_mode(&self) -> SelectionMode; #[doc(alias = "gtk_icon_view_get_spacing")] - fn get_spacing(&self) -> i32; + fn spacing(&self) -> i32; #[doc(alias = "gtk_icon_view_get_text_column")] - fn get_text_column(&self) -> i32; + fn text_column(&self) -> i32; #[doc(alias = "gtk_icon_view_get_tooltip_column")] - fn get_tooltip_column(&self) -> i32; + fn tooltip_column(&self) -> i32; #[doc(alias = "gtk_icon_view_get_tooltip_context")] fn get_tooltip_context( @@ -696,7 +696,7 @@ pub trait IconViewExt: 'static { ) -> Option<(TreeModel, TreePath, TreeIter)>; #[doc(alias = "gtk_icon_view_get_visible_range")] - fn get_visible_range(&self) -> Option<(TreePath, TreePath)>; + fn visible_range(&self) -> Option<(TreePath, TreePath)>; #[doc(alias = "gtk_icon_view_item_activated")] fn item_activated(&self, path: &TreePath); @@ -798,7 +798,8 @@ pub trait IconViewExt: 'static { #[doc(alias = "gtk_icon_view_unset_model_drag_source")] fn unset_model_drag_source(&self); - fn get_property_cell_area(&self) -> Option; + #[doc(alias = "get_property_cell_area")] + fn cell_area(&self) -> Option; fn connect_activate_cursor_item bool + 'static>(&self, f: F) -> SignalHandlerId; @@ -914,7 +915,7 @@ impl> IconViewExt for O { } } - fn get_activate_on_single_click(&self) -> bool { + fn activates_on_single_click(&self) -> bool { unsafe { from_glib(ffi::gtk_icon_view_get_activate_on_single_click( self.as_ref().to_glib_none().0, @@ -943,15 +944,15 @@ impl> IconViewExt for O { } } - fn get_column_spacing(&self) -> i32 { + fn column_spacing(&self) -> i32 { unsafe { ffi::gtk_icon_view_get_column_spacing(self.as_ref().to_glib_none().0) } } - fn get_columns(&self) -> i32 { + fn columns(&self) -> i32 { unsafe { ffi::gtk_icon_view_get_columns(self.as_ref().to_glib_none().0) } } - fn get_cursor(&self) -> Option<(TreePath, CellRenderer)> { + fn cursor(&self) -> Option<(TreePath, CellRenderer)> { unsafe { let mut path = ptr::null_mut(); let mut cell = ptr::null_mut(); @@ -992,7 +993,7 @@ impl> IconViewExt for O { } } - fn get_drag_dest_item(&self) -> (TreePath, IconViewDropPosition) { + fn drag_dest_item(&self) -> (TreePath, IconViewDropPosition) { unsafe { let mut path = ptr::null_mut(); let mut pos = mem::MaybeUninit::uninit(); @@ -1034,7 +1035,7 @@ impl> IconViewExt for O { } } - fn get_item_orientation(&self) -> Orientation { + fn item_orientation(&self) -> Orientation { unsafe { from_glib(ffi::gtk_icon_view_get_item_orientation( self.as_ref().to_glib_none().0, @@ -1042,7 +1043,7 @@ impl> IconViewExt for O { } } - fn get_item_padding(&self) -> i32 { + fn item_padding(&self) -> i32 { unsafe { ffi::gtk_icon_view_get_item_padding(self.as_ref().to_glib_none().0) } } @@ -1055,19 +1056,19 @@ impl> IconViewExt for O { } } - fn get_item_width(&self) -> i32 { + fn item_width(&self) -> i32 { unsafe { ffi::gtk_icon_view_get_item_width(self.as_ref().to_glib_none().0) } } - fn get_margin(&self) -> i32 { + fn margin(&self) -> i32 { unsafe { ffi::gtk_icon_view_get_margin(self.as_ref().to_glib_none().0) } } - fn get_markup_column(&self) -> i32 { + fn markup_column(&self) -> i32 { unsafe { ffi::gtk_icon_view_get_markup_column(self.as_ref().to_glib_none().0) } } - fn get_model(&self) -> Option { + fn model(&self) -> Option { unsafe { from_glib_none(ffi::gtk_icon_view_get_model(self.as_ref().to_glib_none().0)) } } @@ -1081,11 +1082,11 @@ impl> IconViewExt for O { } } - fn get_pixbuf_column(&self) -> i32 { + fn pixbuf_column(&self) -> i32 { unsafe { ffi::gtk_icon_view_get_pixbuf_column(self.as_ref().to_glib_none().0) } } - fn get_reorderable(&self) -> bool { + fn is_reorderable(&self) -> bool { unsafe { from_glib(ffi::gtk_icon_view_get_reorderable( self.as_ref().to_glib_none().0, @@ -1093,11 +1094,11 @@ impl> IconViewExt for O { } } - fn get_row_spacing(&self) -> i32 { + fn row_spacing(&self) -> i32 { unsafe { ffi::gtk_icon_view_get_row_spacing(self.as_ref().to_glib_none().0) } } - fn get_selected_items(&self) -> Vec { + fn selected_items(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gtk_icon_view_get_selected_items( self.as_ref().to_glib_none().0, @@ -1105,7 +1106,7 @@ impl> IconViewExt for O { } } - fn get_selection_mode(&self) -> SelectionMode { + fn selection_mode(&self) -> SelectionMode { unsafe { from_glib(ffi::gtk_icon_view_get_selection_mode( self.as_ref().to_glib_none().0, @@ -1113,15 +1114,15 @@ impl> IconViewExt for O { } } - fn get_spacing(&self) -> i32 { + fn spacing(&self) -> i32 { unsafe { ffi::gtk_icon_view_get_spacing(self.as_ref().to_glib_none().0) } } - fn get_text_column(&self) -> i32 { + fn text_column(&self) -> i32 { unsafe { ffi::gtk_icon_view_get_text_column(self.as_ref().to_glib_none().0) } } - fn get_tooltip_column(&self) -> i32 { + fn tooltip_column(&self) -> i32 { unsafe { ffi::gtk_icon_view_get_tooltip_column(self.as_ref().to_glib_none().0) } } @@ -1152,7 +1153,7 @@ impl> IconViewExt for O { } } - fn get_visible_range(&self) -> Option<(TreePath, TreePath)> { + fn visible_range(&self) -> Option<(TreePath, TreePath)> { unsafe { let mut start_path = ptr::null_mut(); let mut end_path = ptr::null_mut(); @@ -1424,7 +1425,7 @@ impl> IconViewExt for O { } } - fn get_property_cell_area(&self) -> Option { + fn cell_area(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/im_context.rs b/gtk/src/auto/im_context.rs index 2630d3ecb262..1b61efd58f52 100644 --- a/gtk/src/auto/im_context.rs +++ b/gtk/src/auto/im_context.rs @@ -40,10 +40,10 @@ pub trait IMContextExt: 'static { fn focus_out(&self); #[doc(alias = "gtk_im_context_get_preedit_string")] - fn get_preedit_string(&self) -> (glib::GString, pango::AttrList, i32); + fn preedit_string(&self) -> (glib::GString, pango::AttrList, i32); #[doc(alias = "gtk_im_context_get_surrounding")] - fn get_surrounding(&self) -> Option<(glib::GString, i32)>; + fn surrounding(&self) -> Option<(glib::GString, i32)>; #[doc(alias = "gtk_im_context_reset")] fn reset(&self); @@ -60,13 +60,17 @@ pub trait IMContextExt: 'static { #[doc(alias = "gtk_im_context_set_use_preedit")] fn set_use_preedit(&self, use_preedit: bool); - fn get_property_input_hints(&self) -> InputHints; + #[doc(alias = "get_property_input_hints")] + fn input_hints(&self) -> InputHints; - fn set_property_input_hints(&self, input_hints: InputHints); + #[doc(alias = "set_property_input_hints")] + fn set_input_hints(&self, input_hints: InputHints); - fn get_property_input_purpose(&self) -> InputPurpose; + #[doc(alias = "get_property_input_purpose")] + fn input_purpose(&self) -> InputPurpose; - fn set_property_input_purpose(&self, input_purpose: InputPurpose); + #[doc(alias = "set_property_input_purpose")] + fn set_input_purpose(&self, input_purpose: InputPurpose); fn connect_commit(&self, f: F) -> SignalHandlerId; @@ -124,7 +128,7 @@ impl> IMContextExt for O { } } - fn get_preedit_string(&self) -> (glib::GString, pango::AttrList, i32) { + fn preedit_string(&self) -> (glib::GString, pango::AttrList, i32) { unsafe { let mut str = ptr::null_mut(); let mut attrs = ptr::null_mut(); @@ -140,7 +144,7 @@ impl> IMContextExt for O { } } - fn get_surrounding(&self) -> Option<(glib::GString, i32)> { + fn surrounding(&self) -> Option<(glib::GString, i32)> { unsafe { let mut text = ptr::null_mut(); let mut cursor_index = mem::MaybeUninit::uninit(); @@ -203,7 +207,7 @@ impl> IMContextExt for O { } } - fn get_property_input_hints(&self) -> InputHints { + fn input_hints(&self) -> InputHints { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -218,7 +222,7 @@ impl> IMContextExt for O { } } - fn set_property_input_hints(&self, input_hints: InputHints) { + fn set_input_hints(&self, input_hints: InputHints) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -228,7 +232,7 @@ impl> IMContextExt for O { } } - fn get_property_input_purpose(&self) -> InputPurpose { + fn input_purpose(&self) -> InputPurpose { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -243,7 +247,7 @@ impl> IMContextExt for O { } } - fn set_property_input_purpose(&self, input_purpose: InputPurpose) { + fn set_input_purpose(&self, input_purpose: InputPurpose) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/im_multicontext.rs b/gtk/src/auto/im_multicontext.rs index f28610895f61..b1f7baed72f2 100644 --- a/gtk/src/auto/im_multicontext.rs +++ b/gtk/src/auto/im_multicontext.rs @@ -72,14 +72,14 @@ pub const NONE_IM_MULTICONTEXT: Option<&IMMulticontext> = None; pub trait IMMulticontextExt: 'static { #[doc(alias = "gtk_im_multicontext_get_context_id")] - fn get_context_id(&self) -> Option; + fn context_id(&self) -> Option; #[doc(alias = "gtk_im_multicontext_set_context_id")] fn set_context_id(&self, context_id: &str); } impl> IMMulticontextExt for O { - fn get_context_id(&self) -> Option { + fn context_id(&self) -> Option { unsafe { from_glib_none(ffi::gtk_im_multicontext_get_context_id( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/image.rs b/gtk/src/auto/image.rs index 0694fcdae60c..e3164e57a900 100644 --- a/gtk/src/auto/image.rs +++ b/gtk/src/auto/image.rs @@ -530,19 +530,19 @@ pub trait ImageExt: 'static { fn clear(&self); #[doc(alias = "gtk_image_get_animation")] - fn get_animation(&self) -> Option; + fn animation(&self) -> Option; #[doc(alias = "gtk_image_get_gicon")] - fn get_gicon(&self) -> (gio::Icon, IconSize); + fn gicon(&self) -> (gio::Icon, IconSize); #[doc(alias = "gtk_image_get_pixbuf")] - fn get_pixbuf(&self) -> Option; + fn pixbuf(&self) -> Option; #[doc(alias = "gtk_image_get_pixel_size")] - fn get_pixel_size(&self) -> i32; + fn pixel_size(&self) -> i32; #[doc(alias = "gtk_image_get_storage_type")] - fn get_storage_type(&self) -> ImageType; + fn storage_type(&self) -> ImageType; #[doc(alias = "gtk_image_set_from_animation")] fn set_from_animation>(&self, animation: &P); @@ -568,40 +568,56 @@ pub trait ImageExt: 'static { #[doc(alias = "gtk_image_set_pixel_size")] fn set_pixel_size(&self, pixel_size: i32); - fn get_property_file(&self) -> Option; + #[doc(alias = "get_property_file")] + fn file(&self) -> Option; - fn set_property_file(&self, file: Option<&str>); + #[doc(alias = "set_property_file")] + fn set_file(&self, file: Option<&str>); - fn set_property_gicon>(&self, gicon: Option<&P>); + #[doc(alias = "set_property_gicon")] + fn set_gicon>(&self, gicon: Option<&P>); - fn get_property_icon_name(&self) -> Option; + #[doc(alias = "get_property_icon_name")] + fn icon_name(&self) -> Option; - fn set_property_icon_name(&self, icon_name: Option<&str>); + #[doc(alias = "set_property_icon_name")] + fn set_icon_name(&self, icon_name: Option<&str>); - fn get_property_icon_size(&self) -> i32; + #[doc(alias = "get_property_icon_size")] + fn icon_size(&self) -> i32; - fn set_property_icon_size(&self, icon_size: i32); + #[doc(alias = "set_property_icon_size")] + fn set_icon_size(&self, icon_size: i32); - fn set_property_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>); + #[doc(alias = "set_property_pixbuf")] + fn set_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>); - fn get_property_pixbuf_animation(&self) -> Option; + #[doc(alias = "get_property_pixbuf_animation")] + fn pixbuf_animation(&self) -> Option; - fn set_property_pixbuf_animation>( + #[doc(alias = "set_property_pixbuf_animation")] + fn set_pixbuf_animation>( &self, pixbuf_animation: Option<&P>, ); - fn get_property_resource(&self) -> Option; + #[doc(alias = "get_property_resource")] + fn resource(&self) -> Option; - fn set_property_resource(&self, resource: Option<&str>); + #[doc(alias = "set_property_resource")] + fn set_resource(&self, resource: Option<&str>); - fn get_property_surface(&self) -> Option; + #[doc(alias = "get_property_surface")] + fn surface(&self) -> Option; - fn set_property_surface(&self, surface: Option<&cairo::Surface>); + #[doc(alias = "set_property_surface")] + fn set_surface(&self, surface: Option<&cairo::Surface>); - fn get_property_use_fallback(&self) -> bool; + #[doc(alias = "get_property_use_fallback")] + fn uses_fallback(&self) -> bool; - fn set_property_use_fallback(&self, use_fallback: bool); + #[doc(alias = "set_property_use_fallback")] + fn set_use_fallback(&self, use_fallback: bool); fn connect_property_file_notify(&self, f: F) -> SignalHandlerId; @@ -638,11 +654,11 @@ impl> ImageExt for O { } } - fn get_animation(&self) -> Option { + fn animation(&self) -> Option { unsafe { from_glib_none(ffi::gtk_image_get_animation(self.as_ref().to_glib_none().0)) } } - fn get_gicon(&self) -> (gio::Icon, IconSize) { + fn gicon(&self) -> (gio::Icon, IconSize) { unsafe { let mut gicon = ptr::null_mut(); let mut size = mem::MaybeUninit::uninit(); @@ -656,15 +672,15 @@ impl> ImageExt for O { } } - fn get_pixbuf(&self) -> Option { + fn pixbuf(&self) -> Option { unsafe { from_glib_none(ffi::gtk_image_get_pixbuf(self.as_ref().to_glib_none().0)) } } - fn get_pixel_size(&self) -> i32 { + fn pixel_size(&self) -> i32 { unsafe { ffi::gtk_image_get_pixel_size(self.as_ref().to_glib_none().0) } } - fn get_storage_type(&self) -> ImageType { + fn storage_type(&self) -> ImageType { unsafe { from_glib(ffi::gtk_image_get_storage_type( self.as_ref().to_glib_none().0, @@ -740,7 +756,7 @@ impl> ImageExt for O { } } - fn get_property_file(&self) -> Option { + fn file(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -754,7 +770,7 @@ impl> ImageExt for O { } } - fn set_property_file(&self, file: Option<&str>) { + fn set_file(&self, file: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -764,7 +780,7 @@ impl> ImageExt for O { } } - fn set_property_gicon>(&self, gicon: Option<&P>) { + fn set_gicon>(&self, gicon: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -774,7 +790,7 @@ impl> ImageExt for O { } } - fn get_property_icon_name(&self) -> Option { + fn icon_name(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -788,7 +804,7 @@ impl> ImageExt for O { } } - fn set_property_icon_name(&self, icon_name: Option<&str>) { + fn set_icon_name(&self, icon_name: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -798,7 +814,7 @@ impl> ImageExt for O { } } - fn get_property_icon_size(&self) -> i32 { + fn icon_size(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -813,7 +829,7 @@ impl> ImageExt for O { } } - fn set_property_icon_size(&self, icon_size: i32) { + fn set_icon_size(&self, icon_size: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -823,7 +839,7 @@ impl> ImageExt for O { } } - fn set_property_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>) { + fn set_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -833,7 +849,7 @@ impl> ImageExt for O { } } - fn get_property_pixbuf_animation(&self) -> Option { + fn pixbuf_animation(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -848,7 +864,7 @@ impl> ImageExt for O { } } - fn set_property_pixbuf_animation>( + fn set_pixbuf_animation>( &self, pixbuf_animation: Option<&P>, ) { @@ -861,7 +877,7 @@ impl> ImageExt for O { } } - fn get_property_resource(&self) -> Option { + fn resource(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -875,7 +891,7 @@ impl> ImageExt for O { } } - fn set_property_resource(&self, resource: Option<&str>) { + fn set_resource(&self, resource: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -885,7 +901,7 @@ impl> ImageExt for O { } } - fn get_property_surface(&self) -> Option { + fn surface(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -899,7 +915,7 @@ impl> ImageExt for O { } } - fn set_property_surface(&self, surface: Option<&cairo::Surface>) { + fn set_surface(&self, surface: Option<&cairo::Surface>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -909,7 +925,7 @@ impl> ImageExt for O { } } - fn get_property_use_fallback(&self) -> bool { + fn uses_fallback(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -924,7 +940,7 @@ impl> ImageExt for O { } } - fn set_property_use_fallback(&self, use_fallback: bool) { + fn set_use_fallback(&self, use_fallback: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/info_bar.rs b/gtk/src/auto/info_bar.rs index 81ae13326de6..4fe60a4e0573 100644 --- a/gtk/src/auto/info_bar.rs +++ b/gtk/src/auto/info_bar.rs @@ -470,21 +470,21 @@ pub trait InfoBarExt: 'static { //fn add_buttons(&self, first_button_text: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs); #[doc(alias = "gtk_info_bar_get_action_area")] - fn get_action_area(&self) -> Option; + fn action_area(&self) -> Option; #[doc(alias = "gtk_info_bar_get_content_area")] - fn get_content_area(&self) -> Box; + fn content_area(&self) -> Box; #[doc(alias = "gtk_info_bar_get_message_type")] - fn get_message_type(&self) -> MessageType; + fn message_type(&self) -> MessageType; #[cfg(any(feature = "v3_22_29", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22_29")))] #[doc(alias = "gtk_info_bar_get_revealed")] - fn get_revealed(&self) -> bool; + fn is_revealed(&self) -> bool; #[doc(alias = "gtk_info_bar_get_show_close_button")] - fn get_show_close_button(&self) -> bool; + fn shows_close_button(&self) -> bool; #[doc(alias = "gtk_info_bar_response")] fn response(&self, response_id: ResponseType); @@ -550,7 +550,7 @@ impl> InfoBarExt for O { // unsafe { TODO: call ffi:gtk_info_bar_add_buttons() } //} - fn get_action_area(&self) -> Option { + fn action_area(&self) -> Option { unsafe { from_glib_none(ffi::gtk_info_bar_get_action_area( self.as_ref().to_glib_none().0, @@ -558,7 +558,7 @@ impl> InfoBarExt for O { } } - fn get_content_area(&self) -> Box { + fn content_area(&self) -> Box { unsafe { from_glib_none(ffi::gtk_info_bar_get_content_area( self.as_ref().to_glib_none().0, @@ -566,7 +566,7 @@ impl> InfoBarExt for O { } } - fn get_message_type(&self) -> MessageType { + fn message_type(&self) -> MessageType { unsafe { from_glib(ffi::gtk_info_bar_get_message_type( self.as_ref().to_glib_none().0, @@ -576,7 +576,7 @@ impl> InfoBarExt for O { #[cfg(any(feature = "v3_22_29", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22_29")))] - fn get_revealed(&self) -> bool { + fn is_revealed(&self) -> bool { unsafe { from_glib(ffi::gtk_info_bar_get_revealed( self.as_ref().to_glib_none().0, @@ -584,7 +584,7 @@ impl> InfoBarExt for O { } } - fn get_show_close_button(&self) -> bool { + fn shows_close_button(&self) -> bool { unsafe { from_glib(ffi::gtk_info_bar_get_show_close_button( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/invisible.rs b/gtk/src/auto/invisible.rs index a17a06202c0c..50ca97b78121 100644 --- a/gtk/src/auto/invisible.rs +++ b/gtk/src/auto/invisible.rs @@ -33,7 +33,7 @@ impl Invisible { } #[doc(alias = "gtk_invisible_new_for_screen")] - pub fn new_for_screen(screen: &gdk::Screen) -> Invisible { + pub fn for_screen(screen: &gdk::Screen) -> Invisible { assert_initialized_main_thread!(); unsafe { Widget::from_glib_none(ffi::gtk_invisible_new_for_screen(screen.to_glib_none().0)) diff --git a/gtk/src/auto/label.rs b/gtk/src/auto/label.rs index 20a31bb95905..4e40afce46b9 100644 --- a/gtk/src/auto/label.rs +++ b/gtk/src/auto/label.rs @@ -542,80 +542,80 @@ pub const NONE_LABEL: Option<&Label> = None; pub trait LabelExt: 'static { #[doc(alias = "gtk_label_get_angle")] - fn get_angle(&self) -> f64; + fn angle(&self) -> f64; #[doc(alias = "gtk_label_get_attributes")] - fn get_attributes(&self) -> Option; + fn attributes(&self) -> Option; #[doc(alias = "gtk_label_get_current_uri")] - fn get_current_uri(&self) -> Option; + fn current_uri(&self) -> Option; #[doc(alias = "gtk_label_get_ellipsize")] - fn get_ellipsize(&self) -> pango::EllipsizeMode; + fn ellipsize(&self) -> pango::EllipsizeMode; #[doc(alias = "gtk_label_get_justify")] - fn get_justify(&self) -> Justification; + fn justify(&self) -> Justification; #[doc(alias = "gtk_label_get_label")] - fn get_label(&self) -> glib::GString; + fn label(&self) -> glib::GString; #[doc(alias = "gtk_label_get_layout")] - fn get_layout(&self) -> Option; + fn layout(&self) -> Option; #[doc(alias = "gtk_label_get_layout_offsets")] - fn get_layout_offsets(&self) -> (i32, i32); + fn layout_offsets(&self) -> (i32, i32); #[doc(alias = "gtk_label_get_line_wrap")] - fn get_line_wrap(&self) -> bool; + fn is_line_wrap(&self) -> bool; #[doc(alias = "gtk_label_get_line_wrap_mode")] - fn get_line_wrap_mode(&self) -> pango::WrapMode; + fn line_wrap_mode(&self) -> pango::WrapMode; #[doc(alias = "gtk_label_get_lines")] - fn get_lines(&self) -> i32; + fn lines(&self) -> i32; #[doc(alias = "gtk_label_get_max_width_chars")] - fn get_max_width_chars(&self) -> i32; + fn max_width_chars(&self) -> i32; #[doc(alias = "gtk_label_get_mnemonic_keyval")] - fn get_mnemonic_keyval(&self) -> u32; + fn mnemonic_keyval(&self) -> u32; #[doc(alias = "gtk_label_get_mnemonic_widget")] - fn get_mnemonic_widget(&self) -> Option; + fn mnemonic_widget(&self) -> Option; #[doc(alias = "gtk_label_get_selectable")] - fn get_selectable(&self) -> bool; + fn is_selectable(&self) -> bool; #[doc(alias = "gtk_label_get_selection_bounds")] - fn get_selection_bounds(&self) -> Option<(i32, i32)>; + fn selection_bounds(&self) -> Option<(i32, i32)>; #[doc(alias = "gtk_label_get_single_line_mode")] - fn get_single_line_mode(&self) -> bool; + fn is_single_line_mode(&self) -> bool; #[doc(alias = "gtk_label_get_text")] - fn get_text(&self) -> glib::GString; + fn text(&self) -> glib::GString; #[doc(alias = "gtk_label_get_track_visited_links")] - fn get_track_visited_links(&self) -> bool; + fn tracks_visited_links(&self) -> bool; #[doc(alias = "gtk_label_get_use_markup")] - fn get_use_markup(&self) -> bool; + fn uses_markup(&self) -> bool; #[doc(alias = "gtk_label_get_use_underline")] - fn get_use_underline(&self) -> bool; + fn uses_underline(&self) -> bool; #[doc(alias = "gtk_label_get_width_chars")] - fn get_width_chars(&self) -> i32; + fn width_chars(&self) -> i32; #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] #[doc(alias = "gtk_label_get_xalign")] - fn get_xalign(&self) -> f32; + fn xalign(&self) -> f32; #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] #[doc(alias = "gtk_label_get_yalign")] - fn get_yalign(&self) -> f32; + fn yalign(&self) -> f32; #[doc(alias = "gtk_label_select_region")] fn select_region(&self, start_offset: i32, end_offset: i32); @@ -693,17 +693,23 @@ pub trait LabelExt: 'static { #[doc(alias = "gtk_label_set_yalign")] fn set_yalign(&self, yalign: f32); - fn get_property_cursor_position(&self) -> i32; + #[doc(alias = "get_property_cursor_position")] + fn cursor_position(&self) -> i32; - fn get_property_selection_bound(&self) -> i32; + #[doc(alias = "get_property_selection_bound")] + fn selection_bound(&self) -> i32; - fn get_property_wrap(&self) -> bool; + #[doc(alias = "get_property_wrap")] + fn wraps(&self) -> bool; - fn set_property_wrap(&self, wrap: bool); + #[doc(alias = "set_property_wrap")] + fn set_wrap(&self, wrap: bool); - fn get_property_wrap_mode(&self) -> pango::WrapMode; + #[doc(alias = "get_property_wrap_mode")] + fn wrap_mode(&self) -> pango::WrapMode; - fn set_property_wrap_mode(&self, wrap_mode: pango::WrapMode); + #[doc(alias = "set_property_wrap_mode")] + fn set_wrap_mode(&self, wrap_mode: pango::WrapMode); fn connect_activate_current_link(&self, f: F) -> SignalHandlerId; @@ -801,11 +807,11 @@ pub trait LabelExt: 'static { } impl> LabelExt for O { - fn get_angle(&self) -> f64 { + fn angle(&self) -> f64 { unsafe { ffi::gtk_label_get_angle(self.as_ref().to_glib_none().0) } } - fn get_attributes(&self) -> Option { + fn attributes(&self) -> Option { unsafe { from_glib_none(ffi::gtk_label_get_attributes( self.as_ref().to_glib_none().0, @@ -813,7 +819,7 @@ impl> LabelExt for O { } } - fn get_current_uri(&self) -> Option { + fn current_uri(&self) -> Option { unsafe { from_glib_none(ffi::gtk_label_get_current_uri( self.as_ref().to_glib_none().0, @@ -821,23 +827,23 @@ impl> LabelExt for O { } } - fn get_ellipsize(&self) -> pango::EllipsizeMode { + fn ellipsize(&self) -> pango::EllipsizeMode { unsafe { from_glib(ffi::gtk_label_get_ellipsize(self.as_ref().to_glib_none().0)) } } - fn get_justify(&self) -> Justification { + fn justify(&self) -> Justification { unsafe { from_glib(ffi::gtk_label_get_justify(self.as_ref().to_glib_none().0)) } } - fn get_label(&self) -> glib::GString { + fn label(&self) -> glib::GString { unsafe { from_glib_none(ffi::gtk_label_get_label(self.as_ref().to_glib_none().0)) } } - fn get_layout(&self) -> Option { + fn layout(&self) -> Option { unsafe { from_glib_none(ffi::gtk_label_get_layout(self.as_ref().to_glib_none().0)) } } - fn get_layout_offsets(&self) -> (i32, i32) { + fn layout_offsets(&self) -> (i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); @@ -852,11 +858,11 @@ impl> LabelExt for O { } } - fn get_line_wrap(&self) -> bool { + fn is_line_wrap(&self) -> bool { unsafe { from_glib(ffi::gtk_label_get_line_wrap(self.as_ref().to_glib_none().0)) } } - fn get_line_wrap_mode(&self) -> pango::WrapMode { + fn line_wrap_mode(&self) -> pango::WrapMode { unsafe { from_glib(ffi::gtk_label_get_line_wrap_mode( self.as_ref().to_glib_none().0, @@ -864,19 +870,19 @@ impl> LabelExt for O { } } - fn get_lines(&self) -> i32 { + fn lines(&self) -> i32 { unsafe { ffi::gtk_label_get_lines(self.as_ref().to_glib_none().0) } } - fn get_max_width_chars(&self) -> i32 { + fn max_width_chars(&self) -> i32 { unsafe { ffi::gtk_label_get_max_width_chars(self.as_ref().to_glib_none().0) } } - fn get_mnemonic_keyval(&self) -> u32 { + fn mnemonic_keyval(&self) -> u32 { unsafe { ffi::gtk_label_get_mnemonic_keyval(self.as_ref().to_glib_none().0) } } - fn get_mnemonic_widget(&self) -> Option { + fn mnemonic_widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_label_get_mnemonic_widget( self.as_ref().to_glib_none().0, @@ -884,7 +890,7 @@ impl> LabelExt for O { } } - fn get_selectable(&self) -> bool { + fn is_selectable(&self) -> bool { unsafe { from_glib(ffi::gtk_label_get_selectable( self.as_ref().to_glib_none().0, @@ -892,7 +898,7 @@ impl> LabelExt for O { } } - fn get_selection_bounds(&self) -> Option<(i32, i32)> { + fn selection_bounds(&self) -> Option<(i32, i32)> { unsafe { let mut start = mem::MaybeUninit::uninit(); let mut end = mem::MaybeUninit::uninit(); @@ -911,7 +917,7 @@ impl> LabelExt for O { } } - fn get_single_line_mode(&self) -> bool { + fn is_single_line_mode(&self) -> bool { unsafe { from_glib(ffi::gtk_label_get_single_line_mode( self.as_ref().to_glib_none().0, @@ -919,11 +925,11 @@ impl> LabelExt for O { } } - fn get_text(&self) -> glib::GString { + fn text(&self) -> glib::GString { unsafe { from_glib_none(ffi::gtk_label_get_text(self.as_ref().to_glib_none().0)) } } - fn get_track_visited_links(&self) -> bool { + fn tracks_visited_links(&self) -> bool { unsafe { from_glib(ffi::gtk_label_get_track_visited_links( self.as_ref().to_glib_none().0, @@ -931,7 +937,7 @@ impl> LabelExt for O { } } - fn get_use_markup(&self) -> bool { + fn uses_markup(&self) -> bool { unsafe { from_glib(ffi::gtk_label_get_use_markup( self.as_ref().to_glib_none().0, @@ -939,7 +945,7 @@ impl> LabelExt for O { } } - fn get_use_underline(&self) -> bool { + fn uses_underline(&self) -> bool { unsafe { from_glib(ffi::gtk_label_get_use_underline( self.as_ref().to_glib_none().0, @@ -947,19 +953,19 @@ impl> LabelExt for O { } } - fn get_width_chars(&self) -> i32 { + fn width_chars(&self) -> i32 { unsafe { ffi::gtk_label_get_width_chars(self.as_ref().to_glib_none().0) } } #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - fn get_xalign(&self) -> f32 { + fn xalign(&self) -> f32 { unsafe { ffi::gtk_label_get_xalign(self.as_ref().to_glib_none().0) } } #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - fn get_yalign(&self) -> f32 { + fn yalign(&self) -> f32 { unsafe { ffi::gtk_label_get_yalign(self.as_ref().to_glib_none().0) } } @@ -1126,7 +1132,7 @@ impl> LabelExt for O { } } - fn get_property_cursor_position(&self) -> i32 { + fn cursor_position(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1141,7 +1147,7 @@ impl> LabelExt for O { } } - fn get_property_selection_bound(&self) -> i32 { + fn selection_bound(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1156,7 +1162,7 @@ impl> LabelExt for O { } } - fn get_property_wrap(&self) -> bool { + fn wraps(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1171,7 +1177,7 @@ impl> LabelExt for O { } } - fn set_property_wrap(&self, wrap: bool) { + fn set_wrap(&self, wrap: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1181,7 +1187,7 @@ impl> LabelExt for O { } } - fn get_property_wrap_mode(&self) -> pango::WrapMode { + fn wrap_mode(&self) -> pango::WrapMode { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1196,7 +1202,7 @@ impl> LabelExt for O { } } - fn set_property_wrap_mode(&self, wrap_mode: pango::WrapMode) { + fn set_wrap_mode(&self, wrap_mode: pango::WrapMode) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/layout.rs b/gtk/src/auto/layout.rs index af693452872d..fcbde7631898 100644 --- a/gtk/src/auto/layout.rs +++ b/gtk/src/auto/layout.rs @@ -441,10 +441,10 @@ pub const NONE_LAYOUT: Option<&Layout> = None; pub trait LayoutExt: 'static { #[doc(alias = "gtk_layout_get_bin_window")] - fn get_bin_window(&self) -> Option; + fn bin_window(&self) -> Option; #[doc(alias = "gtk_layout_get_size")] - fn get_size(&self) -> (u32, u32); + fn size(&self) -> (u32, u32); #[doc(alias = "gtk_layout_move")] fn move_>(&self, child_widget: &P, x: i32, y: i32); @@ -455,13 +455,17 @@ pub trait LayoutExt: 'static { #[doc(alias = "gtk_layout_set_size")] fn set_size(&self, width: u32, height: u32); - fn get_property_height(&self) -> u32; + #[doc(alias = "get_property_height")] + fn height(&self) -> u32; - fn set_property_height(&self, height: u32); + #[doc(alias = "set_property_height")] + fn set_height(&self, height: u32); - fn get_property_width(&self) -> u32; + #[doc(alias = "get_property_width")] + fn width(&self) -> u32; - fn set_property_width(&self, width: u32); + #[doc(alias = "set_property_width")] + fn set_width(&self, width: u32); fn get_child_x>(&self, item: &T) -> i32; @@ -477,7 +481,7 @@ pub trait LayoutExt: 'static { } impl> LayoutExt for O { - fn get_bin_window(&self) -> Option { + fn bin_window(&self) -> Option { unsafe { from_glib_none(ffi::gtk_layout_get_bin_window( self.as_ref().to_glib_none().0, @@ -485,7 +489,7 @@ impl> LayoutExt for O { } } - fn get_size(&self) -> (u32, u32) { + fn size(&self) -> (u32, u32) { unsafe { let mut width = mem::MaybeUninit::uninit(); let mut height = mem::MaybeUninit::uninit(); @@ -528,7 +532,7 @@ impl> LayoutExt for O { } } - fn get_property_height(&self) -> u32 { + fn height(&self) -> u32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -543,7 +547,7 @@ impl> LayoutExt for O { } } - fn set_property_height(&self, height: u32) { + fn set_height(&self, height: u32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -553,7 +557,7 @@ impl> LayoutExt for O { } } - fn get_property_width(&self) -> u32 { + fn width(&self) -> u32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -568,7 +572,7 @@ impl> LayoutExt for O { } } - fn set_property_width(&self, width: u32) { + fn set_width(&self, width: u32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/level_bar.rs b/gtk/src/auto/level_bar.rs index 795c8636f54b..7f26b9c61e39 100644 --- a/gtk/src/auto/level_bar.rs +++ b/gtk/src/auto/level_bar.rs @@ -37,7 +37,7 @@ impl LevelBar { } #[doc(alias = "gtk_level_bar_new_for_interval")] - pub fn new_for_interval(min_value: f64, max_value: f64) -> LevelBar { + pub fn for_interval(min_value: f64, max_value: f64) -> LevelBar { assert_initialized_main_thread!(); unsafe { Widget::from_glib_none(ffi::gtk_level_bar_new_for_interval(min_value, max_value)) @@ -422,22 +422,22 @@ pub trait LevelBarExt: 'static { fn add_offset_value(&self, name: &str, value: f64); #[doc(alias = "gtk_level_bar_get_inverted")] - fn get_inverted(&self) -> bool; + fn is_inverted(&self) -> bool; #[doc(alias = "gtk_level_bar_get_max_value")] - fn get_max_value(&self) -> f64; + fn max_value(&self) -> f64; #[doc(alias = "gtk_level_bar_get_min_value")] - fn get_min_value(&self) -> f64; + fn min_value(&self) -> f64; #[doc(alias = "gtk_level_bar_get_mode")] - fn get_mode(&self) -> LevelBarMode; + fn mode(&self) -> LevelBarMode; #[doc(alias = "gtk_level_bar_get_offset_value")] fn get_offset_value(&self, name: Option<&str>) -> Option; #[doc(alias = "gtk_level_bar_get_value")] - fn get_value(&self) -> f64; + fn value(&self) -> f64; #[doc(alias = "gtk_level_bar_remove_offset_value")] fn remove_offset_value(&self, name: Option<&str>); @@ -485,7 +485,7 @@ impl> LevelBarExt for O { } } - fn get_inverted(&self) -> bool { + fn is_inverted(&self) -> bool { unsafe { from_glib(ffi::gtk_level_bar_get_inverted( self.as_ref().to_glib_none().0, @@ -493,15 +493,15 @@ impl> LevelBarExt for O { } } - fn get_max_value(&self) -> f64 { + fn max_value(&self) -> f64 { unsafe { ffi::gtk_level_bar_get_max_value(self.as_ref().to_glib_none().0) } } - fn get_min_value(&self) -> f64 { + fn min_value(&self) -> f64 { unsafe { ffi::gtk_level_bar_get_min_value(self.as_ref().to_glib_none().0) } } - fn get_mode(&self) -> LevelBarMode { + fn mode(&self) -> LevelBarMode { unsafe { from_glib(ffi::gtk_level_bar_get_mode(self.as_ref().to_glib_none().0)) } } @@ -522,7 +522,7 @@ impl> LevelBarExt for O { } } - fn get_value(&self) -> f64 { + fn value(&self) -> f64 { unsafe { ffi::gtk_level_bar_get_value(self.as_ref().to_glib_none().0) } } diff --git a/gtk/src/auto/link_button.rs b/gtk/src/auto/link_button.rs index c2f3f49c8ce7..0ed0fd5dd14a 100644 --- a/gtk/src/auto/link_button.rs +++ b/gtk/src/auto/link_button.rs @@ -483,10 +483,10 @@ pub const NONE_LINK_BUTTON: Option<&LinkButton> = None; pub trait LinkButtonExt: 'static { #[doc(alias = "gtk_link_button_get_uri")] - fn get_uri(&self) -> Option; + fn uri(&self) -> Option; #[doc(alias = "gtk_link_button_get_visited")] - fn get_visited(&self) -> bool; + fn is_visited(&self) -> bool; #[doc(alias = "gtk_link_button_set_uri")] fn set_uri(&self, uri: &str); @@ -505,11 +505,11 @@ pub trait LinkButtonExt: 'static { } impl> LinkButtonExt for O { - fn get_uri(&self) -> Option { + fn uri(&self) -> Option { unsafe { from_glib_none(ffi::gtk_link_button_get_uri(self.as_ref().to_glib_none().0)) } } - fn get_visited(&self) -> bool { + fn is_visited(&self) -> bool { unsafe { from_glib(ffi::gtk_link_button_get_visited( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/list_box.rs b/gtk/src/auto/list_box.rs index d31bea639bba..ad5720de43e2 100644 --- a/gtk/src/auto/list_box.rs +++ b/gtk/src/auto/list_box.rs @@ -418,10 +418,10 @@ pub trait ListBoxExt: 'static { fn drag_unhighlight_row(&self); #[doc(alias = "gtk_list_box_get_activate_on_single_click")] - fn get_activate_on_single_click(&self) -> bool; + fn activates_on_single_click(&self) -> bool; #[doc(alias = "gtk_list_box_get_adjustment")] - fn get_adjustment(&self) -> Option; + fn adjustment(&self) -> Option; #[doc(alias = "gtk_list_box_get_row_at_index")] fn get_row_at_index(&self, index_: i32) -> Option; @@ -430,13 +430,13 @@ pub trait ListBoxExt: 'static { fn get_row_at_y(&self, y: i32) -> Option; #[doc(alias = "gtk_list_box_get_selected_row")] - fn get_selected_row(&self) -> Option; + fn selected_row(&self) -> Option; #[doc(alias = "gtk_list_box_get_selected_rows")] - fn get_selected_rows(&self) -> Vec; + fn selected_rows(&self) -> Vec; #[doc(alias = "gtk_list_box_get_selection_mode")] - fn get_selection_mode(&self) -> SelectionMode; + fn selection_mode(&self) -> SelectionMode; #[doc(alias = "gtk_list_box_insert")] fn insert>(&self, child: &P, position: i32); @@ -596,7 +596,7 @@ impl> ListBoxExt for O { } } - fn get_activate_on_single_click(&self) -> bool { + fn activates_on_single_click(&self) -> bool { unsafe { from_glib(ffi::gtk_list_box_get_activate_on_single_click( self.as_ref().to_glib_none().0, @@ -604,7 +604,7 @@ impl> ListBoxExt for O { } } - fn get_adjustment(&self) -> Option { + fn adjustment(&self) -> Option { unsafe { from_glib_none(ffi::gtk_list_box_get_adjustment( self.as_ref().to_glib_none().0, @@ -630,7 +630,7 @@ impl> ListBoxExt for O { } } - fn get_selected_row(&self) -> Option { + fn selected_row(&self) -> Option { unsafe { from_glib_none(ffi::gtk_list_box_get_selected_row( self.as_ref().to_glib_none().0, @@ -638,7 +638,7 @@ impl> ListBoxExt for O { } } - fn get_selected_rows(&self) -> Vec { + fn selected_rows(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_container(ffi::gtk_list_box_get_selected_rows( self.as_ref().to_glib_none().0, @@ -646,7 +646,7 @@ impl> ListBoxExt for O { } } - fn get_selection_mode(&self) -> SelectionMode { + fn selection_mode(&self) -> SelectionMode { unsafe { from_glib(ffi::gtk_list_box_get_selection_mode( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/list_box_row.rs b/gtk/src/auto/list_box_row.rs index bab635387afc..95ed6de1d644 100644 --- a/gtk/src/auto/list_box_row.rs +++ b/gtk/src/auto/list_box_row.rs @@ -422,16 +422,16 @@ pub trait ListBoxRowExt: 'static { fn changed(&self); #[doc(alias = "gtk_list_box_row_get_activatable")] - fn get_activatable(&self) -> bool; + fn is_activatable(&self) -> bool; #[doc(alias = "gtk_list_box_row_get_header")] - fn get_header(&self) -> Option; + fn header(&self) -> Option; #[doc(alias = "gtk_list_box_row_get_index")] - fn get_index(&self) -> i32; + fn index(&self) -> i32; #[doc(alias = "gtk_list_box_row_get_selectable")] - fn get_selectable(&self) -> bool; + fn is_selectable(&self) -> bool; #[doc(alias = "gtk_list_box_row_is_selected")] fn is_selected(&self) -> bool; @@ -461,7 +461,7 @@ impl> ListBoxRowExt for O { } } - fn get_activatable(&self) -> bool { + fn is_activatable(&self) -> bool { unsafe { from_glib(ffi::gtk_list_box_row_get_activatable( self.as_ref().to_glib_none().0, @@ -469,7 +469,7 @@ impl> ListBoxRowExt for O { } } - fn get_header(&self) -> Option { + fn header(&self) -> Option { unsafe { from_glib_none(ffi::gtk_list_box_row_get_header( self.as_ref().to_glib_none().0, @@ -477,11 +477,11 @@ impl> ListBoxRowExt for O { } } - fn get_index(&self) -> i32 { + fn index(&self) -> i32 { unsafe { ffi::gtk_list_box_row_get_index(self.as_ref().to_glib_none().0) } } - fn get_selectable(&self) -> bool { + fn is_selectable(&self) -> bool { unsafe { from_glib(ffi::gtk_list_box_row_get_selectable( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/lock_button.rs b/gtk/src/auto/lock_button.rs index 7f47f653b298..97b33664134b 100644 --- a/gtk/src/auto/lock_button.rs +++ b/gtk/src/auto/lock_button.rs @@ -510,30 +510,40 @@ pub const NONE_LOCK_BUTTON: Option<&LockButton> = None; pub trait LockButtonExt: 'static { #[doc(alias = "gtk_lock_button_get_permission")] - fn get_permission(&self) -> Option; + fn permission(&self) -> Option; #[doc(alias = "gtk_lock_button_set_permission")] fn set_permission>(&self, permission: Option<&P>); - fn get_property_text_lock(&self) -> Option; + #[doc(alias = "get_property_text_lock")] + fn text_lock(&self) -> Option; - fn set_property_text_lock(&self, text_lock: Option<&str>); + #[doc(alias = "set_property_text_lock")] + fn set_text_lock(&self, text_lock: Option<&str>); - fn get_property_text_unlock(&self) -> Option; + #[doc(alias = "get_property_text_unlock")] + fn text_unlock(&self) -> Option; - fn set_property_text_unlock(&self, text_unlock: Option<&str>); + #[doc(alias = "set_property_text_unlock")] + fn set_text_unlock(&self, text_unlock: Option<&str>); - fn get_property_tooltip_lock(&self) -> Option; + #[doc(alias = "get_property_tooltip_lock")] + fn tooltip_lock(&self) -> Option; - fn set_property_tooltip_lock(&self, tooltip_lock: Option<&str>); + #[doc(alias = "set_property_tooltip_lock")] + fn set_tooltip_lock(&self, tooltip_lock: Option<&str>); - fn get_property_tooltip_not_authorized(&self) -> Option; + #[doc(alias = "get_property_tooltip_not_authorized")] + fn tooltip_not_authorized(&self) -> Option; - fn set_property_tooltip_not_authorized(&self, tooltip_not_authorized: Option<&str>); + #[doc(alias = "set_property_tooltip_not_authorized")] + fn set_tooltip_not_authorized(&self, tooltip_not_authorized: Option<&str>); - fn get_property_tooltip_unlock(&self) -> Option; + #[doc(alias = "get_property_tooltip_unlock")] + fn tooltip_unlock(&self) -> Option; - fn set_property_tooltip_unlock(&self, tooltip_unlock: Option<&str>); + #[doc(alias = "set_property_tooltip_unlock")] + fn set_tooltip_unlock(&self, tooltip_unlock: Option<&str>); fn connect_property_permission_notify(&self, f: F) -> SignalHandlerId; @@ -556,7 +566,7 @@ pub trait LockButtonExt: 'static { } impl> LockButtonExt for O { - fn get_permission(&self) -> Option { + fn permission(&self) -> Option { unsafe { from_glib_none(ffi::gtk_lock_button_get_permission( self.as_ref().to_glib_none().0, @@ -573,7 +583,7 @@ impl> LockButtonExt for O { } } - fn get_property_text_lock(&self) -> Option { + fn text_lock(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -587,7 +597,7 @@ impl> LockButtonExt for O { } } - fn set_property_text_lock(&self, text_lock: Option<&str>) { + fn set_text_lock(&self, text_lock: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -597,7 +607,7 @@ impl> LockButtonExt for O { } } - fn get_property_text_unlock(&self) -> Option { + fn text_unlock(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -611,7 +621,7 @@ impl> LockButtonExt for O { } } - fn set_property_text_unlock(&self, text_unlock: Option<&str>) { + fn set_text_unlock(&self, text_unlock: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -621,7 +631,7 @@ impl> LockButtonExt for O { } } - fn get_property_tooltip_lock(&self) -> Option { + fn tooltip_lock(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -635,7 +645,7 @@ impl> LockButtonExt for O { } } - fn set_property_tooltip_lock(&self, tooltip_lock: Option<&str>) { + fn set_tooltip_lock(&self, tooltip_lock: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -645,7 +655,7 @@ impl> LockButtonExt for O { } } - fn get_property_tooltip_not_authorized(&self) -> Option { + fn tooltip_not_authorized(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -659,7 +669,7 @@ impl> LockButtonExt for O { } } - fn set_property_tooltip_not_authorized(&self, tooltip_not_authorized: Option<&str>) { + fn set_tooltip_not_authorized(&self, tooltip_not_authorized: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -669,7 +679,7 @@ impl> LockButtonExt for O { } } - fn get_property_tooltip_unlock(&self) -> Option { + fn tooltip_unlock(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -683,7 +693,7 @@ impl> LockButtonExt for O { } } - fn set_property_tooltip_unlock(&self, tooltip_unlock: Option<&str>) { + fn set_tooltip_unlock(&self, tooltip_unlock: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/menu.rs b/gtk/src/auto/menu.rs index 0b767866be99..178a5aa0e5e0 100644 --- a/gtk/src/auto/menu.rs +++ b/gtk/src/auto/menu.rs @@ -541,22 +541,22 @@ pub trait GtkMenuExt: 'static { fn detach(&self); #[doc(alias = "gtk_menu_get_accel_group")] - fn get_accel_group(&self) -> Option; + fn accel_group(&self) -> Option; #[doc(alias = "gtk_menu_get_accel_path")] - fn get_accel_path(&self) -> Option; + fn accel_path(&self) -> Option; #[doc(alias = "gtk_menu_get_active")] - fn get_active(&self) -> Option; + fn active(&self) -> Option; #[doc(alias = "gtk_menu_get_attach_widget")] - fn get_attach_widget(&self) -> Option; + fn attach_widget(&self) -> Option; #[doc(alias = "gtk_menu_get_monitor")] - fn get_monitor(&self) -> i32; + fn monitor(&self) -> i32; #[doc(alias = "gtk_menu_get_reserve_toggle_size")] - fn get_reserve_toggle_size(&self) -> bool; + fn must_reserve_toggle_size(&self) -> bool; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] @@ -628,37 +628,46 @@ pub trait GtkMenuExt: 'static { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn get_property_anchor_hints(&self) -> gdk::AnchorHints; + #[doc(alias = "get_property_anchor_hints")] + fn anchor_hints(&self) -> gdk::AnchorHints; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn set_property_anchor_hints(&self, anchor_hints: gdk::AnchorHints); + #[doc(alias = "set_property_anchor_hints")] + fn set_anchor_hints(&self, anchor_hints: gdk::AnchorHints); - fn set_property_attach_widget>(&self, attach_widget: Option<&P>); + #[doc(alias = "set_property_attach_widget")] + fn set_attach_widget>(&self, attach_widget: Option<&P>); #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn get_property_menu_type_hint(&self) -> gdk::WindowTypeHint; + #[doc(alias = "get_property_menu_type_hint")] + fn menu_type_hint(&self) -> gdk::WindowTypeHint; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn set_property_menu_type_hint(&self, menu_type_hint: gdk::WindowTypeHint); + #[doc(alias = "set_property_menu_type_hint")] + fn set_menu_type_hint(&self, menu_type_hint: gdk::WindowTypeHint); #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn get_property_rect_anchor_dx(&self) -> i32; + #[doc(alias = "get_property_rect_anchor_dx")] + fn rect_anchor_dx(&self) -> i32; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn set_property_rect_anchor_dx(&self, rect_anchor_dx: i32); + #[doc(alias = "set_property_rect_anchor_dx")] + fn set_rect_anchor_dx(&self, rect_anchor_dx: i32); #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn get_property_rect_anchor_dy(&self) -> i32; + #[doc(alias = "get_property_rect_anchor_dy")] + fn rect_anchor_dy(&self) -> i32; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn set_property_rect_anchor_dy(&self, rect_anchor_dy: i32); + #[doc(alias = "set_property_rect_anchor_dy")] + fn set_rect_anchor_dy(&self, rect_anchor_dy: i32); fn get_item_bottom_attach>(&self, item: &T) -> i32; @@ -760,7 +769,7 @@ impl> GtkMenuExt for O { } } - fn get_accel_group(&self) -> Option { + fn accel_group(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_get_accel_group( self.as_ref().to_glib_none().0, @@ -768,15 +777,15 @@ impl> GtkMenuExt for O { } } - fn get_accel_path(&self) -> Option { + fn accel_path(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_get_accel_path(self.as_ref().to_glib_none().0)) } } - fn get_active(&self) -> Option { + fn active(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_get_active(self.as_ref().to_glib_none().0)) } } - fn get_attach_widget(&self) -> Option { + fn attach_widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_get_attach_widget( self.as_ref().to_glib_none().0, @@ -784,11 +793,11 @@ impl> GtkMenuExt for O { } } - fn get_monitor(&self) -> i32 { + fn monitor(&self) -> i32 { unsafe { ffi::gtk_menu_get_monitor(self.as_ref().to_glib_none().0) } } - fn get_reserve_toggle_size(&self) -> bool { + fn must_reserve_toggle_size(&self) -> bool { unsafe { from_glib(ffi::gtk_menu_get_reserve_toggle_size( self.as_ref().to_glib_none().0, @@ -937,7 +946,7 @@ impl> GtkMenuExt for O { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn get_property_anchor_hints(&self) -> gdk::AnchorHints { + fn anchor_hints(&self) -> gdk::AnchorHints { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -954,7 +963,7 @@ impl> GtkMenuExt for O { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn set_property_anchor_hints(&self, anchor_hints: gdk::AnchorHints) { + fn set_anchor_hints(&self, anchor_hints: gdk::AnchorHints) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -964,7 +973,7 @@ impl> GtkMenuExt for O { } } - fn set_property_attach_widget>(&self, attach_widget: Option<&P>) { + fn set_attach_widget>(&self, attach_widget: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -976,7 +985,7 @@ impl> GtkMenuExt for O { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn get_property_menu_type_hint(&self) -> gdk::WindowTypeHint { + fn menu_type_hint(&self) -> gdk::WindowTypeHint { unsafe { let mut value = glib::Value::from_type(::static_type()); @@ -994,7 +1003,7 @@ impl> GtkMenuExt for O { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn set_property_menu_type_hint(&self, menu_type_hint: gdk::WindowTypeHint) { + fn set_menu_type_hint(&self, menu_type_hint: gdk::WindowTypeHint) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1006,7 +1015,7 @@ impl> GtkMenuExt for O { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn get_property_rect_anchor_dx(&self) -> i32 { + fn rect_anchor_dx(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1023,7 +1032,7 @@ impl> GtkMenuExt for O { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn set_property_rect_anchor_dx(&self, rect_anchor_dx: i32) { + fn set_rect_anchor_dx(&self, rect_anchor_dx: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -1035,7 +1044,7 @@ impl> GtkMenuExt for O { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn get_property_rect_anchor_dy(&self) -> i32 { + fn rect_anchor_dy(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -1052,7 +1061,7 @@ impl> GtkMenuExt for O { #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] - fn set_property_rect_anchor_dy(&self, rect_anchor_dy: i32) { + fn set_rect_anchor_dy(&self, rect_anchor_dy: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/menu_bar.rs b/gtk/src/auto/menu_bar.rs index 29f86bfbc71c..eb7993c72c81 100644 --- a/gtk/src/auto/menu_bar.rs +++ b/gtk/src/auto/menu_bar.rs @@ -420,10 +420,10 @@ pub const NONE_MENU_BAR: Option<&MenuBar> = None; pub trait MenuBarExt: 'static { #[doc(alias = "gtk_menu_bar_get_child_pack_direction")] - fn get_child_pack_direction(&self) -> PackDirection; + fn child_pack_direction(&self) -> PackDirection; #[doc(alias = "gtk_menu_bar_get_pack_direction")] - fn get_pack_direction(&self) -> PackDirection; + fn pack_direction(&self) -> PackDirection; #[doc(alias = "gtk_menu_bar_set_child_pack_direction")] fn set_child_pack_direction(&self, child_pack_dir: PackDirection); @@ -443,7 +443,7 @@ pub trait MenuBarExt: 'static { } impl> MenuBarExt for O { - fn get_child_pack_direction(&self) -> PackDirection { + fn child_pack_direction(&self) -> PackDirection { unsafe { from_glib(ffi::gtk_menu_bar_get_child_pack_direction( self.as_ref().to_glib_none().0, @@ -451,7 +451,7 @@ impl> MenuBarExt for O { } } - fn get_pack_direction(&self) -> PackDirection { + fn pack_direction(&self) -> PackDirection { unsafe { from_glib(ffi::gtk_menu_bar_get_pack_direction( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/menu_button.rs b/gtk/src/auto/menu_button.rs index 660c8e611047..310ce1a2e4db 100644 --- a/gtk/src/auto/menu_button.rs +++ b/gtk/src/auto/menu_button.rs @@ -542,22 +542,22 @@ pub const NONE_MENU_BUTTON: Option<&MenuButton> = None; pub trait MenuButtonExt: 'static { #[doc(alias = "gtk_menu_button_get_align_widget")] - fn get_align_widget(&self) -> Option; + fn align_widget(&self) -> Option; #[doc(alias = "gtk_menu_button_get_direction")] - fn get_direction(&self) -> ArrowType; + fn direction(&self) -> ArrowType; #[doc(alias = "gtk_menu_button_get_menu_model")] - fn get_menu_model(&self) -> Option; + fn menu_model(&self) -> Option; #[doc(alias = "gtk_menu_button_get_popover")] - fn get_popover(&self) -> Option; + fn popover(&self) -> Option; #[doc(alias = "gtk_menu_button_get_popup")] - fn get_popup(&self) -> Option; + fn popup(&self) -> Option; #[doc(alias = "gtk_menu_button_get_use_popover")] - fn get_use_popover(&self) -> bool; + fn uses_popover(&self) -> bool; #[doc(alias = "gtk_menu_button_set_align_widget")] fn set_align_widget>(&self, align_widget: Option<&P>); @@ -592,7 +592,7 @@ pub trait MenuButtonExt: 'static { } impl> MenuButtonExt for O { - fn get_align_widget(&self) -> Option { + fn align_widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_button_get_align_widget( self.as_ref().to_glib_none().0, @@ -600,7 +600,7 @@ impl> MenuButtonExt for O { } } - fn get_direction(&self) -> ArrowType { + fn direction(&self) -> ArrowType { unsafe { from_glib(ffi::gtk_menu_button_get_direction( self.as_ref().to_glib_none().0, @@ -608,7 +608,7 @@ impl> MenuButtonExt for O { } } - fn get_menu_model(&self) -> Option { + fn menu_model(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_button_get_menu_model( self.as_ref().to_glib_none().0, @@ -616,7 +616,7 @@ impl> MenuButtonExt for O { } } - fn get_popover(&self) -> Option { + fn popover(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_button_get_popover( self.as_ref().to_glib_none().0, @@ -624,7 +624,7 @@ impl> MenuButtonExt for O { } } - fn get_popup(&self) -> Option { + fn popup(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_button_get_popup( self.as_ref().to_glib_none().0, @@ -632,7 +632,7 @@ impl> MenuButtonExt for O { } } - fn get_use_popover(&self) -> bool { + fn uses_popover(&self) -> bool { unsafe { from_glib(ffi::gtk_menu_button_get_use_popover( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/menu_item.rs b/gtk/src/auto/menu_item.rs index adbbedcdbd5a..9b4e0d5b18db 100644 --- a/gtk/src/auto/menu_item.rs +++ b/gtk/src/auto/menu_item.rs @@ -468,19 +468,19 @@ pub trait GtkMenuItemExt: 'static { fn deselect(&self); #[doc(alias = "gtk_menu_item_get_accel_path")] - fn get_accel_path(&self) -> Option; + fn accel_path(&self) -> Option; #[doc(alias = "gtk_menu_item_get_label")] - fn get_label(&self) -> Option; + fn label(&self) -> Option; #[doc(alias = "gtk_menu_item_get_reserve_indicator")] - fn get_reserve_indicator(&self) -> bool; + fn must_reserve_indicator(&self) -> bool; #[doc(alias = "gtk_menu_item_get_submenu")] - fn get_submenu(&self) -> Option; + fn submenu(&self) -> Option; #[doc(alias = "gtk_menu_item_get_use_underline")] - fn get_use_underline(&self) -> bool; + fn uses_underline(&self) -> bool; #[doc(alias = "gtk_menu_item_select")] fn select(&self); @@ -506,9 +506,11 @@ pub trait GtkMenuItemExt: 'static { #[doc(alias = "gtk_menu_item_toggle_size_request")] fn toggle_size_request(&self, requisition: &mut i32); - fn get_property_right_justified(&self) -> bool; + #[doc(alias = "get_property_right_justified")] + fn is_right_justified(&self) -> bool; - fn set_property_right_justified(&self, right_justified: bool); + #[doc(alias = "set_property_right_justified")] + fn set_right_justified(&self, right_justified: bool); fn connect_activate(&self, f: F) -> SignalHandlerId; @@ -548,7 +550,7 @@ impl> GtkMenuItemExt for O { } } - fn get_accel_path(&self) -> Option { + fn accel_path(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_item_get_accel_path( self.as_ref().to_glib_none().0, @@ -556,11 +558,11 @@ impl> GtkMenuItemExt for O { } } - fn get_label(&self) -> Option { + fn label(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_item_get_label(self.as_ref().to_glib_none().0)) } } - fn get_reserve_indicator(&self) -> bool { + fn must_reserve_indicator(&self) -> bool { unsafe { from_glib(ffi::gtk_menu_item_get_reserve_indicator( self.as_ref().to_glib_none().0, @@ -568,7 +570,7 @@ impl> GtkMenuItemExt for O { } } - fn get_submenu(&self) -> Option { + fn submenu(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_item_get_submenu( self.as_ref().to_glib_none().0, @@ -576,7 +578,7 @@ impl> GtkMenuItemExt for O { } } - fn get_use_underline(&self) -> bool { + fn uses_underline(&self) -> bool { unsafe { from_glib(ffi::gtk_menu_item_get_use_underline( self.as_ref().to_glib_none().0, @@ -641,7 +643,7 @@ impl> GtkMenuItemExt for O { } } - fn get_property_right_justified(&self) -> bool { + fn is_right_justified(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -656,7 +658,7 @@ impl> GtkMenuItemExt for O { } } - fn set_property_right_justified(&self, right_justified: bool) { + fn set_right_justified(&self, right_justified: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/menu_shell.rs b/gtk/src/auto/menu_shell.rs index 414ccaa6d2c8..0d23b9209ed8 100644 --- a/gtk/src/auto/menu_shell.rs +++ b/gtk/src/auto/menu_shell.rs @@ -53,13 +53,13 @@ pub trait MenuShellExt: 'static { fn deselect(&self); #[doc(alias = "gtk_menu_shell_get_parent_shell")] - fn get_parent_shell(&self) -> Option; + fn parent_shell(&self) -> Option; #[doc(alias = "gtk_menu_shell_get_selected_item")] - fn get_selected_item(&self) -> Option; + fn selected_item(&self) -> Option; #[doc(alias = "gtk_menu_shell_get_take_focus")] - fn get_take_focus(&self) -> bool; + fn takes_focus(&self) -> bool; #[doc(alias = "gtk_menu_shell_insert")] fn insert>(&self, child: &P, position: i32); @@ -163,7 +163,7 @@ impl> MenuShellExt for O { } } - fn get_parent_shell(&self) -> Option { + fn parent_shell(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_shell_get_parent_shell( self.as_ref().to_glib_none().0, @@ -171,7 +171,7 @@ impl> MenuShellExt for O { } } - fn get_selected_item(&self) -> Option { + fn selected_item(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_shell_get_selected_item( self.as_ref().to_glib_none().0, @@ -179,7 +179,7 @@ impl> MenuShellExt for O { } } - fn get_take_focus(&self) -> bool { + fn takes_focus(&self) -> bool { unsafe { from_glib(ffi::gtk_menu_shell_get_take_focus( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/menu_tool_button.rs b/gtk/src/auto/menu_tool_button.rs index d3d6effbcece..dbbd9f9ecb83 100644 --- a/gtk/src/auto/menu_tool_button.rs +++ b/gtk/src/auto/menu_tool_button.rs @@ -484,7 +484,7 @@ pub const NONE_MENU_TOOL_BUTTON: Option<&MenuToolButton> = None; pub trait MenuToolButtonExt: 'static { #[doc(alias = "gtk_menu_tool_button_get_menu")] - fn get_menu(&self) -> Option; + fn menu(&self) -> Option; #[doc(alias = "gtk_menu_tool_button_set_arrow_tooltip_markup")] fn set_arrow_tooltip_markup(&self, markup: &str); @@ -501,7 +501,7 @@ pub trait MenuToolButtonExt: 'static { } impl> MenuToolButtonExt for O { - fn get_menu(&self) -> Option { + fn menu(&self) -> Option { unsafe { from_glib_none(ffi::gtk_menu_tool_button_get_menu( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/message_dialog.rs b/gtk/src/auto/message_dialog.rs index 7d2e03315c98..561f48e7ca97 100644 --- a/gtk/src/auto/message_dialog.rs +++ b/gtk/src/auto/message_dialog.rs @@ -707,30 +707,40 @@ pub trait MessageDialogExt: 'static { //fn format_secondary_text(&self, message_format: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs); #[doc(alias = "gtk_message_dialog_get_message_area")] - fn get_message_area(&self) -> Widget; + fn message_area(&self) -> Widget; #[doc(alias = "gtk_message_dialog_set_markup")] fn set_markup(&self, str: &str); - fn get_property_message_type(&self) -> MessageType; + #[doc(alias = "get_property_message_type")] + fn message_type(&self) -> MessageType; - fn set_property_message_type(&self, message_type: MessageType); + #[doc(alias = "set_property_message_type")] + fn set_message_type(&self, message_type: MessageType); - fn get_property_secondary_text(&self) -> Option; + #[doc(alias = "get_property_secondary_text")] + fn secondary_text(&self) -> Option; - fn set_property_secondary_text(&self, secondary_text: Option<&str>); + #[doc(alias = "set_property_secondary_text")] + fn set_secondary_text(&self, secondary_text: Option<&str>); - fn get_property_secondary_use_markup(&self) -> bool; + #[doc(alias = "get_property_secondary_use_markup")] + fn is_secondary_use_markup(&self) -> bool; - fn set_property_secondary_use_markup(&self, secondary_use_markup: bool); + #[doc(alias = "set_property_secondary_use_markup")] + fn set_secondary_use_markup(&self, secondary_use_markup: bool); - fn get_property_text(&self) -> Option; + #[doc(alias = "get_property_text")] + fn text(&self) -> Option; - fn set_property_text(&self, text: Option<&str>); + #[doc(alias = "set_property_text")] + fn set_text(&self, text: Option<&str>); - fn get_property_use_markup(&self) -> bool; + #[doc(alias = "get_property_use_markup")] + fn uses_markup(&self) -> bool; - fn set_property_use_markup(&self, use_markup: bool); + #[doc(alias = "set_property_use_markup")] + fn set_use_markup(&self, use_markup: bool); fn connect_property_message_area_notify(&self, f: F) -> SignalHandlerId; @@ -762,7 +772,7 @@ impl> MessageDialogExt for O { // unsafe { TODO: call ffi:gtk_message_dialog_format_secondary_text() } //} - fn get_message_area(&self) -> Widget { + fn message_area(&self) -> Widget { unsafe { from_glib_none(ffi::gtk_message_dialog_get_message_area( self.as_ref().to_glib_none().0, @@ -779,7 +789,7 @@ impl> MessageDialogExt for O { } } - fn get_property_message_type(&self) -> MessageType { + fn message_type(&self) -> MessageType { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -794,7 +804,7 @@ impl> MessageDialogExt for O { } } - fn set_property_message_type(&self, message_type: MessageType) { + fn set_message_type(&self, message_type: MessageType) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -804,7 +814,7 @@ impl> MessageDialogExt for O { } } - fn get_property_secondary_text(&self) -> Option { + fn secondary_text(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -818,7 +828,7 @@ impl> MessageDialogExt for O { } } - fn set_property_secondary_text(&self, secondary_text: Option<&str>) { + fn set_secondary_text(&self, secondary_text: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -828,7 +838,7 @@ impl> MessageDialogExt for O { } } - fn get_property_secondary_use_markup(&self) -> bool { + fn is_secondary_use_markup(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -843,7 +853,7 @@ impl> MessageDialogExt for O { } } - fn set_property_secondary_use_markup(&self, secondary_use_markup: bool) { + fn set_secondary_use_markup(&self, secondary_use_markup: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -853,7 +863,7 @@ impl> MessageDialogExt for O { } } - fn get_property_text(&self) -> Option { + fn text(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -867,7 +877,7 @@ impl> MessageDialogExt for O { } } - fn set_property_text(&self, text: Option<&str>) { + fn set_text(&self, text: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -877,7 +887,7 @@ impl> MessageDialogExt for O { } } - fn get_property_use_markup(&self) -> bool { + fn uses_markup(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -892,7 +902,7 @@ impl> MessageDialogExt for O { } } - fn set_property_use_markup(&self, use_markup: bool) { + fn set_use_markup(&self, use_markup: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/model_button.rs b/gtk/src/auto/model_button.rs index 63df2ee119a9..7d45ee8b4cb2 100644 --- a/gtk/src/auto/model_button.rs +++ b/gtk/src/auto/model_button.rs @@ -42,7 +42,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn get_property_active(&self) -> bool { + #[doc(alias = "get_property_active")] + pub fn is_active(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -59,7 +60,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn set_property_active(&self, active: bool) { + #[doc(alias = "set_property_active")] + pub fn set_active(&self, active: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, @@ -71,7 +73,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn get_property_centered(&self) -> bool { + #[doc(alias = "get_property_centered")] + pub fn is_centered(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -88,7 +91,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn set_property_centered(&self, centered: bool) { + #[doc(alias = "set_property_centered")] + pub fn set_centered(&self, centered: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, @@ -100,7 +104,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn get_property_icon(&self) -> Option { + #[doc(alias = "get_property_icon")] + pub fn icon(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -116,7 +121,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn set_property_icon>(&self, icon: Option<&P>) { + #[doc(alias = "set_property_icon")] + pub fn set_icon>(&self, icon: Option<&P>) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, @@ -128,7 +134,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn get_property_iconic(&self) -> bool { + #[doc(alias = "get_property_iconic")] + pub fn is_iconic(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -145,7 +152,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn set_property_iconic(&self, iconic: bool) { + #[doc(alias = "set_property_iconic")] + pub fn set_iconic(&self, iconic: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, @@ -157,7 +165,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn get_property_inverted(&self) -> bool { + #[doc(alias = "get_property_inverted")] + pub fn is_inverted(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -174,7 +183,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn set_property_inverted(&self, inverted: bool) { + #[doc(alias = "set_property_inverted")] + pub fn set_inverted(&self, inverted: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, @@ -186,7 +196,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn get_property_menu_name(&self) -> Option { + #[doc(alias = "get_property_menu_name")] + pub fn menu_name(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -202,7 +213,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn set_property_menu_name(&self, menu_name: Option<&str>) { + #[doc(alias = "set_property_menu_name")] + pub fn set_menu_name(&self, menu_name: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, @@ -214,7 +226,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn get_property_role(&self) -> ButtonRole { + #[doc(alias = "get_property_role")] + pub fn role(&self) -> ButtonRole { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -231,7 +244,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn set_property_role(&self, role: ButtonRole) { + #[doc(alias = "set_property_role")] + pub fn set_role(&self, role: ButtonRole) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, @@ -243,7 +257,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn get_property_text(&self) -> Option { + #[doc(alias = "get_property_text")] + pub fn text(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -259,7 +274,8 @@ impl ModelButton { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - pub fn set_property_text(&self, text: Option<&str>) { + #[doc(alias = "set_property_text")] + pub fn set_text(&self, text: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, @@ -271,7 +287,8 @@ impl ModelButton { #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] - pub fn get_property_use_markup(&self) -> bool { + #[doc(alias = "get_property_use_markup")] + pub fn uses_markup(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -288,7 +305,8 @@ impl ModelButton { #[cfg(any(feature = "v3_24", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_24")))] - pub fn set_property_use_markup(&self, use_markup: bool) { + #[doc(alias = "set_property_use_markup")] + pub fn set_use_markup(&self, use_markup: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/mount_operation.rs b/gtk/src/auto/mount_operation.rs index c8f64d26ad4b..c55793c00423 100644 --- a/gtk/src/auto/mount_operation.rs +++ b/gtk/src/auto/mount_operation.rs @@ -146,10 +146,10 @@ pub const NONE_MOUNT_OPERATION: Option<&MountOperation> = None; pub trait MountOperationExt: 'static { #[doc(alias = "gtk_mount_operation_get_parent")] - fn get_parent(&self) -> Option; + fn parent(&self) -> Option; #[doc(alias = "gtk_mount_operation_get_screen")] - fn get_screen(&self) -> Option; + fn screen(&self) -> Option; #[doc(alias = "gtk_mount_operation_is_showing")] fn is_showing(&self) -> bool; @@ -160,8 +160,6 @@ pub trait MountOperationExt: 'static { #[doc(alias = "gtk_mount_operation_set_screen")] fn set_screen(&self, screen: &gdk::Screen); - fn get_property_is_showing(&self) -> bool; - fn connect_property_is_showing_notify(&self, f: F) -> SignalHandlerId; fn connect_property_parent_notify(&self, f: F) -> SignalHandlerId; @@ -170,7 +168,7 @@ pub trait MountOperationExt: 'static { } impl> MountOperationExt for O { - fn get_parent(&self) -> Option { + fn parent(&self) -> Option { unsafe { from_glib_none(ffi::gtk_mount_operation_get_parent( self.as_ref().to_glib_none().0, @@ -178,7 +176,7 @@ impl> MountOperationExt for O { } } - fn get_screen(&self) -> Option { + fn screen(&self) -> Option { unsafe { from_glib_none(ffi::gtk_mount_operation_get_screen( self.as_ref().to_glib_none().0, @@ -212,21 +210,6 @@ impl> MountOperationExt for O { } } - fn get_property_is_showing(&self) -> bool { - unsafe { - let mut value = glib::Value::from_type(::static_type()); - glib::gobject_ffi::g_object_get_property( - self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, - b"is-showing\0".as_ptr() as *const _, - value.to_glib_none_mut().0, - ); - value - .get() - .expect("Return Value for property `is-showing` getter") - .unwrap() - } - } - fn connect_property_is_showing_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_is_showing_trampoline( this: *mut ffi::GtkMountOperation, diff --git a/gtk/src/auto/native_dialog.rs b/gtk/src/auto/native_dialog.rs index 0897914e1451..53fdf0de88fc 100644 --- a/gtk/src/auto/native_dialog.rs +++ b/gtk/src/auto/native_dialog.rs @@ -28,16 +28,16 @@ pub trait NativeDialogExt: 'static { fn destroy(&self); #[doc(alias = "gtk_native_dialog_get_modal")] - fn get_modal(&self) -> bool; + fn is_modal(&self) -> bool; #[doc(alias = "gtk_native_dialog_get_title")] - fn get_title(&self) -> Option; + fn title(&self) -> Option; #[doc(alias = "gtk_native_dialog_get_transient_for")] - fn get_transient_for(&self) -> Option; + fn transient_for(&self) -> Option; #[doc(alias = "gtk_native_dialog_get_visible")] - fn get_visible(&self) -> bool; + fn is_visible(&self) -> bool; #[doc(alias = "gtk_native_dialog_hide")] fn hide(&self); @@ -59,7 +59,8 @@ pub trait NativeDialogExt: 'static { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn set_property_visible(&self, visible: bool); + #[doc(alias = "set_property_visible")] + fn set_visible(&self, visible: bool); #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] @@ -92,7 +93,7 @@ impl> NativeDialogExt for O { } } - fn get_modal(&self) -> bool { + fn is_modal(&self) -> bool { unsafe { from_glib(ffi::gtk_native_dialog_get_modal( self.as_ref().to_glib_none().0, @@ -100,7 +101,7 @@ impl> NativeDialogExt for O { } } - fn get_title(&self) -> Option { + fn title(&self) -> Option { unsafe { from_glib_none(ffi::gtk_native_dialog_get_title( self.as_ref().to_glib_none().0, @@ -108,7 +109,7 @@ impl> NativeDialogExt for O { } } - fn get_transient_for(&self) -> Option { + fn transient_for(&self) -> Option { unsafe { from_glib_none(ffi::gtk_native_dialog_get_transient_for( self.as_ref().to_glib_none().0, @@ -116,7 +117,7 @@ impl> NativeDialogExt for O { } } - fn get_visible(&self) -> bool { + fn is_visible(&self) -> bool { unsafe { from_glib(ffi::gtk_native_dialog_get_visible( self.as_ref().to_glib_none().0, @@ -166,7 +167,7 @@ impl> NativeDialogExt for O { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn set_property_visible(&self, visible: bool) { + fn set_visible(&self, visible: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/notebook.rs b/gtk/src/auto/notebook.rs index 6a5b047cfb69..46a14a81d02d 100644 --- a/gtk/src/auto/notebook.rs +++ b/gtk/src/auto/notebook.rs @@ -456,7 +456,7 @@ pub trait NotebookExt: 'static { fn get_action_widget(&self, pack_type: PackType) -> Option; #[doc(alias = "gtk_notebook_get_group_name")] - fn get_group_name(&self) -> Option; + fn group_name(&self) -> Option; #[doc(alias = "gtk_notebook_get_menu_label")] fn get_menu_label>(&self, child: &P) -> Option; @@ -465,13 +465,13 @@ pub trait NotebookExt: 'static { fn get_menu_label_text>(&self, child: &P) -> Option; #[doc(alias = "gtk_notebook_get_scrollable")] - fn get_scrollable(&self) -> bool; + fn is_scrollable(&self) -> bool; #[doc(alias = "gtk_notebook_get_show_border")] - fn get_show_border(&self) -> bool; + fn shows_border(&self) -> bool; #[doc(alias = "gtk_notebook_get_show_tabs")] - fn get_show_tabs(&self) -> bool; + fn shows_tabs(&self) -> bool; #[doc(alias = "gtk_notebook_get_tab_detachable")] fn get_tab_detachable>(&self, child: &P) -> bool; @@ -483,7 +483,7 @@ pub trait NotebookExt: 'static { fn get_tab_label_text>(&self, child: &P) -> Option; #[doc(alias = "gtk_notebook_get_tab_pos")] - fn get_tab_pos(&self) -> PositionType; + fn tab_pos(&self) -> PositionType; #[doc(alias = "gtk_notebook_get_tab_reorderable")] fn get_tab_reorderable>(&self, child: &P) -> bool; @@ -536,13 +536,17 @@ pub trait NotebookExt: 'static { #[doc(alias = "gtk_notebook_set_tab_reorderable")] fn set_tab_reorderable>(&self, child: &P, reorderable: bool); - fn get_property_enable_popup(&self) -> bool; + #[doc(alias = "get_property_enable_popup")] + fn enables_popup(&self) -> bool; - fn set_property_enable_popup(&self, enable_popup: bool); + #[doc(alias = "set_property_enable_popup")] + fn set_enable_popup(&self, enable_popup: bool); - fn get_property_page(&self) -> i32; + #[doc(alias = "get_property_page")] + fn page(&self) -> i32; - fn set_property_page(&self, page: i32); + #[doc(alias = "set_property_page")] + fn set_page(&self, page: i32); #[doc(hidden)] fn get_child_detachable>(&self, item: &T) -> bool; @@ -669,7 +673,7 @@ impl> NotebookExt for O { } } - fn get_group_name(&self) -> Option { + fn group_name(&self) -> Option { unsafe { from_glib_none(ffi::gtk_notebook_get_group_name( self.as_ref().to_glib_none().0, @@ -695,7 +699,7 @@ impl> NotebookExt for O { } } - fn get_scrollable(&self) -> bool { + fn is_scrollable(&self) -> bool { unsafe { from_glib(ffi::gtk_notebook_get_scrollable( self.as_ref().to_glib_none().0, @@ -703,7 +707,7 @@ impl> NotebookExt for O { } } - fn get_show_border(&self) -> bool { + fn shows_border(&self) -> bool { unsafe { from_glib(ffi::gtk_notebook_get_show_border( self.as_ref().to_glib_none().0, @@ -711,7 +715,7 @@ impl> NotebookExt for O { } } - fn get_show_tabs(&self) -> bool { + fn shows_tabs(&self) -> bool { unsafe { from_glib(ffi::gtk_notebook_get_show_tabs( self.as_ref().to_glib_none().0, @@ -746,7 +750,7 @@ impl> NotebookExt for O { } } - fn get_tab_pos(&self) -> PositionType { + fn tab_pos(&self) -> PositionType { unsafe { from_glib(ffi::gtk_notebook_get_tab_pos( self.as_ref().to_glib_none().0, @@ -893,7 +897,7 @@ impl> NotebookExt for O { } } - fn get_property_enable_popup(&self) -> bool { + fn enables_popup(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -908,7 +912,7 @@ impl> NotebookExt for O { } } - fn set_property_enable_popup(&self, enable_popup: bool) { + fn set_enable_popup(&self, enable_popup: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, @@ -918,7 +922,7 @@ impl> NotebookExt for O { } } - fn get_property_page(&self) -> i32 { + fn page(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -933,7 +937,7 @@ impl> NotebookExt for O { } } - fn set_property_page(&self, page: i32) { + fn set_page(&self, page: i32) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/offscreen_window.rs b/gtk/src/auto/offscreen_window.rs index d32f08ab3566..50113dd0b383 100644 --- a/gtk/src/auto/offscreen_window.rs +++ b/gtk/src/auto/offscreen_window.rs @@ -633,14 +633,14 @@ pub const NONE_OFFSCREEN_WINDOW: Option<&OffscreenWindow> = None; pub trait OffscreenWindowExt: 'static { #[doc(alias = "gtk_offscreen_window_get_pixbuf")] - fn get_pixbuf(&self) -> Option; + fn pixbuf(&self) -> Option; #[doc(alias = "gtk_offscreen_window_get_surface")] - fn get_surface(&self) -> Option; + fn surface(&self) -> Option; } impl> OffscreenWindowExt for O { - fn get_pixbuf(&self) -> Option { + fn pixbuf(&self) -> Option { unsafe { from_glib_full(ffi::gtk_offscreen_window_get_pixbuf( self.as_ref().to_glib_none().0, @@ -648,7 +648,7 @@ impl> OffscreenWindowExt for O { } } - fn get_surface(&self) -> Option { + fn surface(&self) -> Option { unsafe { from_glib_none(ffi::gtk_offscreen_window_get_surface( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/orientable.rs b/gtk/src/auto/orientable.rs index aa15412868e8..15e8a74e9593 100644 --- a/gtk/src/auto/orientable.rs +++ b/gtk/src/auto/orientable.rs @@ -24,7 +24,7 @@ pub const NONE_ORIENTABLE: Option<&Orientable> = None; pub trait OrientableExt: 'static { #[doc(alias = "gtk_orientable_get_orientation")] - fn get_orientation(&self) -> Orientation; + fn orientation(&self) -> Orientation; #[doc(alias = "gtk_orientable_set_orientation")] fn set_orientation(&self, orientation: Orientation); @@ -33,7 +33,7 @@ pub trait OrientableExt: 'static { } impl> OrientableExt for O { - fn get_orientation(&self) -> Orientation { + fn orientation(&self) -> Orientation { unsafe { from_glib(ffi::gtk_orientable_get_orientation( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/pad_controller.rs b/gtk/src/auto/pad_controller.rs index f3f6a5060748..c23fdcc42d80 100644 --- a/gtk/src/auto/pad_controller.rs +++ b/gtk/src/auto/pad_controller.rs @@ -61,7 +61,8 @@ impl PadController { } } - pub fn get_property_action_group(&self) -> Option { + #[doc(alias = "get_property_action_group")] + pub fn action_group(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -75,7 +76,8 @@ impl PadController { } } - pub fn get_property_pad(&self) -> Option { + #[doc(alias = "get_property_pad")] + pub fn pad(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/page_setup.rs b/gtk/src/auto/page_setup.rs index 1cb4ef83d373..d2c308e83873 100644 --- a/gtk/src/auto/page_setup.rs +++ b/gtk/src/auto/page_setup.rs @@ -88,7 +88,7 @@ impl PageSetup { } #[doc(alias = "gtk_page_setup_get_orientation")] - pub fn get_orientation(&self) -> PageOrientation { + pub fn orientation(&self) -> PageOrientation { unsafe { from_glib(ffi::gtk_page_setup_get_orientation(self.to_glib_none().0)) } } @@ -108,7 +108,7 @@ impl PageSetup { } #[doc(alias = "gtk_page_setup_get_paper_size")] - pub fn get_paper_size(&self) -> PaperSize { + pub fn paper_size(&self) -> PaperSize { unsafe { from_glib_none(ffi::gtk_page_setup_get_paper_size(self.to_glib_none().0)) } } diff --git a/gtk/src/auto/paned.rs b/gtk/src/auto/paned.rs index 8412fb54b142..d69a97c123ae 100644 --- a/gtk/src/auto/paned.rs +++ b/gtk/src/auto/paned.rs @@ -425,21 +425,21 @@ pub trait PanedExt: 'static { fn add2>(&self, child: &P); #[doc(alias = "gtk_paned_get_child1")] - fn get_child1(&self) -> Option; + fn child1(&self) -> Option; #[doc(alias = "gtk_paned_get_child2")] - fn get_child2(&self) -> Option; + fn child2(&self) -> Option; #[doc(alias = "gtk_paned_get_handle_window")] - fn get_handle_window(&self) -> Option; + fn handle_window(&self) -> Option; #[doc(alias = "gtk_paned_get_position")] - fn get_position(&self) -> i32; + fn position(&self) -> i32; #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] #[doc(alias = "gtk_paned_get_wide_handle")] - fn get_wide_handle(&self) -> bool; + fn is_wide_handle(&self) -> bool; #[doc(alias = "gtk_paned_pack1")] fn pack1>(&self, child: &P, resize: bool, shrink: bool); @@ -455,13 +455,17 @@ pub trait PanedExt: 'static { #[doc(alias = "gtk_paned_set_wide_handle")] fn set_wide_handle(&self, wide: bool); - fn get_property_max_position(&self) -> i32; + #[doc(alias = "get_property_max_position")] + fn max_position(&self) -> i32; - fn get_property_min_position(&self) -> i32; + #[doc(alias = "get_property_min_position")] + fn min_position(&self) -> i32; - fn get_property_position_set(&self) -> bool; + #[doc(alias = "get_property_position_set")] + fn is_position_set(&self) -> bool; - fn set_property_position_set(&self, position_set: bool); + #[doc(alias = "set_property_position_set")] + fn set_position_set(&self, position_set: bool); fn get_child_resize>(&self, item: &T) -> bool; @@ -539,15 +543,15 @@ impl> PanedExt for O { } } - fn get_child1(&self) -> Option { + fn child1(&self) -> Option { unsafe { from_glib_none(ffi::gtk_paned_get_child1(self.as_ref().to_glib_none().0)) } } - fn get_child2(&self) -> Option { + fn child2(&self) -> Option { unsafe { from_glib_none(ffi::gtk_paned_get_child2(self.as_ref().to_glib_none().0)) } } - fn get_handle_window(&self) -> Option { + fn handle_window(&self) -> Option { unsafe { from_glib_none(ffi::gtk_paned_get_handle_window( self.as_ref().to_glib_none().0, @@ -555,13 +559,13 @@ impl> PanedExt for O { } } - fn get_position(&self) -> i32 { + fn position(&self) -> i32 { unsafe { ffi::gtk_paned_get_position(self.as_ref().to_glib_none().0) } } #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - fn get_wide_handle(&self) -> bool { + fn is_wide_handle(&self) -> bool { unsafe { from_glib(ffi::gtk_paned_get_wide_handle( self.as_ref().to_glib_none().0, @@ -605,7 +609,7 @@ impl> PanedExt for O { } } - fn get_property_max_position(&self) -> i32 { + fn max_position(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -620,7 +624,7 @@ impl> PanedExt for O { } } - fn get_property_min_position(&self) -> i32 { + fn min_position(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -635,7 +639,7 @@ impl> PanedExt for O { } } - fn get_property_position_set(&self) -> bool { + fn is_position_set(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -650,7 +654,7 @@ impl> PanedExt for O { } } - fn set_property_position_set(&self, position_set: bool) { + fn set_position_set(&self, position_set: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/paper_size.rs b/gtk/src/auto/paper_size.rs index 318d4ab8f0f6..313802c9f216 100644 --- a/gtk/src/auto/paper_size.rs +++ b/gtk/src/auto/paper_size.rs @@ -145,7 +145,7 @@ impl PaperSize { } #[doc(alias = "gtk_paper_size_get_display_name")] - pub fn get_display_name(&self) -> Option { + pub fn display_name(&self) -> Option { unsafe { from_glib_none(ffi::gtk_paper_size_get_display_name(mut_override( self.to_glib_none().0, @@ -161,7 +161,7 @@ impl PaperSize { } #[doc(alias = "gtk_paper_size_get_name")] - pub fn get_name(&self) -> Option { + pub fn name(&self) -> Option { unsafe { from_glib_none(ffi::gtk_paper_size_get_name(mut_override( self.to_glib_none().0, @@ -170,7 +170,7 @@ impl PaperSize { } #[doc(alias = "gtk_paper_size_get_ppd_name")] - pub fn get_ppd_name(&self) -> Option { + pub fn ppd_name(&self) -> Option { unsafe { from_glib_none(ffi::gtk_paper_size_get_ppd_name(mut_override( self.to_glib_none().0, diff --git a/gtk/src/auto/places_sidebar.rs b/gtk/src/auto/places_sidebar.rs index 3ec9a551452b..ca1aab2da8eb 100644 --- a/gtk/src/auto/places_sidebar.rs +++ b/gtk/src/auto/places_sidebar.rs @@ -52,7 +52,7 @@ impl PlacesSidebar { } #[doc(alias = "gtk_places_sidebar_get_local_only")] - pub fn get_local_only(&self) -> bool { + pub fn is_local_only(&self) -> bool { unsafe { from_glib(ffi::gtk_places_sidebar_get_local_only( self.to_glib_none().0, @@ -61,7 +61,7 @@ impl PlacesSidebar { } #[doc(alias = "gtk_places_sidebar_get_location")] - pub fn get_location(&self) -> Option { + pub fn location(&self) -> Option { unsafe { from_glib_full(ffi::gtk_places_sidebar_get_location(self.to_glib_none().0)) } } @@ -76,7 +76,7 @@ impl PlacesSidebar { } #[doc(alias = "gtk_places_sidebar_get_open_flags")] - pub fn get_open_flags(&self) -> PlacesOpenFlags { + pub fn open_flags(&self) -> PlacesOpenFlags { unsafe { from_glib(ffi::gtk_places_sidebar_get_open_flags( self.to_glib_none().0, @@ -86,7 +86,7 @@ impl PlacesSidebar { #[cfg_attr(feature = "v3_18", deprecated)] #[doc(alias = "gtk_places_sidebar_get_show_connect_to_server")] - pub fn get_show_connect_to_server(&self) -> bool { + pub fn shows_connect_to_server(&self) -> bool { unsafe { from_glib(ffi::gtk_places_sidebar_get_show_connect_to_server( self.to_glib_none().0, @@ -95,7 +95,7 @@ impl PlacesSidebar { } #[doc(alias = "gtk_places_sidebar_get_show_desktop")] - pub fn get_show_desktop(&self) -> bool { + pub fn shows_desktop(&self) -> bool { unsafe { from_glib(ffi::gtk_places_sidebar_get_show_desktop( self.to_glib_none().0, @@ -104,7 +104,7 @@ impl PlacesSidebar { } #[doc(alias = "gtk_places_sidebar_get_show_enter_location")] - pub fn get_show_enter_location(&self) -> bool { + pub fn shows_enter_location(&self) -> bool { unsafe { from_glib(ffi::gtk_places_sidebar_get_show_enter_location( self.to_glib_none().0, @@ -115,7 +115,7 @@ impl PlacesSidebar { #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] #[doc(alias = "gtk_places_sidebar_get_show_other_locations")] - pub fn get_show_other_locations(&self) -> bool { + pub fn shows_other_locations(&self) -> bool { unsafe { from_glib(ffi::gtk_places_sidebar_get_show_other_locations( self.to_glib_none().0, @@ -126,7 +126,7 @@ impl PlacesSidebar { #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] #[doc(alias = "gtk_places_sidebar_get_show_recent")] - pub fn get_show_recent(&self) -> bool { + pub fn shows_recent(&self) -> bool { unsafe { from_glib(ffi::gtk_places_sidebar_get_show_recent( self.to_glib_none().0, @@ -137,7 +137,7 @@ impl PlacesSidebar { #[cfg(any(feature = "v3_22_26", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22_26")))] #[doc(alias = "gtk_places_sidebar_get_show_starred_location")] - pub fn get_show_starred_location(&self) -> bool { + pub fn shows_starred_location(&self) -> bool { unsafe { from_glib(ffi::gtk_places_sidebar_get_show_starred_location( self.to_glib_none().0, @@ -148,7 +148,7 @@ impl PlacesSidebar { #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] #[doc(alias = "gtk_places_sidebar_get_show_trash")] - pub fn get_show_trash(&self) -> bool { + pub fn shows_trash(&self) -> bool { unsafe { from_glib(ffi::gtk_places_sidebar_get_show_trash( self.to_glib_none().0, @@ -284,7 +284,8 @@ impl PlacesSidebar { #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] - pub fn get_property_populate_all(&self) -> bool { + #[doc(alias = "get_property_populate_all")] + pub fn populates_all(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -301,7 +302,8 @@ impl PlacesSidebar { #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] - pub fn set_property_populate_all(&self, populate_all: bool) { + #[doc(alias = "set_property_populate_all")] + pub fn set_populate_all(&self, populate_all: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/plug.rs b/gtk/src/auto/plug.rs index f6f2af11aef1..6ecd1566f831 100644 --- a/gtk/src/auto/plug.rs +++ b/gtk/src/auto/plug.rs @@ -40,7 +40,7 @@ impl Plug { } #[doc(alias = "gtk_plug_new_for_display")] - pub fn new_for_display(display: &gdk::Display, socket_id: xlib::Window) -> Plug { + pub fn for_display(display: &gdk::Display, socket_id: xlib::Window) -> Plug { assert_initialized_main_thread!(); unsafe { Widget::from_glib_none(ffi::gtk_plug_new_for_display( @@ -650,13 +650,13 @@ pub trait PlugExt: 'static { fn construct_for_display(&self, display: &gdk::Display, socket_id: xlib::Window); #[doc(alias = "gtk_plug_get_embedded")] - fn get_embedded(&self) -> bool; + fn is_embedded(&self) -> bool; #[doc(alias = "gtk_plug_get_id")] - fn get_id(&self) -> xlib::Window; + fn id(&self) -> xlib::Window; #[doc(alias = "gtk_plug_get_socket_window")] - fn get_socket_window(&self) -> Option; + fn socket_window(&self) -> Option; fn connect_embedded(&self, f: F) -> SignalHandlerId; @@ -685,15 +685,15 @@ impl> PlugExt for O { } } - fn get_embedded(&self) -> bool { + fn is_embedded(&self) -> bool { unsafe { from_glib(ffi::gtk_plug_get_embedded(self.as_ref().to_glib_none().0)) } } - fn get_id(&self) -> xlib::Window { + fn id(&self) -> xlib::Window { unsafe { ffi::gtk_plug_get_id(self.as_ref().to_glib_none().0) } } - fn get_socket_window(&self) -> Option { + fn socket_window(&self) -> Option { unsafe { from_glib_none(ffi::gtk_plug_get_socket_window( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/popover.rs b/gtk/src/auto/popover.rs index 56cf86dc306f..24481eb91c89 100644 --- a/gtk/src/auto/popover.rs +++ b/gtk/src/auto/popover.rs @@ -468,30 +468,30 @@ pub trait PopoverExt: 'static { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] #[doc(alias = "gtk_popover_get_constrain_to")] - fn get_constrain_to(&self) -> PopoverConstraint; + fn constrain_to(&self) -> PopoverConstraint; #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] #[doc(alias = "gtk_popover_get_default_widget")] - fn get_default_widget(&self) -> Option; + fn default_widget(&self) -> Option; #[doc(alias = "gtk_popover_get_modal")] - fn get_modal(&self) -> bool; + fn is_modal(&self) -> bool; #[doc(alias = "gtk_popover_get_pointing_to")] - fn get_pointing_to(&self) -> Option; + fn pointing_to(&self) -> Option; #[doc(alias = "gtk_popover_get_position")] - fn get_position(&self) -> PositionType; + fn position(&self) -> PositionType; #[doc(alias = "gtk_popover_get_relative_to")] - fn get_relative_to(&self) -> Option; + fn relative_to(&self) -> Option; #[cfg_attr(feature = "v3_22", deprecated)] #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] #[doc(alias = "gtk_popover_get_transitions_enabled")] - fn get_transitions_enabled(&self) -> bool; + fn is_transitions_enabled(&self) -> bool; #[cfg(any(feature = "v3_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_22")))] @@ -572,7 +572,7 @@ impl> PopoverExt for O { #[cfg(any(feature = "v3_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] - fn get_constrain_to(&self) -> PopoverConstraint { + fn constrain_to(&self) -> PopoverConstraint { unsafe { from_glib(ffi::gtk_popover_get_constrain_to( self.as_ref().to_glib_none().0, @@ -582,7 +582,7 @@ impl> PopoverExt for O { #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] - fn get_default_widget(&self) -> Option { + fn default_widget(&self) -> Option { unsafe { from_glib_none(ffi::gtk_popover_get_default_widget( self.as_ref().to_glib_none().0, @@ -590,11 +590,11 @@ impl> PopoverExt for O { } } - fn get_modal(&self) -> bool { + fn is_modal(&self) -> bool { unsafe { from_glib(ffi::gtk_popover_get_modal(self.as_ref().to_glib_none().0)) } } - fn get_pointing_to(&self) -> Option { + fn pointing_to(&self) -> Option { unsafe { let mut rect = gdk::Rectangle::uninitialized(); let ret = from_glib(ffi::gtk_popover_get_pointing_to( @@ -609,7 +609,7 @@ impl> PopoverExt for O { } } - fn get_position(&self) -> PositionType { + fn position(&self) -> PositionType { unsafe { from_glib(ffi::gtk_popover_get_position( self.as_ref().to_glib_none().0, @@ -617,7 +617,7 @@ impl> PopoverExt for O { } } - fn get_relative_to(&self) -> Option { + fn relative_to(&self) -> Option { unsafe { from_glib_none(ffi::gtk_popover_get_relative_to( self.as_ref().to_glib_none().0, @@ -627,7 +627,7 @@ impl> PopoverExt for O { #[cfg(any(feature = "v3_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_16")))] - fn get_transitions_enabled(&self) -> bool { + fn is_transitions_enabled(&self) -> bool { unsafe { from_glib(ffi::gtk_popover_get_transitions_enabled( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/popover_menu.rs b/gtk/src/auto/popover_menu.rs index e7729d20419c..4635d055b643 100644 --- a/gtk/src/auto/popover_menu.rs +++ b/gtk/src/auto/popover_menu.rs @@ -47,7 +47,8 @@ impl PopoverMenu { } } - pub fn get_property_visible_submenu(&self) -> Option { + #[doc(alias = "get_property_visible_submenu")] + pub fn visible_submenu(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -61,7 +62,8 @@ impl PopoverMenu { } } - pub fn set_property_visible_submenu(&self, visible_submenu: Option<&str>) { + #[doc(alias = "set_property_visible_submenu")] + pub fn set_visible_submenu(&self, visible_submenu: Option<&str>) { unsafe { glib::gobject_ffi::g_object_set_property( self.as_ptr() as *mut glib::gobject_ffi::GObject, diff --git a/gtk/src/auto/print_context.rs b/gtk/src/auto/print_context.rs index ad28b489ff12..21bbff089e56 100644 --- a/gtk/src/auto/print_context.rs +++ b/gtk/src/auto/print_context.rs @@ -35,7 +35,7 @@ impl PrintContext { } #[doc(alias = "gtk_print_context_get_cairo_context")] - pub fn get_cairo_context(&self) -> Option { + pub fn cairo_context(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_context_get_cairo_context( self.to_glib_none().0, @@ -44,17 +44,17 @@ impl PrintContext { } #[doc(alias = "gtk_print_context_get_dpi_x")] - pub fn get_dpi_x(&self) -> f64 { + pub fn dpi_x(&self) -> f64 { unsafe { ffi::gtk_print_context_get_dpi_x(self.to_glib_none().0) } } #[doc(alias = "gtk_print_context_get_dpi_y")] - pub fn get_dpi_y(&self) -> f64 { + pub fn dpi_y(&self) -> f64 { unsafe { ffi::gtk_print_context_get_dpi_y(self.to_glib_none().0) } } #[doc(alias = "gtk_print_context_get_hard_margins")] - pub fn get_hard_margins(&self) -> Option<(f64, f64, f64, f64)> { + pub fn hard_margins(&self) -> Option<(f64, f64, f64, f64)> { unsafe { let mut top = mem::MaybeUninit::uninit(); let mut bottom = mem::MaybeUninit::uninit(); @@ -80,17 +80,17 @@ impl PrintContext { } #[doc(alias = "gtk_print_context_get_height")] - pub fn get_height(&self) -> f64 { + pub fn height(&self) -> f64 { unsafe { ffi::gtk_print_context_get_height(self.to_glib_none().0) } } #[doc(alias = "gtk_print_context_get_page_setup")] - pub fn get_page_setup(&self) -> Option { + pub fn page_setup(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_context_get_page_setup(self.to_glib_none().0)) } } #[doc(alias = "gtk_print_context_get_pango_fontmap")] - pub fn get_pango_fontmap(&self) -> Option { + pub fn pango_fontmap(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_context_get_pango_fontmap( self.to_glib_none().0, @@ -99,7 +99,7 @@ impl PrintContext { } #[doc(alias = "gtk_print_context_get_width")] - pub fn get_width(&self) -> f64 { + pub fn width(&self) -> f64 { unsafe { ffi::gtk_print_context_get_width(self.to_glib_none().0) } } diff --git a/gtk/src/auto/print_operation.rs b/gtk/src/auto/print_operation.rs index c6812fc8235b..e4b1db89a9d9 100644 --- a/gtk/src/auto/print_operation.rs +++ b/gtk/src/auto/print_operation.rs @@ -207,31 +207,31 @@ pub trait PrintOperationExt: 'static { fn draw_page_finish(&self); #[doc(alias = "gtk_print_operation_get_default_page_setup")] - fn get_default_page_setup(&self) -> Option; + fn default_page_setup(&self) -> Option; #[doc(alias = "gtk_print_operation_get_embed_page_setup")] - fn get_embed_page_setup(&self) -> bool; + fn embeds_page_setup(&self) -> bool; #[doc(alias = "gtk_print_operation_get_error")] - fn get_error(&self) -> Result<(), glib::Error>; + fn error(&self) -> Result<(), glib::Error>; #[doc(alias = "gtk_print_operation_get_has_selection")] - fn get_has_selection(&self) -> bool; + fn has_selection(&self) -> bool; #[doc(alias = "gtk_print_operation_get_n_pages_to_print")] - fn get_n_pages_to_print(&self) -> i32; + fn n_pages_to_print(&self) -> i32; #[doc(alias = "gtk_print_operation_get_print_settings")] - fn get_print_settings(&self) -> Option; + fn print_settings(&self) -> Option; #[doc(alias = "gtk_print_operation_get_status")] - fn get_status(&self) -> PrintStatus; + fn status(&self) -> PrintStatus; #[doc(alias = "gtk_print_operation_get_status_string")] - fn get_status_string(&self) -> Option; + fn status_string(&self) -> Option; #[doc(alias = "gtk_print_operation_get_support_selection")] - fn get_support_selection(&self) -> bool; + fn supports_selection(&self) -> bool; #[doc(alias = "gtk_print_operation_is_finished")] fn is_finished(&self) -> bool; @@ -291,25 +291,35 @@ pub trait PrintOperationExt: 'static { #[doc(alias = "gtk_print_operation_set_use_full_page")] fn set_use_full_page(&self, full_page: bool); - fn get_property_allow_async(&self) -> bool; + #[doc(alias = "get_property_allow_async")] + fn allows_async(&self) -> bool; - fn get_property_current_page(&self) -> i32; + #[doc(alias = "get_property_current_page")] + fn current_page(&self) -> i32; - fn get_property_custom_tab_label(&self) -> Option; + #[doc(alias = "get_property_custom_tab_label")] + fn custom_tab_label(&self) -> Option; - fn get_property_export_filename(&self) -> Option; + #[doc(alias = "get_property_export_filename")] + fn export_filename(&self) -> Option; - fn get_property_job_name(&self) -> Option; + #[doc(alias = "get_property_job_name")] + fn job_name(&self) -> Option; - fn get_property_n_pages(&self) -> i32; + #[doc(alias = "get_property_n_pages")] + fn n_pages(&self) -> i32; - fn get_property_show_progress(&self) -> bool; + #[doc(alias = "get_property_show_progress")] + fn shows_progress(&self) -> bool; - fn get_property_track_print_status(&self) -> bool; + #[doc(alias = "get_property_track_print_status")] + fn tracks_print_status(&self) -> bool; - fn get_property_unit(&self) -> Unit; + #[doc(alias = "get_property_unit")] + fn unit(&self) -> Unit; - fn get_property_use_full_page(&self) -> bool; + #[doc(alias = "get_property_use_full_page")] + fn uses_full_page(&self) -> bool; fn connect_begin_print(&self, f: F) -> SignalHandlerId; @@ -441,7 +451,7 @@ impl> PrintOperationExt for O { } } - fn get_default_page_setup(&self) -> Option { + fn default_page_setup(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_operation_get_default_page_setup( self.as_ref().to_glib_none().0, @@ -449,7 +459,7 @@ impl> PrintOperationExt for O { } } - fn get_embed_page_setup(&self) -> bool { + fn embeds_page_setup(&self) -> bool { unsafe { from_glib(ffi::gtk_print_operation_get_embed_page_setup( self.as_ref().to_glib_none().0, @@ -457,7 +467,7 @@ impl> PrintOperationExt for O { } } - fn get_error(&self) -> Result<(), glib::Error> { + fn error(&self) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); let _ = ffi::gtk_print_operation_get_error(self.as_ref().to_glib_none().0, &mut error); @@ -469,7 +479,7 @@ impl> PrintOperationExt for O { } } - fn get_has_selection(&self) -> bool { + fn has_selection(&self) -> bool { unsafe { from_glib(ffi::gtk_print_operation_get_has_selection( self.as_ref().to_glib_none().0, @@ -477,11 +487,11 @@ impl> PrintOperationExt for O { } } - fn get_n_pages_to_print(&self) -> i32 { + fn n_pages_to_print(&self) -> i32 { unsafe { ffi::gtk_print_operation_get_n_pages_to_print(self.as_ref().to_glib_none().0) } } - fn get_print_settings(&self) -> Option { + fn print_settings(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_operation_get_print_settings( self.as_ref().to_glib_none().0, @@ -489,7 +499,7 @@ impl> PrintOperationExt for O { } } - fn get_status(&self) -> PrintStatus { + fn status(&self) -> PrintStatus { unsafe { from_glib(ffi::gtk_print_operation_get_status( self.as_ref().to_glib_none().0, @@ -497,7 +507,7 @@ impl> PrintOperationExt for O { } } - fn get_status_string(&self) -> Option { + fn status_string(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_operation_get_status_string( self.as_ref().to_glib_none().0, @@ -505,7 +515,7 @@ impl> PrintOperationExt for O { } } - fn get_support_selection(&self) -> bool { + fn supports_selection(&self) -> bool { unsafe { from_glib(ffi::gtk_print_operation_get_support_selection( self.as_ref().to_glib_none().0, @@ -674,7 +684,7 @@ impl> PrintOperationExt for O { } } - fn get_property_allow_async(&self) -> bool { + fn allows_async(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -689,7 +699,7 @@ impl> PrintOperationExt for O { } } - fn get_property_current_page(&self) -> i32 { + fn current_page(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -704,7 +714,7 @@ impl> PrintOperationExt for O { } } - fn get_property_custom_tab_label(&self) -> Option { + fn custom_tab_label(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -718,7 +728,7 @@ impl> PrintOperationExt for O { } } - fn get_property_export_filename(&self) -> Option { + fn export_filename(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -732,7 +742,7 @@ impl> PrintOperationExt for O { } } - fn get_property_job_name(&self) -> Option { + fn job_name(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -746,7 +756,7 @@ impl> PrintOperationExt for O { } } - fn get_property_n_pages(&self) -> i32 { + fn n_pages(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -761,7 +771,7 @@ impl> PrintOperationExt for O { } } - fn get_property_show_progress(&self) -> bool { + fn shows_progress(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -776,7 +786,7 @@ impl> PrintOperationExt for O { } } - fn get_property_track_print_status(&self) -> bool { + fn tracks_print_status(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -791,7 +801,7 @@ impl> PrintOperationExt for O { } } - fn get_property_unit(&self) -> Unit { + fn unit(&self) -> Unit { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -806,7 +816,7 @@ impl> PrintOperationExt for O { } } - fn get_property_use_full_page(&self) -> bool { + fn uses_full_page(&self) -> bool { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/print_settings.rs b/gtk/src/auto/print_settings.rs index 105d99beb052..7faeb83adf4a 100644 --- a/gtk/src/auto/print_settings.rs +++ b/gtk/src/auto/print_settings.rs @@ -133,12 +133,12 @@ impl PrintSettings { } #[doc(alias = "gtk_print_settings_get_collate")] - pub fn get_collate(&self) -> bool { + pub fn is_collate(&self) -> bool { unsafe { from_glib(ffi::gtk_print_settings_get_collate(self.to_glib_none().0)) } } #[doc(alias = "gtk_print_settings_get_default_source")] - pub fn get_default_source(&self) -> Option { + pub fn default_source(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_settings_get_default_source( self.to_glib_none().0, @@ -147,7 +147,7 @@ impl PrintSettings { } #[doc(alias = "gtk_print_settings_get_dither")] - pub fn get_dither(&self) -> Option { + pub fn dither(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_settings_get_dither(self.to_glib_none().0)) } } @@ -168,12 +168,12 @@ impl PrintSettings { } #[doc(alias = "gtk_print_settings_get_duplex")] - pub fn get_duplex(&self) -> PrintDuplex { + pub fn duplex(&self) -> PrintDuplex { unsafe { from_glib(ffi::gtk_print_settings_get_duplex(self.to_glib_none().0)) } } #[doc(alias = "gtk_print_settings_get_finishings")] - pub fn get_finishings(&self) -> Option { + pub fn finishings(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_settings_get_finishings( self.to_glib_none().0, @@ -209,7 +209,7 @@ impl PrintSettings { } #[doc(alias = "gtk_print_settings_get_media_type")] - pub fn get_media_type(&self) -> Option { + pub fn media_type(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_settings_get_media_type( self.to_glib_none().0, @@ -218,17 +218,17 @@ impl PrintSettings { } #[doc(alias = "gtk_print_settings_get_n_copies")] - pub fn get_n_copies(&self) -> i32 { + pub fn n_copies(&self) -> i32 { unsafe { ffi::gtk_print_settings_get_n_copies(self.to_glib_none().0) } } #[doc(alias = "gtk_print_settings_get_number_up")] - pub fn get_number_up(&self) -> i32 { + pub fn number_up(&self) -> i32 { unsafe { ffi::gtk_print_settings_get_number_up(self.to_glib_none().0) } } #[doc(alias = "gtk_print_settings_get_number_up_layout")] - pub fn get_number_up_layout(&self) -> NumberUpLayout { + pub fn number_up_layout(&self) -> NumberUpLayout { unsafe { from_glib(ffi::gtk_print_settings_get_number_up_layout( self.to_glib_none().0, @@ -237,7 +237,7 @@ impl PrintSettings { } #[doc(alias = "gtk_print_settings_get_orientation")] - pub fn get_orientation(&self) -> PageOrientation { + pub fn orientation(&self) -> PageOrientation { unsafe { from_glib(ffi::gtk_print_settings_get_orientation( self.to_glib_none().0, @@ -246,7 +246,7 @@ impl PrintSettings { } #[doc(alias = "gtk_print_settings_get_output_bin")] - pub fn get_output_bin(&self) -> Option { + pub fn output_bin(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_settings_get_output_bin( self.to_glib_none().0, @@ -255,7 +255,7 @@ impl PrintSettings { } #[doc(alias = "gtk_print_settings_get_page_ranges")] - pub fn get_page_ranges(&self) -> Vec { + pub fn page_ranges(&self) -> Vec { unsafe { let mut num_ranges = mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_full_num( @@ -270,7 +270,7 @@ impl PrintSettings { } #[doc(alias = "gtk_print_settings_get_page_set")] - pub fn get_page_set(&self) -> PageSet { + pub fn page_set(&self) -> PageSet { unsafe { from_glib(ffi::gtk_print_settings_get_page_set(self.to_glib_none().0)) } } @@ -280,7 +280,7 @@ impl PrintSettings { } #[doc(alias = "gtk_print_settings_get_paper_size")] - pub fn get_paper_size(&self) -> PaperSize { + pub fn paper_size(&self) -> PaperSize { unsafe { from_glib_full(ffi::gtk_print_settings_get_paper_size( self.to_glib_none().0, @@ -294,7 +294,7 @@ impl PrintSettings { } #[doc(alias = "gtk_print_settings_get_print_pages")] - pub fn get_print_pages(&self) -> PrintPages { + pub fn print_pages(&self) -> PrintPages { unsafe { from_glib(ffi::gtk_print_settings_get_print_pages( self.to_glib_none().0, @@ -303,47 +303,47 @@ impl PrintSettings { } #[doc(alias = "gtk_print_settings_get_printer")] - pub fn get_printer(&self) -> Option { + pub fn printer(&self) -> Option { unsafe { from_glib_none(ffi::gtk_print_settings_get_printer(self.to_glib_none().0)) } } #[doc(alias = "gtk_print_settings_get_printer_lpi")] - pub fn get_printer_lpi(&self) -> f64 { + pub fn printer_lpi(&self) -> f64 { unsafe { ffi::gtk_print_settings_get_printer_lpi(self.to_glib_none().0) } } #[doc(alias = "gtk_print_settings_get_quality")] - pub fn get_quality(&self) -> PrintQuality { + pub fn quality(&self) -> PrintQuality { unsafe { from_glib(ffi::gtk_print_settings_get_quality(self.to_glib_none().0)) } } #[doc(alias = "gtk_print_settings_get_resolution")] - pub fn get_resolution(&self) -> i32 { + pub fn resolution(&self) -> i32 { unsafe { ffi::gtk_print_settings_get_resolution(self.to_glib_none().0) } } #[doc(alias = "gtk_print_settings_get_resolution_x")] - pub fn get_resolution_x(&self) -> i32 { + pub fn resolution_x(&self) -> i32 { unsafe { ffi::gtk_print_settings_get_resolution_x(self.to_glib_none().0) } } #[doc(alias = "gtk_print_settings_get_resolution_y")] - pub fn get_resolution_y(&self) -> i32 { + pub fn resolution_y(&self) -> i32 { unsafe { ffi::gtk_print_settings_get_resolution_y(self.to_glib_none().0) } } #[doc(alias = "gtk_print_settings_get_reverse")] - pub fn get_reverse(&self) -> bool { + pub fn is_reverse(&self) -> bool { unsafe { from_glib(ffi::gtk_print_settings_get_reverse(self.to_glib_none().0)) } } #[doc(alias = "gtk_print_settings_get_scale")] - pub fn get_scale(&self) -> f64 { + pub fn scale(&self) -> f64 { unsafe { ffi::gtk_print_settings_get_scale(self.to_glib_none().0) } } #[doc(alias = "gtk_print_settings_get_use_color")] - pub fn get_use_color(&self) -> bool { + pub fn uses_color(&self) -> bool { unsafe { from_glib(ffi::gtk_print_settings_get_use_color(self.to_glib_none().0)) } } diff --git a/gtk/src/auto/progress_bar.rs b/gtk/src/auto/progress_bar.rs index d1b6c50d3cd2..16a75b72712d 100644 --- a/gtk/src/auto/progress_bar.rs +++ b/gtk/src/auto/progress_bar.rs @@ -417,22 +417,22 @@ pub const NONE_PROGRESS_BAR: Option<&ProgressBar> = None; pub trait ProgressBarExt: 'static { #[doc(alias = "gtk_progress_bar_get_ellipsize")] - fn get_ellipsize(&self) -> pango::EllipsizeMode; + fn ellipsize(&self) -> pango::EllipsizeMode; #[doc(alias = "gtk_progress_bar_get_fraction")] - fn get_fraction(&self) -> f64; + fn fraction(&self) -> f64; #[doc(alias = "gtk_progress_bar_get_inverted")] - fn get_inverted(&self) -> bool; + fn is_inverted(&self) -> bool; #[doc(alias = "gtk_progress_bar_get_pulse_step")] - fn get_pulse_step(&self) -> f64; + fn pulse_step(&self) -> f64; #[doc(alias = "gtk_progress_bar_get_show_text")] - fn get_show_text(&self) -> bool; + fn shows_text(&self) -> bool; #[doc(alias = "gtk_progress_bar_get_text")] - fn get_text(&self) -> Option; + fn text(&self) -> Option; #[doc(alias = "gtk_progress_bar_pulse")] fn pulse(&self); @@ -469,7 +469,7 @@ pub trait ProgressBarExt: 'static { } impl> ProgressBarExt for O { - fn get_ellipsize(&self) -> pango::EllipsizeMode { + fn ellipsize(&self) -> pango::EllipsizeMode { unsafe { from_glib(ffi::gtk_progress_bar_get_ellipsize( self.as_ref().to_glib_none().0, @@ -477,11 +477,11 @@ impl> ProgressBarExt for O { } } - fn get_fraction(&self) -> f64 { + fn fraction(&self) -> f64 { unsafe { ffi::gtk_progress_bar_get_fraction(self.as_ref().to_glib_none().0) } } - fn get_inverted(&self) -> bool { + fn is_inverted(&self) -> bool { unsafe { from_glib(ffi::gtk_progress_bar_get_inverted( self.as_ref().to_glib_none().0, @@ -489,11 +489,11 @@ impl> ProgressBarExt for O { } } - fn get_pulse_step(&self) -> f64 { + fn pulse_step(&self) -> f64 { unsafe { ffi::gtk_progress_bar_get_pulse_step(self.as_ref().to_glib_none().0) } } - fn get_show_text(&self) -> bool { + fn shows_text(&self) -> bool { unsafe { from_glib(ffi::gtk_progress_bar_get_show_text( self.as_ref().to_glib_none().0, @@ -501,7 +501,7 @@ impl> ProgressBarExt for O { } } - fn get_text(&self) -> Option { + fn text(&self) -> Option { unsafe { from_glib_none(ffi::gtk_progress_bar_get_text( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/radio_button.rs b/gtk/src/auto/radio_button.rs index df1b22a7f46d..27398d52bf71 100644 --- a/gtk/src/auto/radio_button.rs +++ b/gtk/src/auto/radio_button.rs @@ -515,7 +515,7 @@ pub const NONE_RADIO_BUTTON: Option<&RadioButton> = None; pub trait RadioButtonExt: 'static { #[doc(alias = "gtk_radio_button_get_group")] - fn get_group(&self) -> Vec; + fn group(&self) -> Vec; #[doc(alias = "gtk_radio_button_join_group")] fn join_group>(&self, group_source: Option<&P>); @@ -524,7 +524,7 @@ pub trait RadioButtonExt: 'static { } impl> RadioButtonExt for O { - fn get_group(&self) -> Vec { + fn group(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gtk_radio_button_get_group( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/radio_menu_item.rs b/gtk/src/auto/radio_menu_item.rs index 88887c7a162b..64ecbff5b6da 100644 --- a/gtk/src/auto/radio_menu_item.rs +++ b/gtk/src/auto/radio_menu_item.rs @@ -504,7 +504,7 @@ pub const NONE_RADIO_MENU_ITEM: Option<&RadioMenuItem> = None; pub trait RadioMenuItemExt: 'static { #[doc(alias = "gtk_radio_menu_item_get_group")] - fn get_group(&self) -> Vec; + fn group(&self) -> Vec; #[cfg(any(feature = "v3_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_18")))] @@ -515,7 +515,7 @@ pub trait RadioMenuItemExt: 'static { } impl> RadioMenuItemExt for O { - fn get_group(&self) -> Vec { + fn group(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gtk_radio_menu_item_get_group( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/radio_tool_button.rs b/gtk/src/auto/radio_tool_button.rs index 7e7650304f68..59067ea62055 100644 --- a/gtk/src/auto/radio_tool_button.rs +++ b/gtk/src/auto/radio_tool_button.rs @@ -480,11 +480,11 @@ pub const NONE_RADIO_TOOL_BUTTON: Option<&RadioToolButton> = None; pub trait RadioToolButtonExt: 'static { #[doc(alias = "gtk_radio_tool_button_get_group")] - fn get_group(&self) -> Vec; + fn group(&self) -> Vec; } impl> RadioToolButtonExt for O { - fn get_group(&self) -> Vec { + fn group(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_none(ffi::gtk_radio_tool_button_get_group( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/range.rs b/gtk/src/auto/range.rs index c4815c78854b..9d28122a39cc 100644 --- a/gtk/src/auto/range.rs +++ b/gtk/src/auto/range.rs @@ -31,47 +31,47 @@ pub const NONE_RANGE: Option<&Range> = None; pub trait RangeExt: 'static { #[doc(alias = "gtk_range_get_adjustment")] - fn get_adjustment(&self) -> Adjustment; + fn adjustment(&self) -> Adjustment; #[doc(alias = "gtk_range_get_fill_level")] - fn get_fill_level(&self) -> f64; + fn fill_level(&self) -> f64; #[doc(alias = "gtk_range_get_flippable")] - fn get_flippable(&self) -> bool; + fn is_flippable(&self) -> bool; #[doc(alias = "gtk_range_get_inverted")] - fn get_inverted(&self) -> bool; + fn is_inverted(&self) -> bool; #[doc(alias = "gtk_range_get_lower_stepper_sensitivity")] - fn get_lower_stepper_sensitivity(&self) -> SensitivityType; + fn lower_stepper_sensitivity(&self) -> SensitivityType; #[cfg_attr(feature = "v3_20", deprecated)] #[doc(alias = "gtk_range_get_min_slider_size")] - fn get_min_slider_size(&self) -> i32; + fn min_slider_size(&self) -> i32; #[doc(alias = "gtk_range_get_range_rect")] - fn get_range_rect(&self) -> gdk::Rectangle; + fn range_rect(&self) -> gdk::Rectangle; #[doc(alias = "gtk_range_get_restrict_to_fill_level")] - fn get_restrict_to_fill_level(&self) -> bool; + fn restricts_to_fill_level(&self) -> bool; #[doc(alias = "gtk_range_get_round_digits")] - fn get_round_digits(&self) -> i32; + fn round_digits(&self) -> i32; #[doc(alias = "gtk_range_get_show_fill_level")] - fn get_show_fill_level(&self) -> bool; + fn shows_fill_level(&self) -> bool; #[doc(alias = "gtk_range_get_slider_range")] - fn get_slider_range(&self) -> (i32, i32); + fn slider_range(&self) -> (i32, i32); #[doc(alias = "gtk_range_get_slider_size_fixed")] - fn get_slider_size_fixed(&self) -> bool; + fn is_slider_size_fixed(&self) -> bool; #[doc(alias = "gtk_range_get_upper_stepper_sensitivity")] - fn get_upper_stepper_sensitivity(&self) -> SensitivityType; + fn upper_stepper_sensitivity(&self) -> SensitivityType; #[doc(alias = "gtk_range_get_value")] - fn get_value(&self) -> f64; + fn value(&self) -> f64; #[doc(alias = "gtk_range_set_adjustment")] fn set_adjustment>(&self, adjustment: &P); @@ -160,7 +160,7 @@ pub trait RangeExt: 'static { } impl> RangeExt for O { - fn get_adjustment(&self) -> Adjustment { + fn adjustment(&self) -> Adjustment { unsafe { from_glib_none(ffi::gtk_range_get_adjustment( self.as_ref().to_glib_none().0, @@ -168,19 +168,19 @@ impl> RangeExt for O { } } - fn get_fill_level(&self) -> f64 { + fn fill_level(&self) -> f64 { unsafe { ffi::gtk_range_get_fill_level(self.as_ref().to_glib_none().0) } } - fn get_flippable(&self) -> bool { + fn is_flippable(&self) -> bool { unsafe { from_glib(ffi::gtk_range_get_flippable(self.as_ref().to_glib_none().0)) } } - fn get_inverted(&self) -> bool { + fn is_inverted(&self) -> bool { unsafe { from_glib(ffi::gtk_range_get_inverted(self.as_ref().to_glib_none().0)) } } - fn get_lower_stepper_sensitivity(&self) -> SensitivityType { + fn lower_stepper_sensitivity(&self) -> SensitivityType { unsafe { from_glib(ffi::gtk_range_get_lower_stepper_sensitivity( self.as_ref().to_glib_none().0, @@ -188,11 +188,11 @@ impl> RangeExt for O { } } - fn get_min_slider_size(&self) -> i32 { + fn min_slider_size(&self) -> i32 { unsafe { ffi::gtk_range_get_min_slider_size(self.as_ref().to_glib_none().0) } } - fn get_range_rect(&self) -> gdk::Rectangle { + fn range_rect(&self) -> gdk::Rectangle { unsafe { let mut range_rect = gdk::Rectangle::uninitialized(); ffi::gtk_range_get_range_rect( @@ -203,7 +203,7 @@ impl> RangeExt for O { } } - fn get_restrict_to_fill_level(&self) -> bool { + fn restricts_to_fill_level(&self) -> bool { unsafe { from_glib(ffi::gtk_range_get_restrict_to_fill_level( self.as_ref().to_glib_none().0, @@ -211,11 +211,11 @@ impl> RangeExt for O { } } - fn get_round_digits(&self) -> i32 { + fn round_digits(&self) -> i32 { unsafe { ffi::gtk_range_get_round_digits(self.as_ref().to_glib_none().0) } } - fn get_show_fill_level(&self) -> bool { + fn shows_fill_level(&self) -> bool { unsafe { from_glib(ffi::gtk_range_get_show_fill_level( self.as_ref().to_glib_none().0, @@ -223,7 +223,7 @@ impl> RangeExt for O { } } - fn get_slider_range(&self) -> (i32, i32) { + fn slider_range(&self) -> (i32, i32) { unsafe { let mut slider_start = mem::MaybeUninit::uninit(); let mut slider_end = mem::MaybeUninit::uninit(); @@ -238,7 +238,7 @@ impl> RangeExt for O { } } - fn get_slider_size_fixed(&self) -> bool { + fn is_slider_size_fixed(&self) -> bool { unsafe { from_glib(ffi::gtk_range_get_slider_size_fixed( self.as_ref().to_glib_none().0, @@ -246,7 +246,7 @@ impl> RangeExt for O { } } - fn get_upper_stepper_sensitivity(&self) -> SensitivityType { + fn upper_stepper_sensitivity(&self) -> SensitivityType { unsafe { from_glib(ffi::gtk_range_get_upper_stepper_sensitivity( self.as_ref().to_glib_none().0, @@ -254,7 +254,7 @@ impl> RangeExt for O { } } - fn get_value(&self) -> f64 { + fn value(&self) -> f64 { unsafe { ffi::gtk_range_get_value(self.as_ref().to_glib_none().0) } } diff --git a/gtk/src/auto/recent_chooser.rs b/gtk/src/auto/recent_chooser.rs index 399c2b730ec6..3cd0f59356be 100644 --- a/gtk/src/auto/recent_chooser.rs +++ b/gtk/src/auto/recent_chooser.rs @@ -31,43 +31,43 @@ pub trait RecentChooserExt: 'static { fn add_filter(&self, filter: &RecentFilter); #[doc(alias = "gtk_recent_chooser_get_current_item")] - fn get_current_item(&self) -> Option; + fn current_item(&self) -> Option; #[doc(alias = "gtk_recent_chooser_get_current_uri")] - fn get_current_uri(&self) -> Option; + fn current_uri(&self) -> Option; #[doc(alias = "gtk_recent_chooser_get_filter")] - fn get_filter(&self) -> Option; + fn filter(&self) -> Option; #[doc(alias = "gtk_recent_chooser_get_items")] - fn get_items(&self) -> Vec; + fn items(&self) -> Vec; #[doc(alias = "gtk_recent_chooser_get_limit")] - fn get_limit(&self) -> i32; + fn limit(&self) -> i32; #[doc(alias = "gtk_recent_chooser_get_local_only")] - fn get_local_only(&self) -> bool; + fn is_local_only(&self) -> bool; #[doc(alias = "gtk_recent_chooser_get_select_multiple")] - fn get_select_multiple(&self) -> bool; + fn selects_multiple(&self) -> bool; #[doc(alias = "gtk_recent_chooser_get_show_icons")] - fn get_show_icons(&self) -> bool; + fn shows_icons(&self) -> bool; #[doc(alias = "gtk_recent_chooser_get_show_not_found")] - fn get_show_not_found(&self) -> bool; + fn shows_not_found(&self) -> bool; #[doc(alias = "gtk_recent_chooser_get_show_private")] - fn get_show_private(&self) -> bool; + fn shows_private(&self) -> bool; #[doc(alias = "gtk_recent_chooser_get_show_tips")] - fn get_show_tips(&self) -> bool; + fn shows_tips(&self) -> bool; #[doc(alias = "gtk_recent_chooser_get_sort_type")] - fn get_sort_type(&self) -> RecentSortType; + fn sort_type(&self) -> RecentSortType; #[doc(alias = "gtk_recent_chooser_get_uris")] - fn get_uris(&self) -> Vec; + fn uris(&self) -> Vec; #[doc(alias = "gtk_recent_chooser_list_filters")] fn list_filters(&self) -> Vec; @@ -160,7 +160,7 @@ impl> RecentChooserExt for O { } } - fn get_current_item(&self) -> Option { + fn current_item(&self) -> Option { unsafe { from_glib_full(ffi::gtk_recent_chooser_get_current_item( self.as_ref().to_glib_none().0, @@ -168,7 +168,7 @@ impl> RecentChooserExt for O { } } - fn get_current_uri(&self) -> Option { + fn current_uri(&self) -> Option { unsafe { from_glib_full(ffi::gtk_recent_chooser_get_current_uri( self.as_ref().to_glib_none().0, @@ -176,7 +176,7 @@ impl> RecentChooserExt for O { } } - fn get_filter(&self) -> Option { + fn filter(&self) -> Option { unsafe { from_glib_none(ffi::gtk_recent_chooser_get_filter( self.as_ref().to_glib_none().0, @@ -184,7 +184,7 @@ impl> RecentChooserExt for O { } } - fn get_items(&self) -> Vec { + fn items(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gtk_recent_chooser_get_items( self.as_ref().to_glib_none().0, @@ -192,11 +192,11 @@ impl> RecentChooserExt for O { } } - fn get_limit(&self) -> i32 { + fn limit(&self) -> i32 { unsafe { ffi::gtk_recent_chooser_get_limit(self.as_ref().to_glib_none().0) } } - fn get_local_only(&self) -> bool { + fn is_local_only(&self) -> bool { unsafe { from_glib(ffi::gtk_recent_chooser_get_local_only( self.as_ref().to_glib_none().0, @@ -204,7 +204,7 @@ impl> RecentChooserExt for O { } } - fn get_select_multiple(&self) -> bool { + fn selects_multiple(&self) -> bool { unsafe { from_glib(ffi::gtk_recent_chooser_get_select_multiple( self.as_ref().to_glib_none().0, @@ -212,7 +212,7 @@ impl> RecentChooserExt for O { } } - fn get_show_icons(&self) -> bool { + fn shows_icons(&self) -> bool { unsafe { from_glib(ffi::gtk_recent_chooser_get_show_icons( self.as_ref().to_glib_none().0, @@ -220,7 +220,7 @@ impl> RecentChooserExt for O { } } - fn get_show_not_found(&self) -> bool { + fn shows_not_found(&self) -> bool { unsafe { from_glib(ffi::gtk_recent_chooser_get_show_not_found( self.as_ref().to_glib_none().0, @@ -228,7 +228,7 @@ impl> RecentChooserExt for O { } } - fn get_show_private(&self) -> bool { + fn shows_private(&self) -> bool { unsafe { from_glib(ffi::gtk_recent_chooser_get_show_private( self.as_ref().to_glib_none().0, @@ -236,7 +236,7 @@ impl> RecentChooserExt for O { } } - fn get_show_tips(&self) -> bool { + fn shows_tips(&self) -> bool { unsafe { from_glib(ffi::gtk_recent_chooser_get_show_tips( self.as_ref().to_glib_none().0, @@ -244,7 +244,7 @@ impl> RecentChooserExt for O { } } - fn get_sort_type(&self) -> RecentSortType { + fn sort_type(&self) -> RecentSortType { unsafe { from_glib(ffi::gtk_recent_chooser_get_sort_type( self.as_ref().to_glib_none().0, @@ -252,7 +252,7 @@ impl> RecentChooserExt for O { } } - fn get_uris(&self) -> Vec { + fn uris(&self) -> Vec { unsafe { let mut length = mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_full_num( diff --git a/gtk/src/auto/recent_chooser_dialog.rs b/gtk/src/auto/recent_chooser_dialog.rs index 443584f328f7..1855307617a0 100644 --- a/gtk/src/auto/recent_chooser_dialog.rs +++ b/gtk/src/auto/recent_chooser_dialog.rs @@ -38,7 +38,7 @@ impl RecentChooserDialog { //} //#[doc(alias = "gtk_recent_chooser_dialog_new_for_manager")] - //pub fn new_for_manager, Q: IsA>(title: Option<&str>, parent: Option<&P>, manager: &Q, first_button_text: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> RecentChooserDialog { + //pub fn for_manager, Q: IsA>(title: Option<&str>, parent: Option<&P>, manager: &Q, first_button_text: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> RecentChooserDialog { // unsafe { TODO: call ffi:gtk_recent_chooser_dialog_new_for_manager() } //} } diff --git a/gtk/src/auto/recent_chooser_menu.rs b/gtk/src/auto/recent_chooser_menu.rs index 7142ccafe6cc..e89065b2d51a 100644 --- a/gtk/src/auto/recent_chooser_menu.rs +++ b/gtk/src/auto/recent_chooser_menu.rs @@ -41,7 +41,7 @@ impl RecentChooserMenu { } #[doc(alias = "gtk_recent_chooser_menu_new_for_manager")] - pub fn new_for_manager>(manager: &P) -> RecentChooserMenu { + pub fn for_manager>(manager: &P) -> RecentChooserMenu { skip_assert_initialized!(); unsafe { Widget::from_glib_none(ffi::gtk_recent_chooser_menu_new_for_manager( @@ -616,7 +616,7 @@ pub const NONE_RECENT_CHOOSER_MENU: Option<&RecentChooserMenu> = None; pub trait RecentChooserMenuExt: 'static { #[doc(alias = "gtk_recent_chooser_menu_get_show_numbers")] - fn get_show_numbers(&self) -> bool; + fn shows_numbers(&self) -> bool; #[doc(alias = "gtk_recent_chooser_menu_set_show_numbers")] fn set_show_numbers(&self, show_numbers: bool); @@ -626,7 +626,7 @@ pub trait RecentChooserMenuExt: 'static { } impl> RecentChooserMenuExt for O { - fn get_show_numbers(&self) -> bool { + fn shows_numbers(&self) -> bool { unsafe { from_glib(ffi::gtk_recent_chooser_menu_get_show_numbers( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/recent_chooser_widget.rs b/gtk/src/auto/recent_chooser_widget.rs index fa578c4df587..a5d8f343999b 100644 --- a/gtk/src/auto/recent_chooser_widget.rs +++ b/gtk/src/auto/recent_chooser_widget.rs @@ -38,7 +38,7 @@ impl RecentChooserWidget { } #[doc(alias = "gtk_recent_chooser_widget_new_for_manager")] - pub fn new_for_manager>(manager: &P) -> RecentChooserWidget { + pub fn for_manager>(manager: &P) -> RecentChooserWidget { skip_assert_initialized!(); unsafe { Widget::from_glib_none(ffi::gtk_recent_chooser_widget_new_for_manager( diff --git a/gtk/src/auto/recent_filter.rs b/gtk/src/auto/recent_filter.rs index 6d6c2d32a969..dd8ca45b76ff 100644 --- a/gtk/src/auto/recent_filter.rs +++ b/gtk/src/auto/recent_filter.rs @@ -78,12 +78,12 @@ impl RecentFilter { //} #[doc(alias = "gtk_recent_filter_get_name")] - pub fn get_name(&self) -> Option { + pub fn name(&self) -> Option { unsafe { from_glib_none(ffi::gtk_recent_filter_get_name(self.to_glib_none().0)) } } #[doc(alias = "gtk_recent_filter_get_needed")] - pub fn get_needed(&self) -> RecentFilterFlags { + pub fn needed(&self) -> RecentFilterFlags { unsafe { from_glib(ffi::gtk_recent_filter_get_needed(self.to_glib_none().0)) } } diff --git a/gtk/src/auto/recent_info.rs b/gtk/src/auto/recent_info.rs index f1c2b7a0705b..09a18369fd77 100644 --- a/gtk/src/auto/recent_info.rs +++ b/gtk/src/auto/recent_info.rs @@ -44,12 +44,12 @@ impl RecentInfo { } #[doc(alias = "gtk_recent_info_get_added")] - pub fn get_added(&self) -> libc::c_long { + pub fn added(&self) -> libc::c_long { unsafe { ffi::gtk_recent_info_get_added(self.to_glib_none().0) } } #[doc(alias = "gtk_recent_info_get_age")] - pub fn get_age(&self) -> i32 { + pub fn age(&self) -> i32 { unsafe { ffi::gtk_recent_info_get_age(self.to_glib_none().0) } } @@ -80,7 +80,7 @@ impl RecentInfo { } #[doc(alias = "gtk_recent_info_get_applications")] - pub fn get_applications(&self) -> Vec { + pub fn applications(&self) -> Vec { unsafe { let mut length = mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_full_num( @@ -92,22 +92,22 @@ impl RecentInfo { } #[doc(alias = "gtk_recent_info_get_description")] - pub fn get_description(&self) -> Option { + pub fn description(&self) -> Option { unsafe { from_glib_none(ffi::gtk_recent_info_get_description(self.to_glib_none().0)) } } #[doc(alias = "gtk_recent_info_get_display_name")] - pub fn get_display_name(&self) -> Option { + pub fn display_name(&self) -> Option { unsafe { from_glib_none(ffi::gtk_recent_info_get_display_name(self.to_glib_none().0)) } } #[doc(alias = "gtk_recent_info_get_gicon")] - pub fn get_gicon(&self) -> Option { + pub fn gicon(&self) -> Option { unsafe { from_glib_full(ffi::gtk_recent_info_get_gicon(self.to_glib_none().0)) } } #[doc(alias = "gtk_recent_info_get_groups")] - pub fn get_groups(&self) -> Vec { + pub fn groups(&self) -> Vec { unsafe { let mut length = mem::MaybeUninit::uninit(); let ret = FromGlibContainer::from_glib_full_num( @@ -124,37 +124,37 @@ impl RecentInfo { } #[doc(alias = "gtk_recent_info_get_mime_type")] - pub fn get_mime_type(&self) -> Option { + pub fn mime_type(&self) -> Option { unsafe { from_glib_none(ffi::gtk_recent_info_get_mime_type(self.to_glib_none().0)) } } #[doc(alias = "gtk_recent_info_get_modified")] - pub fn get_modified(&self) -> libc::c_long { + pub fn modified(&self) -> libc::c_long { unsafe { ffi::gtk_recent_info_get_modified(self.to_glib_none().0) } } #[doc(alias = "gtk_recent_info_get_private_hint")] - pub fn get_private_hint(&self) -> bool { + pub fn is_private_hint(&self) -> bool { unsafe { from_glib(ffi::gtk_recent_info_get_private_hint(self.to_glib_none().0)) } } #[doc(alias = "gtk_recent_info_get_short_name")] - pub fn get_short_name(&self) -> Option { + pub fn short_name(&self) -> Option { unsafe { from_glib_full(ffi::gtk_recent_info_get_short_name(self.to_glib_none().0)) } } #[doc(alias = "gtk_recent_info_get_uri")] - pub fn get_uri(&self) -> Option { + pub fn uri(&self) -> Option { unsafe { from_glib_none(ffi::gtk_recent_info_get_uri(self.to_glib_none().0)) } } #[doc(alias = "gtk_recent_info_get_uri_display")] - pub fn get_uri_display(&self) -> Option { + pub fn uri_display(&self) -> Option { unsafe { from_glib_full(ffi::gtk_recent_info_get_uri_display(self.to_glib_none().0)) } } #[doc(alias = "gtk_recent_info_get_visited")] - pub fn get_visited(&self) -> libc::c_long { + pub fn visited(&self) -> libc::c_long { unsafe { ffi::gtk_recent_info_get_visited(self.to_glib_none().0) } } diff --git a/gtk/src/auto/recent_manager.rs b/gtk/src/auto/recent_manager.rs index 2d9391587a71..d3c74e3be6fc 100644 --- a/gtk/src/auto/recent_manager.rs +++ b/gtk/src/auto/recent_manager.rs @@ -79,7 +79,7 @@ pub trait RecentManagerExt: 'static { fn add_item(&self, uri: &str) -> bool; #[doc(alias = "gtk_recent_manager_get_items")] - fn get_items(&self) -> Vec; + fn items(&self) -> Vec; #[doc(alias = "gtk_recent_manager_has_item")] fn has_item(&self, uri: &str) -> bool; @@ -96,9 +96,11 @@ pub trait RecentManagerExt: 'static { #[doc(alias = "gtk_recent_manager_remove_item")] fn remove_item(&self, uri: &str) -> Result<(), glib::Error>; - fn get_property_filename(&self) -> Option; + #[doc(alias = "get_property_filename")] + fn filename(&self) -> Option; - fn get_property_size(&self) -> i32; + #[doc(alias = "get_property_size")] + fn size(&self) -> i32; fn connect_changed(&self, f: F) -> SignalHandlerId; @@ -125,7 +127,7 @@ impl> RecentManagerExt for O { } } - fn get_items(&self) -> Vec { + fn items(&self) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::gtk_recent_manager_get_items( self.as_ref().to_glib_none().0, @@ -204,7 +206,7 @@ impl> RecentManagerExt for O { } } - fn get_property_filename(&self) -> Option { + fn filename(&self) -> Option { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( @@ -218,7 +220,7 @@ impl> RecentManagerExt for O { } } - fn get_property_size(&self) -> i32 { + fn size(&self) -> i32 { unsafe { let mut value = glib::Value::from_type(::static_type()); glib::gobject_ffi::g_object_get_property( diff --git a/gtk/src/auto/revealer.rs b/gtk/src/auto/revealer.rs index e674fdc1fe9c..6432978b4596 100644 --- a/gtk/src/auto/revealer.rs +++ b/gtk/src/auto/revealer.rs @@ -409,16 +409,16 @@ pub const NONE_REVEALER: Option<&Revealer> = None; pub trait RevealerExt: 'static { #[doc(alias = "gtk_revealer_get_child_revealed")] - fn get_child_revealed(&self) -> bool; + fn is_child_revealed(&self) -> bool; #[doc(alias = "gtk_revealer_get_reveal_child")] - fn get_reveal_child(&self) -> bool; + fn reveals_child(&self) -> bool; #[doc(alias = "gtk_revealer_get_transition_duration")] - fn get_transition_duration(&self) -> u32; + fn transition_duration(&self) -> u32; #[doc(alias = "gtk_revealer_get_transition_type")] - fn get_transition_type(&self) -> RevealerTransitionType; + fn transition_type(&self) -> RevealerTransitionType; #[doc(alias = "gtk_revealer_set_reveal_child")] fn set_reveal_child(&self, reveal_child: bool); @@ -449,7 +449,7 @@ pub trait RevealerExt: 'static { } impl> RevealerExt for O { - fn get_child_revealed(&self) -> bool { + fn is_child_revealed(&self) -> bool { unsafe { from_glib(ffi::gtk_revealer_get_child_revealed( self.as_ref().to_glib_none().0, @@ -457,7 +457,7 @@ impl> RevealerExt for O { } } - fn get_reveal_child(&self) -> bool { + fn reveals_child(&self) -> bool { unsafe { from_glib(ffi::gtk_revealer_get_reveal_child( self.as_ref().to_glib_none().0, @@ -465,11 +465,11 @@ impl> RevealerExt for O { } } - fn get_transition_duration(&self) -> u32 { + fn transition_duration(&self) -> u32 { unsafe { ffi::gtk_revealer_get_transition_duration(self.as_ref().to_glib_none().0) } } - fn get_transition_type(&self) -> RevealerTransitionType { + fn transition_type(&self) -> RevealerTransitionType { unsafe { from_glib(ffi::gtk_revealer_get_transition_type( self.as_ref().to_glib_none().0, diff --git a/gtk/src/auto/scale.rs b/gtk/src/auto/scale.rs index e5e655eb1167..a3766a228dff 100644 --- a/gtk/src/auto/scale.rs +++ b/gtk/src/auto/scale.rs @@ -496,22 +496,22 @@ pub trait ScaleExt: 'static { fn clear_marks(&self); #[doc(alias = "gtk_scale_get_digits")] - fn get_digits(&self) -> i32; + fn digits(&self) -> i32; #[doc(alias = "gtk_scale_get_draw_value")] - fn get_draw_value(&self) -> bool; + fn draws_value(&self) -> bool; #[doc(alias = "gtk_scale_get_has_origin")] - fn get_has_origin(&self) -> bool; + fn has_origin(&self) -> bool; #[doc(alias = "gtk_scale_get_layout")] - fn get_layout(&self) -> Option; + fn layout(&self) -> Option; #[doc(alias = "gtk_scale_get_layout_offsets")] - fn get_layout_offsets(&self) -> (i32, i32); + fn layout_offsets(&self) -> (i32, i32); #[doc(alias = "gtk_scale_get_value_pos")] - fn get_value_pos(&self) -> PositionType; + fn value_pos(&self) -> PositionType; #[doc(alias = "gtk_scale_set_digits")] fn set_digits(&self, digits: i32); @@ -554,11 +554,11 @@ impl> ScaleExt for O { } } - fn get_digits(&self) -> i32 { + fn digits(&self) -> i32 { unsafe { ffi::gtk_scale_get_digits(self.as_ref().to_glib_none().0) } } - fn get_draw_value(&self) -> bool { + fn draws_value(&self) -> bool { unsafe { from_glib(ffi::gtk_scale_get_draw_value( self.as_ref().to_glib_none().0, @@ -566,7 +566,7 @@ impl> ScaleExt for O { } } - fn get_has_origin(&self) -> bool { + fn has_origin(&self) -> bool { unsafe { from_glib(ffi::gtk_scale_get_has_origin( self.as_ref().to_glib_none().0, @@ -574,11 +574,11 @@ impl> ScaleExt for O { } } - fn get_layout(&self) -> Option { + fn layout(&self) -> Option { unsafe { from_glib_none(ffi::gtk_scale_get_layout(self.as_ref().to_glib_none().0)) } } - fn get_layout_offsets(&self) -> (i32, i32) { + fn layout_offsets(&self) -> (i32, i32) { unsafe { let mut x = mem::MaybeUninit::uninit(); let mut y = mem::MaybeUninit::uninit(); @@ -593,7 +593,7 @@ impl> ScaleExt for O { } } - fn get_value_pos(&self) -> PositionType { + fn value_pos(&self) -> PositionType { unsafe { from_glib(ffi::gtk_scale_get_value_pos(self.as_ref().to_glib_none().0)) } } diff --git a/gtk/src/auto/scale_button.rs b/gtk/src/auto/scale_button.rs index 96b8f330aeac..1490d53f8678 100644 --- a/gtk/src/auto/scale_button.rs +++ b/gtk/src/auto/scale_button.rs @@ -510,19 +510,19 @@ pub const NONE_SCALE_BUTTON: Option<&ScaleButton> = None; pub trait ScaleButtonExt: 'static { #[doc(alias = "gtk_scale_button_get_adjustment")] - fn get_adjustment(&self) -> Adjustment; + fn adjustment(&self) -> Adjustment; #[doc(alias = "gtk_scale_button_get_minus_button")] - fn get_minus_button(&self) -> Option