Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #487 from sdroege/trait-reexports
Browse files Browse the repository at this point in the history
Don't re-export traits from crate root
  • Loading branch information
sdroege authored Apr 26, 2021
2 parents 6b63e7c + 3c602a7 commit 63f9f2f
Show file tree
Hide file tree
Showing 102 changed files with 529 additions and 851 deletions.
75 changes: 25 additions & 50 deletions atk/src/auto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,33 @@
// DO NOT EDIT

mod action;
pub use self::action::AtkActionExt;
pub use self::action::{Action, NONE_ACTION};

mod component;
pub use self::component::ComponentExt;
pub use self::component::{Component, NONE_COMPONENT};

mod document;
pub use self::document::DocumentExt;
pub use self::document::{Document, NONE_DOCUMENT};

mod editable_text;
pub use self::editable_text::EditableTextExt;
pub use self::editable_text::{EditableText, NONE_EDITABLE_TEXT};

mod gobject_accessible;
pub use self::gobject_accessible::GObjectAccessibleExt;
pub use self::gobject_accessible::{GObjectAccessible, NONE_GOBJECT_ACCESSIBLE};

mod hyperlink;
pub use self::hyperlink::HyperlinkExt;
pub use self::hyperlink::{Hyperlink, NONE_HYPERLINK};

mod hyperlink_impl;
pub use self::hyperlink_impl::HyperlinkImplExt;
pub use self::hyperlink_impl::{HyperlinkImpl, NONE_HYPERLINK_IMPL};

mod hypertext;
pub use self::hypertext::HypertextExt;
pub use self::hypertext::{Hypertext, NONE_HYPERTEXT};

mod image;
pub use self::image::AtkImageExt;
pub use self::image::{Image, NONE_IMAGE};

mod misc;
pub use self::misc::AtkMiscExt;
pub use self::misc::{Misc, NONE_MISC};

mod no_op_object;
Expand All @@ -49,66 +39,51 @@ mod no_op_object_factory;
pub use self::no_op_object_factory::{NoOpObjectFactory, NONE_NO_OP_OBJECT_FACTORY};

mod object;
pub use self::object::AtkObjectExt;
pub use self::object::{Object, NONE_OBJECT};

mod object_factory;
pub use self::object_factory::ObjectFactoryExt;
pub use self::object_factory::{ObjectFactory, NONE_OBJECT_FACTORY};

mod plug;
pub use self::plug::AtkPlugExt;
pub use self::plug::{Plug, NONE_PLUG};

mod registry;
pub use self::registry::RegistryExt;
pub use self::registry::{Registry, NONE_REGISTRY};

mod relation;
pub use self::relation::RelationExt;
pub use self::relation::{Relation, NONE_RELATION};

mod relation_set;
pub use self::relation_set::RelationSetExt;
pub use self::relation_set::{RelationSet, NONE_RELATION_SET};

mod selection;
pub use self::selection::SelectionExt;
pub use self::selection::{Selection, NONE_SELECTION};

mod socket;
pub use self::socket::AtkSocketExt;
pub use self::socket::{Socket, NONE_SOCKET};

mod state_set;
pub use self::state_set::StateSetExt;
pub use self::state_set::{StateSet, NONE_STATE_SET};

mod streamable_content;
pub use self::streamable_content::StreamableContentExt;
pub use self::streamable_content::{StreamableContent, NONE_STREAMABLE_CONTENT};

mod table;
pub use self::table::TableExt;
pub use self::table::{Table, NONE_TABLE};

mod table_cell;
pub use self::table_cell::TableCellExt;
pub use self::table_cell::{TableCell, NONE_TABLE_CELL};

mod text;
pub use self::text::TextExt;
pub use self::text::{Text, NONE_TEXT};

mod util;
pub use self::util::{Util, NONE_UTIL};

mod value;
pub use self::value::ValueExt;
pub use self::value::{Value, NONE_VALUE};

mod window;
pub use self::window::AtkWindowExt;
pub use self::window::{Window, NONE_WINDOW};

mod range;
Expand Down Expand Up @@ -143,29 +118,29 @@ pub use self::alias::State;

