From e79b460478f83d573b2685af3d60b4ce952568f5 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 11 Feb 2024 16:11:04 +0100 Subject: [PATCH] Update stubs after deprecation --- src/gi-stubs/repository/Adw.pyi | 347 ++++++++ src/gi-stubs/repository/AppIndicator3.pyi | 7 + src/gi-stubs/repository/AppStream.pyi | 5 + src/gi-stubs/repository/Atk.pyi | 50 ++ .../repository/AyatanaAppIndicator3.pyi | 7 + src/gi-stubs/repository/Farstream.pyi | 5 + src/gi-stubs/repository/Flatpak.pyi | 13 + src/gi-stubs/repository/GIRepository.pyi | 5 + src/gi-stubs/repository/GLib.pyi | 115 +++ src/gi-stubs/repository/GModule.pyi | 11 + src/gi-stubs/repository/GObject.pyi | 29 + src/gi-stubs/repository/GSound.pyi | 5 + src/gi-stubs/repository/GdkPixbuf.pyi | 6 + src/gi-stubs/repository/Geoclue.pyi | 5 + src/gi-stubs/repository/Ggit.pyi | 5 + src/gi-stubs/repository/Gio.pyi | 117 +++ src/gi-stubs/repository/Goa.pyi | 81 ++ src/gi-stubs/repository/Graphene.pyi | 7 + src/gi-stubs/repository/Gsk.pyi | 6 + src/gi-stubs/repository/Gspell.pyi | 5 + src/gi-stubs/repository/Gst.pyi | 16 + src/gi-stubs/repository/GstSdp.pyi | 5 + src/gi-stubs/repository/GstWebRTC.pyi | 5 + src/gi-stubs/repository/Handy.pyi | 15 + src/gi-stubs/repository/Manette.pyi | 5 + src/gi-stubs/repository/OSTree.pyi | 5 + src/gi-stubs/repository/Panel.pyi | 5 + src/gi-stubs/repository/Pango.pyi | 23 + src/gi-stubs/repository/PangoCairo.pyi | 5 + src/gi-stubs/repository/Rsvg.pyi | 66 +- src/gi-stubs/repository/Secret.pyi | 5 + src/gi-stubs/repository/Vte.pyi | 34 +- src/gi-stubs/repository/_Gdk3.pyi | 139 ++- src/gi-stubs/repository/_Gdk4.pyi | 26 + src/gi-stubs/repository/_Gtk3.pyi | 823 +++++++++++++++++ src/gi-stubs/repository/_Gtk4.pyi | 833 ++++++++++++++++++ src/gi-stubs/repository/_GtkSource4.pyi | 5 + src/gi-stubs/repository/_GtkSource5.pyi | 5 + src/gi-stubs/repository/_JavaScriptCore6.pyi | 5 + src/gi-stubs/repository/_Soup2.pyi | 55 ++ src/gi-stubs/repository/_Soup3.pyi | 7 + src/gi-stubs/repository/_WebKit6.pyi | 7 + 42 files changed, 2922 insertions(+), 3 deletions(-) diff --git a/src/gi-stubs/repository/Adw.pyi b/src/gi-stubs/repository/Adw.pyi index 42eec8c7..dd4444fd 100644 --- a/src/gi-stubs/repository/Adw.pyi +++ b/src/gi-stubs/repository/Adw.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gdk from gi.repository import Gio from gi.repository import GLib @@ -608,6 +613,7 @@ class ActionRow( def add_prefix(self, widget: Gtk.Widget) -> None: ... def add_suffix(self, widget: Gtk.Widget) -> None: ... def get_activatable_widget(self) -> Optional[Gtk.Widget]: ... + @deprecated("Use [method@ActionRow.add_prefix] to add an icon.") def get_icon_name(self) -> Optional[str]: ... def get_subtitle(self) -> Optional[str]: ... def get_subtitle_lines(self) -> int: ... @@ -617,6 +623,7 @@ class ActionRow( def new(cls) -> ActionRow: ... def remove(self, widget: Gtk.Widget) -> None: ... def set_activatable_widget(self, widget: Optional[Gtk.Widget] = None) -> None: ... + @deprecated("Use [method@ActionRow.add_prefix] to add an icon.") def set_icon_name(self, icon_name: Optional[str] = None) -> None: ... def set_subtitle(self, subtitle: str) -> None: ... def set_subtitle_lines(self, subtitle_lines: int) -> None: ... @@ -3769,12 +3776,14 @@ class ExpanderRow( action_name: Optional[str] = ..., action_target: GLib.Variant = ..., ): ... + @deprecated("Use [method@ExpanderRow.add_suffix] to add a suffix.") def add_action(self, widget: Gtk.Widget) -> None: ... def add_prefix(self, widget: Gtk.Widget) -> None: ... def add_row(self, child: Gtk.Widget) -> None: ... def add_suffix(self, widget: Gtk.Widget) -> None: ... def get_enable_expansion(self) -> bool: ... def get_expanded(self) -> bool: ... + @deprecated("Use [method@ExpanderRow.add_prefix] to add an icon.") def get_icon_name(self) -> Optional[str]: ... def get_show_enable_switch(self) -> bool: ... def get_subtitle(self) -> str: ... @@ -3785,6 +3794,7 @@ class ExpanderRow( def remove(self, child: Gtk.Widget) -> None: ... def set_enable_expansion(self, enable_expansion: bool) -> None: ... def set_expanded(self, expanded: bool) -> None: ... + @deprecated("Use [method@ExpanderRow.add_prefix] to add an icon.") def set_icon_name(self, icon_name: Optional[str] = None) -> None: ... def set_show_enable_switch(self, show_enable_switch: bool) -> None: ... def set_subtitle(self, subtitle: str) -> None: ... @@ -3803,6 +3813,7 @@ class ExpanderRowClass(GObject.GPointer): parent_class: PreferencesRowClass = ... padding: list[None] = ... +@deprecated("See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)") class Flap( Gtk.Widget, Swipeable, @@ -3996,37 +4007,130 @@ class Flap( accessible_role: Gtk.AccessibleRole = ..., orientation: Gtk.Orientation = ..., ): ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_content(self) -> Optional[Gtk.Widget]: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_flap(self) -> Optional[Gtk.Widget]: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_flap_position(self) -> Gtk.PackType: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_fold_duration(self) -> int: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_fold_policy(self) -> FlapFoldPolicy: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_fold_threshold_policy(self) -> FoldThresholdPolicy: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_folded(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_locked(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_modal(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_reveal_flap(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_reveal_params(self) -> SpringParams: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_reveal_progress(self) -> float: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_separator(self) -> Optional[Gtk.Widget]: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_swipe_to_close(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_swipe_to_open(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def get_transition_type(self) -> FlapTransitionType: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) @classmethod def new(cls) -> Flap: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_content(self, content: Optional[Gtk.Widget] = None) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_flap(self, flap: Optional[Gtk.Widget] = None) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_flap_position(self, position: Gtk.PackType) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_fold_duration(self, duration: int) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_fold_policy(self, policy: FlapFoldPolicy) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_fold_threshold_policy(self, policy: FoldThresholdPolicy) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_locked(self, locked: bool) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_modal(self, modal: bool) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_reveal_flap(self, reveal_flap: bool) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_reveal_params(self, params: SpringParams) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_separator(self, separator: Optional[Gtk.Widget] = None) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_swipe_to_close(self, swipe_to_close: bool) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_swipe_to_open(self, swipe_to_open: bool) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwflap)" + ) def set_transition_type(self, transition_type: FlapTransitionType) -> None: ... class FlapClass(GObject.GPointer): @@ -4230,6 +4334,9 @@ class HeaderBarClass(GObject.GPointer): parent_class: Gtk.WidgetClass = ... +@deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" +) class Leaflet( Gtk.Widget, Swipeable, @@ -4413,45 +4520,144 @@ class Leaflet( accessible_role: Gtk.AccessibleRole = ..., orientation: Gtk.Orientation = ..., ): ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def append(self, child: Gtk.Widget) -> LeafletPage: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_adjacent_child( self, direction: NavigationDirection ) -> Optional[Gtk.Widget]: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_can_navigate_back(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_can_navigate_forward(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_can_unfold(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_child_by_name(self, name: str) -> Optional[Gtk.Widget]: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_child_transition_params(self) -> SpringParams: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_child_transition_running(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_fold_threshold_policy(self) -> FoldThresholdPolicy: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_folded(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_homogeneous(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_mode_transition_duration(self) -> int: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_page(self, child: Gtk.Widget) -> LeafletPage: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_pages(self) -> Gtk.SelectionModel: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_transition_type(self) -> LeafletTransitionType: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_visible_child(self) -> Optional[Gtk.Widget]: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_visible_child_name(self) -> Optional[str]: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def insert_child_after( self, child: Gtk.Widget, sibling: Optional[Gtk.Widget] = None ) -> LeafletPage: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def navigate(self, direction: NavigationDirection) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) @classmethod def new(cls) -> Leaflet: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def prepend(self, child: Gtk.Widget) -> LeafletPage: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def remove(self, child: Gtk.Widget) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def reorder_child_after( self, child: Gtk.Widget, sibling: Optional[Gtk.Widget] = None ) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def set_can_navigate_back(self, can_navigate_back: bool) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def set_can_navigate_forward(self, can_navigate_forward: bool) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def set_can_unfold(self, can_unfold: bool) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def set_child_transition_params(self, params: SpringParams) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def set_fold_threshold_policy(self, policy: FoldThresholdPolicy) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def set_homogeneous(self, homogeneous: bool) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def set_mode_transition_duration(self, duration: int) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def set_transition_type(self, transition: LeafletTransitionType) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def set_visible_child(self, visible_child: Gtk.Widget) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def set_visible_child_name(self, name: str) -> None: ... class LeafletClass(GObject.GPointer): @@ -4465,6 +4671,9 @@ class LeafletClass(GObject.GPointer): parent_class: Gtk.WidgetClass = ... +@deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" +) class LeafletPage(GObject.Object): """ :Constructors: @@ -4495,10 +4704,25 @@ class LeafletPage(GObject.Object): name: Optional[str] = ..., navigatable: bool = ..., ): ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_child(self) -> Gtk.Widget: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_name(self) -> Optional[str]: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def get_navigatable(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def set_name(self, name: Optional[str] = None) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwleaflet)" + ) def set_navigatable(self, navigatable: bool) -> None: ... class LeafletPageClass(GObject.GPointer): @@ -6639,7 +6863,9 @@ class PreferencesWindow( ): ... def add(self, page: PreferencesPage) -> None: ... def add_toast(self, toast: Toast) -> None: ... + @deprecated("Use [method@PreferencesWindow.pop_subpage] instead.") def close_subpage(self) -> None: ... + @deprecated("Use [method@NavigationPage.get_can_pop] instead.") def get_can_navigate_back(self) -> bool: ... def get_search_enabled(self) -> bool: ... def get_visible_page(self) -> Optional[PreferencesPage]: ... @@ -6647,9 +6873,13 @@ class PreferencesWindow( @classmethod def new(cls) -> PreferencesWindow: ... def pop_subpage(self) -> bool: ... + @deprecated("Use [method@PreferencesWindow.push_subpage] instead.") def present_subpage(self, subpage: Gtk.Widget) -> None: ... def push_subpage(self, page: NavigationPage) -> None: ... def remove(self, page: PreferencesPage) -> None: ... + @deprecated( + "Use [method@NavigationPage.set_can_pop] instead.Has no effect for subpages added with [method@PreferencesWindow.push_subpage]." + ) def set_can_navigate_back(self, can_navigate_back: bool) -> None: ... def set_search_enabled(self, search_enabled: bool) -> None: ... def set_visible_page(self, page: PreferencesPage) -> None: ... @@ -7319,6 +7549,9 @@ class SpringParams(GObject.GBoxed): def ref(self) -> SpringParams: ... def unref(self) -> None: ... +@deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" +) class Squeezer( Gtk.Widget, Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Orientable ): @@ -7491,29 +7724,98 @@ class Squeezer( accessible_role: Gtk.AccessibleRole = ..., orientation: Gtk.Orientation = ..., ): ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def add(self, child: Gtk.Widget) -> SqueezerPage: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_allow_none(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_homogeneous(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_interpolate_size(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_page(self, child: Gtk.Widget) -> SqueezerPage: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_pages(self) -> Gtk.SelectionModel: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_switch_threshold_policy(self) -> FoldThresholdPolicy: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_transition_duration(self) -> int: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_transition_running(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_transition_type(self) -> SqueezerTransitionType: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_visible_child(self) -> Optional[Gtk.Widget]: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_xalign(self) -> float: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_yalign(self) -> float: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) @classmethod def new(cls) -> Squeezer: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def remove(self, child: Gtk.Widget) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def set_allow_none(self, allow_none: bool) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def set_homogeneous(self, homogeneous: bool) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def set_interpolate_size(self, interpolate_size: bool) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def set_switch_threshold_policy(self, policy: FoldThresholdPolicy) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def set_transition_duration(self, duration: int) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def set_transition_type(self, transition: SqueezerTransitionType) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def set_xalign(self, xalign: float) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def set_yalign(self, yalign: float) -> None: ... class SqueezerClass(GObject.GPointer): @@ -7527,6 +7829,9 @@ class SqueezerClass(GObject.GPointer): parent_class: Gtk.WidgetClass = ... +@deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" +) class SqueezerPage(GObject.Object): """ :Constructors: @@ -7550,8 +7855,17 @@ class SqueezerPage(GObject.Object): enabled: bool props: Props = ... def __init__(self, child: Gtk.Widget = ..., enabled: bool = ...): ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_child(self) -> Gtk.Widget: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def get_enabled(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwsqueezer)" + ) def set_enabled(self, enabled: bool) -> None: ... class SqueezerPageClass(GObject.GPointer): @@ -10197,6 +10511,9 @@ class ViewSwitcherClass(GObject.GPointer): parent_class: Gtk.WidgetClass = ... +@deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwviewswitchertitle)" +) class ViewSwitcherTitle( Gtk.Widget, Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget ): @@ -10351,16 +10668,46 @@ class ViewSwitcherTitle( width_request: int = ..., accessible_role: Gtk.AccessibleRole = ..., ): ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwviewswitchertitle)" + ) def get_stack(self) -> Optional[ViewStack]: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwviewswitchertitle)" + ) def get_subtitle(self) -> str: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwviewswitchertitle)" + ) def get_title(self) -> str: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwviewswitchertitle)" + ) def get_title_visible(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwviewswitchertitle)" + ) def get_view_switcher_enabled(self) -> bool: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwviewswitchertitle)" + ) @classmethod def new(cls) -> ViewSwitcherTitle: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwviewswitchertitle)" + ) def set_stack(self, stack: Optional[ViewStack] = None) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwviewswitchertitle)" + ) def set_subtitle(self, subtitle: str) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwviewswitchertitle)" + ) def set_title(self, title: str) -> None: ... + @deprecated( + "See [the migration guide](migrating-to-breakpoints.html#replace-adwviewswitchertitle)" + ) def set_view_switcher_enabled(self, enabled: bool) -> None: ... class ViewSwitcherTitleClass(GObject.GPointer): diff --git a/src/gi-stubs/repository/AppIndicator3.pyi b/src/gi-stubs/repository/AppIndicator3.pyi index fd54d923..70ca1293 100644 --- a/src/gi-stubs/repository/AppIndicator3.pyi +++ b/src/gi-stubs/repository/AppIndicator3.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gdk from gi.repository import GObject from gi.repository import Gtk @@ -142,8 +147,10 @@ class Indicator(GObject.Object): def new_with_path( cls, id: str, icon_name: str, category: IndicatorCategory, icon_theme_path: str ) -> Indicator: ... + @deprecated("Use app_indicator_set_attention_icon_full() instead.") def set_attention_icon(self, icon_name: str) -> None: ... def set_attention_icon_full(self, icon_name: str, icon_desc: str) -> None: ... + @deprecated("Use app_indicator_set_icon_full()") def set_icon(self, icon_name: str) -> None: ... def set_icon_full(self, icon_name: str, icon_desc: str) -> None: ... def set_icon_theme_path(self, icon_theme_path: str) -> None: ... diff --git a/src/gi-stubs/repository/AppStream.pyi b/src/gi-stubs/repository/AppStream.pyi index 770b8f3f..8000ae4e 100644 --- a/src/gi-stubs/repository/AppStream.pyi +++ b/src/gi-stubs/repository/AppStream.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GLib from gi.repository import GObject diff --git a/src/gi-stubs/repository/Atk.pyi b/src/gi-stubs/repository/Atk.pyi index b1f38773..c2e619ba 100644 --- a/src/gi-stubs/repository/Atk.pyi +++ b/src/gi-stubs/repository/Atk.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GLib from gi.repository import GObject @@ -21,6 +26,9 @@ _namespace: str = "Atk" _version: str = "1.0" def attribute_set_free(attrib_set: list[None]) -> None: ... +@deprecated( + "Focus tracking has been dropped as a featureto be implemented by ATK itself. As #AtkObject::focus-event wasdeprecated in favor of a #AtkObject::state-change signal, in orderto notify a focus change on your implementation, you can useatk_object_notify_state_change() instead." +) def focus_tracker_notify(object: Object) -> None: ... def get_binary_age() -> int: ... def get_default_registry() -> Registry: ... @@ -36,12 +44,18 @@ def get_version() -> str: ... def relation_type_for_name(name: str) -> RelationType: ... def relation_type_get_name(type: RelationType) -> str: ... def relation_type_register(name: str) -> RelationType: ... +@deprecated( + 'Focus tracking has been dropped as a feature to be implemented by ATK itself. If you need focus tracking on your implementation, subscribe to the #AtkObject::state-change "focused" signal.' +) def remove_focus_tracker(tracker_id: int) -> None: ... def remove_global_event_listener(listener_id: int) -> None: ... def remove_key_event_listener(listener_id: int) -> None: ... def role_for_name(name: str) -> Role: ... def role_get_localized_name(role: Role) -> str: ... def role_get_name(role: Role) -> str: ... +@deprecated( + "Since 2.12. If your application/toolkit doesn't find asuitable role for a specific object defined at #AtkRole, pleasesubmit a bug in order to add a new role to the specification." +) def role_register(name: str) -> Role: ... def state_type_for_name(name: str) -> StateType: ... def state_type_get_name(type: StateType) -> str: ... @@ -109,12 +123,17 @@ class Component(GObject.GInterface): def get_extents(self, coord_type: CoordType) -> Tuple[int, int, int, int]: ... def get_layer(self) -> Layer: ... def get_mdi_zorder(self) -> int: ... + @deprecated("Since 2.12. Use atk_component_get_extents() instead.") def get_position(self, coord_type: CoordType) -> Tuple[int, int]: ... + @deprecated("Since 2.12. Use atk_component_get_extents() instead.") def get_size(self) -> Tuple[int, int]: ... def grab_focus(self) -> bool: ... def ref_accessible_at_point( self, x: int, y: int, coord_type: CoordType ) -> Optional[Object]: ... + @deprecated( + 'If you need to track when an object gains orlose the focus, use the #AtkObject::state-change "focused" notification instead.' + ) def remove_focus_handler(self, handler_id: int) -> None: ... def scroll_to(self, type: ScrollType) -> bool: ... def scroll_to_point(self, coords: CoordType, x: int, y: int) -> bool: ... @@ -162,8 +181,15 @@ class Document(GObject.GInterface): def get_attribute_value(self, attribute_name: str) -> Optional[str]: ... def get_attributes(self) -> list[None]: ... def get_current_page_number(self) -> int: ... + @deprecated( + "Since 2.12. @document is already a representation ofthe document. Use it directly, or one of its children, as aninstance of the DOM." + ) def get_document(self) -> None: ... + @deprecated( + "Since 2.12. Please use atk_document_get_attributes() toask for the document type if it applies." + ) def get_document_type(self) -> str: ... + @deprecated("Please use atk_object_get_object_locale() instead.") def get_locale(self) -> str: ... def get_page_count(self) -> int: ... def set_attribute_value( @@ -377,6 +403,9 @@ class Hyperlink(GObject.Object, Action): def get_start_index(self) -> int: ... def get_uri(self, i: int) -> str: ... def is_inline(self) -> bool: ... + @deprecated( + "Please use ATK_STATE_FOCUSABLE for all links,and ATK_STATE_FOCUSED for focused links." + ) def is_selected_link(self) -> bool: ... def is_valid(self) -> bool: ... @@ -510,9 +539,12 @@ class Misc(GObject.Object): parent: GObject.Object = ... def do_threads_enter(self) -> None: ... def do_threads_leave(self) -> None: ... + @deprecated("Since 2.12.") @staticmethod def get_instance() -> Misc: ... + @deprecated("Since 2.12.") def threads_enter(self) -> None: ... + @deprecated("Since 2.12.") def threads_leave(self) -> None: ... class MiscClass(GObject.GPointer): @@ -847,7 +879,9 @@ class Object(GObject.Object): def get_attributes(self) -> list[None]: ... def get_description(self) -> str: ... def get_index_in_parent(self) -> int: ... + @deprecated("Use atk_component_get_layer instead.") def get_layer(self) -> Layer: ... + @deprecated("Use atk_component_get_mdi_zorder instead.") def get_mdi_zorder(self) -> int: ... def get_n_accessible_children(self) -> int: ... def get_name(self) -> str: ... @@ -860,6 +894,7 @@ class Object(GObject.Object): def ref_accessible_child(self, i: int) -> Object: ... def ref_relation_set(self) -> RelationSet: ... def ref_state_set(self) -> StateSet: ... + @deprecated("See atk_object_connect_property_change_handler()") def remove_property_change_handler(self, handler_id: int) -> None: ... def remove_relationship( self, relationship: RelationType, target: Object @@ -1443,13 +1478,18 @@ class Table(GObject.GInterface): def add_column_selection(self, column: int) -> bool: ... def add_row_selection(self, row: int) -> bool: ... def get_caption(self) -> Optional[Object]: ... + @deprecated("Since 2.12.") def get_column_at_index(self, index_: int) -> int: ... def get_column_description(self, column: int) -> str: ... def get_column_extent_at(self, row: int, column: int) -> int: ... def get_column_header(self, column: int) -> Optional[Object]: ... + @deprecated( + "Since 2.12. Use atk_table_ref_at() in order to get theaccessible that represents the cell at (@row, @column)" + ) def get_index_at(self, row: int, column: int) -> int: ... def get_n_columns(self) -> int: ... def get_n_rows(self) -> int: ... + @deprecated("since 2.12.") def get_row_at_index(self, index_: int) -> int: ... def get_row_description(self, row: int) -> Optional[str]: ... def get_row_extent_at(self, row: int, column: int) -> int: ... @@ -1584,12 +1624,17 @@ class Text(GObject.GInterface): self, offset: int, granularity: TextGranularity ) -> Tuple[Optional[str], int, int]: ... def get_text(self, start_offset: int, end_offset: int) -> str: ... + @deprecated("Please use atk_text_get_string_at_offset() instead.") def get_text_after_offset( self, offset: int, boundary_type: TextBoundary ) -> Tuple[str, int, int]: ... + @deprecated( + "This method is deprecated since ATK version2.9.4. Please use atk_text_get_string_at_offset() instead." + ) def get_text_at_offset( self, offset: int, boundary_type: TextBoundary ) -> Tuple[str, int, int]: ... + @deprecated("Please use atk_text_get_string_at_offset() instead.") def get_text_before_offset( self, offset: int, boundary_type: TextBoundary ) -> Tuple[str, int, int]: ... @@ -1721,14 +1766,19 @@ class Value(GObject.GInterface): Interface AtkValue """ + @deprecated("Since 2.12. Use atk_value_get_value_and_text()instead.") def get_current_value(self) -> Any: ... def get_increment(self) -> float: ... + @deprecated("Since 2.12. Use atk_value_get_range() instead.") def get_maximum_value(self) -> Any: ... + @deprecated("Since 2.12. Use atk_value_get_increment() instead.") def get_minimum_increment(self) -> Any: ... + @deprecated("Since 2.12. Use atk_value_get_range() instead.") def get_minimum_value(self) -> Any: ... def get_range(self) -> Optional[Range]: ... def get_sub_ranges(self) -> list[Range]: ... def get_value_and_text(self) -> Tuple[float, str]: ... + @deprecated("Since 2.12. Use atk_value_set_value() instead.") def set_current_value(self, value: Any) -> bool: ... def set_value(self, new_value: float) -> None: ... diff --git a/src/gi-stubs/repository/AyatanaAppIndicator3.pyi b/src/gi-stubs/repository/AyatanaAppIndicator3.pyi index f847686e..bb7f6092 100644 --- a/src/gi-stubs/repository/AyatanaAppIndicator3.pyi +++ b/src/gi-stubs/repository/AyatanaAppIndicator3.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gdk from gi.repository import GObject from gi.repository import Gtk @@ -141,10 +146,12 @@ class Indicator(GObject.Object): def new_with_path( cls, id: str, icon_name: str, category: IndicatorCategory, icon_theme_path: str ) -> Indicator: ... + @deprecated("Use app_indicator_set_attention_icon_full() instead.") def set_attention_icon(self, icon_name: str) -> None: ... def set_attention_icon_full( self, icon_name: str, icon_desc: Optional[str] = None ) -> None: ... + @deprecated("Use app_indicator_set_icon_full()") def set_icon(self, icon_name: str) -> None: ... def set_icon_full( self, icon_name: str, icon_desc: Optional[str] = None diff --git a/src/gi-stubs/repository/Farstream.pyi b/src/gi-stubs/repository/Farstream.pyi index bbe777d5..0ded1471 100644 --- a/src/gi-stubs/repository/Farstream.pyi +++ b/src/gi-stubs/repository/Farstream.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GLib from gi.repository import GObject from gi.repository import Gst diff --git a/src/gi-stubs/repository/Flatpak.pyi b/src/gi-stubs/repository/Flatpak.pyi index 939815f6..ffe129e3 100644 --- a/src/gi-stubs/repository/Flatpak.pyi +++ b/src/gi-stubs/repository/Flatpak.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GLib from gi.repository import GObject @@ -185,6 +190,7 @@ class Installation(GObject.Object): self, name: str, cancellable: Optional[Gio.Cancellable] = None ) -> Remote: ... def get_storage_type(self) -> StorageType: ... + @deprecated("Use flatpak_transaction_add_install() instead.") def install( self, remote_name: str, @@ -196,6 +202,7 @@ class Installation(GObject.Object): cancellable: Optional[Gio.Cancellable] = None, *progress_data: Any, ) -> InstalledRef: ... + @deprecated("Use flatpak_transaction_add_install_bundle() instead.") def install_bundle( self, file: Gio.File, @@ -203,6 +210,7 @@ class Installation(GObject.Object): cancellable: Optional[Gio.Cancellable] = None, *progress_data: Any, ) -> InstalledRef: ... + @deprecated("Use flatpak_transaction_add_install() instead.") def install_full( self, flags: InstallFlags, @@ -216,6 +224,7 @@ class Installation(GObject.Object): cancellable: Optional[Gio.Cancellable] = None, *progress_data: Any, ) -> InstalledRef: ... + @deprecated("Use flatpak_transaction_add_install_flatpakref() instead.") def install_ref_file( self, ref_file_data: GLib.Bytes, cancellable: Optional[Gio.Cancellable] = None ) -> RemoteRef: ... @@ -319,6 +328,7 @@ class Installation(GObject.Object): self, key: str, value: str, cancellable: Optional[Gio.Cancellable] = None ) -> bool: ... def set_no_interaction(self, no_interaction: bool) -> None: ... + @deprecated("Use flatpak_transaction_add_uninstall() instead.") def uninstall( self, kind: RefKind, @@ -329,6 +339,7 @@ class Installation(GObject.Object): cancellable: Optional[Gio.Cancellable] = None, *progress_data: Any, ) -> bool: ... + @deprecated("Use flatpak_transaction_add_uninstall() instead.") def uninstall_full( self, flags: UninstallFlags, @@ -340,6 +351,7 @@ class Installation(GObject.Object): cancellable: Optional[Gio.Cancellable] = None, *progress_data: Any, ) -> bool: ... + @deprecated("Use flatpak_transaction_add_update() instead.") def update( self, flags: UpdateFlags, @@ -367,6 +379,7 @@ class Installation(GObject.Object): out_changed: Optional[bool] = None, cancellable: Optional[Gio.Cancellable] = None, ) -> bool: ... + @deprecated("Use flatpak_transaction_add_update() instead.") def update_full( self, flags: UpdateFlags, diff --git a/src/gi-stubs/repository/GIRepository.pyi b/src/gi-stubs/repository/GIRepository.pyi index e72dc269..c7bd81ee 100644 --- a/src/gi-stubs/repository/GIRepository.pyi +++ b/src/gi-stubs/repository/GIRepository.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GLib from gi.repository import GObject diff --git a/src/gi-stubs/repository/GLib.pyi b/src/gi-stubs/repository/GLib.pyi index 61c2c3f5..361a5dda 100644 --- a/src/gi-stubs/repository/GLib.pyi +++ b/src/gi-stubs/repository/GLib.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GObject ANALYZER_ANALYZING: int = 1 @@ -282,6 +287,7 @@ def assertion_message_error( error_domain: int, error_code: int, ) -> None: ... +@deprecated("It is best to avoid g_atexit().") def atexit(func: Callable[[], None]) -> None: ... def atomic_int_add(atomic: int, val: int) -> int: ... def atomic_int_and(atomic: int, val: int) -> int: ... @@ -291,6 +297,7 @@ def atomic_int_compare_and_exchange_full( ) -> Tuple[bool, int]: ... def atomic_int_dec_and_test(atomic: int) -> bool: ... def atomic_int_exchange(atomic: int, newval: int) -> int: ... +@deprecated("Use g_atomic_int_add() instead.") def atomic_int_exchange_and_add(atomic: int, val: int) -> int: ... def atomic_int_get(atomic: int) -> int: ... def atomic_int_inc(atomic: int) -> None: ... @@ -330,6 +337,9 @@ def base64_encode_close(break_lines: bool) -> Tuple[int, bytes, int, int]: ... def base64_encode_step( in_: Sequence[int], break_lines: bool ) -> Tuple[int, bytes, int, int]: ... +@deprecated( + "Use g_path_get_basename() instead, but notice that g_path_get_basename() allocates new memory for the returned string, unlike this function which returns a pointer into the argument." +) def basename(file_name: str) -> str: ... def bit_lock(address: int, lock_bit: int) -> None: ... def bit_nth_lsf(mask: int, nth_bit: int) -> int: ... @@ -439,6 +449,9 @@ def filename_to_uri(filename: str, hostname: Optional[str] = None) -> str: ... def filename_to_utf8(opsysstring: str, len: int) -> Tuple[str, int, int]: ... def find_program_in_path(program: str) -> Optional[str]: ... def format_size(size: int) -> str: ... +@deprecated( + "This function is broken due to its use of SI suffixes to denote IEC units. Use g_format_size() instead." +) def format_size_for_display(size: int) -> str: ... def format_size_full(size: int, flags: FormatSizeFlags) -> str: ... def free(mem: None) -> None: ... @@ -583,9 +596,15 @@ def markup_error_quark() -> int: ... # override def markup_escape_text(str: Union[str, bytes], length: int = ...) -> str: ... +@deprecated("GLib always uses the system malloc, so this function alwaysreturns %TRUE.") def mem_is_system_malloc() -> bool: ... +@deprecated("Use other memory profiling tools instead") def mem_profile() -> None: ... +@deprecated("This function now does nothing. Use other memoryprofiling tools instead") def mem_set_vtable(vtable: MemVTable) -> None: ... +@deprecated( + "Use g_memdup2() instead, as it accepts a #gsize argument for @byte_size, avoiding the possibility of overflow in a #gsize → #guint conversion" +) def memdup(mem: None, byte_size: int) -> None: ... def memdup2(mem: None, byte_size: int) -> None: ... def mkdir_with_parents(pathname: str, mode: int) -> int: ... @@ -726,6 +745,9 @@ def spawn_async_with_pipes_and_fds( target_fds: Optional[Sequence[int]] = None, *user_data: Any, ) -> Tuple[bool, int, int, int, int]: ... +@deprecated( + "Use g_spawn_check_wait_status() instead, and check whether your code is conflating wait and exit statuses." +) def spawn_check_exit_status(wait_status: int) -> bool: ... def spawn_check_wait_status(wait_status: int) -> bool: ... def spawn_close_pid(pid: int) -> None: ... @@ -755,12 +777,18 @@ def str_tokenize_and_fold( string: str, translit_locale: Optional[str] = None ) -> Tuple[list[str], list[str]]: ... def strcanon(string: str, valid_chars: str, substitutor: int) -> str: ... +@deprecated( + "See g_strncasecmp() for a discussion of why this function is deprecated and how to replace it." +) def strcasecmp(s1: str, s2: str) -> int: ... def strchomp(string: str) -> str: ... def strchug(string: str) -> str: ... def strcmp0(str1: Optional[str] = None, str2: Optional[str] = None) -> int: ... def strcompress(source: str) -> str: ... def strdelimit(string: str, delimiters: Optional[str], new_delimiter: int) -> str: ... +@deprecated( + "This function is totally broken for the reasons discussedin the g_strncasecmp() docs - use g_ascii_strdown() or g_utf8_strdown()instead." +) def strdown(string: str) -> str: ... def strdup(str: Optional[str] = None) -> str: ... def strerror(errnum: int) -> str: ... @@ -770,6 +798,9 @@ def strip_context(msgid: str, msgval: str) -> str: ... def strjoinv(separator: Optional[str], str_array: str) -> str: ... def strlcat(dest: str, src: str, dest_size: int) -> int: ... def strlcpy(dest: str, src: str, dest_size: int) -> int: ... +@deprecated( + "The problem with g_strncasecmp() is that it does the comparison by calling toupper()/tolower(). These functions are locale-specific and operate on single bytes. However, it is impossible to handle things correctly from an internationalization standpoint by operating on bytes, since characters may be multibyte. Thus g_strncasecmp() is broken if your string is guaranteed to be ASCII, since it is locale-sensitive, and it's broken if your string is localized, since it doesn't work on many encodings at all, including UTF-8, EUC-JP, etc. There are therefore two replacement techniques: g_ascii_strncasecmp(), which only works on ASCII and is not locale-sensitive, and g_utf8_casefold() followed by strcmp() on the resulting strings, which is good for case-insensitive sorting of UTF-8." +) def strncasecmp(s1: str, s2: str, n: int) -> int: ... def strndup(str: str, n: int) -> str: ... def strnfill(length: int, fill_char: int) -> str: ... @@ -781,6 +812,9 @@ def strsplit(string: str, delimiter: str, max_tokens: int) -> list[str]: ... def strsplit_set(string: str, delimiters: str, max_tokens: int) -> list[str]: ... def strstr_len(haystack: str, haystack_len: int, needle: str) -> str: ... def strtod(nptr: str) -> Tuple[float, str]: ... +@deprecated( + "This function is totally broken for the reasons discussed in the g_strncasecmp() docs - use g_ascii_strup() or g_utf8_strup() instead." +) def strup(string: str) -> str: ... def strv_contains(strv: str, str: str) -> bool: ... def strv_equal(strv1: str, strv2: str) -> bool: ... @@ -831,6 +865,9 @@ def test_timer_start() -> None: ... def test_trap_assertions( domain: str, file: str, line: int, func: str, assertion_flags: int, pattern: str ) -> None: ... +@deprecated( + "This function is implemented only on Unix platforms,is not always reliable due to problems inherent in fork-without-execand doesn't set close-on-exec flag on its file descriptors.Use g_test_trap_subprocess() instead." +) def test_trap_fork(usec_timeout: int, test_trap_flags: TestTrapFlags) -> bool: ... def test_trap_has_passed() -> bool: ... def test_trap_reached_timeout() -> bool: ... @@ -848,6 +885,9 @@ def thread_pool_stop_unused_threads() -> None: ... def thread_self() -> Thread: ... def thread_yield() -> None: ... def threads_init(): ... # FIXME Function +@deprecated( + "#GTimeVal is not year-2038-safe. Use g_date_time_new_from_iso8601() instead." +) def time_val_from_iso8601(iso_date: str) -> Tuple[bool, TimeVal]: ... # override @@ -859,9 +899,13 @@ def timeout_add_seconds( ) -> int: ... def timeout_source_new(interval: int) -> Source: ... def timeout_source_new_seconds(interval: int) -> Source: ... +@deprecated("#GTrashStack is deprecated without replacement") def trash_stack_height(stack_p: TrashStack) -> int: ... +@deprecated("#GTrashStack is deprecated without replacement") def trash_stack_peek(stack_p: TrashStack) -> None: ... +@deprecated("#GTrashStack is deprecated without replacement") def trash_stack_pop(stack_p: TrashStack) -> None: ... +@deprecated("#GTrashStack is deprecated without replacement") def trash_stack_push(stack_p: TrashStack, data_p: None) -> None: ... def try_malloc(n_bytes: int) -> None: ... def try_malloc0(n_bytes: int) -> None: ... @@ -905,6 +949,7 @@ def unichar_toupper(c: str) -> str: ... def unichar_type(c: str) -> UnicodeType: ... def unichar_validate(ch: str) -> bool: ... def unichar_xdigit_value(c: str) -> int: ... +@deprecated("Use the more flexible g_unichar_fully_decompose() instead.") def unicode_canonical_decomposition(ch: str, result_len: int) -> str: ... def unicode_canonical_ordering(string: Sequence[str]) -> None: ... def unicode_script_from_iso15924(iso15924: int) -> UnicodeScript: ... @@ -1055,6 +1100,7 @@ def variant_parse( ) -> Variant: ... def variant_parse_error_print_context(error: Error, source_str: str) -> str: ... def variant_parse_error_quark() -> int: ... +@deprecated("Use g_variant_parse_error_quark() instead.") def variant_parser_get_error_quark() -> int: ... def variant_type_checked_(arg0: str) -> VariantType: ... def variant_type_string_get_depth_(type_string: str) -> int: ... @@ -1085,10 +1131,15 @@ class AsyncQueue(GObject.GPointer): def push_front(self, item: None) -> None: ... def push_front_unlocked(self, item: None) -> None: ... def push_unlocked(self, data: None) -> None: ... + @deprecated( + "Reference counting is done atomically.so g_async_queue_ref() can be used regardless of the @queue'slock." + ) def ref_unlocked(self) -> None: ... def remove(self, item: None) -> bool: ... def remove_unlocked(self, item: None) -> bool: ... + @deprecated("use g_async_queue_timeout_pop().") def timed_pop(self, end_time: TimeVal) -> None: ... + @deprecated("use g_async_queue_timeout_pop_unlocked().") def timed_pop_unlocked(self, end_time: TimeVal) -> None: ... def timeout_pop(self, timeout: int) -> None: ... def timeout_pop_unlocked(self, timeout: int) -> None: ... @@ -1096,6 +1147,9 @@ class AsyncQueue(GObject.GPointer): def try_pop_unlocked(self) -> None: ... def unlock(self) -> None: ... def unref(self) -> None: ... + @deprecated( + "Reference counting is done atomically.so g_async_queue_unref() can be used regardless of the @queue'slock." + ) def unref_and_unlock(self) -> None: ... class BookmarkFile(GObject.GBoxed): @@ -1115,8 +1169,14 @@ class BookmarkFile(GObject.GBoxed): @staticmethod def error_quark() -> int: ... def free(self) -> None: ... + @deprecated( + "Use g_bookmark_file_get_added_date_time() instead, as `time_t` is deprecated due to the year 2038 problem." + ) def get_added(self, uri: str) -> int: ... def get_added_date_time(self, uri: str) -> DateTime: ... + @deprecated( + "Use g_bookmark_file_get_application_info() instead, as `time_t` is deprecated due to the year 2038 problem." + ) def get_app_info(self, uri: str, name: str) -> Tuple[bool, str, int, int]: ... def get_application_info( self, uri: str, name: str @@ -1127,11 +1187,17 @@ class BookmarkFile(GObject.GBoxed): def get_icon(self, uri: str) -> Tuple[bool, str, str]: ... def get_is_private(self, uri: str) -> bool: ... def get_mime_type(self, uri: str) -> str: ... + @deprecated( + "Use g_bookmark_file_get_modified_date_time() instead, as `time_t` is deprecated due to the year 2038 problem." + ) def get_modified(self, uri: str) -> int: ... def get_modified_date_time(self, uri: str) -> DateTime: ... def get_size(self) -> int: ... def get_title(self, uri: Optional[str] = None) -> str: ... def get_uris(self) -> list[str]: ... + @deprecated( + "Use g_bookmark_file_get_visited_date_time() instead, as `time_t` is deprecated due to the year 2038 problem." + ) def get_visited(self, uri: str) -> int: ... def get_visited_date_time(self, uri: str) -> DateTime: ... def has_application(self, uri: str, name: str) -> bool: ... @@ -1146,8 +1212,14 @@ class BookmarkFile(GObject.GBoxed): def remove_application(self, uri: str, name: str) -> bool: ... def remove_group(self, uri: str, group: str) -> bool: ... def remove_item(self, uri: str) -> bool: ... + @deprecated( + "Use g_bookmark_file_set_added_date_time() instead, as `time_t` is deprecated due to the year 2038 problem." + ) def set_added(self, uri: str, added: int) -> None: ... def set_added_date_time(self, uri: str, added: DateTime) -> None: ... + @deprecated( + "Use g_bookmark_file_set_application_info() instead, as `time_t` is deprecated due to the year 2038 problem." + ) def set_app_info( self, uri: str, name: str, exec: str, count: int, stamp: int ) -> bool: ... @@ -1164,9 +1236,15 @@ class BookmarkFile(GObject.GBoxed): def set_icon(self, uri: str, href: Optional[str], mime_type: str) -> None: ... def set_is_private(self, uri: str, is_private: bool) -> None: ... def set_mime_type(self, uri: str, mime_type: str) -> None: ... + @deprecated( + "Use g_bookmark_file_set_modified_date_time() instead, as `time_t` is deprecated due to the year 2038 problem." + ) def set_modified(self, uri: str, modified: int) -> None: ... def set_modified_date_time(self, uri: str, modified: DateTime) -> None: ... def set_title(self, uri: Optional[str], title: str) -> None: ... + @deprecated( + "Use g_bookmark_file_set_visited_date_time() instead, as `time_t` is deprecated due to the year 2038 problem." + ) def set_visited(self, uri: str, visited: int) -> None: ... def set_visited_date_time(self, uri: str, visited: DateTime) -> None: ... def to_data(self) -> bytes: ... @@ -1319,8 +1397,10 @@ class Date(GObject.GBoxed): def set_julian(self, julian_date: int) -> None: ... def set_month(self, month: DateMonth) -> None: ... def set_parse(self, str: str) -> None: ... + @deprecated("Use g_date_set_time_t() instead.") def set_time(self, time_: int) -> None: ... def set_time_t(self, timet: int) -> None: ... + @deprecated("#GTimeVal is not year-2038-safe. Use g_date_set_time_t() instead.") def set_time_val(self, timeval: TimeVal) -> None: ... def set_year(self, year: int) -> None: ... @staticmethod @@ -1417,8 +1497,14 @@ class DateTime(GObject.GBoxed): def new_from_iso8601( cls, text: str, default_tz: Optional[TimeZone] = None ) -> Optional[DateTime]: ... + @deprecated( + "#GTimeVal is not year-2038-safe. Use g_date_time_new_from_unix_local() instead." + ) @classmethod def new_from_timeval_local(cls, tv: TimeVal) -> Optional[DateTime]: ... + @deprecated( + "#GTimeVal is not year-2038-safe. Use g_date_time_new_from_unix_utc() instead." + ) @classmethod def new_from_timeval_utc(cls, tv: TimeVal) -> Optional[DateTime]: ... @classmethod @@ -1441,6 +1527,7 @@ class DateTime(GObject.GBoxed): ) -> Optional[DateTime]: ... def ref(self) -> DateTime: ... def to_local(self) -> Optional[DateTime]: ... + @deprecated("#GTimeVal is not year-2038-safe. Use g_date_time_to_unix() instead.") def to_timeval(self, tv: TimeVal) -> bool: ... def to_timezone(self, tz: TimeZone) -> Optional[DateTime]: ... def to_unix(self) -> int: ... @@ -1669,6 +1756,7 @@ class IOChannel(GObject.GBoxed): def add_watch( self, condition, callback, *user_data, **kwargs ): ... # FIXME Function + @deprecated("Use g_io_channel_shutdown() instead.") def close(self) -> None: ... @staticmethod def error_from_errno(en: int) -> IOChannelError: ... @@ -1957,6 +2045,7 @@ class MainContext(GObject.GBoxed): def release(self) -> None: ... def remove_poll(self, fd: PollFD) -> None: ... def unref(self) -> None: ... + @deprecated("Use g_main_context_is_owner() and separate locking instead.") def wait(self, cond: Cond, mutex: Mutex) -> bool: ... def wakeup(self) -> None: ... @@ -1988,6 +2077,7 @@ class MappedFile(GObject.GBoxed): new_from_fd(fd:int, writable:bool) -> GLib.MappedFile """ + @deprecated("Use g_mapped_file_unref() instead.") def free(self) -> None: ... def get_bytes(self) -> Bytes: ... def get_contents(self) -> str: ... @@ -2690,6 +2780,9 @@ class String(GObject.GBoxed): def ascii_down(self) -> String: ... def ascii_up(self) -> String: ... def assign(self, rval: str) -> String: ... + @deprecated( + "This function uses the locale-specific tolower() function, which is almost never the right thing. Use g_string_ascii_down() or g_utf8_strdown() instead." + ) def down(self) -> String: ... def equal(self, v2: String) -> bool: ... def erase(self, pos: int, len: int) -> String: ... @@ -2718,6 +2811,9 @@ class String(GObject.GBoxed): @classmethod def sized_new(cls, dfl_size: int) -> String: ... def truncate(self, len: int) -> String: ... + @deprecated( + "This function uses the locale-specific toupper() function, which is almost never the right thing. Use g_string_ascii_up() or g_utf8_strup() instead." + ) def up(self) -> String: ... class StringChunk(GObject.GPointer): @@ -2849,6 +2945,7 @@ class ThreadPool(GObject.GPointer): def stop_unused_threads() -> None: ... def unprocessed(self) -> int: ... +@deprecated("Use #GDateTime or #guint64 instead.") class TimeVal(GObject.GPointer): """ :Constructors: @@ -2860,9 +2957,18 @@ class TimeVal(GObject.GPointer): tv_sec: int = ... tv_usec: int = ... + @deprecated( + "#GTimeVal is not year-2038-safe. Use `guint64` for representing microseconds since the epoch, or use #GDateTime." + ) def add(self, microseconds: int) -> None: ... + @deprecated( + "#GTimeVal is not year-2038-safe. Use g_date_time_new_from_iso8601() instead." + ) @staticmethod def from_iso8601(iso_date: str) -> Tuple[bool, TimeVal]: ... + @deprecated( + "#GTimeVal is not year-2038-safe. Use g_date_time_format_iso8601(dt) instead." + ) def to_iso8601(self) -> Optional[str]: ... class TimeZone(GObject.GBoxed): @@ -2884,6 +2990,9 @@ class TimeZone(GObject.GBoxed): def get_identifier(self) -> str: ... def get_offset(self, interval: int) -> int: ... def is_dst(self, interval: int) -> bool: ... + @deprecated( + "Use g_time_zone_new_identifier() instead, as it provides error reporting. Change your code to handle a potentially %NULL return value." + ) @classmethod def new(cls, identifier: Optional[str] = None) -> TimeZone: ... @classmethod @@ -2987,6 +3096,7 @@ class TokenValue(GObject.GPointer): v_string = ... # FIXME Constant v_symbol = ... # FIXME Constant +@deprecated("#GTrashStack is deprecated without replacement") class TrashStack(GObject.GPointer): """ :Constructors: @@ -2997,12 +3107,16 @@ class TrashStack(GObject.GPointer): """ next: TrashStack = ... + @deprecated("#GTrashStack is deprecated without replacement") @staticmethod def height(stack_p: TrashStack) -> int: ... + @deprecated("#GTrashStack is deprecated without replacement") @staticmethod def peek(stack_p: TrashStack) -> None: ... + @deprecated("#GTrashStack is deprecated without replacement") @staticmethod def pop(stack_p: TrashStack) -> None: ... + @deprecated("#GTrashStack is deprecated without replacement") @staticmethod def push(stack_p: TrashStack, data_p: None) -> None: ... @@ -3351,6 +3465,7 @@ class Variant(GObject.GPointer): def parse_error_print_context(error: Error, source_str: str) -> str: ... @staticmethod def parse_error_quark() -> int: ... + @deprecated("Use g_variant_parse_error_quark() instead.") @staticmethod def parser_get_error_quark() -> int: ... def print_(self, type_annotate: bool) -> str: ... diff --git a/src/gi-stubs/repository/GModule.pyi b/src/gi-stubs/repository/GModule.pyi index 04d67d1f..d845eb74 100644 --- a/src/gi-stubs/repository/GModule.pyi +++ b/src/gi-stubs/repository/GModule.pyi @@ -7,18 +7,29 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GObject _lock = ... # FIXME Constant _namespace: str = "GModule" _version: str = "2.0" +@deprecated( + "Use g_module_open() instead with @module_name as thebasename of the file_name argument. See %G_MODULE_SUFFIX for why." +) def module_build_path(directory: Optional[str], module_name: str) -> str: ... def module_error() -> str: ... def module_error_quark() -> int: ... def module_supported() -> bool: ... class Module(GObject.GPointer): + @deprecated( + "Use g_module_open() instead with @module_name as thebasename of the file_name argument. See %G_MODULE_SUFFIX for why." + ) @staticmethod def build_path(directory: Optional[str], module_name: str) -> str: ... def close(self) -> bool: ... diff --git a/src/gi-stubs/repository/GObject.pyi b/src/gi-stubs/repository/GObject.pyi index f9585746..c0334da0 100644 --- a/src/gi-stubs/repository/GObject.pyi +++ b/src/gi-stubs/repository/GObject.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GLib G_MAXDOUBLE: float = 1.7976931348623157e308 @@ -693,7 +698,9 @@ def type_get_instance_count(type: Type) -> int: ... def type_get_plugin(type: Type) -> TypePlugin: ... def type_get_qdata(type: Type, quark: int) -> None: ... def type_get_type_registration_serial() -> int: ... +@deprecated("the type system is now initialised automatically") def type_init() -> None: ... +@deprecated("the type system is now initialised automatically") def type_init_with_debug_flags(debug_flags: TypeDebugFlags) -> None: ... def type_interface_add_prerequisite( interface_type: Type, prerequisite_type: Type @@ -779,8 +786,10 @@ class Binding(Object): def dup_source(self) -> Optional[Object]: ... def dup_target(self) -> Optional[Object]: ... def get_flags(self) -> BindingFlags: ... + @deprecated("Use g_binding_dup_source() for a safer version of thisfunction.") def get_source(self) -> Optional[Object]: ... def get_source_property(self) -> str: ... + @deprecated("Use g_binding_dup_target() for a safer version of thisfunction.") def get_target(self) -> Optional[Object]: ... def get_target_property(self) -> str: ... def unbind(self): ... # FIXME Function @@ -1439,6 +1448,7 @@ class MainContext(GBoxed): def release(self) -> None: ... def remove_poll(self, fd: GLib.PollFD) -> None: ... def unref(self) -> None: ... + @deprecated("This method is deprecated") def wait(self, cond: GLib.Cond, mutex: GLib.Mutex) -> bool: ... def wakeup(self) -> None: ... @@ -1537,6 +1547,9 @@ class Object: def interface_list_properties(self, *args, **kargs): ... # FIXME Function def is_floating(self) -> bool: ... def list_properties(self) -> list[ParamSpec]: ... + @deprecated( + "Use g_object_new_with_properties() instead.deprecated. See #GParameter for more information." + ) @classmethod def newv(cls, object_type: Type, parameters: Sequence[Parameter]) -> Object: ... def notify(self, property_name: str) -> None: ... @@ -2004,6 +2017,7 @@ class ParamSpecVariant(ParamSpec): default_value: GLib.Variant = ... padding: list[None] = ... +@deprecated("This type is not introspectable.") class Parameter(GPointer): """ :Constructors: @@ -2328,6 +2342,9 @@ class TypeClass(GPointer): """ g_type: Type = ... + @deprecated( + "Use the G_ADD_PRIVATE() macro with the `G_DEFINE_*` family of macros to add instance private data to a type" + ) def add_private(self, private_size: int) -> None: ... @staticmethod def adjust_private_offset(g_class: None, private_size_or_offset: int) -> None: ... @@ -2531,6 +2548,7 @@ class Value(GBoxed): def fits_pointer(self) -> bool: ... def get_boolean(self) -> bool: ... def get_boxed(self): ... # FIXME Function + @deprecated("This function's return type is broken, see g_value_get_schar()") def get_char(self) -> int: ... def get_double(self) -> float: ... def get_enum(self) -> int: ... @@ -2557,7 +2575,9 @@ class Value(GBoxed): def reset(self) -> Any: ... def set_boolean(self, v_boolean: bool) -> None: ... def set_boxed(self, boxed): ... # FIXME Function + @deprecated("Use g_value_take_boxed() instead.") def set_boxed_take_ownership(self, v_boxed: None) -> None: ... + @deprecated("This function's input type is broken, see g_value_set_schar()") def set_char(self, v_char: int) -> None: ... def set_double(self, v_double: float) -> None: ... def set_enum(self, v_enum: int) -> None: ... @@ -2576,6 +2596,7 @@ class Value(GBoxed): def set_static_boxed(self, v_boxed: None) -> None: ... def set_static_string(self, v_string: Optional[str] = None) -> None: ... def set_string(self, v_string: Optional[str] = None) -> None: ... + @deprecated("Use g_value_take_string() instead.") def set_string_take_ownership(self, v_string: Optional[str] = None) -> None: ... def set_uchar(self, v_uchar: int) -> None: ... def set_uint(self, v_uint: int) -> None: ... @@ -2606,14 +2627,22 @@ class ValueArray(GBoxed): n_values: int = ... values: Any = ... n_prealloced: int = ... + @deprecated("Use #GArray and g_array_append_val() instead.") def append(self, value: Optional[Any] = None) -> ValueArray: ... + @deprecated("Use #GArray and g_array_ref() instead.") def copy(self) -> ValueArray: ... + @deprecated("Use g_array_index() instead.") def get_nth(self, index_: int) -> Any: ... + @deprecated("Use #GArray and g_array_insert_val() instead.") def insert(self, index_: int, value: Optional[Any] = None) -> ValueArray: ... + @deprecated("Use #GArray and g_array_sized_new() instead.") @classmethod def new(cls, n_prealloced: int) -> ValueArray: ... + @deprecated("Use #GArray and g_array_prepend_val() instead.") def prepend(self, value: Optional[Any] = None) -> ValueArray: ... + @deprecated("Use #GArray and g_array_remove_index() instead.") def remove(self, index_: int) -> ValueArray: ... + @deprecated("Use #GArray and g_array_sort().") def sort(self, compare_func: Callable[..., int], *user_data: Any) -> ValueArray: ... class Warning: diff --git a/src/gi-stubs/repository/GSound.pyi b/src/gi-stubs/repository/GSound.pyi index 060cc5b4..cee1d908 100644 --- a/src/gi-stubs/repository/GSound.pyi +++ b/src/gi-stubs/repository/GSound.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GObject diff --git a/src/gi-stubs/repository/GdkPixbuf.pyi b/src/gi-stubs/repository/GdkPixbuf.pyi index 1d827595..5d39fcaf 100644 --- a/src/gi-stubs/repository/GdkPixbuf.pyi +++ b/src/gi-stubs/repository/GdkPixbuf.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GLib from gi.repository import GModule @@ -233,6 +238,7 @@ class Pixbuf(GObject.Object, Gio.Icon, Gio.LoadableIcon): def new_from_file_at_size( cls, filename: str, width: int, height: int ) -> Optional[Pixbuf]: ... + @deprecated("Use `GResource` instead.") @classmethod def new_from_inline(cls, data: Sequence[int], copy_pixels: bool) -> Pixbuf: ... @classmethod diff --git a/src/gi-stubs/repository/Geoclue.pyi b/src/gi-stubs/repository/Geoclue.pyi index 7e2bef7c..ec0cba44 100644 --- a/src/gi-stubs/repository/Geoclue.pyi +++ b/src/gi-stubs/repository/Geoclue.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GLib from gi.repository import GObject diff --git a/src/gi-stubs/repository/Ggit.pyi b/src/gi-stubs/repository/Ggit.pyi index 26660d2d..5f7b50b0 100644 --- a/src/gi-stubs/repository/Ggit.pyi +++ b/src/gi-stubs/repository/Ggit.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GLib from gi.repository import GObject diff --git a/src/gi-stubs/repository/Gio.pyi b/src/gi-stubs/repository/Gio.pyi index 83bb6238..1c47973c 100644 --- a/src/gi-stubs/repository/Gio.pyi +++ b/src/gi-stubs/repository/Gio.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GLib from gi.repository import GObject @@ -193,6 +198,9 @@ def app_info_launch_default_for_uri_async( ) -> None: ... def app_info_launch_default_for_uri_finish(result: AsyncResult) -> bool: ... def app_info_reset_type_associations(content_type: str) -> None: ... +@deprecated( + "Use g_object_new_with_properties() andg_async_initable_init_async() instead. See #GParameter for more information." +) def async_initable_newv_async( object_type: Type, n_parameters: int, @@ -340,6 +348,9 @@ def file_new_tmp_finish(result: AsyncResult) -> Tuple[File, FileIOStream]: ... def file_parse_name(parse_name: str) -> File: ... def icon_deserialize(value: GLib.Variant) -> Optional[Icon]: ... def icon_new_for_string(str: str) -> Icon: ... +@deprecated( + "Use g_object_new_with_properties() andg_initable_init() instead. See #GParameter for more information." +) def initable_newv( object_type: Type, parameters: Sequence[GObject.Parameter], @@ -361,7 +372,11 @@ def io_modules_scan_all_in_directory(dirname: str) -> None: ... def io_modules_scan_all_in_directory_with_scope( dirname: str, scope: IOModuleScope ) -> None: ... +@deprecated( + "You should never call this function, since you don'tknow how other libraries in your program might be making use ofgioscheduler." +) def io_scheduler_cancel_all_jobs() -> None: ... +@deprecated("use #GThreadPool or g_task_run_in_thread()") def io_scheduler_push_job( job_func: Callable[..., bool], io_priority: int, @@ -421,6 +436,7 @@ def resources_open_stream( def resources_register(resource: Resource) -> None: ... def resources_unregister(resource: Resource) -> None: ... def settings_schema_source_get_default() -> Optional[SettingsSchemaSource]: ... +@deprecated("Use g_task_report_error().") def simple_async_report_gerror_in_idle( object: Optional[GObject.Object], callback: Optional[Callable[..., None]], @@ -969,6 +985,9 @@ class Application(GObject.Object, ActionGroup, ActionMap): def send_notification( self, id: Optional[str], notification: Notification ) -> None: ... + @deprecated( + "Use the #GActionMap interface instead. Never evermix use of this API with use of #GActionMap on the same @applicationor things will go very badly wrong. This function is known tointroduce buggy behaviour (ie: signals not emitted on changes to theaction group), so you should really use #GActionMap instead." + ) def set_action_group(self, action_group: Optional[ActionGroup] = None) -> None: ... def set_application_id(self, application_id: Optional[str] = None) -> None: ... def set_default(self) -> None: ... @@ -1101,6 +1120,9 @@ class AsyncInitable(GObject.GInterface): ) -> None: ... def init_finish(self, res: AsyncResult) -> bool: ... def new_finish(self, res: AsyncResult) -> GObject.Object: ... + @deprecated( + "Use g_object_new_with_properties() andg_async_initable_init_async() instead. See #GParameter for more information." + ) @staticmethod def newv_async( object_type: Type, @@ -3155,9 +3177,15 @@ class DataInputStream(BufferedInputStream, Seekable): def read_uint16(self, cancellable: Optional[Cancellable] = None) -> int: ... def read_uint32(self, cancellable: Optional[Cancellable] = None) -> int: ... def read_uint64(self, cancellable: Optional[Cancellable] = None) -> int: ... + @deprecated( + "Use g_data_input_stream_read_upto() instead, which has more consistent behaviour regarding the stop character." + ) def read_until( self, stop_chars: str, cancellable: Optional[Cancellable] = None ) -> Tuple[str, int]: ... + @deprecated( + "Use g_data_input_stream_read_upto_async() instead, which has more consistent behaviour regarding the stop character." + ) def read_until_async( self, stop_chars: str, @@ -3166,6 +3194,9 @@ class DataInputStream(BufferedInputStream, Seekable): callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated( + "Use g_data_input_stream_read_upto_finish() instead, which has more consistent behaviour regarding the stop character." + ) def read_until_finish(self, result: AsyncResult) -> Tuple[str, int]: ... def read_upto( self, @@ -3490,6 +3521,9 @@ class DesktopAppInfo(GObject.Object, AppInfo): def new_from_keyfile(cls, key_file: GLib.KeyFile) -> Optional[DesktopAppInfo]: ... @staticmethod def search(search_string: str) -> list[Sequence[str]]: ... + @deprecated( + "do not use this API. Since 2.42 the value of the`XDG_CURRENT_DESKTOP` environment variable will be used." + ) @staticmethod def set_desktop_env(desktop_env: str) -> None: ... @@ -3504,6 +3538,7 @@ class DesktopAppInfoClass(GObject.GPointer): parent_class: GObject.ObjectClass = ... +@deprecated("The #GDesktopAppInfoLookup interface is deprecated and unused by GIO.") class DesktopAppInfoLookup(GObject.GInterface): """ Interface GDesktopAppInfoLookup @@ -3512,6 +3547,9 @@ class DesktopAppInfoLookup(GObject.GInterface): notify (GParam) """ + @deprecated( + "The #GDesktopAppInfoLookup interface is deprecated and unused by GIO." + ) def get_default_for_uri_scheme(self, uri_scheme: str) -> Optional[AppInfo]: ... class DesktopAppInfoLookupIface(GObject.GPointer): @@ -3541,6 +3579,7 @@ class Drive(GObject.GInterface): def can_start(self) -> bool: ... def can_start_degraded(self) -> bool: ... def can_stop(self) -> bool: ... + @deprecated("Use g_drive_eject_with_operation() instead.") def eject( self, flags: MountUnmountFlags, @@ -3548,6 +3587,7 @@ class Drive(GObject.GInterface): callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("Use g_drive_eject_with_operation_finish() instead.") def eject_finish(self, result: AsyncResult) -> bool: ... def eject_with_operation( self, @@ -3650,12 +3690,14 @@ class DtlsClientConnection(GObject.GInterface): def get_accepted_cas(self) -> list[Sequence[int]]: ... def get_server_identity(self) -> SocketConnectable: ... + @deprecated("Do not attempt to ignore validation errors.") def get_validation_flags(self) -> TlsCertificateFlags: ... @staticmethod def new( base_socket: DatagramBased, server_identity: Optional[SocketConnectable] = None ) -> DtlsClientConnection: ... def set_server_identity(self, identity: SocketConnectable) -> None: ... + @deprecated("Do not attempt to ignore validation errors.") def set_validation_flags(self, flags: TlsCertificateFlags) -> None: ... class DtlsClientConnectionInterface(GObject.GPointer): @@ -3700,6 +3742,9 @@ class DtlsConnection(GObject.GInterface): def get_peer_certificate(self) -> Optional[TlsCertificate]: ... def get_peer_certificate_errors(self) -> TlsCertificateFlags: ... def get_protocol_version(self) -> TlsProtocolVersion: ... + @deprecated( + "Changing the rehandshake mode is no longer required for compatibility. Also, rehandshaking has been removed from the TLS protocol in TLS 1.3." + ) def get_rehandshake_mode(self) -> TlsRehandshakeMode: ... def get_require_close_notify(self) -> bool: ... def handshake(self, cancellable: Optional[Cancellable] = None) -> bool: ... @@ -3717,6 +3762,9 @@ class DtlsConnection(GObject.GInterface): def set_certificate(self, certificate: TlsCertificate) -> None: ... def set_database(self, database: Optional[TlsDatabase] = None) -> None: ... def set_interaction(self, interaction: Optional[TlsInteraction] = None) -> None: ... + @deprecated( + "Changing the rehandshake mode is no longer required for compatibility. Also, rehandshaking has been removed from the TLS protocol in TLS 1.3." + ) def set_rehandshake_mode(self, mode: TlsRehandshakeMode) -> None: ... def set_require_close_notify(self, require_close_notify: bool) -> None: ... def shutdown( @@ -3950,6 +3998,7 @@ class File(GObject.GInterface): ) -> None: ... def delete_finish(self, result: AsyncResult) -> bool: ... def dup(self) -> File: ... + @deprecated("Use g_file_eject_mountable_with_operation() instead.") def eject_mountable( self, flags: MountUnmountFlags, @@ -3957,6 +4006,7 @@ class File(GObject.GInterface): callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("Use g_file_eject_mountable_with_operation_finish() instead.") def eject_mountable_finish(self, result: AsyncResult) -> bool: ... def eject_mountable_with_operation( self, @@ -4388,6 +4438,7 @@ class File(GObject.GInterface): *user_data: Any, ) -> None: ... def trash_finish(self, result: AsyncResult) -> bool: ... + @deprecated("Use g_file_unmount_mountable_with_operation() instead.") def unmount_mountable( self, flags: MountUnmountFlags, @@ -4395,6 +4446,7 @@ class File(GObject.GInterface): callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("Use g_file_unmount_mountable_with_operation_finish() instead.") def unmount_mountable_finish(self, result: AsyncResult) -> bool: ... def unmount_mountable_with_operation( self, @@ -4907,6 +4959,9 @@ class FileInfo(GObject.Object): def get_is_hidden(self) -> bool: ... def get_is_symlink(self) -> bool: ... def get_modification_date_time(self) -> Optional[GLib.DateTime]: ... + @deprecated( + "Use g_file_info_get_modification_date_time() instead, as #GTimeVal is deprecated due to the year 2038 problem." + ) def get_modification_time(self) -> GLib.TimeVal: ... def get_name(self) -> str: ... def get_size(self) -> int: ... @@ -4952,6 +5007,9 @@ class FileInfo(GObject.Object): def set_is_hidden(self, is_hidden: bool) -> None: ... def set_is_symlink(self, is_symlink: bool) -> None: ... def set_modification_date_time(self, mtime: GLib.DateTime) -> None: ... + @deprecated( + "Use g_file_info_set_modification_date_time() instead, as #GTimeVal is deprecated due to the year 2038 problem." + ) def set_modification_time(self, mtime: GLib.TimeVal) -> None: ... def set_name(self, name: str) -> None: ... def set_size(self, size: int) -> None: ... @@ -5362,7 +5420,9 @@ class IOModuleScope(GObject.GPointer): def free(self) -> None: ... class IOSchedulerJob(GObject.GPointer): + @deprecated("Use g_main_context_invoke().") def send_to_mainloop(self, func: Callable[..., bool], *user_data: Any) -> bool: ... + @deprecated("Use g_main_context_invoke().") def send_to_mainloop_async( self, func: Callable[..., bool], *user_data: Any ) -> None: ... @@ -5731,6 +5791,9 @@ class Initable(GObject.GInterface): """ def init(self, cancellable: Optional[Cancellable] = None) -> bool: ... + @deprecated( + "Use g_object_new_with_properties() andg_initable_init() instead. See #GParameter for more information." + ) @staticmethod def newv( object_type: Type, @@ -6411,6 +6474,7 @@ class Mount(GObject.GInterface): def can_eject(self) -> bool: ... def can_unmount(self) -> bool: ... + @deprecated("Use g_mount_eject_with_operation() instead.") def eject( self, flags: MountUnmountFlags, @@ -6418,6 +6482,7 @@ class Mount(GObject.GInterface): callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("Use g_mount_eject_with_operation_finish() instead.") def eject_finish(self, result: AsyncResult) -> bool: ... def eject_with_operation( self, @@ -6459,6 +6524,7 @@ class Mount(GObject.GInterface): ) -> None: ... def remount_finish(self, result: AsyncResult) -> bool: ... def shadow(self) -> None: ... + @deprecated("Use g_mount_unmount_with_operation() instead.") def unmount( self, flags: MountUnmountFlags, @@ -6466,6 +6532,7 @@ class Mount(GObject.GInterface): callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("Use g_mount_unmount_with_operation_finish() instead.") def unmount_finish(self, result: AsyncResult) -> bool: ... def unmount_with_operation( self, @@ -6928,6 +6995,9 @@ class Notification(GObject.Object): def set_icon(self, icon: Icon) -> None: ... def set_priority(self, priority: NotificationPriority) -> None: ... def set_title(self, title: str) -> None: ... + @deprecated( + "Since 2.42, this has been deprecated in favour of g_notification_set_priority()." + ) def set_urgent(self, urgent: bool) -> None: ... class OutputMessage(GObject.GPointer): @@ -8048,6 +8118,7 @@ class Settings(GObject.Object): def get_mapped( self, key: str, mapping: Callable[..., Tuple[bool, None]], *user_data: Any ) -> None: ... + @deprecated("Use g_settings_schema_key_get_range() instead.") def get_range(self, key: str) -> GLib.Variant: ... def get_string(self, key: str) -> str: ... def get_strv(self, key: str) -> list[str]: ... @@ -8058,9 +8129,14 @@ class Settings(GObject.Object): def is_writable(self, name: str) -> bool: ... def keys(self): ... # FIXME Function def list_children(self) -> list[str]: ... + @deprecated("Use g_settings_schema_list_keys() instead.") def list_keys(self) -> list[str]: ... + @deprecated("Use g_settings_schema_source_list_schemas() instead") @staticmethod def list_relocatable_schemas() -> list[str]: ... + @deprecated( + "Use g_settings_schema_source_list_schemas() instead.If you used g_settings_list_schemas() to check for the presence ofa particular schema, use g_settings_schema_source_lookup() insteadof your whole loop." + ) @staticmethod def list_schemas() -> list[str]: ... @classmethod @@ -8080,6 +8156,7 @@ class Settings(GObject.Object): ) -> Settings: ... @classmethod def new_with_path(cls, schema_id: str, path: str) -> Settings: ... + @deprecated("Use g_settings_schema_key_range_check() instead.") def range_check(self, key: str, value: GLib.Variant) -> bool: ... def reset(self, key: str) -> None: ... def revert(self) -> None: ... @@ -8307,11 +8384,15 @@ class SimpleActionGroup(GObject.Object, ActionGroup, ActionMap): parent_instance: GObject.Object = ... priv: SimpleActionGroupPrivate = ... + @deprecated("Use g_action_map_add_action_entries()") def add_entries(self, entries: Sequence[ActionEntry], user_data: None) -> None: ... + @deprecated("Use g_action_map_add_action()") def insert(self, action: Action) -> None: ... + @deprecated("Use g_action_map_lookup_action()") def lookup(self, action_name: str) -> Action: ... @classmethod def new(cls) -> SimpleActionGroup: ... + @deprecated("Use g_action_map_remove_action()") def remove(self, action_name: str) -> None: ... class SimpleActionGroupClass(GObject.GPointer): @@ -8344,14 +8425,20 @@ class SimpleAsyncResult(GObject.Object, AsyncResult): notify (GParam) """ + @deprecated("Use #GTask instead.") def complete(self) -> None: ... + @deprecated("Use #GTask instead.") def complete_in_idle(self) -> None: ... + @deprecated("Use #GTask and g_task_propagate_boolean() instead.") def get_op_res_gboolean(self) -> bool: ... + @deprecated("Use #GTask and g_task_propagate_int() instead.") def get_op_res_gssize(self) -> int: ... + @deprecated("Use #GTask and g_task_is_valid() instead.") @staticmethod def is_valid( result: AsyncResult, source: Optional[GObject.Object], source_tag: None ) -> bool: ... + @deprecated("Use g_task_new() instead.") @classmethod def new( cls, @@ -8360,6 +8447,7 @@ class SimpleAsyncResult(GObject.Object, AsyncResult): source_tag: None, *user_data: Any, ) -> SimpleAsyncResult: ... + @deprecated("Use g_task_new() and g_task_return_error() instead.") @classmethod def new_from_error( cls, @@ -8368,13 +8456,19 @@ class SimpleAsyncResult(GObject.Object, AsyncResult): error: GLib.Error, *user_data: Any, ) -> SimpleAsyncResult: ... + @deprecated("Use #GTask instead.") def propagate_error(self) -> bool: ... + @deprecated("Use #GTask instead.") def set_check_cancellable( self, check_cancellable: Optional[Cancellable] = None ) -> None: ... + @deprecated("Use #GTask and g_task_return_error() instead.") def set_from_error(self, error: GLib.Error) -> None: ... + @deprecated("This method is deprecated") def set_handle_cancellation(self, handle_cancellation: bool) -> None: ... + @deprecated("Use #GTask and g_task_return_boolean() instead.") def set_op_res_gboolean(self, op_res: bool) -> None: ... + @deprecated("Use #GTask and g_task_return_int() instead.") def set_op_res_gssize(self, op_res: int) -> None: ... class SimpleAsyncResultClass(GObject.GPointer): ... @@ -8966,6 +9060,7 @@ class SocketClient(GObject.Object): def get_socket_type(self) -> SocketType: ... def get_timeout(self) -> int: ... def get_tls(self) -> bool: ... + @deprecated("Do not attempt to ignore validation errors.") def get_tls_validation_flags(self) -> TlsCertificateFlags: ... @classmethod def new(cls) -> SocketClient: ... @@ -8979,6 +9074,7 @@ class SocketClient(GObject.Object): def set_socket_type(self, type: SocketType) -> None: ... def set_timeout(self, timeout: int) -> None: ... def set_tls(self, tls: bool) -> None: ... + @deprecated("Do not attempt to ignore validation errors.") def set_tls_validation_flags(self, flags: TlsCertificateFlags) -> None: ... class SocketClientClass(GObject.GPointer): @@ -10034,14 +10130,18 @@ class TlsClientConnection(GObject.GInterface): def copy_session_state(self, source: TlsClientConnection) -> None: ... def get_accepted_cas(self) -> list[Sequence[int]]: ... def get_server_identity(self) -> Optional[SocketConnectable]: ... + @deprecated("SSL 3.0 is insecure.") def get_use_ssl3(self) -> bool: ... + @deprecated("Do not attempt to ignore validation errors.") def get_validation_flags(self) -> TlsCertificateFlags: ... @staticmethod def new( base_io_stream: IOStream, server_identity: Optional[SocketConnectable] = None ) -> TlsClientConnection: ... def set_server_identity(self, identity: SocketConnectable) -> None: ... + @deprecated("SSL 3.0 is insecure.") def set_use_ssl3(self, use_ssl3: bool) -> None: ... + @deprecated("Do not attempt to ignore validation errors.") def set_validation_flags(self, flags: TlsCertificateFlags) -> None: ... class TlsClientConnectionInterface(GObject.GPointer): @@ -10170,8 +10270,12 @@ class TlsConnection(IOStream): def get_peer_certificate(self) -> Optional[TlsCertificate]: ... def get_peer_certificate_errors(self) -> TlsCertificateFlags: ... def get_protocol_version(self) -> TlsProtocolVersion: ... + @deprecated( + "Changing the rehandshake mode is no longer required for compatibility. Also, rehandshaking has been removed from the TLS protocol in TLS 1.3." + ) def get_rehandshake_mode(self) -> TlsRehandshakeMode: ... def get_require_close_notify(self) -> bool: ... + @deprecated("Use g_tls_connection_get_database() instead") def get_use_system_certdb(self) -> bool: ... def handshake(self, cancellable: Optional[Cancellable] = None) -> bool: ... def handshake_async( @@ -10188,8 +10292,12 @@ class TlsConnection(IOStream): def set_certificate(self, certificate: TlsCertificate) -> None: ... def set_database(self, database: Optional[TlsDatabase] = None) -> None: ... def set_interaction(self, interaction: Optional[TlsInteraction] = None) -> None: ... + @deprecated( + "Changing the rehandshake mode is no longer required for compatibility. Also, rehandshaking has been removed from the TLS protocol in TLS 1.3." + ) def set_rehandshake_mode(self, mode: TlsRehandshakeMode) -> None: ... def set_require_close_notify(self, require_close_notify: bool) -> None: ... + @deprecated("Use g_tls_connection_set_database() instead") def set_use_system_certdb(self, use_system_certdb: bool) -> None: ... class TlsConnectionClass(GObject.GPointer): @@ -10991,8 +11099,10 @@ class UnixMountMonitor(GObject.Object): @staticmethod def get() -> UnixMountMonitor: ... + @deprecated("Use g_unix_mount_monitor_get() instead.") @classmethod def new(cls) -> UnixMountMonitor: ... + @deprecated("This function does nothing. Don't call it.") def set_rate_limit(self, limit_msec: int) -> None: ... class UnixMountMonitorClass(GObject.GPointer): ... @@ -11117,11 +11227,13 @@ class UnixSocketAddress(SocketAddress, SocketConnectable): @staticmethod def abstract_names_supported() -> bool: ... def get_address_type(self) -> UnixSocketAddressType: ... + @deprecated("Use g_unix_socket_address_get_address_type()") def get_is_abstract(self) -> bool: ... def get_path(self) -> str: ... def get_path_len(self) -> int: ... @classmethod def new(cls, path: str) -> UnixSocketAddress: ... + @deprecated("Use g_unix_socket_address_new_with_type().") @classmethod def new_abstract(cls, path: Sequence[int]) -> UnixSocketAddress: ... @classmethod @@ -11252,6 +11364,7 @@ class Volume(GObject.GInterface): def can_eject(self) -> bool: ... def can_mount(self) -> bool: ... + @deprecated("Use g_volume_eject_with_operation() instead.") def eject( self, flags: MountUnmountFlags, @@ -11259,6 +11372,7 @@ class Volume(GObject.GInterface): callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("Use g_volume_eject_with_operation_finish() instead.") def eject_finish(self, result: AsyncResult) -> bool: ... def eject_with_operation( self, @@ -11352,6 +11466,9 @@ class VolumeMonitor(GObject.Object): parent_instance: GObject.Object = ... priv: None = ... + @deprecated( + "Instead of using this function, #GVolumeMonitorimplementations should instead create shadow mounts with the URI ofthe mount they intend to adopt. See the proxy volume monitor ingvfs for an example of this. Also see g_mount_is_shadowed(),g_mount_shadow() and g_mount_unshadow() functions." + ) @staticmethod def adopt_orphan_mount(mount: Mount) -> Volume: ... def do_drive_changed(self, drive: Drive) -> None: ... diff --git a/src/gi-stubs/repository/Goa.pyi b/src/gi-stubs/repository/Goa.pyi index 0c94854b..c04fe5fc 100644 --- a/src/gi-stubs/repository/Goa.pyi +++ b/src/gi-stubs/repository/Goa.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GLib from gi.repository import GObject @@ -38,7 +43,9 @@ def contacts_interface_info() -> Gio.DBusInterfaceInfo: ... def contacts_override_properties( klass: GObject.ObjectClass, property_id_begin: int ) -> int: ... +@deprecated("The D-Bus interface has been deprecated.") def documents_interface_info() -> Gio.DBusInterfaceInfo: ... +@deprecated("The D-Bus interface has been deprecated.") def documents_override_properties( klass: GObject.ObjectClass, property_id_begin: int ) -> int: ... @@ -59,7 +66,9 @@ def manager_interface_info() -> Gio.DBusInterfaceInfo: ... def manager_override_properties( klass: GObject.ObjectClass, property_id_begin: int ) -> int: ... +@deprecated("The D-Bus interface has been deprecated.") def maps_interface_info() -> Gio.DBusInterfaceInfo: ... +@deprecated("The D-Bus interface has been deprecated.") def maps_override_properties( klass: GObject.ObjectClass, property_id_begin: int ) -> int: ... @@ -91,7 +100,9 @@ def printers_interface_info() -> Gio.DBusInterfaceInfo: ... def printers_override_properties( klass: GObject.ObjectClass, property_id_begin: int ) -> int: ... +@deprecated("The D-Bus interface has been deprecated.") def read_later_interface_info() -> Gio.DBusInterfaceInfo: ... +@deprecated("The D-Bus interface has been deprecated.") def read_later_override_properties( klass: GObject.ObjectClass, property_id_begin: int ) -> int: ... @@ -99,7 +110,9 @@ def ticketing_interface_info() -> Gio.DBusInterfaceInfo: ... def ticketing_override_properties( klass: GObject.ObjectClass, property_id_begin: int ) -> int: ... +@deprecated("The D-Bus interface has been deprecated.") def todo_interface_info() -> Gio.DBusInterfaceInfo: ... +@deprecated("The D-Bus interface has been deprecated.") def todo_override_properties( klass: GObject.ObjectClass, property_id_begin: int ) -> int: ... @@ -1109,6 +1122,7 @@ class ContactsSkeletonClass(GObject.GPointer): class ContactsSkeletonPrivate(GObject.GPointer): ... +@deprecated("The D-Bus interface has been deprecated.") class Documents(GObject.GInterface): """ Interface GoaDocuments @@ -1117,13 +1131,16 @@ class Documents(GObject.GInterface): notify (GParam) """ + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def interface_info() -> Gio.DBusInterfaceInfo: ... + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def override_properties( klass: GObject.ObjectClass, property_id_begin: int ) -> int: ... +@deprecated("The D-Bus interface has been deprecated.") class DocumentsIface(GObject.GPointer): """ :Constructors: @@ -1135,6 +1152,7 @@ class DocumentsIface(GObject.GPointer): parent_iface: GObject.TypeInterface = ... +@deprecated("The D-Bus interface has been deprecated.") class DocumentsProxy( Gio.DBusProxy, Gio.AsyncInitable, Gio.DBusInterface, Gio.Initable, Documents ): @@ -1203,6 +1221,7 @@ class DocumentsProxy( g_name: str = ..., g_object_path: str = ..., ): ... + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def new( connection: Gio.DBusConnection, @@ -1213,8 +1232,10 @@ class DocumentsProxy( callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_finish(cls, res: Gio.AsyncResult) -> DocumentsProxy: ... + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def new_for_bus( bus_type: Gio.BusType, @@ -1225,8 +1246,10 @@ class DocumentsProxy( callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_for_bus_finish(cls, res: Gio.AsyncResult) -> DocumentsProxy: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_for_bus_sync( cls, @@ -1236,6 +1259,7 @@ class DocumentsProxy( object_path: str, cancellable: Optional[Gio.Cancellable] = None, ) -> DocumentsProxy: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_sync( cls, @@ -1246,6 +1270,7 @@ class DocumentsProxy( cancellable: Optional[Gio.Cancellable] = None, ) -> DocumentsProxy: ... +@deprecated("The D-Bus interface has been deprecated.") class DocumentsProxyClass(GObject.GPointer): """ :Constructors: @@ -1259,6 +1284,7 @@ class DocumentsProxyClass(GObject.GPointer): class DocumentsProxyPrivate(GObject.GPointer): ... +@deprecated("The D-Bus interface has been deprecated.") class DocumentsSkeleton(Gio.DBusInterfaceSkeleton, Gio.DBusInterface, Documents): """ :Constructors: @@ -1287,9 +1313,11 @@ class DocumentsSkeleton(Gio.DBusInterfaceSkeleton, Gio.DBusInterface, Documents) parent_instance: Gio.DBusInterfaceSkeleton = ... priv: DocumentsSkeletonPrivate = ... def __init__(self, g_flags: Gio.DBusInterfaceSkeletonFlags = ...): ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new(cls) -> DocumentsSkeleton: ... +@deprecated("The D-Bus interface has been deprecated.") class DocumentsSkeletonClass(GObject.GPointer): """ :Constructors: @@ -2253,6 +2281,7 @@ class ManagerSkeletonClass(GObject.GPointer): class ManagerSkeletonPrivate(GObject.GPointer): ... +@deprecated("The D-Bus interface has been deprecated.") class Maps(GObject.GInterface): """ Interface GoaMaps @@ -2261,13 +2290,16 @@ class Maps(GObject.GInterface): notify (GParam) """ + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def interface_info() -> Gio.DBusInterfaceInfo: ... + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def override_properties( klass: GObject.ObjectClass, property_id_begin: int ) -> int: ... +@deprecated("The D-Bus interface has been deprecated.") class MapsIface(GObject.GPointer): """ :Constructors: @@ -2279,6 +2311,7 @@ class MapsIface(GObject.GPointer): parent_iface: GObject.TypeInterface = ... +@deprecated("The D-Bus interface has been deprecated.") class MapsProxy( Gio.DBusProxy, Gio.AsyncInitable, Gio.DBusInterface, Gio.Initable, Maps ): @@ -2347,6 +2380,7 @@ class MapsProxy( g_name: str = ..., g_object_path: str = ..., ): ... + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def new( connection: Gio.DBusConnection, @@ -2357,8 +2391,10 @@ class MapsProxy( callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_finish(cls, res: Gio.AsyncResult) -> MapsProxy: ... + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def new_for_bus( bus_type: Gio.BusType, @@ -2369,8 +2405,10 @@ class MapsProxy( callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_for_bus_finish(cls, res: Gio.AsyncResult) -> MapsProxy: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_for_bus_sync( cls, @@ -2380,6 +2418,7 @@ class MapsProxy( object_path: str, cancellable: Optional[Gio.Cancellable] = None, ) -> MapsProxy: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_sync( cls, @@ -2390,6 +2429,7 @@ class MapsProxy( cancellable: Optional[Gio.Cancellable] = None, ) -> MapsProxy: ... +@deprecated("The D-Bus interface has been deprecated.") class MapsProxyClass(GObject.GPointer): """ :Constructors: @@ -2403,6 +2443,7 @@ class MapsProxyClass(GObject.GPointer): class MapsProxyPrivate(GObject.GPointer): ... +@deprecated("The D-Bus interface has been deprecated.") class MapsSkeleton(Gio.DBusInterfaceSkeleton, Gio.DBusInterface, Maps): """ :Constructors: @@ -2431,9 +2472,11 @@ class MapsSkeleton(Gio.DBusInterfaceSkeleton, Gio.DBusInterface, Maps): parent_instance: Gio.DBusInterfaceSkeleton = ... priv: MapsSkeletonPrivate = ... def __init__(self, g_flags: Gio.DBusInterfaceSkeletonFlags = ...): ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new(cls) -> MapsSkeleton: ... +@deprecated("The D-Bus interface has been deprecated.") class MapsSkeletonClass(GObject.GPointer): """ :Constructors: @@ -3326,11 +3369,13 @@ class Object(GObject.GInterface): def get_calendar(self) -> Optional[Calendar]: ... def get_chat(self) -> Optional[Chat]: ... def get_contacts(self) -> Optional[Contacts]: ... + @deprecated("The D-Bus interface has been deprecated.") def get_documents(self) -> Optional[Documents]: ... def get_exchange(self) -> Optional[Exchange]: ... def get_files(self) -> Optional[Files]: ... def get_mail(self) -> Optional[Mail]: ... def get_manager(self) -> Optional[Manager]: ... + @deprecated("The D-Bus interface has been deprecated.") def get_maps(self) -> Optional[Maps]: ... def get_media_server(self) -> Optional[MediaServer]: ... def get_music(self) -> Optional[Music]: ... @@ -3339,8 +3384,10 @@ class Object(GObject.GInterface): def get_password_based(self) -> Optional[PasswordBased]: ... def get_photos(self) -> Optional[Photos]: ... def get_printers(self) -> Optional[Printers]: ... + @deprecated("The D-Bus interface has been deprecated.") def get_read_later(self) -> Optional[ReadLater]: ... def get_ticketing(self) -> Optional[Ticketing]: ... + @deprecated("The D-Bus interface has been deprecated.") def get_todo(self) -> Optional[Todo]: ... class ObjectIface(GObject.GPointer): @@ -3678,11 +3725,13 @@ class ObjectSkeleton(Gio.DBusObjectSkeleton, Gio.DBusObject, Object): def set_calendar(self, interface_: Optional[Calendar] = None) -> None: ... def set_chat(self, interface_: Optional[Chat] = None) -> None: ... def set_contacts(self, interface_: Optional[Contacts] = None) -> None: ... + @deprecated("The D-Bus interface has been deprecated.") def set_documents(self, interface_: Optional[Documents] = None) -> None: ... def set_exchange(self, interface_: Optional[Exchange] = None) -> None: ... def set_files(self, interface_: Optional[Files] = None) -> None: ... def set_mail(self, interface_: Optional[Mail] = None) -> None: ... def set_manager(self, interface_: Optional[Manager] = None) -> None: ... + @deprecated("The D-Bus interface has been deprecated.") def set_maps(self, interface_: Optional[Maps] = None) -> None: ... def set_media_server(self, interface_: Optional[MediaServer] = None) -> None: ... def set_music(self, interface_: Optional[Music] = None) -> None: ... @@ -3693,8 +3742,10 @@ class ObjectSkeleton(Gio.DBusObjectSkeleton, Gio.DBusObject, Object): ) -> None: ... def set_photos(self, interface_: Optional[Photos] = None) -> None: ... def set_printers(self, interface_: Optional[Printers] = None) -> None: ... + @deprecated("The D-Bus interface has been deprecated.") def set_read_later(self, interface_: Optional[ReadLater] = None) -> None: ... def set_ticketing(self, interface_: Optional[Ticketing] = None) -> None: ... + @deprecated("The D-Bus interface has been deprecated.") def set_todo(self, interface_: Optional[Todo] = None) -> None: ... class ObjectSkeletonClass(GObject.GPointer): @@ -4317,6 +4368,7 @@ class PrintersSkeletonClass(GObject.GPointer): class PrintersSkeletonPrivate(GObject.GPointer): ... +@deprecated("The D-Bus interface has been deprecated.") class ReadLater(GObject.GInterface): """ Interface GoaReadLater @@ -4325,13 +4377,16 @@ class ReadLater(GObject.GInterface): notify (GParam) """ + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def interface_info() -> Gio.DBusInterfaceInfo: ... + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def override_properties( klass: GObject.ObjectClass, property_id_begin: int ) -> int: ... +@deprecated("The D-Bus interface has been deprecated.") class ReadLaterIface(GObject.GPointer): """ :Constructors: @@ -4343,6 +4398,7 @@ class ReadLaterIface(GObject.GPointer): parent_iface: GObject.TypeInterface = ... +@deprecated("The D-Bus interface has been deprecated.") class ReadLaterProxy( Gio.DBusProxy, Gio.AsyncInitable, Gio.DBusInterface, Gio.Initable, ReadLater ): @@ -4411,6 +4467,7 @@ class ReadLaterProxy( g_name: str = ..., g_object_path: str = ..., ): ... + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def new( connection: Gio.DBusConnection, @@ -4421,8 +4478,10 @@ class ReadLaterProxy( callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_finish(cls, res: Gio.AsyncResult) -> ReadLaterProxy: ... + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def new_for_bus( bus_type: Gio.BusType, @@ -4433,8 +4492,10 @@ class ReadLaterProxy( callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_for_bus_finish(cls, res: Gio.AsyncResult) -> ReadLaterProxy: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_for_bus_sync( cls, @@ -4444,6 +4505,7 @@ class ReadLaterProxy( object_path: str, cancellable: Optional[Gio.Cancellable] = None, ) -> ReadLaterProxy: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_sync( cls, @@ -4454,6 +4516,7 @@ class ReadLaterProxy( cancellable: Optional[Gio.Cancellable] = None, ) -> ReadLaterProxy: ... +@deprecated("The D-Bus interface has been deprecated.") class ReadLaterProxyClass(GObject.GPointer): """ :Constructors: @@ -4467,6 +4530,7 @@ class ReadLaterProxyClass(GObject.GPointer): class ReadLaterProxyPrivate(GObject.GPointer): ... +@deprecated("The D-Bus interface has been deprecated.") class ReadLaterSkeleton(Gio.DBusInterfaceSkeleton, Gio.DBusInterface, ReadLater): """ :Constructors: @@ -4495,9 +4559,11 @@ class ReadLaterSkeleton(Gio.DBusInterfaceSkeleton, Gio.DBusInterface, ReadLater) parent_instance: Gio.DBusInterfaceSkeleton = ... priv: ReadLaterSkeletonPrivate = ... def __init__(self, g_flags: Gio.DBusInterfaceSkeletonFlags = ...): ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new(cls) -> ReadLaterSkeleton: ... +@deprecated("The D-Bus interface has been deprecated.") class ReadLaterSkeletonClass(GObject.GPointer): """ :Constructors: @@ -4729,6 +4795,7 @@ class TicketingSkeletonClass(GObject.GPointer): class TicketingSkeletonPrivate(GObject.GPointer): ... +@deprecated("The D-Bus interface has been deprecated.") class Todo(GObject.GInterface): """ Interface GoaTodo @@ -4737,13 +4804,16 @@ class Todo(GObject.GInterface): notify (GParam) """ + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def interface_info() -> Gio.DBusInterfaceInfo: ... + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def override_properties( klass: GObject.ObjectClass, property_id_begin: int ) -> int: ... +@deprecated("The D-Bus interface has been deprecated.") class TodoIface(GObject.GPointer): """ :Constructors: @@ -4755,6 +4825,7 @@ class TodoIface(GObject.GPointer): parent_iface: GObject.TypeInterface = ... +@deprecated("The D-Bus interface has been deprecated.") class TodoProxy( Gio.DBusProxy, Gio.AsyncInitable, Gio.DBusInterface, Gio.Initable, Todo ): @@ -4823,6 +4894,7 @@ class TodoProxy( g_name: str = ..., g_object_path: str = ..., ): ... + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def new( connection: Gio.DBusConnection, @@ -4833,8 +4905,10 @@ class TodoProxy( callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_finish(cls, res: Gio.AsyncResult) -> TodoProxy: ... + @deprecated("The D-Bus interface has been deprecated.") @staticmethod def new_for_bus( bus_type: Gio.BusType, @@ -4845,8 +4919,10 @@ class TodoProxy( callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_for_bus_finish(cls, res: Gio.AsyncResult) -> TodoProxy: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_for_bus_sync( cls, @@ -4856,6 +4932,7 @@ class TodoProxy( object_path: str, cancellable: Optional[Gio.Cancellable] = None, ) -> TodoProxy: ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new_sync( cls, @@ -4866,6 +4943,7 @@ class TodoProxy( cancellable: Optional[Gio.Cancellable] = None, ) -> TodoProxy: ... +@deprecated("The D-Bus interface has been deprecated.") class TodoProxyClass(GObject.GPointer): """ :Constructors: @@ -4879,6 +4957,7 @@ class TodoProxyClass(GObject.GPointer): class TodoProxyPrivate(GObject.GPointer): ... +@deprecated("The D-Bus interface has been deprecated.") class TodoSkeleton(Gio.DBusInterfaceSkeleton, Gio.DBusInterface, Todo): """ :Constructors: @@ -4907,9 +4986,11 @@ class TodoSkeleton(Gio.DBusInterfaceSkeleton, Gio.DBusInterface, Todo): parent_instance: Gio.DBusInterfaceSkeleton = ... priv: TodoSkeletonPrivate = ... def __init__(self, g_flags: Gio.DBusInterfaceSkeletonFlags = ...): ... + @deprecated("The D-Bus interface has been deprecated.") @classmethod def new(cls) -> TodoSkeleton: ... +@deprecated("The D-Bus interface has been deprecated.") class TodoSkeletonClass(GObject.GPointer): """ :Constructors: diff --git a/src/gi-stubs/repository/Graphene.pyi b/src/gi-stubs/repository/Graphene.pyi index 82d7e94a..cdd045b7 100644 --- a/src/gi-stubs/repository/Graphene.pyi +++ b/src/gi-stubs/repository/Graphene.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GObject PI: float = 3.141593 @@ -496,8 +501,10 @@ class Rect(GObject.GBoxed): def normalize_r(self) -> Rect: ... def offset(self, d_x: float, d_y: float) -> Rect: ... def offset_r(self, d_x: float, d_y: float) -> Rect: ... + @deprecated("Use graphene_rect_round_extents() instead") def round(self) -> Rect: ... def round_extents(self) -> Rect: ... + @deprecated("Use graphene_rect_round() instead") def round_to_pixel(self) -> Rect: ... def scale(self, s_h: float, s_v: float) -> Rect: ... def union(self, b: Rect) -> Rect: ... diff --git a/src/gi-stubs/repository/Gsk.pyi b/src/gi-stubs/repository/Gsk.pyi index ee849f0f..6fbc9f94 100644 --- a/src/gi-stubs/repository/Gsk.pyi +++ b/src/gi-stubs/repository/Gsk.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + import cairo from gi.repository import Gdk from gi.repository import GLib @@ -492,6 +497,7 @@ class NglRenderer(Renderer): realized: bool surface: Optional[Gdk.Surface] props: Props = ... + @deprecated("Use gsk_gl_renderer_new()") @classmethod def new(cls) -> NglRenderer: ... diff --git a/src/gi-stubs/repository/Gspell.pyi b/src/gi-stubs/repository/Gspell.pyi index 66706ba5..3b5ae562 100644 --- a/src/gi-stubs/repository/Gspell.pyi +++ b/src/gi-stubs/repository/Gspell.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Atk from gi.repository import Gdk from gi.repository import GdkPixbuf diff --git a/src/gi-stubs/repository/Gst.pyi b/src/gi-stubs/repository/Gst.pyi index 1a6b35c2..538433ec 100644 --- a/src/gi-stubs/repository/Gst.pyi +++ b/src/gi-stubs/repository/Gst.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GLib from gi.repository import GObject @@ -411,6 +416,7 @@ def type_find_register( def type_is_plugin_api(type: Type) -> Tuple[bool, PluginAPIFlags]: ... def type_mark_as_plugin_api(type: Type, flags: PluginAPIFlags) -> None: ... def update_registry() -> bool: ... +@deprecated("Use GstURI instead.") def uri_construct(protocol: str, location: str) -> str: ... def uri_error_quark() -> int: ... def uri_from_string(uri: str) -> Optional[Uri]: ... @@ -1675,6 +1681,7 @@ class DebugCategory(GObject.GPointer): color: int = ... name: str = ... description: str = ... + @deprecated("This function can easily cause memory corruption, don't use it.") def free(self) -> None: ... def get_color(self) -> int: ... def get_description(self) -> str: ... @@ -2119,6 +2126,9 @@ class Element(Object): def get_metadata(self, key: str) -> str: ... def get_pad_template(self, name: str) -> Optional[PadTemplate]: ... def get_pad_template_list(self) -> list[PadTemplate]: ... + @deprecated( + "Prefer using gst_element_request_pad_simple() whichprovides the exact same functionality." + ) def get_request_pad(self, name: str) -> Optional[Pad]: ... def get_start_time(self) -> int: ... def get_state(self, timeout: int) -> Tuple[StateChangeReturn, State, State]: ... @@ -2602,6 +2612,7 @@ class GhostPad(ProxyPad): def activate_mode_default( pad: Pad, parent: Optional[Object], mode: PadMode, active: bool ) -> bool: ... + @deprecated("This function is deprecated since 1.18 and does nothinganymore.") def construct(self) -> bool: ... def get_target(self) -> Optional[Pad]: ... @staticmethod @@ -3182,6 +3193,9 @@ class Object(GObject.InitiallyUnowned): def get_path_string(self) -> str: ... def get_value(self, property_name: str, timestamp: int) -> Optional[Any]: ... def has_active_control_bindings(self) -> bool: ... + @deprecated( + "Use gst_object_has_as_ancestor() instead.MT safe. Grabs and releases @object's locks." + ) def has_ancestor(self, ancestor: Object) -> bool: ... def has_as_ancestor(self, ancestor: Object) -> bool: ... def has_as_parent(self, parent: Object) -> bool: ... @@ -4452,6 +4466,7 @@ class Segment(GObject.GBoxed): self, format: Format, stream_time: int ) -> Tuple[int, int]: ... def set_running_time(self, format: Format, running_time: int) -> bool: ... + @deprecated("Use gst_segment_position_from_running_time() instead.") def to_position(self, format: Format, running_time: int) -> int: ... def to_running_time(self, format: Format, position: int) -> int: ... def to_running_time_full( @@ -5385,6 +5400,7 @@ class Uri(GObject.GBoxed): def append_path(self, relative_path: Optional[str] = None) -> bool: ... def append_path_segment(self, path_segment: Optional[str] = None) -> bool: ... + @deprecated("Use GstURI instead.") @staticmethod def construct(protocol: str, location: str) -> str: ... def equal(self, second: Uri) -> bool: ... diff --git a/src/gi-stubs/repository/GstSdp.pyi b/src/gi-stubs/repository/GstSdp.pyi index 741f71e7..287a3a08 100644 --- a/src/gi-stubs/repository/GstSdp.pyi +++ b/src/gi-stubs/repository/GstSdp.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GLib from gi.repository import GObject from gi.repository import Gst diff --git a/src/gi-stubs/repository/GstWebRTC.pyi b/src/gi-stubs/repository/GstWebRTC.pyi index a0950c4a..81b30845 100644 --- a/src/gi-stubs/repository/GstWebRTC.pyi +++ b/src/gi-stubs/repository/GstWebRTC.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GLib from gi.repository import GObject from gi.repository import Gst diff --git a/src/gi-stubs/repository/Handy.pyi b/src/gi-stubs/repository/Handy.pyi index 351a2fb4..609f1edc 100644 --- a/src/gi-stubs/repository/Handy.pyi +++ b/src/gi-stubs/repository/Handy.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Atk from gi.repository import Gdk from gi.repository import GdkPixbuf @@ -1107,6 +1112,7 @@ class Avatar(Gtk.DrawingArea, Atk.ImplementorIface, Gtk.Buildable): @classmethod def new(cls, size: int, text: Optional[str], show_initials: bool) -> Avatar: ... def set_icon_name(self, icon_name: Optional[str] = None) -> None: ... + @deprecated("use [method@Avatar.set_loadable_icon] instead.") def set_image_load_func( self, load_image: Optional[Callable[..., Optional[GdkPixbuf.Pixbuf]]] = None, @@ -7282,6 +7288,7 @@ class StyleManagerClass(GObject.GPointer): parent_class: GObject.ObjectClass = ... +@deprecated("This class is deprecated") class SwipeGroup(GObject.Object, Gtk.Buildable): """ :Constructors: @@ -7297,10 +7304,14 @@ class SwipeGroup(GObject.Object, Gtk.Buildable): notify (GParam) """ + @deprecated("This method is deprecated") def add_swipeable(self, swipeable: Swipeable) -> None: ... + @deprecated("This method is deprecated") def get_swipeables(self) -> list[Swipeable]: ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> SwipeGroup: ... + @deprecated("This method is deprecated") def remove_swipeable(self, swipeable: Swipeable) -> None: ... class SwipeGroupClass(GObject.GPointer): @@ -8213,6 +8224,7 @@ class TabViewClass(GObject.GPointer): parent_class: Gtk.BinClass = ... +@deprecated("This class is deprecated") class TitleBar(Gtk.Bin, Atk.ImplementorIface, Gtk.Buildable): """ :Constructors: @@ -8485,9 +8497,12 @@ class TitleBar(Gtk.Bin, Atk.ImplementorIface, Gtk.Buildable): visible: bool = ..., width_request: int = ..., ): ... + @deprecated("This method is deprecated") def get_selection_mode(self) -> bool: ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> TitleBar: ... + @deprecated("This method is deprecated") def set_selection_mode(self, selection_mode: bool) -> None: ... class TitleBarClass(GObject.GPointer): diff --git a/src/gi-stubs/repository/Manette.pyi b/src/gi-stubs/repository/Manette.pyi index 11a2c444..e4e3eee3 100644 --- a/src/gi-stubs/repository/Manette.pyi +++ b/src/gi-stubs/repository/Manette.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GObject diff --git a/src/gi-stubs/repository/OSTree.pyi b/src/gi-stubs/repository/OSTree.pyi index 4f7f1c38..dd3106de 100644 --- a/src/gi-stubs/repository/OSTree.pyi +++ b/src/gi-stubs/repository/OSTree.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GLib from gi.repository import GObject diff --git a/src/gi-stubs/repository/Panel.pyi b/src/gi-stubs/repository/Panel.pyi index c117c57b..c98821c6 100644 --- a/src/gi-stubs/repository/Panel.pyi +++ b/src/gi-stubs/repository/Panel.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Adw from gi.repository import Gdk from gi.repository import Gio diff --git a/src/gi-stubs/repository/Pango.pyi b/src/gi-stubs/repository/Pango.pyi index f6234027..5e4f3c7e 100644 --- a/src/gi-stubs/repository/Pango.pyi +++ b/src/gi-stubs/repository/Pango.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GLib from gi.repository import GObject @@ -82,6 +87,7 @@ def attr_variant_new(variant: Variant) -> Attribute: ... def attr_weight_new(weight: Weight) -> Attribute: ... def attr_word_new() -> Attribute: ... def bidi_type_for_unichar(ch: str) -> BidiType: ... +@deprecated("This function is deprecated") def break_( text: str, length: int, analysis: Analysis, attrs: Sequence[LogAttr] ) -> None: ... @@ -97,6 +103,9 @@ def font_description_from_string(str: str) -> FontDescription: ... def get_log_attrs( text: str, length: int, level: int, language: Language, attrs: Sequence[LogAttr] ) -> None: ... +@deprecated( + "Use [func@GLib.unichar_get_mirror_char] instead; the docs for that function provide full details." +) def get_mirror_char(ch: str, mirrored_ch: str) -> bool: ... def gravity_get_for_matrix(matrix: Optional[Matrix] = None) -> Gravity: ... def gravity_get_for_script( @@ -135,6 +144,7 @@ def markup_parser_finish( context: GLib.MarkupParseContext, ) -> Tuple[bool, AttrList, str, str]: ... def markup_parser_new(accel_marker: str) -> GLib.MarkupParseContext: ... +@deprecated("This function is deprecated") def parse_enum(type: Type, str: Optional[str], warn: bool) -> Tuple[bool, int, str]: ... def parse_markup( markup_text: str, length: int, accel_marker: str @@ -144,11 +154,16 @@ def parse_style(str: str, warn: bool) -> Tuple[bool, Style]: ... def parse_variant(str: str, warn: bool) -> Tuple[bool, Variant]: ... def parse_weight(str: str, warn: bool) -> Tuple[bool, Weight]: ... def quantize_line_geometry() -> Tuple[int, int]: ... +@deprecated("This function is deprecated") def read_line(stream: None, str: GLib.String) -> int: ... def reorder_items(items: list[Item]) -> list[Item]: ... +@deprecated("This function is deprecated") def scan_int() -> Tuple[bool, str, int]: ... +@deprecated("This function is deprecated") def scan_string(out: GLib.String) -> Tuple[bool, str]: ... +@deprecated("This function is deprecated") def scan_word(out: GLib.String) -> Tuple[bool, str]: ... +@deprecated("Use g_unichar_get_script()") def script_for_unichar(ch: str) -> Script: ... def script_get_sample_language(script: Script) -> Optional[Language]: ... def shape(text: str, length: int, analysis: Analysis, glyphs: GlyphString) -> None: ... @@ -177,12 +192,15 @@ def shape_with_flags( glyphs: GlyphString, flags: ShapeFlags, ) -> None: ... +@deprecated("This function is deprecated") def skip_space() -> Tuple[bool, str]: ... +@deprecated("This function is deprecated") def split_file_list(str: str) -> list[str]: ... def tab_array_from_string(text: str) -> Optional[TabArray]: ... def tailor_break( text: str, length: int, analysis: Analysis, offset: int, attrs: Sequence[LogAttr] ) -> None: ... +@deprecated("This function is deprecated") def trim_string(str: str) -> str: ... def unichar_direction(ch: str) -> Direction: ... def units_from_double(d: float) -> int: ... @@ -504,15 +522,20 @@ class Coverage(GObject.Object): """ def copy(self) -> Coverage: ... + @deprecated("This returns %NULL") @staticmethod def from_bytes(bytes: Sequence[int]) -> Optional[Coverage]: ... def get(self, index_: int) -> CoverageLevel: ... + @deprecated("This function does nothing") def max(self, other: Coverage) -> None: ... @classmethod def new(cls) -> Coverage: ... + @deprecated("Use g_object_ref instead") def ref(self) -> Coverage: ... def set(self, index_: int, level: CoverageLevel) -> None: ... + @deprecated("This returns %NULL") def to_bytes(self) -> bytes: ... + @deprecated("Use g_object_unref instead") def unref(self) -> None: ... class Font(GObject.Object): diff --git a/src/gi-stubs/repository/PangoCairo.pyi b/src/gi-stubs/repository/PangoCairo.pyi index c6c2c177..88f56b7f 100644 --- a/src/gi-stubs/repository/PangoCairo.pyi +++ b/src/gi-stubs/repository/PangoCairo.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + import cairo from gi.repository import GObject from gi.repository import Pango diff --git a/src/gi-stubs/repository/Rsvg.pyi b/src/gi-stubs/repository/Rsvg.pyi index 625292b5..823bb87e 100644 --- a/src/gi-stubs/repository/Rsvg.pyi +++ b/src/gi-stubs/repository/Rsvg.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GdkPixbuf from gi.repository import Gio from gi.repository import GObject @@ -19,26 +24,52 @@ _lock = ... # FIXME Constant _namespace: str = "Rsvg" _version: str = "2.0" +@deprecated("No-op. This function should not be called from normal programs.") def cleanup() -> None: ... def error_quark() -> int: ... +@deprecated("There is no need to initialize librsvg.") def init() -> None: ... +@deprecated( + "Use [ctor@Rsvg.Handle.new_from_file] and [method@Rsvg.Handle.render_document] instead." +) def pixbuf_from_file(filename: str) -> Optional[GdkPixbuf.Pixbuf]: ... +@deprecated( + "Use [ctor@Rsvg.Handle.new_from_file] and [method@Rsvg.Handle.render_document] instead." +) def pixbuf_from_file_at_max_size( filename: str, max_width: int, max_height: int ) -> Optional[GdkPixbuf.Pixbuf]: ... +@deprecated( + "Use [ctor@Rsvg.Handle.new_from_file] and [method@Rsvg.Handle.render_document] instead." +) def pixbuf_from_file_at_size( filename: str, width: int, height: int ) -> Optional[GdkPixbuf.Pixbuf]: ... +@deprecated( + "Use [ctor@Rsvg.Handle.new_from_file] and [method@Rsvg.Handle.render_document] instead." +) def pixbuf_from_file_at_zoom( filename: str, x_zoom: float, y_zoom: float ) -> Optional[GdkPixbuf.Pixbuf]: ... +@deprecated( + "Use [ctor@Rsvg.Handle.new_from_file] and [method@Rsvg.Handle.render_document] instead." +) def pixbuf_from_file_at_zoom_with_max( filename: str, x_zoom: float, y_zoom: float, max_width: int, max_height: int ) -> Optional[GdkPixbuf.Pixbuf]: ... +@deprecated( + "This function used to set a global default DPI. However,it only worked if it was called before any [class@Rsvg.Handle] objects had beencreated; it would not work after that. To avoid global mutable state, pleaseuse [method@Rsvg.Handle.set_dpi] instead." +) def set_default_dpi(dpi: float) -> None: ... +@deprecated( + "This function used to set a global default DPI. However,it only worked if it was called before any [class@Rsvg.Handle] objects had beencreated; it would not work after that. To avoid global mutable state, pleaseuse [method@Rsvg.Handle.set_dpi] instead." +) def set_default_dpi_x_y(dpi_x: float, dpi_y: float) -> None: ... +@deprecated("There is no need to de-initialize librsvg.") def term() -> None: ... - +@deprecated( + "Use [method@Rsvg.Handle.get_intrinsic_size_in_pixels] or[method@Rsvg.Handle.get_geometry_for_layer] instead." +) class DimensionData(GObject.GPointer): """ :Constructors: @@ -108,11 +139,22 @@ class Handle(GObject.Object): dpi_y: float = ..., flags: HandleFlags = ..., ): ... + @deprecated( + "Use [method@Rsvg.Handle.read_stream_sync] or the constructorfunctions [ctor@Rsvg.Handle.new_from_gfile_sync] or[ctor@Rsvg.Handle.new_from_stream_sync]. See the deprecation notes for[method@Rsvg.Handle.write] for more information." + ) def close(self) -> bool: ... + @deprecated("Use [method@GObject.Object.unref] instead.") def free(self) -> None: ... def get_base_uri(self) -> str: ... + @deprecated( + "Librsvg does not read the metadata/desc/title elements;this function always returns `NULL`." + ) def get_desc(self) -> Optional[str]: ... + @deprecated( + "Use [method@Rsvg.Handle.get_intrinsic_size_in_pixels] instead. Thisfunction is deprecated because it is not able to return exact fractional dimensions,only integer pixels." + ) def get_dimensions(self) -> DimensionData: ... + @deprecated("Use [method@Rsvg.Handle.get_geometry_for_layer] instead.") def get_dimensions_sub( self, id: Optional[str] = None ) -> Tuple[bool, DimensionData]: ... @@ -126,14 +168,23 @@ class Handle(GObject.Object): self, ) -> Tuple[bool, Length, bool, Length, bool, Rectangle]: ... def get_intrinsic_size_in_pixels(self) -> Tuple[bool, float, float]: ... + @deprecated( + "Librsvg does not read the metadata/desc/title elements;this function always returns `NULL`." + ) def get_metadata(self) -> Optional[str]: ... def get_pixbuf(self) -> Optional[GdkPixbuf.Pixbuf]: ... def get_pixbuf_sub( self, id: Optional[str] = None ) -> Optional[GdkPixbuf.Pixbuf]: ... + @deprecated( + "Use [method@Rsvg.Handle.get_geometry_for_layer] instead. This function isdeprecated since it is not able to return exact floating-point positions, only integerpixels." + ) def get_position_sub( self, id: Optional[str] = None ) -> Tuple[bool, PositionData]: ... + @deprecated( + "Librsvg does not read the metadata/desc/title elements;this function always returns `NULL`." + ) def get_title(self) -> Optional[str]: ... def has_sub(self, id: str) -> bool: ... def internal_set_testing(self, testing: bool) -> None: ... @@ -163,7 +214,13 @@ class Handle(GObject.Object): def read_stream_sync( self, stream: Gio.InputStream, cancellable: Optional[Gio.Cancellable] = None ) -> bool: ... + @deprecated( + "Please use [method@Rsvg.Handle.render_document] instead; that function letsyou pass a viewport and obtain a good error message." + ) def render_cairo(self, cr: cairo.Context[_SomeSurface]) -> bool: ... + @deprecated( + "Please use [method@Rsvg.Handle.render_layer] instead; that function letsyou pass a viewport and obtain a good error message." + ) def render_cairo_sub( self, cr: cairo.Context[_SomeSurface], id: Optional[str] = None ) -> bool: ... @@ -183,12 +240,18 @@ class Handle(GObject.Object): def set_base_uri(self, base_uri: str) -> None: ... def set_dpi(self, dpi: float) -> None: ... def set_dpi_x_y(self, dpi_x: float, dpi_y: float) -> None: ... + @deprecated( + "Use [method@Rsvg.Handle.render_document] instead.This function was deprecated because when the @size_func is used, it makes itunclear when the librsvg functions which call the @size_func will use thesize computed originally, or the callback-specified size, or whether itrefers to the whole SVG or to just a sub-element of it. It is easier, andunambiguous, to use code similar to the example above." + ) def set_size_callback( self, size_func: Optional[Callable[..., Tuple[int, int]]] = None, *user_data: Any, ) -> None: ... def set_stylesheet(self, css: Sequence[int]) -> bool: ... + @deprecated( + "Use [method@Rsvg.Handle.read_stream_sync] or the constructorfunctions [ctor@Rsvg.Handle.new_from_gfile_sync] or[ctor@Rsvg.Handle.new_from_stream_sync]. This function is deprecated because itwill accumulate data from the @buf in memory until [method@Rsvg.Handle.close] getscalled. To avoid a big temporary buffer, use the suggested functions, whichtake a `GFile` or a `GInputStream` and do not require a temporary buffer." + ) def write(self, buf: Sequence[int]) -> bool: ... class HandleClass(GObject.GPointer): @@ -215,6 +278,7 @@ class Length(GObject.GPointer): length: float = ... unit: Unit = ... +@deprecated("Use [method@Rsvg.Handle.get_geometry_for_layer] instead.") class PositionData(GObject.GPointer): """ :Constructors: diff --git a/src/gi-stubs/repository/Secret.pyi b/src/gi-stubs/repository/Secret.pyi index 5b44b4a7..d3559591 100644 --- a/src/gi-stubs/repository/Secret.pyi +++ b/src/gi-stubs/repository/Secret.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GLib from gi.repository import GObject diff --git a/src/gi-stubs/repository/Vte.pyi b/src/gi-stubs/repository/Vte.pyi index 9bd30891..0f9e06b9 100644 --- a/src/gi-stubs/repository/Vte.pyi +++ b/src/gi-stubs/repository/Vte.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + import cairo from gi.repository import Atk from gi.repository import Gdk @@ -31,7 +36,9 @@ _lock = ... # FIXME Constant _namespace: str = "Vte" _version: str = "2.91" +@deprecated("This function is deprecated") def get_encoding_supported(encoding: str) -> bool: ... +@deprecated("This function is deprecated") def get_encodings(include_aliases: bool) -> list[str]: ... def get_feature_flags() -> FeatureFlags: ... def get_features() -> str: ... @@ -41,7 +48,7 @@ def get_minor_version() -> int: ... def get_user_shell() -> str: ... def pty_error_quark() -> int: ... def regex_error_quark() -> int: ... - +@deprecated("This class is deprecated") class CharAttributes(GObject.GPointer): """ :Constructors: @@ -85,6 +92,7 @@ class Pty(GObject.Object, Gio.Initable): props: Props = ... def __init__(self, fd: int = ..., flags: PtyFlags = ...): ... def child_setup(self) -> None: ... + @deprecated("This method is deprecated") def close(self) -> None: ... def get_fd(self) -> int: ... def get_size(self) -> Tuple[bool, int, int]: ... @@ -534,6 +542,9 @@ class Terminal(Gtk.Widget, Atk.ImplementorIface, Gtk.Buildable, Gtk.Scrollable): vadjustment: Optional[Gtk.Adjustment] = ..., vscroll_policy: Gtk.ScrollablePolicy = ..., ): ... + @deprecated( + "Use vte_terminal_copy_clipboard_format() with %VTE_FORMAT_TEXT instead." + ) def copy_clipboard(self) -> None: ... def copy_clipboard_format(self, format: Format) -> None: ... def copy_primary(self) -> None: ... @@ -565,6 +576,7 @@ class Terminal(Gtk.Widget, Atk.ImplementorIface, Gtk.Buildable, Gtk.Scrollable): def do_text_modified(self) -> None: ... def do_text_scrolled(self, delta: int) -> None: ... def do_window_title_changed(self) -> None: ... + @deprecated("Use vte_terminal_event_check_regex_simple() instead.") def event_check_gregex_simple( self, event: Gdk.Event, @@ -576,7 +588,11 @@ class Terminal(Gtk.Widget, Atk.ImplementorIface, Gtk.Buildable, Gtk.Scrollable): ) -> Optional[list[str]]: ... def feed(self, data: Optional[Sequence[int]] = None) -> None: ... def feed_child(self, text: Optional[Sequence[int]] = None) -> None: ... + @deprecated( + "Don't send binary data. Use vte_terminal_feed_child() instead to send UTF-8 text" + ) def feed_child_binary(self, data: Optional[Sequence[int]] = None) -> None: ... + @deprecated("There's probably no reason for this feature to exist.") def get_allow_bold(self) -> bool: ... def get_allow_hyperlink(self) -> bool: ... def get_audible_bell(self) -> bool: ... @@ -597,16 +613,20 @@ class Terminal(Gtk.Widget, Atk.ImplementorIface, Gtk.Buildable, Gtk.Scrollable): def get_enable_fallback_scrolling(self) -> bool: ... def get_enable_shaping(self) -> bool: ... def get_enable_sixel(self) -> bool: ... + @deprecated("Support for non-UTF-8 is deprecated.") def get_encoding(self) -> Optional[str]: ... def get_font(self) -> Pango.FontDescription: ... def get_font_options(self) -> Optional[cairo.FontOptions]: ... def get_font_scale(self) -> float: ... + @deprecated("This method is deprecated") def get_geometry_hints(self, min_rows: int, min_columns: int) -> Gdk.Geometry: ... def get_has_selection(self) -> bool: ... + @deprecated("This method is deprecated") def get_icon_title(self) -> Optional[str]: ... def get_input_enabled(self) -> bool: ... def get_mouse_autohide(self) -> bool: ... def get_pty(self) -> Pty: ... + @deprecated("This method is deprecated") def get_rewrap_on_resize(self) -> bool: ... def get_row_count(self) -> int: ... def get_scroll_on_keystroke(self) -> bool: ... @@ -617,6 +637,7 @@ class Terminal(Gtk.Widget, Atk.ImplementorIface, Gtk.Buildable, Gtk.Scrollable): self, is_selected: Optional[Callable[..., bool]] = None, *user_data: Any ) -> Tuple[Optional[str], list[CharAttributes]]: ... def get_text_blink_mode(self) -> TextBlinkMode: ... + @deprecated("Use vte_terminal_get_text() instead.") def get_text_include_trailing_spaces( self, is_selected: Optional[Callable[..., bool]] = None, *user_data: Any ) -> Tuple[str, list[CharAttributes]]: ... @@ -637,18 +658,22 @@ class Terminal(Gtk.Widget, Atk.ImplementorIface, Gtk.Buildable, Gtk.Scrollable): def get_window_title(self) -> Optional[str]: ... def get_word_char_exceptions(self) -> Optional[str]: ... def hyperlink_check_event(self, event: Gdk.Event) -> Optional[str]: ... + @deprecated("Use vte_terminal_match_add_regex() instead.") def match_add_gregex( self, gregex: GLib.Regex, gflags: GLib.RegexMatchFlags ) -> int: ... def match_add_regex(self, regex: Regex, flags: int) -> int: ... + @deprecated("Use vte_terminal_match_check_event() instead.") def match_check(self, column: int, row: int) -> Tuple[Optional[str], int]: ... def match_check_event(self, event: Gdk.Event) -> Tuple[Optional[str], int]: ... def match_remove(self, tag: int) -> None: ... def match_remove_all(self) -> None: ... + @deprecated("Use vte_terminal_match_set_cursor_name() instead.") def match_set_cursor( self, tag: int, cursor: Optional[Gdk.Cursor] = None ) -> None: ... def match_set_cursor_name(self, tag: int, cursor_name: str) -> None: ... + @deprecated("Use vte_terminal_match_set_cursor_name() instead.") def match_set_cursor_type(self, tag: int, cursor_type: Gdk.CursorType) -> None: ... @classmethod def new(cls) -> Terminal: ... @@ -661,15 +686,18 @@ class Terminal(Gtk.Widget, Atk.ImplementorIface, Gtk.Buildable, Gtk.Scrollable): def reset(self, clear_tabstops: bool, clear_history: bool) -> None: ... def search_find_next(self) -> bool: ... def search_find_previous(self) -> bool: ... + @deprecated("use vte_terminal_search_get_regex() instead.") def search_get_gregex(self) -> GLib.Regex: ... def search_get_regex(self) -> Regex: ... def search_get_wrap_around(self) -> bool: ... + @deprecated("use vte_terminal_search_set_regex() instead.") def search_set_gregex( self, gregex: Optional[GLib.Regex], gflags: GLib.RegexMatchFlags ) -> None: ... def search_set_regex(self, regex: Optional[Regex], flags: int) -> None: ... def search_set_wrap_around(self, wrap_around: bool) -> None: ... def select_all(self) -> None: ... + @deprecated("There's probably no reason for this feature to exist.") def set_allow_bold(self, allow_bold: bool) -> None: ... def set_allow_hyperlink(self, allow_hyperlink: bool) -> None: ... def set_audible_bell(self, is_audible: bool) -> None: ... @@ -708,16 +736,19 @@ class Terminal(Gtk.Widget, Atk.ImplementorIface, Gtk.Buildable, Gtk.Scrollable): def set_enable_fallback_scrolling(self, enable: bool) -> None: ... def set_enable_shaping(self, enable_shaping: bool) -> None: ... def set_enable_sixel(self, enabled: bool) -> None: ... + @deprecated("Support for non-UTF-8 is deprecated.") def set_encoding(self, codeset: Optional[str] = None) -> bool: ... def set_font(self, font_desc: Optional[Pango.FontDescription] = None) -> None: ... def set_font_options( self, font_options: Optional[cairo.FontOptions] = None ) -> None: ... def set_font_scale(self, scale: float) -> None: ... + @deprecated("This method is deprecated") def set_geometry_hints_for_window(self, window: Gtk.Window) -> None: ... def set_input_enabled(self, enabled: bool) -> None: ... def set_mouse_autohide(self, setting: bool) -> None: ... def set_pty(self, pty: Optional[Pty] = None) -> None: ... + @deprecated("This method is deprecated") def set_rewrap_on_resize(self, rewrap: bool) -> None: ... def set_scroll_on_keystroke(self, scroll: bool) -> None: ... def set_scroll_on_output(self, scroll: bool) -> None: ... @@ -739,6 +770,7 @@ class Terminal(Gtk.Widget, Atk.ImplementorIface, Gtk.Buildable, Gtk.Scrollable): callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("Use vte_terminal_spawn_async() instead.") def spawn_sync( self, pty_flags: PtyFlags, diff --git a/src/gi-stubs/repository/_Gdk3.pyi b/src/gi-stubs/repository/_Gdk3.pyi index dc3ffb6d..c3cc5232 100644 --- a/src/gi-stubs/repository/_Gdk3.pyi +++ b/src/gi-stubs/repository/_Gdk3.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + import cairo from gi.repository import GdkPixbuf from gi.repository import Gio @@ -2328,11 +2333,14 @@ _namespace: str = "Gdk" _overrides_module = ... # FIXME Constant _version: str = "3.0" +@deprecated("This symbol was never meant to be used outside of GTK+") def add_option_entries_libgtk_only(group: GLib.OptionGroup) -> None: ... def atom_intern(atom_name: str, only_if_exists: bool) -> Atom: ... def atom_intern_static_string(atom_name: str) -> Atom: ... def beep() -> None: ... - +@deprecated( + "Use gdk_window_begin_draw_frame() and gdk_drawing_context_get_cairo_context() instead" +) # override def cairo_create(window: Window) -> cairo.Context[cairo.ImageSurface]: ... def cairo_draw_from_gl( @@ -2355,6 +2363,7 @@ def cairo_get_drawing_context( def cairo_rectangle(cr: cairo.Context[_SomeSurface], rectangle: Rectangle) -> None: ... def cairo_region(cr: cairo.Context[_SomeSurface], region: cairo.Region) -> None: ... def cairo_region_create_from_surface(surface: cairo.Surface) -> cairo.Region: ... +@deprecated("Use gdk_cairo_set_source_rgba() instead") def cairo_set_source_color(cr: cairo.Context[_SomeSurface], color: Color) -> None: ... def cairo_set_source_pixbuf( cr: cairo.Context[_SomeSurface], @@ -2414,6 +2423,7 @@ def events_get_distance(event1: Event, event2: Event) -> Tuple[bool, float]: ... def events_pending() -> bool: ... def flush() -> None: ... def get_default_root_window() -> Window: ... +@deprecated("Call gdk_display_get_name (gdk_display_get_default ())) instead.") def get_display() -> str: ... def get_display_arg_name() -> Optional[str]: ... def get_program_class() -> str: ... @@ -2421,7 +2431,11 @@ def get_show_events() -> bool: ... def gl_error_quark() -> int: ... def init() -> list[str]: ... def init_check() -> Tuple[bool, list[str]]: ... +@deprecated("Use gdk_device_grab() instead.") def keyboard_grab(window: Window, owner_events: bool, time_: int) -> GrabStatus: ... +@deprecated( + "Use gdk_device_ungrab(), together with gdk_device_grab() instead." +) def keyboard_ungrab(time_: int) -> None: ... def keyval_convert_case(symbol: int) -> Tuple[int, int]: ... def keyval_from_name(keyval_name: str) -> int: ... @@ -2431,6 +2445,7 @@ def keyval_name(keyval: int) -> Optional[str]: ... def keyval_to_lower(keyval: int) -> int: ... def keyval_to_unicode(keyval: int) -> int: ... def keyval_to_upper(keyval: int) -> int: ... +@deprecated("Use gdk_screen_list_visuals (gdk_screen_get_default ()).") def list_visuals() -> list[Visual]: ... def notify_startup_complete() -> None: ... def notify_startup_complete_with_id(startup_id: str) -> None: ... @@ -2447,6 +2462,7 @@ def pixbuf_get_from_surface( def pixbuf_get_from_window( window: Window, src_x: int, src_y: int, width: int, height: int ) -> Optional[GdkPixbuf.Pixbuf]: ... +@deprecated("Use gdk_device_grab() instead.") def pointer_grab( window: Window, owner_events: bool, @@ -2455,14 +2471,25 @@ def pointer_grab( cursor: Optional[Cursor], time_: int, ) -> GrabStatus: ... +@deprecated("Use gdk_display_device_is_grabbed() instead.") def pointer_is_grabbed() -> bool: ... +@deprecated( + "Use gdk_device_ungrab(), together with gdk_device_grab() instead." +) def pointer_ungrab(time_: int) -> None: ... +@deprecated("This symbol was never meant to be used outside of GTK+") def pre_parse_libgtk_only() -> None: ... def property_delete(window: Window, property: Atom) -> None: ... def property_get( window: Window, property: Atom, type: Atom, offset: int, length: int, pdelete: int ) -> Tuple[bool, Atom, int, bytes]: ... +@deprecated( + "Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()" +) def query_depths() -> list[int]: ... +@deprecated( + "Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()" +) def query_visual_types() -> list[VisualType]: ... def rectangle_intersect(self, src2: Rectangle) -> Tuple[bool, Rectangle]: ... def rectangle_union(self, src2: Rectangle) -> Rectangle: ... @@ -2531,8 +2558,11 @@ def threads_add_timeout( def threads_add_timeout_seconds( priority: int, interval: int, function: Callable[..., bool], *data: Any ) -> int: ... +@deprecated("All GDK and GTK+ calls should be made from the main thread") def threads_enter() -> None: ... +@deprecated("All GDK and GTK+ calls should be made from the main thread") def threads_init() -> None: ... +@deprecated("All GDK and GTK+ calls should be made from the main thread") def threads_leave() -> None: ... def unicode_to_keyval(wc: int) -> int: ... def utf8_to_string_target(str: str) -> Optional[str]: ... @@ -2565,9 +2595,11 @@ class AppLaunchContext(Gio.AppLaunchContext): display: Display props: Props = ... def __init__(self, display: Display = ...): ... + @deprecated("Use gdk_display_get_app_launch_context() instead") @classmethod def new(cls) -> AppLaunchContext: ... def set_desktop(self, desktop: int) -> None: ... + @deprecated("Use gdk_display_get_app_launch_context() instead") def set_display(self, display: Display) -> None: ... def set_icon(self, icon: Optional[Gio.Icon] = None) -> None: ... def set_icon_name(self, icon_name: Optional[str] = None) -> None: ... @@ -2581,6 +2613,7 @@ class Atom(GObject.GPointer): def intern_static_string(atom_name: str) -> Atom: ... def name(self) -> str: ... +@deprecated("Use #GdkRGBA") class Color(GObject.GBoxed): """ :Constructors: @@ -2599,14 +2632,20 @@ class Color(GObject.GBoxed): green_float = ... # FIXME Constant red_float = ... # FIXME Constant + @deprecated("Use #GdkRGBA") def copy(self) -> Color: ... + @deprecated("Use #GdkRGBA") def equal(self, colorb: Color) -> bool: ... + @deprecated("Use #GdkRGBA") def free(self) -> None: ... def from_floats(red, green, blue): ... # FIXME Function + @deprecated("Use #GdkRGBA") def hash(self) -> int: ... + @deprecated("Use #GdkRGBA") @staticmethod def parse(spec: str) -> Tuple[bool, Color]: ... def to_floats(self): ... # FIXME Function + @deprecated("Use #GdkRGBA") def to_string(self) -> str: ... class Cursor(GObject.Object): @@ -2643,6 +2682,7 @@ class Cursor(GObject.Object): def get_display(self) -> Display: ... def get_image(self) -> Optional[GdkPixbuf.Pixbuf]: ... def get_surface(self) -> Tuple[Optional[cairo.Surface], float, float]: ... + @deprecated("Use gdk_cursor_new_for_display() instead.") @classmethod def new(cls, cursor_type: CursorType) -> Cursor: ... @classmethod @@ -2659,7 +2699,9 @@ class Cursor(GObject.Object): def new_from_surface( cls, display: Display, surface: cairo.Surface, x: float, y: float ) -> Cursor: ... + @deprecated("Use g_object_ref() instead") def ref(self) -> Cursor: ... + @deprecated("Use g_object_unref() instead") def unref(self) -> None: ... class Device(GObject.Object): @@ -2765,6 +2807,7 @@ class Device(GObject.Object): def get_window_at_position_double( self, ) -> Tuple[Optional[Window], float, float]: ... + @deprecated("Use gdk_seat_grab() instead.") def grab( self, window: Window, @@ -2774,6 +2817,7 @@ class Device(GObject.Object): cursor: Optional[Cursor], time_: int, ) -> GrabStatus: ... + @deprecated("The symbol was never meant to be used outside of GTK+") @staticmethod def grab_info_libgtk_only( display: Display, device: Device @@ -2783,6 +2827,7 @@ class Device(GObject.Object): def set_axis_use(self, index_: int, use: AxisUse) -> None: ... def set_key(self, index_: int, keyval: int, modifiers: ModifierType) -> None: ... def set_mode(self, mode: InputMode) -> bool: ... + @deprecated("Use gdk_seat_ungrab() instead.") def ungrab(self, time_: int) -> None: ... def warp(self, screen: Screen, x: int, y: int) -> None: ... @@ -2813,8 +2858,12 @@ class DeviceManager(GObject.Object): display: Optional[Display] props: Props = ... def __init__(self, display: Display = ...): ... + @deprecated("Use gdk_seat_get_pointer() instead.") def get_client_pointer(self) -> Device: ... def get_display(self) -> Optional[Display]: ... + @deprecated( + ", use gdk_seat_get_pointer(), gdk_seat_get_keyboard() and gdk_seat_get_slaves() instead." + ) def list_devices(self, type: DeviceType) -> list[Device]: ... class DevicePad(GObject.GInterface): @@ -2906,6 +2955,7 @@ class Display(GObject.Object): def get_default_group(self) -> Window: ... def get_default_screen(self) -> Screen: ... def get_default_seat(self) -> Seat: ... + @deprecated("Use gdk_display_get_default_seat() and #GdkSeat operations.") def get_device_manager(self) -> Optional[DeviceManager]: ... def get_event(self) -> Optional[Event]: ... def get_maximal_cursor_size(self) -> Tuple[int, int]: ... @@ -2913,24 +2963,39 @@ class Display(GObject.Object): def get_monitor_at_point(self, x: int, y: int) -> Monitor: ... def get_monitor_at_window(self, window: Window) -> Monitor: ... def get_n_monitors(self) -> int: ... + @deprecated("The number of screens is always 1.") def get_n_screens(self) -> int: ... def get_name(self) -> str: ... + @deprecated("Use gdk_device_get_position() instead.") def get_pointer(self) -> Tuple[Screen, int, int, ModifierType]: ... def get_primary_monitor(self) -> Optional[Monitor]: ... + @deprecated( + "There is only one screen; use gdk_display_get_default_screen() to get it." + ) def get_screen(self, screen_num: int) -> Screen: ... + @deprecated("Use gdk_device_get_window_at_position() instead.") def get_window_at_pointer(self) -> Tuple[Optional[Window], int, int]: ... def has_pending(self) -> bool: ... def is_closed(self) -> bool: ... + @deprecated( + "Use gdk_device_ungrab(), together with gdk_device_grab() instead." + ) def keyboard_ungrab(self, time_: int) -> None: ... + @deprecated("Use gdk_device_manager_list_devices() instead.") def list_devices(self) -> list[Device]: ... def list_seats(self) -> list[Seat]: ... def notify_startup_complete(self, startup_id: str) -> None: ... @staticmethod def open(display_name: str) -> Optional[Display]: ... + @deprecated("This symbol was never meant to be used outside of GTK+") @staticmethod def open_default_libgtk_only() -> Optional[Display]: ... def peek_event(self) -> Optional[Event]: ... + @deprecated("Use gdk_display_device_is_grabbed() instead.") def pointer_is_grabbed(self) -> bool: ... + @deprecated( + "Use gdk_device_ungrab(), together with gdk_device_grab() instead." + ) def pointer_ungrab(self, time_: int) -> None: ... def put_event(self, event: Event) -> None: ... def request_selection_notification(self, selection: Atom) -> bool: ... @@ -2943,6 +3008,7 @@ class Display(GObject.Object): targets: Optional[Sequence[Atom]] = None, ) -> None: ... def supports_clipboard_persistence(self) -> bool: ... + @deprecated("Compositing is an outdated technology that only ever worked on X11.") def supports_composite(self) -> bool: ... def supports_cursor_alpha(self) -> bool: ... def supports_cursor_color(self) -> bool: ... @@ -2950,6 +3016,7 @@ class Display(GObject.Object): def supports_selection_notification(self) -> bool: ... def supports_shapes(self) -> bool: ... def sync(self) -> None: ... + @deprecated("Use gdk_device_warp() instead.") def warp_pointer(self, screen: Screen, x: int, y: int) -> None: ... class DisplayManager(GObject.Object): @@ -3377,6 +3444,9 @@ class EventTouchpadSwipe(Event): y_root: float = ... state: ModifierType = ... +@deprecated( + "Modern composited windowing systems with pervasive transparency make it impossible to track the visibility of a window reliably, so this event can not be guaranteed to provide useful information." +) # override class EventVisibility(Event): type: EventType = ... @@ -3533,6 +3603,7 @@ class Keymap(GObject.Object): def add_virtual_modifiers(self) -> ModifierType: ... def get_caps_lock_state(self) -> bool: ... + @deprecated("Use gdk_keymap_get_for_display() instead") @staticmethod def get_default() -> Keymap: ... def get_direction(self) -> Pango.Direction: ... @@ -3724,23 +3795,37 @@ class Screen(GObject.Object): resolution: float props: Props = ... def __init__(self, font_options: Optional[None] = ..., resolution: float = ...): ... + @deprecated("This method is deprecated") def get_active_window(self) -> Optional[Window]: ... @staticmethod def get_default() -> Optional[Screen]: ... def get_display(self) -> Display: ... def get_font_options(self) -> Optional[cairo.FontOptions]: ... + @deprecated("Use per-monitor information instead") def get_height(self) -> int: ... + @deprecated("Use per-monitor information instead") def get_height_mm(self) -> int: ... + @deprecated("Use gdk_display_get_monitor_at_point() instead") def get_monitor_at_point(self, x: int, y: int) -> int: ... + @deprecated("Use gdk_display_get_monitor_at_window() instead") def get_monitor_at_window(self, window: Window) -> int: ... + @deprecated("Use gdk_monitor_get_geometry() instead") def get_monitor_geometry(self, monitor_num: int) -> Rectangle: ... + @deprecated("Use gdk_monitor_get_height_mm() instead") def get_monitor_height_mm(self, monitor_num: int) -> int: ... + @deprecated("Use gdk_monitor_get_model() instead") def get_monitor_plug_name(self, monitor_num: int) -> Optional[str]: ... + @deprecated("Use gdk_monitor_get_scale_factor() instead") def get_monitor_scale_factor(self, monitor_num: int) -> int: ... + @deprecated("Use gdk_monitor_get_width_mm() instead") def get_monitor_width_mm(self, monitor_num: int) -> int: ... + @deprecated("Use gdk_monitor_get_workarea() instead") def get_monitor_workarea(self, monitor_num: int) -> Rectangle: ... + @deprecated("Use gdk_display_get_n_monitors() instead") def get_n_monitors(self) -> int: ... + @deprecated("This method is deprecated") def get_number(self) -> int: ... + @deprecated("Use gdk_display_get_primary_monitor() instead") def get_primary_monitor(self) -> int: ... def get_resolution(self) -> float: ... def get_rgba_visual(self) -> Optional[Visual]: ... @@ -3748,20 +3833,27 @@ class Screen(GObject.Object): def get_setting(self, name: str, value: Any) -> bool: ... def get_system_visual(self) -> Visual: ... def get_toplevel_windows(self) -> list[Window]: ... + @deprecated("Use per-monitor information instead") def get_width(self) -> int: ... + @deprecated("Use per-monitor information instead") def get_width_mm(self) -> int: ... def get_window_stack(self) -> Optional[list[Window]]: ... + @deprecated("Use per-monitor information") @staticmethod def height() -> int: ... + @deprecated("Use per-monitor information") @staticmethod def height_mm() -> int: ... def is_composited(self) -> bool: ... def list_visuals(self) -> list[Visual]: ... + @deprecated("This method is deprecated") def make_display_name(self) -> str: ... def set_font_options(self, options: Optional[cairo.FontOptions] = None) -> None: ... def set_resolution(self, dpi: float) -> None: ... + @deprecated("Use per-monitor information") @staticmethod def width() -> int: ... + @deprecated("Use per-monitor information") @staticmethod def width_mm() -> int: ... @@ -3837,26 +3929,52 @@ class Visual(GObject.Object): notify (GParam) """ + @deprecated( + "Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()" + ) @staticmethod def get_best() -> Visual: ... + @deprecated( + "Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()" + ) @staticmethod def get_best_depth() -> int: ... + @deprecated( + "Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()" + ) @staticmethod def get_best_type() -> VisualType: ... + @deprecated( + "Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()" + ) @staticmethod def get_best_with_both(depth: int, visual_type: VisualType) -> Optional[Visual]: ... + @deprecated( + "Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()" + ) @staticmethod def get_best_with_depth(depth: int) -> Visual: ... + @deprecated( + "Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual()" + ) @staticmethod def get_best_with_type(visual_type: VisualType) -> Visual: ... + @deprecated( + "Use gdk_visual_get_red_pixel_details() and its variants to learn about the pixel layout of TrueColor and DirectColor visuals" + ) def get_bits_per_rgb(self) -> int: ... def get_blue_pixel_details(self) -> Tuple[int, int, int]: ... + @deprecated("This information is not useful") def get_byte_order(self) -> ByteOrder: ... + @deprecated( + "This information is not useful, since GDK does not provide APIs to operate on colormaps." + ) def get_colormap_size(self) -> int: ... def get_depth(self) -> int: ... def get_green_pixel_details(self) -> Tuple[int, int, int]: ... def get_red_pixel_details(self) -> Tuple[int, int, int]: ... def get_screen(self) -> Screen: ... + @deprecated("Use gdk_screen_get_system_visual (gdk_screen_get_default ()).") @staticmethod def get_system() -> Visual: ... def get_visual_type(self) -> VisualType: ... @@ -3897,6 +4015,7 @@ class Window(GObject.Object): attributes: WindowAttr, attributes_mask: WindowAttributesType, ): ... + @deprecated("Use gdk_device_get_window_at_position() instead.") @staticmethod def at_pointer() -> Tuple[Window, int, int]: ... def beep(self) -> None: ... @@ -3907,7 +4026,9 @@ class Window(GObject.Object): def begin_move_drag_for_device( self, device: Device, button: int, root_x: int, root_y: int, timestamp: int ) -> None: ... + @deprecated("Use gdk_window_begin_draw_frame() instead") def begin_paint_rect(self, rectangle: Rectangle) -> None: ... + @deprecated("Use gdk_window_begin_draw_frame() instead") def begin_paint_region(self, region: cairo.Region) -> None: ... def begin_resize_drag( self, edge: WindowEdge, button: int, root_x: int, root_y: int, timestamp: int @@ -3922,6 +4043,7 @@ class Window(GObject.Object): timestamp: int, ) -> None: ... def cairo_create(self): ... # FIXME Function + @deprecated("this function is no longer needed") def configure_finished(self) -> None: ... @staticmethod def constrain_size( @@ -3956,22 +4078,27 @@ class Window(GObject.Object): embedder_x: float, embedder_y: float, ) -> None: ... + @deprecated("this function is no longer needed") def enable_synchronized_configure(self) -> None: ... def end_draw_frame(self, context: DrawingContext) -> None: ... def end_paint(self) -> None: ... def ensure_native(self) -> bool: ... + @deprecated("This method is deprecated") def flush(self) -> None: ... def focus(self, timestamp: int) -> None: ... + @deprecated("This symbol was never meant to be used outside of GTK+") def freeze_toplevel_updates_libgtk_only(self) -> None: ... def freeze_updates(self) -> None: ... def fullscreen(self) -> None: ... def fullscreen_on_monitor(self, monitor: int) -> None: ... def geometry_changed(self) -> None: ... def get_accept_focus(self) -> bool: ... + @deprecated("Don't use this function") def get_background_pattern(self) -> Optional[cairo.Pattern]: ... def get_children(self) -> list[Window]: ... def get_children_with_user_data(self, user_data: None) -> list[Window]: ... def get_clip_region(self) -> cairo.Region: ... + @deprecated("Compositing is an outdated technology that only ever worked on X11.") def get_composited(self) -> bool: ... def get_cursor(self) -> Optional[Cursor]: ... def get_decorations(self) -> Tuple[bool, WMDecoration]: ... @@ -4000,6 +4127,7 @@ class Window(GObject.Object): def get_origin(self) -> Tuple[int, int, int]: ... def get_parent(self) -> Window: ... def get_pass_through(self) -> bool: ... + @deprecated("Use gdk_window_get_device_position() instead.") def get_pointer(self) -> Tuple[Optional[Window], int, int, ModifierType]: ... def get_position(self) -> Tuple[int, int]: ... def get_root_coords(self, x: int, y: int) -> Tuple[int, int]: ... @@ -4065,8 +4193,10 @@ class Window(GObject.Object): attributes_mask: WindowAttributesType, ) -> Window: ... def peek_children(self) -> list[Window]: ... + @deprecated("This method is deprecated") @staticmethod def process_all_updates() -> None: ... + @deprecated("This method is deprecated") def process_updates(self, update_children: bool) -> None: ... def raise_(self) -> None: ... def register_dnd(self) -> None: ... @@ -4075,15 +4205,20 @@ class Window(GObject.Object): def restack(self, sibling: Optional[Window], above: bool) -> None: ... def scroll(self, dx: int, dy: int) -> None: ... def set_accept_focus(self, accept_focus: bool) -> None: ... + @deprecated("Don't use this function") def set_background(self, color: Color) -> None: ... + @deprecated("Don't use this function") def set_background_pattern( self, pattern: Optional[cairo.Pattern] = None ) -> None: ... + @deprecated("Don't use this function") def set_background_rgba(self, rgba: RGBA) -> None: ... def set_child_input_shapes(self) -> None: ... def set_child_shapes(self) -> None: ... + @deprecated("Compositing is an outdated technology that only ever worked on X11.") def set_composited(self, composited: bool) -> None: ... def set_cursor(self, cursor: Optional[Cursor] = None) -> None: ... + @deprecated("This method is deprecated") @staticmethod def set_debug_updates(setting: bool) -> None: ... def set_decorations(self, decorations: WMDecoration) -> None: ... @@ -4115,6 +4250,7 @@ class Window(GObject.Object): def set_skip_taskbar_hint(self, skips_taskbar: bool) -> None: ... def set_source_events(self, source: InputSource, event_mask: EventMask) -> None: ... def set_startup_id(self, startup_id: str) -> None: ... + @deprecated("static gravities haven't worked on anything but X11 for a long time.") def set_static_gravities(self, use_static: bool) -> bool: ... def set_support_multidevice(self, support_multidevice: bool) -> None: ... def set_title(self, title: str) -> None: ... @@ -4129,6 +4265,7 @@ class Window(GObject.Object): def show_unraised(self) -> None: ... def show_window_menu(self, event: Event) -> bool: ... def stick(self) -> None: ... + @deprecated("This symbol was never meant to be used outside of GTK+") def thaw_toplevel_updates_libgtk_only(self) -> None: ... def thaw_updates(self) -> None: ... def unfullscreen(self) -> None: ... diff --git a/src/gi-stubs/repository/_Gdk4.pyi b/src/gi-stubs/repository/_Gdk4.pyi index afca3fab..d55bf125 100644 --- a/src/gi-stubs/repository/_Gdk4.pyi +++ b/src/gi-stubs/repository/_Gdk4.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + import cairo from gi.repository import GdkPixbuf from gi.repository import Gio @@ -2309,6 +2314,9 @@ _namespace: str = "Gdk" _overrides_module = ... # FIXME Constant _version: str = "4.0" +@deprecated( + "The function is overly complex and produces broken output in various combinations of arguments. If you want to draw with GL textures in GTK, use [ctor@Gdk.GLTexture.new]; if you want to use that texture in Cairo, use [method@Gdk.Texture.download] to download the data into a Cairo image surface." +) def cairo_draw_from_gl( cr: cairo.Context[_SomeSurface], surface: Surface, @@ -2373,9 +2381,15 @@ def keyval_to_lower(keyval: int) -> int: ... def keyval_to_unicode(keyval: int) -> int: ... def keyval_to_upper(keyval: int) -> int: ... def paintable_new_empty(intrinsic_width: int, intrinsic_height: int) -> Paintable: ... +@deprecated( + "Use [class@Gdk.Texture] and subclasses instead cairo surfaces and pixbufs" +) def pixbuf_get_from_surface( surface: cairo.Surface, src_x: int, src_y: int, width: int, height: int ) -> Optional[GdkPixbuf.Pixbuf]: ... +@deprecated( + "Use [class@Gdk.Texture] and subclasses instead cairo surfaces and pixbufs" +) def pixbuf_get_from_texture(texture: Texture) -> Optional[GdkPixbuf.Pixbuf]: ... def set_allowed_backends(backends: str) -> None: ... def texture_error_quark() -> int: ... @@ -2985,6 +2999,7 @@ class Display(GObject.Object): def get_name(self) -> str: ... def get_primary_clipboard(self) -> Clipboard: ... def get_setting(self, name: str, value: Any) -> bool: ... + @deprecated("This method is deprecated") def get_startup_notification_id(self) -> Optional[str]: ... def is_closed(self) -> bool: ... def is_composited(self) -> bool: ... @@ -2992,10 +3007,14 @@ class Display(GObject.Object): def list_seats(self) -> list[Seat]: ... def map_keycode(self, keycode: int) -> Tuple[bool, list[KeymapKey], list[int]]: ... def map_keyval(self, keyval: int) -> Tuple[bool, list[KeymapKey]]: ... + @deprecated("Using [method@Gdk.Toplevel.set_startup_id] is sufficient") def notify_startup_complete(self, startup_id: str) -> None: ... @staticmethod def open(display_name: Optional[str] = None) -> Optional[Display]: ... def prepare_gl(self) -> bool: ... + @deprecated( + "This function is only useful in veryspecial situations and should not be used by applications." + ) def put_event(self, event: Event) -> None: ... def supports_input_shapes(self) -> bool: ... def sync(self) -> None: ... @@ -3362,6 +3381,9 @@ class GLContext(DrawContext): def get_display(self) -> Optional[Display]: ... def get_forward_compatible(self) -> bool: ... def get_required_version(self) -> Tuple[int, int]: ... + @deprecated( + "Use [method@Gdk.GLContext.is_shared] to check if contexts can be shared." + ) def get_shared_context(self) -> Optional[GLContext]: ... def get_surface(self) -> Optional[Surface]: ... def get_use_es(self) -> bool: ... @@ -3408,6 +3430,9 @@ class GLTexture(Texture, Paintable, Gio.Icon, Gio.LoadableIcon): width: int props: Props = ... def __init__(self, height: int = ..., width: int = ...): ... + @deprecated( + "[class@Gdk.GLTextureBuilder] supercedes this function and provides extended functionality for creating GL textures." + ) @classmethod def new( cls, @@ -3897,6 +3922,7 @@ class Surface(GObject.Object): def beep(self) -> None: ... def create_cairo_context(self) -> CairoContext: ... def create_gl_context(self) -> GLContext: ... + @deprecated("Create a suitable cairo image surface yourself") def create_similar_surface( self, content: cairo.Content, width: int, height: int ) -> cairo.Surface: ... diff --git a/src/gi-stubs/repository/_Gtk3.pyi b/src/gi-stubs/repository/_Gtk3.pyi index 9f7f527b..6eab0f40 100644 --- a/src/gi-stubs/repository/_Gtk3.pyi +++ b/src/gi-stubs/repository/_Gtk3.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + import cairo from gi.repository import Atk from gi.repository import Gdk @@ -315,6 +320,7 @@ def accelerator_parse_with_keycode( ) -> Tuple[int, list[int], Gdk.ModifierType]: ... def accelerator_set_default_mod_mask(default_mod_mask: Gdk.ModifierType) -> None: ... def accelerator_valid(keyval: int, modifiers: Gdk.ModifierType) -> bool: ... +@deprecated("Deprecated") def alternative_dialog_button_order(screen: Optional[Gdk.Screen] = None) -> bool: ... def binding_entry_add_signal_from_string( binding_set: BindingSet, signal_desc: str @@ -369,6 +375,7 @@ def drag_set_icon_name( def drag_set_icon_pixbuf( context: Gdk.DragContext, pixbuf: GdkPixbuf.Pixbuf, hot_x: int, hot_y: int ) -> None: ... +@deprecated("Use gtk_drag_set_icon_name() instead.") def drag_set_icon_stock( context: Gdk.DragContext, stock_id: str, hot_x: int, hot_y: int ) -> None: ... @@ -376,6 +383,7 @@ def drag_set_icon_surface(context: Gdk.DragContext, surface: cairo.Surface) -> N def drag_set_icon_widget( context: Gdk.DragContext, widget: Widget, hot_x: int, hot_y: int ) -> None: ... +@deprecated("Use gtk_render_insertion_cursor() instead.") def draw_insertion_cursor( widget: Widget, cr: cairo.Context[_SomeSurface], @@ -402,13 +410,18 @@ def get_micro_version() -> int: ... def get_minor_version() -> int: ... def get_option_group(open_default_display: bool) -> GLib.OptionGroup: ... def grab_get_current() -> Optional[Widget]: ... +@deprecated("Use #GtkIconTheme instead.") def icon_size_from_name(name: str) -> int: ... +@deprecated("Use #GtkIconTheme instead.") def icon_size_get_name(size: int) -> str: ... def icon_size_lookup(size: int) -> Tuple[bool, int, int]: ... +@deprecated("Use gtk_icon_size_lookup() instead.") def icon_size_lookup_for_settings( settings: Settings, size: int ) -> Tuple[bool, int, int]: ... +@deprecated("Use #GtkIconTheme instead.") def icon_size_register(name: str, width: int, height: int) -> int: ... +@deprecated("Use #GtkIconTheme instead.") def icon_size_register_alias(alias: str, target: int) -> None: ... def icon_theme_error_quark() -> int: ... def init() -> list[str]: ... @@ -418,6 +431,7 @@ def init_with_args( entries: Sequence[GLib.OptionEntry], translation_domain: Optional[str] = None, ) -> Tuple[bool, list[str]]: ... +@deprecated("Key snooping should not be done. Events should be handled by widgets.") def key_snooper_remove(snooper_handler_id: int) -> None: ... # override @@ -429,6 +443,7 @@ def main_level() -> int: ... # override def main_quit() -> None: ... +@deprecated("Use gtk_render_arrow() instead") def paint_arrow( style: Style, cr: cairo.Context[_SomeSurface], @@ -443,6 +458,7 @@ def paint_arrow( width: int, height: int, ) -> None: ... +@deprecated("Use gtk_render_frame() and gtk_render_background() instead") def paint_box( style: Style, cr: cairo.Context[_SomeSurface], @@ -455,6 +471,7 @@ def paint_box( width: int, height: int, ) -> None: ... +@deprecated("Use gtk_render_frame_gap() instead") def paint_box_gap( style: Style, cr: cairo.Context[_SomeSurface], @@ -470,6 +487,7 @@ def paint_box_gap( gap_x: int, gap_width: int, ) -> None: ... +@deprecated("Use gtk_render_check() instead") def paint_check( style: Style, cr: cairo.Context[_SomeSurface], @@ -482,6 +500,7 @@ def paint_check( width: int, height: int, ) -> None: ... +@deprecated("Use cairo instead") def paint_diamond( style: Style, cr: cairo.Context[_SomeSurface], @@ -494,6 +513,7 @@ def paint_diamond( width: int, height: int, ) -> None: ... +@deprecated("Use gtk_render_expander() instead") def paint_expander( style: Style, cr: cairo.Context[_SomeSurface], @@ -504,6 +524,7 @@ def paint_expander( y: int, expander_style: ExpanderStyle, ) -> None: ... +@deprecated("Use gtk_render_extension() instead") def paint_extension( style: Style, cr: cairo.Context[_SomeSurface], @@ -517,6 +538,7 @@ def paint_extension( height: int, gap_side: PositionType, ) -> None: ... +@deprecated("Use gtk_render_frame() and gtk_render_background() instead") def paint_flat_box( style: Style, cr: cairo.Context[_SomeSurface], @@ -529,6 +551,7 @@ def paint_flat_box( width: int, height: int, ) -> None: ... +@deprecated("Use gtk_render_focus() instead") def paint_focus( style: Style, cr: cairo.Context[_SomeSurface], @@ -540,6 +563,7 @@ def paint_focus( width: int, height: int, ) -> None: ... +@deprecated("Use gtk_render_handle() instead") def paint_handle( style: Style, cr: cairo.Context[_SomeSurface], @@ -553,6 +577,7 @@ def paint_handle( height: int, orientation: Orientation, ) -> None: ... +@deprecated("Use gtk_render_line() instead") def paint_hline( style: Style, cr: cairo.Context[_SomeSurface], @@ -563,6 +588,7 @@ def paint_hline( x2: int, y: int, ) -> None: ... +@deprecated("Use gtk_render_layout() instead") def paint_layout( style: Style, cr: cairo.Context[_SomeSurface], @@ -574,6 +600,7 @@ def paint_layout( y: int, layout: Pango.Layout, ) -> None: ... +@deprecated("Use gtk_render_option() instead") def paint_option( style: Style, cr: cairo.Context[_SomeSurface], @@ -586,6 +613,7 @@ def paint_option( width: int, height: int, ) -> None: ... +@deprecated("Use gtk_render_handle() instead") def paint_resize_grip( style: Style, cr: cairo.Context[_SomeSurface], @@ -598,6 +626,7 @@ def paint_resize_grip( width: int, height: int, ) -> None: ... +@deprecated("Use gtk_render_frame() instead") def paint_shadow( style: Style, cr: cairo.Context[_SomeSurface], @@ -610,6 +639,7 @@ def paint_shadow( width: int, height: int, ) -> None: ... +@deprecated("Use gtk_render_frame_gap() instead") def paint_shadow_gap( style: Style, cr: cairo.Context[_SomeSurface], @@ -625,6 +655,7 @@ def paint_shadow_gap( gap_x: int, gap_width: int, ) -> None: ... +@deprecated("Use gtk_render_slider() instead") def paint_slider( style: Style, cr: cairo.Context[_SomeSurface], @@ -638,6 +669,7 @@ def paint_slider( height: int, orientation: Orientation, ) -> None: ... +@deprecated("Use gtk_render_icon() and the #GtkStyleContext you are drawing instead") def paint_spinner( style: Style, cr: cairo.Context[_SomeSurface], @@ -650,6 +682,7 @@ def paint_spinner( width: int, height: int, ) -> None: ... +@deprecated("Use cairo instead") def paint_tab( style: Style, cr: cairo.Context[_SomeSurface], @@ -662,6 +695,7 @@ def paint_tab( width: int, height: int, ) -> None: ... +@deprecated("Use gtk_render_line() instead") def paint_vline( style: Style, cr: cairo.Context[_SomeSurface], @@ -687,30 +721,46 @@ def print_run_page_setup_dialog_async( *data: Any, ) -> None: ... def propagate_event(widget: Widget, event: Gdk.Event) -> None: ... +@deprecated("Use #GtkStyleContext with a custom #GtkStyleProvider instead") def rc_add_default_file(filename: str) -> None: ... +@deprecated("Use #GtkCssProvider instead.") def rc_find_module_in_path(module_file: str) -> str: ... +@deprecated("Use #GtkCssProvider instead.") def rc_find_pixmap_in_path( settings: Settings, scanner: GLib.Scanner, pixmap_file: str ) -> str: ... +@deprecated("Use #GtkStyleContext instead") def rc_get_default_files() -> list[str]: ... +@deprecated("Use #GtkCssProvider instead.") def rc_get_im_module_file() -> str: ... +@deprecated("Use #GtkCssProvider instead.") def rc_get_im_module_path() -> str: ... +@deprecated("Use #GtkCssProvider instead.") def rc_get_module_dir() -> str: ... +@deprecated("Use #GtkStyleContext instead") def rc_get_style(widget: Widget) -> Style: ... +@deprecated("Use #GtkStyleContext instead") def rc_get_style_by_paths( settings: Settings, widget_path: Optional[str], class_path: Optional[str], type: Type, ) -> Optional[Style]: ... +@deprecated("Use #GtkCssProvider instead.") def rc_get_theme_dir() -> str: ... +@deprecated("Use #GtkCssProvider instead.") def rc_parse(filename: str) -> None: ... +@deprecated("Use #GtkCssProvider instead") def rc_parse_color(scanner: GLib.Scanner) -> Tuple[int, Gdk.Color]: ... +@deprecated("Use #GtkCssProvider instead") def rc_parse_color_full( scanner: GLib.Scanner, style: Optional[RcStyle] = None ) -> Tuple[int, Gdk.Color]: ... +@deprecated("Use #GtkCssProvider instead") def rc_parse_priority(scanner: GLib.Scanner, priority: PathPriorityType) -> int: ... +@deprecated("Use #GtkCssProvider instead") def rc_parse_state(scanner: GLib.Scanner) -> Tuple[int, StateType]: ... +@deprecated("Use #GtkCssProvider instead.") def rc_parse_string(rc_string: str) -> None: ... def rc_property_parse_border( pspec: GObject.ParamSpec, gstring: GLib.String, property_value: Any @@ -727,9 +777,13 @@ def rc_property_parse_flags( def rc_property_parse_requisition( pspec: GObject.ParamSpec, gstring: GLib.String, property_value: Any ) -> bool: ... +@deprecated("Use #GtkCssProvider instead.") def rc_reparse_all() -> bool: ... +@deprecated("Use #GtkCssProvider instead.") def rc_reparse_all_for_settings(settings: Settings, force_load: bool) -> bool: ... +@deprecated("Use #GtkCssProvider instead.") def rc_reset_styles(settings: Settings) -> None: ... +@deprecated("Use #GtkStyleContext with a custom #GtkStyleProvider instead") def rc_set_default_files(filenames: Sequence[str]) -> None: ... def recent_chooser_error_quark() -> int: ... def recent_manager_error_quark() -> int: ... @@ -801,6 +855,9 @@ def render_frame( width: float, height: float, ) -> None: ... +@deprecated( + "Use gtk_render_frame() instead. Themes can create gaps by omitting borders via CSS." +) def render_frame_gap( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -827,6 +884,7 @@ def render_icon( x: float, y: float, ) -> None: ... +@deprecated("Use gtk_icon_theme_load_icon() instead.") def render_icon_pixbuf( context: StyleContext, source: IconSource, size: int ) -> GdkPixbuf.Pixbuf: ... @@ -897,12 +955,17 @@ def selection_owner_set_for_display( ) -> bool: ... def selection_remove_all(widget: Widget) -> None: ... def set_debug_flags(flags: int) -> None: ... +@deprecated("Use gtk_show_uri_on_window() instead.") def show_uri(screen: Optional[Gdk.Screen], uri: str, timestamp: int) -> bool: ... def show_uri_on_window(parent: Optional[Window], uri: str, timestamp: int) -> bool: ... +@deprecated("This function is deprecated") def stock_add(items: Sequence[StockItem]) -> None: ... +@deprecated("This function is deprecated") def stock_add_static(items: Sequence[StockItem]) -> None: ... +@deprecated("This function is deprecated") def stock_list_ids() -> list[str]: ... def stock_lookup(stock_id: str) -> Optional[StockItem]: ... # CHECK Wrapped function +@deprecated("This function is deprecated") def stock_set_translate_func( domain: str, func: Callable[..., str], *data: Any ) -> None: ... @@ -914,6 +977,7 @@ def targets_include_rich_text( ) -> bool: ... def targets_include_text(targets: Sequence[Gdk.Atom]) -> bool: ... def targets_include_uri(targets: Sequence[Gdk.Atom]) -> bool: ... +@deprecated("This testing infrastructure is phased out in favor of reftests.") def test_create_simple_window(window_title: str, dialog_text: str) -> Widget: ... def test_find_label(widget: Widget, label_pattern: str) -> Widget: ... def test_find_sibling(base_widget: Widget, widget_type: Type) -> Widget: ... @@ -922,11 +986,17 @@ def test_find_widget( ) -> Optional[Widget]: ... def test_list_all_types() -> list[Type]: ... def test_register_all_types() -> None: ... +@deprecated("This testing infrastructure is phased out in favor of reftests.") def test_slider_get_value(widget: Widget) -> float: ... +@deprecated("This testing infrastructure is phased out in favor of reftests.") def test_slider_set_perc(widget: Widget, percentage: float) -> None: ... +@deprecated("This testing infrastructure is phased out in favor of reftests.") def test_spin_button_click(spinner: SpinButton, button: int, upwards: bool) -> bool: ... +@deprecated("This testing infrastructure is phased out in favor of reftests.") def test_text_get(widget: Widget) -> str: ... +@deprecated("This testing infrastructure is phased out in favor of reftests.") def test_text_set(widget: Widget, string: str) -> None: ... +@deprecated("This testing infrastructure is phased out in favor of reftests.") def test_widget_click( widget: Widget, button: int, modifiers: Gdk.ModifierType ) -> bool: ... @@ -2146,6 +2216,7 @@ class Accessible(Atk.Object): accessible_table_summary: Atk.Object = ..., accessible_value: float = ..., ): ... + @deprecated("Use gtk_accessible_set_widget() and its vfuncs.") def connect_widget_destroyed(self) -> None: ... def do_connect_widget_destroyed(self) -> None: ... def do_widget_set(self) -> None: ... @@ -2262,13 +2333,33 @@ class Action(GObject.Object, Buildable): visible_overflown: bool = ..., visible_vertical: bool = ..., ): ... + @deprecated("Use #GSimpleAction::activate instead") def activate(self) -> None: ... + @deprecated( + "Use g_simple_action_set_enabled() to disable the#GSimpleAction instead" + ) def block_activate(self) -> None: ... + @deprecated( + "Use #GAction and the accelerator group on an associated#GtkMenu instead" + ) def connect_accelerator(self) -> None: ... + @deprecated( + "Use g_menu_item_set_icon() to set an icon on a #GMenuItem,or gtk_container_add() to add a #GtkImage to a #GtkButton" + ) def create_icon(self, icon_size: int) -> Widget: ... + @deprecated( + "Use #GAction and #GMenuModel instead, and create a#GtkMenu with gtk_menu_new_from_model()" + ) def create_menu(self) -> Widget: ... + @deprecated("Use g_menu_item_new() and associate it with a #GActioninstead.") def create_menu_item(self) -> Widget: ... + @deprecated( + "Use a #GtkToolItem and associate it with a #GAction usinggtk_actionable_set_action_name() instead" + ) def create_tool_item(self) -> Widget: ... + @deprecated( + "Use #GAction and the accelerator group on an associated#GtkMenu instead" + ) def disconnect_accelerator(self) -> None: ... def do_activate(self) -> None: ... def do_connect_proxy(self, proxy: Widget) -> None: ... @@ -2276,24 +2367,67 @@ class Action(GObject.Object, Buildable): def do_create_menu_item(self) -> Widget: ... def do_create_tool_item(self) -> Widget: ... def do_disconnect_proxy(self, proxy: Widget) -> None: ... + @deprecated( + "Use #GAction and #GtkMenu instead, which have noequivalent for getting the accel closure" + ) def get_accel_closure(self) -> Callable[..., Any]: ... + @deprecated( + "Use #GAction and the accelerator path on an associated#GtkMenu instead" + ) def get_accel_path(self) -> str: ... + @deprecated("Use g_menu_item_get_attribute_value() on a #GMenuIteminstead") def get_always_show_image(self) -> bool: ... + @deprecated( + "Use #GAction instead, andg_menu_item_get_attribute_value() to get an icon from a #GMenuItemassociated with a #GAction" + ) def get_gicon(self) -> Gio.Icon: ... + @deprecated( + "Use #GAction instead, andg_menu_item_get_attribute_value() to get an icon from a #GMenuItemassociated with a #GAction" + ) def get_icon_name(self) -> str: ... + @deprecated( + "Use #GAction instead, and control and monitor whetherlabels are shown directly" + ) def get_is_important(self) -> bool: ... + @deprecated( + "Use #GAction instead, and get a label from a menu itemwith g_menu_item_get_attribute_value(). For #GtkActionable widgets, use thewidget-specific API to get a label" + ) def get_label(self) -> str: ... + @deprecated("Use g_action_get_name() on a #GAction instead") def get_name(self) -> str: ... + @deprecated("This method is deprecated") def get_proxies(self) -> list[Widget]: ... + @deprecated("Use g_action_get_enabled() on a #GActioninstead") def get_sensitive(self) -> bool: ... + @deprecated("Use #GAction instead, which has no equivalent of shortlabels") def get_short_label(self) -> str: ... + @deprecated("Use #GAction instead, which has no equivalent of stockitems") def get_stock_id(self) -> str: ... + @deprecated( + "Use #GAction instead, and get tooltips from associated#GtkActionable widgets with gtk_widget_get_tooltip_text()" + ) def get_tooltip(self) -> str: ... + @deprecated( + "Use #GAction instead, and control and monitor the state of#GtkActionable widgets directly" + ) def get_visible(self) -> bool: ... + @deprecated( + "Use #GAction instead, and control and monitor thevisibility of associated widgets and menu items directly" + ) def get_visible_horizontal(self) -> bool: ... + @deprecated( + "Use #GAction instead, and control and monitor thevisibility of associated widgets and menu items directly" + ) def get_visible_vertical(self) -> bool: ... + @deprecated("Use g_action_get_enabled() on a #GActioninstead") def is_sensitive(self) -> bool: ... + @deprecated( + "Use #GAction instead, and control and monitor the state of#GtkActionable widgets directly" + ) def is_visible(self) -> bool: ... + @deprecated( + "Use #GAction instead, associating it to a widget with#GtkActionable or creating a #GtkMenu with gtk_menu_new_from_model()" + ) @classmethod def new( cls, @@ -2302,20 +2436,57 @@ class Action(GObject.Object, Buildable): tooltip: Optional[str] = None, stock_id: Optional[str] = None, ) -> Action: ... + @deprecated( + "Use #GAction and the accelerator group on an associated#GtkMenu instead" + ) def set_accel_group(self, accel_group: Optional[AccelGroup] = None) -> None: ... + @deprecated( + "Use #GAction and the accelerator path on an associated#GtkMenu instead" + ) def set_accel_path(self, accel_path: str) -> None: ... + @deprecated( + "Use g_menu_item_set_icon() on a #GMenuItem instead, if theitem should have an image" + ) def set_always_show_image(self, always_show: bool) -> None: ... + @deprecated( + "Use #GAction instead, and g_menu_item_set_icon() to set anicon on a #GMenuItem associated with a #GAction, or gtk_container_add() toadd a #GtkImage to a #GtkButton" + ) def set_gicon(self, icon: Gio.Icon) -> None: ... + @deprecated( + "Use #GAction instead, and g_menu_item_set_icon() to set anicon on a #GMenuItem associated with a #GAction, or gtk_container_add() toadd a #GtkImage to a #GtkButton" + ) def set_icon_name(self, icon_name: str) -> None: ... + @deprecated( + "Use #GAction instead, and control and monitor whetherlabels are shown directly" + ) def set_is_important(self, is_important: bool) -> None: ... + @deprecated( + "Use #GAction instead, and set a label on a menu item withg_menu_item_set_label(). For #GtkActionable widgets, use the widget-specificAPI to set a label" + ) def set_label(self, label: str) -> None: ... + @deprecated("Use g_simple_action_set_enabled() on a #GSimpleActioninstead") def set_sensitive(self, sensitive: bool) -> None: ... + @deprecated("Use #GAction instead, which has no equivalent of shortlabels") def set_short_label(self, short_label: str) -> None: ... + @deprecated("Use #GAction instead, which has no equivalent of stockitems") def set_stock_id(self, stock_id: str) -> None: ... + @deprecated( + "Use #GAction instead, and set tooltips on associated#GtkActionable widgets with gtk_widget_set_tooltip_text()" + ) def set_tooltip(self, tooltip: str) -> None: ... + @deprecated( + "Use #GAction instead, and control and monitor the state of#GtkActionable widgets directly" + ) def set_visible(self, visible: bool) -> None: ... + @deprecated( + "Use #GAction instead, and control and monitor thevisibility of associated widgets and menu items directly" + ) def set_visible_horizontal(self, visible_horizontal: bool) -> None: ... + @deprecated( + "Use #GAction instead, and control and monitor thevisibility of associated widgets and menu items directly" + ) def set_visible_vertical(self, visible_vertical: bool) -> None: ... + @deprecated("Use g_simple_action_set_enabled() to enable the#GSimpleAction instead") def unblock_activate(self) -> None: ... class ActionBar(Bin, Atk.ImplementorIface, Buildable): @@ -2632,6 +2803,7 @@ class ActionClass(GObject.GPointer): _gtk_reserved3: None = ... _gtk_reserved4: None = ... +@deprecated("This class is deprecated") class ActionEntry(GObject.GPointer): """ :Constructors: @@ -2694,7 +2866,9 @@ class ActionGroup(GObject.Object, Buildable): sensitive: bool = ..., visible: bool = ..., ): ... + @deprecated("This method is deprecated") def add_action(self, action: Action) -> None: ... + @deprecated("This method is deprecated") def add_action_with_accel( self, action: Action, accelerator: Optional[str] = None ) -> None: ... @@ -2704,20 +2878,34 @@ class ActionGroup(GObject.Object, Buildable): ): ... # FIXME Function def add_toggle_actions(self, entries, user_data=None): ... # FIXME Function def do_get_action(self, action_name: str) -> Action: ... + @deprecated("This method is deprecated") def get_accel_group(self) -> AccelGroup: ... + @deprecated("This method is deprecated") def get_action(self, action_name: str) -> Action: ... + @deprecated("This method is deprecated") def get_name(self) -> str: ... + @deprecated("This method is deprecated") def get_sensitive(self) -> bool: ... + @deprecated("This method is deprecated") def get_visible(self) -> bool: ... + @deprecated("This method is deprecated") def list_actions(self) -> list[Action]: ... + @deprecated("This method is deprecated") @classmethod def new(cls, name: str) -> ActionGroup: ... + @deprecated("This method is deprecated") def remove_action(self, action: Action) -> None: ... + @deprecated("This method is deprecated") def set_accel_group(self, accel_group: Optional[AccelGroup] = None) -> None: ... + @deprecated("This method is deprecated") def set_sensitive(self, sensitive: bool) -> None: ... + @deprecated("This method is deprecated") def set_translate_func(self, func: Callable[..., str], *data: Any) -> None: ... + @deprecated("This method is deprecated") def set_translation_domain(self, domain: Optional[str] = None) -> None: ... + @deprecated("This method is deprecated") def set_visible(self, visible: bool) -> None: ... + @deprecated("This method is deprecated") def translate_string(self, string: str) -> str: ... class ActionGroupClass(GObject.GPointer): @@ -2778,13 +2966,20 @@ class Activatable(GObject.GInterface): notify (GParam) """ + @deprecated("This method is deprecated") def do_set_related_action(self, action: Action) -> None: ... + @deprecated("This method is deprecated") def get_related_action(self) -> Action: ... + @deprecated("This method is deprecated") def get_use_action_appearance(self) -> bool: ... + @deprecated("This method is deprecated") def set_related_action(self, action: Action) -> None: ... + @deprecated("This method is deprecated") def set_use_action_appearance(self, use_appearance: bool) -> None: ... + @deprecated("This method is deprecated") def sync_action_properties(self, action: Optional[Action] = None) -> None: ... +@deprecated("This class is deprecated") class ActivatableIface(GObject.GPointer): """ :Constructors: @@ -2850,6 +3045,9 @@ class Adjustment(GObject.InitiallyUnowned): upper: float = ..., value: float = ..., ): ... + @deprecated( + "GTK+ emits #GtkAdjustment::changed itself whenever any of the properties (other than value) change" + ) def changed(self) -> None: ... def clamp_page(self, lower: float, upper: float) -> None: ... def configure( @@ -2886,6 +3084,9 @@ class Adjustment(GObject.InitiallyUnowned): def set_step_increment(self, step_increment: float) -> None: ... def set_upper(self, upper: float) -> None: ... def set_value(self, value: float) -> None: ... + @deprecated( + "GTK+ emits #GtkAdjustment::value-changed itself whenever the value changes" + ) def value_changed(self) -> None: ... class AdjustmentClass(GObject.GPointer): @@ -3209,14 +3410,18 @@ class Alignment(Bin, Atk.ImplementorIface, Buildable): visible: bool = ..., width_request: int = ..., ): ... + @deprecated("Use #GtkWidget alignment and margin properties") def get_padding(self) -> Tuple[int, int, int, int]: ... + @deprecated("Use #GtkWidget alignment and margin properties") @classmethod def new( cls, xalign: float, yalign: float, xscale: float, yscale: float ) -> Alignment: ... + @deprecated("Use #GtkWidget alignment and margin properties") def set( self, xalign: float, yalign: float, xscale: float, yscale: float ) -> None: ... + @deprecated("Use #GtkWidget alignment and margin properties") def set_padding( self, padding_top: int, @@ -4558,6 +4763,7 @@ class Application(Gio.Application, Gio.ActionGroup, Gio.ActionMap): inactivity_timeout: int = ..., resource_base_path: Optional[str] = ..., ): ... + @deprecated("Use gtk_application_set_accels_for_action() instead") def add_accelerator( self, accelerator: str, @@ -4588,6 +4794,7 @@ class Application(Gio.Application, Gio.ActionGroup, Gio.ActionMap): cls, application_id: Optional[str], flags: Gio.ApplicationFlags ) -> Application: ... def prefers_app_menu(self) -> bool: ... + @deprecated("Use gtk_application_set_accels_for_action() instead") def remove_accelerator( self, action_name: str, parameter: Optional[GLib.Variant] = None ) -> None: ... @@ -5334,8 +5541,10 @@ class Arrow(Misc, Atk.ImplementorIface, Buildable): visible: bool = ..., width_request: int = ..., ): ... + @deprecated("Use a #GtkImage with a suitable icon.") @classmethod def new(cls, arrow_type: ArrowType, shadow_type: ShadowType) -> Arrow: ... + @deprecated("Use a #GtkImage with a suitable icon.") def set(self, arrow_type: ArrowType, shadow_type: ShadowType) -> None: ... class ArrowAccessible(WidgetAccessible, Atk.Component, Atk.Image): @@ -6239,7 +6448,11 @@ class Assistant(Window, Atk.ImplementorIface, Buildable): def get_nth_page(self, page_num: int) -> Optional[Widget]: ... def get_page_complete(self, page: Widget) -> bool: ... def get_page_has_padding(self, page: Widget) -> bool: ... + @deprecated( + "Since GTK+ 3.2, a header is no longer shown; add your header decoration to the page content instead." + ) def get_page_header_image(self, page: Widget) -> GdkPixbuf.Pixbuf: ... + @deprecated("Since GTK+ 3.2, sidebar images are not shown anymore.") def get_page_side_image(self, page: Widget) -> GdkPixbuf.Pixbuf: ... def get_page_title(self, page: Widget) -> str: ... def get_page_type(self, page: Widget) -> AssistantPageType: ... @@ -6257,9 +6470,13 @@ class Assistant(Window, Atk.ImplementorIface, Buildable): ) -> None: ... def set_page_complete(self, page: Widget, complete: bool) -> None: ... def set_page_has_padding(self, page: Widget, has_padding: bool) -> None: ... + @deprecated( + "Since GTK+ 3.2, a header is no longer shown; add your header decoration to the page content instead." + ) def set_page_header_image( self, page: Widget, pixbuf: Optional[GdkPixbuf.Pixbuf] = None ) -> None: ... + @deprecated("Since GTK+ 3.2, sidebar images are not shown anymore.") def set_page_side_image( self, page: Widget, pixbuf: Optional[GdkPixbuf.Pixbuf] = None ) -> None: ... @@ -6645,6 +6862,7 @@ class BindingSet(GObject.GPointer): def activate( self, keyval: int, modifiers: Gdk.ModifierType, object: GObject.Object ) -> bool: ... + @deprecated("This method is deprecated") def add_path( self, path_type: PathType, path_pattern: str, priority: PathPriorityType ) -> None: ... @@ -7631,7 +7849,9 @@ class Button(Bin, Atk.ImplementorIface, Actionable, Activatable, Buildable): def do_leave(self) -> None: ... def do_pressed(self) -> None: ... def do_released(self) -> None: ... + @deprecated("Use the #GtkWidget::enter-notify-event signal.") def enter(self) -> None: ... + @deprecated("Access the child widget directly if you need to controlits alignment.") def get_alignment(self) -> Tuple[float, float]: ... def get_always_show_image(self) -> bool: ... def get_event_window(self) -> Gdk.Window: ... @@ -7640,21 +7860,27 @@ class Button(Bin, Atk.ImplementorIface, Actionable, Activatable, Buildable): def get_image_position(self) -> PositionType: ... def get_label(self) -> str: ... def get_relief(self) -> ReliefStyle: ... + @deprecated("This method is deprecated") def get_use_stock(self) -> bool: ... def get_use_underline(self) -> bool: ... + @deprecated("Use the #GtkWidget::leave-notify-event signal.") def leave(self) -> None: ... @classmethod def new(cls) -> Button: ... @classmethod def new_from_icon_name(cls, icon_name: Optional[str], size: int) -> Button: ... + @deprecated("Stock items are deprecated. Use gtk_button_new_with_label()instead.") @classmethod def new_from_stock(cls, stock_id: str) -> Button: ... @classmethod def new_with_label(cls, label: str) -> Button: ... @classmethod def new_with_mnemonic(cls, label: str) -> Button: ... + @deprecated("Use the #GtkWidget::button-press-event signal.") def pressed(self) -> None: ... + @deprecated("Use the #GtkWidget::button-release-event signal.") def released(self) -> None: ... + @deprecated("Access the child widget directly if you need to controlits alignment.") def set_alignment(self, xalign: float, yalign: float) -> None: ... def set_always_show_image(self, always_show: bool) -> None: ... def set_focus_on_click(self, *args, **kwargs): ... # FIXME Function @@ -7662,6 +7888,7 @@ class Button(Bin, Atk.ImplementorIface, Actionable, Activatable, Buildable): def set_image_position(self, position: PositionType) -> None: ... def set_label(self, label: str) -> None: ... def set_relief(self, relief: ReliefStyle) -> None: ... + @deprecated("This method is deprecated") def set_use_stock(self, use_stock: bool) -> None: ... def set_use_underline(self, use_underline: bool) -> None: ... @@ -9359,6 +9586,7 @@ class CellRenderer(GObject.InitiallyUnowned): ) -> Tuple[int, int]: ... def get_request_mode(self) -> SizeRequestMode: ... def get_sensitive(self) -> bool: ... + @deprecated("Use gtk_cell_renderer_get_preferred_size() instead.") def get_size( self, widget: Widget, cell_area: Optional[Gdk.Rectangle] = None ) -> Tuple[int, int, int, int]: ... @@ -11621,6 +11849,9 @@ class CellView(Widget, Atk.ImplementorIface, Buildable, CellLayout, Orientable): def get_draw_sensitive(self) -> bool: ... def get_fit_model(self) -> bool: ... def get_model(self) -> Optional[TreeModel]: ... + @deprecated( + "Combo box formerly used this to calculate thesizes for cellviews, now you can achieve this by either usingthe #GtkCellView:fit-model property or by setting the currentlydisplayed row of the #GtkCellView and using gtk_widget_get_preferred_size()." + ) def get_size_of_row(self, path: TreePath) -> Tuple[bool, Requisition]: ... @classmethod def new(cls) -> CellView: ... @@ -11632,6 +11863,7 @@ class CellView(Widget, Atk.ImplementorIface, Buildable, CellLayout, Orientable): def new_with_pixbuf(cls, pixbuf: GdkPixbuf.Pixbuf) -> CellView: ... @classmethod def new_with_text(cls, text: str) -> CellView: ... + @deprecated("Use gtk_cell_view_set_background_rgba() instead.") def set_background_color(self, color: Gdk.Color) -> None: ... def set_background_rgba(self, rgba: Gdk.RGBA) -> None: ... def set_displayed_row(self, path: Optional[TreePath] = None) -> None: ... @@ -12930,19 +13162,26 @@ class ColorButton( use_action_appearance: bool = ..., ): ... def do_color_set(self) -> None: ... + @deprecated("Use gtk_color_chooser_get_rgba() instead.") def get_alpha(self) -> int: ... + @deprecated("Use gtk_color_chooser_get_rgba() instead.") def get_color(self) -> Gdk.Color: ... def get_title(self) -> str: ... + @deprecated("Use gtk_color_chooser_get_use_alpha() instead.") def get_use_alpha(self) -> bool: ... @classmethod def new(cls) -> ColorButton: ... + @deprecated("Use gtk_color_button_new_with_rgba() instead.") @classmethod def new_with_color(cls, color: Gdk.Color) -> ColorButton: ... @classmethod def new_with_rgba(cls, rgba: Gdk.RGBA) -> ColorButton: ... + @deprecated("Use gtk_color_chooser_set_rgba() instead.") def set_alpha(self, alpha: int) -> None: ... + @deprecated("Use gtk_color_chooser_set_rgba() instead.") def set_color(self, color: Gdk.Color) -> None: ... def set_title(self, title: str) -> None: ... + @deprecated("Use gtk_color_chooser_set_use_alpha() instead.") def set_use_alpha(self, use_alpha: bool) -> None: ... class ColorButtonClass(GObject.GPointer): @@ -14084,11 +14323,13 @@ class ColorSelection(Box, Atk.ImplementorIface, Buildable, Orientable): ): ... def do_color_changed(self) -> None: ... def get_current_alpha(self) -> int: ... + @deprecated("Use gtk_color_selection_get_current_rgba() instead.") def get_current_color(self) -> Gdk.Color: ... def get_current_rgba(self) -> Gdk.RGBA: ... def get_has_opacity_control(self) -> bool: ... def get_has_palette(self) -> bool: ... def get_previous_alpha(self) -> int: ... + @deprecated("Use gtk_color_selection_get_previous_rgba() instead.") def get_previous_color(self) -> Gdk.Color: ... def get_previous_rgba(self) -> Gdk.RGBA: ... def is_adjusting(self) -> bool: ... @@ -14099,11 +14340,13 @@ class ColorSelection(Box, Atk.ImplementorIface, Buildable, Orientable): @staticmethod def palette_to_string(colors: Sequence[Gdk.Color]) -> str: ... def set_current_alpha(self, alpha: int) -> None: ... + @deprecated("Use gtk_color_selection_set_current_rgba() instead.") def set_current_color(self, color: Gdk.Color) -> None: ... def set_current_rgba(self, rgba: Gdk.RGBA) -> None: ... def set_has_opacity_control(self, has_opacity: bool) -> None: ... def set_has_palette(self, has_palette: bool) -> None: ... def set_previous_alpha(self, alpha: int) -> None: ... + @deprecated("Use gtk_color_selection_set_previous_rgba() instead.") def set_previous_color(self, color: Gdk.Color) -> None: ... def set_previous_rgba(self, rgba: Gdk.RGBA) -> None: ... @@ -14930,10 +15173,12 @@ class ComboBox(Bin, Atk.ImplementorIface, Buildable, CellEditable, CellLayout): def get_active(self) -> int: ... def get_active_id(self) -> Optional[str]: ... def get_active_iter(self) -> Optional[TreeIter]: ... # CHECK Wrapped function + @deprecated("This method is deprecated") def get_add_tearoffs(self) -> bool: ... def get_button_sensitivity(self) -> SensitivityType: ... def get_column_span_column(self) -> int: ... def get_entry_text_column(self) -> int: ... + @deprecated("Use gtk_widget_get_focus_on_click() instead") def get_focus_on_click(self) -> bool: ... def get_has_entry(self) -> bool: ... def get_id_column(self) -> int: ... @@ -14941,6 +15186,7 @@ class ComboBox(Bin, Atk.ImplementorIface, Buildable, CellEditable, CellLayout): def get_popup_accessible(self) -> Atk.Object: ... def get_popup_fixed_width(self) -> bool: ... def get_row_span_column(self) -> int: ... + @deprecated("This method is deprecated") def get_title(self) -> str: ... def get_wrap_width(self) -> int: ... @classmethod @@ -14961,16 +15207,19 @@ class ComboBox(Bin, Atk.ImplementorIface, Buildable, CellEditable, CellLayout): def set_active(self, index_: int) -> None: ... def set_active_id(self, active_id: Optional[str] = None) -> bool: ... def set_active_iter(self, iter: Optional[TreeIter] = None) -> None: ... + @deprecated("This method is deprecated") def set_add_tearoffs(self, add_tearoffs: bool) -> None: ... def set_button_sensitivity(self, sensitivity: SensitivityType) -> None: ... def set_column_span_column(self, column_span: int) -> None: ... def set_entry_text_column(self, text_column: int) -> None: ... + @deprecated("Use gtk_widget_set_focus_on_click() instead") def set_focus_on_click(self, focus_on_click: bool) -> None: ... def set_id_column(self, id_column: int) -> None: ... def set_model(self, model: Optional[TreeModel] = None) -> None: ... def set_popup_fixed_width(self, fixed: bool) -> None: ... def set_row_separator_func(self, func: Callable[..., bool], *data: Any) -> None: ... def set_row_span_column(self, row_span: int) -> None: ... + @deprecated("This method is deprecated") def set_title(self, title: str) -> None: ... def set_wrap_width(self, width: int) -> None: ... @@ -15809,6 +16058,9 @@ class Container(Widget, Atk.ImplementorIface, Buildable): def get_focus_hadjustment(self) -> Optional[Adjustment]: ... def get_focus_vadjustment(self) -> Optional[Adjustment]: ... def get_path_for_child(self, child: Widget) -> WidgetPath: ... + @deprecated( + "Resize modes are deprecated. They aren’t necessary anymore since frame clocks and might introduce obscure bugs if used." + ) def get_resize_mode(self) -> ResizeMode: ... def handle_border_width(self) -> None: ... def install_child_properties(self, pspecs: Sequence[GObject.ParamSpec]) -> None: ... @@ -15820,14 +16072,25 @@ class Container(Widget, Atk.ImplementorIface, Buildable): self, child: Widget, cr: cairo.Context[_SomeSurface] ) -> None: ... def remove(self, widget: Widget) -> None: ... + @deprecated("This method is deprecated") def resize_children(self) -> None: ... def set_border_width(self, border_width: int) -> None: ... + @deprecated( + "For overriding focus behavior, use the GtkWidgetClass::focus signal." + ) def set_focus_chain(self, focusable_widgets: list[Widget]) -> None: ... def set_focus_child(self, child: Optional[Widget] = None) -> None: ... def set_focus_hadjustment(self, adjustment: Adjustment) -> None: ... def set_focus_vadjustment(self, adjustment: Adjustment) -> None: ... + @deprecated("Call gtk_widget_queue_draw() in your size_allocate handler.") def set_reallocate_redraws(self, needs_redraws: bool) -> None: ... + @deprecated( + "Resize modes are deprecated. They aren’t necessary anymore since frame clocks and might introduce obscure bugs if used." + ) def set_resize_mode(self, resize_mode: ResizeMode) -> None: ... + @deprecated( + "For overriding focus behavior, use the GtkWidgetClass::focus signal." + ) def unset_focus_chain(self) -> None: ... class ContainerAccessible(WidgetAccessible, Atk.Component): @@ -16139,6 +16402,7 @@ class CssProvider(GObject.Object, StyleProvider): parent_instance: GObject.Object = ... priv: CssProviderPrivate = ... def do_parsing_error(self, section: CssSection, error: GLib.Error) -> None: ... + @deprecated("Use gtk_css_provider_new() instead.") @staticmethod def get_default() -> CssProvider: ... @staticmethod @@ -16604,6 +16868,9 @@ class Dialog(Window, Atk.ImplementorIface, Buildable): def add_buttons(self, *args): ... # FIXME Function def do_close(self) -> None: ... def do_response(self, response_id: int) -> None: ... + @deprecated( + "Direct access to the action area is discouraged; use gtk_dialog_add_button(), etc." + ) def get_action_area(self) -> Box: ... def get_content_area(self) -> Box: ... def get_header_bar(self) -> HeaderBar: ... @@ -16613,6 +16880,7 @@ class Dialog(Window, Atk.ImplementorIface, Buildable): def new(cls) -> Dialog: ... def response(self, response_id: int) -> None: ... def run(self, *args, **kwargs): ... # FIXME Function + @deprecated("Deprecated") def set_alternative_button_order_from_array( self, new_order: Sequence[int] ) -> None: ... @@ -17456,10 +17724,14 @@ class Entry(Widget, Atk.ImplementorIface, Buildable, CellEditable, Editable): self, icon_pos: EntryIconPosition ) -> Optional[GdkPixbuf.Pixbuf]: ... def get_icon_sensitive(self, icon_pos: EntryIconPosition) -> bool: ... + @deprecated("Use gtk_entry_get_icon_name() instead.") def get_icon_stock(self, icon_pos: EntryIconPosition) -> str: ... def get_icon_storage_type(self, icon_pos: EntryIconPosition) -> ImageType: ... def get_icon_tooltip_markup(self, icon_pos: EntryIconPosition) -> Optional[str]: ... def get_icon_tooltip_text(self, icon_pos: EntryIconPosition) -> Optional[str]: ... + @deprecated( + "Use the standard border and padding CSS properties (through objects like #GtkStyleContext and #GtkCssProvider); the value returned by this function is ignored by #GtkEntry." + ) def get_inner_border(self) -> Optional[Border]: ... def get_input_hints(self) -> InputHints: ... def get_input_purpose(self) -> InputPurpose: ... @@ -17514,6 +17786,7 @@ class Entry(Widget, Atk.ImplementorIface, Buildable, CellEditable, Editable): def set_icon_from_pixbuf( self, icon_pos: EntryIconPosition, pixbuf: Optional[GdkPixbuf.Pixbuf] = None ) -> None: ... + @deprecated("Use gtk_entry_set_icon_from_icon_name() instead.") def set_icon_from_stock( self, icon_pos: EntryIconPosition, stock_id: Optional[str] = None ) -> None: ... @@ -17526,6 +17799,9 @@ class Entry(Widget, Atk.ImplementorIface, Buildable, CellEditable, Editable): def set_icon_tooltip_text( self, icon_pos: EntryIconPosition, tooltip: Optional[str] = None ) -> None: ... + @deprecated( + "Use the standard border and padding CSS properties (through objects like #GtkStyleContext and #GtkCssProvider); the value set with this function is ignored by #GtkEntry." + ) def set_inner_border(self, border: Optional[Border] = None) -> None: ... def set_input_hints(self, hints: InputHints) -> None: ... def set_input_purpose(self, purpose: InputPurpose) -> None: ... @@ -18781,6 +19057,7 @@ class Expander(Bin, Atk.ImplementorIface, Buildable): def get_label_fill(self) -> bool: ... def get_label_widget(self) -> Optional[Widget]: ... def get_resize_toplevel(self) -> bool: ... + @deprecated("Use margins on the child instead.") def get_spacing(self) -> int: ... def get_use_markup(self) -> bool: ... def get_use_underline(self) -> bool: ... @@ -18793,6 +19070,7 @@ class Expander(Bin, Atk.ImplementorIface, Buildable): def set_label_fill(self, label_fill: bool) -> None: ... def set_label_widget(self, label_widget: Optional[Widget] = None) -> None: ... def set_resize_toplevel(self, resize_toplevel: bool) -> None: ... + @deprecated("Use margins on the child instead.") def set_spacing(self, spacing: int) -> None: ... def set_use_markup(self, use_markup: bool) -> None: ... def set_use_underline(self, use_underline: bool) -> None: ... @@ -19346,6 +19624,7 @@ class FileChooserButton(Box, Atk.ImplementorIface, Buildable, FileChooser, Orien orientation: Orientation = ..., ): ... def do_file_set(self) -> None: ... + @deprecated("Use gtk_widget_get_focus_on_click() instead") def get_focus_on_click(self) -> bool: ... def get_title(self) -> str: ... def get_width_chars(self) -> int: ... @@ -19353,6 +19632,7 @@ class FileChooserButton(Box, Atk.ImplementorIface, Buildable, FileChooser, Orien def new(cls, title: str, action: FileChooserAction) -> FileChooserButton: ... @classmethod def new_with_dialog(cls, dialog: Dialog) -> FileChooserButton: ... + @deprecated("Use gtk_widget_set_focus_on_click() instead") def set_focus_on_click(self, focus_on_click: bool) -> None: ... def set_title(self, title: str) -> None: ... def set_width_chars(self, n_chars: int) -> None: ... @@ -22051,6 +22331,7 @@ class FontButton( show_preview_entry: bool = ..., ): ... def do_font_set(self) -> None: ... + @deprecated("Use gtk_font_chooser_get_font() instead") def get_font_name(self) -> str: ... def get_show_size(self) -> bool: ... def get_show_style(self) -> bool: ... @@ -22061,6 +22342,7 @@ class FontButton( def new(cls) -> FontButton: ... @classmethod def new_with_font(cls, fontname: str) -> FontButton: ... + @deprecated("Use gtk_font_chooser_set_font() instead") def set_font_name(self, fontname: str) -> bool: ... def set_show_size(self, show_size: bool) -> None: ... def set_show_style(self, show_style: bool) -> None: ... @@ -23211,19 +23493,32 @@ class FontSelection(Box, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated("Use #GtkFontChooser") def get_face(self) -> Pango.FontFace: ... + @deprecated("Use #GtkFontChooser") def get_face_list(self) -> Widget: ... + @deprecated("Use #GtkFontChooser") def get_family(self) -> Pango.FontFamily: ... + @deprecated("Use #GtkFontChooser") def get_family_list(self) -> Widget: ... + @deprecated("Use #GtkFontChooser") def get_font_name(self) -> str: ... + @deprecated("Use #GtkFontChooser") def get_preview_entry(self) -> Widget: ... + @deprecated("Use #GtkFontChooser") def get_preview_text(self) -> str: ... + @deprecated("Use #GtkFontChooser") def get_size(self) -> int: ... + @deprecated("Use #GtkFontChooser") def get_size_entry(self) -> Widget: ... + @deprecated("Use #GtkFontChooser") def get_size_list(self) -> Widget: ... + @deprecated("Use #GtkFontChooserWidget instead") @classmethod def new(cls) -> FontSelection: ... + @deprecated("Use #GtkFontChooser") def set_font_name(self, fontname: str) -> bool: ... + @deprecated("Use #GtkFontChooser") def set_preview_text(self, text: str) -> None: ... class FontSelectionClass(GObject.GPointer): @@ -23656,14 +23951,22 @@ class FontSelectionDialog(Dialog, Atk.ImplementorIface, Buildable): visible: bool = ..., width_request: int = ..., ): ... + @deprecated("Use #GtkFontChooserDialog") def get_cancel_button(self) -> Widget: ... + @deprecated("Use #GtkFontChooserDialog") def get_font_name(self) -> str: ... + @deprecated("Use #GtkFontChooserDialog") def get_font_selection(self) -> Widget: ... + @deprecated("Use #GtkFontChooserDialog") def get_ok_button(self) -> Widget: ... + @deprecated("Use #GtkFontChooserDialog") def get_preview_text(self) -> str: ... + @deprecated("Use #GtkFontChooserDialog") @classmethod def new(cls, title: str) -> FontSelectionDialog: ... + @deprecated("Use #GtkFontChooserDialog") def set_font_name(self, fontname: str) -> bool: ... + @deprecated("Use #GtkFontChooserDialog") def set_preview_text(self, text: str) -> None: ... class FontSelectionDialogClass(GObject.GPointer): @@ -25156,17 +25459,24 @@ class Gradient(GObject.GBoxed): new_radial(x0:float, y0:float, radius0:float, x1:float, y1:float, radius1:float) -> Gtk.Gradient """ + @deprecated("#GtkGradient is deprecated.") def add_color_stop(self, offset: float, color: SymbolicColor) -> None: ... + @deprecated("#GtkGradient is deprecated.") @classmethod def new_linear(cls, x0: float, y0: float, x1: float, y1: float) -> Gradient: ... + @deprecated("#GtkGradient is deprecated.") @classmethod def new_radial( cls, x0: float, y0: float, radius0: float, x1: float, y1: float, radius1: float ) -> Gradient: ... + @deprecated("#GtkGradient is deprecated.") def ref(self) -> Gradient: ... + @deprecated("#GtkGradient is deprecated.") def resolve(self, props: StyleProperties) -> Tuple[bool, cairo.Pattern]: ... def resolve_for_context(self, context: StyleContext) -> cairo.Pattern: ... + @deprecated("#GtkGradient is deprecated.") def to_string(self) -> str: ... + @deprecated("#GtkGradient is deprecated.") def unref(self) -> None: ... class Grid(Container, Atk.ImplementorIface, Buildable, Orientable): @@ -25797,6 +26107,9 @@ class HBox(Box, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated( + "You should use gtk_box_new() with a %GTK_ORIENTATION_HORIZONTAL #GtkOrientable:orientation instead" + ) @classmethod def new(cls, homogeneous: bool, spacing: int) -> HBox: ... @@ -26100,6 +26413,7 @@ class HButtonBox(ButtonBox, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated("Use gtk_button_box_new() with %GTK_ORIENTATION_HORIZONTAL instead") @classmethod def new(cls) -> HButtonBox: ... @@ -26411,6 +26725,7 @@ class HPaned(Paned, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated("Use gtk_paned_new() with %GTK_ORIENTATION_HORIZONTAL instead") @classmethod def new(cls) -> HPaned: ... @@ -27019,8 +27334,12 @@ class HScale(Scale, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated("Use gtk_scale_new() with %GTK_ORIENTATION_HORIZONTAL instead") @classmethod def new(cls, adjustment: Optional[Adjustment] = None) -> HScale: ... + @deprecated( + "Use gtk_scale_new_with_range() with %GTK_ORIENTATION_HORIZONTAL instead" + ) @classmethod def new_with_range(cls, min: float, max: float, step: float) -> HScale: ... @@ -27324,6 +27643,7 @@ class HScrollbar(Scrollbar, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated("Use gtk_scrollbar_new() with %GTK_ORIENTATION_HORIZONTAL instead") @classmethod def new(cls, adjustment: Optional[Adjustment] = None) -> HScrollbar: ... @@ -27587,6 +27907,7 @@ class HSeparator(Separator, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated("Use gtk_separator_new() with %GTK_ORIENTATION_HORIZONTAL instead") @classmethod def new(cls) -> HSeparator: ... @@ -27896,14 +28217,22 @@ class HandleBox(Bin, Atk.ImplementorIface, Buildable): ): ... def do_child_attached(self, child: Widget) -> None: ... def do_child_detached(self, child: Widget) -> None: ... + @deprecated("#GtkHandleBox has been deprecated.") def get_child_detached(self) -> bool: ... + @deprecated("#GtkHandleBox has been deprecated.") def get_handle_position(self) -> PositionType: ... + @deprecated("#GtkHandleBox has been deprecated.") def get_shadow_type(self) -> ShadowType: ... + @deprecated("#GtkHandleBox has been deprecated.") def get_snap_edge(self) -> PositionType: ... + @deprecated("#GtkHandleBox has been deprecated.") @classmethod def new(cls) -> HandleBox: ... + @deprecated("#GtkHandleBox has been deprecated.") def set_handle_position(self, position: PositionType) -> None: ... + @deprecated("#GtkHandleBox has been deprecated.") def set_shadow_type(self, type: ShadowType) -> None: ... + @deprecated("#GtkHandleBox has been deprecated.") def set_snap_edge(self, edge: PositionType) -> None: ... class HandleBoxClass(GObject.GPointer): @@ -28585,6 +28914,9 @@ class IMMulticontext(IMContext): def __init__( self, input_hints: InputHints = ..., input_purpose: InputPurpose = ... ): ... + @deprecated( + "It is better to use the system-wide input method framework for changing input methods. Modern desktop shells offer on-screen displays for this that can triggered with a keyboard shortcut, e.g. Super-Space." + ) def append_menuitems(self, menushell: MenuShell) -> None: ... def get_context_id(self) -> str: ... @classmethod @@ -28625,13 +28957,19 @@ class IconFactory(GObject.Object, Buildable): parent_instance: GObject.Object = ... priv: IconFactoryPrivate = ... + @deprecated("Use #GtkIconTheme instead.") def add(self, stock_id: str, icon_set: IconSet) -> None: ... + @deprecated("Use #GtkIconTheme instead.") def add_default(self) -> None: ... + @deprecated("Use #GtkIconTheme instead.") def lookup(self, stock_id: str) -> IconSet: ... + @deprecated("Use #GtkIconTheme instead.") @staticmethod def lookup_default(stock_id: str) -> IconSet: ... + @deprecated("Use #GtkIconTheme instead.") @classmethod def new(cls) -> IconFactory: ... + @deprecated("Use #GtkIconTheme instead.") def remove_default(self) -> None: ... class IconFactoryClass(GObject.GPointer): @@ -28666,11 +29004,17 @@ class IconInfo(GObject.Object): notify (GParam) """ + @deprecated("Attachment points are deprecated") def get_attach_points(self) -> Tuple[bool, list[Gdk.Point]]: ... def get_base_scale(self) -> int: ... def get_base_size(self) -> int: ... + @deprecated( + "This function is deprecated, use gtk_icon_theme_add_resource_path() instead of builtin icons." + ) def get_builtin_pixbuf(self) -> Optional[GdkPixbuf.Pixbuf]: ... + @deprecated("Display names are deprecated") def get_display_name(self) -> str: ... + @deprecated("Embedded rectangles are deprecated") def get_embedded_rect(self) -> Tuple[bool, Gdk.Rectangle]: ... def get_filename(self) -> Optional[str]: ... def is_symbolic(self) -> bool: ... @@ -28719,6 +29063,7 @@ class IconInfo(GObject.Object): def load_symbolic_for_context_finish( self, res: Gio.AsyncResult ) -> Tuple[GdkPixbuf.Pixbuf, bool]: ... + @deprecated("Use gtk_icon_info_load_symbolic_for_context() instead") def load_symbolic_for_style( self, style: Style, state: StateType ) -> Tuple[GdkPixbuf.Pixbuf, bool]: ... @@ -28726,6 +29071,7 @@ class IconInfo(GObject.Object): def new_for_pixbuf( cls, icon_theme: IconTheme, pixbuf: GdkPixbuf.Pixbuf ) -> IconInfo: ... + @deprecated("Embedded rectangles and attachment points are deprecated") def set_raw_coordinates(self, raw_coordinates: bool) -> None: ... class IconInfoClass(GObject.GPointer): ... @@ -28740,14 +29086,21 @@ class IconSet(GObject.GBoxed): new_from_pixbuf(pixbuf:GdkPixbuf.Pixbuf) -> Gtk.IconSet """ + @deprecated("Use #GtkIconTheme instead.") def add_source(self, source: IconSource) -> None: ... + @deprecated("Use #GtkIconTheme instead.") def copy(self) -> IconSet: ... + @deprecated("Use #GtkIconTheme instead.") def get_sizes(self) -> list[int]: ... + @deprecated("Use #GtkIconTheme instead.") @classmethod def new(cls) -> IconSet: ... + @deprecated("Use #GtkIconTheme instead.") @classmethod def new_from_pixbuf(cls, pixbuf: GdkPixbuf.Pixbuf) -> IconSet: ... + @deprecated("Use #GtkIconTheme instead.") def ref(self) -> IconSet: ... + @deprecated("Use gtk_icon_set_render_icon_pixbuf() instead") def render_icon( self, style: Optional[Style], @@ -28757,9 +29110,11 @@ class IconSet(GObject.GBoxed): widget: Optional[Widget] = None, detail: Optional[str] = None, ) -> GdkPixbuf.Pixbuf: ... + @deprecated("Use #GtkIconTheme instead.") def render_icon_pixbuf( self, context: StyleContext, size: int ) -> GdkPixbuf.Pixbuf: ... + @deprecated("Use #GtkIconTheme instead.") def render_icon_surface( self, context: StyleContext, @@ -28767,6 +29122,7 @@ class IconSet(GObject.GBoxed): scale: int, for_window: Optional[Gdk.Window] = None, ) -> cairo.Surface: ... + @deprecated("Use #GtkIconTheme instead.") def unref(self) -> None: ... class IconSource(GObject.GBoxed): @@ -28778,27 +29134,48 @@ class IconSource(GObject.GBoxed): new() -> Gtk.IconSource """ + @deprecated("Use #GtkIconTheme instead.") def copy(self) -> IconSource: ... + @deprecated("Use #GtkIconTheme instead.") def free(self) -> None: ... + @deprecated("Use #GtkIconTheme instead.") def get_direction(self) -> TextDirection: ... + @deprecated("Use #GtkIconTheme instead.") def get_direction_wildcarded(self) -> bool: ... + @deprecated("Use #GtkIconTheme instead.") def get_filename(self) -> str: ... + @deprecated("Use #GtkIconTheme instead.") def get_icon_name(self) -> str: ... + @deprecated("Use #GtkIconTheme instead.") def get_pixbuf(self) -> GdkPixbuf.Pixbuf: ... + @deprecated("Use #GtkIconTheme instead.") def get_size(self) -> int: ... + @deprecated("Use #GtkIconTheme instead.") def get_size_wildcarded(self) -> bool: ... + @deprecated("Use #GtkIconTheme instead.") def get_state(self) -> StateType: ... + @deprecated("Use #GtkIconTheme instead.") def get_state_wildcarded(self) -> bool: ... + @deprecated("Use #GtkIconTheme instead.") @classmethod def new(cls) -> IconSource: ... + @deprecated("Use #GtkIconTheme instead.") def set_direction(self, direction: TextDirection) -> None: ... + @deprecated("Use #GtkIconTheme instead.") def set_direction_wildcarded(self, setting: bool) -> None: ... + @deprecated("Use #GtkIconTheme instead.") def set_filename(self, filename: str) -> None: ... + @deprecated("Use #GtkIconTheme instead.") def set_icon_name(self, icon_name: Optional[str] = None) -> None: ... + @deprecated("Use #GtkIconTheme instead.") def set_pixbuf(self, pixbuf: GdkPixbuf.Pixbuf) -> None: ... + @deprecated("Use #GtkIconTheme instead.") def set_size(self, size: int) -> None: ... + @deprecated("Use #GtkIconTheme instead.") def set_size_wildcarded(self, setting: bool) -> None: ... + @deprecated("Use #GtkIconTheme instead.") def set_state(self, state: StateType) -> None: ... + @deprecated("Use #GtkIconTheme instead.") def set_state_wildcarded(self, setting: bool) -> None: ... class IconTheme(GObject.Object): @@ -28821,6 +29198,9 @@ class IconTheme(GObject.Object): parent_instance: GObject.Object = ... priv: IconThemePrivate = ... + @deprecated( + "Use gtk_icon_theme_add_resource_path() to add application-specific icons to the icon theme." + ) @staticmethod def add_builtin_icon( icon_name: str, size: int, pixbuf: GdkPixbuf.Pixbuf @@ -29835,9 +30215,11 @@ class Image(Misc, Atk.ImplementorIface, Buildable): def get_animation(self) -> Optional[GdkPixbuf.PixbufAnimation]: ... def get_gicon(self) -> Tuple[Gio.Icon, int]: ... def get_icon_name(self) -> Tuple[str, int]: ... + @deprecated("Use gtk_image_get_icon_name() instead.") def get_icon_set(self) -> Tuple[IconSet, int]: ... def get_pixbuf(self) -> Optional[GdkPixbuf.Pixbuf]: ... def get_pixel_size(self) -> int: ... + @deprecated("Use gtk_image_get_icon_name() instead.") def get_stock(self) -> Tuple[str, int]: ... def get_storage_type(self) -> ImageType: ... @classmethod @@ -29850,12 +30232,14 @@ class Image(Misc, Atk.ImplementorIface, Buildable): def new_from_gicon(cls, icon: Gio.Icon, size: int) -> Image: ... @classmethod def new_from_icon_name(cls, icon_name: Optional[str], size: int) -> Image: ... + @deprecated("Use gtk_image_new_from_icon_name() instead.") @classmethod def new_from_icon_set(cls, icon_set: IconSet, size: int) -> Image: ... @classmethod def new_from_pixbuf(cls, pixbuf: Optional[GdkPixbuf.Pixbuf] = None) -> Image: ... @classmethod def new_from_resource(cls, resource_path: str) -> Image: ... + @deprecated("Use gtk_image_new_from_icon_name() instead.") @classmethod def new_from_stock(cls, stock_id: str, size: int) -> Image: ... @classmethod @@ -29864,9 +30248,11 @@ class Image(Misc, Atk.ImplementorIface, Buildable): def set_from_file(self, filename: Optional[str] = None) -> None: ... def set_from_gicon(self, icon: Gio.Icon, size: int) -> None: ... def set_from_icon_name(self, icon_name: Optional[str], size: int) -> None: ... + @deprecated("Use gtk_image_set_from_icon_name() instead.") def set_from_icon_set(self, icon_set: IconSet, size: int) -> None: ... def set_from_pixbuf(self, pixbuf: Optional[GdkPixbuf.Pixbuf] = None) -> None: ... def set_from_resource(self, resource_path: Optional[str] = None) -> None: ... + @deprecated("Use gtk_image_set_from_icon_name() instead.") def set_from_stock(self, stock_id: str, size: int) -> None: ... def set_from_surface(self, surface: Optional[cairo.Surface] = None) -> None: ... def set_pixel_size(self, pixel_size: int) -> None: ... @@ -30456,22 +30842,33 @@ class ImageMenuItem(MenuItem, Atk.ImplementorIface, Actionable, Activatable, Bui related_action: Action = ..., use_action_appearance: bool = ..., ): ... + @deprecated("This method is deprecated") def get_always_show_image(self) -> bool: ... + @deprecated("This method is deprecated") def get_image(self) -> Widget: ... + @deprecated("This method is deprecated") def get_use_stock(self) -> bool: ... + @deprecated("Use gtk_menu_item_new() instead.") @classmethod def new(cls) -> ImageMenuItem: ... + @deprecated("Use gtk_menu_item_new_with_mnemonic() instead.") @classmethod def new_from_stock( cls, stock_id: str, accel_group: Optional[AccelGroup] = None ) -> ImageMenuItem: ... + @deprecated("Use gtk_menu_item_new_with_label() instead.") @classmethod def new_with_label(cls, label: str) -> ImageMenuItem: ... + @deprecated("Use gtk_menu_item_new_with_mnemonic() instead.") @classmethod def new_with_mnemonic(cls, label: str) -> ImageMenuItem: ... + @deprecated("This method is deprecated") def set_accel_group(self, accel_group: AccelGroup) -> None: ... + @deprecated("This method is deprecated") def set_always_show_image(self, always_show: bool) -> None: ... + @deprecated("This method is deprecated") def set_image(self, image: Optional[Widget] = None) -> None: ... + @deprecated("This method is deprecated") def set_use_stock(self, use_stock: bool) -> None: ... class ImageMenuItemClass(GObject.GPointer): @@ -31966,8 +32363,10 @@ class Layout(Container, Atk.ImplementorIface, Buildable, Scrollable): vscroll_policy: ScrollablePolicy = ..., ): ... def get_bin_window(self) -> Gdk.Window: ... + @deprecated("Use gtk_scrollable_get_hadjustment()") def get_hadjustment(self) -> Adjustment: ... def get_size(self) -> Tuple[int, int]: ... + @deprecated("Use gtk_scrollable_get_vadjustment()") def get_vadjustment(self) -> Adjustment: ... def move(self, child_widget: Widget, x: int, y: int) -> None: ... @classmethod @@ -31977,8 +32376,10 @@ class Layout(Container, Atk.ImplementorIface, Buildable, Scrollable): vadjustment: Optional[Adjustment] = None, ) -> Layout: ... def put(self, child_widget: Widget, x: int, y: int) -> None: ... + @deprecated("Use gtk_scrollable_set_hadjustment()") def set_hadjustment(self, adjustment: Optional[Adjustment] = None) -> None: ... def set_size(self, width: int, height: int) -> None: ... + @deprecated("Use gtk_scrollable_set_vadjustment()") def set_vadjustment(self, adjustment: Optional[Adjustment] = None) -> None: ... class LayoutClass(GObject.GPointer): @@ -34766,7 +35167,9 @@ class Menu(MenuShell, Atk.ImplementorIface, Buildable): def get_for_attach_widget(widget: Widget) -> list[Widget]: ... def get_monitor(self) -> int: ... def get_reserve_toggle_size(self) -> bool: ... + @deprecated("This method is deprecated") def get_tearoff_state(self) -> bool: ... + @deprecated("This method is deprecated") def get_title(self) -> str: ... @classmethod def new(cls) -> Menu: ... @@ -34800,6 +35203,9 @@ class Menu(MenuShell, Atk.ImplementorIface, Buildable): menu_anchor: Gdk.Gravity, trigger_event: Optional[Gdk.Event] = None, ) -> None: ... + @deprecated( + "Please use gtk_menu_popup_at_widget(), gtk_menu_popup_at_pointer(). or gtk_menu_popup_at_rect() instead" + ) def popup_for_device( self, device: Optional[Gdk.Device], @@ -34818,7 +35224,9 @@ class Menu(MenuShell, Atk.ImplementorIface, Buildable): def set_monitor(self, monitor_num: int) -> None: ... def set_reserve_toggle_size(self, reserve_toggle_size: bool) -> None: ... def set_screen(self, screen: Optional[Gdk.Screen] = None) -> None: ... + @deprecated("This method is deprecated") def set_tearoff_state(self, torn_off: bool) -> None: ... + @deprecated("This method is deprecated") def set_title(self, title: Optional[str] = None) -> None: ... class MenuAccessible(MenuShellAccessible, Atk.Component, Atk.Selection): @@ -36132,6 +36540,7 @@ class MenuItem(Bin, Atk.ImplementorIface, Actionable, Activatable, Buildable): def get_accel_path(self) -> Optional[str]: ... def get_label(self) -> str: ... def get_reserve_indicator(self) -> bool: ... + @deprecated("See gtk_menu_item_set_right_justified()") def get_right_justified(self) -> bool: ... def get_submenu(self) -> Optional[Widget]: ... def get_use_underline(self) -> bool: ... @@ -36145,6 +36554,9 @@ class MenuItem(Bin, Atk.ImplementorIface, Actionable, Activatable, Buildable): def set_accel_path(self, accel_path: Optional[str] = None) -> None: ... def set_label(self, label: str) -> None: ... def set_reserve_indicator(self, reserve: bool) -> None: ... + @deprecated( + "If you insist on using it, use gtk_widget_set_hexpand() and gtk_widget_set_halign()." + ) def set_right_justified(self, right_justified: bool) -> None: ... def set_submenu(self, submenu: Optional[Menu] = None) -> None: ... def set_use_underline(self, setting: bool) -> None: ... @@ -37102,6 +37514,7 @@ class MenuToolButton( def new( cls, icon_widget: Optional[Widget] = None, label: Optional[str] = None ) -> MenuToolButton: ... + @deprecated("Use gtk_menu_tool_button_new() instead.") @classmethod def new_from_stock(cls, stock_id: str) -> MenuToolButton: ... def set_arrow_tooltip_markup(self, markup: str) -> None: ... @@ -37577,8 +37990,10 @@ class MessageDialog(Dialog, Atk.ImplementorIface, Buildable): def format_secondary_markup(self, message_format: str) -> None: ... # override def format_secondary_text(self, message_format: str) -> None: ... + @deprecated("Use #GtkDialog for dialogs with images") def get_image(self) -> Widget: ... def get_message_area(self) -> Widget: ... + @deprecated("Use #GtkDialog to create dialogs with images") def set_image(self, image: Widget) -> None: ... def set_markup(self, str: str) -> None: ... @@ -37864,9 +38279,15 @@ class Misc(Widget, Atk.ImplementorIface, Buildable): visible: bool = ..., width_request: int = ..., ): ... + @deprecated("Use #GtkWidget alignment and margin properties.") def get_alignment(self) -> Tuple[float, float]: ... + @deprecated("Use #GtkWidget alignment and margin properties.") def get_padding(self) -> Tuple[int, int]: ... + @deprecated( + "Use #GtkWidget's alignment (#GtkWidget:halign and #GtkWidget:valign) and margin properties or #GtkLabel's #GtkLabel:xalign and #GtkLabel:yalign properties." + ) def set_alignment(self, xalign: float, yalign: float) -> None: ... + @deprecated("Use #GtkWidget alignment and margin properties.") def set_padding(self, xpad: int, ypad: int) -> None: ... class MiscClass(GObject.GPointer): @@ -38768,11 +39189,13 @@ class Notebook(Container, Atk.ImplementorIface, Buildable): def get_show_border(self) -> bool: ... def get_show_tabs(self) -> bool: ... def get_tab_detachable(self, child: Widget) -> bool: ... + @deprecated("this function returns zero") def get_tab_hborder(self) -> int: ... def get_tab_label(self, child: Widget) -> Optional[Widget]: ... def get_tab_label_text(self, child: Widget) -> Optional[str]: ... def get_tab_pos(self) -> PositionType: ... def get_tab_reorderable(self, child: Widget) -> bool: ... + @deprecated("this function returns zero") def get_tab_vborder(self) -> int: ... def insert_page( self, child: Widget, tab_label: Optional[Widget], position: int @@ -39135,21 +39558,33 @@ class NumerableIcon(Gio.EmblemedIcon, Gio.Icon): style_context: StyleContext = ..., gicon: Gio.Icon = ..., ): ... + @deprecated("This method is deprecated") def get_background_gicon(self) -> Optional[Gio.Icon]: ... + @deprecated("This method is deprecated") def get_background_icon_name(self) -> Optional[str]: ... + @deprecated("This method is deprecated") def get_count(self) -> int: ... + @deprecated("This method is deprecated") def get_label(self) -> Optional[str]: ... + @deprecated("This method is deprecated") def get_style_context(self) -> Optional[StyleContext]: ... + @deprecated("This method is deprecated") @staticmethod def new(base_icon: Gio.Icon) -> Gio.Icon: ... + @deprecated("This method is deprecated") @staticmethod def new_with_style_context( base_icon: Gio.Icon, context: StyleContext ) -> Gio.Icon: ... + @deprecated("This method is deprecated") def set_background_gicon(self, icon: Optional[Gio.Icon] = None) -> None: ... + @deprecated("This method is deprecated") def set_background_icon_name(self, icon_name: Optional[str] = None) -> None: ... + @deprecated("This method is deprecated") def set_count(self, count: int) -> None: ... + @deprecated("This method is deprecated") def set_label(self, label: Optional[str] = None) -> None: ... + @deprecated("This method is deprecated") def set_style_context(self, style: StyleContext) -> None: ... class NumerableIconClass(GObject.GPointer): @@ -40968,6 +41403,9 @@ class PlacesSidebar(ScrolledWindow, Atk.ImplementorIface, Buildable): def get_location(self) -> Optional[Gio.File]: ... def get_nth_bookmark(self, n: int) -> Optional[Gio.File]: ... def get_open_flags(self) -> PlacesOpenFlags: ... + @deprecated( + "It is recommended to group this functionality with the drives and network location under the new 'Other Location' item" + ) def get_show_connect_to_server(self) -> bool: ... def get_show_desktop(self) -> bool: ... def get_show_enter_location(self) -> bool: ... @@ -40985,6 +41423,9 @@ class PlacesSidebar(ScrolledWindow, Atk.ImplementorIface, Buildable): def set_local_only(self, local_only: bool) -> None: ... def set_location(self, location: Optional[Gio.File] = None) -> None: ... def set_open_flags(self, flags: PlacesOpenFlags) -> None: ... + @deprecated( + "It is recommended to group this functionality with the drives and network location under the new 'Other Location' item" + ) def set_show_connect_to_server(self, show_connect_to_server: bool) -> None: ... def set_show_desktop(self, show_desktop: bool) -> None: ... def set_show_enter_location(self, show_enter_location: bool) -> None: ... @@ -41896,6 +42337,9 @@ class Popover(Bin, Atk.ImplementorIface, Buildable): def get_pointing_to(self) -> Tuple[bool, Gdk.Rectangle]: ... def get_position(self) -> PositionType: ... def get_relative_to(self) -> Widget: ... + @deprecated( + "You can show or hide the popover without transitions using gtk_widget_show() and gtk_widget_hide() while gtk_popover_popup() and gtk_popover_popdown() will use transitions." + ) def get_transitions_enabled(self) -> bool: ... @classmethod def new(cls, relative_to: Optional[Widget] = None) -> Popover: ... @@ -41911,6 +42355,9 @@ class Popover(Bin, Atk.ImplementorIface, Buildable): def set_pointing_to(self, rect: Gdk.Rectangle) -> None: ... def set_position(self, position: PositionType) -> None: ... def set_relative_to(self, relative_to: Optional[Widget] = None) -> None: ... + @deprecated( + "You can show or hide the popover without transitions using gtk_widget_show() and gtk_widget_hide() while gtk_popover_popup() and gtk_popover_popdown() will use transitions." + ) def set_transitions_enabled(self, transitions_enabled: bool) -> None: ... class PopoverAccessible(ContainerAccessible, Atk.Component): @@ -43290,9 +43737,13 @@ class RadioAction(ToggleAction, Buildable): visible_vertical: bool = ..., ): ... def do_changed(self, current: RadioAction) -> None: ... + @deprecated("This method is deprecated") def get_current_value(self) -> int: ... + @deprecated("This method is deprecated") def get_group(self) -> list[RadioAction]: ... + @deprecated("This method is deprecated") def join_group(self, group_source: Optional[RadioAction] = None) -> None: ... + @deprecated("This method is deprecated") @classmethod def new( cls, @@ -43302,7 +43753,9 @@ class RadioAction(ToggleAction, Buildable): stock_id: Optional[str], value: int, ) -> RadioAction: ... + @deprecated("This method is deprecated") def set_current_value(self, current_value: int) -> None: ... + @deprecated("This method is deprecated") def set_group(self, group: Optional[list[RadioAction]] = None) -> None: ... class RadioActionClass(GObject.GPointer): @@ -43321,6 +43774,7 @@ class RadioActionClass(GObject.GPointer): _gtk_reserved3: None = ... _gtk_reserved4: None = ... +@deprecated("This class is deprecated") class RadioActionEntry(GObject.GPointer): """ :Constructors: @@ -44731,6 +45185,7 @@ class RadioToolButton( def get_group(self) -> list[RadioButton]: ... @classmethod def new(cls, group: Optional[list[RadioButton]] = None) -> RadioToolButton: ... + @deprecated("Use gtk_radio_tool_button_new() instead.") @classmethod def new_from_stock( cls, group: Optional[list[RadioButton]], stock_id: str @@ -44739,6 +45194,7 @@ class RadioToolButton( def new_from_widget( cls, group: Optional[RadioToolButton] = None ) -> RadioToolButton: ... + @deprecated("gtk_radio_tool_button_new_from_widget") @classmethod def new_with_stock_from_widget( cls, group: Optional[RadioToolButton], stock_id: str @@ -45062,6 +45518,7 @@ class Range(Widget, Atk.ImplementorIface, Buildable, Orientable): def get_flippable(self) -> bool: ... def get_inverted(self) -> bool: ... def get_lower_stepper_sensitivity(self) -> SensitivityType: ... + @deprecated("Use the min-height/min-width CSS properties on the slider node.") def get_min_slider_size(self) -> int: ... def get_range_rect(self) -> Gdk.Rectangle: ... def get_restrict_to_fill_level(self) -> bool: ... @@ -45077,6 +45534,7 @@ class Range(Widget, Atk.ImplementorIface, Buildable, Orientable): def set_increments(self, step: float, page: float) -> None: ... def set_inverted(self, setting: bool) -> None: ... def set_lower_stepper_sensitivity(self, sensitivity: SensitivityType) -> None: ... + @deprecated("Use the min-height/min-width CSS properties on the slider node.") def set_min_slider_size(self, min_size: int) -> None: ... def set_range(self, min: float, max: float) -> None: ... def set_restrict_to_fill_level(self, restrict_to_fill_level: bool) -> None: ... @@ -45294,9 +45752,11 @@ class RcStyle(GObject.Object): rc_style_lists: list[None] = ... icon_factories: list[None] = ... engine_specified: int = ... + @deprecated("Use #GtkCssProvider instead.") def copy(self) -> RcStyle: ... def do_merge(self, src: RcStyle) -> None: ... def do_parse(self, settings: Settings, scanner: GLib.Scanner) -> int: ... + @deprecated("Use #GtkCssProvider instead.") @classmethod def new(cls) -> RcStyle: ... @@ -45441,7 +45901,9 @@ class RecentAction(Action, Buildable, RecentChooser): show_tips: bool = ..., sort_type: RecentSortType = ..., ): ... + @deprecated("This method is deprecated") def get_show_numbers(self) -> bool: ... + @deprecated("This method is deprecated") @classmethod def new( cls, @@ -45450,6 +45912,7 @@ class RecentAction(Action, Buildable, RecentChooser): tooltip: Optional[str] = None, stock_id: Optional[str] = None, ) -> RecentAction: ... + @deprecated("This method is deprecated") @classmethod def new_for_manager( cls, @@ -45459,6 +45922,7 @@ class RecentAction(Action, Buildable, RecentChooser): stock_id: Optional[str] = None, manager: Optional[RecentManager] = None, ) -> RecentAction: ... + @deprecated("This method is deprecated") def set_show_numbers(self, show_numbers: bool) -> None: ... class RecentActionClass(GObject.GPointer): @@ -49021,6 +49485,9 @@ class ScrolledWindow(Bin, Atk.ImplementorIface, Buildable): visible: bool = ..., width_request: int = ..., ): ... + @deprecated( + "gtk_container_add() will automatically adda #GtkViewport if the child doesn’t implement #GtkScrollable." + ) def add_with_viewport(self, child: Widget) -> None: ... def do_move_focus_out(self, direction: DirectionType) -> None: ... def do_scroll_child(self, scroll: ScrollType, horizontal: bool) -> bool: ... @@ -51321,17 +51788,23 @@ class Settings(GObject.Object, StyleProvider): def get_default() -> Optional[Settings]: ... @staticmethod def get_for_screen(screen: Gdk.Screen) -> Settings: ... + @deprecated("This function is not useful outside GTK+.") @staticmethod def install_property(pspec: GObject.ParamSpec) -> None: ... + @deprecated("This function is not useful outside GTK+.") @staticmethod def install_property_parser( pspec: GObject.ParamSpec, parser: Callable[[GObject.ParamSpec, GLib.String, Any], bool], ) -> None: ... def reset_property(self, name: str) -> None: ... + @deprecated("Use g_object_set() instead.") def set_double_property(self, name: str, v_double: float, origin: str) -> None: ... + @deprecated("Use g_object_set() instead.") def set_long_property(self, name: str, v_long: int, origin: str) -> None: ... + @deprecated("Use g_object_set() instead.") def set_property_value(self, name: str, svalue: SettingsValue) -> None: ... + @deprecated("Use g_object_set() instead.") def set_string_property(self, name: str, v_string: str, origin: str) -> None: ... class SettingsClass(GObject.GPointer): @@ -53066,12 +53539,18 @@ class SizeGroup(GObject.Object, Buildable): priv: SizeGroupPrivate = ... def __init__(self, ignore_hidden: bool = ..., mode: SizeGroupMode = ...): ... def add_widget(self, widget: Widget) -> None: ... + @deprecated( + "Measuring the size of hidden widgets has not worked reliably for a long time. In most cases, they will report a size of 0 nowadays, and thus, their size will not affect the other size group members. In effect, size groups will always operate as if this property was %TRUE. Use a #GtkStack instead to hide widgets while still having their size taken into account." + ) def get_ignore_hidden(self) -> bool: ... def get_mode(self) -> SizeGroupMode: ... def get_widgets(self) -> list[Widget]: ... @classmethod def new(cls, mode: SizeGroupMode) -> SizeGroup: ... def remove_widget(self, widget: Widget) -> None: ... + @deprecated( + "Measuring the size of hidden widgets has not worked reliably for a long time. In most cases, they will report a size of 0 nowadays, and thus, their size will not affect the other size group members. In effect, size groups will always operate as if this property was %TRUE. Use a #GtkStack instead to hide widgets while still having their size taken into account." + ) def set_ignore_hidden(self, ignore_hidden: bool) -> None: ... def set_mode(self, mode: SizeGroupMode) -> None: ... @@ -55799,46 +56278,144 @@ class StatusIcon(GObject.Object): ) -> bool: ... def do_scroll_event(self, event: Gdk.EventScroll) -> bool: ... def do_size_changed(self, size: int) -> bool: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as the platform is responsible for the presentation of notifications" + ) def get_geometry(self) -> Tuple[bool, Gdk.Screen, Gdk.Rectangle, Orientation]: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function" + ) def get_gicon(self) -> Optional[Gio.Icon]: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function" + ) def get_has_tooltip(self) -> bool: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function" + ) def get_icon_name(self) -> Optional[str]: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function" + ) def get_pixbuf(self) -> Optional[GdkPixbuf.Pixbuf]: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as notifications are managed by the platform" + ) def get_screen(self) -> Gdk.Screen: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as the representation of a notification is left to the platform" + ) def get_size(self) -> int: ... + @deprecated("Use gtk_status_icon_get_icon_name() instead.") def get_stock(self) -> Optional[str]: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, and #GNotification only supports #GIcon instances" + ) def get_storage_type(self) -> ImageType: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function" + ) def get_title(self) -> str: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function" + ) def get_tooltip_markup(self) -> Optional[str]: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function" + ) def get_tooltip_text(self) -> Optional[str]: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function" + ) def get_visible(self) -> bool: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function" + ) def get_x11_window_id(self) -> int: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function" + ) def is_embedded(self) -> bool: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications" + ) @classmethod def new(cls) -> StatusIcon: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications" + ) @classmethod def new_from_file(cls, filename: str) -> StatusIcon: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications" + ) @classmethod def new_from_gicon(cls, icon: Gio.Icon) -> StatusIcon: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications" + ) @classmethod def new_from_icon_name(cls, icon_name: str) -> StatusIcon: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications" + ) @classmethod def new_from_pixbuf(cls, pixbuf: GdkPixbuf.Pixbuf) -> StatusIcon: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications" + ) @classmethod def new_from_stock(cls, stock_id: str) -> StatusIcon: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; notifications do not have menus, but can have buttons, and actions associated with each button" + ) @staticmethod def position_menu(menu: Menu, user_data: StatusIcon) -> Tuple[int, int, bool]: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; you can use g_notification_set_icon() to associate a #GIcon with a notification" + ) def set_from_file(self, filename: str) -> None: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; you can use g_notification_set_icon() to associate a #GIcon with a notification" + ) def set_from_gicon(self, icon: Gio.Icon) -> None: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; you can use g_notification_set_icon() to associate a #GIcon with a notification" + ) def set_from_icon_name(self, icon_name: str) -> None: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; you can use g_notification_set_icon() to associate a #GIcon with a notification" + ) def set_from_pixbuf(self, pixbuf: Optional[GdkPixbuf.Pixbuf] = None) -> None: ... + @deprecated("Use gtk_status_icon_set_from_icon_name() instead.") def set_from_stock(self, stock_id: str) -> None: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, but notifications can display an arbitrary amount of text using g_notification_set_body()" + ) def set_has_tooltip(self, has_tooltip: bool) -> None: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as notifications are associated with a unique application identifier by #GApplication" + ) def set_name(self, name: str) -> None: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as GTK typically only has one #GdkScreen and notifications are managed by the platform" + ) def set_screen(self, screen: Gdk.Screen) -> None: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; you should use g_notification_set_title() and g_notification_set_body() to present text inside your notification" + ) def set_title(self, title: str) -> None: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function" + ) def set_tooltip_markup(self, markup: Optional[str] = None) -> None: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function" + ) def set_tooltip_text(self, text: str) -> None: ... + @deprecated( + "Use #GNotification and #GtkApplication to provide status notifications; there is no direct replacement for this function, as notifications are managed by the platform" + ) def set_visible(self, visible: bool) -> None: ... class StatusIconClass(GObject.GPointer): @@ -56303,6 +56880,7 @@ class StatusbarClass(GObject.GPointer): class StatusbarPrivate(GObject.GPointer): ... +@deprecated("This class is deprecated") class StockItem(GObject.GPointer): """ :Constructors: @@ -56317,6 +56895,7 @@ class StockItem(GObject.GPointer): modifier: Gdk.ModifierType = ... keyval: int = ... translation_domain: str = ... + @deprecated("This method is deprecated") def free(self) -> None: ... class Style(GObject.Object): @@ -56368,6 +56947,7 @@ class Style(GObject.Object): property_cache: list[None] = ... icon_factories: list[None] = ... def __init__(self, context: StyleContext = ...): ... + @deprecated("Use #GtkStyleContext instead") def apply_default_background( self, cr: cairo.Context[_SomeSurface], @@ -56378,7 +56958,9 @@ class Style(GObject.Object): width: int, height: int, ) -> None: ... + @deprecated("Use #GtkStyleContext instead") def copy(self) -> Style: ... + @deprecated("Use #GtkStyleContext instead") def detach(self) -> None: ... def do_copy(self, src: Style) -> None: ... def do_draw_arrow( @@ -56639,10 +57221,14 @@ class Style(GObject.Object): def do_unrealize(self) -> None: ... def get_style_property(self, widget_type: Type, property_name: str) -> Any: ... def has_context(self) -> bool: ... + @deprecated("Use gtk_style_context_lookup_color() instead") def lookup_color(self, color_name: str) -> Tuple[bool, Gdk.Color]: ... + @deprecated("Use gtk_style_context_lookup_icon_set() instead") def lookup_icon_set(self, stock_id: str) -> IconSet: ... + @deprecated("Use #GtkStyleContext") @classmethod def new(cls) -> Style: ... + @deprecated("Use gtk_render_icon_pixbuf() instead") def render_icon( self, source: IconSource, @@ -56652,6 +57238,7 @@ class Style(GObject.Object): widget: Optional[Widget] = None, detail: Optional[str] = None, ) -> GdkPixbuf.Pixbuf: ... + @deprecated("Use gtk_style_context_set_background() instead") def set_background(self, window: Gdk.Window, state_type: StateType) -> None: ... class StyleClass(GObject.GPointer): @@ -57028,14 +57615,22 @@ class StyleContext(GObject.Object): def add_provider_for_screen( screen: Gdk.Screen, provider: StyleProvider, priority: int ) -> None: ... + @deprecated("This method is deprecated") def add_region(self, region_name: str, flags: RegionFlags) -> None: ... + @deprecated("This function does nothing.") def cancel_animations(self, region_id: None) -> None: ... def do_changed(self) -> None: ... + @deprecated("Use gtk_render_background() instead.") def get_background_color(self, state: StateFlags) -> Gdk.RGBA: ... def get_border(self, state: StateFlags) -> Border: ... + @deprecated("Use gtk_render_frame() instead.") def get_border_color(self, state: StateFlags) -> Gdk.RGBA: ... def get_color(self, state: StateFlags) -> Gdk.RGBA: ... + @deprecated( + "Use gtk_style_context_get_state() and check for #GTK_STATE_FLAG_DIR_LTR and #GTK_STATE_FLAG_DIR_RTL instead." + ) def get_direction(self) -> TextDirection: ... + @deprecated('Use gtk_style_context_get() for "font" or subproperties instead.') def get_font(self, state: StateFlags) -> Pango.FontDescription: ... def get_frame_clock(self) -> Optional[Gdk.FrameClock]: ... def get_junction_sides(self) -> JunctionSides: ... @@ -57050,18 +57645,25 @@ class StyleContext(GObject.Object): def get_state(self) -> StateFlags: ... def get_style_property(self, property_name: str, value: Any) -> None: ... def has_class(self, class_name: str) -> bool: ... + @deprecated("This method is deprecated") def has_region(self, region_name: str) -> Tuple[bool, RegionFlags]: ... + @deprecated("Style contexts are invalidated automatically.") def invalidate(self) -> None: ... def list_classes(self) -> list[str]: ... + @deprecated("This method is deprecated") def list_regions(self) -> list[str]: ... def lookup_color(self, color_name: str) -> Tuple[bool, Gdk.RGBA]: ... + @deprecated("Use gtk_icon_theme_lookup_icon() instead.") def lookup_icon_set(self, stock_id: str) -> Optional[IconSet]: ... @classmethod def new(cls) -> StyleContext: ... + @deprecated("This function does nothing.") def notify_state_change( self, window: Gdk.Window, region_id: None, state: StateType, state_value: bool ) -> None: ... + @deprecated("This function does nothing.") def pop_animatable_region(self) -> None: ... + @deprecated("This function does nothing.") def push_animatable_region(self, region_id: None) -> None: ... def remove_class(self, class_name: str) -> None: ... def remove_provider(self, provider: StyleProvider) -> None: ... @@ -57069,13 +57671,21 @@ class StyleContext(GObject.Object): def remove_provider_for_screen( screen: Gdk.Screen, provider: StyleProvider ) -> None: ... + @deprecated("This method is deprecated") def remove_region(self, region_name: str) -> None: ... @staticmethod def reset_widgets(screen: Gdk.Screen) -> None: ... def restore(self) -> None: ... def save(self) -> None: ... + @deprecated("This function does nothing.") def scroll_animations(self, window: Gdk.Window, dx: int, dy: int) -> None: ... + @deprecated( + "Use gtk_render_background() instead. Note that clients still using this function are now responsible for calling this function again whenever @context is invalidated." + ) def set_background(self, window: Gdk.Window) -> None: ... + @deprecated( + "Use gtk_style_context_set_state() with #GTK_STATE_FLAG_DIR_LTR and #GTK_STATE_FLAG_DIR_RTL instead." + ) def set_direction(self, direction: TextDirection) -> None: ... def set_frame_clock(self, frame_clock: Gdk.FrameClock) -> None: ... def set_junction_sides(self, sides: JunctionSides) -> None: ... @@ -57084,6 +57694,7 @@ class StyleContext(GObject.Object): def set_scale(self, scale: int) -> None: ... def set_screen(self, screen: Gdk.Screen) -> None: ... def set_state(self, flags: StateFlags) -> None: ... + @deprecated("This function always returns %FALSE") def state_is_running(self, state: StateType) -> Tuple[bool, float]: ... def to_string(self, flags: StyleContextPrintFlags) -> str: ... @@ -57125,14 +57736,22 @@ class StyleProperties(GObject.Object, StyleProvider): parent_object: GObject.Object = ... priv: StylePropertiesPrivate = ... + @deprecated("#GtkStyleProperties are deprecated.") def clear(self) -> None: ... + @deprecated("#GtkStyleProperties are deprecated.") def get_property(self, property: str, state: StateFlags) -> Tuple[bool, Any]: ... + @deprecated("#GtkSymbolicColor is deprecated.") def lookup_color(self, name: str) -> SymbolicColor: ... + @deprecated("#GtkSymbolicColor is deprecated.") def map_color(self, name: str, color: SymbolicColor) -> None: ... + @deprecated("#GtkStyleProperties are deprecated.") def merge(self, props_to_merge: StyleProperties, replace: bool) -> None: ... + @deprecated("#GtkStyleProperties are deprecated.") @classmethod def new(cls) -> StyleProperties: ... + @deprecated("#GtkStyleProperties are deprecated.") def set_property(self, property: str, state: StateFlags, value: Any) -> None: ... + @deprecated("#GtkStyleProperties are deprecated.") def unset_property(self, property: str, state: StateFlags) -> None: ... class StylePropertiesClass(GObject.GPointer): @@ -57157,7 +57776,11 @@ class StyleProvider(GObject.GInterface): Interface GtkStyleProvider """ + @deprecated("Will always return %NULL for all GTK-provided style providers.") def get_icon_factory(self, path: WidgetPath) -> Optional[IconFactory]: ... + @deprecated( + "Will always return %NULL for all GTK-provided style providers as the interface cannot correctly work the way CSS is specified." + ) def get_style(self, path: WidgetPath) -> Optional[StyleProperties]: ... def get_style_property( self, path: WidgetPath, state: StateFlags, pspec: GObject.ParamSpec @@ -57608,25 +58231,35 @@ class SymbolicColor(GObject.GBoxed): new_win32(theme_class:str, id:int) -> Gtk.SymbolicColor """ + @deprecated("#GtkSymbolicColor is deprecated.") @classmethod def new_alpha(cls, color: SymbolicColor, factor: float) -> SymbolicColor: ... + @deprecated("#GtkSymbolicColor is deprecated.") @classmethod def new_literal(cls, color: Gdk.RGBA) -> SymbolicColor: ... + @deprecated("#GtkSymbolicColor is deprecated.") @classmethod def new_mix( cls, color1: SymbolicColor, color2: SymbolicColor, factor: float ) -> SymbolicColor: ... + @deprecated("#GtkSymbolicColor is deprecated.") @classmethod def new_name(cls, name: str) -> SymbolicColor: ... + @deprecated("#GtkSymbolicColor is deprecated.") @classmethod def new_shade(cls, color: SymbolicColor, factor: float) -> SymbolicColor: ... + @deprecated("#GtkSymbolicColor is deprecated.") @classmethod def new_win32(cls, theme_class: str, id: int) -> SymbolicColor: ... + @deprecated("#GtkSymbolicColor is deprecated.") def ref(self) -> SymbolicColor: ... + @deprecated("#GtkSymbolicColor is deprecated.") def resolve( self, props: Optional[StyleProperties] = None ) -> Tuple[bool, Gdk.RGBA]: ... + @deprecated("#GtkSymbolicColor is deprecated.") def to_string(self) -> str: ... + @deprecated("#GtkSymbolicColor is deprecated.") def unref(self) -> None: ... class Table(Container, Atk.ImplementorIface, Buildable): @@ -57932,6 +58565,9 @@ class Table(Container, Atk.ImplementorIface, Buildable): xpadding: int, ypadding: int, ): ... + @deprecated( + "Use gtk_grid_attach() with #GtkGrid. Note that the attach arguments differ between those two functions." + ) def attach_defaults( self, widget: Widget, @@ -57940,19 +58576,40 @@ class Table(Container, Atk.ImplementorIface, Buildable): top_attach: int, bottom_attach: int, ) -> None: ... + @deprecated("#GtkGrid does not offer a replacement for this functionality.") def get_col_spacing(self, column: int) -> int: ... + @deprecated("Use gtk_grid_get_column_spacing() with #GtkGrid.") def get_default_col_spacing(self) -> int: ... + @deprecated("Use gtk_grid_get_row_spacing() with #GtkGrid.") def get_default_row_spacing(self) -> int: ... + @deprecated( + "Use gtk_grid_get_row_homogeneous() and gtk_grid_get_column_homogeneous() with #GtkGrid." + ) def get_homogeneous(self) -> bool: ... + @deprecated("#GtkGrid does not offer a replacement for this functionality.") def get_row_spacing(self, row: int) -> int: ... + @deprecated("#GtkGrid does not expose the number of columns and rows.") def get_size(self) -> Tuple[int, int]: ... + @deprecated("Use gtk_grid_new().") @classmethod def new(cls, rows: int, columns: int, homogeneous: bool) -> Table: ... + @deprecated("#GtkGrid resizes automatically.") def resize(self, rows: int, columns: int) -> None: ... + @deprecated( + "Use gtk_widget_set_margin_start() and gtk_widget_set_margin_end() on the widgets contained in the row if you need this functionality. #GtkGrid does not support per-row spacing." + ) def set_col_spacing(self, column: int, spacing: int) -> None: ... + @deprecated("Use gtk_grid_set_column_spacing() with #GtkGrid.") def set_col_spacings(self, spacing: int) -> None: ... + @deprecated( + "Use gtk_grid_set_row_homogeneous() and gtk_grid_set_column_homogeneous() with #GtkGrid." + ) def set_homogeneous(self, homogeneous: bool) -> None: ... + @deprecated( + "Use gtk_widget_set_margin_top() and gtk_widget_set_margin_bottom() on the widgets contained in the row if you need this functionality. #GtkGrid does not support per-row spacing." + ) def set_row_spacing(self, row: int, spacing: int) -> None: ... + @deprecated("Use gtk_grid_set_row_spacing() with #GtkGrid.") def set_row_spacings(self, spacing: int) -> None: ... class TableChild(GObject.GPointer): @@ -58376,6 +59033,9 @@ class TearoffMenuItem( related_action: Action = ..., use_action_appearance: bool = ..., ): ... + @deprecated( + "#GtkTearoffMenuItem is deprecated and should not be used in newly written code." + ) @classmethod def new(cls) -> TearoffMenuItem: ... @@ -58928,6 +59588,7 @@ class TextIter(GObject.GBoxed): def backward_visible_word_starts(self, count: int) -> bool: ... def backward_word_start(self) -> bool: ... def backward_word_starts(self, count: int) -> bool: ... + @deprecated("Use gtk_text_iter_starts_tag() instead.") def begins_tag(self, tag: Optional[TextTag] = None) -> bool: ... def can_insert(self, default_editability: bool) -> bool: ... def compare(self, rhs: TextIter) -> int: ... @@ -59891,6 +60552,7 @@ class TextView(Container, Atk.ImplementorIface, Buildable, Scrollable): def get_cursor_visible(self) -> bool: ... def get_default_attributes(self) -> TextAttributes: ... def get_editable(self) -> bool: ... + @deprecated("Use gtk_scrollable_get_hadjustment()") def get_hadjustment(self) -> Adjustment: ... def get_indent(self) -> int: ... def get_input_hints(self) -> InputHints: ... @@ -59910,6 +60572,7 @@ class TextView(Container, Atk.ImplementorIface, Buildable, Scrollable): def get_right_margin(self) -> int: ... def get_tabs(self) -> Optional[Pango.TabArray]: ... def get_top_margin(self) -> int: ... + @deprecated("Use gtk_scrollable_get_vadjustment()") def get_vadjustment(self) -> Adjustment: ... def get_visible_rect(self) -> Gdk.Rectangle: ... def get_window(self, win: TextWindowType) -> Optional[Gdk.Window]: ... @@ -60287,25 +60950,46 @@ class ThemingEngine(GObject.Object): height: float, orientation: Orientation, ) -> None: ... + @deprecated("This method is deprecated") def get_background_color(self, state: StateFlags) -> Gdk.RGBA: ... + @deprecated("This method is deprecated") def get_border(self, state: StateFlags) -> Border: ... + @deprecated("This method is deprecated") def get_border_color(self, state: StateFlags) -> Gdk.RGBA: ... + @deprecated("This method is deprecated") def get_color(self, state: StateFlags) -> Gdk.RGBA: ... + @deprecated( + "Use gtk_theming_engine_get_state() and check for #GTK_STATE_FLAG_DIR_LTR and #GTK_STATE_FLAG_DIR_RTL instead." + ) def get_direction(self) -> TextDirection: ... + @deprecated("Use gtk_theming_engine_get()") def get_font(self, state: StateFlags) -> Pango.FontDescription: ... + @deprecated("This method is deprecated") def get_junction_sides(self) -> JunctionSides: ... + @deprecated("This method is deprecated") def get_margin(self, state: StateFlags) -> Border: ... + @deprecated("This method is deprecated") def get_padding(self, state: StateFlags) -> Border: ... + @deprecated("This method is deprecated") def get_path(self) -> WidgetPath: ... + @deprecated("This method is deprecated") def get_property(self, property: str, state: StateFlags) -> Any: ... + @deprecated("This method is deprecated") def get_screen(self) -> Optional[Gdk.Screen]: ... + @deprecated("This method is deprecated") def get_state(self) -> StateFlags: ... + @deprecated("This method is deprecated") def get_style_property(self, property_name: str) -> Any: ... + @deprecated("This method is deprecated") def has_class(self, style_class: str) -> bool: ... + @deprecated("This method is deprecated") def has_region(self, style_region: str) -> Tuple[bool, RegionFlags]: ... + @deprecated("This method is deprecated") @staticmethod def load(name: str) -> Optional[ThemingEngine]: ... + @deprecated("This method is deprecated") def lookup_color(self, color_name: str) -> Tuple[bool, Gdk.RGBA]: ... + @deprecated("Always returns %FALSE") def state_is_running(self, state: StateType) -> Tuple[bool, float]: ... class ThemingEngineClass(GObject.GPointer): @@ -60506,8 +61190,11 @@ class ToggleAction(Action, Buildable): visible_vertical: bool = ..., ): ... def do_toggled(self) -> None: ... + @deprecated("This method is deprecated") def get_active(self) -> bool: ... + @deprecated("This method is deprecated") def get_draw_as_radio(self) -> bool: ... + @deprecated("This method is deprecated") @classmethod def new( cls, @@ -60516,8 +61203,11 @@ class ToggleAction(Action, Buildable): tooltip: Optional[str] = None, stock_id: Optional[str] = None, ) -> ToggleAction: ... + @deprecated("This method is deprecated") def set_active(self, is_active: bool) -> None: ... + @deprecated("This method is deprecated") def set_draw_as_radio(self, draw_as_radio: bool) -> None: ... + @deprecated("This method is deprecated") def toggled(self) -> None: ... class ToggleActionClass(GObject.GPointer): @@ -60536,6 +61226,7 @@ class ToggleActionClass(GObject.GPointer): _gtk_reserved3: None = ... _gtk_reserved4: None = ... +@deprecated("This class is deprecated") class ToggleActionEntry(GObject.GPointer): """ :Constructors: @@ -61390,6 +62081,7 @@ class ToggleToolButton( def get_active(self) -> bool: ... @classmethod def new(cls) -> ToggleToolButton: ... + @deprecated("Use gtk_toggle_tool_button_new() instead.") @classmethod def new_from_stock(cls, stock_id: str) -> ToggleToolButton: ... def set_active(self, is_active: bool) -> None: ... @@ -61741,18 +62433,23 @@ class ToolButton(ToolItem, Atk.ImplementorIface, Actionable, Activatable, Builda def get_icon_widget(self) -> Optional[Widget]: ... def get_label(self) -> Optional[str]: ... def get_label_widget(self) -> Optional[Widget]: ... + @deprecated("Use gtk_tool_button_get_icon_name() instead.") def get_stock_id(self) -> str: ... def get_use_underline(self) -> bool: ... @classmethod def new( cls, icon_widget: Optional[Widget] = None, label: Optional[str] = None ) -> ToolButton: ... + @deprecated( + "Use gtk_tool_button_new() together withgtk_image_new_from_icon_name() instead." + ) @classmethod def new_from_stock(cls, stock_id: str) -> ToolButton: ... def set_icon_name(self, icon_name: Optional[str] = None) -> None: ... def set_icon_widget(self, icon_widget: Optional[Widget] = None) -> None: ... def set_label(self, label: Optional[str] = None) -> None: ... def set_label_widget(self, label_widget: Optional[Widget] = None) -> None: ... + @deprecated("Use gtk_tool_button_set_icon_name() instead.") def set_stock_id(self, stock_id: Optional[str] = None) -> None: ... def set_use_underline(self, use_underline: bool) -> None: ... @@ -62752,9 +63449,11 @@ class ToolPalette(Container, Atk.ImplementorIface, Buildable, Orientable, Scroll def get_exclusive(self, group: ToolItemGroup) -> bool: ... def get_expand(self, group: ToolItemGroup) -> bool: ... def get_group_position(self, group: ToolItemGroup) -> int: ... + @deprecated("Use gtk_scrollable_get_hadjustment()") def get_hadjustment(self) -> Adjustment: ... def get_icon_size(self) -> int: ... def get_style(self) -> ToolbarStyle: ... + @deprecated("Use gtk_scrollable_get_vadjustment()") def get_vadjustment(self) -> Adjustment: ... @classmethod def new(cls) -> ToolPalette: ... @@ -63177,6 +63876,7 @@ class Tooltip(GObject.Object): def set_icon(self, pixbuf: Optional[GdkPixbuf.Pixbuf] = None) -> None: ... def set_icon_from_gicon(self, gicon: Optional[Gio.Icon], size: int) -> None: ... def set_icon_from_icon_name(self, icon_name: Optional[str], size: int) -> None: ... + @deprecated("Use gtk_tooltip_set_icon_from_icon_name() instead.") def set_icon_from_stock(self, stock_id: Optional[str], size: int) -> None: ... def set_markup(self, markup: Optional[str] = None) -> None: ... def set_text(self, text: Optional[str] = None) -> None: ... @@ -64816,6 +65516,7 @@ class UIManager(GObject.Object, Buildable): parent: GObject.Object = ... private_data: UIManagerPrivate = ... def __init__(self, add_tearoffs: bool = ...): ... + @deprecated("This method is deprecated") def add_ui( self, merge_id: int, @@ -64825,7 +65526,9 @@ class UIManager(GObject.Object, Buildable): type: UIManagerItemType, top: bool, ) -> None: ... + @deprecated("This method is deprecated") def add_ui_from_file(self, filename: str) -> int: ... + @deprecated("This method is deprecated") def add_ui_from_resource(self, resource_path: str) -> int: ... def add_ui_from_string(self, buffer): ... # FIXME Function def do_actions_changed(self) -> None: ... @@ -64836,20 +65539,37 @@ class UIManager(GObject.Object, Buildable): def do_get_widget(self, path: str) -> Widget: ... def do_post_activate(self, action: Action) -> None: ... def do_pre_activate(self, action: Action) -> None: ... + @deprecated("This method is deprecated") def ensure_update(self) -> None: ... + @deprecated("This method is deprecated") def get_accel_group(self) -> AccelGroup: ... + @deprecated("This method is deprecated") def get_action(self, path: str) -> Action: ... + @deprecated("This method is deprecated") def get_action_groups(self) -> list[ActionGroup]: ... + @deprecated( + "Tearoff menus are deprecated and should not be used in newly written code." + ) def get_add_tearoffs(self) -> bool: ... + @deprecated("This method is deprecated") def get_toplevels(self, types: UIManagerItemType) -> list[Widget]: ... + @deprecated("This method is deprecated") def get_ui(self) -> str: ... + @deprecated("This method is deprecated") def get_widget(self, path: str) -> Widget: ... def insert_action_group(self, buffer, length=-1): ... # FIXME Function + @deprecated("This method is deprecated") @classmethod def new(cls) -> UIManager: ... + @deprecated("This method is deprecated") def new_merge_id(self) -> int: ... + @deprecated("This method is deprecated") def remove_action_group(self, action_group: ActionGroup) -> None: ... + @deprecated("This method is deprecated") def remove_ui(self, merge_id: int) -> None: ... + @deprecated( + "Tearoff menus are deprecated and should not be used in newly written code." + ) def set_add_tearoffs(self, add_tearoffs: bool) -> None: ... class UIManagerClass(GObject.GPointer): @@ -65160,6 +65880,9 @@ class VBox(Box, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated( + "You should use gtk_box_new() with a %GTK_ORIENTATION_VERTICAL #GtkOrientable:orientation instead" + ) @classmethod def new(cls, homogeneous: bool, spacing: int) -> VBox: ... @@ -65463,6 +66186,7 @@ class VButtonBox(ButtonBox, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated("Use gtk_button_box_new() with %GTK_ORIENTATION_VERTICAL instead") @classmethod def new(cls) -> VButtonBox: ... @@ -65774,6 +66498,7 @@ class VPaned(Paned, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated("Use gtk_paned_new() with %GTK_ORIENTATION_VERTICAL instead") @classmethod def new(cls) -> VPaned: ... @@ -66099,8 +66824,10 @@ class VScale(Scale, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated("Use gtk_scale_new() with %GTK_ORIENTATION_VERTICAL instead") @classmethod def new(cls, adjustment: Adjustment) -> VScale: ... + @deprecated("Use gtk_scale_new_with_range() with %GTK_ORIENTATION_VERTICAL instead") @classmethod def new_with_range(cls, min: float, max: float, step: float) -> VScale: ... @@ -66404,6 +67131,7 @@ class VScrollbar(Scrollbar, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated("Use gtk_scrollbar_new() with %GTK_ORIENTATION_VERTICAL instead") @classmethod def new(cls, adjustment: Optional[Adjustment] = None) -> VScrollbar: ... @@ -66667,6 +67395,7 @@ class VSeparator(Separator, Atk.ImplementorIface, Buildable, Orientable): width_request: int = ..., orientation: Orientation = ..., ): ... + @deprecated("Use gtk_separator_new() with %GTK_ORIENTATION_VERTICAL instead") @classmethod def new(cls) -> VSeparator: ... @@ -66964,8 +67693,10 @@ class Viewport(Bin, Atk.ImplementorIface, Buildable, Scrollable): vscroll_policy: ScrollablePolicy = ..., ): ... def get_bin_window(self) -> Gdk.Window: ... + @deprecated("Use gtk_scrollable_get_hadjustment()") def get_hadjustment(self) -> Adjustment: ... def get_shadow_type(self) -> ShadowType: ... + @deprecated("Use gtk_scrollable_get_vadjustment()") def get_vadjustment(self) -> Adjustment: ... def get_view_window(self) -> Gdk.Window: ... @classmethod @@ -66974,8 +67705,10 @@ class Viewport(Bin, Atk.ImplementorIface, Buildable, Scrollable): hadjustment: Optional[Adjustment] = None, vadjustment: Optional[Adjustment] = None, ) -> Viewport: ... + @deprecated("Use gtk_scrollable_set_hadjustment()") def set_hadjustment(self, adjustment: Optional[Adjustment] = None) -> None: ... def set_shadow_type(self, type: ShadowType) -> None: ... + @deprecated("Use gtk_scrollable_set_vadjustment()") def set_vadjustment(self, adjustment: Optional[Adjustment] = None) -> None: ... class ViewportClass(GObject.GPointer): @@ -67638,6 +68371,7 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def can_activate_accel(self, signal_id: int) -> bool: ... def child_focus(self, direction: DirectionType) -> bool: ... def child_notify(self, child_property: str) -> None: ... + @deprecated("Use gtk_widget_get_path() instead") def class_path(self) -> Tuple[int, str, str]: ... def compute_expand(self, orientation: Orientation) -> bool: ... def create_pango_context(self) -> Pango.Context: ... @@ -67766,6 +68500,7 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def do_unrealize(self) -> None: ... def do_visibility_notify_event(self, event: Gdk.EventVisibility) -> bool: ... def do_window_state_event(self, event: Gdk.EventWindowState) -> bool: ... + @deprecated("Use gtk_drag_begin_with_coordinates() instead") def drag_begin( self, targets: TargetList, @@ -67799,6 +68534,7 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): targets: Optional[Sequence[TargetEntry]], actions: Gdk.DragAction, ) -> None: ... + @deprecated("This method is deprecated") def drag_dest_set_proxy( self, proxy_window: Gdk.Window, @@ -67826,11 +68562,13 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def drag_source_set_icon_gicon(self, icon: Gio.Icon) -> None: ... def drag_source_set_icon_name(self, icon_name: str) -> None: ... def drag_source_set_icon_pixbuf(self, pixbuf: GdkPixbuf.Pixbuf) -> None: ... + @deprecated("Use gtk_drag_source_set_icon_name() instead.") def drag_source_set_icon_stock(self, stock_id: str) -> None: ... def drag_source_set_target_list(self, target_list): ... # FIXME Function def drag_source_unset(self) -> None: ... def drag_unhighlight(self) -> None: ... def draw(self, cr: cairo.Context[_SomeSurface]) -> None: ... + @deprecated("Use #GtkStyleContext instead") def ensure_style(self) -> None: ... def error_bell(self) -> None: ... def event(self, event: Gdk.Event) -> bool: ... @@ -67847,14 +68585,19 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def get_app_paintable(self) -> bool: ... def get_can_default(self) -> bool: ... def get_can_focus(self) -> bool: ... + @deprecated("Use gtk_widget_get_preferred_size() instead.") def get_child_requisition(self) -> Requisition: ... def get_child_visible(self) -> bool: ... def get_clip(self) -> Gdk.Rectangle: ... def get_clipboard(self, selection: Gdk.Atom) -> Clipboard: ... + @deprecated("Use gtk_widget_class_set_template(), or don’t use this API at all.") def get_composite_name(self) -> str: ... def get_css_name(self) -> str: ... @staticmethod def get_default_direction() -> TextDirection: ... + @deprecated( + "Use #GtkStyleContext instead, and gtk_css_provider_get_default() to obtain a #GtkStyleProvider with the default widget style information." + ) @staticmethod def get_default_style() -> Style: ... def get_device_enabled(self, device: Gdk.Device) -> bool: ... @@ -67875,11 +68618,14 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def get_mapped(self) -> bool: ... def get_margin_bottom(self) -> int: ... def get_margin_end(self) -> int: ... + @deprecated("Use gtk_widget_get_margin_start() instead.") def get_margin_left(self) -> int: ... + @deprecated("Use gtk_widget_get_margin_end() instead.") def get_margin_right(self) -> int: ... def get_margin_start(self) -> int: ... def get_margin_top(self) -> int: ... def get_modifier_mask(self, intent: Gdk.ModifierIntent) -> Gdk.ModifierType: ... + @deprecated("Use #GtkStyleContext with a custom #GtkStyleProvider instead") def get_modifier_style(self) -> RcStyle: ... def get_name(self) -> str: ... def get_no_show_all(self) -> bool: ... @@ -67888,6 +68634,7 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def get_parent(self) -> Optional[Widget]: ... def get_parent_window(self) -> Optional[Gdk.Window]: ... def get_path(self) -> WidgetPath: ... + @deprecated("Use gdk_window_get_device_position() instead.") def get_pointer(self) -> Tuple[int, int]: ... def get_preferred_height(self) -> Tuple[int, int]: ... def get_preferred_height_and_baseline_for_width( @@ -67900,15 +68647,21 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def get_realized(self) -> bool: ... def get_receives_default(self) -> bool: ... def get_request_mode(self) -> SizeRequestMode: ... + @deprecated( + "The #GtkRequisition cache on the widget wasremoved, If you need to cache sizes across requests and allocations,add an explicit cache to the widget in question instead." + ) def get_requisition(self) -> Requisition: ... + @deprecated("Use gdk_screen_get_root_window() instead") def get_root_window(self) -> Gdk.Window: ... def get_scale_factor(self) -> int: ... def get_screen(self) -> Gdk.Screen: ... def get_sensitive(self) -> bool: ... def get_settings(self) -> Settings: ... def get_size_request(self) -> Tuple[int, int]: ... + @deprecated("Use gtk_widget_get_state_flags() instead.") def get_state(self) -> StateType: ... def get_state_flags(self) -> StateFlags: ... + @deprecated("Use #GtkStyleContext instead") def get_style(self) -> Style: ... def get_style_context(self) -> StyleContext: ... def get_support_multidevice(self) -> bool: ... @@ -67931,6 +68684,7 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def has_default(self) -> bool: ... def has_focus(self) -> bool: ... def has_grab(self) -> bool: ... + @deprecated("Use #GtkStyleContext instead") def has_rc_style(self) -> bool: ... def has_screen(self) -> bool: ... def has_visible_focus(self) -> bool: ... @@ -67947,6 +68701,7 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def install_style_property(self, pspec: GObject.ParamSpec) -> None: ... def intersect(self, area: Gdk.Rectangle) -> Tuple[bool, Gdk.Rectangle]: ... def is_ancestor(self, ancestor: Widget) -> bool: ... + @deprecated("Use gdk_screen_is_composited() instead.") def is_composited(self) -> bool: ... def is_drawable(self) -> bool: ... def is_focus(self) -> bool: ... @@ -67960,45 +68715,70 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def list_style_properties(self) -> list[GObject.ParamSpec]: ... def map(self) -> None: ... def mnemonic_activate(self, group_cycling: bool) -> bool: ... + @deprecated("Use gtk_widget_override_background_color() instead") def modify_base( self, state: StateType, color: Optional[Gdk.Color] = None ) -> None: ... + @deprecated("Use gtk_widget_override_background_color() instead") def modify_bg( self, state: StateType, color: Optional[Gdk.Color] = None ) -> None: ... + @deprecated("Use gtk_widget_override_cursor() instead.") def modify_cursor( self, primary: Optional[Gdk.Color] = None, secondary: Optional[Gdk.Color] = None ) -> None: ... + @deprecated("Use gtk_widget_override_color() instead") def modify_fg( self, state: StateType, color: Optional[Gdk.Color] = None ) -> None: ... + @deprecated("Use gtk_widget_override_font() instead") def modify_font( self, font_desc: Optional[Pango.FontDescription] = None ) -> None: ... + @deprecated("Use #GtkStyleContext with a custom #GtkStyleProvider instead") def modify_style(self, style: RcStyle) -> None: ... + @deprecated("Use gtk_widget_override_color() instead") def modify_text( self, state: StateType, color: Optional[Gdk.Color] = None ) -> None: ... + @deprecated( + "This function is not useful in the context of CSS-based rendering. If you wish to change the way a widget renders its background you should use a custom CSS style, through an application-specific #GtkStyleProvider and a CSS style class. You can also override the default drawing of a widget through the #GtkWidget::draw signal, and use Cairo to draw a specific color, regardless of the CSS style." + ) def override_background_color( self, state: StateFlags, color: Optional[Gdk.RGBA] = None ) -> None: ... + @deprecated("Use a custom style provider and style classes instead") def override_color( self, state: StateFlags, color: Optional[Gdk.RGBA] = None ) -> None: ... + @deprecated( + "This function is not useful in the context of CSS-based rendering. If you wish to change the color used to render the primary and secondary cursors you should use a custom CSS style, through an application-specific #GtkStyleProvider and a CSS style class." + ) def override_cursor( self, cursor: Optional[Gdk.RGBA] = None, secondary_cursor: Optional[Gdk.RGBA] = None, ) -> None: ... + @deprecated( + "This function is not useful in the context of CSS-based rendering. If you wish to change the font a widget uses to render its text you should use a custom CSS style, through an application-specific #GtkStyleProvider and a CSS style class." + ) def override_font( self, font_desc: Optional[Pango.FontDescription] = None ) -> None: ... + @deprecated( + "This function is not useful in the context of CSS-based rendering. If you wish to change the color used to render symbolic icons you should use a custom CSS style, through an application-specific #GtkStyleProvider and a CSS style class." + ) def override_symbolic_color( self, name: str, color: Optional[Gdk.RGBA] = None ) -> None: ... + @deprecated("Use gtk_widget_get_path() instead") def path(self) -> Tuple[int, str, str]: ... + @deprecated("Use gtk_widget_class_set_template(), or don’t use this API at all.") @staticmethod def pop_composite_child() -> None: ... + @deprecated( + "This API never really worked well and was mostly unused, nowwe have a more complete mechanism for composite children, see gtk_widget_class_set_template()." + ) @staticmethod def push_composite_child() -> None: ... def queue_allocate(self) -> None: ... @@ -68009,6 +68789,9 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def queue_resize(self) -> None: ... def queue_resize_no_redraw(self) -> None: ... def realize(self) -> None: ... + @deprecated( + "Use gtk_widget_get_allocation() and cairo_region_intersect_rectangle() to get the same behavior." + ) def region_intersect(self, region: cairo.Region) -> cairo.Region: ... def register_window(self, window: Gdk.Window) -> None: ... def remove_accelerator( @@ -68016,15 +68799,22 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): ) -> bool: ... def remove_mnemonic_label(self, label: Widget) -> None: ... def remove_tick_callback(self, id: int) -> None: ... + @deprecated("Use gtk_widget_render_icon_pixbuf() instead.") def render_icon( self, stock_id: str, size: int, detail: Optional[str] = None ) -> Optional[GdkPixbuf.Pixbuf]: ... + @deprecated("Use gtk_icon_theme_load_icon() instead.") def render_icon_pixbuf( self, stock_id: str, size: int ) -> Optional[GdkPixbuf.Pixbuf]: ... + @deprecated("Use gtk_container_remove() and gtk_container_add().") def reparent(self, new_parent: Widget) -> None: ... + @deprecated("Use #GtkStyleContext instead, and gtk_widget_reset_style()") def reset_rc_styles(self) -> None: ... def reset_style(self) -> None: ... + @deprecated( + "Application and widget code should not handle expose events directly; invalidation should use the #GtkWidget API, and drawing should only happen inside #GtkWidget::draw implementations" + ) def send_expose(self, event: Gdk.Event) -> int: ... def send_focus_change(self, event: Gdk.Event) -> bool: ... def set_accel_path( @@ -68038,6 +68828,7 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def set_can_focus(self, can_focus: bool) -> None: ... def set_child_visible(self, is_visible: bool) -> None: ... def set_clip(self, clip: Gdk.Rectangle) -> None: ... + @deprecated("Use gtk_widget_class_set_template(), or don’t use this API at all.") def set_composite_name(self, name: str) -> None: ... def set_connect_func( self, connect_func: Callable[..., None], *connect_data: Any @@ -68048,6 +68839,9 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def set_device_enabled(self, device: Gdk.Device, enabled: bool) -> None: ... def set_device_events(self, device: Gdk.Device, events: Gdk.EventMask) -> None: ... def set_direction(self, dir: TextDirection) -> None: ... + @deprecated( + "This function does not work under non-X11 backends or withnon-native windows.It should not be used in newly written code." + ) def set_double_buffered(self, double_buffered: bool) -> None: ... def set_events(self, events: int) -> None: ... def set_focus_on_click(self, focus_on_click: bool) -> None: ... @@ -68061,7 +68855,9 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def set_mapped(self, mapped: bool) -> None: ... def set_margin_bottom(self, margin: int) -> None: ... def set_margin_end(self, margin: int) -> None: ... + @deprecated("Use gtk_widget_set_margin_start() instead.") def set_margin_left(self, margin: int) -> None: ... + @deprecated("Use gtk_widget_set_margin_end() instead.") def set_margin_right(self, margin: int) -> None: ... def set_margin_start(self, margin: int) -> None: ... def set_margin_top(self, margin: int) -> None: ... @@ -68075,8 +68871,10 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def set_redraw_on_allocate(self, redraw_on_allocate: bool) -> None: ... def set_sensitive(self, sensitive: bool) -> None: ... def set_size_request(self, width: int, height: int) -> None: ... + @deprecated("Use gtk_widget_set_state_flags() instead.") def set_state(self, state: StateType) -> None: ... def set_state_flags(self, flags: StateFlags, clear: bool) -> None: ... + @deprecated("Use #GtkStyleContext instead") def set_style(self, style: Optional[Style] = None) -> None: ... def set_support_multidevice(self, support_multidevice: bool) -> None: ... def set_template(self, template_bytes: GLib.Bytes) -> None: ... @@ -68098,7 +68896,9 @@ class Widget(GObject.InitiallyUnowned, Atk.ImplementorIface, Buildable): def size_allocate_with_baseline( self, allocation: Gdk.Rectangle, baseline: int ) -> None: ... + @deprecated("Use gtk_widget_get_preferred_size() instead.") def size_request(self) -> Requisition: ... + @deprecated("This step is unnecessary with #GtkStyleContext.") def style_attach(self) -> None: ... def style_get_property(self, property_name, value=None): ... # FIXME Function def thaw_child_notify(self) -> None: ... @@ -68371,8 +69171,10 @@ class WidgetPath(GObject.GBoxed): def has_parent(self, type: Type) -> bool: ... def is_type(self, type: Type) -> bool: ... def iter_add_class(self, pos: int, name: str) -> None: ... + @deprecated("The use of regions is deprecated.") def iter_add_region(self, pos: int, name: str, flags: RegionFlags) -> None: ... def iter_clear_classes(self, pos: int) -> None: ... + @deprecated("The use of regions is deprecated.") def iter_clear_regions(self, pos: int) -> None: ... def iter_get_name(self, pos: int) -> Optional[str]: ... def iter_get_object_name(self, pos: int) -> Optional[str]: ... @@ -68384,11 +69186,15 @@ class WidgetPath(GObject.GBoxed): def iter_has_name(self, pos: int, name: str) -> bool: ... def iter_has_qclass(self, pos: int, qname: int) -> bool: ... def iter_has_qname(self, pos: int, qname: int) -> bool: ... + @deprecated("The use of regions is deprecated.") def iter_has_qregion(self, pos: int, qname: int) -> Tuple[bool, RegionFlags]: ... + @deprecated("The use of regions is deprecated.") def iter_has_region(self, pos: int, name: str) -> Tuple[bool, RegionFlags]: ... def iter_list_classes(self, pos: int) -> list[str]: ... + @deprecated("The use of regions is deprecated.") def iter_list_regions(self, pos: int) -> list[str]: ... def iter_remove_class(self, pos: int, name: str) -> None: ... + @deprecated("The use of regions is deprecated.") def iter_remove_region(self, pos: int, name: str) -> None: ... def iter_set_name(self, pos: int, name: str) -> None: ... def iter_set_object_name(self, pos: int, name: Optional[str] = None) -> None: ... @@ -68851,6 +69657,7 @@ class Window(Bin, Atk.ImplementorIface, Buildable): def get_focus_visible(self) -> bool: ... def get_gravity(self) -> Gdk.Gravity: ... def get_group(self) -> WindowGroup: ... + @deprecated("Resize grips have been removed.") def get_has_resize_grip(self) -> bool: ... def get_hide_titlebar_when_maximized(self) -> bool: ... def get_icon(self) -> Optional[GdkPixbuf.Pixbuf]: ... @@ -68859,9 +69666,11 @@ class Window(Bin, Atk.ImplementorIface, Buildable): def get_mnemonic_modifier(self) -> Gdk.ModifierType: ... def get_mnemonics_visible(self) -> bool: ... def get_modal(self) -> bool: ... + @deprecated("Use gtk_widget_get_opacity instead.") def get_opacity(self) -> float: ... def get_position(self) -> Tuple[int, int]: ... def get_resizable(self) -> bool: ... + @deprecated("Resize grips have been removed.") def get_resize_grip_area(self) -> Tuple[bool, Gdk.Rectangle]: ... def get_role(self) -> Optional[str]: ... def get_screen(self) -> Gdk.Screen: ... @@ -68886,15 +69695,23 @@ class Window(Bin, Atk.ImplementorIface, Buildable): def move(self, x: int, y: int) -> None: ... @classmethod def new(cls, type: WindowType) -> Window: ... + @deprecated("Geometry handling in GTK is deprecated.") def parse_geometry(self, geometry: str) -> bool: ... def present(self) -> None: ... def present_with_time(self, timestamp: int) -> None: ... def propagate_key_event(self, event: Gdk.EventKey) -> bool: ... def remove_accel_group(self, accel_group: AccelGroup) -> None: ... def remove_mnemonic(self, keyval: int, target: Widget) -> None: ... + @deprecated( + "GUI builders can call gtk_widget_hide(), gtk_widget_unrealize() and then gtk_widget_show() on @window themselves, if they still need this functionality." + ) def reshow_with_initial_size(self) -> None: ... def resize(self, width: int, height: int) -> None: ... + @deprecated("Resize grips have been removed.") def resize_grip_is_visible(self) -> bool: ... + @deprecated( + "This function does nothing. Use gtk_window_resize() and compute the geometry yourself." + ) def resize_to_geometry(self, width: int, height: int) -> None: ... def set_accept_focus(self, setting: bool) -> None: ... def set_application(self, application: Optional[Application] = None) -> None: ... @@ -68903,6 +69720,9 @@ class Window(Bin, Atk.ImplementorIface, Buildable): def set_auto_startup_notification(setting: bool) -> None: ... def set_decorated(self, setting: bool) -> None: ... def set_default(self, default_widget: Optional[Widget] = None) -> None: ... + @deprecated( + "This function does nothing. If you want to set a default size, use gtk_window_set_default_size() instead." + ) def set_default_geometry(self, width: int, height: int) -> None: ... @staticmethod def set_default_icon(icon: GdkPixbuf.Pixbuf) -> None: ... @@ -68925,6 +69745,7 @@ class Window(Bin, Atk.ImplementorIface, Buildable): geom_mask: Gdk.WindowHints, ) -> None: ... def set_gravity(self, gravity: Gdk.Gravity) -> None: ... + @deprecated("Resize grips have been removed.") def set_has_resize_grip(self, value: bool) -> None: ... def set_has_user_ref_count(self, setting: bool) -> None: ... def set_hide_titlebar_when_maximized(self, setting: bool) -> None: ... @@ -68939,6 +69760,7 @@ class Window(Bin, Atk.ImplementorIface, Buildable): def set_mnemonic_modifier(self, modifier: Gdk.ModifierType) -> None: ... def set_mnemonics_visible(self, setting: bool) -> None: ... def set_modal(self, modal: bool) -> None: ... + @deprecated("Use gtk_widget_set_opacity instead.") def set_opacity(self, opacity: float) -> None: ... def set_position(self, position: WindowPosition) -> None: ... def set_resizable(self, resizable: bool) -> None: ... @@ -68952,6 +69774,7 @@ class Window(Bin, Atk.ImplementorIface, Buildable): def set_transient_for(self, parent: Optional[Window] = None) -> None: ... def set_type_hint(self, hint: Gdk.WindowTypeHint) -> None: ... def set_urgency_hint(self, setting: bool) -> None: ... + @deprecated("This method is deprecated") def set_wmclass(self, wmclass_name: str, wmclass_class: str) -> None: ... def stick(self) -> None: ... def unfullscreen(self) -> None: ... diff --git a/src/gi-stubs/repository/_Gtk4.pyi b/src/gi-stubs/repository/_Gtk4.pyi index 057b2454..cb644dde 100644 --- a/src/gi-stubs/repository/_Gtk4.pyi +++ b/src/gi-stubs/repository/_Gtk4.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + import cairo from gi.repository import Gdk from gi.repository import GdkPixbuf @@ -176,6 +181,7 @@ def print_run_page_setup_dialog_async( *data: Any, ) -> None: ... def recent_manager_error_quark() -> int: ... +@deprecated("This function is deprecated") def render_activity( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -184,6 +190,7 @@ def render_activity( width: float, height: float, ) -> None: ... +@deprecated("This function is deprecated") def render_arrow( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -192,6 +199,7 @@ def render_arrow( y: float, size: float, ) -> None: ... +@deprecated("This function is deprecated") def render_background( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -200,6 +208,7 @@ def render_background( width: float, height: float, ) -> None: ... +@deprecated("This function is deprecated") def render_check( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -208,6 +217,7 @@ def render_check( width: float, height: float, ) -> None: ... +@deprecated("This function is deprecated") def render_expander( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -216,6 +226,7 @@ def render_expander( width: float, height: float, ) -> None: ... +@deprecated("This function is deprecated") def render_focus( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -224,6 +235,7 @@ def render_focus( width: float, height: float, ) -> None: ... +@deprecated("This function is deprecated") def render_frame( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -232,6 +244,7 @@ def render_frame( width: float, height: float, ) -> None: ... +@deprecated("This function is deprecated") def render_handle( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -240,6 +253,7 @@ def render_handle( width: float, height: float, ) -> None: ... +@deprecated("This function is deprecated") def render_icon( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -247,6 +261,7 @@ def render_icon( x: float, y: float, ) -> None: ... +@deprecated("This function is deprecated") def render_layout( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -254,6 +269,7 @@ def render_layout( y: float, layout: Pango.Layout, ) -> None: ... +@deprecated("This function is deprecated") def render_line( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -262,6 +278,7 @@ def render_line( x1: float, y1: float, ) -> None: ... +@deprecated("This function is deprecated") def render_option( context: StyleContext, cr: cairo.Context[_SomeSurface], @@ -272,7 +289,13 @@ def render_option( ) -> None: ... def rgb_to_hsv(r: float, g: float, b: float) -> Tuple[float, float, float]: ... def set_debug_flags(flags: DebugFlags) -> None: ... +@deprecated( + "Use [method@Gtk.FileLauncher.launch] or [method@Gtk.UriLauncher.launch] instead" +) def show_uri(parent: Optional[Window], uri: str, timestamp: int) -> None: ... +@deprecated( + "Use [method@Gtk.FileLauncher.launch] or [method@Gtk.UriLauncher.launch] instead" +) def show_uri_full( parent: Optional[Window], uri: str, @@ -281,6 +304,9 @@ def show_uri_full( callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... +@deprecated( + "Use [method@Gtk.FileLauncher.launch_finish] or [method@Gtk.UriLauncher.launch_finish] instead" +) def show_uri_full_finish(parent: Window, result: Gio.AsyncResult) -> bool: ... def test_accessible_assertion_message_role( domain: str, @@ -305,11 +331,15 @@ def test_accessible_has_state( def test_list_all_types() -> list[Type]: ... def test_register_all_types() -> None: ... def test_widget_wait_for_draw(widget: Widget) -> None: ... +@deprecated("Use list models instead") def tree_create_row_drag_content( tree_model: TreeModel, path: TreePath ) -> Gdk.ContentProvider: ... +@deprecated("Use list models instead") def tree_get_row_drag_data(value: Any) -> Tuple[bool, TreeModel, TreePath]: ... +@deprecated("This function is deprecated") def tree_row_reference_deleted(proxy: GObject.Object, path: TreePath) -> None: ... +@deprecated("This function is deprecated") def tree_row_reference_inserted(proxy: GObject.Object, path: TreePath) -> None: ... def value_dup_expression(value: Any) -> Optional[Expression]: ... def value_get_expression(value: Any) -> Optional[Expression]: ... @@ -1185,6 +1215,9 @@ class AnyFilter(MultiFilter, Gio.ListModel, Buildable): class AnyFilterClass(GObject.GPointer): ... +@deprecated( + "The application selection widgets should be implemented according to the design of each platform and/or application requiring them." +) class AppChooser(GObject.GInterface): """ Interface GtkAppChooser @@ -1193,10 +1226,16 @@ class AppChooser(GObject.GInterface): notify (GParam) """ + @deprecated("This widget will be removed in GTK 5") def get_app_info(self) -> Optional[Gio.AppInfo]: ... + @deprecated("This widget will be removed in GTK 5") def get_content_type(self) -> str: ... + @deprecated("This widget will be removed in GTK 5") def refresh(self) -> None: ... +@deprecated( + "The application selection widgets should be implemented according to the design of each platform and/or application requiring them." +) class AppChooserButton(Widget, Accessible, AppChooser, Buildable, ConstraintTarget): """ :Constructors: @@ -1354,20 +1393,35 @@ class AppChooserButton(Widget, Accessible, AppChooser, Buildable, ConstraintTarg accessible_role: AccessibleRole = ..., content_type: str = ..., ): ... + @deprecated("This widget will be removed in GTK 5") def append_custom_item(self, name: str, label: str, icon: Gio.Icon) -> None: ... + @deprecated("This widget will be removed in GTK 5") def append_separator(self) -> None: ... + @deprecated("This widget will be removed in GTK 5") def get_heading(self) -> Optional[str]: ... + @deprecated("This widget will be removed in GTK 5") def get_modal(self) -> bool: ... + @deprecated("This widget will be removed in GTK 5") def get_show_default_item(self) -> bool: ... + @deprecated("This widget will be removed in GTK 5") def get_show_dialog_item(self) -> bool: ... + @deprecated("This widget will be removed in GTK 5") @classmethod def new(cls, content_type: str) -> AppChooserButton: ... + @deprecated("This widget will be removed in GTK 5") def set_active_custom_item(self, name: str) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_heading(self, heading: str) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_modal(self, modal: bool) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_show_default_item(self, setting: bool) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_show_dialog_item(self, setting: bool) -> None: ... +@deprecated( + "The application selection widgets should be implemented according to the design of each platform and/or application requiring them." +) class AppChooserDialog( Dialog, Accessible, @@ -1615,18 +1669,26 @@ class AppChooserDialog( accessible_role: AccessibleRole = ..., content_type: str = ..., ): ... + @deprecated("This widget will be removed in GTK 5") def get_heading(self) -> Optional[str]: ... + @deprecated("This widget will be removed in GTK 5") def get_widget(self) -> Widget: ... + @deprecated("This widget will be removed in GTK 5") @classmethod def new( cls, parent: Optional[Window], flags: DialogFlags, file: Gio.File ) -> AppChooserDialog: ... + @deprecated("This widget will be removed in GTK 5") @classmethod def new_for_content_type( cls, parent: Optional[Window], flags: DialogFlags, content_type: str ) -> AppChooserDialog: ... + @deprecated("This widget will be removed in GTK 5") def set_heading(self, heading: str) -> None: ... +@deprecated( + "The application selection widgets should be implemented according to the design of each platform and/or application requiring them." +) class AppChooserWidget(Widget, Accessible, AppChooser, Buildable, ConstraintTarget): """ :Constructors: @@ -1789,19 +1851,32 @@ class AppChooserWidget(Widget, Accessible, AppChooser, Buildable, ConstraintTarg accessible_role: AccessibleRole = ..., content_type: str = ..., ): ... + @deprecated("This widget will be removed in GTK 5") def get_default_text(self) -> Optional[str]: ... + @deprecated("This widget will be removed in GTK 5") def get_show_all(self) -> bool: ... + @deprecated("This widget will be removed in GTK 5") def get_show_default(self) -> bool: ... + @deprecated("This widget will be removed in GTK 5") def get_show_fallback(self) -> bool: ... + @deprecated("This widget will be removed in GTK 5") def get_show_other(self) -> bool: ... + @deprecated("This widget will be removed in GTK 5") def get_show_recommended(self) -> bool: ... + @deprecated("This widget will be removed in GTK 5") @classmethod def new(cls, content_type: str) -> AppChooserWidget: ... + @deprecated("This widget will be removed in GTK 5") def set_default_text(self, text: str) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_show_all(self, setting: bool) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_show_default(self, setting: bool) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_show_fallback(self, setting: bool) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_show_other(self, setting: bool) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_show_recommended(self, setting: bool) -> None: ... class Application(Gio.Application, Gio.ActionGroup, Gio.ActionMap): @@ -2366,6 +2441,7 @@ class AspectFrame(Widget, Accessible, Buildable, ConstraintTarget): def set_xalign(self, xalign: float) -> None: ... def set_yalign(self, yalign: float) -> None: ... +@deprecated("This widget will be removed in GTK 5") class Assistant( Window, Accessible, Buildable, ConstraintTarget, Native, Root, ShortcutManager ): @@ -2600,34 +2676,59 @@ class Assistant( width_request: int = ..., accessible_role: AccessibleRole = ..., ): ... + @deprecated("This widget will be removed in GTK 5") def add_action_widget(self, child: Widget) -> None: ... + @deprecated("This widget will be removed in GTK 5") def append_page(self, page: Widget) -> int: ... + @deprecated("This widget will be removed in GTK 5") def commit(self) -> None: ... + @deprecated("This widget will be removed in GTK 5") def get_current_page(self) -> int: ... + @deprecated("This widget will be removed in GTK 5") def get_n_pages(self) -> int: ... + @deprecated("This widget will be removed in GTK 5") def get_nth_page(self, page_num: int) -> Optional[Widget]: ... + @deprecated("This widget will be removed in GTK 5") def get_page(self, child: Widget) -> AssistantPage: ... + @deprecated("This widget will be removed in GTK 5") def get_page_complete(self, page: Widget) -> bool: ... + @deprecated("This widget will be removed in GTK 5") def get_page_title(self, page: Widget) -> str: ... + @deprecated("This widget will be removed in GTK 5") def get_page_type(self, page: Widget) -> AssistantPageType: ... + @deprecated("This widget will be removed in GTK 5") def get_pages(self) -> Gio.ListModel: ... + @deprecated("This widget will be removed in GTK 5") def insert_page(self, page: Widget, position: int) -> int: ... + @deprecated("This widget will be removed in GTK 5") @classmethod def new(cls) -> Assistant: ... + @deprecated("This widget will be removed in GTK 5") def next_page(self) -> None: ... + @deprecated("This widget will be removed in GTK 5") def prepend_page(self, page: Widget) -> int: ... + @deprecated("This widget will be removed in GTK 5") def previous_page(self) -> None: ... + @deprecated("This widget will be removed in GTK 5") def remove_action_widget(self, child: Widget) -> None: ... + @deprecated("This widget will be removed in GTK 5") def remove_page(self, page_num: int) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_current_page(self, page_num: int) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_forward_page_func( self, page_func: Optional[Callable[..., int]] = None, *data: Any ) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_page_complete(self, page: Widget, complete: bool) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_page_title(self, page: Widget, title: str) -> None: ... + @deprecated("This widget will be removed in GTK 5") def set_page_type(self, page: Widget, type: AssistantPageType) -> None: ... + @deprecated("This widget will be removed in GTK 5") def update_buttons_state(self) -> None: ... +@deprecated("This object will be removed in GTK 5") class AssistantPage(GObject.Object): """ :Constructors: @@ -2661,6 +2762,7 @@ class AssistantPage(GObject.Object): page_type: AssistantPageType = ..., title: str = ..., ): ... + @deprecated("This widget will be removed in GTK 5") def get_child(self) -> Widget: ... class BinLayout(LayoutManager): @@ -3294,6 +3396,7 @@ class Builder(GObject.Object): def interface_install_property(self, *args, **kargs): ... # FIXME Function def interface_list_properties(self, *args, **kargs): ... # FIXME Function def is_floating(self) -> bool: ... + @deprecated("This method is deprecated") @classmethod def newv( cls, object_type: Type, parameters: Sequence[GObject.Parameter] @@ -3838,6 +3941,7 @@ class CallbackAction(ShortcutAction): class CallbackActionClass(GObject.GPointer): ... +@deprecated("List views use widgets for displaying their contents") class CellArea(GObject.InitiallyUnowned, Buildable, CellLayout): """ :Constructors: @@ -3870,6 +3974,7 @@ class CellArea(GObject.InitiallyUnowned, Buildable, CellLayout): props: Props = ... parent_instance: GObject.InitiallyUnowned = ... def __init__(self, focus_cell: Optional[CellRenderer] = ...): ... + @deprecated("This method is deprecated") def activate( self, context: CellAreaContext, @@ -3878,6 +3983,7 @@ class CellArea(GObject.InitiallyUnowned, Buildable, CellLayout): flags: CellRendererState, edit_only: bool, ) -> bool: ... + @deprecated("This method is deprecated") def activate_cell( self, widget: Widget, @@ -3886,10 +3992,13 @@ class CellArea(GObject.InitiallyUnowned, Buildable, CellLayout): cell_area: Gdk.Rectangle, flags: CellRendererState, ) -> bool: ... + @deprecated("This method is deprecated") def add(self, renderer: CellRenderer) -> None: ... + @deprecated("This method is deprecated") def add_focus_sibling( self, renderer: CellRenderer, sibling: CellRenderer ) -> None: ... + @deprecated("This method is deprecated") def apply_attributes( self, tree_model: TreeModel, @@ -3897,18 +4006,25 @@ class CellArea(GObject.InitiallyUnowned, Buildable, CellLayout): is_expander: bool, is_expanded: bool, ) -> None: ... + @deprecated("This method is deprecated") def attribute_connect( self, renderer: CellRenderer, attribute: str, column: int ) -> None: ... + @deprecated("This method is deprecated") def attribute_disconnect(self, renderer: CellRenderer, attribute: str) -> None: ... + @deprecated("This method is deprecated") def attribute_get_column(self, renderer: CellRenderer, attribute: str) -> int: ... + @deprecated("This method is deprecated") def cell_get_property( self, renderer: CellRenderer, property_name: str, value: Any ) -> None: ... + @deprecated("This method is deprecated") def cell_set_property( self, renderer: CellRenderer, property_name: str, value: Any ) -> None: ... + @deprecated("This method is deprecated") def copy_context(self, context: CellAreaContext) -> CellAreaContext: ... + @deprecated("This method is deprecated") def create_context(self) -> CellAreaContext: ... def do_activate( self, @@ -3988,6 +4104,7 @@ class CellArea(GObject.InitiallyUnowned, Buildable, CellLayout): flags: CellRendererState, paint_focus: bool, ) -> None: ... + @deprecated("This method is deprecated") def event( self, context: CellAreaContext, @@ -3996,8 +4113,11 @@ class CellArea(GObject.InitiallyUnowned, Buildable, CellLayout): cell_area: Gdk.Rectangle, flags: CellRendererState, ) -> int: ... + @deprecated("This method is deprecated") def find_cell_property(self, property_name: str) -> GObject.ParamSpec: ... + @deprecated("This method is deprecated") def focus(self, direction: DirectionType) -> bool: ... + @deprecated("This method is deprecated") def foreach(self, callback: Callable[..., bool], *callback_data: Any) -> None: ... def foreach_alloc( self, @@ -4008,6 +4128,7 @@ class CellArea(GObject.InitiallyUnowned, Buildable, CellLayout): callback: Callable[..., bool], *callback_data: Any, ) -> None: ... + @deprecated("This method is deprecated") def get_cell_allocation( self, context: CellAreaContext, @@ -4015,6 +4136,7 @@ class CellArea(GObject.InitiallyUnowned, Buildable, CellLayout): renderer: CellRenderer, cell_area: Gdk.Rectangle, ) -> Gdk.Rectangle: ... + @deprecated("This method is deprecated") def get_cell_at_position( self, context: CellAreaContext, @@ -4024,42 +4146,60 @@ class CellArea(GObject.InitiallyUnowned, Buildable, CellLayout): y: int, ) -> Tuple[CellRenderer, Gdk.Rectangle]: ... def get_current_path_string(self) -> str: ... + @deprecated("This method is deprecated") def get_edit_widget(self) -> Optional[CellEditable]: ... + @deprecated("This method is deprecated") def get_edited_cell(self) -> Optional[CellRenderer]: ... + @deprecated("This method is deprecated") def get_focus_cell(self) -> Optional[CellRenderer]: ... + @deprecated("This method is deprecated") def get_focus_from_sibling( self, renderer: CellRenderer ) -> Optional[CellRenderer]: ... + @deprecated("This method is deprecated") def get_focus_siblings(self, renderer: CellRenderer) -> list[CellRenderer]: ... + @deprecated("This method is deprecated") def get_preferred_height( self, context: CellAreaContext, widget: Widget ) -> Tuple[int, int]: ... + @deprecated("This method is deprecated") def get_preferred_height_for_width( self, context: CellAreaContext, widget: Widget, width: int ) -> Tuple[int, int]: ... + @deprecated("This method is deprecated") def get_preferred_width( self, context: CellAreaContext, widget: Widget ) -> Tuple[int, int]: ... + @deprecated("This method is deprecated") def get_preferred_width_for_height( self, context: CellAreaContext, widget: Widget, height: int ) -> Tuple[int, int]: ... def get_request_mode(self) -> SizeRequestMode: ... + @deprecated("This method is deprecated") def has_renderer(self, renderer: CellRenderer) -> bool: ... + @deprecated("This method is deprecated") def inner_cell_area( self, widget: Widget, cell_area: Gdk.Rectangle ) -> Gdk.Rectangle: ... + @deprecated("This method is deprecated") def install_cell_property( self, property_id: int, pspec: GObject.ParamSpec ) -> None: ... + @deprecated("This method is deprecated") def is_activatable(self) -> bool: ... + @deprecated("This method is deprecated") def is_focus_sibling( self, renderer: CellRenderer, sibling: CellRenderer ) -> bool: ... + @deprecated("This method is deprecated") def list_cell_properties(self) -> list[GObject.ParamSpec]: ... + @deprecated("This method is deprecated") def remove(self, renderer: CellRenderer) -> None: ... + @deprecated("This method is deprecated") def remove_focus_sibling( self, renderer: CellRenderer, sibling: CellRenderer ) -> None: ... + @deprecated("This method is deprecated") def request_renderer( self, renderer: CellRenderer, @@ -4067,7 +4207,9 @@ class CellArea(GObject.InitiallyUnowned, Buildable, CellLayout): widget: Widget, for_size: int, ) -> Tuple[int, int]: ... + @deprecated("This method is deprecated") def set_focus_cell(self, renderer: Optional[CellRenderer] = None) -> None: ... + @deprecated("This method is deprecated") def snapshot( self, context: CellAreaContext, @@ -4078,8 +4220,10 @@ class CellArea(GObject.InitiallyUnowned, Buildable, CellLayout): flags: CellRendererState, paint_focus: bool, ) -> None: ... + @deprecated("This method is deprecated") def stop_editing(self, canceled: bool) -> None: ... +@deprecated("List views use widgets for displaying their contents") class CellAreaBox(CellArea, Buildable, CellLayout, Orientable): """ :Constructors: @@ -4122,15 +4266,20 @@ class CellAreaBox(CellArea, Buildable, CellLayout, Orientable): focus_cell: Optional[CellRenderer] = ..., orientation: Orientation = ..., ): ... + @deprecated("This method is deprecated") def get_spacing(self) -> int: ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> CellAreaBox: ... + @deprecated("This method is deprecated") def pack_end( self, renderer: CellRenderer, expand: bool, align: bool, fixed: bool ) -> None: ... + @deprecated("This method is deprecated") def pack_start( self, renderer: CellRenderer, expand: bool, align: bool, fixed: bool ) -> None: ... + @deprecated("This method is deprecated") def set_spacing(self, spacing: int) -> None: ... class CellAreaClass(GObject.GPointer): @@ -4200,12 +4349,16 @@ class CellAreaClass(GObject.GPointer): bool, ] = ... padding: list[None] = ... + @deprecated("This method is deprecated") def find_cell_property(self, property_name: str) -> GObject.ParamSpec: ... + @deprecated("This method is deprecated") def install_cell_property( self, property_id: int, pspec: GObject.ParamSpec ) -> None: ... + @deprecated("This method is deprecated") def list_cell_properties(self) -> list[GObject.ParamSpec]: ... +@deprecated("This object will be removed in GTK 5") class CellAreaContext(GObject.Object): """ :Constructors: @@ -4236,21 +4389,31 @@ class CellAreaContext(GObject.Object): props: Props = ... parent_instance: GObject.Object = ... def __init__(self, area: CellArea = ...): ... + @deprecated("This object will be removed in GTK 5") def allocate(self, width: int, height: int) -> None: ... def do_allocate(self, width: int, height: int) -> None: ... def do_get_preferred_height_for_width(self, width: int) -> Tuple[int, int]: ... def do_get_preferred_width_for_height(self, height: int) -> Tuple[int, int]: ... def do_reset(self) -> None: ... + @deprecated("This object will be removed in GTK 5") def get_allocation(self) -> Tuple[int, int]: ... + @deprecated("This object will be removed in GTK 5") def get_area(self) -> CellArea: ... + @deprecated("This object will be removed in GTK 5") def get_preferred_height(self) -> Tuple[int, int]: ... + @deprecated("This object will be removed in GTK 5") def get_preferred_height_for_width(self, width: int) -> Tuple[int, int]: ... + @deprecated("This object will be removed in GTK 5") def get_preferred_width(self) -> Tuple[int, int]: ... + @deprecated("This object will be removed in GTK 5") def get_preferred_width_for_height(self, height: int) -> Tuple[int, int]: ... + @deprecated("This object will be removed in GTK 5") def push_preferred_height( self, minimum_height: int, natural_height: int ) -> None: ... + @deprecated("This object will be removed in GTK 5") def push_preferred_width(self, minimum_width: int, natural_width: int) -> None: ... + @deprecated("This object will be removed in GTK 5") def reset(self) -> None: ... class CellAreaContextClass(GObject.GPointer): @@ -4275,6 +4438,9 @@ class CellAreaContextClass(GObject.GPointer): class CellAreaContextPrivate(GObject.GPointer): ... +@deprecated( + "List views use widgets for displaying their contents. See [iface@Gtk.Editable] for editable text widgets" +) class CellEditable(GObject.GInterface): """ Interface GtkCellEditable @@ -4283,7 +4449,9 @@ class CellEditable(GObject.GInterface): notify (GParam) """ + @deprecated("This method is deprecated") def editing_done(self) -> None: ... + @deprecated("This method is deprecated") def remove_widget(self) -> None: ... def start_editing(self, event: Optional[Gdk.Event] = None) -> None: ... @@ -4301,6 +4469,9 @@ class CellEditableIface(GObject.GPointer): remove_widget: Callable[[CellEditable], None] = ... start_editing: Callable[[CellEditable, Optional[Gdk.Event]], None] = ... +@deprecated( + "List views use widgets to display their contents. See [class@Gtk.LayoutManager] for layout manager delegate objects" +) class CellLayout(GObject.GInterface): """ Interface GtkCellLayout @@ -4309,16 +4480,25 @@ class CellLayout(GObject.GInterface): notify (GParam) """ + @deprecated("This method is deprecated") def add_attribute( self, cell: CellRenderer, attribute: str, column: int ) -> None: ... + @deprecated("This method is deprecated") def clear(self) -> None: ... + @deprecated("This method is deprecated") def clear_attributes(self, cell: CellRenderer) -> None: ... + @deprecated("This method is deprecated") def get_area(self) -> Optional[CellArea]: ... + @deprecated("This method is deprecated") def get_cells(self) -> list[CellRenderer]: ... + @deprecated("This method is deprecated") def pack_end(self, cell: CellRenderer, expand: bool) -> None: ... + @deprecated("This method is deprecated") def pack_start(self, cell: CellRenderer, expand: bool) -> None: ... + @deprecated("This method is deprecated") def reorder(self, cell: CellRenderer, position: int) -> None: ... + @deprecated("This method is deprecated") def set_cell_data_func( self, cell: CellRenderer, @@ -4346,6 +4526,7 @@ class CellLayoutIface(GObject.GPointer): get_cells: Callable[[CellLayout], list[CellRenderer]] = ... get_area: Callable[[CellLayout], Optional[CellArea]] = ... +@deprecated("List views use widgets for displaying their contents") class CellRenderer(GObject.InitiallyUnowned): """ :Constructors: @@ -4417,6 +4598,7 @@ class CellRenderer(GObject.InitiallyUnowned): yalign: float = ..., ypad: int = ..., ): ... + @deprecated("This method is deprecated") def activate( self, event: Gdk.Event, @@ -4466,37 +4648,61 @@ class CellRenderer(GObject.InitiallyUnowned): cell_area: Gdk.Rectangle, flags: CellRendererState, ) -> Optional[CellEditable]: ... + @deprecated("This method is deprecated") def get_aligned_area( self, widget: Widget, flags: CellRendererState, cell_area: Gdk.Rectangle ) -> Gdk.Rectangle: ... + @deprecated("This method is deprecated") def get_alignment(self) -> Tuple[float, float]: ... + @deprecated("This method is deprecated") def get_fixed_size(self) -> Tuple[int, int]: ... + @deprecated("This method is deprecated") def get_is_expanded(self) -> bool: ... + @deprecated("This method is deprecated") def get_is_expander(self) -> bool: ... + @deprecated("This method is deprecated") def get_padding(self) -> Tuple[int, int]: ... + @deprecated("This method is deprecated") def get_preferred_height(self, widget: Widget) -> Tuple[int, int]: ... + @deprecated("This method is deprecated") def get_preferred_height_for_width( self, widget: Widget, width: int ) -> Tuple[int, int]: ... + @deprecated("This method is deprecated") def get_preferred_size(self, widget: Widget) -> Tuple[Requisition, Requisition]: ... + @deprecated("This method is deprecated") def get_preferred_width(self, widget: Widget) -> Tuple[int, int]: ... + @deprecated("This method is deprecated") def get_preferred_width_for_height( self, widget: Widget, height: int ) -> Tuple[int, int]: ... + @deprecated("This method is deprecated") def get_request_mode(self) -> SizeRequestMode: ... + @deprecated("This method is deprecated") def get_sensitive(self) -> bool: ... + @deprecated("This method is deprecated") def get_state( self, widget: Optional[Widget], cell_state: CellRendererState ) -> StateFlags: ... + @deprecated("This method is deprecated") def get_visible(self) -> bool: ... + @deprecated("This method is deprecated") def is_activatable(self) -> bool: ... + @deprecated("This method is deprecated") def set_alignment(self, xalign: float, yalign: float) -> None: ... + @deprecated("This method is deprecated") def set_fixed_size(self, width: int, height: int) -> None: ... + @deprecated("This method is deprecated") def set_is_expanded(self, is_expanded: bool) -> None: ... + @deprecated("This method is deprecated") def set_is_expander(self, is_expander: bool) -> None: ... + @deprecated("This method is deprecated") def set_padding(self, xpad: int, ypad: int) -> None: ... + @deprecated("This method is deprecated") def set_sensitive(self, sensitive: bool) -> None: ... + @deprecated("This method is deprecated") def set_visible(self, visible: bool) -> None: ... + @deprecated("This method is deprecated") def snapshot( self, snapshot: Snapshot, @@ -4505,6 +4711,7 @@ class CellRenderer(GObject.InitiallyUnowned): cell_area: Gdk.Rectangle, flags: CellRendererState, ) -> None: ... + @deprecated("This method is deprecated") def start_editing( self, event: Optional[Gdk.Event], @@ -4514,8 +4721,12 @@ class CellRenderer(GObject.InitiallyUnowned): cell_area: Gdk.Rectangle, flags: CellRendererState, ) -> Optional[CellEditable]: ... + @deprecated("This method is deprecated") def stop_editing(self, canceled: bool) -> None: ... +@deprecated( + "Applications editing keyboard accelerators should provide their own implementation according to platform design guidelines" +) class CellRendererAccel(CellRendererText): """ :Constructors: @@ -4747,6 +4958,7 @@ class CellRendererAccel(CellRendererText): yalign: float = ..., ypad: int = ..., ): ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> CellRendererAccel: ... @@ -4813,6 +5025,9 @@ class CellRendererClass(GObject.GPointer): class CellRendererClassPrivate(GObject.GPointer): ... +@deprecated( + "List views use widgets to display their contents. You should use [class@Gtk.DropDown] instead" +) class CellRendererCombo(CellRendererText): """ :Constructors: @@ -5040,9 +5255,13 @@ class CellRendererCombo(CellRendererText): yalign: float = ..., ypad: int = ..., ): ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> CellRendererCombo: ... +@deprecated( + "List views use widgets to display their contents. You should use [class@Gtk.Image] for icons, and [class@Gtk.Picture] for images" +) class CellRendererPixbuf(CellRenderer): """ :Constructors: @@ -5136,11 +5355,15 @@ class CellRendererPixbuf(CellRenderer): yalign: float = ..., ypad: int = ..., ): ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> CellRendererPixbuf: ... class CellRendererPrivate(GObject.GPointer): ... +@deprecated( + "List views use widgets to display their contents. You should use [class@Gtk.ProgressBar] instead" +) class CellRendererProgress(CellRenderer, Orientable): """ :Constructors: @@ -5233,9 +5456,13 @@ class CellRendererProgress(CellRenderer, Orientable): ypad: int = ..., orientation: Orientation = ..., ): ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> CellRendererProgress: ... +@deprecated( + "List views use widgets to display their contents. You should use [class@Gtk.SpinButton] instead" +) class CellRendererSpin(CellRendererText): """ :Constructors: @@ -5460,9 +5687,13 @@ class CellRendererSpin(CellRendererText): yalign: float = ..., ypad: int = ..., ): ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> CellRendererSpin: ... +@deprecated( + "List views use widgets to display their contents. You should use [class@Gtk.Spinner] instead" +) class CellRendererSpinner(CellRenderer): """ :Constructors: @@ -5544,9 +5775,13 @@ class CellRendererSpinner(CellRenderer): yalign: float = ..., ypad: int = ..., ): ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> CellRendererSpinner: ... +@deprecated( + "List views use widgets to display their contents. You should use [class@Gtk.Inscription] or [class@Gtk.Label] instead" +) class CellRendererText(CellRenderer): """ :Constructors: @@ -5762,8 +5997,10 @@ class CellRendererText(CellRenderer): ypad: int = ..., ): ... def do_edited(self, path: str, new_text: str) -> None: ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> CellRendererText: ... + @deprecated("This method is deprecated") def set_fixed_height_from_font(self, number_of_rows: int) -> None: ... class CellRendererTextClass(GObject.GPointer): @@ -5779,6 +6016,9 @@ class CellRendererTextClass(GObject.GPointer): edited: Callable[[CellRendererText, str, str], None] = ... padding: list[None] = ... +@deprecated( + "List views use widgets to display their contents. You should use [class@Gtk.ToggleButton] instead" +) class CellRendererToggle(CellRenderer): """ :Constructors: @@ -5866,15 +6106,25 @@ class CellRendererToggle(CellRenderer): yalign: float = ..., ypad: int = ..., ): ... + @deprecated("This method is deprecated") def get_activatable(self) -> bool: ... + @deprecated("This method is deprecated") def get_active(self) -> bool: ... + @deprecated("This method is deprecated") def get_radio(self) -> bool: ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> CellRendererToggle: ... + @deprecated("This method is deprecated") def set_activatable(self, setting: bool) -> None: ... + @deprecated("This method is deprecated") def set_active(self, setting: bool) -> None: ... + @deprecated("This method is deprecated") def set_radio(self, radio: bool) -> None: ... +@deprecated( + "List views use widgets to display their contents. You can use [class@Gtk.Box] instead" +) class CellView(Widget, Accessible, Buildable, CellLayout, ConstraintTarget, Orientable): """ :Constructors: @@ -6034,23 +6284,36 @@ class CellView(Widget, Accessible, Buildable, CellLayout, ConstraintTarget, Orie accessible_role: AccessibleRole = ..., orientation: Orientation = ..., ): ... + @deprecated("This method is deprecated") def get_displayed_row(self) -> Optional[TreePath]: ... + @deprecated("This method is deprecated") def get_draw_sensitive(self) -> bool: ... + @deprecated("This method is deprecated") def get_fit_model(self) -> bool: ... + @deprecated("This method is deprecated") def get_model(self) -> Optional[TreeModel]: ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> CellView: ... + @deprecated("This method is deprecated") @classmethod def new_with_context(cls, area: CellArea, context: CellAreaContext) -> CellView: ... + @deprecated("This method is deprecated") @classmethod def new_with_markup(cls, markup: str) -> CellView: ... + @deprecated("This method is deprecated") @classmethod def new_with_text(cls, text: str) -> CellView: ... + @deprecated("This method is deprecated") @classmethod def new_with_texture(cls, texture: Gdk.Texture) -> CellView: ... + @deprecated("This method is deprecated") def set_displayed_row(self, path: Optional[TreePath] = None) -> None: ... + @deprecated("This method is deprecated") def set_draw_sensitive(self, draw_sensitive: bool) -> None: ... + @deprecated("This method is deprecated") def set_fit_model(self, fit_model: bool) -> None: ... + @deprecated("This method is deprecated") def set_model(self, model: Optional[TreeModel] = None) -> None: ... class CenterBox(Widget, Accessible, Buildable, ConstraintTarget, Orientable): @@ -6490,6 +6753,7 @@ class ClosureExpression(Expression): params: Optional[Sequence[Expression]] = None, ) -> ClosureExpression: ... +@deprecated("Use [class@Gtk.ColorDialogButton] instead") class ColorButton(Widget, Accessible, Buildable, ColorChooser, ConstraintTarget): """ :Constructors: @@ -6649,15 +6913,23 @@ class ColorButton(Widget, Accessible, Buildable, ColorChooser, ConstraintTarget) rgba: Gdk.RGBA = ..., use_alpha: bool = ..., ): ... + @deprecated("Use [class@Gtk.ColorDialogButton] instead") def get_modal(self) -> bool: ... + @deprecated("Use [class@Gtk.ColorDialogButton] instead") def get_title(self) -> str: ... + @deprecated("Use [class@Gtk.ColorDialogButton] instead") @classmethod def new(cls) -> ColorButton: ... @classmethod def new_with_rgba(cls, rgba: Gdk.RGBA) -> ColorButton: ... + @deprecated("Use [class@Gtk.ColorDialogButton] instead") def set_modal(self, modal: bool) -> None: ... + @deprecated("Use [class@Gtk.ColorDialogButton] instead") def set_title(self, title: str) -> None: ... +@deprecated( + "Use [class@Gtk.ColorDialog] and [class@Gtk.ColorDialogButton] instead of widgets implementing `GtkColorChooser`" +) class ColorChooser(GObject.GInterface): """ Interface GtkColorChooser @@ -6666,17 +6938,23 @@ class ColorChooser(GObject.GInterface): notify (GParam) """ + @deprecated("Use [class@Gtk.ColorDialog] instead") def add_palette( self, orientation: Orientation, colors_per_line: int, colors: Optional[Sequence[Gdk.RGBA]] = None, ) -> None: ... + @deprecated("Use [class@Gtk.ColorDialog] instead") def get_rgba(self) -> Gdk.RGBA: ... + @deprecated("Use [class@Gtk.ColorDialog] instead") def get_use_alpha(self) -> bool: ... + @deprecated("Use [class@Gtk.ColorDialog] instead") def set_rgba(self, color: Gdk.RGBA) -> None: ... + @deprecated("Use [class@Gtk.ColorDialog] instead") def set_use_alpha(self, use_alpha: bool) -> None: ... +@deprecated("Use [class@Gtk.ColorDialog] instead") class ColorChooserDialog( Dialog, Accessible, @@ -6925,6 +7203,7 @@ class ColorChooserDialog( rgba: Gdk.RGBA = ..., use_alpha: bool = ..., ): ... + @deprecated("Use [class@Gtk.ColorDialog] instead") @classmethod def new( cls, title: Optional[str] = None, parent: Optional[Window] = None @@ -6948,6 +7227,7 @@ class ColorChooserInterface(GObject.GPointer): color_activated: Callable[[ColorChooser, Gdk.RGBA], None] = ... padding: list[None] = ... +@deprecated("Direct use of `GtkColorChooserWidget` is deprecated.") class ColorChooserWidget(Widget, Accessible, Buildable, ColorChooser, ConstraintTarget): """ :Constructors: @@ -7776,6 +8056,7 @@ class ColumnViewSorterClass(GObject.GPointer): parent_class: SorterClass = ... +@deprecated("Use [class@Gtk.DropDown] instead") class ComboBox( Widget, Accessible, Buildable, CellEditable, CellLayout, ConstraintTarget ): @@ -7969,36 +8250,62 @@ class ComboBox( def do_activate(self) -> None: ... def do_changed(self) -> None: ... def do_format_entry_text(self, path: str) -> str: ... + @deprecated("Use [class@Gtk.DropDown]") def get_active(self) -> int: ... + @deprecated("Use [class@Gtk.DropDown]") def get_active_id(self) -> Optional[str]: ... def get_active_iter(self) -> Optional[TreeIter]: ... # CHECK Wrapped function + @deprecated("Use [class@Gtk.DropDown]") def get_button_sensitivity(self) -> SensitivityType: ... + @deprecated("Use [class@Gtk.DropDown]") def get_child(self) -> Optional[Widget]: ... + @deprecated("Use [class@Gtk.DropDown]") def get_entry_text_column(self) -> int: ... + @deprecated("Use [class@Gtk.DropDown]") def get_has_entry(self) -> bool: ... + @deprecated("Use [class@Gtk.DropDown]") def get_id_column(self) -> int: ... + @deprecated("Use [class@Gtk.DropDown]") def get_model(self) -> Optional[TreeModel]: ... + @deprecated("Use [class@Gtk.DropDown]") def get_popup_fixed_width(self) -> bool: ... + @deprecated("Use [class@Gtk.DropDown]") @classmethod def new(cls) -> ComboBox: ... + @deprecated("Use [class@Gtk.DropDown]") @classmethod def new_with_entry(cls) -> ComboBox: ... + @deprecated("Use [class@Gtk.DropDown]") @classmethod def new_with_model(cls, model: TreeModel) -> ComboBox: ... + @deprecated("Use [class@Gtk.DropDown]") @classmethod def new_with_model_and_entry(cls, model: TreeModel) -> ComboBox: ... + @deprecated("Use [class@Gtk.DropDown]") def popdown(self) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def popup(self) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def popup_for_device(self, device: Gdk.Device) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def set_active(self, index_: int) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def set_active_id(self, active_id: Optional[str] = None) -> bool: ... + @deprecated("Use [class@Gtk.DropDown]") def set_active_iter(self, iter: Optional[TreeIter] = None) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def set_button_sensitivity(self, sensitivity: SensitivityType) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def set_child(self, child: Optional[Widget] = None) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def set_entry_text_column(self, text_column: int) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def set_id_column(self, id_column: int) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def set_model(self, model: Optional[TreeModel] = None) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def set_popup_fixed_width(self, fixed: bool) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def set_row_separator_func( self, func: Optional[Callable[..., bool]] = None, *data: Any ) -> None: ... @@ -8018,6 +8325,7 @@ class ComboBoxClass(GObject.GPointer): activate: Callable[[ComboBox], None] = ... padding: list[None] = ... +@deprecated("Use [class@Gtk.DropDown] with a [class@Gtk.StringList] instead") class ComboBoxText( ComboBox, Accessible, Buildable, CellEditable, CellLayout, ConstraintTarget ): @@ -8209,18 +8517,29 @@ class ComboBoxText( accessible_role: AccessibleRole = ..., editing_canceled: bool = ..., ): ... + @deprecated("Use [class@Gtk.DropDown]") def append(self, id: Optional[str], text: str) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def append_text(self, text: str) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def get_active_text(self) -> Optional[str]: ... + @deprecated("Use [class@Gtk.DropDown]") def insert(self, position: int, id: Optional[str], text: str) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def insert_text(self, position: int, text: str) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") @classmethod def new(cls) -> ComboBoxText: ... + @deprecated("Use [class@Gtk.DropDown]") @classmethod def new_with_entry(cls) -> ComboBoxText: ... + @deprecated("Use [class@Gtk.DropDown]") def prepend(self, id: Optional[str], text: str) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def prepend_text(self, text: str) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def remove(self, position: int) -> None: ... + @deprecated("Use [class@Gtk.DropDown]") def remove_all(self) -> None: ... class ConstantExpression(Expression): @@ -8659,6 +8978,7 @@ class CustomSorterClass(GObject.GPointer): parent_class: SorterClass = ... +@deprecated("Use [class@Gtk.Window] instead") class Dialog( Window, Accessible, Buildable, ConstraintTarget, Native, Root, ShortcutManager ): @@ -8889,19 +9209,29 @@ class Dialog( width_request: int = ..., accessible_role: AccessibleRole = ..., ): ... + @deprecated("Use [class@Gtk.Window] instead") def add_action_widget(self, child: Widget, response_id: int) -> None: ... + @deprecated("Use [class@Gtk.Window] instead") def add_button(self, button_text: str, response_id: int) -> Widget: ... def add_buttons(self, *args): ... # FIXME Function def do_close(self) -> None: ... def do_response(self, response_id: int) -> None: ... + @deprecated("Use [class@Gtk.Window] instead") def get_content_area(self) -> Box: ... + @deprecated("Use [class@Gtk.Window] instead") def get_header_bar(self) -> HeaderBar: ... + @deprecated("Use [class@Gtk.Window] instead") def get_response_for_widget(self, widget: Widget) -> int: ... + @deprecated("Use [class@Gtk.Window] instead") def get_widget_for_response(self, response_id: int) -> Optional[Widget]: ... + @deprecated("Use [class@Gtk.Window] instead") @classmethod def new(cls) -> Dialog: ... + @deprecated("Use [class@Gtk.Window] instead") def response(self, response_id: int) -> None: ... + @deprecated("Use [class@Gtk.Window] instead") def set_default_response(self, response_id: int) -> None: ... + @deprecated("Use [class@Gtk.Window] instead") def set_response_sensitive(self, response_id: int, setting: bool) -> None: ... class DialogClass(GObject.GPointer): @@ -9731,6 +10061,7 @@ class DropTarget(EventController): ): ... def get_actions(self) -> Gdk.DragAction: ... def get_current_drop(self) -> Optional[Gdk.Drop]: ... + @deprecated("Use [method@Gtk.DropTarget.get_current_drop] instead") def get_drop(self) -> Optional[Gdk.Drop]: ... def get_formats(self) -> Optional[Gdk.ContentFormats]: ... def get_gtypes(self) -> Optional[list[Type]]: ... @@ -10514,6 +10845,7 @@ class Entry(Widget, Accessible, Buildable, CellEditable, ConstraintTarget, Edita def get_alignment(self) -> float: ... def get_attributes(self) -> Optional[Pango.AttrList]: ... def get_buffer(self) -> EntryBuffer: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def get_completion(self) -> Optional[EntryCompletion]: ... def get_current_icon_drag_source(self) -> int: ... def get_extra_menu(self) -> Optional[Gio.MenuModel]: ... @@ -10552,6 +10884,7 @@ class Entry(Widget, Accessible, Buildable, CellEditable, ConstraintTarget, Edita def set_alignment(self, xalign: float) -> None: ... def set_attributes(self, attrs: Pango.AttrList) -> None: ... def set_buffer(self, buffer: EntryBuffer) -> None: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def set_completion(self, completion: Optional[EntryCompletion] = None) -> None: ... def set_extra_menu(self, model: Optional[Gio.MenuModel] = None) -> None: ... def set_has_frame(self, setting: bool) -> None: ... @@ -10682,6 +11015,7 @@ class EntryClass(GObject.GPointer): activate: Callable[[Entry], None] = ... padding: list[None] = ... +@deprecated("This class is deprecated") class EntryCompletion(GObject.Object, Buildable, CellLayout): """ :Constructors: @@ -10738,31 +11072,55 @@ class EntryCompletion(GObject.Object, Buildable, CellLayout): popup_single_match: bool = ..., text_column: int = ..., ): ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def complete(self) -> None: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def compute_prefix(self, key: str) -> Optional[str]: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def get_completion_prefix(self) -> Optional[str]: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def get_entry(self) -> Widget: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def get_inline_completion(self) -> bool: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def get_inline_selection(self) -> bool: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def get_minimum_key_length(self) -> int: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def get_model(self) -> Optional[TreeModel]: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def get_popup_completion(self) -> bool: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def get_popup_set_width(self) -> bool: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def get_popup_single_match(self) -> bool: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def get_text_column(self) -> int: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def insert_prefix(self) -> None: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") @classmethod def new(cls) -> EntryCompletion: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") @classmethod def new_with_area(cls, area: CellArea) -> EntryCompletion: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def set_inline_completion(self, inline_completion: bool) -> None: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def set_inline_selection(self, inline_selection: bool) -> None: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def set_match_func(self, func: Callable[..., bool], *func_data: Any) -> None: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def set_minimum_key_length(self, length: int) -> None: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def set_model(self, model: Optional[TreeModel] = None) -> None: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def set_popup_completion(self, popup_completion: bool) -> None: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def set_popup_set_width(self, popup_set_width: bool) -> None: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def set_popup_single_match(self, popup_single_match: bool) -> None: ... + @deprecated("GtkEntryCompletion will be removed in GTK 5.") def set_text_column(self, column: int) -> None: ... class EventController(GObject.Object): @@ -11307,6 +11665,7 @@ class ExpressionWatch(GObject.GBoxed): def unref(self) -> None: ... def unwatch(self) -> None: ... +@deprecated("Use [class@Gtk.FileDialog] instead") class FileChooser(GObject.GInterface): """ Interface GtkFileChooser @@ -11315,6 +11674,7 @@ class FileChooser(GObject.GInterface): notify (GParam) """ + @deprecated("Use [class@Gtk.FileDialog] instead") def add_choice( self, id: str, @@ -11322,31 +11682,56 @@ class FileChooser(GObject.GInterface): options: Optional[Sequence[str]] = None, option_labels: Optional[Sequence[str]] = None, ) -> None: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def add_filter(self, filter: FileFilter) -> None: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def add_shortcut_folder(self, folder: Gio.File) -> bool: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_action(self) -> FileChooserAction: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_choice(self, id: str) -> Optional[str]: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_create_folders(self) -> bool: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_current_folder(self) -> Optional[Gio.File]: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_current_name(self) -> Optional[str]: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_file(self) -> Optional[Gio.File]: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_files(self) -> Gio.ListModel: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_filter(self) -> Optional[FileFilter]: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_filters(self) -> Gio.ListModel: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_select_multiple(self) -> bool: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_shortcut_folders(self) -> Gio.ListModel: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def remove_choice(self, id: str) -> None: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def remove_filter(self, filter: FileFilter) -> None: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def remove_shortcut_folder(self, folder: Gio.File) -> bool: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def set_action(self, action: FileChooserAction) -> None: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def set_choice(self, id: str, option: str) -> None: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def set_create_folders(self, create_folders: bool) -> None: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def set_current_folder(self, file: Optional[Gio.File] = None) -> bool: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def set_current_name(self, name: str) -> None: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def set_file(self, file: Gio.File) -> bool: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def set_filter(self, filter: FileFilter) -> None: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def set_select_multiple(self, select_multiple: bool) -> None: ... +@deprecated("Use [class@Gtk.FileDialog] instead") class FileChooserDialog( Dialog, Accessible, @@ -11593,6 +11978,7 @@ class FileChooserDialog( select_multiple: bool = ..., ): ... +@deprecated("Use [class@Gtk.FileDialog] instead") class FileChooserNative(NativeDialog, FileChooser): """ :Constructors: @@ -11648,8 +12034,11 @@ class FileChooserNative(NativeDialog, FileChooser): filter: FileFilter = ..., select_multiple: bool = ..., ): ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_accept_label(self) -> Optional[str]: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def get_cancel_label(self) -> Optional[str]: ... + @deprecated("Use [class@Gtk.FileDialog] instead") @classmethod def new( cls, @@ -11659,7 +12048,9 @@ class FileChooserNative(NativeDialog, FileChooser): accept_label: Optional[str] = None, cancel_label: Optional[str] = None, ) -> FileChooserNative: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def set_accept_label(self, accept_label: Optional[str] = None) -> None: ... + @deprecated("Use [class@Gtk.FileDialog] instead") def set_cancel_label(self, cancel_label: Optional[str] = None) -> None: ... class FileChooserNativeClass(GObject.GPointer): @@ -11673,6 +12064,7 @@ class FileChooserNativeClass(GObject.GPointer): parent_class: NativeDialogClass = ... +@deprecated("Direct use of `GtkFileChooserWidget` is deprecated") class FileChooserWidget(Widget, Accessible, Buildable, ConstraintTarget, FileChooser): """ :Constructors: @@ -11842,6 +12234,7 @@ class FileChooserWidget(Widget, Accessible, Buildable, ConstraintTarget, FileCho filter: FileFilter = ..., select_multiple: bool = ..., ): ... + @deprecated("Direct use of `GtkFileChooserWidget` is deprecated") @classmethod def new(cls, action: FileChooserAction) -> FileChooserWidget: ... @@ -12855,6 +13248,7 @@ class FlowBoxChildClass(GObject.GPointer): activate: Callable[[FlowBoxChild], None] = ... padding: list[None] = ... +@deprecated("Use [class@Gtk.FontDialogButton] instead") class FontButton(Widget, Accessible, Buildable, ConstraintTarget, FontChooser): """ :Constructors: @@ -13026,19 +13420,30 @@ class FontButton(Widget, Accessible, Buildable, ConstraintTarget, FontChooser): preview_text: str = ..., show_preview_entry: bool = ..., ): ... + @deprecated("Use [class@Gtk.FontDialogButton] instead") def get_modal(self) -> bool: ... + @deprecated("Use [class@Gtk.FontDialogButton] instead") def get_title(self) -> str: ... + @deprecated("Use [class@Gtk.FontDialogButton] instead") def get_use_font(self) -> bool: ... + @deprecated("Use [class@Gtk.FontDialogButton] instead") def get_use_size(self) -> bool: ... + @deprecated("Use [class@Gtk.FontDialogButton] instead") @classmethod def new(cls) -> FontButton: ... + @deprecated("Use [class@Gtk.FontDialogButton] instead") @classmethod def new_with_font(cls, fontname: str) -> FontButton: ... + @deprecated("Use [class@Gtk.FontDialogButton] instead") def set_modal(self, modal: bool) -> None: ... + @deprecated("Use [class@Gtk.FontDialogButton] instead") def set_title(self, title: str) -> None: ... + @deprecated("Use [class@Gtk.FontDialogButton] instead") def set_use_font(self, use_font: bool) -> None: ... + @deprecated("Use [class@Gtk.FontDialogButton] instead") def set_use_size(self, use_size: bool) -> None: ... +@deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") class FontChooser(GObject.GInterface): """ Interface GtkFontChooser @@ -13047,28 +13452,48 @@ class FontChooser(GObject.GInterface): notify (GParam) """ + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def get_font(self) -> Optional[str]: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def get_font_desc(self) -> Optional[Pango.FontDescription]: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def get_font_face(self) -> Optional[Pango.FontFace]: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def get_font_family(self) -> Optional[Pango.FontFamily]: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def get_font_features(self) -> str: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def get_font_map(self) -> Optional[Pango.FontMap]: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def get_font_size(self) -> int: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def get_language(self) -> str: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def get_level(self) -> FontChooserLevel: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def get_preview_text(self) -> str: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def get_show_preview_entry(self) -> bool: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def set_filter_func( self, filter: Optional[Callable[..., bool]] = None, *user_data: Any ) -> None: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def set_font(self, fontname: str) -> None: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def set_font_desc(self, font_desc: Pango.FontDescription) -> None: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def set_font_map(self, fontmap: Optional[Pango.FontMap] = None) -> None: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def set_language(self, language: str) -> None: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def set_level(self, level: FontChooserLevel) -> None: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def set_preview_text(self, text: str) -> None: ... + @deprecated("Use [class@Gtk.FontDialog] and [class@Gtk.FontDialogButton]instead") def set_show_preview_entry(self, show_preview_entry: bool) -> None: ... +@deprecated("Use [class@Gtk.FontDialog] instead") class FontChooserDialog( Dialog, Accessible, @@ -13321,6 +13746,7 @@ class FontChooserDialog( preview_text: str = ..., show_preview_entry: bool = ..., ): ... + @deprecated("Use [class@Gtk.FontDialog] instead") @classmethod def new( cls, title: Optional[str] = None, parent: Optional[Window] = None @@ -13345,6 +13771,7 @@ class FontChooserIface(GObject.GPointer): get_font_map: Callable[[FontChooser], Optional[Pango.FontMap]] = ... padding: list[None] = ... +@deprecated("Direct use of `GtkFontChooserWidget` is deprecated.") class FontChooserWidget(Widget, Accessible, Buildable, ConstraintTarget, FontChooser): """ :Constructors: @@ -13501,6 +13928,7 @@ class FontChooserWidget(Widget, Accessible, Buildable, ConstraintTarget, FontCho preview_text: str = ..., show_preview_entry: bool = ..., ): ... + @deprecated("Direct use of `GtkFontChooserWidget` is deprecated.") @classmethod def new(cls) -> FontChooserWidget: ... @@ -14149,6 +14577,7 @@ class GLArea(Widget, Accessible, Buildable, ConstraintTarget): def get_has_depth_buffer(self) -> bool: ... def get_has_stencil_buffer(self) -> bool: ... def get_required_version(self) -> Tuple[int, int]: ... + @deprecated("Use [method@Gtk.GLArea.get_api]") def get_use_es(self) -> bool: ... def make_current(self) -> None: ... @classmethod @@ -14160,6 +14589,7 @@ class GLArea(Widget, Accessible, Buildable, ConstraintTarget): def set_has_depth_buffer(self, has_depth_buffer: bool) -> None: ... def set_has_stencil_buffer(self, has_stencil_buffer: bool) -> None: ... def set_required_version(self, major: int, minor: int) -> None: ... + @deprecated("Use [method@Gtk.GLArea.set_allowed_apis]") def set_use_es(self, use_es: bool) -> None: ... class GLAreaClass(GObject.GPointer): @@ -14241,6 +14671,7 @@ class Gesture(EventController): def is_active(self) -> bool: ... def is_grouped_with(self, other: Gesture) -> bool: ... def is_recognized(self) -> bool: ... + @deprecated("Use [method@Gtk.Gesture.set_state]") def set_sequence_state( self, sequence: Gdk.EventSequence, state: EventSequenceState ) -> bool: ... @@ -15614,6 +16045,7 @@ class IMContext(GObject.Object): def reset(self) -> None: ... def set_client_widget(self, widget: Optional[Widget] = None) -> None: ... def set_cursor_location(self, area: Gdk.Rectangle) -> None: ... + @deprecated("Use [method@Gtk.IMContext.set_surrounding_with_selection] instead") def set_surrounding(self, text: str, len: int, cursor_index: int) -> None: ... def set_surrounding_with_selection( self, text: str, len: int, cursor_index: int, anchor_index: int @@ -15881,6 +16313,7 @@ class IconTheme(GObject.Object): def set_search_path(self, path: Optional[Sequence[str]] = None) -> None: ... def set_theme_name(self, theme_name: Optional[str] = None) -> None: ... +@deprecated("Use [class@Gtk.GridView] instead") class IconView(Widget, Accessible, Buildable, CellLayout, ConstraintTarget, Scrollable): """ :Constructors: @@ -16090,96 +16523,156 @@ class IconView(Widget, Accessible, Buildable, CellLayout, ConstraintTarget, Scro vadjustment: Optional[Adjustment] = ..., vscroll_policy: ScrollablePolicy = ..., ): ... + @deprecated("Use [class@Gtk.GridView] instead") def create_drag_icon(self, path: TreePath) -> Optional[Gdk.Paintable]: ... + @deprecated("Use [class@Gtk.GridView] instead") def enable_model_drag_dest( self, formats: Gdk.ContentFormats, actions: Gdk.DragAction ) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def enable_model_drag_source( self, start_button_mask: Gdk.ModifierType, formats: Gdk.ContentFormats, actions: Gdk.DragAction, ) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_activate_on_single_click(self) -> bool: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_cell_rect( self, path: TreePath, cell: Optional[CellRenderer] = None ) -> Tuple[bool, Gdk.Rectangle]: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_column_spacing(self) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_columns(self) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_cursor(self) -> Tuple[bool, TreePath, CellRenderer]: ... def get_dest_item_at_pos( self, drag_x: int, drag_y: int ) -> Optional[Tuple[TreePath, IconViewDropPosition]]: ... # CHECK Wrapped function + @deprecated("Use [class@Gtk.GridView] instead") def get_drag_dest_item(self) -> Tuple[TreePath, IconViewDropPosition]: ... def get_item_at_pos( self, x: int, y: int ) -> Optional[Tuple[TreePath, CellRenderer]]: ... # CHECK Wrapped function + @deprecated("Use [class@Gtk.GridView] instead") def get_item_column(self, path: TreePath) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_item_orientation(self) -> Orientation: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_item_padding(self) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_item_row(self, path: TreePath) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_item_width(self) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_margin(self) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_markup_column(self) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_model(self) -> Optional[TreeModel]: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_path_at_pos(self, x: int, y: int) -> Optional[TreePath]: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_pixbuf_column(self) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_reorderable(self) -> bool: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_row_spacing(self) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_selected_items(self) -> list[TreePath]: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_selection_mode(self) -> SelectionMode: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_spacing(self) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_text_column(self) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_tooltip_column(self) -> int: ... + @deprecated("Use [class@Gtk.GridView] instead") def get_tooltip_context( self, x: int, y: int, keyboard_tip: bool ) -> Tuple[bool, TreeModel, TreePath, TreeIter]: ... def get_visible_range( self, ) -> Optional[Tuple[TreePath, TreePath]]: ... # CHECK Wrapped function + @deprecated("Use [class@Gtk.GridView] instead") def item_activated(self, path: TreePath) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") @classmethod def new(cls) -> IconView: ... + @deprecated("Use [class@Gtk.GridView] instead") @classmethod def new_with_area(cls, area: CellArea) -> IconView: ... + @deprecated("Use [class@Gtk.GridView] instead") @classmethod def new_with_model(cls, model: TreeModel) -> IconView: ... + @deprecated("Use [class@Gtk.GridView] instead") def path_is_selected(self, path: TreePath) -> bool: ... + @deprecated("Use [class@Gtk.GridView] instead") def scroll_to_path( self, path: TreePath, use_align: bool, row_align: float, col_align: float ) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def select_all(self) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def select_path(self, path: TreePath) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def selected_foreach(self, func: Callable[..., None], *data: Any) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_activate_on_single_click(self, single: bool) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_column_spacing(self, column_spacing: int) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_columns(self, columns: int) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_cursor( self, path: TreePath, cell: Optional[CellRenderer], start_editing: bool ) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_drag_dest_item( self, path: Optional[TreePath], pos: IconViewDropPosition ) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_item_orientation(self, orientation: Orientation) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_item_padding(self, item_padding: int) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_item_width(self, item_width: int) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_margin(self, margin: int) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_markup_column(self, column: int) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_model(self, model: Optional[TreeModel] = None) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_pixbuf_column(self, column: int) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_reorderable(self, reorderable: bool) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_row_spacing(self, row_spacing: int) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_selection_mode(self, mode: SelectionMode) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_spacing(self, spacing: int) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_text_column(self, column: int) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_tooltip_cell( self, tooltip: Tooltip, path: TreePath, cell: Optional[CellRenderer] = None ) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_tooltip_column(self, column: int) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def set_tooltip_item(self, tooltip: Tooltip, path: TreePath) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def unselect_all(self) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def unselect_path(self, path: TreePath) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def unset_model_drag_dest(self) -> None: ... + @deprecated("Use [class@Gtk.GridView] instead") def unset_model_drag_source(self) -> None: ... class Image(Widget, Accessible, Buildable, ConstraintTarget): @@ -16369,6 +16862,9 @@ class Image(Widget, Accessible, Buildable, ConstraintTarget): def new_from_icon_name(cls, icon_name: Optional[str] = None) -> Image: ... @classmethod def new_from_paintable(cls, paintable: Optional[Gdk.Paintable] = None) -> Image: ... + @deprecated( + "Use [ctor@Gtk.Image.new_from_paintable] and [ctor@Gdk.Texture.new_for_pixbuf] instead" + ) @classmethod def new_from_pixbuf(cls, pixbuf: Optional[GdkPixbuf.Pixbuf] = None) -> Image: ... @classmethod @@ -16377,11 +16873,15 @@ class Image(Widget, Accessible, Buildable, ConstraintTarget): def set_from_gicon(self, icon: Gio.Icon) -> None: ... def set_from_icon_name(self, icon_name: Optional[str] = None) -> None: ... def set_from_paintable(self, paintable: Optional[Gdk.Paintable] = None) -> None: ... + @deprecated("Use [method@Gtk.Image.set_from_paintable] instead") def set_from_pixbuf(self, pixbuf: Optional[GdkPixbuf.Pixbuf] = None) -> None: ... def set_from_resource(self, resource_path: Optional[str] = None) -> None: ... def set_icon_size(self, icon_size: IconSize) -> None: ... def set_pixel_size(self, pixel_size: int) -> None: ... +@deprecated( + 'There is no replacement in GTK for an "info bar" widget; you can use [class@Gtk.Revealer] with a [class@Gtk.Box] containing a [class@Gtk.Label] and an optional [class@Gtk.Button], according to your application\'s design.' +) class InfoBar(Widget, Accessible, Buildable, ConstraintTarget): """ :Constructors: @@ -16533,21 +17033,36 @@ class InfoBar(Widget, Accessible, Buildable, ConstraintTarget): width_request: int = ..., accessible_role: AccessibleRole = ..., ): ... + @deprecated("This method is deprecated") def add_action_widget(self, child: Widget, response_id: int) -> None: ... + @deprecated("This method is deprecated") def add_button(self, button_text: str, response_id: int) -> Button: ... + @deprecated("This method is deprecated") def add_child(self, widget: Widget) -> None: ... + @deprecated("This method is deprecated") def get_message_type(self) -> MessageType: ... + @deprecated("This method is deprecated") def get_revealed(self) -> bool: ... + @deprecated("This method is deprecated") def get_show_close_button(self) -> bool: ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> InfoBar: ... + @deprecated("This method is deprecated") def remove_action_widget(self, widget: Widget) -> None: ... + @deprecated("This method is deprecated") def remove_child(self, widget: Widget) -> None: ... + @deprecated("This method is deprecated") def response(self, response_id: int) -> None: ... + @deprecated("This method is deprecated") def set_default_response(self, response_id: int) -> None: ... + @deprecated("This method is deprecated") def set_message_type(self, message_type: MessageType) -> None: ... + @deprecated("This method is deprecated") def set_response_sensitive(self, response_id: int, setting: bool) -> None: ... + @deprecated("This method is deprecated") def set_revealed(self, revealed: bool) -> None: ... + @deprecated("This method is deprecated") def set_show_close_button(self, setting: bool) -> None: ... class Inscription(Widget, Accessible, Buildable, ConstraintTarget): @@ -18151,6 +18666,7 @@ class ListItemClass(GObject.GPointer): ... class ListItemFactory(GObject.Object): ... class ListItemFactoryClass(GObject.GPointer): ... +@deprecated("Use [class@Gio.ListStore] instead") class ListStore( GObject.Object, Buildable, TreeDragDest, TreeDragSource, TreeModel, TreeSortable ): @@ -18181,31 +18697,42 @@ class ListStore( parent: GObject.Object = ... priv: ListStorePrivate = ... def append(self, row=None): ... # FIXME Function + @deprecated("Use list models") def clear(self) -> None: ... def insert(self, position, row=None): ... # FIXME Function def insert_after(self, sibling, row=None): ... # FIXME Function def insert_before(self, sibling, row=None): ... # FIXME Function + @deprecated("Use list models") def insert_with_values( self, position: int, columns: Sequence[int], values: Sequence[Any] ) -> TreeIter: ... + @deprecated("Use list models") def insert_with_valuesv( self, position: int, columns: Sequence[int], values: Sequence[Any] ) -> TreeIter: ... + @deprecated("Use list models") def iter_is_valid(self, iter: TreeIter) -> bool: ... + @deprecated("Use list models") def move_after( self, iter: TreeIter, position: Optional[TreeIter] = None ) -> None: ... + @deprecated("Use list models") def move_before( self, iter: TreeIter, position: Optional[TreeIter] = None ) -> None: ... + @deprecated("Use [class@Gio.ListStore] instead") @classmethod def new(cls, types: Sequence[Type]) -> ListStore: ... def prepend(self, row=None): ... # FIXME Function + @deprecated("Use list models") def remove(self, iter: TreeIter) -> bool: ... + @deprecated("Use list models") def reorder(self, new_order: Sequence[int]) -> None: ... def set(self, treeiter, *args): ... # FIXME Function + @deprecated("Use list models") def set_column_types(self, types: Sequence[Type]) -> None: ... def set_value(self, treeiter, column, value): ... # FIXME Function + @deprecated("Use list models") def swap(self, a: TreeIter, b: TreeIter) -> None: ... class ListStoreClass(GObject.GPointer): @@ -18425,6 +18952,7 @@ class ListView( class ListViewClass(GObject.GPointer): ... +@deprecated("This widget will be removed in GTK 5") class LockButton(Button, Accessible, Actionable, Buildable, ConstraintTarget): """ :Constructors: @@ -18609,9 +19137,12 @@ class LockButton(Button, Accessible, Actionable, Buildable, ConstraintTarget): action_name: Optional[str] = ..., action_target: GLib.Variant = ..., ): ... + @deprecated("This widget will be removed in GTK 5") def get_permission(self) -> Optional[Gio.Permission]: ... + @deprecated("This widget will be removed in GTK 5") @classmethod def new(cls, permission: Optional[Gio.Permission] = None) -> LockButton: ... + @deprecated("This widget will be removed in GTK 5") def set_permission(self, permission: Optional[Gio.Permission] = None) -> None: ... class MapListModel(GObject.Object, Gio.ListModel, SectionModel): @@ -19270,6 +19801,7 @@ class MenuButton(Widget, Accessible, Buildable, ConstraintTarget): def set_primary(self, primary: bool) -> None: ... def set_use_underline(self, use_underline: bool) -> None: ... +@deprecated("Use [class@Gtk.AlertDialog] instead") class MessageDialog( Dialog, Accessible, Buildable, ConstraintTarget, Native, Root, ShortcutManager ): @@ -19521,7 +20053,9 @@ class MessageDialog( width_request: int = ..., accessible_role: AccessibleRole = ..., ): ... + @deprecated("Use [class@Gtk.AlertDialog] instead") def get_message_area(self) -> Widget: ... + @deprecated("Use [class@Gtk.AlertDialog] instead") def set_markup(self, str: str) -> None: ... class MessageDialogClass(GObject.GPointer): ... @@ -21654,6 +22188,9 @@ class Picture(Widget, Accessible, Buildable, ConstraintTarget): def get_can_shrink(self) -> bool: ... def get_content_fit(self) -> ContentFit: ... def get_file(self) -> Optional[Gio.File]: ... + @deprecated( + "Use [method@Gtk.Picture.get_content_fit] instead. This will now return `FALSE` only if [property@Gtk.Picture:content-fit] is `GTK_CONTENT_FIT_FILL`. Returns `TRUE` otherwise." + ) def get_keep_aspect_ratio(self) -> bool: ... def get_paintable(self) -> Optional[Gdk.Paintable]: ... @classmethod @@ -21666,6 +22203,9 @@ class Picture(Widget, Accessible, Buildable, ConstraintTarget): def new_for_paintable( cls, paintable: Optional[Gdk.Paintable] = None ) -> Picture: ... + @deprecated( + "Use [ctor@Gtk.Picture.new_for_paintable] and [ctor@Gdk.Texture.new_for_pixbuf] instead" + ) @classmethod def new_for_pixbuf(cls, pixbuf: Optional[GdkPixbuf.Pixbuf] = None) -> Picture: ... @classmethod @@ -21675,8 +22215,12 @@ class Picture(Widget, Accessible, Buildable, ConstraintTarget): def set_content_fit(self, content_fit: ContentFit) -> None: ... def set_file(self, file: Optional[Gio.File] = None) -> None: ... def set_filename(self, filename: Optional[str] = None) -> None: ... + @deprecated( + "Use [method@Gtk.Picture.set_content_fit] instead. If still used, this method will always set the [property@Gtk.Picture:content-fit] property to `GTK_CONTENT_FIT_CONTAIN` if @keep_aspect_ratio is true, otherwise it will set it to `GTK_CONTENT_FIT_FILL`." + ) def set_keep_aspect_ratio(self, keep_aspect_ratio: bool) -> None: ... def set_paintable(self, paintable: Optional[Gdk.Paintable] = None) -> None: ... + @deprecated("Use [method@Gtk.Picture.set_paintable] instead") def set_pixbuf(self, pixbuf: Optional[GdkPixbuf.Pixbuf] = None) -> None: ... def set_resource(self, resource_path: Optional[str] = None) -> None: ... @@ -26772,15 +27316,19 @@ class Snapshot(Gdk.Snapshot): ) -> None: ... def push_rounded_clip(self, bounds: Gsk.RoundedRect) -> None: ... def push_shadow(self, shadow: Sequence[Gsk.Shadow]) -> None: ... + @deprecated("This method is deprecated") def render_background( self, context: StyleContext, x: float, y: float, width: float, height: float ) -> None: ... + @deprecated("This method is deprecated") def render_focus( self, context: StyleContext, x: float, y: float, width: float, height: float ) -> None: ... + @deprecated("This method is deprecated") def render_frame( self, context: StyleContext, x: float, y: float, width: float, height: float ) -> None: ... + @deprecated("This method is deprecated") def render_insertion_cursor( self, context: StyleContext, @@ -26790,6 +27338,7 @@ class Snapshot(Gdk.Snapshot): index: int, direction: Pango.Direction, ) -> None: ... + @deprecated("This method is deprecated") def render_layout( self, context: StyleContext, x: float, y: float, layout: Pango.Layout ) -> None: ... @@ -27864,6 +28413,7 @@ class StackSwitcher(Widget, Accessible, Buildable, ConstraintTarget, Orientable) def new(cls) -> StackSwitcher: ... def set_stack(self, stack: Optional[Stack] = None) -> None: ... +@deprecated("This widget will be removed in GTK 5") class Statusbar(Widget, Accessible, Buildable, ConstraintTarget): """ :Constructors: @@ -28004,12 +28554,18 @@ class Statusbar(Widget, Accessible, Buildable, ConstraintTarget): width_request: int = ..., accessible_role: AccessibleRole = ..., ): ... + @deprecated("This widget will be removed in GTK 5") def get_context_id(self, context_description: str) -> int: ... + @deprecated("This widget will be removed in GTK 5") @classmethod def new(cls) -> Statusbar: ... + @deprecated("This widget will be removed in GTK 5") def pop(self, context_id: int) -> None: ... + @deprecated("This widget will be removed in GTK 5") def push(self, context_id: int, text: str) -> int: ... + @deprecated("This widget will be removed in GTK 5") def remove(self, context_id: int, message_id: int) -> None: ... + @deprecated("This widget will be removed in GTK 5") def remove_all(self, context_id: int) -> None: ... class StringFilter(Filter): @@ -28207,6 +28763,9 @@ class StringSorterClass(GObject.GPointer): parent_class: SorterClass = ... +@deprecated( + "The relevant API has been moved to [class@Gtk.Widget] where applicable; otherwise, there is no replacement for querying the style machinery. Stylable UI elements should use widgets." +) class StyleContext(GObject.Object): """ :Constructors: @@ -28229,33 +28788,51 @@ class StyleContext(GObject.Object): props: Props = ... parent_object: GObject.Object = ... def __init__(self, display: Gdk.Display = ...): ... + @deprecated("Use [method@Gtk.Widget.add_css_class] instead") def add_class(self, class_name: str) -> None: ... + @deprecated("Use style classes instead") def add_provider(self, provider: StyleProvider, priority: int) -> None: ... @staticmethod def add_provider_for_display( display: Gdk.Display, provider: StyleProvider, priority: int ) -> None: ... def do_changed(self) -> None: ... + @deprecated("This api will be removed in GTK 5") def get_border(self) -> Border: ... + @deprecated("Use [method@Gtk.Widget.get_color] instead") def get_color(self) -> Gdk.RGBA: ... + @deprecated("Use [method@Gtk.Widget.get_display] instead") def get_display(self) -> Gdk.Display: ... + @deprecated("This api will be removed in GTK 5") def get_margin(self) -> Border: ... + @deprecated("This api will be removed in GTK 5") def get_padding(self) -> Border: ... def get_scale(self) -> int: ... + @deprecated("Use [method@Gtk.Widget.get_state_flags] instead") def get_state(self) -> StateFlags: ... + @deprecated("Use [method@Gtk.Widget.has_css_class] instead") def has_class(self, class_name: str) -> bool: ... + @deprecated("This api will be removed in GTK 5") def lookup_color(self, color_name: str) -> Tuple[bool, Gdk.RGBA]: ... + @deprecated("Use [method@Gtk.Widget.remove_css_class] instead") def remove_class(self, class_name: str) -> None: ... + @deprecated("This method is deprecated") def remove_provider(self, provider: StyleProvider) -> None: ... @staticmethod def remove_provider_for_display( display: Gdk.Display, provider: StyleProvider ) -> None: ... + @deprecated("This API will be removed in GTK 5") def restore(self) -> None: ... + @deprecated("This API will be removed in GTK 5") def save(self) -> None: ... + @deprecated("You should not use this api") def set_display(self, display: Gdk.Display) -> None: ... + @deprecated("You should not use this api") def set_scale(self, scale: int) -> None: ... + @deprecated("You should not use this api") def set_state(self, flags: StateFlags) -> None: ... + @deprecated("This api will be removed in GTK 5") def to_string(self, flags: StyleContextPrintFlags) -> str: ... class StyleContextClass(GObject.GPointer): @@ -30079,6 +30656,9 @@ class ToggleButton(Button, Accessible, Actionable, Buildable, ConstraintTarget): def new_with_mnemonic(cls, label: str) -> ToggleButton: ... def set_active(self, is_active: bool) -> None: ... def set_group(self, group: Optional[ToggleButton] = None) -> None: ... + @deprecated( + "There is no good reason for an application ever to call this function." + ) def toggled(self) -> None: ... class ToggleButtonClass(GObject.GPointer): @@ -30116,12 +30696,17 @@ class Tooltip(GObject.Object): def set_text(self, text: Optional[str] = None) -> None: ... def set_tip_area(self, rect: Gdk.Rectangle) -> None: ... +@deprecated( + "List views use widgets to display their contents. You can use [class@Gtk.DropTarget] to implement a drop destination" +) class TreeDragDest(GObject.GInterface): """ Interface GtkTreeDragDest """ + @deprecated("Use list models instead") def drag_data_received(self, dest: TreePath, value: Any) -> bool: ... + @deprecated("Use list models instead") def row_drop_possible(self, dest_path: TreePath, value: Any) -> bool: ... class TreeDragDestIface(GObject.GPointer): @@ -30137,13 +30722,19 @@ class TreeDragDestIface(GObject.GPointer): drag_data_received: Callable[[TreeDragDest, TreePath, Any], bool] = ... row_drop_possible: Callable[[TreeDragDest, TreePath, Any], bool] = ... +@deprecated( + "List views use widgets to display their contents. You can use [class@Gtk.DragSource] to implement a drag source" +) class TreeDragSource(GObject.GInterface): """ Interface GtkTreeDragSource """ + @deprecated("Use list models instead") def drag_data_delete(self, path: TreePath) -> bool: ... + @deprecated("Use list models instead") def drag_data_get(self, path: TreePath) -> Optional[Gdk.ContentProvider]: ... + @deprecated("Use list models instead") def row_draggable(self, path: TreePath) -> bool: ... class TreeDragSourceIface(GObject.GPointer): @@ -30355,7 +30946,9 @@ class TreeIter(GObject.GBoxed): user_data: None = ... user_data2: None = ... user_data3: None = ... + @deprecated("This method is deprecated") def copy(self) -> TreeIter: ... + @deprecated("This method is deprecated") def free(self) -> None: ... class TreeListModel(GObject.Object, Gio.ListModel): @@ -30509,6 +31102,7 @@ class TreeListRowSorterClass(GObject.GPointer): parent_class: SorterClass = ... +@deprecated("Use [iface@Gio.ListModel] instead") class TreeModel(GObject.GInterface): """ Interface GtkTreeModel @@ -30517,24 +31111,34 @@ class TreeModel(GObject.GInterface): notify (GParam) """ + @deprecated("This method is deprecated") def filter_new(self, root: Optional[TreePath] = None) -> TreeModel: ... + @deprecated("This method is deprecated") def foreach(self, func: Callable[..., bool], *user_data: Any) -> None: ... def get(self, treeiter, *columns): ... # FIXME Function + @deprecated("This method is deprecated") def get_column_type(self, index_: int) -> Type: ... + @deprecated("This method is deprecated") def get_flags(self) -> TreeModelFlags: ... def get_iter(self, path): ... # FIXME Function def get_iter_first(self) -> Optional[TreeIter]: ... # CHECK Wrapped function def get_iter_from_string( self, path_string: str ) -> Optional[TreeIter]: ... # CHECK Wrapped function + @deprecated("This method is deprecated") def get_n_columns(self) -> int: ... + @deprecated("This method is deprecated") def get_path(self, iter: TreeIter) -> TreePath: ... + @deprecated("This method is deprecated") def get_string_from_iter(self, iter: TreeIter) -> Optional[str]: ... + @deprecated("This method is deprecated") def get_value(self, iter: TreeIter, column: int) -> Any: ... def iter_children( self, parent: Optional[TreeIter] = None ) -> Optional[TreeIter]: ... # CHECK Wrapped function + @deprecated("This method is deprecated") def iter_has_child(self, iter: TreeIter) -> bool: ... + @deprecated("This method is deprecated") def iter_n_children(self, iter: Optional[TreeIter] = None) -> int: ... def iter_next(self, aiter): ... # FIXME Function def iter_nth_child( @@ -30544,6 +31148,7 @@ class TreeModel(GObject.GInterface): self, child: TreeIter ) -> Optional[TreeIter]: ... # CHECK Wrapped function def iter_previous(self, aiter): ... # FIXME Function + @deprecated("This method is deprecated") def ref_node(self, iter: TreeIter) -> None: ... def row_changed(self, path, iter): ... # FIXME Function def row_deleted(self, path): ... # FIXME Function @@ -30552,8 +31157,10 @@ class TreeModel(GObject.GInterface): def rows_reordered(self, path, iter, new_order): ... # FIXME Function def set_row(self, treeiter, row): ... # FIXME Function def sort_new_with_model(self): ... # FIXME Function + @deprecated("This method is deprecated") def unref_node(self, iter: TreeIter) -> None: ... +@deprecated("Use [class@Gtk.FilterListModel] instead.") class TreeModelFilter(GObject.Object, TreeDragSource, TreeModel): """ :Constructors: @@ -30586,14 +31193,19 @@ class TreeModelFilter(GObject.Object, TreeDragSource, TreeModel): parent: GObject.Object = ... priv: TreeModelFilterPrivate = ... def __init__(self, child_model: TreeModel = ..., virtual_root: TreePath = ...): ... + @deprecated("This method is deprecated") def clear_cache(self) -> None: ... + @deprecated("This method is deprecated") def convert_child_iter_to_iter( self, child_iter: TreeIter ) -> Tuple[bool, TreeIter]: ... + @deprecated("This method is deprecated") def convert_child_path_to_path( self, child_path: TreePath ) -> Optional[TreePath]: ... + @deprecated("This method is deprecated") def convert_iter_to_child_iter(self, filter_iter: TreeIter) -> TreeIter: ... + @deprecated("This method is deprecated") def convert_path_to_child_path( self, filter_path: TreePath ) -> Optional[TreePath]: ... @@ -30601,12 +31213,16 @@ class TreeModelFilter(GObject.Object, TreeDragSource, TreeModel): self, child_model: TreeModel, iter: TreeIter, value: Any, column: int ) -> None: ... def do_visible(self, child_model: TreeModel, iter: TreeIter) -> bool: ... + @deprecated("This method is deprecated") def get_model(self) -> TreeModel: ... + @deprecated("This method is deprecated") def refilter(self) -> None: ... + @deprecated("This method is deprecated") def set_modify_func( self, types: Sequence[Type], func: Callable[..., Any], *data: Any ) -> None: ... def set_value(self, iter, column, value): ... # FIXME Function + @deprecated("This method is deprecated") def set_visible_column(self, column: int) -> None: ... def set_visible_func(self, func, data=None): ... # FIXME Function @@ -30674,6 +31290,7 @@ class TreeModelRow: class TreeModelRowIter: ... +@deprecated("Use [class@Gtk.SortListModel] instead") class TreeModelSort(GObject.Object, TreeDragSource, TreeModel, TreeSortable): """ :Constructors: @@ -30708,21 +31325,28 @@ class TreeModelSort(GObject.Object, TreeDragSource, TreeModel, TreeSortable): parent: GObject.Object = ... priv: TreeModelSortPrivate = ... def __init__(self, model: TreeModel = ...): ... + @deprecated("This method is deprecated") def clear_cache(self) -> None: ... + @deprecated("This method is deprecated") def convert_child_iter_to_iter( self, child_iter: TreeIter ) -> Tuple[bool, TreeIter]: ... + @deprecated("This method is deprecated") def convert_child_path_to_path( self, child_path: TreePath ) -> Optional[TreePath]: ... + @deprecated("This method is deprecated") def convert_iter_to_child_iter(self, sorted_iter: TreeIter) -> TreeIter: ... + @deprecated("This method is deprecated") def convert_path_to_child_path( self, sorted_path: TreePath ) -> Optional[TreePath]: ... def get_model(self) -> TreeModel: ... + @deprecated("This method is deprecated") def iter_is_valid(self, iter: TreeIter) -> bool: ... @classmethod def new_with_model(cls, child_model: TreeModel) -> TreeModelSort: ... + @deprecated("This method is deprecated") def reset_default_sort_func(self) -> None: ... class TreeModelSortClass(GObject.GPointer): @@ -30751,27 +31375,45 @@ class TreePath(GObject.GBoxed): new_from_string(path:str) -> Gtk.TreePath or None """ + @deprecated("This method is deprecated") def append_index(self, index_: int) -> None: ... + @deprecated("This method is deprecated") def compare(self, b: TreePath) -> int: ... + @deprecated("This method is deprecated") def copy(self) -> TreePath: ... + @deprecated("This method is deprecated") def down(self) -> None: ... + @deprecated("This method is deprecated") def free(self) -> None: ... + @deprecated("This method is deprecated") def get_depth(self) -> int: ... + @deprecated("This method is deprecated") def get_indices(self) -> Optional[list[int]]: ... + @deprecated("This method is deprecated") def is_ancestor(self, descendant: TreePath) -> bool: ... + @deprecated("This method is deprecated") def is_descendant(self, ancestor: TreePath) -> bool: ... + @deprecated("This method is deprecated") @classmethod def new(cls) -> TreePath: ... + @deprecated("This method is deprecated") @classmethod def new_first(cls) -> TreePath: ... + @deprecated("This method is deprecated") @classmethod def new_from_indices(cls, indices: Sequence[int]) -> TreePath: ... + @deprecated("This method is deprecated") @classmethod def new_from_string(cls, path: str) -> Optional[TreePath]: ... + @deprecated("This method is deprecated") def next(self) -> None: ... + @deprecated("This method is deprecated") def prepend_index(self, index_: int) -> None: ... + @deprecated("This method is deprecated") def prev(self) -> bool: ... + @deprecated("This method is deprecated") def to_string(self) -> Optional[str]: ... + @deprecated("This method is deprecated") def up(self) -> bool: ... class TreeRowData(GObject.GBoxed): ... @@ -30786,22 +31428,32 @@ class TreeRowReference(GObject.GBoxed): new_proxy(proxy:GObject.Object, model:Gtk.TreeModel, path:Gtk.TreePath) -> Gtk.TreeRowReference or None """ + @deprecated("This method is deprecated") def copy(self) -> TreeRowReference: ... + @deprecated("This method is deprecated") @staticmethod def deleted(proxy: GObject.Object, path: TreePath) -> None: ... + @deprecated("This method is deprecated") def free(self) -> None: ... + @deprecated("This method is deprecated") def get_model(self) -> TreeModel: ... + @deprecated("This method is deprecated") def get_path(self) -> Optional[TreePath]: ... + @deprecated("This method is deprecated") @staticmethod def inserted(proxy: GObject.Object, path: TreePath) -> None: ... + @deprecated("This method is deprecated") @classmethod def new(cls, model: TreeModel, path: TreePath) -> Optional[TreeRowReference]: ... + @deprecated("This method is deprecated") @classmethod def new_proxy( cls, proxy: GObject.Object, model: TreeModel, path: TreePath ) -> Optional[TreeRowReference]: ... + @deprecated("This method is deprecated") def valid(self) -> bool: ... +@deprecated("Use [iface@Gtk.SelectionModel] instead") class TreeSelection(GObject.Object): """ :Constructors: @@ -30826,27 +31478,45 @@ class TreeSelection(GObject.Object): mode: SelectionMode props: Props = ... def __init__(self, mode: SelectionMode = ...): ... + @deprecated("Use GtkListView or GtkColumnView") def count_selected_rows(self) -> int: ... + @deprecated("Use GtkListView or GtkColumnView") def get_mode(self) -> SelectionMode: ... def get_selected(self): ... # FIXME Function def get_selected_rows(self): ... # FIXME Function + @deprecated("Use GtkListView or GtkColumnView") def get_tree_view(self) -> TreeView: ... + @deprecated("Use GtkListView or GtkColumnView") def iter_is_selected(self, iter: TreeIter) -> bool: ... + @deprecated("Use GtkListView or GtkColumnView") def path_is_selected(self, path: TreePath) -> bool: ... + @deprecated("Use GtkListView or GtkColumnView") def select_all(self) -> None: ... + @deprecated("Use GtkListView or GtkColumnView") def select_iter(self, iter: TreeIter) -> None: ... def select_path(self, path): ... # FIXME Function + @deprecated("Use GtkListView or GtkColumnView") def select_range(self, start_path: TreePath, end_path: TreePath) -> None: ... + @deprecated("Use GtkListView or GtkColumnView") def selected_foreach(self, func: Callable[..., None], *data: Any) -> None: ... + @deprecated("Use GtkListView or GtkColumnView") def set_mode(self, type: SelectionMode) -> None: ... + @deprecated("Use GtkListView or GtkColumnView") def set_select_function( self, func: Optional[Callable[..., bool]] = None, *data: Any ) -> None: ... + @deprecated("Use GtkListView or GtkColumnView") def unselect_all(self) -> None: ... + @deprecated("Use GtkListView or GtkColumnView") def unselect_iter(self, iter: TreeIter) -> None: ... + @deprecated("Use GtkListView or GtkColumnView") def unselect_path(self, path: TreePath) -> None: ... + @deprecated("Use GtkListView or GtkColumnView") def unselect_range(self, start_path: TreePath, end_path: TreePath) -> None: ... +@deprecated( + "There is no replacement for this interface. You should use [class@Gtk.SortListModel] to wrap your list model instead" +) class TreeSortable(GObject.GInterface): """ Interface GtkTreeSortable @@ -30858,12 +31528,15 @@ class TreeSortable(GObject.GInterface): def get_sort_column_id( self, ) -> Tuple[int, SortType] | Tuple[None, None]: ... # CHECK Wrapped function + @deprecated("This method is deprecated") def has_default_sort_func(self) -> bool: ... def set_default_sort_func(self, sort_func, user_data=None): ... # FIXME Function + @deprecated("This method is deprecated") def set_sort_column_id(self, sort_column_id: int, order: SortType) -> None: ... def set_sort_func( self, sort_column_id, sort_func, user_data=None ): ... # FIXME Function + @deprecated("This method is deprecated") def sort_column_changed(self) -> None: ... class TreeSortableIface(GObject.GPointer): @@ -30883,6 +31556,7 @@ class TreeSortableIface(GObject.GPointer): set_default_sort_func: Callable[..., None] = ... has_default_sort_func: Callable[[TreeSortable], bool] = ... +@deprecated("Use [class@Gtk.TreeListModel] instead") class TreeStore( GObject.Object, Buildable, TreeDragDest, TreeDragSource, TreeModel, TreeSortable ): @@ -30913,10 +31587,12 @@ class TreeStore( parent: GObject.Object = ... priv: TreeStorePrivate = ... def append(self, parent, row=None): ... # FIXME Function + @deprecated("Use [class@Gtk.TreeListModel] instead") def clear(self) -> None: ... def insert(self, parent, position, row=None): ... # FIXME Function def insert_after(self, parent, sibling, row=None): ... # FIXME Function def insert_before(self, parent, sibling, row=None): ... # FIXME Function + @deprecated("Use [class@Gtk.TreeListModel] instead") def insert_with_values( self, parent: Optional[TreeIter], @@ -30924,22 +31600,31 @@ class TreeStore( columns: Sequence[int], values: Sequence[Any], ) -> TreeIter: ... + @deprecated("Use [class@Gtk.TreeListModel] instead") def is_ancestor(self, iter: TreeIter, descendant: TreeIter) -> bool: ... + @deprecated("Use [class@Gtk.TreeListModel] instead") def iter_depth(self, iter: TreeIter) -> int: ... + @deprecated("Use [class@Gtk.TreeListModel] instead") def iter_is_valid(self, iter: TreeIter) -> bool: ... + @deprecated("Use [class@Gtk.TreeListModel] instead") def move_after( self, iter: TreeIter, position: Optional[TreeIter] = None ) -> None: ... + @deprecated("Use [class@Gtk.TreeListModel] instead") def move_before( self, iter: TreeIter, position: Optional[TreeIter] = None ) -> None: ... + @deprecated("Use [class@Gtk.TreeListModel] instead") @classmethod def new(cls, types: Sequence[Type]) -> TreeStore: ... def prepend(self, parent, row=None): ... # FIXME Function + @deprecated("Use [class@Gtk.TreeListModel] instead") def remove(self, iter: TreeIter) -> bool: ... def set(self, treeiter, *args): ... # FIXME Function + @deprecated("Use [class@Gtk.TreeListModel] instead") def set_column_types(self, types: Sequence[Type]) -> None: ... def set_value(self, treeiter, column, value): ... # FIXME Function + @deprecated("Use [class@Gtk.TreeListModel] instead") def swap(self, a: TreeIter, b: TreeIter) -> None: ... class TreeStoreClass(GObject.GPointer): @@ -30956,6 +31641,9 @@ class TreeStoreClass(GObject.GPointer): class TreeStorePrivate(GObject.GPointer): ... +@deprecated( + "Use [class@Gtk.ListView] for lists, and [class@Gtk.ColumnView] for tabular lists" +) class TreeView(Widget, Accessible, Buildable, ConstraintTarget, Scrollable): """ :Constructors: @@ -31172,24 +31860,35 @@ class TreeView(Widget, Accessible, Buildable, ConstraintTarget, Scrollable): vadjustment: Optional[Adjustment] = ..., vscroll_policy: ScrollablePolicy = ..., ): ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def append_column(self, column: TreeViewColumn) -> int: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def collapse_all(self) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def collapse_row(self, path: TreePath) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def columns_autosize(self) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def convert_bin_window_to_tree_coords( self, bx: int, by: int ) -> Tuple[int, int]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def convert_bin_window_to_widget_coords( self, bx: int, by: int ) -> Tuple[int, int]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def convert_tree_to_bin_window_coords( self, tx: int, ty: int ) -> Tuple[int, int]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def convert_tree_to_widget_coords(self, tx: int, ty: int) -> Tuple[int, int]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def convert_widget_to_bin_window_coords( self, wx: int, wy: int ) -> Tuple[int, int]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def convert_widget_to_tree_coords(self, wx: int, wy: int) -> Tuple[int, int]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def create_row_drag_icon(self, path: TreePath) -> Optional[Gdk.Paintable]: ... def do_columns_changed(self) -> None: ... def do_cursor_changed(self) -> None: ... @@ -31212,65 +31911,99 @@ class TreeView(Widget, Accessible, Buildable, ConstraintTarget, Scrollable): def do_test_expand_row(self, iter: TreeIter, path: TreePath) -> bool: ... def do_toggle_cursor_row(self) -> bool: ... def do_unselect_all(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def enable_model_drag_dest( self, formats: Gdk.ContentFormats, actions: Gdk.DragAction ) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def enable_model_drag_source( self, start_button_mask: Gdk.ModifierType, formats: Gdk.ContentFormats, actions: Gdk.DragAction, ) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def expand_all(self) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def expand_row(self, path: TreePath, open_all: bool) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def expand_to_path(self, path: TreePath) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_activate_on_single_click(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_background_area( self, path: Optional[TreePath] = None, column: Optional[TreeViewColumn] = None ) -> Gdk.Rectangle: ... def get_cell_area(self, path, column=None): ... # FIXME Function + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_column(self, n: int) -> Optional[TreeViewColumn]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_columns(self) -> list[TreeViewColumn]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_cursor(self) -> Tuple[TreePath, TreeViewColumn]: ... def get_dest_row_at_pos( self, drag_x: int, drag_y: int ) -> Optional[Tuple[TreePath, TreeViewDropPosition]]: ... # CHECK Wrapped function + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_drag_dest_row(self) -> Tuple[TreePath, TreeViewDropPosition]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_enable_search(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_enable_tree_lines(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_expander_column(self) -> Optional[TreeViewColumn]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_fixed_height_mode(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_grid_lines(self) -> TreeViewGridLines: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_headers_clickable(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_headers_visible(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_hover_expand(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_hover_selection(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_level_indentation(self) -> int: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_model(self) -> Optional[TreeModel]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_n_columns(self) -> int: ... def get_path_at_pos( self, x: int, y: int ) -> Optional[ Tuple[TreePath, TreeViewColumn, int, int] ]: ... # CHECK Wrapped function + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_reorderable(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_rubber_banding(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_search_column(self) -> int: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_search_entry(self) -> Optional[Editable]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_selection(self) -> TreeSelection: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_show_expanders(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_tooltip_column(self) -> int: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_tooltip_context( self, x: int, y: int, keyboard_tip: bool ) -> Tuple[bool, TreeModel, TreePath, TreeIter]: ... def get_visible_range( self, ) -> Optional[Tuple[TreePath, TreePath]]: ... # CHECK Wrapped function + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def get_visible_rect(self) -> Gdk.Rectangle: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def insert_column(self, column: TreeViewColumn, position: int) -> int: ... def insert_column_with_attributes( self, position, title, cell, **kwargs ): ... # FIXME Function + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def insert_column_with_data_func( self, position: int, @@ -31279,32 +32012,45 @@ class TreeView(Widget, Accessible, Buildable, ConstraintTarget, Scrollable): func: Callable[..., None], *data: Any, ) -> int: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def is_blank_at_pos( self, x: int, y: int ) -> Tuple[bool, TreePath, TreeViewColumn, int, int]: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def is_rubber_banding_active(self) -> bool: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def map_expanded_rows(self, func: Callable[..., None], *data: Any) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def move_column_after( self, column: TreeViewColumn, base_column: Optional[TreeViewColumn] = None ) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") @classmethod def new(cls) -> TreeView: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") @classmethod def new_with_model(cls, model: TreeModel) -> TreeView: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def remove_column(self, column: TreeViewColumn) -> int: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def row_activated( self, path: TreePath, column: Optional[TreeViewColumn] = None ) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def row_expanded(self, path: TreePath) -> bool: ... def scroll_to_cell( self, path, column=None, use_align=False, row_align=0.0, col_align=0.0 ): ... # FIXME Function + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def scroll_to_point(self, tree_x: int, tree_y: int) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_activate_on_single_click(self, single: bool) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_column_drag_function( self, func: Optional[Callable[..., bool]] = None, *user_data: Any ) -> None: ... def set_cursor(self, path, column=None, start_editing=False): ... # FIXME Function + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_cursor_on_cell( self, path: TreePath, @@ -31312,31 +32058,51 @@ class TreeView(Widget, Accessible, Buildable, ConstraintTarget, Scrollable): focus_cell: Optional[CellRenderer], start_editing: bool, ) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_drag_dest_row( self, path: Optional[TreePath], pos: TreeViewDropPosition ) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_enable_search(self, enable_search: bool) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_enable_tree_lines(self, enabled: bool) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_expander_column(self, column: Optional[TreeViewColumn] = None) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_fixed_height_mode(self, enable: bool) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_grid_lines(self, grid_lines: TreeViewGridLines) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_headers_clickable(self, setting: bool) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_headers_visible(self, headers_visible: bool) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_hover_expand(self, expand: bool) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_hover_selection(self, hover: bool) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_level_indentation(self, indentation: int) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_model(self, model: Optional[TreeModel] = None) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_reorderable(self, reorderable: bool) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_row_separator_func( self, func: Optional[Callable[..., bool]] = None, *data: Any ) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_rubber_banding(self, enable: bool) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_search_column(self, column: int) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_search_entry(self, entry: Optional[Editable] = None) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_search_equal_func( self, search_equal_func: Callable[..., bool], *search_user_data: Any ) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_show_expanders(self, enabled: bool) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_tooltip_cell( self, tooltip: Tooltip, @@ -31344,9 +32110,13 @@ class TreeView(Widget, Accessible, Buildable, ConstraintTarget, Scrollable): column: Optional[TreeViewColumn] = None, cell: Optional[CellRenderer] = None, ) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_tooltip_column(self, column: int) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def set_tooltip_row(self, tooltip: Tooltip, path: TreePath) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def unset_rows_drag_dest(self) -> None: ... + @deprecated("Use [class@Gtk.ListView] or [class@Gtk.ColumnView] instead") def unset_rows_drag_source(self) -> None: ... class TreeViewClass(GObject.GPointer): @@ -31376,6 +32146,9 @@ class TreeViewClass(GObject.GPointer): start_interactive_search: Callable[[TreeView], bool] = ... _reserved: list[None] = ... +@deprecated( + "Use [class@Gtk.ColumnView] and [class@Gtk.ColumnViewColumn] instead of [class@Gtk.TreeView] to show a tabular list" +) class TreeViewColumn(GObject.InitiallyUnowned, Buildable, CellLayout): """ :Constructors: @@ -31457,14 +32230,18 @@ class TreeViewColumn(GObject.InitiallyUnowned, Buildable, CellLayout): visible: bool = ..., widget: Optional[Widget] = ..., ): ... + @deprecated("Use GtkColumnView instead") def add_attribute( self, cell_renderer: CellRenderer, attribute: str, column: int ) -> None: ... def cell_get_position( self, cell_renderer: CellRenderer ) -> Optional[Tuple[int, int]]: ... # CHECK Wrapped function + @deprecated("Use GtkColumnView instead") def cell_get_size(self) -> Tuple[int, int, int, int]: ... + @deprecated("Use GtkColumnView instead") def cell_is_visible(self) -> bool: ... + @deprecated("Use GtkColumnView instead") def cell_set_cell_data( self, tree_model: TreeModel, @@ -31472,56 +32249,101 @@ class TreeViewColumn(GObject.InitiallyUnowned, Buildable, CellLayout): is_expander: bool, is_expanded: bool, ) -> None: ... + @deprecated("Use GtkColumnView instead") def clear(self) -> None: ... + @deprecated("Use GtkColumnView instead") def clear_attributes(self, cell_renderer: CellRenderer) -> None: ... + @deprecated("Use GtkColumnView instead") def clicked(self) -> None: ... + @deprecated("Use GtkColumnView instead") def focus_cell(self, cell: CellRenderer) -> None: ... + @deprecated("Use GtkColumnView instead") def get_alignment(self) -> float: ... + @deprecated("Use GtkColumnView instead") def get_button(self) -> Widget: ... + @deprecated("Use GtkColumnView instead") def get_clickable(self) -> bool: ... + @deprecated("Use GtkColumnView instead") def get_expand(self) -> bool: ... + @deprecated("Use GtkColumnView instead") def get_fixed_width(self) -> int: ... + @deprecated("Use GtkColumnView instead") def get_max_width(self) -> int: ... + @deprecated("Use GtkColumnView instead") def get_min_width(self) -> int: ... + @deprecated("Use GtkColumnView instead") def get_reorderable(self) -> bool: ... + @deprecated("Use GtkColumnView instead") def get_resizable(self) -> bool: ... + @deprecated("Use GtkColumnView instead") def get_sizing(self) -> TreeViewColumnSizing: ... + @deprecated("Use GtkColumnView instead") def get_sort_column_id(self) -> int: ... + @deprecated("Use GtkColumnView instead") def get_sort_indicator(self) -> bool: ... + @deprecated("Use GtkColumnView instead") def get_sort_order(self) -> SortType: ... + @deprecated("Use GtkColumnView instead") def get_spacing(self) -> int: ... + @deprecated("Use GtkColumnView instead") def get_title(self) -> str: ... + @deprecated("Use GtkColumnView instead") def get_tree_view(self) -> Optional[Widget]: ... + @deprecated("Use GtkColumnView instead") def get_visible(self) -> bool: ... + @deprecated("Use GtkColumnView instead") def get_widget(self) -> Optional[Widget]: ... + @deprecated("Use GtkColumnView instead") def get_width(self) -> int: ... + @deprecated("Use GtkColumnView instead") def get_x_offset(self) -> int: ... + @deprecated("Use GtkColumnView instead") @classmethod def new(cls) -> TreeViewColumn: ... + @deprecated("Use GtkColumnView instead") @classmethod def new_with_area(cls, area: CellArea) -> TreeViewColumn: ... + @deprecated("Use GtkColumnView instead") def pack_end(self, cell: CellRenderer, expand: bool) -> None: ... + @deprecated("Use GtkColumnView instead") def pack_start(self, cell: CellRenderer, expand: bool) -> None: ... + @deprecated("Use GtkColumnView instead") def queue_resize(self) -> None: ... + @deprecated("Use GtkColumnView instead") def set_alignment(self, xalign: float) -> None: ... def set_attributes(self, cell_renderer, **attributes): ... # FIXME Function def set_cell_data_func( self, cell_renderer, func, func_data=None ): ... # FIXME Function + @deprecated("Use GtkColumnView instead") def set_clickable(self, clickable: bool) -> None: ... + @deprecated("Use GtkColumnView instead") def set_expand(self, expand: bool) -> None: ... + @deprecated("Use GtkColumnView instead") def set_fixed_width(self, fixed_width: int) -> None: ... + @deprecated("Use GtkColumnView instead") def set_max_width(self, max_width: int) -> None: ... + @deprecated("Use GtkColumnView instead") def set_min_width(self, min_width: int) -> None: ... + @deprecated("Use GtkColumnView instead") def set_reorderable(self, reorderable: bool) -> None: ... + @deprecated("Use GtkColumnView instead") def set_resizable(self, resizable: bool) -> None: ... + @deprecated("Use GtkColumnView instead") def set_sizing(self, type: TreeViewColumnSizing) -> None: ... + @deprecated("Use GtkColumnView instead") def set_sort_column_id(self, sort_column_id: int) -> None: ... + @deprecated("Use GtkColumnView instead") def set_sort_indicator(self, setting: bool) -> None: ... + @deprecated("Use GtkColumnView instead") def set_sort_order(self, order: SortType) -> None: ... + @deprecated("Use GtkColumnView instead") def set_spacing(self, spacing: int) -> None: ... + @deprecated("Use GtkColumnView instead") def set_title(self, title: str) -> None: ... + @deprecated("Use GtkColumnView instead") def set_visible(self, visible: bool) -> None: ... + @deprecated("Use GtkColumnView instead") def set_widget(self, widget: Optional[Widget] = None) -> None: ... class UriLauncher(GObject.Object): @@ -31922,6 +32744,7 @@ class Viewport(Widget, Accessible, Buildable, ConstraintTarget, Scrollable): def set_child(self, child: Optional[Widget] = None) -> None: ... def set_scroll_to_focus(self, scroll_to_focus: bool) -> None: ... +@deprecated("This widget will be removed in GTK 5") class VolumeButton( ScaleButton, Accessible, AccessibleRange, Buildable, ConstraintTarget, Orientable ): @@ -32086,6 +32909,7 @@ class VolumeButton( accessible_role: AccessibleRole = ..., orientation: Orientation = ..., ): ... + @deprecated("This widget will be removed in GTK 5") @classmethod def new(cls) -> VolumeButton: ... @@ -32297,9 +33121,15 @@ class Widget(GObject.InitiallyUnowned, Accessible, Buildable, ConstraintTarget): ) -> bool: ... def error_bell(self) -> None: ... def get_activate_signal(self) -> int: ... + @deprecated("Use [method@Gtk.Widget.get_baseline] instead") def get_allocated_baseline(self) -> int: ... + @deprecated("Use [method@Gtk.Widget.get_height] instead") def get_allocated_height(self) -> int: ... + @deprecated("Use [method@Gtk.Widget.get_width] instead") def get_allocated_width(self) -> int: ... + @deprecated( + "Use [method@Gtk.Widget.compute_bounds],[method@Gtk.Widget.get_width] or [method@Gtk.Widget.get_height] instead." + ) def get_allocation(self) -> Gdk.Rectangle: ... def get_ancestor(self, widget_type: Type) -> Optional[Widget]: ... def get_baseline(self) -> int: ... @@ -32355,6 +33185,7 @@ class Widget(GObject.InitiallyUnowned, Accessible, Buildable, ConstraintTarget): def get_size(self, orientation: Orientation) -> int: ... def get_size_request(self) -> Tuple[int, int]: ... def get_state_flags(self) -> StateFlags: ... + @deprecated("Style contexts will be removed in GTK 5") def get_style_context(self) -> StyleContext: ... def get_template_child(self, widget_type: Type, name: str) -> GObject.Object: ... def get_tooltip_markup(self) -> Optional[str]: ... @@ -32369,6 +33200,7 @@ class Widget(GObject.InitiallyUnowned, Accessible, Buildable, ConstraintTarget): def has_default(self) -> bool: ... def has_focus(self) -> bool: ... def has_visible_focus(self) -> bool: ... + @deprecated("Use [method@Gtk.Widget.set_visible] instead") def hide(self) -> None: ... def in_destruction(self) -> bool: ... def init_template(self) -> None: ... @@ -32462,6 +33294,7 @@ class Widget(GObject.InitiallyUnowned, Accessible, Buildable, ConstraintTarget): def set_vexpand_set(self, set: bool) -> None: ... def set_visible(self, visible: bool) -> None: ... def should_layout(self) -> bool: ... + @deprecated("Use [method@Gtk.Widget.set_visible] instead") def show(self) -> None: ... def size_allocate(self, allocation: Gdk.Rectangle, baseline: int) -> None: ... def snapshot_child(self, child: Widget, snapshot: Snapshot) -> None: ... diff --git a/src/gi-stubs/repository/_GtkSource4.pyi b/src/gi-stubs/repository/_GtkSource4.pyi index 464120fa..b2e2c0d2 100644 --- a/src/gi-stubs/repository/_GtkSource4.pyi +++ b/src/gi-stubs/repository/_GtkSource4.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Atk from gi.repository import Gdk from gi.repository import GdkPixbuf diff --git a/src/gi-stubs/repository/_GtkSource5.pyi b/src/gi-stubs/repository/_GtkSource5.pyi index fb222005..d8f8776c 100644 --- a/src/gi-stubs/repository/_GtkSource5.pyi +++ b/src/gi-stubs/repository/_GtkSource5.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gdk from gi.repository import GdkPixbuf from gi.repository import Gio diff --git a/src/gi-stubs/repository/_JavaScriptCore6.pyi b/src/gi-stubs/repository/_JavaScriptCore6.pyi index 61942a3a..b74d7707 100644 --- a/src/gi-stubs/repository/_JavaScriptCore6.pyi +++ b/src/gi-stubs/repository/_JavaScriptCore6.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import GLib from gi.repository import GObject diff --git a/src/gi-stubs/repository/_Soup2.pyi b/src/gi-stubs/repository/_Soup2.pyi index 4ac7a9c1..16a15208 100644 --- a/src/gi-stubs/repository/_Soup2.pyi +++ b/src/gi-stubs/repository/_Soup2.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GLib from gi.repository import GObject @@ -188,8 +193,11 @@ def tld_get_base_domain(hostname: str) -> str: ... def uri_decode(part: str) -> str: ... def uri_encode(part: str, escape_extra: Optional[str] = None) -> str: ... def uri_normalize(part: str, unescape_extra: Optional[str] = None) -> str: ... +@deprecated("Use #GVariant API instead.") def value_array_new() -> GObject.ValueArray: ... +@deprecated("Use #GVariant API instead.") def value_hash_insert_value(hash: dict[str, Any], key: str, value: Any) -> None: ... +@deprecated("Use #GVariant API instead.") def value_hash_new() -> dict[str, Any]: ... def websocket_client_prepare_handshake( msg: Message, @@ -229,9 +237,11 @@ def websocket_server_process_handshake_with_extensions( protocols: Optional[Sequence[str]] = None, supported_extensions: Optional[Sequence[GObject.TypeClass]] = None, ) -> Tuple[bool, list[WebsocketExtension]]: ... +@deprecated("Use soup_xmlrpc_build_request() instead.") def xmlrpc_build_method_call( method_name: str, params: Sequence[Any] ) -> Optional[str]: ... +@deprecated("Use soup_xmlrpc_build_response() instead.") def xmlrpc_build_method_response(value: Any) -> Optional[str]: ... def xmlrpc_build_request(method_name: str, params: GLib.Variant) -> str: ... def xmlrpc_build_response(value: GLib.Variant) -> str: ... @@ -239,9 +249,11 @@ def xmlrpc_error_quark() -> int: ... def xmlrpc_fault_quark() -> int: ... def xmlrpc_message_new(uri: str, method_name: str, params: GLib.Variant) -> Message: ... def xmlrpc_message_set_response(msg: Message, value: GLib.Variant) -> bool: ... +@deprecated("Use soup_xmlrpc_parse_request_full() instead.") def xmlrpc_parse_method_call( method_call: str, length: int ) -> Tuple[bool, str, GObject.ValueArray]: ... +@deprecated("Use soup_xmlrpc_parse_response() instead.") def xmlrpc_parse_method_response( method_response: str, length: int ) -> Tuple[bool, Any]: ... @@ -946,6 +958,9 @@ class CacheClass(GObject.GPointer): class CachePrivate(GObject.GPointer): ... class ClientContext(GObject.GBoxed): + @deprecated( + "Use soup_client_context_get_remote_address(), which returnsa #GSocketAddress." + ) def get_address(self) -> Optional[Address]: ... def get_auth_domain(self) -> Optional[AuthDomain]: ... def get_auth_user(self) -> Optional[str]: ... @@ -953,6 +968,7 @@ class ClientContext(GObject.GBoxed): def get_host(self) -> Optional[str]: ... def get_local_address(self) -> Optional[Gio.SocketAddress]: ... def get_remote_address(self) -> Optional[Gio.SocketAddress]: ... + @deprecated("use soup_client_context_get_gsocket(), which returnsa #GSocket.") def get_socket(self) -> Socket: ... def steal_connection(self) -> Gio.IOStream: ... @@ -1145,6 +1161,7 @@ class CookieJar(GObject.Object, SessionFeature): def is_persistent(self) -> bool: ... @classmethod def new(cls) -> CookieJar: ... + @deprecated("This is a no-op.") def save(self) -> None: ... def set_accept_policy(self, policy: CookieJarAcceptPolicy) -> None: ... def set_cookie(self, uri: URI, cookie: str) -> None: ... @@ -1328,6 +1345,7 @@ class Date(GObject.GBoxed): def new_from_time_t(cls, when: int) -> Date: ... def to_string(self, format: DateFormat) -> str: ... def to_time_t(self) -> int: ... + @deprecated("Do not use #GTimeVal, as it's not Y2038-safe.") def to_timeval(self) -> GLib.TimeVal: ... class HSTSEnforcer(GObject.Object, SessionFeature): @@ -1497,7 +1515,9 @@ class Logger(GObject.Object, SessionFeature): props: Props = ... parent: GObject.Object = ... def __init__(self, level: LoggerLogLevel = ..., max_body_size: int = ...): ... + @deprecated("Use soup_session_add_feature() instead.") def attach(self, session: Session) -> None: ... + @deprecated("Use soup_session_remove_feature() instead.") def detach(self, session: Session) -> None: ... @classmethod def new(cls, level: LoggerLogLevel, max_body_size: int) -> Logger: ... @@ -1678,6 +1698,9 @@ class Message(GObject.Object): @classmethod def new_from_uri(cls, method: str, uri: URI) -> Message: ... def restarted(self) -> None: ... + @deprecated( + "#SoupRequest provides a much simpler API that lets youread the response directly into your own buffers without needing tomess with callbacks, pausing/unpausing, etc." + ) def set_chunk_allocator( self, allocator: Callable[..., Optional[Buffer]], *user_data: Any ) -> None: ... @@ -1776,6 +1799,9 @@ class MessageHeaders(GObject.GBoxed): def foreach(self, func: Callable[..., None], *user_data: Any) -> None: ... def free(self) -> None: ... def free_ranges(self, ranges: Range) -> None: ... + @deprecated( + "Use soup_message_headers_get_one() orsoup_message_headers_get_list() instead." + ) def get(self, name: str) -> Optional[str]: ... def get_content_disposition(self) -> Tuple[bool, str, dict[str, str]]: ... def get_content_length(self) -> int: ... @@ -1966,6 +1992,7 @@ class ProxyResolver(GObject.GInterface): notify (GParam) """ + @deprecated("Use SoupProxyURIResolver.get_proxy_uri_async instead") def get_proxy_async( self, msg: Message, @@ -1974,6 +2001,7 @@ class ProxyResolver(GObject.GInterface): callback: Callable[..., None], *user_data: Any, ) -> None: ... + @deprecated("Use SoupProxyURIResolver.get_proxy_uri_sync() instead") def get_proxy_sync( self, msg: Message, cancellable: Optional[Gio.Cancellable] = None ) -> Tuple[int, Address]: ... @@ -2036,6 +2064,7 @@ class ProxyURIResolver(GObject.GInterface): notify (GParam) """ + @deprecated("#SoupProxyURIResolver is deprecated in favor of#GProxyResolver") def get_proxy_uri_async( self, uri: URI, @@ -2044,6 +2073,7 @@ class ProxyURIResolver(GObject.GInterface): callback: Callable[..., None], *user_data: Any, ) -> None: ... + @deprecated("#SoupProxyURIResolver is deprecated in favor of#GProxyResolver") def get_proxy_uri_sync( self, uri: URI, cancellable: Optional[Gio.Cancellable] = None ) -> Tuple[int, URI]: ... @@ -2412,9 +2442,18 @@ class Server(GObject.Object): def do_request_finished(self, msg: Message, client: ClientContext) -> None: ... def do_request_read(self, msg: Message, client: ClientContext) -> None: ... def do_request_started(self, msg: Message, client: ClientContext) -> None: ... + @deprecated( + "If you are using soup_server_listen(), etc, thenthe server listens on the thread-default #GMainContext, and thisproperty is ignored." + ) def get_async_context(self) -> Optional[GLib.MainContext]: ... + @deprecated( + "If you are using soup_server_listen(), etc, then usesoup_server_get_listeners() to get a list of all listening sockets,but note that that function returns #GSockets, not #SoupSockets." + ) def get_listener(self) -> Socket: ... def get_listeners(self) -> list[Gio.Socket]: ... + @deprecated( + "If you are using soup_server_listen(), etc, then usesoup_server_get_uris() to get a list of all listening addresses." + ) def get_port(self) -> int: ... def get_uris(self) -> list[URI]: ... def is_https(self) -> bool: ... @@ -2428,11 +2467,20 @@ class Server(GObject.Object): self, socket: Gio.Socket, options: ServerListenOptions ) -> bool: ... def pause_message(self, msg: Message) -> None: ... + @deprecated( + "When using soup_server_listen(), etc, the server willalways listen for connections, and will process them whenever thethread-default #GMainContext is running." + ) def quit(self) -> None: ... def remove_auth_domain(self, auth_domain: AuthDomain) -> None: ... def remove_handler(self, path: str) -> None: ... def remove_websocket_extension(self, extension_type: Type) -> None: ... + @deprecated( + "When using soup_server_listen(), etc, the server willalways listen for connections, and will process them whenever thethread-default #GMainContext is running." + ) def run(self) -> None: ... + @deprecated( + "When using soup_server_listen(), etc, the server willalways listen for connections, and will process them whenever thethread-default #GMainContext is running." + ) def run_async(self) -> None: ... def set_ssl_cert_file(self, ssl_cert_file: str, ssl_key_file: str) -> bool: ... def unpause_message(self, msg: Message) -> None: ... @@ -2617,6 +2665,7 @@ class Session(GObject.Object): callback: Optional[Callable[..., None]] = None, *user_data: Any, ) -> None: ... + @deprecated("use soup_session_prefetch_dns() instead") def prepare_for_uri(self, uri: URI) -> None: ... def queue_message( self, @@ -2777,6 +2826,9 @@ class SessionAsync(Session): use_thread_context: bool = ..., user_agent: str = ..., ): ... + @deprecated( + '#SoupSessionAsync is deprecated; use a plain#SoupSession, created with soup_session_new(). See the porting guide.' + ) @classmethod def new(cls) -> SessionAsync: ... @@ -2966,6 +3018,9 @@ class SessionSync(Session): use_thread_context: bool = ..., user_agent: str = ..., ): ... + @deprecated( + '#SoupSessionSync is deprecated; use a plain#SoupSession, created with soup_session_new(). See the porting guide.' + ) @classmethod def new(cls) -> SessionSync: ... diff --git a/src/gi-stubs/repository/_Soup3.pyi b/src/gi-stubs/repository/_Soup3.pyi index ac80162e..74409337 100644 --- a/src/gi-stubs/repository/_Soup3.pyi +++ b/src/gi-stubs/repository/_Soup3.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gio from gi.repository import GLib from gi.repository import GObject @@ -1579,6 +1584,7 @@ class Server(GObject.Object): def listen_socket( self, socket: Gio.Socket, options: ServerListenOptions ) -> bool: ... + @deprecated("Use soup_server_message_pause() instead.") def pause_message(self, msg: ServerMessage) -> None: ... def remove_auth_domain(self, auth_domain: AuthDomain) -> None: ... def remove_handler(self, path: str) -> None: ... @@ -1586,6 +1592,7 @@ class Server(GObject.Object): def set_tls_auth_mode(self, mode: Gio.TlsAuthenticationMode) -> None: ... def set_tls_certificate(self, certificate: Gio.TlsCertificate) -> None: ... def set_tls_database(self, tls_database: Gio.TlsDatabase) -> None: ... + @deprecated("Use soup_server_message_unpause() instead.") def unpause_message(self, msg: ServerMessage) -> None: ... class ServerClass(GObject.GPointer): diff --git a/src/gi-stubs/repository/_WebKit6.pyi b/src/gi-stubs/repository/_WebKit6.pyi index 9c11bcbd..40324304 100644 --- a/src/gi-stubs/repository/_WebKit6.pyi +++ b/src/gi-stubs/repository/_WebKit6.pyi @@ -7,6 +7,11 @@ from typing import Tuple from typing import Type from typing import TypeVar +try: + from warnings import deprecated +except ImportError: + from typing_extensions import deprecated + from gi.repository import Gdk from gi.repository import Gio from gi.repository import GLib @@ -1899,6 +1904,7 @@ class Settings(GObject.Object): def get_hardware_acceleration_policy(self) -> HardwareAccelerationPolicy: ... def get_javascript_can_access_clipboard(self) -> bool: ... def get_javascript_can_open_windows_automatically(self) -> bool: ... + @deprecated("This method is deprecated") def get_load_icons_ignoring_image_load_setting(self) -> bool: ... def get_media_content_types_requiring_hardware_support(self) -> str: ... def get_media_playback_allows_inline(self) -> bool: ... @@ -1959,6 +1965,7 @@ class Settings(GObject.Object): ) -> None: ... def set_javascript_can_access_clipboard(self, enabled: bool) -> None: ... def set_javascript_can_open_windows_automatically(self, enabled: bool) -> None: ... + @deprecated("This method is deprecated") def set_load_icons_ignoring_image_load_setting(self, enabled: bool) -> None: ... def set_media_content_types_requiring_hardware_support( self, content_types: Optional[str] = None