objc2_quartz/generated/ImageKit/
IKImageView.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_app_kit::*;
7#[cfg(feature = "objc2-core-foundation")]
8use objc2_core_foundation::*;
9#[cfg(feature = "objc2-core-graphics")]
10use objc2_core_graphics::*;
11#[cfg(feature = "objc2-core-image")]
12use objc2_core_image::*;
13use objc2_foundation::*;
14#[cfg(feature = "objc2-quartz-core")]
15use objc2_quartz_core::*;
16
17use crate::*;
18
19extern "C" {
20 pub static IKToolModeNone: Option<&'static NSString>;
22}
23
24extern "C" {
25 pub static IKToolModeMove: Option<&'static NSString>;
27}
28
29extern "C" {
30 pub static IKToolModeSelect: Option<&'static NSString>;
32}
33
34extern "C" {
35 pub static IKToolModeSelectRect: Option<&'static NSString>;
37}
38
39extern "C" {
40 pub static IKToolModeSelectEllipse: Option<&'static NSString>;
42}
43
44extern "C" {
45 pub static IKToolModeSelectLasso: Option<&'static NSString>;
47}
48
49extern "C" {
50 pub static IKToolModeCrop: Option<&'static NSString>;
52}
53
54extern "C" {
55 pub static IKToolModeRotate: Option<&'static NSString>;
57}
58
59extern "C" {
60 pub static IKToolModeAnnotate: Option<&'static NSString>;
62}
63
64extern "C" {
65 pub static IKOverlayTypeBackground: Option<&'static NSString>;
67}
68
69extern "C" {
70 pub static IKOverlayTypeImage: Option<&'static NSString>;
72}
73
74extern_class!(
75 #[unsafe(super(NSView, NSResponder, NSObject))]
79 #[derive(Debug, PartialEq, Eq, Hash)]
80 pub struct IKImageView;
81);
82
83extern_conformance!(
84 unsafe impl NSAccessibility for IKImageView {}
85);
86
87extern_conformance!(
88 unsafe impl NSAccessibilityElementProtocol for IKImageView {}
89);
90
91extern_conformance!(
92 unsafe impl NSAnimatablePropertyContainer for IKImageView {}
93);
94
95extern_conformance!(
96 unsafe impl NSAppearanceCustomization for IKImageView {}
97);
98
99extern_conformance!(
100 unsafe impl NSCoding for IKImageView {}
101);
102
103extern_conformance!(
104 unsafe impl NSDraggingDestination for IKImageView {}
105);
106
107extern_conformance!(
108 unsafe impl NSObjectProtocol for IKImageView {}
109);
110
111extern_conformance!(
112 unsafe impl NSUserInterfaceItemIdentification for IKImageView {}
113);
114
115impl IKImageView {
116 extern_methods!(
117 #[unsafe(method(delegate))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn delegate(&self) -> Option<Retained<AnyObject>>;
125
126 #[unsafe(method(setDelegate:))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn setDelegate(&self, delegate: Option<&AnyObject>);
136
137 #[cfg(feature = "objc2-core-foundation")]
138 #[unsafe(method(zoomFactor))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn zoomFactor(&self) -> CGFloat;
142
143 #[cfg(feature = "objc2-core-foundation")]
144 #[unsafe(method(setZoomFactor:))]
146 #[unsafe(method_family = none)]
147 pub unsafe fn setZoomFactor(&self, zoom_factor: CGFloat);
148
149 #[cfg(feature = "objc2-core-foundation")]
150 #[unsafe(method(rotationAngle))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn rotationAngle(&self) -> CGFloat;
154
155 #[cfg(feature = "objc2-core-foundation")]
156 #[unsafe(method(setRotationAngle:))]
158 #[unsafe(method_family = none)]
159 pub unsafe fn setRotationAngle(&self, rotation_angle: CGFloat);
160
161 #[unsafe(method(currentToolMode))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn currentToolMode(&self) -> Retained<NSString>;
165
166 #[unsafe(method(setCurrentToolMode:))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn setCurrentToolMode(&self, current_tool_mode: Option<&NSString>);
172
173 #[unsafe(method(autoresizes))]
175 #[unsafe(method_family = none)]
176 pub unsafe fn autoresizes(&self) -> bool;
177
178 #[unsafe(method(setAutoresizes:))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn setAutoresizes(&self, autoresizes: bool);
182
183 #[unsafe(method(hasHorizontalScroller))]
185 #[unsafe(method_family = none)]
186 pub unsafe fn hasHorizontalScroller(&self) -> bool;
187
188 #[unsafe(method(setHasHorizontalScroller:))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn setHasHorizontalScroller(&self, has_horizontal_scroller: bool);
192
193 #[unsafe(method(hasVerticalScroller))]
195 #[unsafe(method_family = none)]
196 pub unsafe fn hasVerticalScroller(&self) -> bool;
197
198 #[unsafe(method(setHasVerticalScroller:))]
200 #[unsafe(method_family = none)]
201 pub unsafe fn setHasVerticalScroller(&self, has_vertical_scroller: bool);
202
203 #[unsafe(method(autohidesScrollers))]
205 #[unsafe(method_family = none)]
206 pub unsafe fn autohidesScrollers(&self) -> bool;
207
208 #[unsafe(method(setAutohidesScrollers:))]
210 #[unsafe(method_family = none)]
211 pub unsafe fn setAutohidesScrollers(&self, autohides_scrollers: bool);
212
213 #[unsafe(method(supportsDragAndDrop))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn supportsDragAndDrop(&self) -> bool;
217
218 #[unsafe(method(setSupportsDragAndDrop:))]
220 #[unsafe(method_family = none)]
221 pub unsafe fn setSupportsDragAndDrop(&self, supports_drag_and_drop: bool);
222
223 #[unsafe(method(editable))]
225 #[unsafe(method_family = none)]
226 pub unsafe fn editable(&self) -> bool;
227
228 #[unsafe(method(setEditable:))]
230 #[unsafe(method_family = none)]
231 pub unsafe fn setEditable(&self, editable: bool);
232
233 #[unsafe(method(doubleClickOpensImageEditPanel))]
235 #[unsafe(method_family = none)]
236 pub unsafe fn doubleClickOpensImageEditPanel(&self) -> bool;
237
238 #[unsafe(method(setDoubleClickOpensImageEditPanel:))]
240 #[unsafe(method_family = none)]
241 pub unsafe fn setDoubleClickOpensImageEditPanel(
242 &self,
243 double_click_opens_image_edit_panel: bool,
244 );
245
246 #[cfg(feature = "objc2-core-image")]
247 #[unsafe(method(imageCorrection))]
253 #[unsafe(method_family = none)]
254 pub unsafe fn imageCorrection(&self) -> Option<Retained<CIFilter>>;
255
256 #[cfg(feature = "objc2-core-image")]
257 #[unsafe(method(setImageCorrection:))]
264 #[unsafe(method_family = none)]
265 pub unsafe fn setImageCorrection(&self, image_correction: Option<&CIFilter>);
266
267 #[unsafe(method(backgroundColor))]
273 #[unsafe(method_family = none)]
274 pub unsafe fn backgroundColor(&self) -> Option<Retained<NSColor>>;
275
276 #[unsafe(method(setBackgroundColor:))]
283 #[unsafe(method_family = none)]
284 pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>);
285
286 #[cfg(feature = "objc2-core-graphics")]
287 #[unsafe(method(setImage:imageProperties:))]
297 #[unsafe(method_family = none)]
298 pub unsafe fn setImage_imageProperties(
299 &self,
300 image: Option<&CGImage>,
301 meta_data: Option<&NSDictionary>,
302 );
303
304 #[unsafe(method(setImageWithURL:))]
310 #[unsafe(method_family = none)]
311 pub unsafe fn setImageWithURL(&self, url: Option<&NSURL>);
312
313 #[cfg(feature = "objc2-core-graphics")]
314 #[unsafe(method(image))]
316 #[unsafe(method_family = none)]
317 pub unsafe fn image(&self) -> Option<Retained<CGImage>>;
318
319 #[unsafe(method(imageSize))]
321 #[unsafe(method_family = none)]
322 pub unsafe fn imageSize(&self) -> NSSize;
323
324 #[unsafe(method(imageProperties))]
326 #[unsafe(method_family = none)]
327 pub unsafe fn imageProperties(&self) -> Option<Retained<NSDictionary>>;
328
329 #[cfg(feature = "objc2-core-foundation")]
330 #[unsafe(method(setRotationAngle:centerPoint:))]
332 #[unsafe(method_family = none)]
333 pub unsafe fn setRotationAngle_centerPoint(
334 &self,
335 rotation_angle: CGFloat,
336 center_point: NSPoint,
337 );
338
339 #[unsafe(method(rotateImageLeft:))]
346 #[unsafe(method_family = none)]
347 pub unsafe fn rotateImageLeft(&self, sender: Option<&AnyObject>);
348
349 #[unsafe(method(rotateImageRight:))]
356 #[unsafe(method_family = none)]
357 pub unsafe fn rotateImageRight(&self, sender: Option<&AnyObject>);
358
359 #[cfg(feature = "objc2-core-foundation")]
360 #[unsafe(method(setImageZoomFactor:centerPoint:))]
362 #[unsafe(method_family = none)]
363 pub unsafe fn setImageZoomFactor_centerPoint(
364 &self,
365 zoom_factor: CGFloat,
366 center_point: NSPoint,
367 );
368
369 #[unsafe(method(zoomImageToRect:))]
371 #[unsafe(method_family = none)]
372 pub unsafe fn zoomImageToRect(&self, rect: NSRect);
373
374 #[unsafe(method(zoomImageToFit:))]
381 #[unsafe(method_family = none)]
382 pub unsafe fn zoomImageToFit(&self, sender: Option<&AnyObject>);
383
384 #[unsafe(method(zoomImageToActualSize:))]
391 #[unsafe(method_family = none)]
392 pub unsafe fn zoomImageToActualSize(&self, sender: Option<&AnyObject>);
393
394 #[unsafe(method(zoomIn:))]
401 #[unsafe(method_family = none)]
402 pub unsafe fn zoomIn(&self, sender: Option<&AnyObject>);
403
404 #[unsafe(method(zoomOut:))]
411 #[unsafe(method_family = none)]
412 pub unsafe fn zoomOut(&self, sender: Option<&AnyObject>);
413
414 #[unsafe(method(flipImageHorizontal:))]
421 #[unsafe(method_family = none)]
422 pub unsafe fn flipImageHorizontal(&self, sender: Option<&AnyObject>);
423
424 #[unsafe(method(flipImageVertical:))]
431 #[unsafe(method_family = none)]
432 pub unsafe fn flipImageVertical(&self, sender: Option<&AnyObject>);
433
434 #[unsafe(method(crop:))]
441 #[unsafe(method_family = none)]
442 pub unsafe fn crop(&self, sender: Option<&AnyObject>);
443
444 #[cfg(feature = "objc2-quartz-core")]
445 #[unsafe(method(setOverlay:forType:))]
452 #[unsafe(method_family = none)]
453 pub unsafe fn setOverlay_forType(
454 &self,
455 layer: Option<&CALayer>,
456 layer_type: Option<&NSString>,
457 );
458
459 #[cfg(feature = "objc2-quartz-core")]
460 #[unsafe(method(overlayForType:))]
466 #[unsafe(method_family = none)]
467 pub unsafe fn overlayForType(
468 &self,
469 layer_type: Option<&NSString>,
470 ) -> Option<Retained<CALayer>>;
471
472 #[unsafe(method(scrollToPoint:))]
474 #[unsafe(method_family = none)]
475 pub unsafe fn scrollToPoint(&self, point: NSPoint);
476
477 #[unsafe(method(scrollToRect:))]
479 #[unsafe(method_family = none)]
480 pub unsafe fn scrollToRect(&self, rect: NSRect);
481
482 #[unsafe(method(convertViewPointToImagePoint:))]
484 #[unsafe(method_family = none)]
485 pub unsafe fn convertViewPointToImagePoint(&self, view_point: NSPoint) -> NSPoint;
486
487 #[unsafe(method(convertViewRectToImageRect:))]
489 #[unsafe(method_family = none)]
490 pub unsafe fn convertViewRectToImageRect(&self, view_rect: NSRect) -> NSRect;
491
492 #[unsafe(method(convertImagePointToViewPoint:))]
494 #[unsafe(method_family = none)]
495 pub unsafe fn convertImagePointToViewPoint(&self, image_point: NSPoint) -> NSPoint;
496
497 #[unsafe(method(convertImageRectToViewRect:))]
499 #[unsafe(method_family = none)]
500 pub unsafe fn convertImageRectToViewRect(&self, image_rect: NSRect) -> NSRect;
501 );
502}
503
504impl IKImageView {
506 extern_methods!(
507 #[unsafe(method(initWithFrame:))]
508 #[unsafe(method_family = init)]
509 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
510
511 #[unsafe(method(initWithCoder:))]
515 #[unsafe(method_family = init)]
516 pub unsafe fn initWithCoder(
517 this: Allocated<Self>,
518 coder: &NSCoder,
519 ) -> Option<Retained<Self>>;
520 );
521}
522
523impl IKImageView {
525 extern_methods!(
526 #[unsafe(method(init))]
527 #[unsafe(method_family = init)]
528 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
529 );
530}
531
532impl IKImageView {
534 extern_methods!(
535 #[unsafe(method(new))]
536 #[unsafe(method_family = new)]
537 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
538 );
539}