GNOME Python API

References

  • PyGObject Docs
  • GNOME Developer Documentation

Libraries

  • Adw
    • Classes
      • AboutDialog
      • AboutWindow
      • ActionRow
      • AlertDialog
      • Animation
      • AnimationTarget
      • Application
      • ApplicationWindow
      • Avatar
      • Banner
      • Bin
      • Breakpoint
      • BreakpointBin
      • ButtonContent
      • CallbackAnimationTarget
      • Carousel
      • CarouselIndicatorDots
      • CarouselIndicatorLines
      • Clamp
      • ClampLayout
      • ClampScrollable
      • ComboRow
      • Dialog
      • EntryRow
      • EnumListItem
      • EnumListModel
      • ExpanderRow
      • Flap
      • HeaderBar
      • Leaflet
      • LeafletPage
      • MessageDialog
      • NavigationPage
      • NavigationSplitView
      • NavigationView
      • OverlaySplitView
      • PasswordEntryRow
      • PreferencesDialog
      • PreferencesGroup
      • PreferencesPage
      • PreferencesRow
      • PreferencesWindow
      • PropertyAnimationTarget
      • SpinRow
      • SplitButton
      • SpringAnimation
      • Squeezer
      • SqueezerPage
      • StatusPage
      • StyleManager
      • SwipeTracker
      • SwitchRow
      • TabBar
      • TabButton
      • TabOverview
      • TabPage
      • TabView
      • TimedAnimation
      • Toast
      • ToastOverlay
      • ToolbarView
      • ViewStack
      • ViewStackPage
      • ViewStackPages
      • ViewSwitcher
      • ViewSwitcherBar
      • ViewSwitcherTitle
      • Window
      • WindowTitle
    • Interfaces
    • Structures
    • Enums
    • Functions
    • Constants
    • Dependencies
  • DBus
  • DBusGLib
  • Flatpak
  • GLib
  • GModule
  • GObject
  • Gcr
  • Gdk
  • GdkPixbuf
  • GdkPixdata
  • GdkWayland
  • GdkX11
  • Gio
  • Graphene
  • Gsk
  • Gst
  • GstBase
  • GstCheck
  • GstController
  • GstNet
  • Gtk
  • GtkSource
  • HarfBuzz
  • Pango
  • PangoCairo
  • PangoFT2
  • PangoFc
  • PangoOT
  • PangoXft
  • Shumate
  • Soup
  • Vte
  • WebKit
  • WebKitWebProcessExtension
  • Xdp
  • XdpGtk4
  • pycairo
GNOME Python API
  • Adw
  • Classes
  • Banner
  • View page source

Banner

Added in version 1.3.

class Banner(**properties: Any)

Superclasses: Widget, InitiallyUnowned, Object

Implemented Interfaces: Accessible, Actionable, Buildable, ConstraintTarget

Constructors:

Banner(**properties)
new(title:str) -> Gtk.Widget

Constructors

class Banner
classmethod new(title: str) → Widget

Creates a new AdwBanner.

Added in version 1.3.

Parameters:

title – the banner title

Methods

class Banner
get_button_label() → str | None

Gets the button label for self.

Added in version 1.3.

get_revealed() → bool

Gets if a banner is revealed

Added in version 1.3.

get_title() → str

Gets the title for self.

Added in version 1.3.

get_use_markup() → bool

Gets whether to use Pango markup for the banner title.

Added in version 1.3.

set_button_label(label: str | None = None) → None

Sets the button label for self.

If set to "" or NULL, the button won’t be shown.

The button can be used with a GAction, or with the button_clicked signal.

Added in version 1.3.

Parameters:

label – the label

set_revealed(revealed: bool) → None

Sets whether a banner should be revealed

Added in version 1.3.

Parameters:

revealed – whether a banner should be revealed

set_title(title: str) → None

Sets the title for this banner.

See also: use_markup.

Added in version 1.3.

Parameters:

title – the title

set_use_markup(use_markup: bool) → None

Sets whether to use Pango markup for the banner title.

See also parse_markup.

Added in version 1.3.

Parameters:

use_markup – whether to use markup

Properties

class Banner
props.button_label: str

The label to show on the button.

If set to "" or NULL, the button won’t be shown.

The button can be used with a GAction, or with the button_clicked signal.

Added in version 1.3.

props.revealed: bool

Whether the banner is currently revealed.

Added in version 1.3.

props.title: str

The title for this banner.

See also: use_markup.

Added in version 1.3.

props.use_markup: bool

Whether to use Pango markup for the banner title.

See also parse_markup.

Added in version 1.3.

Signals

class Banner.signals
button_clicked() → None

This signal is emitted after the action button has been clicked.

It can be used as an alternative to setting an action.

Added in version 1.3.


Built with Sphinx using a theme provided by Read the Docs.
  • Banner
    • Constructors
      • Banner.new()
    • Methods
      • Banner.get_button_label()
      • Banner.get_revealed()
      • Banner.get_title()
      • Banner.get_use_markup()
      • Banner.set_button_label()
      • Banner.set_revealed()
      • Banner.set_title()
      • Banner.set_use_markup()
    • Properties
      • Banner.props.button_label
      • Banner.props.revealed
      • Banner.props.title
      • Banner.props.use_markup
    • Signals
      • Banner.signals.button_clicked()