#[doc(hidden)]
pub mod traits {
pub use super::AtkActionExt;
pub use super::AtkImageExt;
pub use super::AtkMiscExt;
pub use super::AtkObjectExt;
pub use super::AtkPlugExt;
pub use super::AtkSocketExt;
pub use super::AtkWindowExt;
pub use super::ComponentExt;
pub use super::DocumentExt;
pub use super::EditableTextExt;
pub use super::GObjectAccessibleExt;
pub use super::HyperlinkExt;
pub use super::HyperlinkImplExt;
pub use super::HypertextExt;
pub use super::ObjectFactoryExt;
pub use super::RegistryExt;
pub use super::RelationExt;
pub use super::RelationSetExt;
pub use super::SelectionExt;
pub use super::StateSetExt;
pub use super::StreamableContentExt;
pub use super::TableCellExt;
pub use super::TableExt;
pub use super::TextExt;
pub use super::ValueExt;
pub use super::action::AtkActionExt;
pub use super::component::ComponentExt;
pub use super::document::DocumentExt;
pub use super::editable_text::EditableTextExt;
pub use super::gobject_accessible::GObjectAccessibleExt;
pub use super::hyperlink::HyperlinkExt;
pub use super::hyperlink_impl::HyperlinkImplExt;
pub use super::hypertext::HypertextExt;
pub use super::image::AtkImageExt;
pub use super::misc::AtkMiscExt;
pub use super::object::AtkObjectExt;
pub use super::object_factory::ObjectFactoryExt;
pub use super::plug::AtkPlugExt;
pub use super::registry::RegistryExt;
pub use super::relation::RelationExt;
pub use super::relation_set::RelationSetExt;
pub use super::selection::SelectionExt;
pub use super::socket::AtkSocketExt;
pub use super::state_set::StateSetExt;
pub use super::streamable_content::StreamableContentExt;
pub use super::table::TableExt;
pub use super::table_cell::TableCellExt;
pub use super::text::TextExt;
pub use super::value::ValueExt;
pub use super::window::AtkWindowExt;
}
2 changes: 1 addition & 1 deletion atk/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ a01a90f)
Generated by gir (https://github.com/gtk-rs/gir @ 7a92c16)
from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6)
2 changes: 1 addition & 1 deletion atk/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ a01a90f)
Generated by gir (https://github.com/gtk-rs/gir @ 7a92c16)
from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6)
4 changes: 2 additions & 2 deletions examples/css/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ fn build_ui(application: &gtk::Application) {
let label = gtk::Button::with_label("hover me!");
// We need to name it in order to be able to use its name as a CSS label to
// apply CSS on it.
gtk::WidgetExt::set_widget_name(&label, "label1");
label.set_widget_name("label1");

let entry = gtk::Entry::new();
// We need to name it in order to apply CSS on it.
gtk::WidgetExt::set_widget_name(&entry, "entry1");
entry.set_widget_name("entry1");
entry.set_text("Some text");

let combo = gtk::ComboBoxText::new();
Expand Down
5 changes: 1 addition & 4 deletions examples/gio_task/file_size/ffi.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
use gtk::glib::subclass::prelude::*;
use gtk::glib::translate::*;
use gtk::prelude::AsyncResultExt;
use gtk::prelude::Cast;
use gtk::prelude::FileExt;
use gtk::prelude::ToValue;
use gtk::prelude::*;
use gtk::{gio, glib};

pub type FileSize = <super::imp::FileSize as ObjectSubclass>::Instance;
Expand Down
5 changes: 1 addition & 4 deletions examples/gio_task/file_size/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ pub mod ffi;
mod imp;

use gtk::glib::subclass::prelude::*;
use gtk::prelude::AsyncResultExt;
use gtk::prelude::Cast;
use gtk::prelude::FileExt;
use gtk::prelude::ToValue;
use gtk::prelude::*;
use gtk::{gio, glib};

glib::wrapper! {
Expand Down
2 changes: 1 addition & 1 deletion examples/overlay/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn build_ui(application: &gtk::Application) {
// The overlay label.
let overlay_text = gtk::Label::new(Some("0"));
// We need to name it in order to apply CSS on it.
gtk::WidgetExt::set_widget_name(&overlay_text, "overlay-label");
overlay_text.set_widget_name("overlay-label");
// We put the overlay in the top-right corner of the window.
overlay_text.set_halign(gtk::Align::End);
overlay_text.set_valign(gtk::Align::Start);
Expand Down
6 changes: 2 additions & 4 deletions gdk-pixbuf/src/auto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ mod pixbuf;
pub use self::pixbuf::Pixbuf;

mod pixbuf_animation;
pub use self::pixbuf_animation::PixbufAnimationExt;
pub use self::pixbuf_animation::{PixbufAnimation, NONE_PIXBUF_ANIMATION};

mod pixbuf_loader;
pub use self::pixbuf_loader::PixbufLoaderExt;
pub use self::pixbuf_loader::{PixbufLoader, NONE_PIXBUF_LOADER};

mod pixbuf_simple_anim;
Expand All @@ -28,6 +26,6 @@ pub use self::enums::PixbufRotation;

#[doc(hidden)]
pub mod traits {
pub use super::PixbufAnimationExt;
pub use super::PixbufLoaderExt;
pub use super::pixbuf_animation::PixbufAnimationExt;
pub use super::pixbuf_loader::PixbufLoaderExt;
}
2 changes: 1 addition & 1 deletion gdk-pixbuf/src/auto/pixbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl Pixbuf {
// unsafe { TODO: call ffi:gdk_pixbuf_new_from_data() }
//}

#[cfg_attr(feature = "v2_32", deprecated)]
#[cfg_attr(feature = "v2_32", deprecated = "Since 2.32")]
#[doc(alias = "gdk_pixbuf_new_from_inline")]
pub fn from_inline(data: &[u8], copy_pixels: bool) -> Result<Pixbuf, glib::Error> {
let data_length = data.len() as i32;
Expand Down
2 changes: 1 addition & 1 deletion gdk-pixbuf/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ a01a90f)
Generated by gir (https://github.com/gtk-rs/gir @ 7a92c16)
from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6)
2 changes: 1 addition & 1 deletion gdk-pixbuf/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ a01a90f)
Generated by gir (https://github.com/gtk-rs/gir @ 7a92c16)
from gir-files (https://github.com/gtk-rs/gir-files @ 6088bb6)
2 changes: 1 addition & 1 deletion gdk/src/auto/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ glib::wrapper! {
}

impl Cursor {
#[cfg_attr(feature = "v3_16", deprecated)]
#[cfg_attr(feature = "v3_16", deprecated = "Since 3.16")]
#[doc(alias = "gdk_cursor_new")]
pub fn new(cursor_type: CursorType) -> Cursor {
assert_initialized_main_thread!();
Expand Down
6 changes: 3 additions & 3 deletions gdk/src/auto/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl Device {
}
}

#[cfg_attr(feature = "v3_20", deprecated)]
#[cfg_attr(feature = "v3_20", deprecated = "Since 3.20")]
#[doc(alias = "gdk_device_grab")]
pub fn grab(
&self,
Expand Down Expand Up @@ -299,7 +299,7 @@ impl Device {
}
}

#[cfg_attr(feature = "v3_20", deprecated)]
#[cfg_attr(feature = "v3_20", deprecated = "Since 3.20")]
#[doc(alias = "gdk_device_ungrab")]
pub fn ungrab(&self, time_: u32) {
unsafe {
Expand Down Expand Up @@ -432,7 +432,7 @@ impl Device {
}
}

#[cfg_attr(feature = "v3_16", deprecated)]
#[cfg_attr(feature = "v3_16", deprecated = "Since 3.16")]
#[doc(alias = "gdk_device_grab_info_libgtk_only")]
pub fn grab_info_libgtk_only(display: &Display, device: &Device) -> Option<(Window, bool)> {
skip_assert_initialized!();
Expand Down
4 changes: 2 additions & 2 deletions gdk/src/auto/device_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ glib::wrapper! {
}

impl DeviceManager {
#[cfg_attr(feature = "v3_20", deprecated)]
#[cfg_attr(feature = "v3_20", deprecated = "Since 3.20")]
#[doc(alias = "gdk_device_manager_get_client_pointer")]
pub fn client_pointer(&self) -> Option<Device> {
unsafe {
Expand All @@ -37,7 +37,7 @@ impl DeviceManager {
unsafe { from_glib_none(ffi::gdk_device_manager_get_display(self.to_glib_none().0)) }
}

#[cfg_attr(feature = "v3_20", deprecated)]
#[cfg_attr(feature = "v3_20", deprecated = "Since 3.20")]
#[doc(alias = "gdk_device_manager_list_devices")]
pub fn list_devices(&self, type_: DeviceType) -> Vec<Device> {
unsafe {
Expand Down
8 changes: 4 additions & 4 deletions gdk/src/auto/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl Display {
unsafe { from_glib_none(ffi::gdk_display_get_default_seat(self.to_glib_none().0)) }
}

#[cfg_attr(feature = "v3_20", deprecated)]
#[cfg_attr(feature = "v3_20", deprecated = "Since 3.20")]
#[doc(alias = "gdk_display_get_device_manager")]
pub fn device_manager(&self) -> Option<DeviceManager> {
unsafe { from_glib_none(ffi::gdk_display_get_device_manager(self.to_glib_none().0)) }
Expand Down Expand Up @@ -178,7 +178,7 @@ impl Display {
unsafe { from_glib_none(ffi::gdk_display_get_primary_monitor(self.to_glib_none().0)) }
}

#[cfg_attr(feature = "v3_20", deprecated)]
#[cfg_attr(feature = "v3_20", deprecated = "Since 3.20")]
#[doc(alias = "gdk_display_get_screen")]
pub fn screen(&self, screen_num: i32) -> Screen {
unsafe {
Expand Down Expand Up @@ -279,7 +279,7 @@ impl Display {
}
}

#[cfg_attr(feature = "v3_16", deprecated)]
#[cfg_attr(feature = "v3_16", deprecated = "Since 3.16")]
#[doc(alias = "gdk_display_supports_composite")]
pub fn supports_composite(&self) -> bool {
unsafe { from_glib(ffi::gdk_display_supports_composite(self.to_glib_none().0)) }
Expand Down Expand Up @@ -345,7 +345,7 @@ impl Display {
unsafe { from_glib_none(ffi::gdk_display_open(display_name.to_glib_none().0)) }
}

#[cfg_attr(feature = "v3_16", deprecated)]
#[cfg_attr(feature = "v3_16", deprecated = "Since 3.16")]
#[doc(alias = "gdk_display_open_default_libgtk_only")]
pub fn open_default_libgtk_only() -> Option<Display> {
assert_initialized_main_thread!();
Expand Down
10 changes: 5 additions & 5 deletions gdk/src/auto/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use glib::translate::*;
use std::mem;
use std::ptr;

//#[cfg_attr(feature = "v3_16", deprecated)]
//#[cfg_attr(feature = "v3_16", deprecated = "Since 3.16")]
//#[doc(alias = "gdk_add_option_entries_libgtk_only")]
//pub fn add_option_entries_libgtk_only(group: /*Ignored*/&glib::OptionGroup) {
// unsafe { TODO: call ffi:gdk_add_option_entries_libgtk_only() }
Expand Down Expand Up @@ -191,7 +191,7 @@ pub fn keyval_to_upper(keyval: u32) -> u32 {
unsafe { ffi::gdk_keyval_to_upper(keyval) }
}

#[cfg_attr(feature = "v3_22", deprecated)]
#[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")]
#[doc(alias = "gdk_list_visuals")]
pub fn list_visuals() -> Vec<Visual> {
assert_initialized_main_thread!();
Expand Down Expand Up @@ -272,7 +272,7 @@ pub fn pixbuf_get_from_surface(
}
}

#[cfg_attr(feature = "v3_16", deprecated)]
#[cfg_attr(feature = "v3_16", deprecated = "Since 3.16")]
#[doc(alias = "gdk_pre_parse_libgtk_only")]
pub fn pre_parse_libgtk_only() {
assert_initialized_main_thread!();
Expand Down Expand Up @@ -329,7 +329,7 @@ pub fn property_get(
}
}

#[cfg_attr(feature = "v3_22", deprecated)]
#[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")]
#[doc(alias = "gdk_query_depths")]
pub fn query_depths() -> Vec<i32> {
assert_initialized_main_thread!();
Expand All @@ -341,7 +341,7 @@ pub fn query_depths() -> Vec<i32> {
}
}

//#[cfg_attr(feature = "v3_22", deprecated)]
//#[cfg_attr(feature = "v3_22", deprecated = "Since 3.22")]
//#[doc(alias = "gdk_query_visual_types")]
//pub fn query_visual_types(visual_types: /*Unimplemented*/CArray TypeId { ns_id: 1, id: 99 }) -> i32 {
// unsafe { TODO: call ffi:gdk_query_visual_types() }
Expand Down
Loading

0 comments on commit 63f9f2f

Please sign in to comment.