#[repr(C)]pub struct NSVisualEffectViewTagged { /* private fields */ }
Expand description
A custom NSVisualEffectView subclass that overrides the tag method to provide a custom tag, to later identify the view
Implementations§
Source§impl NSVisualEffectViewTagged
impl NSVisualEffectViewTagged
Sourcepub unsafe fn initWithFrame(
this: Allocated<Self>,
frame_rect: NSRect,
tag: NSInteger,
) -> Retained<Self>
pub unsafe fn initWithFrame( this: Allocated<Self>, frame_rect: NSRect, tag: NSInteger, ) -> Retained<Self>
§Safety
This method is unsafe because it calls an Objective-C method.
Sourcepub unsafe fn setMaterial(&self, material: NSVisualEffectMaterial)
pub unsafe fn setMaterial(&self, material: NSVisualEffectMaterial)
https://developer.apple.com/documentation/appkit/nsvisualeffectview/material-swift.property
§Safety
This method is unsafe because it calls an Objective-C method.
Sourcepub unsafe fn setBlendingMode(&self, blending_mode: NSVisualEffectBlendingMode)
pub unsafe fn setBlendingMode(&self, blending_mode: NSVisualEffectBlendingMode)
https://developer.apple.com/documentation/appkit/nsvisualeffectview/blendingmode-swift.property
§Safety
This method is unsafe because it calls an Objective-C method.
Sourcepub unsafe fn setState(&self, state: NSVisualEffectState)
pub unsafe fn setState(&self, state: NSVisualEffectState)
https://developer.apple.com/documentation/appkit/nsvisualeffectview/state-swift.property
§Safety
This method is unsafe because it calls an Objective-C method.
Sourcepub unsafe fn setAutoresizingMask(&self, mask: NSAutoresizingMaskOptions)
pub unsafe fn setAutoresizingMask(&self, mask: NSAutoresizingMaskOptions)
NSView inherited method https://developer.apple.com/documentation/appkit/nsview/autoresizingmask-swift.property
§Safety
This method is unsafe because it calls an Objective-C method.
Sourcepub unsafe fn setCornerRadius(&self, radius: CGFloat)
pub unsafe fn setCornerRadius(&self, radius: CGFloat)
TODO: Does not seem to be public? Method is not listed in Apple documentation, might be private, but it works
§Safety
This method is unsafe because it calls an Objective-C method.
Methods from Deref<Target = NSVisualEffectView>§
pub unsafe fn material(&self) -> NSVisualEffectMaterial
pub unsafe fn setMaterial(&self, material: NSVisualEffectMaterial)
pub unsafe fn blendingMode(&self) -> NSVisualEffectBlendingMode
pub unsafe fn setBlendingMode(&self, blending_mode: NSVisualEffectBlendingMode)
pub unsafe fn state(&self) -> NSVisualEffectState
pub unsafe fn setState(&self, state: NSVisualEffectState)
pub unsafe fn isEmphasized(&self) -> bool
pub unsafe fn setEmphasized(&self, emphasized: bool)
pub unsafe fn viewDidMoveToWindow(&self)
Methods from Deref<Target = NSView>§
pub unsafe fn superview(&self) -> Option<Retained<NSView>>
pub unsafe fn subviews(&self) -> Retained<NSArray<NSView>>
pub unsafe fn setSubviews(&self, subviews: &NSArray<NSView>)
pub unsafe fn isDescendantOf(&self, view: &NSView) -> bool
pub unsafe fn opaqueAncestor(&self) -> Option<Retained<NSView>>
pub unsafe fn isHidden(&self) -> bool
pub fn setHidden(&self, hidden: bool)
pub unsafe fn isHiddenOrHasHiddenAncestor(&self) -> bool
pub unsafe fn getRectsBeingDrawn_count( &self, rects: *mut *mut CGRect, count: *mut isize, )
pub unsafe fn needsToDrawRect(&self, rect: CGRect) -> bool
pub unsafe fn wantsDefaultClipping(&self) -> bool
pub unsafe fn viewDidHide(&self)
pub unsafe fn viewDidUnhide(&self)
pub unsafe fn addSubview(&self, view: &NSView)
pub unsafe fn addSubview_positioned_relativeTo( &self, view: &NSView, place: NSWindowOrderingMode, other_view: Option<&NSView>, )
pub unsafe fn sortSubviewsUsingFunction_context( &self, compare: unsafe extern "C" fn(_: NonNull<NSView>, _: NonNull<NSView>, _: *mut c_void) -> NSComparisonResult, context: *mut c_void, )
pub unsafe fn viewDidMoveToWindow(&self)
pub unsafe fn viewWillMoveToSuperview(&self, new_superview: Option<&NSView>)
pub unsafe fn viewDidMoveToSuperview(&self)
pub unsafe fn didAddSubview(&self, subview: &NSView)
pub unsafe fn willRemoveSubview(&self, subview: &NSView)
pub unsafe fn removeFromSuperview(&self)
pub unsafe fn replaceSubview_with(&self, old_view: &NSView, new_view: &NSView)
pub unsafe fn removeFromSuperviewWithoutNeedingDisplay(&self)
pub unsafe fn viewDidChangeBackingProperties(&self)
pub unsafe fn postsFrameChangedNotifications(&self) -> bool
pub fn setPostsFrameChangedNotifications( &self, posts_frame_changed_notifications: bool, )
pub unsafe fn resizeSubviewsWithOldSize(&self, old_size: CGSize)
pub unsafe fn resizeWithOldSuperviewSize(&self, old_size: CGSize)
pub unsafe fn autoresizesSubviews(&self) -> bool
pub unsafe fn setAutoresizesSubviews(&self, autoresizes_subviews: bool)
pub unsafe fn autoresizingMask(&self) -> NSAutoresizingMaskOptions
pub unsafe fn setAutoresizingMask( &self, autoresizing_mask: NSAutoresizingMaskOptions, )
pub unsafe fn setFrameOrigin(&self, new_origin: CGPoint)
pub unsafe fn setFrameSize(&self, new_size: CGSize)
pub fn frame(&self) -> CGRect
pub unsafe fn setFrame(&self, frame: CGRect)
pub unsafe fn frameRotation(&self) -> f64
pub unsafe fn setFrameRotation(&self, frame_rotation: f64)
pub unsafe fn frameCenterRotation(&self) -> f64
pub unsafe fn setFrameCenterRotation(&self, frame_center_rotation: f64)
pub unsafe fn setBoundsOrigin(&self, new_origin: CGPoint)
pub unsafe fn setBoundsSize(&self, new_size: CGSize)
pub unsafe fn boundsRotation(&self) -> f64
pub unsafe fn setBoundsRotation(&self, bounds_rotation: f64)
pub unsafe fn translateOriginToPoint(&self, translation: CGPoint)
pub unsafe fn scaleUnitSquareToSize(&self, new_unit_size: CGSize)
pub unsafe fn rotateByAngle(&self, angle: f64)
pub fn bounds(&self) -> CGRect
pub unsafe fn setBounds(&self, bounds: CGRect)
pub fn isFlipped(&self) -> bool
pub unsafe fn isRotatedFromBase(&self) -> bool
pub unsafe fn isRotatedOrScaledFromBase(&self) -> bool
pub unsafe fn isOpaque(&self) -> bool
pub fn convertPoint_fromView( &self, point: CGPoint, view: Option<&NSView>, ) -> CGPoint
pub unsafe fn convertPoint_toView( &self, point: CGPoint, view: Option<&NSView>, ) -> CGPoint
pub unsafe fn convertSize_fromView( &self, size: CGSize, view: Option<&NSView>, ) -> CGSize
pub unsafe fn convertSize_toView( &self, size: CGSize, view: Option<&NSView>, ) -> CGSize
pub unsafe fn convertRect_fromView( &self, rect: CGRect, view: Option<&NSView>, ) -> CGRect
pub fn convertRect_toView(&self, rect: CGRect, view: Option<&NSView>) -> CGRect
pub unsafe fn backingAlignedRect_options( &self, rect: CGRect, options: NSAlignmentOptions, ) -> CGRect
pub unsafe fn centerScanRect(&self, rect: CGRect) -> CGRect
pub unsafe fn convertPointToBacking(&self, point: CGPoint) -> CGPoint
pub unsafe fn convertPointFromBacking(&self, point: CGPoint) -> CGPoint
pub unsafe fn convertSizeToBacking(&self, size: CGSize) -> CGSize
pub unsafe fn convertSizeFromBacking(&self, size: CGSize) -> CGSize
pub unsafe fn convertRectToBacking(&self, rect: CGRect) -> CGRect
pub unsafe fn convertRectFromBacking(&self, rect: CGRect) -> CGRect
pub unsafe fn convertPointToLayer(&self, point: CGPoint) -> CGPoint
pub unsafe fn convertPointFromLayer(&self, point: CGPoint) -> CGPoint
pub unsafe fn convertSizeToLayer(&self, size: CGSize) -> CGSize
pub unsafe fn convertSizeFromLayer(&self, size: CGSize) -> CGSize
pub unsafe fn convertRectToLayer(&self, rect: CGRect) -> CGRect
pub unsafe fn convertRectFromLayer(&self, rect: CGRect) -> CGRect
pub unsafe fn canDrawConcurrently(&self) -> bool
pub unsafe fn setCanDrawConcurrently(&self, can_draw_concurrently: bool)
pub unsafe fn canDraw(&self) -> bool
pub unsafe fn setNeedsDisplayInRect(&self, invalid_rect: CGRect)
pub unsafe fn needsDisplay(&self) -> bool
pub unsafe fn setNeedsDisplay(&self, needs_display: bool)
pub unsafe fn lockFocus(&self)
pub unsafe fn unlockFocus(&self)
pub unsafe fn lockFocusIfCanDraw(&self) -> bool
pub fn visibleRect(&self) -> CGRect
pub unsafe fn display(&self)
pub unsafe fn displayIfNeeded(&self)
pub unsafe fn displayIfNeededIgnoringOpacity(&self)
pub unsafe fn displayRect(&self, rect: CGRect)
pub unsafe fn displayIfNeededInRect(&self, rect: CGRect)
pub unsafe fn displayRectIgnoringOpacity(&self, rect: CGRect)
pub unsafe fn displayIfNeededInRectIgnoringOpacity(&self, rect: CGRect)
pub unsafe fn drawRect(&self, dirty_rect: CGRect)
pub unsafe fn viewWillDraw(&self)
pub unsafe fn scrollPoint(&self, point: CGPoint)
pub unsafe fn scrollRectToVisible(&self, rect: CGRect) -> bool
pub unsafe fn adjustScroll(&self, new_visible: CGRect) -> CGRect
pub unsafe fn scrollRect_by(&self, rect: CGRect, delta: CGSize)
pub unsafe fn translateRectsNeedingDisplayInRect_by( &self, clip_rect: CGRect, delta: CGSize, )
pub unsafe fn hitTest(&self, point: CGPoint) -> Option<Retained<NSView>>
pub unsafe fn mouse_inRect(&self, point: CGPoint, rect: CGRect) -> bool
pub unsafe fn viewWithTag(&self, tag: isize) -> Option<Retained<NSView>>
pub unsafe fn tag(&self) -> isize
pub unsafe fn needsPanelToBecomeKey(&self) -> bool
pub unsafe fn mouseDownCanMoveWindow(&self) -> bool
pub unsafe fn acceptsTouchEvents(&self) -> bool
pub unsafe fn setAcceptsTouchEvents(&self, accepts_touch_events: bool)
pub unsafe fn wantsRestingTouches(&self) -> bool
pub unsafe fn setWantsRestingTouches(&self, wants_resting_touches: bool)
pub unsafe fn layerContentsRedrawPolicy( &self, ) -> NSViewLayerContentsRedrawPolicy
pub unsafe fn setLayerContentsRedrawPolicy( &self, layer_contents_redraw_policy: NSViewLayerContentsRedrawPolicy, )
pub unsafe fn layerContentsPlacement(&self) -> NSViewLayerContentsPlacement
pub unsafe fn setLayerContentsPlacement( &self, layer_contents_placement: NSViewLayerContentsPlacement, )
pub unsafe fn wantsLayer(&self) -> bool
pub fn setWantsLayer(&self, wants_layer: bool)
pub unsafe fn wantsUpdateLayer(&self) -> bool
pub unsafe fn updateLayer(&self)
pub unsafe fn canDrawSubviewsIntoLayer(&self) -> bool
pub unsafe fn setCanDrawSubviewsIntoLayer( &self, can_draw_subviews_into_layer: bool, )
pub unsafe fn layoutSubtreeIfNeeded(&self)
pub unsafe fn layout(&self)
pub unsafe fn needsLayout(&self) -> bool
pub unsafe fn setNeedsLayout(&self, needs_layout: bool)
pub unsafe fn alphaValue(&self) -> f64
pub unsafe fn setAlphaValue(&self, alpha_value: f64)
pub unsafe fn layerUsesCoreImageFilters(&self) -> bool
pub unsafe fn setLayerUsesCoreImageFilters( &self, layer_uses_core_image_filters: bool, )
pub unsafe fn clipsToBounds(&self) -> bool
pub unsafe fn setClipsToBounds(&self, clips_to_bounds: bool)
pub unsafe fn postsBoundsChangedNotifications(&self) -> bool
pub unsafe fn setPostsBoundsChangedNotifications( &self, posts_bounds_changed_notifications: bool, )
pub unsafe fn toolTip(&self) -> Option<Retained<NSString>>
pub unsafe fn setToolTip(&self, tool_tip: Option<&NSString>)
pub unsafe fn addToolTipRect_owner_userData( &self, rect: CGRect, owner: &AnyObject, data: *mut c_void, ) -> isize
pub unsafe fn removeToolTip(&self, tag: isize)
pub unsafe fn removeAllToolTips(&self)
pub unsafe fn viewWillStartLiveResize(&self)
pub unsafe fn viewDidEndLiveResize(&self)
pub unsafe fn inLiveResize(&self) -> bool
pub unsafe fn preservesContentDuringLiveResize(&self) -> bool
pub unsafe fn rectPreservedDuringLiveResize(&self) -> CGRect
pub unsafe fn rectForSmartMagnificationAtPoint_inRect( &self, location: CGPoint, visible_rect: CGRect, ) -> CGRect
pub unsafe fn prepareForReuse(&self)
pub unsafe fn prepareContentInRect(&self, rect: CGRect)
pub unsafe fn preparedContentRect(&self) -> CGRect
pub unsafe fn setPreparedContentRect(&self, prepared_content_rect: CGRect)
pub unsafe fn allowsVibrancy(&self) -> bool
pub unsafe fn viewDidChangeEffectiveAppearance(&self)
pub unsafe fn nextKeyView(&self) -> Option<Retained<NSView>>
pub unsafe fn setNextKeyView(&self, next_key_view: Option<&NSView>)
pub unsafe fn previousKeyView(&self) -> Option<Retained<NSView>>
pub unsafe fn nextValidKeyView(&self) -> Option<Retained<NSView>>
pub unsafe fn previousValidKeyView(&self) -> Option<Retained<NSView>>
pub unsafe fn canBecomeKeyView(&self) -> bool
pub unsafe fn setKeyboardFocusRingNeedsDisplayInRect(&self, rect: CGRect)
pub unsafe fn focusRingType(&self) -> NSFocusRingType
pub unsafe fn setFocusRingType(&self, focus_ring_type: NSFocusRingType)
pub unsafe fn drawFocusRingMask(&self)
pub unsafe fn focusRingMaskBounds(&self) -> CGRect
pub unsafe fn noteFocusRingMaskChanged(&self)
pub unsafe fn dataWithEPSInsideRect(&self, rect: CGRect) -> Retained<NSData>
pub unsafe fn dataWithPDFInsideRect(&self, rect: CGRect) -> Retained<NSData>
pub unsafe fn print(&self, sender: Option<&AnyObject>)
pub unsafe fn knowsPageRange(&self, range: *mut NSRange) -> bool
pub unsafe fn heightAdjustLimit(&self) -> f64
pub unsafe fn widthAdjustLimit(&self) -> f64
pub unsafe fn adjustPageWidthNew_left_right_limit( &self, new_right: NonNull<f64>, old_left: f64, old_right: f64, right_limit: f64, )
pub unsafe fn adjustPageHeightNew_top_bottom_limit( &self, new_bottom: NonNull<f64>, old_top: f64, old_bottom: f64, bottom_limit: f64, )
pub unsafe fn rectForPage(&self, page: isize) -> CGRect
pub unsafe fn locationOfPrintRect(&self, rect: CGRect) -> CGPoint
pub unsafe fn drawPageBorderWithSize(&self, border_size: CGSize)
pub unsafe fn pageHeader(&self) -> Retained<NSAttributedString>
pub unsafe fn drawSheetBorderWithSize(&self, border_size: CGSize)
pub unsafe fn printJobTitle(&self) -> Retained<NSString>
pub unsafe fn beginDocument(&self)
pub unsafe fn endDocument(&self)
pub unsafe fn beginPageInRect_atPlacement( &self, rect: CGRect, location: CGPoint, )
pub unsafe fn endPage(&self)
pub unsafe fn unregisterDraggedTypes(&self)
pub unsafe fn exitFullScreenModeWithOptions( &self, options: Option<&NSDictionary<NSString>>, )
pub unsafe fn isInFullScreenMode(&self) -> bool
pub unsafe fn showDefinitionForAttributedString_atPoint( &self, attr_string: Option<&NSAttributedString>, text_baseline_origin: CGPoint, )
pub unsafe fn isDrawingFindIndicator(&self) -> bool
pub unsafe fn safeAreaInsets(&self) -> NSEdgeInsets
pub unsafe fn additionalSafeAreaInsets(&self) -> NSEdgeInsets
pub unsafe fn setAdditionalSafeAreaInsets( &self, additional_safe_area_insets: NSEdgeInsets, )
pub unsafe fn safeAreaRect(&self) -> CGRect
pub unsafe fn updateTrackingAreas(&self)
pub unsafe fn discardCursorRects(&self)
pub unsafe fn resetCursorRects(&self)
pub unsafe fn addTrackingRect_owner_userData_assumeInside( &self, rect: CGRect, owner: &AnyObject, data: *mut c_void, flag: bool, ) -> isize
pub fn removeTrackingRect(&self, tag: isize)
pub unsafe fn convertPointToBase(&self, point: CGPoint) -> CGPoint
pub unsafe fn convertPointFromBase(&self, point: CGPoint) -> CGPoint
pub unsafe fn convertSizeToBase(&self, size: CGSize) -> CGSize
pub unsafe fn convertSizeFromBase(&self, size: CGSize) -> CGSize
pub unsafe fn convertRectToBase(&self, rect: CGRect) -> CGRect
pub unsafe fn convertRectFromBase(&self, rect: CGRect) -> CGRect
pub unsafe fn performMnemonic(&self, string: &NSString) -> bool
pub unsafe fn shouldDrawColor(&self) -> bool
pub unsafe fn gState(&self) -> isize
pub unsafe fn allocateGState(&self)
pub unsafe fn setUpGState(&self)
pub unsafe fn renewGState(&self)
Methods from Deref<Target = NSResponder>§
pub unsafe fn nextResponder(&self) -> Option<Retained<NSResponder>>
pub unsafe fn setNextResponder(&self, next_responder: Option<&NSResponder>)
pub unsafe fn tryToPerform_with( &self, action: Sel, object: Option<&AnyObject>, ) -> bool
pub unsafe fn noResponderFor(&self, event_selector: Sel)
pub unsafe fn acceptsFirstResponder(&self) -> bool
pub unsafe fn becomeFirstResponder(&self) -> bool
pub unsafe fn resignFirstResponder(&self) -> bool
pub unsafe fn flushBufferedKeyEvents(&self)
pub unsafe fn showContextHelp(&self, sender: Option<&AnyObject>)
pub unsafe fn supplementalTargetForAction_sender( &self, action: Sel, sender: Option<&AnyObject>, ) -> Option<Retained<AnyObject>>
pub unsafe fn undoManager(&self) -> Option<Retained<NSUndoManager>>
pub unsafe fn presentError(&self, error: &NSError) -> bool
pub unsafe fn willPresentError(&self, error: &NSError) -> Retained<NSError>
pub unsafe fn performTextFinderAction(&self, sender: Option<&AnyObject>)
pub unsafe fn newWindowForTab(&self, sender: Option<&AnyObject>)
pub unsafe fn performMnemonic(&self, string: &NSString) -> bool
Methods from Deref<Target = NSObject>§
Sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
Sourcepub fn class(&self) -> &'static AnyClass
pub fn class(&self) -> &'static AnyClass
Dynamically find the class of this object.
§Example
Check that an instance of NSObject
has the precise class NSObject
.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());
Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load
instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.Use Ivar::load
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
Sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut
instead.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut
instead.Use Ivar::load_mut
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.