Enums

Details

class Adw.AccentColor(value)

Bases: GObject.GEnum

Describes the available system accent colors.

New in version 1.6.

classmethod to_rgba(self)
Parameters:

self (Adw.AccentColor) – an accent color

Returns:

return location for the color

Return type:

rgba: Gdk.RGBA

Converts self to a GdkRGBA representing its background color.

The matching foreground color is white.

New in version 1.6.

classmethod to_standalone_rgba(self, dark)
Parameters:
  • self (Adw.AccentColor) – an accent color

  • dark (bool) – Whether to calculate standalone color for light or dark background

Returns:

return location for the color

Return type:

rgba: Gdk.RGBA

Converts self to a GdkRGBA representing its standalone color.

It will typically be darker for light background, and lighter for dark background, ensuring contrast.

New in version 1.6.

BLUE = 0

Use a blue color (#3584e4). This is the default value.

TEAL = 1

Use a teal color (#2190a4).

GREEN = 2

Use a green color (#3a944a).

YELLOW = 3

Use a yellow color (#c88800).

ORANGE = 4

Use a orange color (#ed5b00).

RED = 5

Use a red color (#e62d42).

PINK = 6

Use a pink color (#d56199).

PURPLE = 7

Use a purple color (#9141ac).

SLATE = 8

Use a slate color (#6f8396).

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.BannerButtonStyle(value)

Bases: GObject.GEnum

Describes the available button styles for [class`Banner`].

New values may be added to this enumeration over time.

See [property`Banner`:py:data::button-style<Adw.BannerButtonStyle.props.button_style>].

New in version 1.7.

DEFAULT = 0

The default button style.

SUGGESTED = 1

A button in the suggested action style.

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 to ADW_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 and ADW_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:
Returns:

the easing for value

Return type:

float

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 and ADW_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 and ADW_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 and ADW_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 and ADW_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 and ADW_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 and ADW_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 and ADW_EASE_OUT_QUAD.

EASE_IN_OUT_BOUNCE = 30

Exponentially decaying parabolic (bounce) tweening, with bounce on both ends, combining ADW_EASE_IN_BOUNCE and ADW_EASE_OUT_BOUNCE.

EASE = 31

Cubic bezier tweening, with control points in (0.25, 0.1) and (0.25, 1.0).

Increases in velocity towards the middle of the animation, slowing back down at the end.

New in version 1.7.

EASE_IN = 32

Cubic bezier tweening, with control points in (0.42, 0.0) and (1.0, 1.0).

Starts off slowly, with the speed of the animation increasing until complete.

New in version 1.7.

EASE_OUT = 33

Cubic bezier tweening, with control points in (0.0, 0.0) and (0.58, 1.0).

Starts quickly, slowing down the animation until complete.

New in version 1.7.

EASE_IN_OUT = 34

Cubic bezier tweening, with control points in (0.42, 0.0) and (0.58, 1.0).

Starts off slowly, speeds up in the middle, and then slows down again.

New in version 1.7.

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 and ADW_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 and ADW_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 and AdwFlap

MINIMUM = 0

Folding is based on the minimum size

NATURAL = 1

Folding is based on the natural size

class Adw.InlineViewSwitcherDisplayMode(value)

Bases: GObject.GEnum

Describes what [class`InlineViewSwitcher`] toggles display.

<picture> <source srcset=”inline-view-switcher-display-modes-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”inline-view-switcher-display-modes.png” alt=”inline-view-switcher-display-modes”> </picture>

New in version 1.7.

LABELS = 0

Toggles only display labels.

ICONS = 1

Toggles only display icons.

BOTH = 2

Toggles display both icons and labels.

class Adw.JustifyMode(value)

Bases: GObject.GEnum

Describes line justify behaviors in a [class`WrapLayout`] or [class`WrapBox`].

See [property`WrapLayout`:py:data::justify<Adw.JustifyMode.props.justify>] and [property`WrapBox`:py:data::justify<Adw.JustifyMode.props.justify>].

New in version 1.7.

NONE = 0

Don’t justify children within a line.

FILL = 1

Stretch each child within the line, keeping consistent spacing, so that the line fills the entire length.

SPREAD = 2

Increase spacing between children, moving the children so that the first and last child are aligned with the beginning and end of the line. If the line only contains a single widget, it will be stretched regardless.

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:
Returns:

the length in unit

Return type:

float

Converts value from pixels to unit.

New in version 1.4.

classmethod to_px(unit, value, settings)
Parameters:
Returns:

the length in pixels

Return type:

float

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

class Adw.NavigationDirection(value)

Bases: GObject.GEnum

Describes the direction of a swipe navigation gesture.

BACK = 0

Corresponds to start or top, depending on orientation and text direction

FORWARD = 1

Corresponds to end or bottom, depending on orientation and text direction

class Adw.PackDirection(value)

Bases: GObject.GEnum

Describes child packing behavior in a [class`WrapLayout`] or [class`WrapBox`].

See [property`WrapLayout`:py:data::pack-direction<Adw.PackDirection.props.pack_direction>] and [property`WrapBox`:py:data::pack-direction<Adw.PackDirection.props.pack_direction>].

New in version 1.7.

START_TO_END = 0

Pack children from left to right for LTR languages, or top to bottom vertically.

END_TO_START = 1

Pack children from right to left for LTR languages, or bottom to top vertically.

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 to ADW_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

class Adw.WrapPolicy(value)

Bases: GObject.GEnum

Describes line wrapping behavior in a [class`WrapLayout`] or [class`WrapBox`].

See [property`WrapLayout`:py:data::wrap-policy<Adw.WrapPolicy.props.wrap_policy>] and [property`WrapBox`:py:data::wrap-policy<Adw.WrapPolicy.props.wrap_policy>].

New in version 1.7.

MINIMUM = 0

Fit as many children into each line as possible, shrinking them down to their minimum size before wrapping to the next line.

NATURAL = 1

Wrap to the next line as soon as the previous line cannot fit any more children without shrinking them past their natural size.