Esempio n. 1
0
 /// <summary>
 /// sets callback GetSize in GtkCellRendererClass-Struct
 /// </summary>
 /// <param name="gtype"></param>
 /// <param name="callback"></param>
 static void OverrideGetSize(GLib.GType gtype, GetSizeNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_size"));
         *       raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Esempio n. 2
0
        static GetSizeNativeDelegate InternalGetSizeNativeDelegate(GLib.GType gtype)
        {
            GetSizeNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_size"));
                if (*raw_ptr == IntPtr.Zero)
                {
                    return(default);
Esempio n. 3
0
        private ulong InternalGetSize()
        {
            GetSizeNativeDelegate unmanaged = class_abi.BaseOverride <GetSizeNativeDelegate>(this.LookupGType(), "get_size");

            if (unmanaged == null)
            {
                return(0);
            }

            UIntPtr __result = unmanaged(this.Handle);

            return((ulong)__result);
        }
Esempio n. 4
0
        private ulong InternalGetSize()
        {
            GetSizeNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("get_size"));
                unmanaged = (GetSizeNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetSizeNativeDelegate));
            }
            if (unmanaged == null)
            {
                return(0);
            }

            UIntPtr __result = unmanaged(this.Handle);

            return((ulong)__result);
        }
Esempio n. 5
0
		static void OverrideGetSize (Gst.GLib.GType gtype, GetSizeNativeDelegate callback)
		{
			GstBaseSrcClass class_iface = GetClassStruct (gtype, false);
			class_iface.GetSize = callback;
			OverrideClassStruct (gtype, class_iface);
		}