- private System.IntPtr handle;
- ///<summary>Pointer to the native instance.</summary>
- public System.IntPtr NativeHandle {
- get { return handle; }
- }
- [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
- efl_text_markup_interface_get();
- ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
- private ITextMarkupConcrete(System.IntPtr raw)
- {
- handle = raw;
- RegisterEventProxies();
- }
- ///<summary>Destructor.</summary>
- ~ITextMarkupConcrete()
- {
- Dispose(false);
- }
- ///<summary>Releases the underlying native instance.</summary>
- void Dispose(bool disposing)
- {
- if (handle != System.IntPtr.Zero) {
- Efl.Eo.Globals.efl_unref(handle);
- handle = System.IntPtr.Zero;
- }
- }
- ///<summary>Releases the underlying native instance.</summary>
- public void Dispose()
- {
- Dispose(true);
- GC.SuppressFinalize(this);
- }
- ///<summary>Verifies if the given object is equal to this one.</summary>
- public override bool Equals(object obj)
- {
- var other = obj as Efl.Object;
- if (other == null)
- return false;
- return this.NativeHandle == other.NativeHandle;
- }
- ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
- public override int GetHashCode()
- {
- return this.NativeHandle.ToInt32();
- }
- ///<summary>Turns the native pointer into a string representation.</summary>
- public override String ToString()
+
+ /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
+ /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
+ private ITextMarkupConcrete(ConstructingHandle ch) : base(ch)