Package ch.bailu.gtk.adw
Klasse BreakpointCondition
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.adw.BreakpointCondition
- Alle implementierten Schnittstellen:
PointerInterface
Describes condition for an [class@Breakpoint].
https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/struct.BreakpointCondition.html
-
Feldübersicht
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcopy()
Copies @self.void
free()
Frees @self.static ClassHandler
static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
static BreakpointCondition
newAndBreakpointCondition
(BreakpointCondition condition_1, BreakpointCondition condition_2) Creates a condition that triggers when @condition_1 and @condition_2 are both
true.static BreakpointCondition
newLengthBreakpointCondition
(int type, double value, int unit) Creates a condition that triggers on length changes.static BreakpointCondition
newOrBreakpointCondition
(BreakpointCondition condition_1, BreakpointCondition condition_2) Creates a condition that triggers when either @condition_1 or @condition_2 is
true.static BreakpointCondition
newRatioBreakpointCondition
(int type, int width, int height) Creates a condition that triggers on ratio changes.static BreakpointCondition
Parses a condition from a string.toStr()
Returns a textual representation of @self.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
BreakpointCondition
-
-
Methodendetails
-
getClassHandler
-
newAndBreakpointCondition
public static BreakpointCondition newAndBreakpointCondition(@Nonnull BreakpointCondition condition_1, @Nonnull BreakpointCondition condition_2) Creates a condition that triggers when @condition_1 and @condition_2 are both
true.- Parameter:
condition_1
- first conditioncondition_2
- second condition- Gibt zurück:
- the newly created condition
-
newLengthBreakpointCondition
Creates a condition that triggers on length changes.- Parameter:
type
- the length typevalue
- the length valueunit
- the length unit- Gibt zurück:
- the newly created condition
-
newOrBreakpointCondition
public static BreakpointCondition newOrBreakpointCondition(@Nonnull BreakpointCondition condition_1, @Nonnull BreakpointCondition condition_2) Creates a condition that triggers when either @condition_1 or @condition_2 is
true.- Parameter:
condition_1
- first conditioncondition_2
- second condition- Gibt zurück:
- the newly created condition
-
newRatioBreakpointCondition
Creates a condition that triggers on ratio changes.
The ratio is represented as @width divided by @height.- Parameter:
type
- the ratio typewidth
- ratio widthheight
- ratio height- Gibt zurück:
- the newly created condition
-
copy
Copies @self.- Gibt zurück:
- a copy of @self
-
free
public void free()Frees @self. -
toStr
Returns a textual representation of @self.
The returned string can be parsed by [func@BreakpointCondition.parse].- Gibt zurück:
- A newly allocated text string
-
parse
Parses a condition from a string.
Length conditions are specified as `<type>: <value>[<unit>]`, where:
- `<type>` can be `min-width`, `max-width`, `min-height` or `max-height`
- `<value>` is a fractional number
- `<unit>` can be `px`, `pt` or `sp`
If the unit is omitted, `px` is assumed.
See [ctor@BreakpointCondition.new_length].
Examples:
- `min-width: 500px`
- `min-height: 400pt`
- `max-width: 100sp`
- `max-height: 500`
Ratio conditions are specified as `<type>: <width>[/<height>]`, where:
- `<type>` can be `min-aspect-ratio` or `max-aspect-ratio`
- `<width>` and `<height>` are integer numbers
See [ctor@BreakpointCondition.new_ratio].
The ratio is represented as `<width>` divided by `<height>`.
If `<height>` is omitted, it's assumed to be 1.
Examples:
- `min-aspect-ratio: 4/3`
- `max-aspect-ratio: 1`
The logical operators `and`, `or` can be used to compose a complex condition
as follows:
- `<condition> and <condition>`: the condition is true when both
`<condition>`s are true, same as when using
[ctor@BreakpointCondition.new_and]
- `<condition> or <condition>`: the condition is true when either of the
`<condition>`s is true, same as when using
[ctor@BreakpointCondition.new_or]
Examples:
- `min-width: 400px and max-aspect-ratio: 4/3`
- `max-width: 360sp or max-width: 360px`
Conditions can be further nested using parentheses, for example:
- `min-width: 400px and (max-aspect-ratio: 4/3 or max-height: 400px)`
If parentheses are omitted, the first operator takes priority.- Parameter:
str
- the string specifying the condition- Gibt zurück:
- the parsed condition
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-