Package ch.bailu.gtk.gtk
Class CssSection
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.gtk.CssSection
- All Implemented Interfaces:
PointerInterface
Defines a part of a CSS document.
Because sections are nested into one another, you can use
[method@CssSection.get_parent] to get the containing region.
Because sections are nested into one another, you can use
[method@CssSection.get_parent] to get the containing region.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCssSection
(File file, CssLocation start, CssLocation end) Creates a new `GtkCssSection` referring to the section
in the given `file` from the `start` location to the
`end` location.CssSection
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassHandler
Returns the location in the CSS document where this section ends.getFile()
Gets the file that @section was parsed from.static int
Gets the parent section for the given `section`.static long
static TypeSystem.TypeSize
Returns the location in the CSS document where this section starts.static long
static TypeSystem.TypeSize
void
Prints the `section` into `string` in a human-readable form.ref()
Increments the reference count on `section`.toStr()
Prints the section into a human-readable text form using
[method@Gtk.CssSection.print].void
unref()
Decrements the reference count on `section`, freeing the
structure if the reference count reaches 0.Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
CssSection
-
CssSection
Creates a new `GtkCssSection` referring to the section
in the given `file` from the `start` location to the
`end` location.- Parameters:
file
- The file this section refers tostart
- The start locationend
- The end location
-
-
Method Details
-
getClassHandler
-
getEndLocation
Returns the location in the CSS document where this section ends.- Returns:
- The end location of this section
-
getFile
Gets the file that @section was parsed from.
If no such file exists, for example because the CSS was loaded via
[method@Gtk.CssProvider.load_from_data], then `NULL` is returned.- Returns:
- the `GFile` from which the `section` was parsed
-
getParent
Gets the parent section for the given `section`.
The parent section is the section that contains this `section`. A special
case are sections of type `GTK_CSS_SECTION_DOCUMEN`T. Their parent will
either be `NULL` if they are the original CSS document that was loaded by
[method@Gtk.CssProvider.load_from_file] or a section of type
`GTK_CSS_SECTION_IMPORT` if it was loaded with an `@import` rule from
a different file.- Returns:
- the parent section
-
getStartLocation
Returns the location in the CSS document where this section starts.- Returns:
- The start location of this section
-
print
Prints the `section` into `string` in a human-readable form.
This is a form like `gtk.css:32:1-23` to denote line 32, characters
1 to 23 in the file `gtk.css`.- Parameters:
string
- a `GString` to print to
-
ref
Increments the reference count on `section`.- Returns:
- the CSS section itself.
-
toStr
Prints the section into a human-readable text form using
[method@Gtk.CssSection.print].- Returns:
- A new string.
-
unref
public void unref()Decrements the reference count on `section`, freeing the
structure if the reference count reaches 0. -
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-