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}
228
229unsafe impl Encode for NSControlSize {
230 const ENCODING: Encoding = NSUInteger::ENCODING;
231}
232
233unsafe impl RefEncode for NSControlSize {
234 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
235}
236
237extern_class!(
238 #[unsafe(super(NSObject))]
240 #[thread_kind = MainThreadOnly]
241 #[derive(Debug, PartialEq, Eq, Hash)]
242 pub struct NSCell;
243);
244
245#[cfg(feature = "NSAccessibilityProtocols")]
246unsafe impl NSAccessibility for NSCell {}
247
248#[cfg(feature = "NSAccessibilityProtocols")]
249unsafe impl NSAccessibilityElementProtocol for NSCell {}
250
251unsafe impl NSCoding for NSCell {}
252
253unsafe impl NSCopying for NSCell {}
254
255unsafe impl CopyingHelper for NSCell {
256 type Result = Self;
257}
258
259unsafe impl NSObjectProtocol for NSCell {}
260
261#[cfg(feature = "NSUserInterfaceItemIdentification")]
262unsafe impl NSUserInterfaceItemIdentification for NSCell {}
263
264impl NSCell {
265 extern_methods!(
266 #[unsafe(method(init))]
267 #[unsafe(method_family = init)]
268 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
269
270 #[unsafe(method(initTextCell:))]
271 #[unsafe(method_family = init)]
272 pub unsafe fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
273
274 #[cfg(feature = "NSImage")]
275 #[unsafe(method(initImageCell:))]
276 #[unsafe(method_family = init)]
277 pub unsafe fn initImageCell(
278 this: Allocated<Self>,
279 image: Option<&NSImage>,
280 ) -> Retained<Self>;
281
282 #[unsafe(method(initWithCoder:))]
283 #[unsafe(method_family = init)]
284 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
285
286 #[unsafe(method(prefersTrackingUntilMouseUp))]
287 #[unsafe(method_family = none)]
288 pub unsafe fn prefersTrackingUntilMouseUp(mtm: MainThreadMarker) -> bool;
289
290 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
291 #[unsafe(method(controlView))]
292 #[unsafe(method_family = none)]
293 pub unsafe fn controlView(&self) -> Option<Retained<NSView>>;
294
295 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
296 #[unsafe(method(setControlView:))]
298 #[unsafe(method_family = none)]
299 pub unsafe fn setControlView(&self, control_view: Option<&NSView>);
300
301 #[unsafe(method(type))]
302 #[unsafe(method_family = none)]
303 pub unsafe fn r#type(&self) -> NSCellType;
304
305 #[unsafe(method(setType:))]
307 #[unsafe(method_family = none)]
308 pub unsafe fn setType(&self, r#type: NSCellType);
309
310 #[unsafe(method(state))]
311 #[unsafe(method_family = none)]
312 pub unsafe fn state(&self) -> NSControlStateValue;
313
314 #[unsafe(method(setState:))]
316 #[unsafe(method_family = none)]
317 pub unsafe fn setState(&self, state: NSControlStateValue);
318
319 #[unsafe(method(target))]
320 #[unsafe(method_family = none)]
321 pub unsafe fn target(&self) -> Option<Retained<AnyObject>>;
322
323 #[unsafe(method(setTarget:))]
326 #[unsafe(method_family = none)]
327 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
328
329 #[unsafe(method(action))]
330 #[unsafe(method_family = none)]
331 pub unsafe fn action(&self) -> Option<Sel>;
332
333 #[unsafe(method(setAction:))]
335 #[unsafe(method_family = none)]
336 pub unsafe fn setAction(&self, action: Option<Sel>);
337
338 #[unsafe(method(tag))]
339 #[unsafe(method_family = none)]
340 pub unsafe fn tag(&self) -> NSInteger;
341
342 #[unsafe(method(setTag:))]
344 #[unsafe(method_family = none)]
345 pub unsafe fn setTag(&self, tag: NSInteger);
346
347 #[unsafe(method(title))]
348 #[unsafe(method_family = none)]
349 pub unsafe fn title(&self) -> Retained<NSString>;
350
351 #[unsafe(method(setTitle:))]
353 #[unsafe(method_family = none)]
354 pub unsafe fn setTitle(&self, title: &NSString);
355
356 #[unsafe(method(isOpaque))]
357 #[unsafe(method_family = none)]
358 pub unsafe fn isOpaque(&self) -> bool;
359
360 #[unsafe(method(isEnabled))]
361 #[unsafe(method_family = none)]
362 pub unsafe fn isEnabled(&self) -> bool;
363
364 #[unsafe(method(setEnabled:))]
366 #[unsafe(method_family = none)]
367 pub unsafe fn setEnabled(&self, enabled: bool);
368
369 #[cfg(feature = "NSEvent")]
370 #[unsafe(method(sendActionOn:))]
371 #[unsafe(method_family = none)]
372 pub unsafe fn sendActionOn(&self, mask: NSEventMask) -> NSInteger;
373
374 #[unsafe(method(isContinuous))]
375 #[unsafe(method_family = none)]
376 pub unsafe fn isContinuous(&self) -> bool;
377
378 #[unsafe(method(setContinuous:))]
380 #[unsafe(method_family = none)]
381 pub unsafe fn setContinuous(&self, continuous: bool);
382
383 #[unsafe(method(isEditable))]
384 #[unsafe(method_family = none)]
385 pub unsafe fn isEditable(&self) -> bool;
386
387 #[unsafe(method(setEditable:))]
389 #[unsafe(method_family = none)]
390 pub unsafe fn setEditable(&self, editable: bool);
391
392 #[unsafe(method(isSelectable))]
393 #[unsafe(method_family = none)]
394 pub unsafe fn isSelectable(&self) -> bool;
395
396 #[unsafe(method(setSelectable:))]
398 #[unsafe(method_family = none)]
399 pub unsafe fn setSelectable(&self, selectable: bool);
400
401 #[unsafe(method(isBordered))]
402 #[unsafe(method_family = none)]
403 pub unsafe fn isBordered(&self) -> bool;
404
405 #[unsafe(method(setBordered:))]
407 #[unsafe(method_family = none)]
408 pub unsafe fn setBordered(&self, bordered: bool);
409
410 #[unsafe(method(isBezeled))]
411 #[unsafe(method_family = none)]
412 pub unsafe fn isBezeled(&self) -> bool;
413
414 #[unsafe(method(setBezeled:))]
416 #[unsafe(method_family = none)]
417 pub unsafe fn setBezeled(&self, bezeled: bool);
418
419 #[unsafe(method(isScrollable))]
420 #[unsafe(method_family = none)]
421 pub unsafe fn isScrollable(&self) -> bool;
422
423 #[unsafe(method(setScrollable:))]
425 #[unsafe(method_family = none)]
426 pub unsafe fn setScrollable(&self, scrollable: bool);
427
428 #[unsafe(method(isHighlighted))]
429 #[unsafe(method_family = none)]
430 pub unsafe fn isHighlighted(&self) -> bool;
431
432 #[unsafe(method(setHighlighted:))]
434 #[unsafe(method_family = none)]
435 pub unsafe fn setHighlighted(&self, highlighted: bool);
436
437 #[cfg(feature = "NSText")]
438 #[unsafe(method(alignment))]
439 #[unsafe(method_family = none)]
440 pub unsafe fn alignment(&self) -> NSTextAlignment;
441
442 #[cfg(feature = "NSText")]
443 #[unsafe(method(setAlignment:))]
445 #[unsafe(method_family = none)]
446 pub unsafe fn setAlignment(&self, alignment: NSTextAlignment);
447
448 #[unsafe(method(wraps))]
449 #[unsafe(method_family = none)]
450 pub unsafe fn wraps(&self) -> bool;
451
452 #[unsafe(method(setWraps:))]
454 #[unsafe(method_family = none)]
455 pub unsafe fn setWraps(&self, wraps: bool);
456
457 #[cfg(feature = "NSFont")]
458 #[unsafe(method(font))]
459 #[unsafe(method_family = none)]
460 pub unsafe fn font(&self) -> Option<Retained<NSFont>>;
461
462 #[cfg(feature = "NSFont")]
463 #[unsafe(method(setFont:))]
465 #[unsafe(method_family = none)]
466 pub unsafe fn setFont(&self, font: Option<&NSFont>);
467
468 #[unsafe(method(keyEquivalent))]
469 #[unsafe(method_family = none)]
470 pub unsafe fn keyEquivalent(&self) -> Retained<NSString>;
471
472 #[unsafe(method(formatter))]
473 #[unsafe(method_family = none)]
474 pub unsafe fn formatter(&self) -> Option<Retained<NSFormatter>>;
475
476 #[unsafe(method(setFormatter:))]
478 #[unsafe(method_family = none)]
479 pub unsafe fn setFormatter(&self, formatter: Option<&NSFormatter>);
480
481 #[unsafe(method(objectValue))]
482 #[unsafe(method_family = none)]
483 pub unsafe fn objectValue(&self) -> Option<Retained<AnyObject>>;
484
485 #[unsafe(method(setObjectValue:))]
487 #[unsafe(method_family = none)]
488 pub unsafe fn setObjectValue(&self, object_value: Option<&AnyObject>);
489
490 #[unsafe(method(hasValidObjectValue))]
491 #[unsafe(method_family = none)]
492 pub unsafe fn hasValidObjectValue(&self) -> bool;
493
494 #[unsafe(method(stringValue))]
495 #[unsafe(method_family = none)]
496 pub unsafe fn stringValue(&self) -> Retained<NSString>;
497
498 #[unsafe(method(setStringValue:))]
500 #[unsafe(method_family = none)]
501 pub unsafe fn setStringValue(&self, string_value: &NSString);
502
503 #[unsafe(method(compare:))]
504 #[unsafe(method_family = none)]
505 pub unsafe fn compare(&self, other_cell: &AnyObject) -> NSComparisonResult;
506
507 #[unsafe(method(intValue))]
508 #[unsafe(method_family = none)]
509 pub unsafe fn intValue(&self) -> c_int;
510
511 #[unsafe(method(setIntValue:))]
513 #[unsafe(method_family = none)]
514 pub unsafe fn setIntValue(&self, int_value: c_int);
515
516 #[unsafe(method(floatValue))]
517 #[unsafe(method_family = none)]
518 pub unsafe fn floatValue(&self) -> c_float;
519
520 #[unsafe(method(setFloatValue:))]
522 #[unsafe(method_family = none)]
523 pub unsafe fn setFloatValue(&self, float_value: c_float);
524
525 #[unsafe(method(doubleValue))]
526 #[unsafe(method_family = none)]
527 pub unsafe fn doubleValue(&self) -> c_double;
528
529 #[unsafe(method(setDoubleValue:))]
531 #[unsafe(method_family = none)]
532 pub unsafe fn setDoubleValue(&self, double_value: c_double);
533
534 #[unsafe(method(integerValue))]
535 #[unsafe(method_family = none)]
536 pub unsafe fn integerValue(&self) -> NSInteger;
537
538 #[unsafe(method(setIntegerValue:))]
540 #[unsafe(method_family = none)]
541 pub unsafe fn setIntegerValue(&self, integer_value: NSInteger);
542
543 #[unsafe(method(takeIntValueFrom:))]
544 #[unsafe(method_family = none)]
545 pub unsafe fn takeIntValueFrom(&self, sender: Option<&AnyObject>);
546
547 #[unsafe(method(takeFloatValueFrom:))]
548 #[unsafe(method_family = none)]
549 pub unsafe fn takeFloatValueFrom(&self, sender: Option<&AnyObject>);
550
551 #[unsafe(method(takeDoubleValueFrom:))]
552 #[unsafe(method_family = none)]
553 pub unsafe fn takeDoubleValueFrom(&self, sender: Option<&AnyObject>);
554
555 #[unsafe(method(takeStringValueFrom:))]
556 #[unsafe(method_family = none)]
557 pub unsafe fn takeStringValueFrom(&self, sender: Option<&AnyObject>);
558
559 #[unsafe(method(takeObjectValueFrom:))]
560 #[unsafe(method_family = none)]
561 pub unsafe fn takeObjectValueFrom(&self, sender: Option<&AnyObject>);
562
563 #[unsafe(method(takeIntegerValueFrom:))]
564 #[unsafe(method_family = none)]
565 pub unsafe fn takeIntegerValueFrom(&self, sender: Option<&AnyObject>);
566
567 #[cfg(feature = "NSImage")]
568 #[unsafe(method(image))]
569 #[unsafe(method_family = none)]
570 pub unsafe fn image(&self) -> Option<Retained<NSImage>>;
571
572 #[cfg(feature = "NSImage")]
573 #[unsafe(method(setImage:))]
575 #[unsafe(method_family = none)]
576 pub unsafe fn setImage(&self, image: Option<&NSImage>);
577
578 #[unsafe(method(controlSize))]
579 #[unsafe(method_family = none)]
580 pub unsafe fn controlSize(&self) -> NSControlSize;
581
582 #[unsafe(method(setControlSize:))]
584 #[unsafe(method_family = none)]
585 pub unsafe fn setControlSize(&self, control_size: NSControlSize);
586
587 #[unsafe(method(representedObject))]
588 #[unsafe(method_family = none)]
589 pub unsafe fn representedObject(&self) -> Option<Retained<AnyObject>>;
590
591 #[unsafe(method(setRepresentedObject:))]
593 #[unsafe(method_family = none)]
594 pub unsafe fn setRepresentedObject(&self, represented_object: Option<&AnyObject>);
595
596 #[unsafe(method(cellAttribute:))]
597 #[unsafe(method_family = none)]
598 pub unsafe fn cellAttribute(&self, parameter: NSCellAttribute) -> NSInteger;
599
600 #[unsafe(method(setCellAttribute:to:))]
601 #[unsafe(method_family = none)]
602 pub unsafe fn setCellAttribute_to(&self, parameter: NSCellAttribute, value: NSInteger);
603
604 #[unsafe(method(imageRectForBounds:))]
605 #[unsafe(method_family = none)]
606 pub unsafe fn imageRectForBounds(&self, rect: NSRect) -> NSRect;
607
608 #[unsafe(method(titleRectForBounds:))]
609 #[unsafe(method_family = none)]
610 pub unsafe fn titleRectForBounds(&self, rect: NSRect) -> NSRect;
611
612 #[unsafe(method(drawingRectForBounds:))]
613 #[unsafe(method_family = none)]
614 pub unsafe fn drawingRectForBounds(&self, rect: NSRect) -> NSRect;
615
616 #[unsafe(method(cellSize))]
617 #[unsafe(method_family = none)]
618 pub unsafe fn cellSize(&self) -> NSSize;
619
620 #[unsafe(method(cellSizeForBounds:))]
621 #[unsafe(method_family = none)]
622 pub unsafe fn cellSizeForBounds(&self, rect: NSRect) -> NSSize;
623
624 #[cfg(all(feature = "NSColor", feature = "NSResponder", feature = "NSView"))]
625 #[unsafe(method(highlightColorWithFrame:inView:))]
626 #[unsafe(method_family = none)]
627 pub unsafe fn highlightColorWithFrame_inView(
628 &self,
629 cell_frame: NSRect,
630 control_view: &NSView,
631 ) -> Option<Retained<NSColor>>;
632
633 #[unsafe(method(calcDrawInfo:))]
634 #[unsafe(method_family = none)]
635 pub unsafe fn calcDrawInfo(&self, rect: NSRect);
636
637 #[cfg(all(feature = "NSResponder", feature = "NSText", feature = "NSView"))]
638 #[unsafe(method(setUpFieldEditorAttributes:))]
639 #[unsafe(method_family = none)]
640 pub unsafe fn setUpFieldEditorAttributes(&self, text_obj: &NSText) -> Retained<NSText>;
641
642 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
643 #[unsafe(method(drawInteriorWithFrame:inView:))]
644 #[unsafe(method_family = none)]
645 pub unsafe fn drawInteriorWithFrame_inView(
646 &self,
647 cell_frame: NSRect,
648 control_view: &NSView,
649 );
650
651 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
652 #[unsafe(method(drawWithFrame:inView:))]
653 #[unsafe(method_family = none)]
654 pub unsafe fn drawWithFrame_inView(&self, cell_frame: NSRect, control_view: &NSView);
655
656 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
657 #[unsafe(method(highlight:withFrame:inView:))]
658 #[unsafe(method_family = none)]
659 pub unsafe fn highlight_withFrame_inView(
660 &self,
661 flag: bool,
662 cell_frame: NSRect,
663 control_view: &NSView,
664 );
665
666 #[unsafe(method(mouseDownFlags))]
667 #[unsafe(method_family = none)]
668 pub unsafe fn mouseDownFlags(&self) -> NSInteger;
669
670 #[unsafe(method(getPeriodicDelay:interval:))]
671 #[unsafe(method_family = none)]
672 pub unsafe fn getPeriodicDelay_interval(
673 &self,
674 delay: NonNull<c_float>,
675 interval: NonNull<c_float>,
676 );
677
678 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
679 #[unsafe(method(startTrackingAt:inView:))]
680 #[unsafe(method_family = none)]
681 pub unsafe fn startTrackingAt_inView(
682 &self,
683 start_point: NSPoint,
684 control_view: &NSView,
685 ) -> bool;
686
687 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
688 #[unsafe(method(continueTracking:at:inView:))]
689 #[unsafe(method_family = none)]
690 pub unsafe fn continueTracking_at_inView(
691 &self,
692 last_point: NSPoint,
693 current_point: NSPoint,
694 control_view: &NSView,
695 ) -> bool;
696
697 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
698 #[unsafe(method(stopTracking:at:inView:mouseIsUp:))]
699 #[unsafe(method_family = none)]
700 pub unsafe fn stopTracking_at_inView_mouseIsUp(
701 &self,
702 last_point: NSPoint,
703 stop_point: NSPoint,
704 control_view: &NSView,
705 flag: bool,
706 );
707
708 #[cfg(all(feature = "NSEvent", feature = "NSResponder", feature = "NSView"))]
709 #[unsafe(method(trackMouse:inRect:ofView:untilMouseUp:))]
710 #[unsafe(method_family = none)]
711 pub unsafe fn trackMouse_inRect_ofView_untilMouseUp(
712 &self,
713 event: &NSEvent,
714 cell_frame: NSRect,
715 control_view: &NSView,
716 flag: bool,
717 ) -> bool;
718
719 #[cfg(all(
720 feature = "NSEvent",
721 feature = "NSResponder",
722 feature = "NSText",
723 feature = "NSView"
724 ))]
725 #[unsafe(method(editWithFrame:inView:editor:delegate:event:))]
726 #[unsafe(method_family = none)]
727 pub unsafe fn editWithFrame_inView_editor_delegate_event(
728 &self,
729 rect: NSRect,
730 control_view: &NSView,
731 text_obj: &NSText,
732 delegate: Option<&AnyObject>,
733 event: Option<&NSEvent>,
734 );
735
736 #[cfg(all(feature = "NSResponder", feature = "NSText", feature = "NSView"))]
737 #[unsafe(method(selectWithFrame:inView:editor:delegate:start:length:))]
738 #[unsafe(method_family = none)]
739 pub unsafe fn selectWithFrame_inView_editor_delegate_start_length(
740 &self,
741 rect: NSRect,
742 control_view: &NSView,
743 text_obj: &NSText,
744 delegate: Option<&AnyObject>,
745 sel_start: NSInteger,
746 sel_length: NSInteger,
747 );
748
749 #[cfg(all(feature = "NSResponder", feature = "NSText", feature = "NSView"))]
750 #[unsafe(method(endEditing:))]
751 #[unsafe(method_family = none)]
752 pub unsafe fn endEditing(&self, text_obj: &NSText);
753
754 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
755 #[unsafe(method(resetCursorRect:inView:))]
756 #[unsafe(method_family = none)]
757 pub unsafe fn resetCursorRect_inView(&self, cell_frame: NSRect, control_view: &NSView);
758
759 #[cfg(feature = "NSMenu")]
760 #[unsafe(method(menu))]
761 #[unsafe(method_family = none)]
762 pub unsafe fn menu(&self) -> Option<Retained<NSMenu>>;
763
764 #[cfg(feature = "NSMenu")]
765 #[unsafe(method(setMenu:))]
767 #[unsafe(method_family = none)]
768 pub unsafe fn setMenu(&self, menu: Option<&NSMenu>);
769
770 #[cfg(all(
771 feature = "NSEvent",
772 feature = "NSMenu",
773 feature = "NSResponder",
774 feature = "NSView"
775 ))]
776 #[unsafe(method(menuForEvent:inRect:ofView:))]
777 #[unsafe(method_family = none)]
778 pub unsafe fn menuForEvent_inRect_ofView(
779 &self,
780 event: &NSEvent,
781 cell_frame: NSRect,
782 view: &NSView,
783 ) -> Option<Retained<NSMenu>>;
784
785 #[cfg(feature = "NSMenu")]
786 #[unsafe(method(defaultMenu))]
787 #[unsafe(method_family = none)]
788 pub unsafe fn defaultMenu(mtm: MainThreadMarker) -> Option<Retained<NSMenu>>;
789
790 #[unsafe(method(sendsActionOnEndEditing))]
791 #[unsafe(method_family = none)]
792 pub unsafe fn sendsActionOnEndEditing(&self) -> bool;
793
794 #[unsafe(method(setSendsActionOnEndEditing:))]
796 #[unsafe(method_family = none)]
797 pub unsafe fn setSendsActionOnEndEditing(&self, sends_action_on_end_editing: bool);
798
799 #[cfg(feature = "NSText")]
800 #[unsafe(method(baseWritingDirection))]
801 #[unsafe(method_family = none)]
802 pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection;
803
804 #[cfg(feature = "NSText")]
805 #[unsafe(method(setBaseWritingDirection:))]
807 #[unsafe(method_family = none)]
808 pub unsafe fn setBaseWritingDirection(&self, base_writing_direction: NSWritingDirection);
809
810 #[cfg(feature = "NSParagraphStyle")]
811 #[unsafe(method(lineBreakMode))]
812 #[unsafe(method_family = none)]
813 pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode;
814
815 #[cfg(feature = "NSParagraphStyle")]
816 #[unsafe(method(setLineBreakMode:))]
818 #[unsafe(method_family = none)]
819 pub unsafe fn setLineBreakMode(&self, line_break_mode: NSLineBreakMode);
820
821 #[unsafe(method(allowsUndo))]
822 #[unsafe(method_family = none)]
823 pub unsafe fn allowsUndo(&self) -> bool;
824
825 #[unsafe(method(setAllowsUndo:))]
827 #[unsafe(method_family = none)]
828 pub unsafe fn setAllowsUndo(&self, allows_undo: bool);
829
830 #[unsafe(method(truncatesLastVisibleLine))]
831 #[unsafe(method_family = none)]
832 pub unsafe fn truncatesLastVisibleLine(&self) -> bool;
833
834 #[unsafe(method(setTruncatesLastVisibleLine:))]
836 #[unsafe(method_family = none)]
837 pub unsafe fn setTruncatesLastVisibleLine(&self, truncates_last_visible_line: bool);
838
839 #[cfg(feature = "NSUserInterfaceLayout")]
840 #[unsafe(method(userInterfaceLayoutDirection))]
841 #[unsafe(method_family = none)]
842 pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection;
843
844 #[cfg(feature = "NSUserInterfaceLayout")]
845 #[unsafe(method(setUserInterfaceLayoutDirection:))]
847 #[unsafe(method_family = none)]
848 pub unsafe fn setUserInterfaceLayoutDirection(
849 &self,
850 user_interface_layout_direction: NSUserInterfaceLayoutDirection,
851 );
852
853 #[cfg(all(
854 feature = "NSResponder",
855 feature = "NSText",
856 feature = "NSTextView",
857 feature = "NSView"
858 ))]
859 #[unsafe(method(fieldEditorForView:))]
860 #[unsafe(method_family = none)]
861 pub unsafe fn fieldEditorForView(
862 &self,
863 control_view: &NSView,
864 ) -> Option<Retained<NSTextView>>;
865
866 #[unsafe(method(usesSingleLineMode))]
867 #[unsafe(method_family = none)]
868 pub unsafe fn usesSingleLineMode(&self) -> bool;
869
870 #[unsafe(method(setUsesSingleLineMode:))]
872 #[unsafe(method_family = none)]
873 pub unsafe fn setUsesSingleLineMode(&self, uses_single_line_mode: bool);
874
875 #[cfg(all(
876 feature = "NSDraggingItem",
877 feature = "NSResponder",
878 feature = "NSView"
879 ))]
880 #[unsafe(method(draggingImageComponentsWithFrame:inView:))]
881 #[unsafe(method_family = none)]
882 pub unsafe fn draggingImageComponentsWithFrame_inView(
883 &self,
884 frame: NSRect,
885 view: &NSView,
886 ) -> Retained<NSArray<NSDraggingImageComponent>>;
887 );
888}
889
890impl NSCell {
892 extern_methods!(
893 #[unsafe(method(new))]
894 #[unsafe(method_family = new)]
895 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
896 );
897}
898
899impl NSCell {
901 extern_methods!(
902 #[unsafe(method(refusesFirstResponder))]
903 #[unsafe(method_family = none)]
904 pub unsafe fn refusesFirstResponder(&self) -> bool;
905
906 #[unsafe(method(setRefusesFirstResponder:))]
908 #[unsafe(method_family = none)]
909 pub unsafe fn setRefusesFirstResponder(&self, refuses_first_responder: bool);
910
911 #[unsafe(method(acceptsFirstResponder))]
912 #[unsafe(method_family = none)]
913 pub unsafe fn acceptsFirstResponder(&self) -> bool;
914
915 #[unsafe(method(showsFirstResponder))]
916 #[unsafe(method_family = none)]
917 pub unsafe fn showsFirstResponder(&self) -> bool;
918
919 #[unsafe(method(setShowsFirstResponder:))]
921 #[unsafe(method_family = none)]
922 pub unsafe fn setShowsFirstResponder(&self, shows_first_responder: bool);
923
924 #[unsafe(method(performClick:))]
925 #[unsafe(method_family = none)]
926 pub unsafe fn performClick(&self, sender: Option<&AnyObject>);
927
928 #[cfg(feature = "NSGraphics")]
929 #[unsafe(method(focusRingType))]
930 #[unsafe(method_family = none)]
931 pub unsafe fn focusRingType(&self) -> NSFocusRingType;
932
933 #[cfg(feature = "NSGraphics")]
934 #[unsafe(method(setFocusRingType:))]
936 #[unsafe(method_family = none)]
937 pub unsafe fn setFocusRingType(&self, focus_ring_type: NSFocusRingType);
938
939 #[cfg(feature = "NSGraphics")]
940 #[unsafe(method(defaultFocusRingType))]
941 #[unsafe(method_family = none)]
942 pub unsafe fn defaultFocusRingType(mtm: MainThreadMarker) -> NSFocusRingType;
943
944 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
945 #[unsafe(method(drawFocusRingMaskWithFrame:inView:))]
946 #[unsafe(method_family = none)]
947 pub unsafe fn drawFocusRingMaskWithFrame_inView(
948 &self,
949 cell_frame: NSRect,
950 control_view: &NSView,
951 );
952
953 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
954 #[unsafe(method(focusRingMaskBoundsForFrame:inView:))]
955 #[unsafe(method_family = none)]
956 pub unsafe fn focusRingMaskBoundsForFrame_inView(
957 &self,
958 cell_frame: NSRect,
959 control_view: &NSView,
960 ) -> NSRect;
961
962 #[unsafe(method(wantsNotificationForMarkedText))]
963 #[unsafe(method_family = none)]
964 pub unsafe fn wantsNotificationForMarkedText(&self) -> bool;
965 );
966}
967
968impl NSCell {
970 extern_methods!(
971 #[unsafe(method(attributedStringValue))]
972 #[unsafe(method_family = none)]
973 pub unsafe fn attributedStringValue(&self) -> Retained<NSAttributedString>;
974
975 #[unsafe(method(setAttributedStringValue:))]
977 #[unsafe(method_family = none)]
978 pub unsafe fn setAttributedStringValue(&self, attributed_string_value: &NSAttributedString);
979
980 #[unsafe(method(allowsEditingTextAttributes))]
981 #[unsafe(method_family = none)]
982 pub unsafe fn allowsEditingTextAttributes(&self) -> bool;
983
984 #[unsafe(method(setAllowsEditingTextAttributes:))]
986 #[unsafe(method_family = none)]
987 pub unsafe fn setAllowsEditingTextAttributes(&self, allows_editing_text_attributes: bool);
988
989 #[unsafe(method(importsGraphics))]
990 #[unsafe(method_family = none)]
991 pub unsafe fn importsGraphics(&self) -> bool;
992
993 #[unsafe(method(setImportsGraphics:))]
995 #[unsafe(method_family = none)]
996 pub unsafe fn setImportsGraphics(&self, imports_graphics: bool);
997 );
998}
999
1000impl NSCell {
1002 extern_methods!(
1003 #[unsafe(method(allowsMixedState))]
1004 #[unsafe(method_family = none)]
1005 pub unsafe fn allowsMixedState(&self) -> bool;
1006
1007 #[unsafe(method(setAllowsMixedState:))]
1009 #[unsafe(method_family = none)]
1010 pub unsafe fn setAllowsMixedState(&self, allows_mixed_state: bool);
1011
1012 #[unsafe(method(nextState))]
1013 #[unsafe(method_family = none)]
1014 pub unsafe fn nextState(&self) -> NSInteger;
1015
1016 #[unsafe(method(setNextState))]
1017 #[unsafe(method_family = none)]
1018 pub unsafe fn setNextState(&self);
1019 );
1020}
1021
1022#[repr(transparent)]
1025#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1026pub struct NSCellHitResult(pub NSUInteger);
1027bitflags::bitflags! {
1028 impl NSCellHitResult: NSUInteger {
1029 #[doc(alias = "NSCellHitNone")]
1030 const None = 0;
1031 #[doc(alias = "NSCellHitContentArea")]
1032 const ContentArea = 1<<0;
1033 #[doc(alias = "NSCellHitEditableTextArea")]
1034 const EditableTextArea = 1<<1;
1035 #[doc(alias = "NSCellHitTrackableArea")]
1036 const TrackableArea = 1<<2;
1037 }
1038}
1039
1040unsafe impl Encode for NSCellHitResult {
1041 const ENCODING: Encoding = NSUInteger::ENCODING;
1042}
1043
1044unsafe impl RefEncode for NSCellHitResult {
1045 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1046}
1047
1048impl NSCell {
1050 extern_methods!(
1051 #[cfg(all(feature = "NSEvent", feature = "NSResponder", feature = "NSView"))]
1052 #[unsafe(method(hitTestForEvent:inRect:ofView:))]
1053 #[unsafe(method_family = none)]
1054 pub unsafe fn hitTestForEvent_inRect_ofView(
1055 &self,
1056 event: &NSEvent,
1057 cell_frame: NSRect,
1058 control_view: &NSView,
1059 ) -> NSCellHitResult;
1060 );
1061}
1062
1063impl NSCell {
1065 extern_methods!(
1066 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
1067 #[unsafe(method(expansionFrameWithFrame:inView:))]
1068 #[unsafe(method_family = none)]
1069 pub unsafe fn expansionFrameWithFrame_inView(
1070 &self,
1071 cell_frame: NSRect,
1072 view: &NSView,
1073 ) -> NSRect;
1074
1075 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
1076 #[unsafe(method(drawWithExpansionFrame:inView:))]
1077 #[unsafe(method_family = none)]
1078 pub unsafe fn drawWithExpansionFrame_inView(&self, cell_frame: NSRect, view: &NSView);
1079 );
1080}
1081
1082#[repr(transparent)]
1085#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1086pub struct NSBackgroundStyle(pub NSInteger);
1087impl NSBackgroundStyle {
1088 #[doc(alias = "NSBackgroundStyleNormal")]
1089 pub const Normal: Self = Self(0);
1090 #[doc(alias = "NSBackgroundStyleEmphasized")]
1091 pub const Emphasized: Self = Self(1);
1092 #[doc(alias = "NSBackgroundStyleRaised")]
1093 pub const Raised: Self = Self(2);
1094 #[doc(alias = "NSBackgroundStyleLowered")]
1095 pub const Lowered: Self = Self(3);
1096}
1097
1098unsafe impl Encode for NSBackgroundStyle {
1099 const ENCODING: Encoding = NSInteger::ENCODING;
1100}
1101
1102unsafe impl RefEncode for NSBackgroundStyle {
1103 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1104}
1105
1106impl NSCell {
1108 extern_methods!(
1109 #[unsafe(method(backgroundStyle))]
1110 #[unsafe(method_family = none)]
1111 pub unsafe fn backgroundStyle(&self) -> NSBackgroundStyle;
1112
1113 #[unsafe(method(setBackgroundStyle:))]
1115 #[unsafe(method_family = none)]
1116 pub unsafe fn setBackgroundStyle(&self, background_style: NSBackgroundStyle);
1117
1118 #[unsafe(method(interiorBackgroundStyle))]
1119 #[unsafe(method_family = none)]
1120 pub unsafe fn interiorBackgroundStyle(&self) -> NSBackgroundStyle;
1121 );
1122}
1123
1124#[cfg(all(
1125 feature = "NSGraphics",
1126 feature = "NSImage",
1127 feature = "objc2-core-foundation"
1128))]
1129#[inline]
1130pub unsafe extern "C-unwind" fn NSDrawThreePartImage(
1131 frame: NSRect,
1132 start_cap: Option<&NSImage>,
1133 center_fill: Option<&NSImage>,
1134 end_cap: Option<&NSImage>,
1135 vertical: bool,
1136 op: NSCompositingOperation,
1137 alpha_fraction: CGFloat,
1138 flipped: bool,
1139) {
1140 extern "C-unwind" {
1141 fn NSDrawThreePartImage(
1142 frame: NSRect,
1143 start_cap: Option<&NSImage>,
1144 center_fill: Option<&NSImage>,
1145 end_cap: Option<&NSImage>,
1146 vertical: Bool,
1147 op: NSCompositingOperation,
1148 alpha_fraction: CGFloat,
1149 flipped: Bool,
1150 );
1151 }
1152 unsafe {
1153 NSDrawThreePartImage(
1154 frame,
1155 start_cap,
1156 center_fill,
1157 end_cap,
1158 Bool::new(vertical),
1159 op,
1160 alpha_fraction,
1161 Bool::new(flipped),
1162 )
1163 }
1164}
1165
1166#[cfg(all(
1167 feature = "NSGraphics",
1168 feature = "NSImage",
1169 feature = "objc2-core-foundation"
1170))]
1171#[inline]
1172pub unsafe extern "C-unwind" fn NSDrawNinePartImage(
1173 frame: NSRect,
1174 top_left_corner: Option<&NSImage>,
1175 top_edge_fill: Option<&NSImage>,
1176 top_right_corner: Option<&NSImage>,
1177 left_edge_fill: Option<&NSImage>,
1178 center_fill: Option<&NSImage>,
1179 right_edge_fill: Option<&NSImage>,
1180 bottom_left_corner: Option<&NSImage>,
1181 bottom_edge_fill: Option<&NSImage>,
1182 bottom_right_corner: Option<&NSImage>,
1183 op: NSCompositingOperation,
1184 alpha_fraction: CGFloat,
1185 flipped: bool,
1186) {
1187 extern "C-unwind" {
1188 fn NSDrawNinePartImage(
1189 frame: NSRect,
1190 top_left_corner: Option<&NSImage>,
1191 top_edge_fill: Option<&NSImage>,
1192 top_right_corner: Option<&NSImage>,
1193 left_edge_fill: Option<&NSImage>,
1194 center_fill: Option<&NSImage>,
1195 right_edge_fill: Option<&NSImage>,
1196 bottom_left_corner: Option<&NSImage>,
1197 bottom_edge_fill: Option<&NSImage>,
1198 bottom_right_corner: Option<&NSImage>,
1199 op: NSCompositingOperation,
1200 alpha_fraction: CGFloat,
1201 flipped: Bool,
1202 );
1203 }
1204 unsafe {
1205 NSDrawNinePartImage(
1206 frame,
1207 top_left_corner,
1208 top_edge_fill,
1209 top_right_corner,
1210 left_edge_fill,
1211 center_fill,
1212 right_edge_fill,
1213 bottom_left_corner,
1214 bottom_edge_fill,
1215 bottom_right_corner,
1216 op,
1217 alpha_fraction,
1218 Bool::new(flipped),
1219 )
1220 }
1221}
1222
1223impl NSCell {
1225 extern_methods!(
1226 #[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."]
1227 #[unsafe(method(controlTint))]
1228 #[unsafe(method_family = none)]
1229 pub unsafe fn controlTint(&self) -> NSControlTint;
1230
1231 #[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."]
1233 #[unsafe(method(setControlTint:))]
1234 #[unsafe(method_family = none)]
1235 pub unsafe fn setControlTint(&self, control_tint: NSControlTint);
1236
1237 #[deprecated]
1238 #[unsafe(method(entryType))]
1239 #[unsafe(method_family = none)]
1240 pub unsafe fn entryType(&self) -> NSInteger;
1241
1242 #[deprecated]
1243 #[unsafe(method(setEntryType:))]
1244 #[unsafe(method_family = none)]
1245 pub unsafe fn setEntryType(&self, r#type: NSInteger);
1246
1247 #[deprecated]
1248 #[unsafe(method(isEntryAcceptable:))]
1249 #[unsafe(method_family = none)]
1250 pub unsafe fn isEntryAcceptable(&self, string: &NSString) -> bool;
1251
1252 #[deprecated]
1253 #[unsafe(method(setFloatingPointFormat:left:right:))]
1254 #[unsafe(method_family = none)]
1255 pub unsafe fn setFloatingPointFormat_left_right(
1256 &self,
1257 auto_range: bool,
1258 left_digits: NSUInteger,
1259 right_digits: NSUInteger,
1260 );
1261
1262 #[deprecated]
1263 #[unsafe(method(setMnemonicLocation:))]
1264 #[unsafe(method_family = none)]
1265 pub unsafe fn setMnemonicLocation(&self, location: NSUInteger);
1266
1267 #[deprecated]
1268 #[unsafe(method(mnemonicLocation))]
1269 #[unsafe(method_family = none)]
1270 pub unsafe fn mnemonicLocation(&self) -> NSUInteger;
1271
1272 #[deprecated]
1273 #[unsafe(method(mnemonic))]
1274 #[unsafe(method_family = none)]
1275 pub unsafe fn mnemonic(&self) -> Retained<NSString>;
1276
1277 #[deprecated]
1278 #[unsafe(method(setTitleWithMnemonic:))]
1279 #[unsafe(method_family = none)]
1280 pub unsafe fn setTitleWithMnemonic(&self, string_with_ampersand: &NSString);
1281 );
1282}
1283
1284pub static NSBackgroundStyleLight: NSBackgroundStyle =
1286 NSBackgroundStyle(NSBackgroundStyle::Normal.0);
1287
1288pub static NSBackgroundStyleDark: NSBackgroundStyle =
1290 NSBackgroundStyle(NSBackgroundStyle::Emphasized.0);
1291
1292pub type NSCellStateValue = NSControlStateValue;
1294
1295pub static NSMixedState: NSControlStateValue = NSControlStateValueMixed;
1297
1298pub static NSOffState: NSControlStateValue = NSControlStateValueOff;
1300
1301pub static NSOnState: NSControlStateValue = NSControlStateValueOn;
1303
1304pub static NSRegularControlSize: NSControlSize = NSControlSize(NSControlSize::Regular.0);
1306
1307pub static NSSmallControlSize: NSControlSize = NSControlSize(NSControlSize::Small.0);
1309
1310pub static NSMiniControlSize: NSControlSize = NSControlSize(NSControlSize::Mini.0);
1312
1313extern "C" {
1314 pub static NSControlTintDidChangeNotification: &'static NSNotificationName;
1316}
1317
1318#[deprecated = "Use formatters instead"]
1320pub const NSAnyType: c_uint = 0;
1321#[deprecated = "Use formatters instead"]
1323pub const NSIntType: c_uint = 1;
1324#[deprecated = "Use formatters instead"]
1326pub const NSPositiveIntType: c_uint = 2;
1327#[deprecated = "Use formatters instead"]
1329pub const NSFloatType: c_uint = 3;
1330#[deprecated = "Use formatters instead"]
1332pub const NSPositiveFloatType: c_uint = 4;
1333#[deprecated = "Use formatters instead"]
1335pub const NSDoubleType: c_uint = 6;
1336#[deprecated = "Use formatters instead"]
1338pub const NSPositiveDoubleType: c_uint = 7;