Package ch.bailu.gtk.gtk
Class IconPaintable
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gtk.IconPaintable
- All Implemented Interfaces:
PointerInterface
Contains information found when looking up an icon in `GtkIconTheme`.
`GtkIconPaintable` implements `GdkPaintable`.
`GtkIconPaintable` implements `GdkPaintable`.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionImplements interfacePaintable
.Implements interfaceSymbolicPaintable
.static ClassHandler
getFile()
Gets the `GFile` that was used to load the icon.Get the icon name being used for this icon.static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
boolean
Checks if the icon is symbolic or not.static IconPaintable
newForFileIconPaintable
(File file, int size, int scale) Creates a `GtkIconPaintable` for a file with a given size and scale.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
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
-
IconPaintable
-
-
Method Details
-
getClassHandler
-
newForFileIconPaintable
Creates a `GtkIconPaintable` for a file with a given size and scale.
The icon can then be rendered by using it as a `GdkPaintable`.- Parameters:
file
- a `GFile`size
- desired icon sizescale
- the desired scale- Returns:
- a `GtkIconPaintable` containing for the icon. Unref with g_object_unref()
-
getFile
Gets the `GFile` that was used to load the icon.
Returns %NULL if the icon was not loaded from a file.- Returns:
- the `GFile` for the icon
-
getIconName
Get the icon name being used for this icon.
When an icon looked up in the icon theme was not available, the
icon theme may use fallback icons - either those specified to
gtk_icon_theme_lookup_icon() or the always-available
"image-missing". The icon chosen is returned by this function.
If the icon was created without an icon theme, this function
returns %NULL.- Returns:
- the themed icon-name for the icon, or %NULL if its not a themed icon.
-
isSymbolic
public boolean isSymbolic()Checks if the icon is symbolic or not.
This currently uses only the file name and not the file contents
for determining this. This behaviour may change in the future.
Note that to render a symbolic `GtkIconPaintable` properly (with
recoloring), you have to set its icon name on a `GtkImage`.- Returns:
- %TRUE if the icon is symbolic, %FALSE otherwise
-
asPaintable
Implements interfacePaintable
. Call this to get access to interface functions.- Returns:
Paintable
-
asSymbolicPaintable
Implements interfaceSymbolicPaintable
. Call this to get access to interface functions.- Returns:
SymbolicPaintable
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-