1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct NSCellType(pub NSUInteger);
17impl NSCellType {
18 #[doc(alias = "NSNullCellType")]
19 pub const NullCellType: Self = Self(0);
20 #[doc(alias = "NSTextCellType")]
21 pub const TextCellType: Self = Self(1);
22 #[doc(alias = "NSImageCellType")]
23 pub const ImageCellType: Self = Self(2);
24}
25
26unsafe impl Encode for NSCellType {
27 const ENCODING: Encoding = NSUInteger::ENCODING;
28}
29
30unsafe impl RefEncode for NSCellType {
31 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
32}
33
34#[repr(transparent)]
37#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
38pub struct NSCellAttribute(pub NSUInteger);
39impl NSCellAttribute {
40 #[doc(alias = "NSCellDisabled")]
41 pub const CellDisabled: Self = Self(0);
42 #[doc(alias = "NSCellState")]
43 pub const CellState: Self = Self(1);
44 #[doc(alias = "NSPushInCell")]
45 pub const PushInCell: Self = Self(2);
46 #[doc(alias = "NSCellEditable")]
47 pub const CellEditable: Self = Self(3);
48 #[doc(alias = "NSChangeGrayCell")]
49 pub const ChangeGrayCell: Self = Self(4);
50 #[doc(alias = "NSCellHighlighted")]
51 pub const CellHighlighted: Self = Self(5);
52 #[doc(alias = "NSCellLightsByContents")]
53 pub const CellLightsByContents: Self = Self(6);
54 #[doc(alias = "NSCellLightsByGray")]
55 pub const CellLightsByGray: Self = Self(7);
56 #[doc(alias = "NSChangeBackgroundCell")]
57 pub const ChangeBackgroundCell: Self = Self(8);
58 #[doc(alias = "NSCellLightsByBackground")]
59 pub const CellLightsByBackground: Self = Self(9);
60 #[doc(alias = "NSCellIsBordered")]
61 pub const CellIsBordered: Self = Self(10);
62 #[doc(alias = "NSCellHasOverlappingImage")]
63 pub const CellHasOverlappingImage: Self = Self(11);
64 #[doc(alias = "NSCellHasImageHorizontal")]
65 pub const CellHasImageHorizontal: Self = Self(12);
66 #[doc(alias = "NSCellHasImageOnLeftOrBottom")]
67 pub const CellHasImageOnLeftOrBottom: Self = Self(13);
68 #[doc(alias = "NSCellChangesContents")]
69 pub const CellChangesContents: Self = Self(14);
70 #[doc(alias = "NSCellIsInsetButton")]
71 pub const CellIsInsetButton: Self = Self(15);
72 #[doc(alias = "NSCellAllowsMixedState")]
73 pub const CellAllowsMixedState: Self = Self(16);
74}
75
76unsafe impl Encode for NSCellAttribute {
77 const ENCODING: Encoding = NSUInteger::ENCODING;
78}
79
80unsafe impl RefEncode for NSCellAttribute {
81 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
82}
83
84#[repr(transparent)]
87#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
88pub struct NSCellImagePosition(pub NSUInteger);
89impl NSCellImagePosition {
90 #[doc(alias = "NSNoImage")]
91 pub const NoImage: Self = Self(0);
92 #[doc(alias = "NSImageOnly")]
93 pub const ImageOnly: Self = Self(1);
94 #[doc(alias = "NSImageLeft")]
95 pub const ImageLeft: Self = Self(2);
96 #[doc(alias = "NSImageRight")]
97 pub const ImageRight: Self = Self(3);
98 #[doc(alias = "NSImageBelow")]
99 pub const ImageBelow: Self = Self(4);
100 #[doc(alias = "NSImageAbove")]
101 pub const ImageAbove: Self = Self(5);
102 #[doc(alias = "NSImageOverlaps")]
103 pub const ImageOverlaps: Self = Self(6);
104 #[doc(alias = "NSImageLeading")]
105 pub const ImageLeading: Self = Self(7);
106 #[doc(alias = "NSImageTrailing")]
107 pub const ImageTrailing: Self = Self(8);
108}
109
110unsafe impl Encode for NSCellImagePosition {
111 const ENCODING: Encoding = NSUInteger::ENCODING;
112}
113
114unsafe impl RefEncode for NSCellImagePosition {
115 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
116}
117
118#[repr(transparent)]
121#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
122pub struct NSImageScaling(pub NSUInteger);
123impl NSImageScaling {
124 #[doc(alias = "NSImageScaleProportionallyDown")]
125 pub const ScaleProportionallyDown: Self = Self(0);
126 #[doc(alias = "NSImageScaleAxesIndependently")]
127 pub const ScaleAxesIndependently: Self = Self(1);
128 #[doc(alias = "NSImageScaleNone")]
129 pub const ScaleNone: Self = Self(2);
130 #[doc(alias = "NSImageScaleProportionallyUpOrDown")]
131 pub const ScaleProportionallyUpOrDown: Self = Self(3);
132 #[deprecated = "Use NSImageScaleProportionallyDown instead"]
133 pub const NSScaleProportionally: Self = Self(0);
134 #[deprecated = "Use NSImageScaleAxesIndependently instead"]
135 pub const NSScaleToFit: Self = Self(1);
136 #[deprecated = "Use NSImageScaleNone instead"]
137 pub const NSScaleNone: Self = Self(2);
138}
139
140unsafe impl Encode for NSImageScaling {
141 const ENCODING: Encoding = NSUInteger::ENCODING;
142}
143
144unsafe impl RefEncode for NSImageScaling {
145 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
146}
147
148pub type NSControlStateValue = NSInteger;
151
152pub static NSControlStateValueMixed: NSControlStateValue = -1;
154
155pub static NSControlStateValueOff: NSControlStateValue = 0;
157
158pub static NSControlStateValueOn: NSControlStateValue = 1;
160
161#[repr(transparent)]
164#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
165pub struct NSCellStyleMask(pub NSUInteger);
166bitflags::bitflags! {
167 impl NSCellStyleMask: NSUInteger {
168 #[doc(alias = "NSNoCellMask")]
169 const NoCellMask = 0;
170 #[doc(alias = "NSContentsCellMask")]
171 const ContentsCellMask = 1;
172 #[doc(alias = "NSPushInCellMask")]
173 const PushInCellMask = 2;
174 #[doc(alias = "NSChangeGrayCellMask")]
175 const ChangeGrayCellMask = 4;
176 #[doc(alias = "NSChangeBackgroundCellMask")]
177 const ChangeBackgroundCellMask = 8;
178 }
179}
180
181unsafe impl Encode for NSCellStyleMask {
182 const ENCODING: Encoding = NSUInteger::ENCODING;
183}
184
185unsafe impl RefEncode for NSCellStyleMask {
186 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
187}
188
189#[repr(transparent)]
192#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
193pub struct NSControlTint(pub NSUInteger);
194impl NSControlTint {
195 #[doc(alias = "NSDefaultControlTint")]
196 pub const DefaultControlTint: Self = Self(0);
197 #[doc(alias = "NSBlueControlTint")]
198 pub const BlueControlTint: Self = Self(1);
199 #[doc(alias = "NSGraphiteControlTint")]
200 pub const GraphiteControlTint: Self = Self(6);
201 #[doc(alias = "NSClearControlTint")]
202 pub const ClearControlTint: Self = Self(7);
203}
204
205unsafe impl Encode for NSControlTint {
206 const ENCODING: Encoding = NSUInteger::ENCODING;
207}
208
209unsafe impl RefEncode for NSControlTint {
210 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
211}
212
213#[repr(transparent)]
216#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
217pub struct NSControlSize(pub NSUInteger);
218impl NSControlSize {
219 #[doc(alias = "NSControlSizeRegular")]
220 pub const Regular: Self = Self(0);
221 #[doc(alias = "NSControlSizeSmall")]
222 pub const Small: Self = Self(1);
223 #[doc(alias = "NSControlSizeMini")]
224 pub const Mini: Self = Self(2);
225 #[doc(alias = "NSControlSizeLarge")]
226 pub const Large: Self = Self(3);
227 #[doc(alias = "NSControlSizeExtraLarge")]
228 pub const ExtraLarge: Self = Self(4);
229}
230
231unsafe impl Encode for NSControlSize {
232 const ENCODING: Encoding = NSUInteger::ENCODING;
233}
234
235unsafe impl RefEncode for NSControlSize {
236 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
237}
238
239extern_class!(
240 #[unsafe(super(NSObject))]
242 #[thread_kind = MainThreadOnly]
243 #[derive(Debug, PartialEq, Eq, Hash)]
244 pub struct NSCell;
245);
246
247#[cfg(feature = "NSAccessibilityProtocols")]
248extern_conformance!(
249 unsafe impl NSAccessibility for NSCell {}
250);
251
252#[cfg(feature = "NSAccessibilityProtocols")]
253extern_conformance!(
254 unsafe impl NSAccessibilityElementProtocol for NSCell {}
255);
256
257extern_conformance!(
258 unsafe impl NSCoding for NSCell {}
259);
260
261extern_conformance!(
262 unsafe impl NSCopying for NSCell {}
263);
264
265unsafe impl CopyingHelper for NSCell {
266 type Result = Self;
267}
268
269extern_conformance!(
270 unsafe impl NSObjectProtocol for NSCell {}
271);
272
273#[cfg(feature = "NSUserInterfaceItemIdentification")]
274extern_conformance!(
275 unsafe impl NSUserInterfaceItemIdentification for NSCell {}
276);
277
278impl NSCell {
279 extern_methods!(
280 #[unsafe(method(init))]
281 #[unsafe(method_family = init)]
282 pub fn init(this: Allocated<Self>) -> Retained<Self>;
283
284 #[unsafe(method(initTextCell:))]
285 #[unsafe(method_family = init)]
286 pub fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
287
288 #[cfg(feature = "NSImage")]
289 #[unsafe(method(initImageCell:))]
290 #[unsafe(method_family = init)]
291 pub fn initImageCell(this: Allocated<Self>, image: Option<&NSImage>) -> Retained<Self>;
292
293 #[unsafe(method(initWithCoder:))]
297 #[unsafe(method_family = init)]
298 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
299
300 #[unsafe(method(prefersTrackingUntilMouseUp))]
301 #[unsafe(method_family = none)]
302 pub fn prefersTrackingUntilMouseUp(mtm: MainThreadMarker) -> bool;
303
304 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
305 #[unsafe(method(controlView))]
309 #[unsafe(method_family = none)]
310 pub unsafe fn controlView(&self) -> Option<Retained<NSView>>;
311
312 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
313 #[unsafe(method(setControlView:))]
319 #[unsafe(method_family = none)]
320 pub unsafe fn setControlView(&self, control_view: Option<&NSView>);
321
322 #[unsafe(method(type))]
323 #[unsafe(method_family = none)]
324 pub fn r#type(&self) -> NSCellType;
325
326 #[unsafe(method(setType:))]
328 #[unsafe(method_family = none)]
329 pub fn setType(&self, r#type: NSCellType);
330
331 #[unsafe(method(state))]
332 #[unsafe(method_family = none)]
333 pub fn state(&self) -> NSControlStateValue;
334
335 #[unsafe(method(setState:))]
337 #[unsafe(method_family = none)]
338 pub fn setState(&self, state: NSControlStateValue);
339
340 #[unsafe(method(target))]
341 #[unsafe(method_family = none)]
342 pub fn target(&self) -> Option<Retained<AnyObject>>;
343
344 #[unsafe(method(setTarget:))]
352 #[unsafe(method_family = none)]
353 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
354
355 #[unsafe(method(action))]
356 #[unsafe(method_family = none)]
357 pub fn action(&self) -> Option<Sel>;
358
359 #[unsafe(method(setAction:))]
365 #[unsafe(method_family = none)]
366 pub unsafe fn setAction(&self, action: Option<Sel>);
367
368 #[unsafe(method(tag))]
369 #[unsafe(method_family = none)]
370 pub fn tag(&self) -> NSInteger;
371
372 #[unsafe(method(setTag:))]
374 #[unsafe(method_family = none)]
375 pub fn setTag(&self, tag: NSInteger);
376
377 #[unsafe(method(title))]
378 #[unsafe(method_family = none)]
379 pub fn title(&self) -> Retained<NSString>;
380
381 #[unsafe(method(setTitle:))]
385 #[unsafe(method_family = none)]
386 pub fn setTitle(&self, title: &NSString);
387
388 #[unsafe(method(isOpaque))]
389 #[unsafe(method_family = none)]
390 pub fn isOpaque(&self) -> bool;
391
392 #[unsafe(method(isEnabled))]
393 #[unsafe(method_family = none)]
394 pub fn isEnabled(&self) -> bool;
395
396 #[unsafe(method(setEnabled:))]
398 #[unsafe(method_family = none)]
399 pub fn setEnabled(&self, enabled: bool);
400
401 #[cfg(feature = "NSEvent")]
402 #[unsafe(method(sendActionOn:))]
403 #[unsafe(method_family = none)]
404 pub fn sendActionOn(&self, mask: NSEventMask) -> NSInteger;
405
406 #[unsafe(method(isContinuous))]
407 #[unsafe(method_family = none)]
408 pub fn isContinuous(&self) -> bool;
409
410 #[unsafe(method(setContinuous:))]
412 #[unsafe(method_family = none)]
413 pub fn setContinuous(&self, continuous: bool);
414
415 #[unsafe(method(isEditable))]
416 #[unsafe(method_family = none)]
417 pub fn isEditable(&self) -> bool;
418
419 #[unsafe(method(setEditable:))]
421 #[unsafe(method_family = none)]
422 pub fn setEditable(&self, editable: bool);
423
424 #[unsafe(method(isSelectable))]
425 #[unsafe(method_family = none)]
426 pub fn isSelectable(&self) -> bool;
427
428 #[unsafe(method(setSelectable:))]
430 #[unsafe(method_family = none)]
431 pub fn setSelectable(&self, selectable: bool);
432
433 #[unsafe(method(isBordered))]
434 #[unsafe(method_family = none)]
435 pub fn isBordered(&self) -> bool;
436
437 #[unsafe(method(setBordered:))]
439 #[unsafe(method_family = none)]
440 pub fn setBordered(&self, bordered: bool);
441
442 #[unsafe(method(isBezeled))]
443 #[unsafe(method_family = none)]
444 pub fn isBezeled(&self) -> bool;
445
446 #[unsafe(method(setBezeled:))]
448 #[unsafe(method_family = none)]
449 pub fn setBezeled(&self, bezeled: bool);
450
451 #[unsafe(method(isScrollable))]
452 #[unsafe(method_family = none)]
453 pub fn isScrollable(&self) -> bool;
454
455 #[unsafe(method(setScrollable:))]
457 #[unsafe(method_family = none)]
458 pub fn setScrollable(&self, scrollable: bool);
459
460 #[unsafe(method(isHighlighted))]
461 #[unsafe(method_family = none)]
462 pub fn isHighlighted(&self) -> bool;
463
464 #[unsafe(method(setHighlighted:))]
466 #[unsafe(method_family = none)]
467 pub fn setHighlighted(&self, highlighted: bool);
468
469 #[cfg(feature = "NSText")]
470 #[unsafe(method(alignment))]
471 #[unsafe(method_family = none)]
472 pub fn alignment(&self) -> NSTextAlignment;
473
474 #[cfg(feature = "NSText")]
475 #[unsafe(method(setAlignment:))]
477 #[unsafe(method_family = none)]
478 pub fn setAlignment(&self, alignment: NSTextAlignment);
479
480 #[unsafe(method(wraps))]
481 #[unsafe(method_family = none)]
482 pub fn wraps(&self) -> bool;
483
484 #[unsafe(method(setWraps:))]
486 #[unsafe(method_family = none)]
487 pub fn setWraps(&self, wraps: bool);
488
489 #[cfg(feature = "NSFont")]
490 #[unsafe(method(font))]
491 #[unsafe(method_family = none)]
492 pub fn font(&self) -> Option<Retained<NSFont>>;
493
494 #[cfg(feature = "NSFont")]
495 #[unsafe(method(setFont:))]
497 #[unsafe(method_family = none)]
498 pub fn setFont(&self, font: Option<&NSFont>);
499
500 #[unsafe(method(keyEquivalent))]
501 #[unsafe(method_family = none)]
502 pub fn keyEquivalent(&self) -> Retained<NSString>;
503
504 #[unsafe(method(formatter))]
505 #[unsafe(method_family = none)]
506 pub fn formatter(&self) -> Option<Retained<NSFormatter>>;
507
508 #[unsafe(method(setFormatter:))]
510 #[unsafe(method_family = none)]
511 pub fn setFormatter(&self, formatter: Option<&NSFormatter>);
512
513 #[unsafe(method(objectValue))]
514 #[unsafe(method_family = none)]
515 pub fn objectValue(&self) -> Option<Retained<AnyObject>>;
516
517 #[unsafe(method(setObjectValue:))]
525 #[unsafe(method_family = none)]
526 pub unsafe fn setObjectValue(&self, object_value: Option<&AnyObject>);
527
528 #[unsafe(method(hasValidObjectValue))]
529 #[unsafe(method_family = none)]
530 pub fn hasValidObjectValue(&self) -> bool;
531
532 #[unsafe(method(stringValue))]
533 #[unsafe(method_family = none)]
534 pub fn stringValue(&self) -> Retained<NSString>;
535
536 #[unsafe(method(setStringValue:))]
540 #[unsafe(method_family = none)]
541 pub fn setStringValue(&self, string_value: &NSString);
542
543 #[unsafe(method(compare:))]
547 #[unsafe(method_family = none)]
548 pub unsafe fn compare(&self, other_cell: &AnyObject) -> NSComparisonResult;
549
550 #[unsafe(method(intValue))]
551 #[unsafe(method_family = none)]
552 pub fn intValue(&self) -> c_int;
553
554 #[unsafe(method(setIntValue:))]
556 #[unsafe(method_family = none)]
557 pub fn setIntValue(&self, int_value: c_int);
558
559 #[unsafe(method(floatValue))]
560 #[unsafe(method_family = none)]
561 pub fn floatValue(&self) -> c_float;
562
563 #[unsafe(method(setFloatValue:))]
565 #[unsafe(method_family = none)]
566 pub fn setFloatValue(&self, float_value: c_float);
567
568 #[unsafe(method(doubleValue))]
569 #[unsafe(method_family = none)]
570 pub fn doubleValue(&self) -> c_double;
571
572 #[unsafe(method(setDoubleValue:))]
574 #[unsafe(method_family = none)]
575 pub fn setDoubleValue(&self, double_value: c_double);
576
577 #[unsafe(method(integerValue))]
578 #[unsafe(method_family = none)]
579 pub fn integerValue(&self) -> NSInteger;
580
581 #[unsafe(method(setIntegerValue:))]
583 #[unsafe(method_family = none)]
584 pub fn setIntegerValue(&self, integer_value: NSInteger);
585
586 #[unsafe(method(takeIntValueFrom:))]
590 #[unsafe(method_family = none)]
591 pub unsafe fn takeIntValueFrom(&self, sender: Option<&AnyObject>);
592
593 #[unsafe(method(takeFloatValueFrom:))]
597 #[unsafe(method_family = none)]
598 pub unsafe fn takeFloatValueFrom(&self, sender: Option<&AnyObject>);
599
600 #[unsafe(method(takeDoubleValueFrom:))]
604 #[unsafe(method_family = none)]
605 pub unsafe fn takeDoubleValueFrom(&self, sender: Option<&AnyObject>);
606
607 #[unsafe(method(takeStringValueFrom:))]
611 #[unsafe(method_family = none)]
612 pub unsafe fn takeStringValueFrom(&self, sender: Option<&AnyObject>);
613
614 #[unsafe(method(takeObjectValueFrom:))]
618 #[unsafe(method_family = none)]
619 pub unsafe fn takeObjectValueFrom(&self, sender: Option<&AnyObject>);
620
621 #[unsafe(method(takeIntegerValueFrom:))]
625 #[unsafe(method_family = none)]
626 pub unsafe fn takeIntegerValueFrom(&self, sender: Option<&AnyObject>);
627
628 #[cfg(feature = "NSImage")]
629 #[unsafe(method(image))]
630 #[unsafe(method_family = none)]
631 pub fn image(&self) -> Option<Retained<NSImage>>;
632
633 #[cfg(feature = "NSImage")]
634 #[unsafe(method(setImage:))]
636 #[unsafe(method_family = none)]
637 pub fn setImage(&self, image: Option<&NSImage>);
638
639 #[unsafe(method(controlSize))]
640 #[unsafe(method_family = none)]
641 pub fn controlSize(&self) -> NSControlSize;
642
643 #[unsafe(method(setControlSize:))]
645 #[unsafe(method_family = none)]
646 pub fn setControlSize(&self, control_size: NSControlSize);
647
648 #[unsafe(method(representedObject))]
649 #[unsafe(method_family = none)]
650 pub fn representedObject(&self) -> Option<Retained<AnyObject>>;
651
652 #[unsafe(method(setRepresentedObject:))]
658 #[unsafe(method_family = none)]
659 pub unsafe fn setRepresentedObject(&self, represented_object: Option<&AnyObject>);
660
661 #[unsafe(method(cellAttribute:))]
662 #[unsafe(method_family = none)]
663 pub fn cellAttribute(&self, parameter: NSCellAttribute) -> NSInteger;
664
665 #[unsafe(method(setCellAttribute:to:))]
666 #[unsafe(method_family = none)]
667 pub fn setCellAttribute_to(&self, parameter: NSCellAttribute, value: NSInteger);
668
669 #[unsafe(method(imageRectForBounds:))]
670 #[unsafe(method_family = none)]
671 pub fn imageRectForBounds(&self, rect: NSRect) -> NSRect;
672
673 #[unsafe(method(titleRectForBounds:))]
674 #[unsafe(method_family = none)]
675 pub fn titleRectForBounds(&self, rect: NSRect) -> NSRect;
676
677 #[unsafe(method(drawingRectForBounds:))]
678 #[unsafe(method_family = none)]
679 pub fn drawingRectForBounds(&self, rect: NSRect) -> NSRect;
680
681 #[unsafe(method(_bulletStringForString:bulletCharacter:))]
682 #[unsafe(method_family = none)]
683 pub fn _bulletStringForString_bulletCharacter(
684 string: &NSString,
685 bullet_char: unichar,
686 mtm: MainThreadMarker,
687 ) -> Retained<NSString>;
688
689 #[unsafe(method(cellSize))]
690 #[unsafe(method_family = none)]
691 pub fn cellSize(&self) -> NSSize;
692
693 #[unsafe(method(cellSizeForBounds:))]
694 #[unsafe(method_family = none)]
695 pub fn cellSizeForBounds(&self, rect: NSRect) -> NSSize;
696
697 #[cfg(all(feature = "NSColor", feature = "NSResponder", feature = "NSView"))]
698 #[unsafe(method(highlightColorWithFrame:inView:))]
699 #[unsafe(method_family = none)]
700 pub fn highlightColorWithFrame_inView(
701 &self,
702 cell_frame: NSRect,
703 control_view: &NSView,
704 ) -> Option<Retained<NSColor>>;
705
706 #[unsafe(method(calcDrawInfo:))]
707 #[unsafe(method_family = none)]
708 pub fn calcDrawInfo(&self, rect: NSRect);
709
710 #[cfg(all(feature = "NSResponder", feature = "NSText", feature = "NSView"))]
711 #[unsafe(method(setUpFieldEditorAttributes:))]
712 #[unsafe(method_family = none)]
713 pub fn setUpFieldEditorAttributes(&self, text_obj: &NSText) -> Retained<NSText>;
714
715 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
716 #[unsafe(method(drawInteriorWithFrame:inView:))]
717 #[unsafe(method_family = none)]
718 pub fn drawInteriorWithFrame_inView(&self, cell_frame: NSRect, control_view: &NSView);
719
720 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
721 #[unsafe(method(drawWithFrame:inView:))]
722 #[unsafe(method_family = none)]
723 pub fn drawWithFrame_inView(&self, cell_frame: NSRect, control_view: &NSView);
724
725 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
726 #[unsafe(method(highlight:withFrame:inView:))]
727 #[unsafe(method_family = none)]
728 pub fn highlight_withFrame_inView(
729 &self,
730 flag: bool,
731 cell_frame: NSRect,
732 control_view: &NSView,
733 );
734
735 #[unsafe(method(mouseDownFlags))]
736 #[unsafe(method_family = none)]
737 pub fn mouseDownFlags(&self) -> NSInteger;
738
739 #[unsafe(method(getPeriodicDelay:interval:))]
744 #[unsafe(method_family = none)]
745 pub unsafe fn getPeriodicDelay_interval(
746 &self,
747 delay: NonNull<c_float>,
748 interval: NonNull<c_float>,
749 );
750
751 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
752 #[unsafe(method(startTrackingAt:inView:))]
753 #[unsafe(method_family = none)]
754 pub fn startTrackingAt_inView(&self, start_point: NSPoint, control_view: &NSView) -> bool;
755
756 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
757 #[unsafe(method(continueTracking:at:inView:))]
758 #[unsafe(method_family = none)]
759 pub fn continueTracking_at_inView(
760 &self,
761 last_point: NSPoint,
762 current_point: NSPoint,
763 control_view: &NSView,
764 ) -> bool;
765
766 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
767 #[unsafe(method(stopTracking:at:inView:mouseIsUp:))]
768 #[unsafe(method_family = none)]
769 pub fn stopTracking_at_inView_mouseIsUp(
770 &self,
771 last_point: NSPoint,
772 stop_point: NSPoint,
773 control_view: &NSView,
774 flag: bool,
775 );
776
777 #[cfg(all(feature = "NSEvent", feature = "NSResponder", feature = "NSView"))]
778 #[unsafe(method(trackMouse:inRect:ofView:untilMouseUp:))]
779 #[unsafe(method_family = none)]
780 pub fn trackMouse_inRect_ofView_untilMouseUp(
781 &self,
782 event: &NSEvent,
783 cell_frame: NSRect,
784 control_view: &NSView,
785 flag: bool,
786 ) -> bool;
787
788 #[cfg(all(
789 feature = "NSEvent",
790 feature = "NSResponder",
791 feature = "NSText",
792 feature = "NSView"
793 ))]
794 #[unsafe(method(editWithFrame:inView:editor:delegate:event:))]
798 #[unsafe(method_family = none)]
799 pub unsafe fn editWithFrame_inView_editor_delegate_event(
800 &self,
801 rect: NSRect,
802 control_view: &NSView,
803 text_obj: &NSText,
804 delegate: Option<&AnyObject>,
805 event: Option<&NSEvent>,
806 );
807
808 #[cfg(all(feature = "NSResponder", feature = "NSText", feature = "NSView"))]
809 #[unsafe(method(selectWithFrame:inView:editor:delegate:start:length:))]
813 #[unsafe(method_family = none)]
814 pub unsafe fn selectWithFrame_inView_editor_delegate_start_length(
815 &self,
816 rect: NSRect,
817 control_view: &NSView,
818 text_obj: &NSText,
819 delegate: Option<&AnyObject>,
820 sel_start: NSInteger,
821 sel_length: NSInteger,
822 );
823
824 #[cfg(all(feature = "NSResponder", feature = "NSText", feature = "NSView"))]
825 #[unsafe(method(endEditing:))]
826 #[unsafe(method_family = none)]
827 pub fn endEditing(&self, text_obj: &NSText);
828
829 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
830 #[unsafe(method(resetCursorRect:inView:))]
831 #[unsafe(method_family = none)]
832 pub fn resetCursorRect_inView(&self, cell_frame: NSRect, control_view: &NSView);
833
834 #[cfg(feature = "NSMenu")]
835 #[unsafe(method(menu))]
836 #[unsafe(method_family = none)]
837 pub fn menu(&self) -> Option<Retained<NSMenu>>;
838
839 #[cfg(feature = "NSMenu")]
840 #[unsafe(method(setMenu:))]
842 #[unsafe(method_family = none)]
843 pub fn setMenu(&self, menu: Option<&NSMenu>);
844
845 #[cfg(all(
846 feature = "NSEvent",
847 feature = "NSMenu",
848 feature = "NSResponder",
849 feature = "NSView"
850 ))]
851 #[unsafe(method(menuForEvent:inRect:ofView:))]
852 #[unsafe(method_family = none)]
853 pub fn menuForEvent_inRect_ofView(
854 &self,
855 event: &NSEvent,
856 cell_frame: NSRect,
857 view: &NSView,
858 ) -> Option<Retained<NSMenu>>;
859
860 #[cfg(feature = "NSMenu")]
861 #[unsafe(method(defaultMenu))]
862 #[unsafe(method_family = none)]
863 pub fn defaultMenu(mtm: MainThreadMarker) -> Option<Retained<NSMenu>>;
864
865 #[unsafe(method(sendsActionOnEndEditing))]
866 #[unsafe(method_family = none)]
867 pub fn sendsActionOnEndEditing(&self) -> bool;
868
869 #[unsafe(method(setSendsActionOnEndEditing:))]
871 #[unsafe(method_family = none)]
872 pub fn setSendsActionOnEndEditing(&self, sends_action_on_end_editing: bool);
873
874 #[cfg(feature = "NSText")]
875 #[unsafe(method(baseWritingDirection))]
876 #[unsafe(method_family = none)]
877 pub fn baseWritingDirection(&self) -> NSWritingDirection;
878
879 #[cfg(feature = "NSText")]
880 #[unsafe(method(setBaseWritingDirection:))]
882 #[unsafe(method_family = none)]
883 pub fn setBaseWritingDirection(&self, base_writing_direction: NSWritingDirection);
884
885 #[cfg(feature = "NSParagraphStyle")]
886 #[unsafe(method(lineBreakMode))]
887 #[unsafe(method_family = none)]
888 pub fn lineBreakMode(&self) -> NSLineBreakMode;
889
890 #[cfg(feature = "NSParagraphStyle")]
891 #[unsafe(method(setLineBreakMode:))]
893 #[unsafe(method_family = none)]
894 pub fn setLineBreakMode(&self, line_break_mode: NSLineBreakMode);
895
896 #[unsafe(method(allowsUndo))]
897 #[unsafe(method_family = none)]
898 pub fn allowsUndo(&self) -> bool;
899
900 #[unsafe(method(setAllowsUndo:))]
902 #[unsafe(method_family = none)]
903 pub fn setAllowsUndo(&self, allows_undo: bool);
904
905 #[unsafe(method(truncatesLastVisibleLine))]
906 #[unsafe(method_family = none)]
907 pub fn truncatesLastVisibleLine(&self) -> bool;
908
909 #[unsafe(method(setTruncatesLastVisibleLine:))]
911 #[unsafe(method_family = none)]
912 pub fn setTruncatesLastVisibleLine(&self, truncates_last_visible_line: bool);
913
914 #[cfg(feature = "NSUserInterfaceLayout")]
915 #[unsafe(method(userInterfaceLayoutDirection))]
916 #[unsafe(method_family = none)]
917 pub fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection;
918
919 #[cfg(feature = "NSUserInterfaceLayout")]
920 #[unsafe(method(setUserInterfaceLayoutDirection:))]
922 #[unsafe(method_family = none)]
923 pub fn setUserInterfaceLayoutDirection(
924 &self,
925 user_interface_layout_direction: NSUserInterfaceLayoutDirection,
926 );
927
928 #[cfg(all(
929 feature = "NSResponder",
930 feature = "NSText",
931 feature = "NSTextView",
932 feature = "NSView"
933 ))]
934 #[unsafe(method(fieldEditorForView:))]
935 #[unsafe(method_family = none)]
936 pub fn fieldEditorForView(&self, control_view: &NSView) -> Option<Retained<NSTextView>>;
937
938 #[unsafe(method(usesSingleLineMode))]
939 #[unsafe(method_family = none)]
940 pub fn usesSingleLineMode(&self) -> bool;
941
942 #[unsafe(method(setUsesSingleLineMode:))]
944 #[unsafe(method_family = none)]
945 pub fn setUsesSingleLineMode(&self, uses_single_line_mode: bool);
946
947 #[cfg(all(
948 feature = "NSDraggingItem",
949 feature = "NSResponder",
950 feature = "NSView"
951 ))]
952 #[unsafe(method(draggingImageComponentsWithFrame:inView:))]
953 #[unsafe(method_family = none)]
954 pub fn draggingImageComponentsWithFrame_inView(
955 &self,
956 frame: NSRect,
957 view: &NSView,
958 ) -> Retained<NSArray<NSDraggingImageComponent>>;
959 );
960}
961
962impl NSCell {
964 extern_methods!(
965 #[unsafe(method(new))]
966 #[unsafe(method_family = new)]
967 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
968 );
969}
970
971impl NSCell {
973 extern_methods!(
974 #[unsafe(method(refusesFirstResponder))]
975 #[unsafe(method_family = none)]
976 pub fn refusesFirstResponder(&self) -> bool;
977
978 #[unsafe(method(setRefusesFirstResponder:))]
980 #[unsafe(method_family = none)]
981 pub fn setRefusesFirstResponder(&self, refuses_first_responder: bool);
982
983 #[unsafe(method(acceptsFirstResponder))]
984 #[unsafe(method_family = none)]
985 pub fn acceptsFirstResponder(&self) -> bool;
986
987 #[unsafe(method(showsFirstResponder))]
988 #[unsafe(method_family = none)]
989 pub fn showsFirstResponder(&self) -> bool;
990
991 #[unsafe(method(setShowsFirstResponder:))]
993 #[unsafe(method_family = none)]
994 pub fn setShowsFirstResponder(&self, shows_first_responder: bool);
995
996 #[unsafe(method(performClick:))]
1000 #[unsafe(method_family = none)]
1001 pub unsafe fn performClick(&self, sender: Option<&AnyObject>);
1002
1003 #[cfg(feature = "NSGraphics")]
1004 #[unsafe(method(focusRingType))]
1005 #[unsafe(method_family = none)]
1006 pub fn focusRingType(&self) -> NSFocusRingType;
1007
1008 #[cfg(feature = "NSGraphics")]
1009 #[unsafe(method(setFocusRingType:))]
1011 #[unsafe(method_family = none)]
1012 pub fn setFocusRingType(&self, focus_ring_type: NSFocusRingType);
1013
1014 #[cfg(feature = "NSGraphics")]
1015 #[unsafe(method(defaultFocusRingType))]
1016 #[unsafe(method_family = none)]
1017 pub fn defaultFocusRingType(mtm: MainThreadMarker) -> NSFocusRingType;
1018
1019 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
1020 #[unsafe(method(drawFocusRingMaskWithFrame:inView:))]
1021 #[unsafe(method_family = none)]
1022 pub fn drawFocusRingMaskWithFrame_inView(&self, cell_frame: NSRect, control_view: &NSView);
1023
1024 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
1025 #[unsafe(method(focusRingMaskBoundsForFrame:inView:))]
1026 #[unsafe(method_family = none)]
1027 pub fn focusRingMaskBoundsForFrame_inView(
1028 &self,
1029 cell_frame: NSRect,
1030 control_view: &NSView,
1031 ) -> NSRect;
1032
1033 #[unsafe(method(wantsNotificationForMarkedText))]
1034 #[unsafe(method_family = none)]
1035 pub fn wantsNotificationForMarkedText(&self) -> bool;
1036 );
1037}
1038
1039impl NSCell {
1041 extern_methods!(
1042 #[unsafe(method(attributedStringValue))]
1043 #[unsafe(method_family = none)]
1044 pub fn attributedStringValue(&self) -> Retained<NSAttributedString>;
1045
1046 #[unsafe(method(setAttributedStringValue:))]
1050 #[unsafe(method_family = none)]
1051 pub fn setAttributedStringValue(&self, attributed_string_value: &NSAttributedString);
1052
1053 #[unsafe(method(allowsEditingTextAttributes))]
1054 #[unsafe(method_family = none)]
1055 pub fn allowsEditingTextAttributes(&self) -> bool;
1056
1057 #[unsafe(method(setAllowsEditingTextAttributes:))]
1059 #[unsafe(method_family = none)]
1060 pub fn setAllowsEditingTextAttributes(&self, allows_editing_text_attributes: bool);
1061
1062 #[unsafe(method(importsGraphics))]
1063 #[unsafe(method_family = none)]
1064 pub fn importsGraphics(&self) -> bool;
1065
1066 #[unsafe(method(setImportsGraphics:))]
1068 #[unsafe(method_family = none)]
1069 pub fn setImportsGraphics(&self, imports_graphics: bool);
1070 );
1071}
1072
1073impl NSCell {
1075 extern_methods!(
1076 #[unsafe(method(allowsMixedState))]
1077 #[unsafe(method_family = none)]
1078 pub fn allowsMixedState(&self) -> bool;
1079
1080 #[unsafe(method(setAllowsMixedState:))]
1082 #[unsafe(method_family = none)]
1083 pub fn setAllowsMixedState(&self, allows_mixed_state: bool);
1084
1085 #[unsafe(method(nextState))]
1086 #[unsafe(method_family = none)]
1087 pub fn nextState(&self) -> NSInteger;
1088
1089 #[unsafe(method(setNextState))]
1090 #[unsafe(method_family = none)]
1091 pub fn setNextState(&self);
1092 );
1093}
1094
1095#[repr(transparent)]
1098#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1099pub struct NSCellHitResult(pub NSUInteger);
1100bitflags::bitflags! {
1101 impl NSCellHitResult: NSUInteger {
1102 #[doc(alias = "NSCellHitNone")]
1103 const None = 0;
1104 #[doc(alias = "NSCellHitContentArea")]
1105 const ContentArea = 1<<0;
1106 #[doc(alias = "NSCellHitEditableTextArea")]
1107 const EditableTextArea = 1<<1;
1108 #[doc(alias = "NSCellHitTrackableArea")]
1109 const TrackableArea = 1<<2;
1110 }
1111}
1112
1113unsafe impl Encode for NSCellHitResult {
1114 const ENCODING: Encoding = NSUInteger::ENCODING;
1115}
1116
1117unsafe impl RefEncode for NSCellHitResult {
1118 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1119}
1120
1121impl NSCell {
1123 extern_methods!(
1124 #[cfg(all(feature = "NSEvent", feature = "NSResponder", feature = "NSView"))]
1125 #[unsafe(method(hitTestForEvent:inRect:ofView:))]
1126 #[unsafe(method_family = none)]
1127 pub fn hitTestForEvent_inRect_ofView(
1128 &self,
1129 event: &NSEvent,
1130 cell_frame: NSRect,
1131 control_view: &NSView,
1132 ) -> NSCellHitResult;
1133 );
1134}
1135
1136impl NSCell {
1138 extern_methods!(
1139 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
1140 #[unsafe(method(expansionFrameWithFrame:inView:))]
1141 #[unsafe(method_family = none)]
1142 pub fn expansionFrameWithFrame_inView(&self, cell_frame: NSRect, view: &NSView) -> NSRect;
1143
1144 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
1145 #[unsafe(method(drawWithExpansionFrame:inView:))]
1146 #[unsafe(method_family = none)]
1147 pub fn drawWithExpansionFrame_inView(&self, cell_frame: NSRect, view: &NSView);
1148 );
1149}
1150
1151#[repr(transparent)]
1154#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1155pub struct NSBackgroundStyle(pub NSInteger);
1156impl NSBackgroundStyle {
1157 #[doc(alias = "NSBackgroundStyleNormal")]
1158 pub const Normal: Self = Self(0);
1159 #[doc(alias = "NSBackgroundStyleEmphasized")]
1160 pub const Emphasized: Self = Self(1);
1161 #[doc(alias = "NSBackgroundStyleRaised")]
1162 pub const Raised: Self = Self(2);
1163 #[doc(alias = "NSBackgroundStyleLowered")]
1164 pub const Lowered: Self = Self(3);
1165}
1166
1167unsafe impl Encode for NSBackgroundStyle {
1168 const ENCODING: Encoding = NSInteger::ENCODING;
1169}
1170
1171unsafe impl RefEncode for NSBackgroundStyle {
1172 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1173}
1174
1175impl NSCell {
1177 extern_methods!(
1178 #[unsafe(method(backgroundStyle))]
1179 #[unsafe(method_family = none)]
1180 pub fn backgroundStyle(&self) -> NSBackgroundStyle;
1181
1182 #[unsafe(method(setBackgroundStyle:))]
1184 #[unsafe(method_family = none)]
1185 pub fn setBackgroundStyle(&self, background_style: NSBackgroundStyle);
1186
1187 #[unsafe(method(interiorBackgroundStyle))]
1188 #[unsafe(method_family = none)]
1189 pub fn interiorBackgroundStyle(&self) -> NSBackgroundStyle;
1190 );
1191}
1192
1193#[cfg(all(
1194 feature = "NSGraphics",
1195 feature = "NSImage",
1196 feature = "objc2-core-foundation"
1197))]
1198#[inline]
1199pub extern "C-unwind" fn NSDrawThreePartImage(
1200 frame: NSRect,
1201 start_cap: Option<&NSImage>,
1202 center_fill: Option<&NSImage>,
1203 end_cap: Option<&NSImage>,
1204 vertical: bool,
1205 op: NSCompositingOperation,
1206 alpha_fraction: CGFloat,
1207 flipped: bool,
1208) {
1209 extern "C-unwind" {
1210 fn NSDrawThreePartImage(
1211 frame: NSRect,
1212 start_cap: Option<&NSImage>,
1213 center_fill: Option<&NSImage>,
1214 end_cap: Option<&NSImage>,
1215 vertical: Bool,
1216 op: NSCompositingOperation,
1217 alpha_fraction: CGFloat,
1218 flipped: Bool,
1219 );
1220 }
1221 unsafe {
1222 NSDrawThreePartImage(
1223 frame,
1224 start_cap,
1225 center_fill,
1226 end_cap,
1227 Bool::new(vertical),
1228 op,
1229 alpha_fraction,
1230 Bool::new(flipped),
1231 )
1232 }
1233}
1234
1235#[cfg(all(
1236 feature = "NSGraphics",
1237 feature = "NSImage",
1238 feature = "objc2-core-foundation"
1239))]
1240#[inline]
1241pub extern "C-unwind" fn NSDrawNinePartImage(
1242 frame: NSRect,
1243 top_left_corner: Option<&NSImage>,
1244 top_edge_fill: Option<&NSImage>,
1245 top_right_corner: Option<&NSImage>,
1246 left_edge_fill: Option<&NSImage>,
1247 center_fill: Option<&NSImage>,
1248 right_edge_fill: Option<&NSImage>,
1249 bottom_left_corner: Option<&NSImage>,
1250 bottom_edge_fill: Option<&NSImage>,
1251 bottom_right_corner: Option<&NSImage>,
1252 op: NSCompositingOperation,
1253 alpha_fraction: CGFloat,
1254 flipped: bool,
1255) {
1256 extern "C-unwind" {
1257 fn NSDrawNinePartImage(
1258 frame: NSRect,
1259 top_left_corner: Option<&NSImage>,
1260 top_edge_fill: Option<&NSImage>,
1261 top_right_corner: Option<&NSImage>,
1262 left_edge_fill: Option<&NSImage>,
1263 center_fill: Option<&NSImage>,
1264 right_edge_fill: Option<&NSImage>,
1265 bottom_left_corner: Option<&NSImage>,
1266 bottom_edge_fill: Option<&NSImage>,
1267 bottom_right_corner: Option<&NSImage>,
1268 op: NSCompositingOperation,
1269 alpha_fraction: CGFloat,
1270 flipped: Bool,
1271 );
1272 }
1273 unsafe {
1274 NSDrawNinePartImage(
1275 frame,
1276 top_left_corner,
1277 top_edge_fill,
1278 top_right_corner,
1279 left_edge_fill,
1280 center_fill,
1281 right_edge_fill,
1282 bottom_left_corner,
1283 bottom_edge_fill,
1284 bottom_right_corner,
1285 op,
1286 alpha_fraction,
1287 Bool::new(flipped),
1288 )
1289 }
1290}
1291
1292impl NSCell {
1294 extern_methods!(
1295 #[deprecated = "The controlTint property is not respected on 10.14 and later. For custom cells, use +[NSColor controlAccentColor] to respect the user's preferred accent color when drawing."]
1296 #[unsafe(method(controlTint))]
1297 #[unsafe(method_family = none)]
1298 pub fn controlTint(&self) -> NSControlTint;
1299
1300 #[deprecated = "The controlTint property is not respected on 10.14 and later. For custom cells, use +[NSColor controlAccentColor] to respect the user's preferred accent color when drawing."]
1302 #[unsafe(method(setControlTint:))]
1303 #[unsafe(method_family = none)]
1304 pub fn setControlTint(&self, control_tint: NSControlTint);
1305
1306 #[deprecated]
1307 #[unsafe(method(entryType))]
1308 #[unsafe(method_family = none)]
1309 pub fn entryType(&self) -> NSInteger;
1310
1311 #[deprecated]
1312 #[unsafe(method(setEntryType:))]
1313 #[unsafe(method_family = none)]
1314 pub fn setEntryType(&self, r#type: NSInteger);
1315
1316 #[deprecated]
1317 #[unsafe(method(isEntryAcceptable:))]
1318 #[unsafe(method_family = none)]
1319 pub fn isEntryAcceptable(&self, string: &NSString) -> bool;
1320
1321 #[deprecated]
1322 #[unsafe(method(setFloatingPointFormat:left:right:))]
1323 #[unsafe(method_family = none)]
1324 pub fn setFloatingPointFormat_left_right(
1325 &self,
1326 auto_range: bool,
1327 left_digits: NSUInteger,
1328 right_digits: NSUInteger,
1329 );
1330
1331 #[deprecated]
1332 #[unsafe(method(setMnemonicLocation:))]
1333 #[unsafe(method_family = none)]
1334 pub fn setMnemonicLocation(&self, location: NSUInteger);
1335
1336 #[deprecated]
1337 #[unsafe(method(mnemonicLocation))]
1338 #[unsafe(method_family = none)]
1339 pub fn mnemonicLocation(&self) -> NSUInteger;
1340
1341 #[deprecated]
1342 #[unsafe(method(mnemonic))]
1343 #[unsafe(method_family = none)]
1344 pub fn mnemonic(&self) -> Retained<NSString>;
1345
1346 #[deprecated]
1347 #[unsafe(method(setTitleWithMnemonic:))]
1348 #[unsafe(method_family = none)]
1349 pub fn setTitleWithMnemonic(&self, string_with_ampersand: &NSString);
1350 );
1351}
1352
1353#[deprecated]
1355pub static NSBackgroundStyleLight: NSBackgroundStyle =
1356 NSBackgroundStyle(NSBackgroundStyle::Normal.0);
1357
1358#[deprecated]
1360pub static NSBackgroundStyleDark: NSBackgroundStyle =
1361 NSBackgroundStyle(NSBackgroundStyle::Emphasized.0);
1362
1363#[deprecated]
1365pub type NSCellStateValue = NSControlStateValue;
1366
1367#[deprecated]
1369pub static NSMixedState: NSControlStateValue = NSControlStateValueMixed;
1370
1371#[deprecated]
1373pub static NSOffState: NSControlStateValue = NSControlStateValueOff;
1374
1375#[deprecated]
1377pub static NSOnState: NSControlStateValue = NSControlStateValueOn;
1378
1379#[deprecated]
1381pub static NSRegularControlSize: NSControlSize = NSControlSize(NSControlSize::Regular.0);
1382
1383#[deprecated]
1385pub static NSSmallControlSize: NSControlSize = NSControlSize(NSControlSize::Small.0);
1386
1387#[deprecated]
1389pub static NSMiniControlSize: NSControlSize = NSControlSize(NSControlSize::Mini.0);
1390
1391extern "C" {
1392 #[deprecated = "Changes to the accent color can be manually observed by implementing -viewDidChangeEffectiveAppearance in a NSView subclass, or by Key-Value Observing the -effectiveAppearance property on NSApplication. Views are automatically redisplayed when the accent color changes."]
1394 pub static NSControlTintDidChangeNotification: &'static NSNotificationName;
1395}
1396
1397#[deprecated = "Use formatters instead"]
1399pub const NSAnyType: c_uint = 0;
1400#[deprecated = "Use formatters instead"]
1402pub const NSIntType: c_uint = 1;
1403#[deprecated = "Use formatters instead"]
1405pub const NSPositiveIntType: c_uint = 2;
1406#[deprecated = "Use formatters instead"]
1408pub const NSFloatType: c_uint = 3;
1409#[deprecated = "Use formatters instead"]
1411pub const NSPositiveFloatType: c_uint = 4;
1412#[deprecated = "Use formatters instead"]
1414pub const NSDoubleType: c_uint = 6;
1415#[deprecated = "Use formatters instead"]
1417pub const NSPositiveDoubleType: c_uint = 7;