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

Commit

Permalink
Change the condition to only be enabled by the feature
Browse files Browse the repository at this point in the history
  • Loading branch information
pentamassiv authored and GuillaumeGomez committed Aug 12, 2023
1 parent e2587c9 commit 26f64c1
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions gdkwayland/src/wayland_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl WaylandWindow {
}
}

#[cfg(any(feature = "v3_24_22", docsrs))]
#[cfg(feature = "v3_24_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v3_24_22")))]
#[doc(alias = "gdk_wayland_window_set_application_id")]
pub fn set_application_id(&self, application_id: &str) -> bool {
Expand All @@ -112,7 +112,7 @@ impl WaylandWindow {
unsafe { ffi::gdk_wayland_window_announce_csd(self.to_glib_none().0) }
}

#[cfg(any(feature = "v3_24", docsrs))]
#[cfg(feature = "v3_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v3_24")))]
#[doc(alias = "gdk_wayland_window_announce_ssd")]
pub fn announce_ssd(&self) {
Expand Down
8 changes: 4 additions & 4 deletions gdkwayland/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ extern "C" {
parent_handle: *const c_char,
) -> glib::gboolean;

#[cfg(any(feature = "v3_24_22", docsrs))]
#[cfg(feature = "v3_24_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v3_24_22")))]
pub fn gdk_wayland_window_set_application_id(
window: *mut GdkWaylandWindow,
Expand All @@ -80,18 +80,18 @@ extern "C" {

pub fn gdk_wayland_window_announce_csd(window: *mut GdkWaylandWindow);

#[cfg(any(feature = "v3_24", docsrs))]
#[cfg(feature = "v3_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v3_24")))]
pub fn gdk_wayland_window_announce_ssd(window: *mut GdkWaylandWindow);

#[cfg(any(feature = "v3_24", docsrs))]
#[cfg(feature = "v3_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v3_24")))]
pub fn gdk_wayland_window_add_frame_callback_surface(
window: *mut GdkWaylandWindow,
surface: glib::gconstpointer,
);

#[cfg(any(feature = "v3_24", docsrs))]
#[cfg(feature = "v3_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v3_24")))]
pub fn gdk_wayland_window_remove_frame_callback_surface(
window: *mut GdkWaylandWindow,
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/file_chooser.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file.

use crate::FileChooser;
#[cfg(any(feature = "v3_22", docsrs))]
#[cfg(feature = "v3_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v3_22")))]
use glib::translate::*;
use glib::IsA;
Expand All @@ -14,7 +14,7 @@ mod sealed {
}

pub trait FileChooserExtManual: IsA<FileChooser> + sealed::Sealed + 'static {
#[cfg(any(feature = "v3_22", docsrs))]
#[cfg(feature = "v3_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v3_22")))]
#[doc(alias = "gtk_file_chooser_add_choice")]
fn add_choice(&self, id: &str, label: &str, options: &[(&str, &str)]) {
Expand Down
4 changes: 2 additions & 2 deletions gtk/src/gesture_stylus.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.

#[cfg(any(feature = "v3_24", docsrs))]
#[cfg(feature = "v3_24")]
use crate::GestureStylus;
use gdk::AxisUse;
use glib::object::IsA;
Expand All @@ -12,7 +12,7 @@ mod sealed {
}

pub trait GestureStylusExtManual: IsA<GestureStylus> + sealed::Sealed + 'static {
#[cfg(any(feature = "v3_24", docsrs))]
#[cfg(feature = "v3_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v3_24")))]
#[doc(alias = "gtk_gesture_stylus_get_axes")]
#[doc(alias = "get_axes")]
Expand Down
2 changes: 1 addition & 1 deletion gtk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ mod file_filter_info;
mod fixed;
mod flow_box;
mod functions;
#[cfg(any(feature = "v3_24", docsrs))]
#[cfg(feature = "v3_24")]
mod gesture_stylus;
mod im_context_simple;
mod image;
Expand Down
2 changes: 1 addition & 1 deletion gtk/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub use crate::entry_completion::EntryCompletionExtManual;
pub use crate::file_chooser::FileChooserExtManual;
pub use crate::fixed::FixedExtManual;
pub use crate::flow_box::FlowBoxExtManual;
#[cfg(any(feature = "v3_24", docsrs))]
#[cfg(feature = "v3_24")]
pub use crate::gesture_stylus::GestureStylusExtManual;
pub use crate::im_context_simple::IMContextSimpleExtManual;
pub use crate::image::ImageExtManual;
Expand Down
8 changes: 4 additions & 4 deletions gtk/src/subclass/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ pub mod icon_view;
pub mod list_box;
pub mod list_box_row;
pub mod menu_button;
#[cfg(any(gdk_backend = "x11", docsrs))]
#[cfg(gdk_backend = "x11")]
pub mod plug;
pub mod scrolled_window;
#[cfg(any(gdk_backend = "x11", docsrs))]
#[cfg(gdk_backend = "x11")]
pub mod socket;
pub mod stack;
pub mod toggle_button;
Expand Down Expand Up @@ -67,10 +67,10 @@ pub mod prelude {
pub use super::list_box::{ListBoxImpl, ListBoxImplExt};
pub use super::list_box_row::{ListBoxRowImpl, ListBoxRowImplExt};
pub use super::menu_button::MenuButtonImpl;
#[cfg(any(gdk_backend = "x11", docsrs))]
#[cfg(gdk_backend = "x11")]
pub use super::plug::{PlugImpl, PlugImplExt};
pub use super::scrolled_window::{ScrolledWindowImpl, ScrolledWindowImplExt};
#[cfg(any(gdk_backend = "x11", docsrs))]
#[cfg(gdk_backend = "x11")]
pub use super::socket::{SocketImpl, SocketImplExt};
pub use super::stack::StackImpl;
pub use super::toggle_button::ToggleButtonImpl;
Expand Down

0 comments on commit 26f64c1

Please sign in to comment.