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
boolTrue 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
IntPtrownedRef
boolDefines 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
Properties
Handle
public IntPtr Handle { get; }
Property Value
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
stringtarget
ObjecttargetProperty
stringflags
BindingFlags
Returns
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
stringtarget
ObjecttargetProperty
stringflags
BindingFlagstransformTo
ClosuretransformFrom
Closure
Returns
CompatControl(nuint, IntPtr)
public static nuint CompatControl(nuint what, IntPtr data)
Parameters
Returns
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
GetGType()
public static Type GetGType()
Returns
GetProperty(string, Value)
public void GetProperty(string propertyName, Value value)
Parameters
GetQdata(Quark)
public IntPtr GetQdata(Quark quark)
Parameters
quark
Quark
Returns
GetValist(string, IntPtr)
public void GetValist(string firstPropertyName, IntPtr varArgs)
Parameters
Getv(string[], Value[])
[Version("2.54")]
public void Getv(string[] names, Value[] values)
Parameters
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
TypeInterfacepropertyName
string
Returns
InterfaceInstallProperty(TypeInterface, ParamSpec)
[Version("2.4")]
public static void InterfaceInstallProperty(TypeInterface gIface, ParamSpec pspec)
Parameters
gIface
TypeInterfacepspec
ParamSpec
IsFloating()
[Version("2.10")]
public bool IsFloating()
Returns
NewValist(Type, string, IntPtr)
public static Object NewValist(Type objectType, string firstPropertyName, IntPtr varArgs)
Parameters
Returns
NewWithProperties(Type, string[], Value[])
[Version("2.54")]
public static Object NewWithProperties(Type objectType, string[] names, Value[] values)
Parameters
Returns
Newv(Type, Parameter[])
public static Object Newv(Type objectType, Parameter[] parameters)
Parameters
Returns
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
stringThe name of the property who changed.
Ref()
public Object Ref()
Returns
RefSink()
[Version("2.10")]
public Object RefSink()
Returns
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
SetProperty(string, Value)
public void SetProperty(string propertyName, Value value)
Parameters
SetQdata(Quark, IntPtr)
public void SetQdata(Quark quark, IntPtr data)
Parameters
SetValist(string, IntPtr)
public void SetValist(string firstPropertyName, IntPtr varArgs)
Parameters
Setv(string[], Value[])
[Version("2.54")]
public void Setv(string[] names, Value[] values)
Parameters
StealData(string)
public IntPtr StealData(string key)
Parameters
key
string
Returns
StealQdata(Quark)
public IntPtr StealQdata(Quark quark)
Parameters
quark
Quark
Returns
TakeRef()
[Version("2.70")]
public Object TakeRef()
Returns
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
PropertyChanged
Event triggered when a property value changes.
public event PropertyChangedEventHandler? PropertyChanged