Table of Contents

Class Object

Namespace
GObject
Assembly
GObject-2.0.dll
public class Object : IObject, INotifyPropertyChanged, IDisposable, IHandle, GTypeProvider
Inheritance
Object
Implements
Derived
Inherited Members

Constructors

Object(bool, ConstructArgument[])

Constructs a new object

protected Object(bool owned, ConstructArgument[] constructArguments)

Parameters

owned bool

True if the ownership of the resulting resulting handle will be transfered. Otherwise false.

constructArguments ConstructArgument[]

Remarks

This constructor is protected to be sure that there is no caller (enduser) keeping a reference to the construct parameters as the contained values are freed at the end of this constructor. If certain constructors are needed they need to be implemented with concrete constructor arguments in a higher layer.

Object(IntPtr, bool)

Initializes a wrapper for an existing object

protected Object(IntPtr handle, bool ownedRef)

Parameters

handle IntPtr
ownedRef bool

Defines if the handle is owned by us. If not owned by us it is refed to keep it around.

Fields

NotifySignal

Signal Descriptor for OnNotify.

public static readonly Signal<Object, Object.NotifySignalArgs> NotifySignal

Field Value

Signal<Object, Object.NotifySignalArgs>

Properties

Handle

public IntPtr Handle { get; }

Property Value

IntPtr

Methods

AddWeakPointer(ref IntPtr)

public void AddWeakPointer(ref IntPtr weakPointerLocation)

Parameters

weakPointerLocation IntPtr

BindProperty(string, Object, string, BindingFlags)

[Version("2.26")]
public Binding BindProperty(string sourceProperty, Object target, string targetProperty, BindingFlags flags)

Parameters

sourceProperty string
target Object
targetProperty string
flags BindingFlags

Returns

Binding

BindPropertyFull(string, Object, string, BindingFlags, Closure, Closure)

[Version("2.26")]
public Binding BindPropertyFull(string sourceProperty, Object target, string targetProperty, BindingFlags flags, Closure transformTo, Closure transformFrom)

Parameters

sourceProperty string
target Object
targetProperty string
flags BindingFlags
transformTo Closure
transformFrom Closure

Returns

Binding

CompatControl(nuint, IntPtr)

public static nuint CompatControl(nuint what, IntPtr data)

Parameters

what nuint
data IntPtr

Returns

nuint

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public virtual void Dispose()

ForceFloating()

[Version("2.10")]
public void ForceFloating()

FreezeNotify()

public void FreezeNotify()

GetData(string)

public IntPtr GetData(string key)

Parameters

key string

Returns

IntPtr

GetGType()

public static Type GetGType()

Returns

Type

GetProperty(string, Value)

public void GetProperty(string propertyName, Value value)

Parameters

propertyName string
value Value

GetQdata(Quark)

public IntPtr GetQdata(Quark quark)

Parameters

quark Quark

Returns

IntPtr

GetValist(string, IntPtr)

public void GetValist(string firstPropertyName, IntPtr varArgs)

Parameters

firstPropertyName string
varArgs IntPtr

Getv(string[], Value[])

[Version("2.54")]
public void Getv(string[] names, Value[] values)

Parameters

names string[]
values Value[]

Initialize()

Does common initialization tasks. Wrapper and subclasses can override here to perform immediate initialization.

protected virtual void Initialize()

InterfaceFindProperty(TypeInterface, string)

[Version("2.4")]
public static ParamSpec InterfaceFindProperty(TypeInterface gIface, string propertyName)

Parameters

gIface TypeInterface
propertyName string

Returns

ParamSpec

InterfaceInstallProperty(TypeInterface, ParamSpec)

[Version("2.4")]
public static void InterfaceInstallProperty(TypeInterface gIface, ParamSpec pspec)

Parameters

gIface TypeInterface
pspec ParamSpec

IsFloating()

[Version("2.10")]
public bool IsFloating()

Returns

bool

NewValist(Type, string, IntPtr)

public static Object NewValist(Type objectType, string firstPropertyName, IntPtr varArgs)

Parameters

objectType Type
firstPropertyName string
varArgs IntPtr

Returns

Object

NewWithProperties(Type, string[], Value[])

[Version("2.54")]
public static Object NewWithProperties(Type objectType, string[] names, Value[] values)

Parameters

objectType Type
names string[]
values Value[]

Returns

Object

Newv(Type, Parameter[])

public static Object Newv(Type objectType, Parameter[] parameters)

Parameters

objectType Type
parameters Parameter[]

Returns

Object

Notify(string)

public void Notify(string propertyName)

Parameters

propertyName string

NotifyByPspec(ParamSpec)

[Version("2.26")]
public void NotifyByPspec(ParamSpec pspec)

Parameters

pspec ParamSpec

OnPropertyChanged(string?)

Notify this object that a property has just changed.

protected void OnPropertyChanged(string? propertyName = null)

Parameters

propertyName string

The name of the property who changed.

Ref()

public Object Ref()

Returns

Object

RefSink()

[Version("2.10")]
public Object RefSink()

Returns

Object

RemoveWeakPointer(ref IntPtr)

public void RemoveWeakPointer(ref IntPtr weakPointerLocation)

Parameters

weakPointerLocation IntPtr

RunDispose()

public void RunDispose()

SetData(string, IntPtr)

public void SetData(string key, IntPtr data)

Parameters

key string
data IntPtr

SetProperty(string, Value)

public void SetProperty(string propertyName, Value value)

Parameters

propertyName string
value Value

SetQdata(Quark, IntPtr)

public void SetQdata(Quark quark, IntPtr data)

Parameters

quark Quark
data IntPtr

SetValist(string, IntPtr)

public void SetValist(string firstPropertyName, IntPtr varArgs)

Parameters

firstPropertyName string
varArgs IntPtr

Setv(string[], Value[])

[Version("2.54")]
public void Setv(string[] names, Value[] values)

Parameters

names string[]
values Value[]

StealData(string)

public IntPtr StealData(string key)

Parameters

key string

Returns

IntPtr

StealQdata(Quark)

public IntPtr StealQdata(Quark quark)

Parameters

quark Quark

Returns

IntPtr

TakeRef()

[Version("2.70")]
public Object TakeRef()

Returns

Object

ThawNotify()

public void ThawNotify()

Unref()

public void Unref()

WatchClosure(Closure)

public void WatchClosure(Closure closure)

Parameters

closure Closure

Events

OnNotify

public event SignalHandler<Object, Object.NotifySignalArgs> OnNotify

Event Type

SignalHandler<Object, Object.NotifySignalArgs>

PropertyChanged

Event triggered when a property value changes.

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler