Exemplo n.º 1
0
        public static NSSet MakeNSObjectSet <T> (T [] values) where T : NSObject
        {
            NSArray a = NSArray.FromNSObjects(values);

            return((NSSet)Runtime.GetNSObject(MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr(class_ptr, selSetWithArray, a.Handle)));
        }
Exemplo n.º 2
0
        public static bool LoadNibNamed(this NSBundle bundle, string nibName, NSObject owner, NSArray topLevelObjects)
        {
            bool   result;
            IntPtr name = NSString.CreateNative(nibName);

            result = Messaging.bool_objc_msgSend_IntPtr_IntPtr_IntPtr(bundle.Handle, Selector.GetHandle("loadNibNamed:owner:topLevelObjects:"), name, owner.Handle, topLevelObjects != null ? topLevelObjects.Handle : IntPtr.Zero);
            NSString.ReleaseNative(name);
            return(result);
        }
Exemplo n.º 3
0
 public NSSet(params string [] strings) : this(NSArray.FromStrings(strings))
 {
 }
Exemplo n.º 4
0
        public T [] ToArray <T> () where T : NSObject
        {
            IntPtr nsarr = _AllObjects();

            return(NSArray.ArrayFromHandle <T> (nsarr));
        }
Exemplo n.º 5
0
 public NSSet(params object [] objs) : this(NSArray.FromObjects(objs))
 {
 }
Exemplo n.º 6
0
        public static NSOrderedSet MakeNSOrderedSet <T> (T [] values) where T : NSObject
        {
            NSArray a = NSArray.FromNSObjects(values);

            return(Runtime.GetNSObject <NSOrderedSet> (MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr(class_ptr, Selector.GetHandle(selSetWithArray), a.Handle)));
        }
Exemplo n.º 7
0
 public NSOrderedSet(params NSObject [] objs) : this(NSArray.FromNSObjects(objs))
 {
 }
Exemplo n.º 8
0
 public static string[] GetDirectories(NSSearchPathDirectory directory, NSSearchPathDomain domainMask, bool expandTilde = true)
 {
     return(NSArray.StringArrayFromHandle(NSSearchPathForDirectoriesInDomains(directory, domainMask, expandTilde)));
 }
Exemplo n.º 9
0
        public static string[] GetDirectories(NSSearchPathDirectory directory, NSSearchPathDomain domainMask, bool expandTilde)
        {
            IntPtr values = NSSearchPathForDirectoriesInDomains(directory, domainMask, expandTilde);

            return(NSArray.StringArrayFromHandle(values));
        }