Пример #1
0
 public Value(Opaque val, string type_name)
 {
     type = IntPtr.Zero;
     pad1 = pad2 = 0;
     g_value_init(ref this, GType.FromName(type_name).Val);
     g_value_set_boxed(ref this, val.Handle);
 }
Пример #2
0
 public Value(EnumWrapper wrap, string type_name)
 {
     type = IntPtr.Zero;
     pad1 = new Padding();
     pad2 = new Padding();
     g_value_init(ref this, GType.FromName(type_name).Val);
     if (wrap.flags)
     {
         g_value_set_flags(ref this, (uint)(int)wrap);
     }
     else
     {
         g_value_set_enum(ref this, (int)wrap);
     }
 }
 public static void RegisterType(string native_name, string mangled)
 {
     RegisterType(GType.FromName(native_name), Type.GetType(mangled));
 }