Table of Contents

Class IconTheme

Namespace
Gtk
Assembly
Gtk-4.0.dll
public class IconTheme : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
Inheritance
IconTheme
Implements
Inherited Members

Constructors

IconTheme(params ConstructArgument[])

[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public IconTheme(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

IconTheme(CreationData)

[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected IconTheme(CreationData data)

Parameters

data CreationData

IconTheme(IconThemeHandle)

protected IconTheme(IconThemeHandle handle)

Parameters

handle IconThemeHandle

Fields

ChangedSignal

Signal Descriptor for OnChanged.

public static readonly Signal<IconTheme> ChangedSignal

Field Value

Signal<IconTheme>

DisplayPropertyDefinition

public static readonly Property<Display?, IconTheme> DisplayPropertyDefinition

Field Value

Property<Display, IconTheme>

IconNamesPropertyDefinition

public static readonly Property<string[], IconTheme> IconNamesPropertyDefinition

Field Value

Property<string[], IconTheme>

ResourcePathPropertyDefinition

public static readonly Property<string[], IconTheme> ResourcePathPropertyDefinition

Field Value

Property<string[], IconTheme>

SearchPathPropertyDefinition

public static readonly Property<string[], IconTheme> SearchPathPropertyDefinition

Field Value

Property<string[], IconTheme>

ThemeNamePropertyDefinition

public static readonly Property<string?, IconTheme> ThemeNamePropertyDefinition

Field Value

Property<string, IconTheme>

Properties

Display

public Display? Display { get; set; }

Property Value

Display

IconNames

public string[] IconNames { get; }

Property Value

string[]

ResourcePath

public string[] ResourcePath { get; set; }

Property Value

string[]

SearchPath

public string[] SearchPath { get; set; }

Property Value

string[]

ThemeName

public string? ThemeName { get; set; }

Property Value

string

Methods

AddResourcePath(string)

public void AddResourcePath(string path)

Parameters

path string

AddSearchPath(string)

public void AddSearchPath(string path)

Parameters

path string

GetDisplay()

public Display? GetDisplay()

Returns

Display

GetForDisplay(Display)

public static IconTheme GetForDisplay(Display display)

Parameters

display Display

Returns

IconTheme

GetGType()

public static Type GetGType()

Returns

Type

GetIconNames()

public string[] GetIconNames()

Returns

string[]

GetResourcePath()

public string[]? GetResourcePath()

Returns

string[]

GetSearchPath()

public string[]? GetSearchPath()

Returns

string[]

GetThemeName()

public string GetThemeName()

Returns

string

HasGicon(Icon)

[Version("4.2")]
public bool HasGicon(Icon gicon)

Parameters

gicon Icon

Returns

bool

HasIcon(string)

public bool HasIcon(string iconName)

Parameters

iconName string

Returns

bool

LookupByGicon(Icon, int, int, TextDirection, IconLookupFlags)

public IconPaintable LookupByGicon(Icon icon, int size, int scale, TextDirection direction, IconLookupFlags flags)

Parameters

icon Icon
size int
scale int
direction TextDirection
flags IconLookupFlags

Returns

IconPaintable

LookupIcon(string, string[]?, int, int, TextDirection, IconLookupFlags)

public IconPaintable LookupIcon(string iconName, string[]? fallbacks, int size, int scale, TextDirection direction, IconLookupFlags flags)

Parameters

iconName string
fallbacks string[]
size int
scale int
direction TextDirection
flags IconLookupFlags

Returns

IconPaintable

New()

public static IconTheme New()

Returns

IconTheme

NewFromPointer(nint, bool)

Creates a new managed IconTheme instance for a given pointer.

public static IconTheme NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

IconTheme

NewWithProperties(ConstructArgument[])

Creates a new IconTheme and sets the properties specified by the construct arguments.

public static IconTheme NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

IconTheme

SetResourcePath(string[]?)

public void SetResourcePath(string[]? path)

Parameters

path string[]

SetSearchPath(string[]?)

public void SetSearchPath(string[]? path)

Parameters

path string[]

SetThemeName(string?)

public void SetThemeName(string? themeName)

Parameters

themeName string

Events

OnChanged

public event SignalHandler<IconTheme> OnChanged

Event Type

SignalHandler<IconTheme>