Enums¶
Details¶
- class Adw.AnimationState(value)¶
Bases:
GObject.GEnum
Describes the possible states of an [class`Animation`].
The state can be controlled with [method`Animation`.play], [method`Animation`.pause], [method`Animation`.resume], [method`Animation`.reset] and [method`Animation`.skip].
- IDLE = 0¶
The animation hasn’t started yet.
- PAUSED = 1¶
The animation has been paused.
- PLAYING = 2¶
The animation is currently playing.
- FINISHED = 3¶
The animation has finished.
- class Adw.BreakpointConditionLengthType(value)¶
Bases:
GObject.GEnum
Describes length types for [struct`BreakpointCondition`].
See [ctor`BreakpointCondition`.new_length].
New values may be added to this enumeration over time.
New in version 1.4.
- MIN_WIDTH = 0¶
true if the width is greater than or equal to the condition value
- MAX_WIDTH = 1¶
true if the width is less than or equal to the condition value
- MIN_HEIGHT = 2¶
true if the height is greater than or equal to the condition value
- MAX_HEIGHT = 3¶
true if the height is less than or equal to the condition value
- class Adw.BreakpointConditionRatioType(value)¶
Bases:
GObject.GEnum
Describes ratio types for [struct`BreakpointCondition`].
See [ctor`BreakpointCondition`.new_ratio].
New values may be added to this enumeration over time.
New in version 1.4.
- MIN_ASPECT_RATIO = 0¶
true if the aspect ratio is greater than or equal to the condition value
- MAX_ASPECT_RATIO = 1¶
true if the aspect ratio is less than or equal to the condition value
- class Adw.CenteringPolicy(value)¶
Bases:
GObject.GEnum
Describes title centering behavior of a [class`HeaderBar`] widget.
- LOOSE = 0¶
Keep the title centered when possible
- STRICT = 1¶
Keep the title centered at all cost
- class Adw.ColorScheme(value)¶
Bases:
GObject.GEnum
Application color schemes for [property`StyleManager`:py:data::color-scheme<Adw.ColorScheme.props.color_scheme>].
- DEFAULT = 0¶
Inherit the parent color-scheme. When set on the
AdwStyleManager
returned by [func`StyleManager`.get_default], it’s equivalent toADW_COLOR_SCHEME_PREFER_LIGHT
.
- FORCE_LIGHT = 1¶
Always use light appearance.
- PREFER_LIGHT = 2¶
Use light appearance unless the system prefers dark colors.
- PREFER_DARK = 3¶
Use dark appearance unless the system prefers prefers light colors.
- FORCE_DARK = 4¶
Always use dark appearance.
- class Adw.DialogPresentationMode(value)¶
Bases:
GObject.GEnum
Describes the available presentation modes for [class`Dialog`].
New values may be added to this enumeration over time.
See [property`Dialog`:py:data::presentation-mode<Adw.DialogPresentationMode.props.presentation_mode>].
New in version 1.5.
- AUTO = 0¶
Switch between
ADW_DIALOG_FLOATING
andADW_DIALOG_BOTTOM_SHEET
depending on available size.
- FLOATING = 1¶
Present dialog as a centered floating window.
- BOTTOM_SHEET = 2¶
Present dialog as a bottom sheet.
- class Adw.Easing(value)¶
Bases:
GObject.GEnum
Describes the available easing functions for use with [class`TimedAnimation`].
New values may be added to this enumeration over time.
- classmethod ease(self, value)¶
- Parameters:
self (
Adw.Easing
) – an easing valuevalue (
float
) – a value to ease
- Returns:
the easing for value
- Return type:
Computes easing with easing for value.
value should generally be in the [0, 1] range.
- LINEAR = 0¶
Linear tweening.
- EASE_IN_QUAD = 1¶
Quadratic tweening.
- EASE_IN_QUINT = 10¶
Quintic tweening.
- EASE_OUT_QUINT = 11¶
Quintic tweening, inverse of
ADW_EASE_IN_QUINT
.
- EASE_IN_OUT_QUINT = 12¶
Quintic tweening, combining
ADW_EASE_IN_QUINT
andADW_EASE_OUT_QUINT
.
- EASE_IN_SINE = 13¶
Sine wave tweening.
- EASE_OUT_SINE = 14¶
Sine wave tweening, inverse of
ADW_EASE_IN_SINE
.
- EASE_IN_OUT_SINE = 15¶
Sine wave tweening, combining
ADW_EASE_IN_SINE
andADW_EASE_OUT_SINE
.
- EASE_IN_EXPO = 16¶
Exponential tweening.
- EASE_OUT_EXPO = 17¶
Exponential tweening, inverse of
ADW_EASE_IN_EXPO
.
- EASE_IN_OUT_EXPO = 18¶
Exponential tweening, combining
ADW_EASE_IN_EXPO
andADW_EASE_OUT_EXPO
.
- EASE_IN_CIRC = 19¶
Circular tweening.
- EASE_OUT_QUAD = 2¶
Quadratic tweening, inverse of
ADW_EASE_IN_QUAD
.
- EASE_OUT_CIRC = 20¶
Circular tweening, inverse of
ADW_EASE_IN_CIRC
.
- EASE_IN_OUT_CIRC = 21¶
Circular tweening, combining
ADW_EASE_IN_CIRC
andADW_EASE_OUT_CIRC
.
- EASE_IN_ELASTIC = 22¶
Elastic tweening, with offshoot on start.
- EASE_OUT_ELASTIC = 23¶
Elastic tweening, with offshoot on end, inverse of
ADW_EASE_IN_ELASTIC
.
- EASE_IN_OUT_ELASTIC = 24¶
Elastic tweening, with offshoot on both ends, combining
ADW_EASE_IN_ELASTIC
andADW_EASE_OUT_ELASTIC
.
- EASE_IN_BACK = 25¶
Overshooting cubic tweening, with backtracking on start.
- EASE_OUT_BACK = 26¶
Overshooting cubic tweening, with backtracking on end, inverse of
ADW_EASE_IN_BACK
.
- EASE_IN_OUT_BACK = 27¶
Overshooting cubic tweening, with backtracking on both ends, combining
ADW_EASE_IN_BACK
andADW_EASE_OUT_BACK
.
- EASE_IN_BOUNCE = 28¶
Exponentially decaying parabolic (bounce) tweening, on start.
- EASE_OUT_BOUNCE = 29¶
Exponentially decaying parabolic (bounce) tweening, with bounce on end, inverse of
ADW_EASE_IN_BOUNCE
.
- EASE_IN_OUT_QUAD = 3¶
Quadratic tweening, combining
ADW_EASE_IN_QUAD
andADW_EASE_OUT_QUAD
.
- EASE_IN_OUT_BOUNCE = 30¶
Exponentially decaying parabolic (bounce) tweening, with bounce on both ends, combining
ADW_EASE_IN_BOUNCE
andADW_EASE_OUT_BOUNCE
.
- EASE_IN_CUBIC = 4¶
Cubic tweening.
- EASE_OUT_CUBIC = 5¶
Cubic tweening, inverse of
ADW_EASE_IN_CUBIC
.
- EASE_IN_OUT_CUBIC = 6¶
Cubic tweening, combining
ADW_EASE_IN_CUBIC
andADW_EASE_OUT_CUBIC
.
- EASE_IN_QUART = 7¶
Quartic tweening.
- EASE_OUT_QUART = 8¶
Quartic tweening, inverse of
ADW_EASE_IN_QUART
.
- EASE_IN_OUT_QUART = 9¶
Quartic tweening, combining
ADW_EASE_IN_QUART
andADW_EASE_OUT_QUART
.
- class Adw.FlapFoldPolicy(value)¶
Bases:
GObject.GEnum
Describes the possible folding behavior of a [class`Flap`] widget.
Deprecated since version 1.4: See the migration guide
- NEVER = 0¶
Disable folding, the flap cannot reach narrow sizes.
- ALWAYS = 1¶
Keep the flap always folded.
- AUTO = 2¶
Fold and unfold the flap based on available space.
- class Adw.FlapTransitionType(value)¶
Bases:
GObject.GEnum
Describes transitions types of a [class`Flap`] widget.
It determines the type of animation when transitioning between children in a [class`Flap`] widget, as well as which areas can be swiped via [property`Flap`:py:data::swipe-to-open<Adw.FlapTransitionType.props.swipe_to_open>] and [property`Flap`:py:data::swipe-to-close<Adw.FlapTransitionType.props.swipe_to_close>].
Deprecated since version 1.4: See the migration guide
- OVER = 0¶
The flap slides over the content, which is dimmed. When folded, only the flap can be swiped.
- UNDER = 1¶
The content slides over the flap. Only the content can be swiped.
- SLIDE = 2¶
The flap slides offscreen when hidden, neither the flap nor content overlap each other. Both widgets can be swiped.
- class Adw.FoldThresholdPolicy(value)¶
Bases:
GObject.GEnum
Determines when [class`Flap`] and [class`Leaflet`] will fold.
Deprecated since version 1.4: Stop using
AdwLeaflet
andAdwFlap
- MINIMUM = 0¶
Folding is based on the minimum size
- NATURAL = 1¶
Folding is based on the natural size
- class Adw.LeafletTransitionType(value)¶
Bases:
GObject.GEnum
Describes the possible transitions in a [class`Leaflet`] widget.
New values may be added to this enumeration over time.
Deprecated since version 1.4: See the migration guide
- OVER = 0¶
Cover the old page or uncover the new page, sliding from or towards the end according to orientation, text direction and children order
- UNDER = 1¶
Uncover the new page or cover the old page, sliding from or towards the start according to orientation, text direction and children order
- SLIDE = 2¶
Slide from left, right, up or down according to the orientation, text direction and the children order
- class Adw.LengthUnit(value)¶
Bases:
GObject.GEnum
Describes length units.
Unit | Regular Text | Large Text |—- | ———— | ———- |1px | 1px | 1px |1pt | 1.333333px | 1.666667px |1sp | 1px | 1.25px |New values may be added to this enumeration over time.
New in version 1.4.
- classmethod from_px(unit, value, settings)¶
- Parameters:
unit (
Adw.LengthUnit
) – a length unitvalue (
float
) – a value in pixelssettings (
Gtk.Settings
orNone
) – settings to use, orNULL
for default settings
- Returns:
the length in unit
- Return type:
Converts value from pixels to unit.
New in version 1.4.
- classmethod to_px(unit, value, settings)¶
- Parameters:
unit (
Adw.LengthUnit
) – a length unitvalue (
float
) – a value in unitsettings (
Gtk.Settings
orNone
) – settings to use, orNULL
for default settings
- Returns:
the length in pixels
- Return type:
Converts value from unit to pixels.
New in version 1.4.
- PX = 0¶
pixels
- PT = 1¶
points, changes with text scale factor
- SP = 2¶
scale independent pixels, changes with text scale factor
Bases:
GObject.GEnum
Describes the direction of a swipe navigation gesture.
Corresponds to start or top, depending on orientation and text direction
Corresponds to end or bottom, depending on orientation and text direction
- class Adw.ResponseAppearance(value)¶
Bases:
GObject.GEnum
Describes the possible styles of [class`AlertDialog`] response buttons.
See [method`AlertDialog`.set_response_appearance].
New in version 1.2.
- DEFAULT = 0¶
the default appearance.
- SUGGESTED = 1¶
used to denote important responses such as the affirmative action.
- DESTRUCTIVE = 2¶
used to draw attention to the potentially damaging consequences of using the response. This appearance acts as a warning to the user.
- class Adw.SqueezerTransitionType(value)¶
Bases:
GObject.GEnum
Describes the possible transitions in a [class`Squeezer`] widget.
Deprecated since version 1.4: See the migration guide
- NONE = 0¶
No transition
- CROSSFADE = 1¶
A cross-fade
- class Adw.ToastPriority(value)¶
Bases:
GObject.GEnum
[class`Toast`] behavior when another toast is already displayed.
- NORMAL = 0¶
the toast will be queued if another toast is already displayed.
- HIGH = 1¶
the toast will be displayed immediately, pushing the previous toast into the queue instead.
- class Adw.ToolbarStyle(value)¶
Bases:
GObject.GEnum
Describes the possible top or bottom bar styles in an [class`ToolbarView`] widget.
ADW_TOOLBAR_FLAT
is suitable for simple content, such as [class`StatusPage`] or [class`PreferencesPage`], where the background at the top and bottom parts of the page is uniform. Additionally, windows with sidebars should always use this style.<picture style=”min-width: 33%; display: inline-block;”> <source srcset=”toolbar-view-flat-1-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”toolbar-view-flat-1.png” alt=”toolbar-view-flat-1”> </picture> <picture style=”min-width: 33%; display: inline-block;”> <source srcset=”toolbar-view-flat-2-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”toolbar-view-flat-2.png” alt=”toolbar-view-flat-2”> </picture>
ADW_TOOLBAR_RAISED
style is suitable for content such as utility panes, where some elements are directly adjacent to the top/bottom bars, or [class`TabView`], where each page can have a different background.ADW_TOOLBAR_RAISED_BORDER
style is similar toADW_TOOLBAR_RAISED
, but with the shadow replaced with a more subtle border. It’s intended to be used in applications like image viewers, where a shadow over the content might be undesired.<picture style=”min-width: 33%; display: inline-block;”> <source srcset=”toolbar-view-raised-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”toolbar-view-raised.png” alt=”toolbar-view-raised”> </picture> <picture style=”min-width: 33%; display: inline-block;”> <source srcset=”toolbar-view-raised-border-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”toolbar-view-raised-border.png” alt=”toolbar-view-raised-border”> </picture>
See [property`ToolbarView`:py:data::top-bar-style<Adw.ToolbarStyle.props.top_bar_style>] and [property`ToolbarView`:py:data::bottom-bar-style<Adw.ToolbarStyle.props.bottom_bar_style>].
New values may be added to this enumeration over time.
New in version 1.4.
- FLAT = 0¶
No background, shadow only for scrolled content
- RAISED = 1¶
Opaque background with a persistent shadow
- RAISED_BORDER = 2¶
Opaque background with a persistent border
- class Adw.ViewSwitcherPolicy(value)¶
Bases:
GObject.GEnum
Describes the adaptive modes of [class`ViewSwitcher`].
- NARROW = 0¶
Force the narrow mode
- WIDE = 1¶
Force the wide mode