1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-image")]
9#[cfg(target_vendor = "apple")]
10use objc2_core_image::*;
11use objc2_foundation::*;
12#[cfg(feature = "objc2-quartz-core")]
13#[cfg(target_vendor = "apple")]
14use objc2_quartz_core::*;
15
16use crate::*;
17
18#[repr(transparent)]
21#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
22pub struct NSAutoresizingMaskOptions(pub NSUInteger);
23bitflags::bitflags! {
24 impl NSAutoresizingMaskOptions: NSUInteger {
25 #[doc(alias = "NSViewNotSizable")]
26 const ViewNotSizable = 0;
27 #[doc(alias = "NSViewMinXMargin")]
28 const ViewMinXMargin = 1;
29 #[doc(alias = "NSViewWidthSizable")]
30 const ViewWidthSizable = 2;
31 #[doc(alias = "NSViewMaxXMargin")]
32 const ViewMaxXMargin = 4;
33 #[doc(alias = "NSViewMinYMargin")]
34 const ViewMinYMargin = 8;
35 #[doc(alias = "NSViewHeightSizable")]
36 const ViewHeightSizable = 16;
37 #[doc(alias = "NSViewMaxYMargin")]
38 const ViewMaxYMargin = 32;
39 }
40}
41
42unsafe impl Encode for NSAutoresizingMaskOptions {
43 const ENCODING: Encoding = NSUInteger::ENCODING;
44}
45
46unsafe impl RefEncode for NSAutoresizingMaskOptions {
47 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
48}
49
50#[repr(transparent)]
53#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
54pub struct NSBorderType(pub NSUInteger);
55impl NSBorderType {
56 #[doc(alias = "NSNoBorder")]
57 pub const NoBorder: Self = Self(0);
58 #[doc(alias = "NSLineBorder")]
59 pub const LineBorder: Self = Self(1);
60 #[doc(alias = "NSBezelBorder")]
61 pub const BezelBorder: Self = Self(2);
62 #[doc(alias = "NSGrooveBorder")]
63 pub const GrooveBorder: Self = Self(3);
64}
65
66unsafe impl Encode for NSBorderType {
67 const ENCODING: Encoding = NSUInteger::ENCODING;
68}
69
70unsafe impl RefEncode for NSBorderType {
71 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
72}
73
74#[repr(transparent)]
77#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
78pub struct NSViewLayerContentsRedrawPolicy(pub NSInteger);
79impl NSViewLayerContentsRedrawPolicy {
80 #[doc(alias = "NSViewLayerContentsRedrawNever")]
81 pub const Never: Self = Self(0);
82 #[doc(alias = "NSViewLayerContentsRedrawOnSetNeedsDisplay")]
83 pub const OnSetNeedsDisplay: Self = Self(1);
84 #[doc(alias = "NSViewLayerContentsRedrawDuringViewResize")]
85 pub const DuringViewResize: Self = Self(2);
86 #[doc(alias = "NSViewLayerContentsRedrawBeforeViewResize")]
87 pub const BeforeViewResize: Self = Self(3);
88 #[doc(alias = "NSViewLayerContentsRedrawCrossfade")]
89 pub const Crossfade: Self = Self(4);
90}
91
92unsafe impl Encode for NSViewLayerContentsRedrawPolicy {
93 const ENCODING: Encoding = NSInteger::ENCODING;
94}
95
96unsafe impl RefEncode for NSViewLayerContentsRedrawPolicy {
97 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
98}
99
100#[repr(transparent)]
103#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
104pub struct NSViewLayerContentsPlacement(pub NSInteger);
105impl NSViewLayerContentsPlacement {
106 #[doc(alias = "NSViewLayerContentsPlacementScaleAxesIndependently")]
107 pub const ScaleAxesIndependently: Self = Self(0);
108 #[doc(alias = "NSViewLayerContentsPlacementScaleProportionallyToFit")]
109 pub const ScaleProportionallyToFit: Self = Self(1);
110 #[doc(alias = "NSViewLayerContentsPlacementScaleProportionallyToFill")]
111 pub const ScaleProportionallyToFill: Self = Self(2);
112 #[doc(alias = "NSViewLayerContentsPlacementCenter")]
113 pub const Center: Self = Self(3);
114 #[doc(alias = "NSViewLayerContentsPlacementTop")]
115 pub const Top: Self = Self(4);
116 #[doc(alias = "NSViewLayerContentsPlacementTopRight")]
117 pub const TopRight: Self = Self(5);
118 #[doc(alias = "NSViewLayerContentsPlacementRight")]
119 pub const Right: Self = Self(6);
120 #[doc(alias = "NSViewLayerContentsPlacementBottomRight")]
121 pub const BottomRight: Self = Self(7);
122 #[doc(alias = "NSViewLayerContentsPlacementBottom")]
123 pub const Bottom: Self = Self(8);
124 #[doc(alias = "NSViewLayerContentsPlacementBottomLeft")]
125 pub const BottomLeft: Self = Self(9);
126 #[doc(alias = "NSViewLayerContentsPlacementLeft")]
127 pub const Left: Self = Self(10);
128 #[doc(alias = "NSViewLayerContentsPlacementTopLeft")]
129 pub const TopLeft: Self = Self(11);
130}
131
132unsafe impl Encode for NSViewLayerContentsPlacement {
133 const ENCODING: Encoding = NSInteger::ENCODING;
134}
135
136unsafe impl RefEncode for NSViewLayerContentsPlacement {
137 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
138}
139
140pub type NSTrackingRectTag = NSInteger;
142
143pub type NSToolTipTag = NSInteger;
145
146extern_class!(
147 #[unsafe(super(NSResponder, NSObject))]
149 #[thread_kind = MainThreadOnly]
150 #[derive(Debug, PartialEq, Eq, Hash)]
151 #[cfg(feature = "NSResponder")]
152 pub struct NSView;
153);
154
155#[cfg(all(feature = "NSAccessibilityProtocols", feature = "NSResponder"))]
156unsafe impl NSAccessibility for NSView {}
157
158#[cfg(all(feature = "NSAccessibilityProtocols", feature = "NSResponder"))]
159unsafe impl NSAccessibilityElementProtocol for NSView {}
160
161#[cfg(all(feature = "NSAnimation", feature = "NSResponder"))]
162unsafe impl NSAnimatablePropertyContainer for NSView {}
163
164#[cfg(all(feature = "NSAppearance", feature = "NSResponder"))]
165unsafe impl NSAppearanceCustomization for NSView {}
166
167#[cfg(feature = "NSResponder")]
168unsafe impl NSCoding for NSView {}
169
170#[cfg(all(feature = "NSDragging", feature = "NSResponder"))]
171unsafe impl NSDraggingDestination for NSView {}
172
173#[cfg(feature = "NSResponder")]
174unsafe impl NSObjectProtocol for NSView {}
175
176#[cfg(all(feature = "NSResponder", feature = "NSUserInterfaceItemIdentification"))]
177unsafe impl NSUserInterfaceItemIdentification for NSView {}
178
179#[cfg(feature = "NSResponder")]
180impl NSView {
181 extern_methods!(
182 #[unsafe(method(initWithFrame:))]
183 #[unsafe(method_family = init)]
184 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
185
186 #[unsafe(method(initWithCoder:))]
187 #[unsafe(method_family = init)]
188 pub unsafe fn initWithCoder(
189 this: Allocated<Self>,
190 coder: &NSCoder,
191 ) -> Option<Retained<Self>>;
192
193 #[cfg(feature = "NSWindow")]
194 #[unsafe(method(window))]
195 #[unsafe(method_family = none)]
196 pub fn window(&self) -> Option<Retained<NSWindow>>;
197
198 #[unsafe(method(superview))]
199 #[unsafe(method_family = none)]
200 pub unsafe fn superview(&self) -> Option<Retained<NSView>>;
201
202 #[unsafe(method(subviews))]
203 #[unsafe(method_family = none)]
204 pub unsafe fn subviews(&self) -> Retained<NSArray<NSView>>;
205
206 #[unsafe(method(setSubviews:))]
208 #[unsafe(method_family = none)]
209 pub unsafe fn setSubviews(&self, subviews: &NSArray<NSView>);
210
211 #[unsafe(method(isDescendantOf:))]
212 #[unsafe(method_family = none)]
213 pub unsafe fn isDescendantOf(&self, view: &NSView) -> bool;
214
215 #[unsafe(method(ancestorSharedWithView:))]
216 #[unsafe(method_family = none)]
217 pub unsafe fn ancestorSharedWithView(&self, view: &NSView) -> Option<Retained<NSView>>;
218
219 #[unsafe(method(opaqueAncestor))]
220 #[unsafe(method_family = none)]
221 pub unsafe fn opaqueAncestor(&self) -> Option<Retained<NSView>>;
222
223 #[unsafe(method(isHidden))]
224 #[unsafe(method_family = none)]
225 pub unsafe fn isHidden(&self) -> bool;
226
227 #[unsafe(method(setHidden:))]
229 #[unsafe(method_family = none)]
230 pub fn setHidden(&self, hidden: bool);
231
232 #[unsafe(method(isHiddenOrHasHiddenAncestor))]
233 #[unsafe(method_family = none)]
234 pub unsafe fn isHiddenOrHasHiddenAncestor(&self) -> bool;
235
236 #[unsafe(method(getRectsBeingDrawn:count:))]
237 #[unsafe(method_family = none)]
238 pub unsafe fn getRectsBeingDrawn_count(
239 &self,
240 rects: *mut *const NSRect,
241 count: *mut NSInteger,
242 );
243
244 #[unsafe(method(needsToDrawRect:))]
245 #[unsafe(method_family = none)]
246 pub unsafe fn needsToDrawRect(&self, rect: NSRect) -> bool;
247
248 #[unsafe(method(wantsDefaultClipping))]
249 #[unsafe(method_family = none)]
250 pub unsafe fn wantsDefaultClipping(&self) -> bool;
251
252 #[unsafe(method(viewDidHide))]
253 #[unsafe(method_family = none)]
254 pub unsafe fn viewDidHide(&self);
255
256 #[unsafe(method(viewDidUnhide))]
257 #[unsafe(method_family = none)]
258 pub unsafe fn viewDidUnhide(&self);
259
260 #[unsafe(method(addSubview:))]
261 #[unsafe(method_family = none)]
262 pub unsafe fn addSubview(&self, view: &NSView);
263
264 #[cfg(feature = "NSGraphics")]
265 #[unsafe(method(addSubview:positioned:relativeTo:))]
266 #[unsafe(method_family = none)]
267 pub unsafe fn addSubview_positioned_relativeTo(
268 &self,
269 view: &NSView,
270 place: NSWindowOrderingMode,
271 other_view: Option<&NSView>,
272 );
273
274 #[unsafe(method(sortSubviewsUsingFunction:context:))]
275 #[unsafe(method_family = none)]
276 pub unsafe fn sortSubviewsUsingFunction_context(
277 &self,
278 compare: unsafe extern "C-unwind" fn(
279 NonNull<NSView>,
280 NonNull<NSView>,
281 *mut c_void,
282 ) -> NSComparisonResult,
283 context: *mut c_void,
284 );
285
286 #[cfg(feature = "NSWindow")]
287 #[unsafe(method(viewWillMoveToWindow:))]
288 #[unsafe(method_family = none)]
289 pub unsafe fn viewWillMoveToWindow(&self, new_window: Option<&NSWindow>);
290
291 #[unsafe(method(viewDidMoveToWindow))]
292 #[unsafe(method_family = none)]
293 pub unsafe fn viewDidMoveToWindow(&self);
294
295 #[unsafe(method(viewWillMoveToSuperview:))]
296 #[unsafe(method_family = none)]
297 pub unsafe fn viewWillMoveToSuperview(&self, new_superview: Option<&NSView>);
298
299 #[unsafe(method(viewDidMoveToSuperview))]
300 #[unsafe(method_family = none)]
301 pub unsafe fn viewDidMoveToSuperview(&self);
302
303 #[unsafe(method(didAddSubview:))]
304 #[unsafe(method_family = none)]
305 pub unsafe fn didAddSubview(&self, subview: &NSView);
306
307 #[unsafe(method(willRemoveSubview:))]
308 #[unsafe(method_family = none)]
309 pub unsafe fn willRemoveSubview(&self, subview: &NSView);
310
311 #[unsafe(method(removeFromSuperview))]
312 #[unsafe(method_family = none)]
313 pub unsafe fn removeFromSuperview(&self);
314
315 #[unsafe(method(replaceSubview:with:))]
316 #[unsafe(method_family = none)]
317 pub unsafe fn replaceSubview_with(&self, old_view: &NSView, new_view: &NSView);
318
319 #[unsafe(method(removeFromSuperviewWithoutNeedingDisplay))]
320 #[unsafe(method_family = none)]
321 pub unsafe fn removeFromSuperviewWithoutNeedingDisplay(&self);
322
323 #[unsafe(method(viewDidChangeBackingProperties))]
324 #[unsafe(method_family = none)]
325 pub unsafe fn viewDidChangeBackingProperties(&self);
326
327 #[unsafe(method(postsFrameChangedNotifications))]
328 #[unsafe(method_family = none)]
329 pub unsafe fn postsFrameChangedNotifications(&self) -> bool;
330
331 #[unsafe(method(setPostsFrameChangedNotifications:))]
333 #[unsafe(method_family = none)]
334 pub fn setPostsFrameChangedNotifications(&self, posts_frame_changed_notifications: bool);
335
336 #[unsafe(method(resizeSubviewsWithOldSize:))]
337 #[unsafe(method_family = none)]
338 pub unsafe fn resizeSubviewsWithOldSize(&self, old_size: NSSize);
339
340 #[unsafe(method(resizeWithOldSuperviewSize:))]
341 #[unsafe(method_family = none)]
342 pub unsafe fn resizeWithOldSuperviewSize(&self, old_size: NSSize);
343
344 #[unsafe(method(autoresizesSubviews))]
345 #[unsafe(method_family = none)]
346 pub unsafe fn autoresizesSubviews(&self) -> bool;
347
348 #[unsafe(method(setAutoresizesSubviews:))]
350 #[unsafe(method_family = none)]
351 pub unsafe fn setAutoresizesSubviews(&self, autoresizes_subviews: bool);
352
353 #[unsafe(method(autoresizingMask))]
354 #[unsafe(method_family = none)]
355 pub unsafe fn autoresizingMask(&self) -> NSAutoresizingMaskOptions;
356
357 #[unsafe(method(setAutoresizingMask:))]
359 #[unsafe(method_family = none)]
360 pub unsafe fn setAutoresizingMask(&self, autoresizing_mask: NSAutoresizingMaskOptions);
361
362 #[unsafe(method(setFrameOrigin:))]
363 #[unsafe(method_family = none)]
364 pub unsafe fn setFrameOrigin(&self, new_origin: NSPoint);
365
366 #[unsafe(method(setFrameSize:))]
367 #[unsafe(method_family = none)]
368 pub unsafe fn setFrameSize(&self, new_size: NSSize);
369
370 #[unsafe(method(frame))]
371 #[unsafe(method_family = none)]
372 pub fn frame(&self) -> NSRect;
373
374 #[unsafe(method(setFrame:))]
376 #[unsafe(method_family = none)]
377 pub unsafe fn setFrame(&self, frame: NSRect);
378
379 #[cfg(feature = "objc2-core-foundation")]
380 #[unsafe(method(frameRotation))]
381 #[unsafe(method_family = none)]
382 pub unsafe fn frameRotation(&self) -> CGFloat;
383
384 #[cfg(feature = "objc2-core-foundation")]
385 #[unsafe(method(setFrameRotation:))]
387 #[unsafe(method_family = none)]
388 pub unsafe fn setFrameRotation(&self, frame_rotation: CGFloat);
389
390 #[cfg(feature = "objc2-core-foundation")]
391 #[unsafe(method(frameCenterRotation))]
392 #[unsafe(method_family = none)]
393 pub unsafe fn frameCenterRotation(&self) -> CGFloat;
394
395 #[cfg(feature = "objc2-core-foundation")]
396 #[unsafe(method(setFrameCenterRotation:))]
398 #[unsafe(method_family = none)]
399 pub unsafe fn setFrameCenterRotation(&self, frame_center_rotation: CGFloat);
400
401 #[unsafe(method(setBoundsOrigin:))]
402 #[unsafe(method_family = none)]
403 pub unsafe fn setBoundsOrigin(&self, new_origin: NSPoint);
404
405 #[unsafe(method(setBoundsSize:))]
406 #[unsafe(method_family = none)]
407 pub unsafe fn setBoundsSize(&self, new_size: NSSize);
408
409 #[cfg(feature = "objc2-core-foundation")]
410 #[unsafe(method(boundsRotation))]
411 #[unsafe(method_family = none)]
412 pub unsafe fn boundsRotation(&self) -> CGFloat;
413
414 #[cfg(feature = "objc2-core-foundation")]
415 #[unsafe(method(setBoundsRotation:))]
417 #[unsafe(method_family = none)]
418 pub unsafe fn setBoundsRotation(&self, bounds_rotation: CGFloat);
419
420 #[unsafe(method(translateOriginToPoint:))]
421 #[unsafe(method_family = none)]
422 pub unsafe fn translateOriginToPoint(&self, translation: NSPoint);
423
424 #[unsafe(method(scaleUnitSquareToSize:))]
425 #[unsafe(method_family = none)]
426 pub unsafe fn scaleUnitSquareToSize(&self, new_unit_size: NSSize);
427
428 #[cfg(feature = "objc2-core-foundation")]
429 #[unsafe(method(rotateByAngle:))]
430 #[unsafe(method_family = none)]
431 pub unsafe fn rotateByAngle(&self, angle: CGFloat);
432
433 #[unsafe(method(bounds))]
434 #[unsafe(method_family = none)]
435 pub fn bounds(&self) -> NSRect;
436
437 #[unsafe(method(setBounds:))]
439 #[unsafe(method_family = none)]
440 pub unsafe fn setBounds(&self, bounds: NSRect);
441
442 #[unsafe(method(isFlipped))]
443 #[unsafe(method_family = none)]
444 pub fn isFlipped(&self) -> bool;
445
446 #[unsafe(method(isRotatedFromBase))]
447 #[unsafe(method_family = none)]
448 pub unsafe fn isRotatedFromBase(&self) -> bool;
449
450 #[unsafe(method(isRotatedOrScaledFromBase))]
451 #[unsafe(method_family = none)]
452 pub unsafe fn isRotatedOrScaledFromBase(&self) -> bool;
453
454 #[unsafe(method(isOpaque))]
455 #[unsafe(method_family = none)]
456 pub unsafe fn isOpaque(&self) -> bool;
457
458 #[unsafe(method(convertPoint:fromView:))]
459 #[unsafe(method_family = none)]
460 pub fn convertPoint_fromView(&self, point: NSPoint, view: Option<&NSView>) -> NSPoint;
461
462 #[unsafe(method(convertPoint:toView:))]
463 #[unsafe(method_family = none)]
464 pub unsafe fn convertPoint_toView(&self, point: NSPoint, view: Option<&NSView>) -> NSPoint;
465
466 #[unsafe(method(convertSize:fromView:))]
467 #[unsafe(method_family = none)]
468 pub unsafe fn convertSize_fromView(&self, size: NSSize, view: Option<&NSView>) -> NSSize;
469
470 #[unsafe(method(convertSize:toView:))]
471 #[unsafe(method_family = none)]
472 pub unsafe fn convertSize_toView(&self, size: NSSize, view: Option<&NSView>) -> NSSize;
473
474 #[unsafe(method(convertRect:fromView:))]
475 #[unsafe(method_family = none)]
476 pub unsafe fn convertRect_fromView(&self, rect: NSRect, view: Option<&NSView>) -> NSRect;
477
478 #[unsafe(method(convertRect:toView:))]
479 #[unsafe(method_family = none)]
480 pub fn convertRect_toView(&self, rect: NSRect, view: Option<&NSView>) -> NSRect;
481
482 #[unsafe(method(backingAlignedRect:options:))]
483 #[unsafe(method_family = none)]
484 pub unsafe fn backingAlignedRect_options(
485 &self,
486 rect: NSRect,
487 options: NSAlignmentOptions,
488 ) -> NSRect;
489
490 #[unsafe(method(centerScanRect:))]
491 #[unsafe(method_family = none)]
492 pub unsafe fn centerScanRect(&self, rect: NSRect) -> NSRect;
493
494 #[unsafe(method(convertPointToBacking:))]
495 #[unsafe(method_family = none)]
496 pub unsafe fn convertPointToBacking(&self, point: NSPoint) -> NSPoint;
497
498 #[unsafe(method(convertPointFromBacking:))]
499 #[unsafe(method_family = none)]
500 pub unsafe fn convertPointFromBacking(&self, point: NSPoint) -> NSPoint;
501
502 #[unsafe(method(convertSizeToBacking:))]
503 #[unsafe(method_family = none)]
504 pub unsafe fn convertSizeToBacking(&self, size: NSSize) -> NSSize;
505
506 #[unsafe(method(convertSizeFromBacking:))]
507 #[unsafe(method_family = none)]
508 pub unsafe fn convertSizeFromBacking(&self, size: NSSize) -> NSSize;
509
510 #[unsafe(method(convertRectToBacking:))]
511 #[unsafe(method_family = none)]
512 pub unsafe fn convertRectToBacking(&self, rect: NSRect) -> NSRect;
513
514 #[unsafe(method(convertRectFromBacking:))]
515 #[unsafe(method_family = none)]
516 pub unsafe fn convertRectFromBacking(&self, rect: NSRect) -> NSRect;
517
518 #[unsafe(method(convertPointToLayer:))]
519 #[unsafe(method_family = none)]
520 pub unsafe fn convertPointToLayer(&self, point: NSPoint) -> NSPoint;
521
522 #[unsafe(method(convertPointFromLayer:))]
523 #[unsafe(method_family = none)]
524 pub unsafe fn convertPointFromLayer(&self, point: NSPoint) -> NSPoint;
525
526 #[unsafe(method(convertSizeToLayer:))]
527 #[unsafe(method_family = none)]
528 pub unsafe fn convertSizeToLayer(&self, size: NSSize) -> NSSize;
529
530 #[unsafe(method(convertSizeFromLayer:))]
531 #[unsafe(method_family = none)]
532 pub unsafe fn convertSizeFromLayer(&self, size: NSSize) -> NSSize;
533
534 #[unsafe(method(convertRectToLayer:))]
535 #[unsafe(method_family = none)]
536 pub unsafe fn convertRectToLayer(&self, rect: NSRect) -> NSRect;
537
538 #[unsafe(method(convertRectFromLayer:))]
539 #[unsafe(method_family = none)]
540 pub unsafe fn convertRectFromLayer(&self, rect: NSRect) -> NSRect;
541
542 #[unsafe(method(canDrawConcurrently))]
543 #[unsafe(method_family = none)]
544 pub unsafe fn canDrawConcurrently(&self) -> bool;
545
546 #[unsafe(method(setCanDrawConcurrently:))]
548 #[unsafe(method_family = none)]
549 pub unsafe fn setCanDrawConcurrently(&self, can_draw_concurrently: bool);
550
551 #[deprecated = "If a view needs display, -drawRect: or -updateLayer will be called automatically when the view is able to draw. To check whether a view is in a window, call -window. To check whether a view is hidden, call -isHiddenOrHasHiddenAncestor."]
552 #[unsafe(method(canDraw))]
553 #[unsafe(method_family = none)]
554 pub unsafe fn canDraw(&self) -> bool;
555
556 #[unsafe(method(setNeedsDisplayInRect:))]
557 #[unsafe(method_family = none)]
558 pub unsafe fn setNeedsDisplayInRect(&self, invalid_rect: NSRect);
559
560 #[unsafe(method(needsDisplay))]
561 #[unsafe(method_family = none)]
562 pub unsafe fn needsDisplay(&self) -> bool;
563
564 #[unsafe(method(setNeedsDisplay:))]
566 #[unsafe(method_family = none)]
567 pub unsafe fn setNeedsDisplay(&self, needs_display: bool);
568
569 #[deprecated = "To draw, subclass NSView and implement -drawRect:; AppKit's automatic deferred display mechanism will call -drawRect: as necessary to display the view."]
570 #[unsafe(method(lockFocus))]
571 #[unsafe(method_family = none)]
572 pub unsafe fn lockFocus(&self);
573
574 #[deprecated = "To draw, subclass NSView and implement -drawRect:; AppKit's automatic deferred display mechanism will call -drawRect: as necessary to display the view."]
575 #[unsafe(method(unlockFocus))]
576 #[unsafe(method_family = none)]
577 pub unsafe fn unlockFocus(&self);
578
579 #[deprecated = "To draw, subclass NSView and implement -drawRect:; AppKit's automatic deferred display mechanism will call -drawRect: as necessary to display the view."]
580 #[unsafe(method(lockFocusIfCanDraw))]
581 #[unsafe(method_family = none)]
582 pub unsafe fn lockFocusIfCanDraw(&self) -> bool;
583
584 #[cfg(feature = "NSGraphicsContext")]
585 #[deprecated = "Use -[NSView displayRectIgnoringOpacity:inContext:] to draw a view subtree into a graphics context."]
586 #[unsafe(method(lockFocusIfCanDrawInContext:))]
587 #[unsafe(method_family = none)]
588 pub unsafe fn lockFocusIfCanDrawInContext(&self, context: &NSGraphicsContext) -> bool;
589
590 #[unsafe(method(focusView))]
591 #[unsafe(method_family = none)]
592 pub unsafe fn focusView(mtm: MainThreadMarker) -> Option<Retained<NSView>>;
593
594 #[unsafe(method(visibleRect))]
600 #[unsafe(method_family = none)]
601 pub fn visibleRect(&self) -> NSRect;
602
603 #[unsafe(method(display))]
604 #[unsafe(method_family = none)]
605 pub unsafe fn display(&self);
606
607 #[unsafe(method(displayIfNeeded))]
608 #[unsafe(method_family = none)]
609 pub unsafe fn displayIfNeeded(&self);
610
611 #[unsafe(method(displayIfNeededIgnoringOpacity))]
612 #[unsafe(method_family = none)]
613 pub unsafe fn displayIfNeededIgnoringOpacity(&self);
614
615 #[unsafe(method(displayRect:))]
616 #[unsafe(method_family = none)]
617 pub unsafe fn displayRect(&self, rect: NSRect);
618
619 #[unsafe(method(displayIfNeededInRect:))]
620 #[unsafe(method_family = none)]
621 pub unsafe fn displayIfNeededInRect(&self, rect: NSRect);
622
623 #[unsafe(method(displayRectIgnoringOpacity:))]
624 #[unsafe(method_family = none)]
625 pub unsafe fn displayRectIgnoringOpacity(&self, rect: NSRect);
626
627 #[unsafe(method(displayIfNeededInRectIgnoringOpacity:))]
628 #[unsafe(method_family = none)]
629 pub unsafe fn displayIfNeededInRectIgnoringOpacity(&self, rect: NSRect);
630
631 #[unsafe(method(drawRect:))]
632 #[unsafe(method_family = none)]
633 pub unsafe fn drawRect(&self, dirty_rect: NSRect);
634
635 #[cfg(feature = "NSGraphicsContext")]
636 #[unsafe(method(displayRectIgnoringOpacity:inContext:))]
637 #[unsafe(method_family = none)]
638 pub unsafe fn displayRectIgnoringOpacity_inContext(
639 &self,
640 rect: NSRect,
641 context: &NSGraphicsContext,
642 );
643
644 #[cfg(all(feature = "NSBitmapImageRep", feature = "NSImageRep"))]
645 #[unsafe(method(bitmapImageRepForCachingDisplayInRect:))]
646 #[unsafe(method_family = none)]
647 pub unsafe fn bitmapImageRepForCachingDisplayInRect(
648 &self,
649 rect: NSRect,
650 ) -> Option<Retained<NSBitmapImageRep>>;
651
652 #[cfg(all(feature = "NSBitmapImageRep", feature = "NSImageRep"))]
653 #[unsafe(method(cacheDisplayInRect:toBitmapImageRep:))]
654 #[unsafe(method_family = none)]
655 pub unsafe fn cacheDisplayInRect_toBitmapImageRep(
656 &self,
657 rect: NSRect,
658 bitmap_image_rep: &NSBitmapImageRep,
659 );
660
661 #[unsafe(method(viewWillDraw))]
662 #[unsafe(method_family = none)]
663 pub unsafe fn viewWillDraw(&self);
664
665 #[unsafe(method(scrollPoint:))]
666 #[unsafe(method_family = none)]
667 pub unsafe fn scrollPoint(&self, point: NSPoint);
668
669 #[unsafe(method(scrollRectToVisible:))]
670 #[unsafe(method_family = none)]
671 pub unsafe fn scrollRectToVisible(&self, rect: NSRect) -> bool;
672
673 #[cfg(feature = "NSEvent")]
674 #[unsafe(method(autoscroll:))]
675 #[unsafe(method_family = none)]
676 pub unsafe fn autoscroll(&self, event: &NSEvent) -> bool;
677
678 #[unsafe(method(adjustScroll:))]
679 #[unsafe(method_family = none)]
680 pub unsafe fn adjustScroll(&self, new_visible: NSRect) -> NSRect;
681
682 #[deprecated = "Use NSScrollView to achieve scrolling views."]
683 #[unsafe(method(scrollRect:by:))]
684 #[unsafe(method_family = none)]
685 pub unsafe fn scrollRect_by(&self, rect: NSRect, delta: NSSize);
686
687 #[unsafe(method(translateRectsNeedingDisplayInRect:by:))]
688 #[unsafe(method_family = none)]
689 pub unsafe fn translateRectsNeedingDisplayInRect_by(
690 &self,
691 clip_rect: NSRect,
692 delta: NSSize,
693 );
694
695 #[unsafe(method(hitTest:))]
696 #[unsafe(method_family = none)]
697 pub unsafe fn hitTest(&self, point: NSPoint) -> Option<Retained<NSView>>;
698
699 #[unsafe(method(mouse:inRect:))]
700 #[unsafe(method_family = none)]
701 pub unsafe fn mouse_inRect(&self, point: NSPoint, rect: NSRect) -> bool;
702
703 #[unsafe(method(viewWithTag:))]
704 #[unsafe(method_family = none)]
705 pub unsafe fn viewWithTag(&self, tag: NSInteger) -> Option<Retained<NSView>>;
706
707 #[unsafe(method(tag))]
708 #[unsafe(method_family = none)]
709 pub unsafe fn tag(&self) -> NSInteger;
710
711 #[cfg(feature = "NSEvent")]
712 #[unsafe(method(performKeyEquivalent:))]
713 #[unsafe(method_family = none)]
714 pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool;
715
716 #[cfg(feature = "NSEvent")]
717 #[unsafe(method(acceptsFirstMouse:))]
718 #[unsafe(method_family = none)]
719 pub unsafe fn acceptsFirstMouse(&self, event: Option<&NSEvent>) -> bool;
720
721 #[cfg(feature = "NSEvent")]
722 #[unsafe(method(shouldDelayWindowOrderingForEvent:))]
723 #[unsafe(method_family = none)]
724 pub unsafe fn shouldDelayWindowOrderingForEvent(&self, event: &NSEvent) -> bool;
725
726 #[unsafe(method(needsPanelToBecomeKey))]
727 #[unsafe(method_family = none)]
728 pub unsafe fn needsPanelToBecomeKey(&self) -> bool;
729
730 #[unsafe(method(mouseDownCanMoveWindow))]
731 #[unsafe(method_family = none)]
732 pub unsafe fn mouseDownCanMoveWindow(&self) -> bool;
733
734 #[deprecated = "Use allowedTouchTypes instead"]
735 #[unsafe(method(acceptsTouchEvents))]
736 #[unsafe(method_family = none)]
737 pub unsafe fn acceptsTouchEvents(&self) -> bool;
738
739 #[deprecated = "Use allowedTouchTypes instead"]
741 #[unsafe(method(setAcceptsTouchEvents:))]
742 #[unsafe(method_family = none)]
743 pub unsafe fn setAcceptsTouchEvents(&self, accepts_touch_events: bool);
744
745 #[unsafe(method(wantsRestingTouches))]
746 #[unsafe(method_family = none)]
747 pub unsafe fn wantsRestingTouches(&self) -> bool;
748
749 #[unsafe(method(setWantsRestingTouches:))]
751 #[unsafe(method_family = none)]
752 pub unsafe fn setWantsRestingTouches(&self, wants_resting_touches: bool);
753
754 #[cfg(feature = "objc2-quartz-core")]
755 #[cfg(target_vendor = "apple")]
756 #[unsafe(method(makeBackingLayer))]
757 #[unsafe(method_family = none)]
758 pub unsafe fn makeBackingLayer(&self) -> Retained<CALayer>;
759
760 #[unsafe(method(layerContentsRedrawPolicy))]
761 #[unsafe(method_family = none)]
762 pub unsafe fn layerContentsRedrawPolicy(&self) -> NSViewLayerContentsRedrawPolicy;
763
764 #[unsafe(method(setLayerContentsRedrawPolicy:))]
766 #[unsafe(method_family = none)]
767 pub unsafe fn setLayerContentsRedrawPolicy(
768 &self,
769 layer_contents_redraw_policy: NSViewLayerContentsRedrawPolicy,
770 );
771
772 #[unsafe(method(layerContentsPlacement))]
773 #[unsafe(method_family = none)]
774 pub unsafe fn layerContentsPlacement(&self) -> NSViewLayerContentsPlacement;
775
776 #[unsafe(method(setLayerContentsPlacement:))]
778 #[unsafe(method_family = none)]
779 pub unsafe fn setLayerContentsPlacement(
780 &self,
781 layer_contents_placement: NSViewLayerContentsPlacement,
782 );
783
784 #[unsafe(method(wantsLayer))]
785 #[unsafe(method_family = none)]
786 pub unsafe fn wantsLayer(&self) -> bool;
787
788 #[unsafe(method(setWantsLayer:))]
790 #[unsafe(method_family = none)]
791 pub fn setWantsLayer(&self, wants_layer: bool);
792
793 #[cfg(feature = "objc2-quartz-core")]
794 #[cfg(target_vendor = "apple")]
795 #[unsafe(method(layer))]
796 #[unsafe(method_family = none)]
797 pub unsafe fn layer(&self) -> Option<Retained<CALayer>>;
798
799 #[cfg(feature = "objc2-quartz-core")]
800 #[cfg(target_vendor = "apple")]
801 #[unsafe(method(setLayer:))]
803 #[unsafe(method_family = none)]
804 pub unsafe fn setLayer(&self, layer: Option<&CALayer>);
805
806 #[unsafe(method(wantsUpdateLayer))]
807 #[unsafe(method_family = none)]
808 pub unsafe fn wantsUpdateLayer(&self) -> bool;
809
810 #[unsafe(method(updateLayer))]
811 #[unsafe(method_family = none)]
812 pub unsafe fn updateLayer(&self);
813
814 #[unsafe(method(canDrawSubviewsIntoLayer))]
815 #[unsafe(method_family = none)]
816 pub unsafe fn canDrawSubviewsIntoLayer(&self) -> bool;
817
818 #[unsafe(method(setCanDrawSubviewsIntoLayer:))]
820 #[unsafe(method_family = none)]
821 pub unsafe fn setCanDrawSubviewsIntoLayer(&self, can_draw_subviews_into_layer: bool);
822
823 #[unsafe(method(layoutSubtreeIfNeeded))]
824 #[unsafe(method_family = none)]
825 pub unsafe fn layoutSubtreeIfNeeded(&self);
826
827 #[unsafe(method(layout))]
828 #[unsafe(method_family = none)]
829 pub unsafe fn layout(&self);
830
831 #[unsafe(method(needsLayout))]
832 #[unsafe(method_family = none)]
833 pub unsafe fn needsLayout(&self) -> bool;
834
835 #[unsafe(method(setNeedsLayout:))]
837 #[unsafe(method_family = none)]
838 pub unsafe fn setNeedsLayout(&self, needs_layout: bool);
839
840 #[cfg(feature = "objc2-core-foundation")]
841 #[unsafe(method(alphaValue))]
842 #[unsafe(method_family = none)]
843 pub unsafe fn alphaValue(&self) -> CGFloat;
844
845 #[cfg(feature = "objc2-core-foundation")]
846 #[unsafe(method(setAlphaValue:))]
848 #[unsafe(method_family = none)]
849 pub unsafe fn setAlphaValue(&self, alpha_value: CGFloat);
850
851 #[unsafe(method(layerUsesCoreImageFilters))]
852 #[unsafe(method_family = none)]
853 pub unsafe fn layerUsesCoreImageFilters(&self) -> bool;
854
855 #[unsafe(method(setLayerUsesCoreImageFilters:))]
857 #[unsafe(method_family = none)]
858 pub unsafe fn setLayerUsesCoreImageFilters(&self, layer_uses_core_image_filters: bool);
859
860 #[cfg(feature = "objc2-core-image")]
861 #[cfg(target_vendor = "apple")]
862 #[unsafe(method(backgroundFilters))]
863 #[unsafe(method_family = none)]
864 pub unsafe fn backgroundFilters(&self) -> Retained<NSArray<CIFilter>>;
865
866 #[cfg(feature = "objc2-core-image")]
867 #[cfg(target_vendor = "apple")]
868 #[unsafe(method(setBackgroundFilters:))]
870 #[unsafe(method_family = none)]
871 pub unsafe fn setBackgroundFilters(&self, background_filters: &NSArray<CIFilter>);
872
873 #[cfg(feature = "objc2-core-image")]
874 #[cfg(target_vendor = "apple")]
875 #[unsafe(method(compositingFilter))]
876 #[unsafe(method_family = none)]
877 pub unsafe fn compositingFilter(&self) -> Option<Retained<CIFilter>>;
878
879 #[cfg(feature = "objc2-core-image")]
880 #[cfg(target_vendor = "apple")]
881 #[unsafe(method(setCompositingFilter:))]
883 #[unsafe(method_family = none)]
884 pub unsafe fn setCompositingFilter(&self, compositing_filter: Option<&CIFilter>);
885
886 #[cfg(feature = "objc2-core-image")]
887 #[cfg(target_vendor = "apple")]
888 #[unsafe(method(contentFilters))]
889 #[unsafe(method_family = none)]
890 pub unsafe fn contentFilters(&self) -> Retained<NSArray<CIFilter>>;
891
892 #[cfg(feature = "objc2-core-image")]
893 #[cfg(target_vendor = "apple")]
894 #[unsafe(method(setContentFilters:))]
896 #[unsafe(method_family = none)]
897 pub unsafe fn setContentFilters(&self, content_filters: &NSArray<CIFilter>);
898
899 #[cfg(feature = "NSShadow")]
900 #[unsafe(method(shadow))]
901 #[unsafe(method_family = none)]
902 pub unsafe fn shadow(&self) -> Option<Retained<NSShadow>>;
903
904 #[cfg(feature = "NSShadow")]
905 #[unsafe(method(setShadow:))]
907 #[unsafe(method_family = none)]
908 pub unsafe fn setShadow(&self, shadow: Option<&NSShadow>);
909
910 #[unsafe(method(clipsToBounds))]
911 #[unsafe(method_family = none)]
912 pub unsafe fn clipsToBounds(&self) -> bool;
913
914 #[unsafe(method(setClipsToBounds:))]
916 #[unsafe(method_family = none)]
917 pub unsafe fn setClipsToBounds(&self, clips_to_bounds: bool);
918
919 #[unsafe(method(postsBoundsChangedNotifications))]
920 #[unsafe(method_family = none)]
921 pub unsafe fn postsBoundsChangedNotifications(&self) -> bool;
922
923 #[unsafe(method(setPostsBoundsChangedNotifications:))]
925 #[unsafe(method_family = none)]
926 pub unsafe fn setPostsBoundsChangedNotifications(
927 &self,
928 posts_bounds_changed_notifications: bool,
929 );
930
931 #[cfg(feature = "NSScrollView")]
932 #[unsafe(method(enclosingScrollView))]
933 #[unsafe(method_family = none)]
934 pub unsafe fn enclosingScrollView(&self) -> Option<Retained<NSScrollView>>;
935
936 #[cfg(all(feature = "NSEvent", feature = "NSMenu"))]
937 #[unsafe(method(menuForEvent:))]
938 #[unsafe(method_family = none)]
939 pub unsafe fn menuForEvent(&self, event: &NSEvent) -> Option<Retained<NSMenu>>;
940
941 #[cfg(feature = "NSMenu")]
942 #[unsafe(method(defaultMenu))]
943 #[unsafe(method_family = none)]
944 pub unsafe fn defaultMenu(mtm: MainThreadMarker) -> Option<Retained<NSMenu>>;
945
946 #[cfg(all(feature = "NSEvent", feature = "NSMenu"))]
947 #[unsafe(method(willOpenMenu:withEvent:))]
954 #[unsafe(method_family = none)]
955 pub unsafe fn willOpenMenu_withEvent(&self, menu: &NSMenu, event: &NSEvent);
956
957 #[cfg(all(feature = "NSEvent", feature = "NSMenu"))]
958 #[unsafe(method(didCloseMenu:withEvent:))]
965 #[unsafe(method_family = none)]
966 pub unsafe fn didCloseMenu_withEvent(&self, menu: &NSMenu, event: Option<&NSEvent>);
967
968 #[unsafe(method(toolTip))]
969 #[unsafe(method_family = none)]
970 pub unsafe fn toolTip(&self) -> Option<Retained<NSString>>;
971
972 #[unsafe(method(setToolTip:))]
974 #[unsafe(method_family = none)]
975 pub unsafe fn setToolTip(&self, tool_tip: Option<&NSString>);
976
977 #[unsafe(method(addToolTipRect:owner:userData:))]
978 #[unsafe(method_family = none)]
979 pub unsafe fn addToolTipRect_owner_userData(
980 &self,
981 rect: NSRect,
982 owner: &AnyObject,
983 data: *mut c_void,
984 ) -> NSToolTipTag;
985
986 #[unsafe(method(removeToolTip:))]
987 #[unsafe(method_family = none)]
988 pub unsafe fn removeToolTip(&self, tag: NSToolTipTag);
989
990 #[unsafe(method(removeAllToolTips))]
991 #[unsafe(method_family = none)]
992 pub unsafe fn removeAllToolTips(&self);
993
994 #[unsafe(method(viewWillStartLiveResize))]
995 #[unsafe(method_family = none)]
996 pub unsafe fn viewWillStartLiveResize(&self);
997
998 #[unsafe(method(viewDidEndLiveResize))]
999 #[unsafe(method_family = none)]
1000 pub unsafe fn viewDidEndLiveResize(&self);
1001
1002 #[unsafe(method(inLiveResize))]
1003 #[unsafe(method_family = none)]
1004 pub unsafe fn inLiveResize(&self) -> bool;
1005
1006 #[unsafe(method(preservesContentDuringLiveResize))]
1007 #[unsafe(method_family = none)]
1008 pub unsafe fn preservesContentDuringLiveResize(&self) -> bool;
1009
1010 #[unsafe(method(rectPreservedDuringLiveResize))]
1011 #[unsafe(method_family = none)]
1012 pub unsafe fn rectPreservedDuringLiveResize(&self) -> NSRect;
1013
1014 #[cfg(feature = "NSTextInputContext")]
1015 #[unsafe(method(inputContext))]
1016 #[unsafe(method_family = none)]
1017 pub fn inputContext(&self) -> Option<Retained<NSTextInputContext>>;
1018
1019 #[unsafe(method(rectForSmartMagnificationAtPoint:inRect:))]
1020 #[unsafe(method_family = none)]
1021 pub unsafe fn rectForSmartMagnificationAtPoint_inRect(
1022 &self,
1023 location: NSPoint,
1024 visible_rect: NSRect,
1025 ) -> NSRect;
1026
1027 #[cfg(feature = "NSUserInterfaceLayout")]
1028 #[unsafe(method(userInterfaceLayoutDirection))]
1029 #[unsafe(method_family = none)]
1030 pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection;
1031
1032 #[cfg(feature = "NSUserInterfaceLayout")]
1033 #[unsafe(method(setUserInterfaceLayoutDirection:))]
1035 #[unsafe(method_family = none)]
1036 pub unsafe fn setUserInterfaceLayoutDirection(
1037 &self,
1038 user_interface_layout_direction: NSUserInterfaceLayoutDirection,
1039 );
1040
1041 #[unsafe(method(prepareForReuse))]
1042 #[unsafe(method_family = none)]
1043 pub unsafe fn prepareForReuse(&self);
1044
1045 #[unsafe(method(isCompatibleWithResponsiveScrolling))]
1046 #[unsafe(method_family = none)]
1047 pub unsafe fn isCompatibleWithResponsiveScrolling(mtm: MainThreadMarker) -> bool;
1048
1049 #[unsafe(method(prepareContentInRect:))]
1050 #[unsafe(method_family = none)]
1051 pub unsafe fn prepareContentInRect(&self, rect: NSRect);
1052
1053 #[unsafe(method(preparedContentRect))]
1054 #[unsafe(method_family = none)]
1055 pub unsafe fn preparedContentRect(&self) -> NSRect;
1056
1057 #[unsafe(method(setPreparedContentRect:))]
1059 #[unsafe(method_family = none)]
1060 pub unsafe fn setPreparedContentRect(&self, prepared_content_rect: NSRect);
1061
1062 #[unsafe(method(allowsVibrancy))]
1063 #[unsafe(method_family = none)]
1064 pub unsafe fn allowsVibrancy(&self) -> bool;
1065
1066 #[unsafe(method(viewDidChangeEffectiveAppearance))]
1068 #[unsafe(method_family = none)]
1069 pub unsafe fn viewDidChangeEffectiveAppearance(&self);
1070 );
1071}
1072
1073#[cfg(feature = "NSResponder")]
1075impl NSView {
1076 extern_methods!(
1077 #[unsafe(method(init))]
1078 #[unsafe(method_family = init)]
1079 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1080 );
1081}
1082
1083#[cfg(feature = "NSResponder")]
1085impl NSView {
1086 extern_methods!(
1087 #[unsafe(method(new))]
1088 #[unsafe(method_family = new)]
1089 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
1090 );
1091}
1092
1093extern_protocol!(
1094 pub unsafe trait NSViewLayerContentScaleDelegate: NSObjectProtocol {
1096 #[cfg(all(
1097 feature = "NSResponder",
1098 feature = "NSWindow",
1099 feature = "objc2-core-foundation",
1100 feature = "objc2-quartz-core"
1101 ))]
1102 #[cfg(target_vendor = "apple")]
1103 #[optional]
1104 #[unsafe(method(layer:shouldInheritContentsScale:fromWindow:))]
1105 #[unsafe(method_family = none)]
1106 unsafe fn layer_shouldInheritContentsScale_fromWindow(
1107 &self,
1108 layer: &CALayer,
1109 new_scale: CGFloat,
1110 window: &NSWindow,
1111 ) -> bool;
1112 }
1113);
1114
1115extern_protocol!(
1116 pub unsafe trait NSViewToolTipOwner: NSObjectProtocol + MainThreadOnly {
1118 #[cfg(feature = "NSResponder")]
1119 #[unsafe(method(view:stringForToolTip:point:userData:))]
1120 #[unsafe(method_family = none)]
1121 unsafe fn view_stringForToolTip_point_userData(
1122 &self,
1123 view: &NSView,
1124 tag: NSToolTipTag,
1125 point: NSPoint,
1126 data: *mut c_void,
1127 ) -> Retained<NSString>;
1128 }
1129);
1130
1131extern_protocol!(
1132 pub unsafe trait NSViewContentSelectionInfo: NSObjectProtocol {
1136 #[optional]
1137 #[unsafe(method(selectionAnchorRect))]
1138 #[unsafe(method_family = none)]
1139 unsafe fn selectionAnchorRect(&self) -> NSRect;
1140 }
1141);
1142
1143#[cfg(feature = "NSResponder")]
1145impl NSView {
1146 extern_methods!(
1147 #[unsafe(method(nextKeyView))]
1148 #[unsafe(method_family = none)]
1149 pub unsafe fn nextKeyView(&self) -> Option<Retained<NSView>>;
1150
1151 #[unsafe(method(setNextKeyView:))]
1153 #[unsafe(method_family = none)]
1154 pub unsafe fn setNextKeyView(&self, next_key_view: Option<&NSView>);
1155
1156 #[unsafe(method(previousKeyView))]
1157 #[unsafe(method_family = none)]
1158 pub unsafe fn previousKeyView(&self) -> Option<Retained<NSView>>;
1159
1160 #[unsafe(method(nextValidKeyView))]
1161 #[unsafe(method_family = none)]
1162 pub unsafe fn nextValidKeyView(&self) -> Option<Retained<NSView>>;
1163
1164 #[unsafe(method(previousValidKeyView))]
1165 #[unsafe(method_family = none)]
1166 pub unsafe fn previousValidKeyView(&self) -> Option<Retained<NSView>>;
1167
1168 #[unsafe(method(canBecomeKeyView))]
1169 #[unsafe(method_family = none)]
1170 pub unsafe fn canBecomeKeyView(&self) -> bool;
1171
1172 #[unsafe(method(setKeyboardFocusRingNeedsDisplayInRect:))]
1173 #[unsafe(method_family = none)]
1174 pub unsafe fn setKeyboardFocusRingNeedsDisplayInRect(&self, rect: NSRect);
1175
1176 #[cfg(feature = "NSGraphics")]
1177 #[unsafe(method(focusRingType))]
1178 #[unsafe(method_family = none)]
1179 pub unsafe fn focusRingType(&self) -> NSFocusRingType;
1180
1181 #[cfg(feature = "NSGraphics")]
1182 #[unsafe(method(setFocusRingType:))]
1184 #[unsafe(method_family = none)]
1185 pub unsafe fn setFocusRingType(&self, focus_ring_type: NSFocusRingType);
1186
1187 #[cfg(feature = "NSGraphics")]
1188 #[unsafe(method(defaultFocusRingType))]
1189 #[unsafe(method_family = none)]
1190 pub unsafe fn defaultFocusRingType(mtm: MainThreadMarker) -> NSFocusRingType;
1191
1192 #[unsafe(method(drawFocusRingMask))]
1193 #[unsafe(method_family = none)]
1194 pub unsafe fn drawFocusRingMask(&self);
1195
1196 #[unsafe(method(focusRingMaskBounds))]
1197 #[unsafe(method_family = none)]
1198 pub unsafe fn focusRingMaskBounds(&self) -> NSRect;
1199
1200 #[unsafe(method(noteFocusRingMaskChanged))]
1201 #[unsafe(method_family = none)]
1202 pub unsafe fn noteFocusRingMaskChanged(&self);
1203 );
1204}
1205
1206#[cfg(feature = "NSResponder")]
1208impl NSView {
1209 extern_methods!(
1210 #[cfg(feature = "NSPasteboard")]
1211 #[unsafe(method(writeEPSInsideRect:toPasteboard:))]
1212 #[unsafe(method_family = none)]
1213 pub unsafe fn writeEPSInsideRect_toPasteboard(
1214 &self,
1215 rect: NSRect,
1216 pasteboard: &NSPasteboard,
1217 );
1218
1219 #[unsafe(method(dataWithEPSInsideRect:))]
1220 #[unsafe(method_family = none)]
1221 pub unsafe fn dataWithEPSInsideRect(&self, rect: NSRect) -> Retained<NSData>;
1222
1223 #[cfg(feature = "NSPasteboard")]
1224 #[unsafe(method(writePDFInsideRect:toPasteboard:))]
1225 #[unsafe(method_family = none)]
1226 pub unsafe fn writePDFInsideRect_toPasteboard(
1227 &self,
1228 rect: NSRect,
1229 pasteboard: &NSPasteboard,
1230 );
1231
1232 #[unsafe(method(dataWithPDFInsideRect:))]
1233 #[unsafe(method_family = none)]
1234 pub unsafe fn dataWithPDFInsideRect(&self, rect: NSRect) -> Retained<NSData>;
1235
1236 #[unsafe(method(print:))]
1237 #[unsafe(method_family = none)]
1238 pub unsafe fn print(&self, sender: Option<&AnyObject>);
1239
1240 #[unsafe(method(knowsPageRange:))]
1241 #[unsafe(method_family = none)]
1242 pub unsafe fn knowsPageRange(&self, range: NSRangePointer) -> bool;
1243
1244 #[cfg(feature = "objc2-core-foundation")]
1245 #[unsafe(method(heightAdjustLimit))]
1246 #[unsafe(method_family = none)]
1247 pub unsafe fn heightAdjustLimit(&self) -> CGFloat;
1248
1249 #[cfg(feature = "objc2-core-foundation")]
1250 #[unsafe(method(widthAdjustLimit))]
1251 #[unsafe(method_family = none)]
1252 pub unsafe fn widthAdjustLimit(&self) -> CGFloat;
1253
1254 #[cfg(feature = "objc2-core-foundation")]
1255 #[unsafe(method(adjustPageWidthNew:left:right:limit:))]
1256 #[unsafe(method_family = none)]
1257 pub unsafe fn adjustPageWidthNew_left_right_limit(
1258 &self,
1259 new_right: NonNull<CGFloat>,
1260 old_left: CGFloat,
1261 old_right: CGFloat,
1262 right_limit: CGFloat,
1263 );
1264
1265 #[cfg(feature = "objc2-core-foundation")]
1266 #[unsafe(method(adjustPageHeightNew:top:bottom:limit:))]
1267 #[unsafe(method_family = none)]
1268 pub unsafe fn adjustPageHeightNew_top_bottom_limit(
1269 &self,
1270 new_bottom: NonNull<CGFloat>,
1271 old_top: CGFloat,
1272 old_bottom: CGFloat,
1273 bottom_limit: CGFloat,
1274 );
1275
1276 #[unsafe(method(rectForPage:))]
1277 #[unsafe(method_family = none)]
1278 pub unsafe fn rectForPage(&self, page: NSInteger) -> NSRect;
1279
1280 #[unsafe(method(locationOfPrintRect:))]
1281 #[unsafe(method_family = none)]
1282 pub unsafe fn locationOfPrintRect(&self, rect: NSRect) -> NSPoint;
1283
1284 #[unsafe(method(drawPageBorderWithSize:))]
1285 #[unsafe(method_family = none)]
1286 pub unsafe fn drawPageBorderWithSize(&self, border_size: NSSize);
1287
1288 #[unsafe(method(pageHeader))]
1289 #[unsafe(method_family = none)]
1290 pub unsafe fn pageHeader(&self) -> Retained<NSAttributedString>;
1291
1292 #[unsafe(method(pageFooter))]
1293 #[unsafe(method_family = none)]
1294 pub unsafe fn pageFooter(&self) -> Retained<NSAttributedString>;
1295
1296 #[deprecated = "This is never invoked and the NSView implementation does nothing"]
1298 #[unsafe(method(drawSheetBorderWithSize:))]
1299 #[unsafe(method_family = none)]
1300 pub unsafe fn drawSheetBorderWithSize(&self, border_size: NSSize);
1301
1302 #[unsafe(method(printJobTitle))]
1303 #[unsafe(method_family = none)]
1304 pub unsafe fn printJobTitle(&self) -> Retained<NSString>;
1305
1306 #[unsafe(method(beginDocument))]
1307 #[unsafe(method_family = none)]
1308 pub unsafe fn beginDocument(&self);
1309
1310 #[unsafe(method(endDocument))]
1311 #[unsafe(method_family = none)]
1312 pub unsafe fn endDocument(&self);
1313
1314 #[unsafe(method(beginPageInRect:atPlacement:))]
1315 #[unsafe(method_family = none)]
1316 pub unsafe fn beginPageInRect_atPlacement(&self, rect: NSRect, location: NSPoint);
1317
1318 #[unsafe(method(endPage))]
1319 #[unsafe(method_family = none)]
1320 pub unsafe fn endPage(&self);
1321 );
1322}
1323
1324#[cfg(feature = "NSResponder")]
1326impl NSView {
1327 extern_methods!(
1328 #[cfg(all(
1329 feature = "NSDragging",
1330 feature = "NSDraggingItem",
1331 feature = "NSDraggingSession",
1332 feature = "NSEvent"
1333 ))]
1334 #[unsafe(method(beginDraggingSessionWithItems:event:source:))]
1335 #[unsafe(method_family = none)]
1336 pub unsafe fn beginDraggingSessionWithItems_event_source(
1337 &self,
1338 items: &NSArray<NSDraggingItem>,
1339 event: &NSEvent,
1340 source: &ProtocolObject<dyn NSDraggingSource>,
1341 ) -> Retained<NSDraggingSession>;
1342
1343 #[cfg(feature = "NSPasteboard")]
1344 #[unsafe(method(registeredDraggedTypes))]
1345 #[unsafe(method_family = none)]
1346 pub unsafe fn registeredDraggedTypes(&self) -> Retained<NSArray<NSPasteboardType>>;
1347
1348 #[cfg(feature = "NSPasteboard")]
1349 #[unsafe(method(registerForDraggedTypes:))]
1350 #[unsafe(method_family = none)]
1351 pub unsafe fn registerForDraggedTypes(&self, new_types: &NSArray<NSPasteboardType>);
1352
1353 #[unsafe(method(unregisterDraggedTypes))]
1354 #[unsafe(method_family = none)]
1355 pub unsafe fn unregisterDraggedTypes(&self);
1356 );
1357}
1358
1359pub type NSViewFullScreenModeOptionKey = NSString;
1362
1363extern "C" {
1364 pub static NSFullScreenModeAllScreens: &'static NSViewFullScreenModeOptionKey;
1366}
1367
1368extern "C" {
1369 pub static NSFullScreenModeSetting: &'static NSViewFullScreenModeOptionKey;
1371}
1372
1373extern "C" {
1374 pub static NSFullScreenModeWindowLevel: &'static NSViewFullScreenModeOptionKey;
1376}
1377
1378extern "C" {
1379 pub static NSFullScreenModeApplicationPresentationOptions:
1381 &'static NSViewFullScreenModeOptionKey;
1382}
1383
1384#[cfg(feature = "NSResponder")]
1386impl NSView {
1387 extern_methods!(
1388 #[cfg(feature = "NSScreen")]
1389 #[unsafe(method(enterFullScreenMode:withOptions:))]
1390 #[unsafe(method_family = none)]
1391 pub unsafe fn enterFullScreenMode_withOptions(
1392 &self,
1393 screen: &NSScreen,
1394 options: Option<&NSDictionary<NSViewFullScreenModeOptionKey, AnyObject>>,
1395 ) -> bool;
1396
1397 #[unsafe(method(exitFullScreenModeWithOptions:))]
1398 #[unsafe(method_family = none)]
1399 pub unsafe fn exitFullScreenModeWithOptions(
1400 &self,
1401 options: Option<&NSDictionary<NSViewFullScreenModeOptionKey, AnyObject>>,
1402 );
1403
1404 #[unsafe(method(isInFullScreenMode))]
1405 #[unsafe(method_family = none)]
1406 pub unsafe fn isInFullScreenMode(&self) -> bool;
1407 );
1408}
1409
1410pub type NSDefinitionOptionKey = NSString;
1413
1414extern "C" {
1415 pub static NSDefinitionPresentationTypeKey: &'static NSDefinitionOptionKey;
1417}
1418
1419pub type NSDefinitionPresentationType = NSString;
1422
1423extern "C" {
1424 pub static NSDefinitionPresentationTypeOverlay: &'static NSDefinitionPresentationType;
1426}
1427
1428extern "C" {
1429 pub static NSDefinitionPresentationTypeDictionaryApplication:
1431 &'static NSDefinitionPresentationType;
1432}
1433
1434#[cfg(feature = "NSResponder")]
1436impl NSView {
1437 extern_methods!(
1438 #[unsafe(method(showDefinitionForAttributedString:atPoint:))]
1439 #[unsafe(method_family = none)]
1440 pub unsafe fn showDefinitionForAttributedString_atPoint(
1441 &self,
1442 attr_string: Option<&NSAttributedString>,
1443 text_baseline_origin: NSPoint,
1444 );
1445
1446 #[cfg(feature = "block2")]
1447 #[unsafe(method(showDefinitionForAttributedString:range:options:baselineOriginProvider:))]
1448 #[unsafe(method_family = none)]
1449 pub unsafe fn showDefinitionForAttributedString_range_options_baselineOriginProvider(
1450 &self,
1451 attr_string: Option<&NSAttributedString>,
1452 target_range: NSRange,
1453 options: Option<&NSDictionary<NSDefinitionOptionKey, AnyObject>>,
1454 origin_provider: Option<&block2::Block<dyn Fn(NSRange) -> NSPoint>>,
1455 );
1456 );
1457}
1458
1459#[cfg(feature = "NSResponder")]
1461impl NSView {
1462 extern_methods!(
1463 #[unsafe(method(isDrawingFindIndicator))]
1464 #[unsafe(method_family = none)]
1465 pub unsafe fn isDrawingFindIndicator(&self) -> bool;
1466 );
1467}
1468
1469#[cfg(feature = "NSResponder")]
1471impl NSView {
1472 extern_methods!(
1473 #[cfg(feature = "NSGestureRecognizer")]
1474 #[unsafe(method(gestureRecognizers))]
1475 #[unsafe(method_family = none)]
1476 pub unsafe fn gestureRecognizers(&self) -> Retained<NSArray<NSGestureRecognizer>>;
1477
1478 #[cfg(feature = "NSGestureRecognizer")]
1479 #[unsafe(method(setGestureRecognizers:))]
1481 #[unsafe(method_family = none)]
1482 pub unsafe fn setGestureRecognizers(
1483 &self,
1484 gesture_recognizers: &NSArray<NSGestureRecognizer>,
1485 );
1486
1487 #[cfg(feature = "NSGestureRecognizer")]
1488 #[unsafe(method(addGestureRecognizer:))]
1489 #[unsafe(method_family = none)]
1490 pub unsafe fn addGestureRecognizer(&self, gesture_recognizer: &NSGestureRecognizer);
1491
1492 #[cfg(feature = "NSGestureRecognizer")]
1493 #[unsafe(method(removeGestureRecognizer:))]
1494 #[unsafe(method_family = none)]
1495 pub unsafe fn removeGestureRecognizer(&self, gesture_recognizer: &NSGestureRecognizer);
1496 );
1497}
1498
1499#[cfg(feature = "NSResponder")]
1501impl NSView {
1502 extern_methods!(
1503 #[cfg(feature = "NSTouch")]
1504 #[unsafe(method(allowedTouchTypes))]
1505 #[unsafe(method_family = none)]
1506 pub unsafe fn allowedTouchTypes(&self) -> NSTouchTypeMask;
1507
1508 #[cfg(feature = "NSTouch")]
1509 #[unsafe(method(setAllowedTouchTypes:))]
1511 #[unsafe(method_family = none)]
1512 pub unsafe fn setAllowedTouchTypes(&self, allowed_touch_types: NSTouchTypeMask);
1513 );
1514}
1515
1516#[cfg(feature = "NSResponder")]
1518impl NSView {
1519 extern_methods!(
1520 #[unsafe(method(safeAreaInsets))]
1521 #[unsafe(method_family = none)]
1522 pub unsafe fn safeAreaInsets(&self) -> NSEdgeInsets;
1523
1524 #[unsafe(method(additionalSafeAreaInsets))]
1525 #[unsafe(method_family = none)]
1526 pub unsafe fn additionalSafeAreaInsets(&self) -> NSEdgeInsets;
1527
1528 #[unsafe(method(setAdditionalSafeAreaInsets:))]
1530 #[unsafe(method_family = none)]
1531 pub unsafe fn setAdditionalSafeAreaInsets(&self, additional_safe_area_insets: NSEdgeInsets);
1532
1533 #[cfg(feature = "NSLayoutGuide")]
1534 #[unsafe(method(safeAreaLayoutGuide))]
1535 #[unsafe(method_family = none)]
1536 pub unsafe fn safeAreaLayoutGuide(&self) -> Retained<NSLayoutGuide>;
1537
1538 #[unsafe(method(safeAreaRect))]
1539 #[unsafe(method_family = none)]
1540 pub unsafe fn safeAreaRect(&self) -> NSRect;
1541
1542 #[cfg(feature = "NSLayoutGuide")]
1543 #[unsafe(method(layoutMarginsGuide))]
1544 #[unsafe(method_family = none)]
1545 pub unsafe fn layoutMarginsGuide(&self) -> Retained<NSLayoutGuide>;
1546 );
1547}
1548
1549#[cfg(feature = "NSResponder")]
1551impl NSView {
1552 extern_methods!(
1553 #[cfg(feature = "NSTrackingArea")]
1554 #[unsafe(method(addTrackingArea:))]
1555 #[unsafe(method_family = none)]
1556 pub unsafe fn addTrackingArea(&self, tracking_area: &NSTrackingArea);
1557
1558 #[cfg(feature = "NSTrackingArea")]
1559 #[unsafe(method(removeTrackingArea:))]
1560 #[unsafe(method_family = none)]
1561 pub unsafe fn removeTrackingArea(&self, tracking_area: &NSTrackingArea);
1562
1563 #[cfg(feature = "NSTrackingArea")]
1564 #[unsafe(method(trackingAreas))]
1565 #[unsafe(method_family = none)]
1566 pub unsafe fn trackingAreas(&self) -> Retained<NSArray<NSTrackingArea>>;
1567
1568 #[unsafe(method(updateTrackingAreas))]
1569 #[unsafe(method_family = none)]
1570 pub unsafe fn updateTrackingAreas(&self);
1571
1572 #[cfg(feature = "NSCursor")]
1573 #[unsafe(method(addCursorRect:cursor:))]
1574 #[unsafe(method_family = none)]
1575 pub fn addCursorRect_cursor(&self, rect: NSRect, object: &NSCursor);
1576
1577 #[cfg(feature = "NSCursor")]
1578 #[unsafe(method(removeCursorRect:cursor:))]
1579 #[unsafe(method_family = none)]
1580 pub unsafe fn removeCursorRect_cursor(&self, rect: NSRect, object: &NSCursor);
1581
1582 #[unsafe(method(discardCursorRects))]
1583 #[unsafe(method_family = none)]
1584 pub unsafe fn discardCursorRects(&self);
1585
1586 #[unsafe(method(resetCursorRects))]
1587 #[unsafe(method_family = none)]
1588 pub unsafe fn resetCursorRects(&self);
1589
1590 #[unsafe(method(addTrackingRect:owner:userData:assumeInside:))]
1591 #[unsafe(method_family = none)]
1592 pub unsafe fn addTrackingRect_owner_userData_assumeInside(
1593 &self,
1594 rect: NSRect,
1595 owner: &AnyObject,
1596 data: *mut c_void,
1597 flag: bool,
1598 ) -> NSTrackingRectTag;
1599
1600 #[unsafe(method(removeTrackingRect:))]
1601 #[unsafe(method_family = none)]
1602 pub fn removeTrackingRect(&self, tag: NSTrackingRectTag);
1603 );
1604}
1605
1606#[cfg(feature = "NSResponder")]
1608impl NSView {
1609 extern_methods!(
1610 #[cfg(feature = "objc2-quartz-core")]
1611 #[cfg(target_vendor = "apple")]
1612 #[unsafe(method(displayLinkWithTarget:selector:))]
1613 #[unsafe(method_family = none)]
1614 pub unsafe fn displayLinkWithTarget_selector(
1615 &self,
1616 target: &AnyObject,
1617 selector: Sel,
1618 ) -> Retained<CADisplayLink>;
1619 );
1620}
1621
1622#[cfg(feature = "NSResponder")]
1624impl NSView {
1625 extern_methods!(
1626 #[cfg(all(feature = "NSEvent", feature = "NSImage", feature = "NSPasteboard"))]
1627 #[deprecated = "Use -beginDraggingSessionWithItems:event:source: instead"]
1628 #[unsafe(method(dragImage:at:offset:event:pasteboard:source:slideBack:))]
1629 #[unsafe(method_family = none)]
1630 pub unsafe fn dragImage_at_offset_event_pasteboard_source_slideBack(
1631 &self,
1632 image: &NSImage,
1633 view_location: NSPoint,
1634 initial_offset: NSSize,
1635 event: &NSEvent,
1636 pboard: &NSPasteboard,
1637 source_obj: &AnyObject,
1638 slide_flag: bool,
1639 );
1640
1641 #[cfg(feature = "NSEvent")]
1642 #[deprecated = "Use -beginDraggingSessionWithItems:event:source: instead"]
1643 #[unsafe(method(dragFile:fromRect:slideBack:event:))]
1644 #[unsafe(method_family = none)]
1645 pub unsafe fn dragFile_fromRect_slideBack_event(
1646 &self,
1647 filename: &NSString,
1648 rect: NSRect,
1649 flag: bool,
1650 event: &NSEvent,
1651 ) -> bool;
1652
1653 #[cfg(feature = "NSEvent")]
1654 #[deprecated = "Use -beginDraggingSessionWithItems:event:source: with an NSFilePromiseProvider instead"]
1655 #[unsafe(method(dragPromisedFilesOfTypes:fromRect:source:slideBack:event:))]
1656 #[unsafe(method_family = none)]
1657 pub unsafe fn dragPromisedFilesOfTypes_fromRect_source_slideBack_event(
1658 &self,
1659 type_array: &NSArray<NSString>,
1660 rect: NSRect,
1661 source_object: &AnyObject,
1662 flag: bool,
1663 event: &NSEvent,
1664 ) -> bool;
1665
1666 #[deprecated]
1667 #[unsafe(method(convertPointToBase:))]
1668 #[unsafe(method_family = none)]
1669 pub unsafe fn convertPointToBase(&self, point: NSPoint) -> NSPoint;
1670
1671 #[deprecated]
1672 #[unsafe(method(convertPointFromBase:))]
1673 #[unsafe(method_family = none)]
1674 pub unsafe fn convertPointFromBase(&self, point: NSPoint) -> NSPoint;
1675
1676 #[deprecated]
1677 #[unsafe(method(convertSizeToBase:))]
1678 #[unsafe(method_family = none)]
1679 pub unsafe fn convertSizeToBase(&self, size: NSSize) -> NSSize;
1680
1681 #[deprecated]
1682 #[unsafe(method(convertSizeFromBase:))]
1683 #[unsafe(method_family = none)]
1684 pub unsafe fn convertSizeFromBase(&self, size: NSSize) -> NSSize;
1685
1686 #[deprecated]
1687 #[unsafe(method(convertRectToBase:))]
1688 #[unsafe(method_family = none)]
1689 pub unsafe fn convertRectToBase(&self, rect: NSRect) -> NSRect;
1690
1691 #[deprecated]
1692 #[unsafe(method(convertRectFromBase:))]
1693 #[unsafe(method_family = none)]
1694 pub unsafe fn convertRectFromBase(&self, rect: NSRect) -> NSRect;
1695
1696 #[deprecated = "This has always returned NO and had no effect on macOS"]
1697 #[unsafe(method(performMnemonic:))]
1698 #[unsafe(method_family = none)]
1699 pub unsafe fn performMnemonic(&self, string: &NSString) -> bool;
1700
1701 #[deprecated = "This method no longer does anything"]
1702 #[unsafe(method(shouldDrawColor))]
1703 #[unsafe(method_family = none)]
1704 pub unsafe fn shouldDrawColor(&self) -> bool;
1705
1706 #[deprecated]
1707 #[unsafe(method(gState))]
1708 #[unsafe(method_family = none)]
1709 pub unsafe fn gState(&self) -> NSInteger;
1710
1711 #[deprecated]
1712 #[unsafe(method(allocateGState))]
1713 #[unsafe(method_family = none)]
1714 pub unsafe fn allocateGState(&self);
1715
1716 #[deprecated]
1717 #[unsafe(method(setUpGState))]
1718 #[unsafe(method_family = none)]
1719 pub unsafe fn setUpGState(&self);
1720
1721 #[deprecated]
1722 #[unsafe(method(renewGState))]
1723 #[unsafe(method_family = none)]
1724 pub unsafe fn renewGState(&self);
1725 );
1726}
1727
1728#[cfg(feature = "NSResponder")]
1730impl NSView {
1731 extern_methods!(
1732 #[cfg(feature = "NSWritingToolsCoordinator")]
1733 #[unsafe(method(writingToolsCoordinator))]
1734 #[unsafe(method_family = none)]
1735 pub unsafe fn writingToolsCoordinator(&self)
1736 -> Option<Retained<NSWritingToolsCoordinator>>;
1737
1738 #[cfg(feature = "NSWritingToolsCoordinator")]
1739 #[unsafe(method(setWritingToolsCoordinator:))]
1741 #[unsafe(method_family = none)]
1742 pub unsafe fn setWritingToolsCoordinator(
1743 &self,
1744 writing_tools_coordinator: Option<&NSWritingToolsCoordinator>,
1745 );
1746 );
1747}
1748
1749extern "C" {
1750 pub static NSViewFrameDidChangeNotification: &'static NSNotificationName;
1752}
1753
1754extern "C" {
1755 pub static NSViewFocusDidChangeNotification: &'static NSNotificationName;
1757}
1758
1759extern "C" {
1760 pub static NSViewBoundsDidChangeNotification: &'static NSNotificationName;
1762}
1763
1764extern "C" {
1765 pub static NSViewGlobalFrameDidChangeNotification: &'static NSNotificationName;
1767}
1768
1769extern "C" {
1770 pub static NSViewDidUpdateTrackingAreasNotification: &'static NSNotificationName;
1772}