Esempio n. 1
1
 internal bool WriteObjects(NSArray objects) => Cocoa.SendBool(Handle, sel_write_objects, objects.Handle);
Esempio n. 2
1
 internal bool CanReadObjectForClasses(NSArray classArray, NSDictionary?optionDict) =>
 Cocoa.SendBool(Handle, sel_can_read_object_for_classes, classArray.Handle, optionDict?.Handle ?? IntPtr.Zero);
Esempio n. 3
0
        static NSNotificationCenter()
        {
            IntPtr nsncClass = Class.Get("NSNotificationCenter");

            Handle = Cocoa.SendIntPtr(nsncClass, sel_default_center);

            WINDOW_DID_ENTER_FULL_SCREEN = Cocoa.GetStringConstant(Cocoa.AppKitLibrary, "NSWindowDidEnterFullScreenNotification");
            WINDOW_DID_EXIT_FULL_SCREEN  = Cocoa.GetStringConstant(Cocoa.AppKitLibrary, "NSWindowDidExitFullScreenNotification");
        }
Esempio n. 4
0
        internal static NSArray ArrayWithObjects(IntPtr[] objs)
        {
            var mutableArray = Cocoa.SendIntPtr(mutable_class_pointer, sel_array);

            foreach (IntPtr obj in objs)
            {
                Cocoa.SendVoid(mutableArray, sel_add_object, obj);
            }
            return(new NSArray(mutableArray));
        }
Esempio n. 5
0
        internal NSArray?ReadObjectsForClasses(NSArray classArray, NSDictionary?optionDict)
        {
            var result = Cocoa.SendIntPtr(Handle, sel_read_objects_for_classes, classArray.Handle, optionDict?.Handle ?? IntPtr.Zero);

            return(result == IntPtr.Zero ? (NSArray?)null : new NSArray(result));
        }
Esempio n. 6
0
 internal int ClearContents() => Cocoa.SendInt(Handle, sel_clear_contents);
Esempio n. 7
0
 internal static NSPasteboard GeneralPasteboard() => new NSPasteboard(Cocoa.SendIntPtr(class_pointer, sel_general_pasteboard));
Esempio n. 8
0
 internal static void AddObserver(IntPtr target, IntPtr selector, IntPtr name, IntPtr obj) =>
 Cocoa.SendVoid(Handle, sel_add_observer, target, selector, name, obj);
Esempio n. 9
0
 internal IntPtr ObjectAtIndex(int index) => Cocoa.SendIntPtr(Handle, sel_object_at_index, index);
Esempio n. 10
0
 internal int Count() => Cocoa.SendInt(Handle, sel_count);
Esempio n. 11
0
 internal static NSArray ArrayWithObject(IntPtr obj) => new NSArray(Cocoa.SendIntPtr(class_pointer, sel_array_with_object, obj));
Esempio n. 12
0
        static NSApplication()
        {
            IntPtr nsappClass = Class.Get("NSApplication");

            Handle = Cocoa.SendIntPtr(nsappClass, sel_shared_application);
        }