use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFLineStyle(pub NSInteger);
impl PDFLineStyle {
#[doc(alias = "kPDFLineStyleNone")]
pub const None: Self = Self(0);
#[doc(alias = "kPDFLineStyleSquare")]
pub const Square: Self = Self(1);
#[doc(alias = "kPDFLineStyleCircle")]
pub const Circle: Self = Self(2);
#[doc(alias = "kPDFLineStyleDiamond")]
pub const Diamond: Self = Self(3);
#[doc(alias = "kPDFLineStyleOpenArrow")]
pub const OpenArrow: Self = Self(4);
#[doc(alias = "kPDFLineStyleClosedArrow")]
pub const ClosedArrow: Self = Self(5);
}
unsafe impl Encode for PDFLineStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for PDFLineStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFTextAnnotationIconType(pub NSInteger);
impl PDFTextAnnotationIconType {
#[doc(alias = "kPDFTextAnnotationIconComment")]
pub const Comment: Self = Self(0);
#[doc(alias = "kPDFTextAnnotationIconKey")]
pub const Key: Self = Self(1);
#[doc(alias = "kPDFTextAnnotationIconNote")]
pub const Note: Self = Self(2);
#[doc(alias = "kPDFTextAnnotationIconHelp")]
pub const Help: Self = Self(3);
#[doc(alias = "kPDFTextAnnotationIconNewParagraph")]
pub const NewParagraph: Self = Self(4);
#[doc(alias = "kPDFTextAnnotationIconParagraph")]
pub const Paragraph: Self = Self(5);
#[doc(alias = "kPDFTextAnnotationIconInsert")]
pub const Insert: Self = Self(6);
}
unsafe impl Encode for PDFTextAnnotationIconType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for PDFTextAnnotationIconType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFMarkupType(pub NSInteger);
impl PDFMarkupType {
#[doc(alias = "kPDFMarkupTypeHighlight")]
pub const Highlight: Self = Self(0);
#[doc(alias = "kPDFMarkupTypeStrikeOut")]
pub const StrikeOut: Self = Self(1);
#[doc(alias = "kPDFMarkupTypeUnderline")]
pub const Underline: Self = Self(2);
#[doc(alias = "kPDFMarkupTypeRedact")]
pub const Redact: Self = Self(3);
}
unsafe impl Encode for PDFMarkupType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for PDFMarkupType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFWidgetControlType(pub NSInteger);
impl PDFWidgetControlType {
#[doc(alias = "kPDFWidgetUnknownControl")]
pub const UnknownControl: Self = Self(-1);
#[doc(alias = "kPDFWidgetPushButtonControl")]
pub const PushButtonControl: Self = Self(0);
#[doc(alias = "kPDFWidgetRadioButtonControl")]
pub const RadioButtonControl: Self = Self(1);
#[doc(alias = "kPDFWidgetCheckBoxControl")]
pub const CheckBoxControl: Self = Self(2);
}
unsafe impl Encode for PDFWidgetControlType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for PDFWidgetControlType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PDFWidgetCellState(pub NSInteger);
impl PDFWidgetCellState {
#[doc(alias = "kPDFWidgetMixedState")]
pub const MixedState: Self = Self(-1);
#[doc(alias = "kPDFWidgetOffState")]
pub const OffState: Self = Self(0);
#[doc(alias = "kPDFWidgetOnState")]
pub const OnState: Self = Self(1);
}
unsafe impl Encode for PDFWidgetCellState {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for PDFWidgetCellState {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypeText: &'static PDFAnnotationSubtype;
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypeLink: &'static PDFAnnotationSubtype;
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypeFreeText: &'static PDFAnnotationSubtype;
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypeLine: &'static PDFAnnotationSubtype;
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypeSquare: &'static PDFAnnotationSubtype;
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypeCircle: &'static PDFAnnotationSubtype;
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypeHighlight: &'static PDFAnnotationSubtype;
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypeUnderline: &'static PDFAnnotationSubtype;
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypeStrikeOut: &'static PDFAnnotationSubtype;
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypeInk: &'static PDFAnnotationSubtype;
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypeStamp: &'static PDFAnnotationSubtype;
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypePopup: &'static PDFAnnotationSubtype;
}
extern "C" {
#[cfg(feature = "PDFAnnotation")]
pub static PDFAnnotationSubtypeWidget: &'static PDFAnnotationSubtype;
}
pub type PDFAnnotationWidgetSubtype = NSString;
extern "C" {
pub static PDFAnnotationWidgetSubtypeButton: &'static PDFAnnotationWidgetSubtype;
}
extern "C" {
pub static PDFAnnotationWidgetSubtypeChoice: &'static PDFAnnotationWidgetSubtype;
}
extern "C" {
pub static PDFAnnotationWidgetSubtypeSignature: &'static PDFAnnotationWidgetSubtype;
}
extern "C" {
pub static PDFAnnotationWidgetSubtypeText: &'static PDFAnnotationWidgetSubtype;
}
pub type PDFAnnotationLineEndingStyle = NSString;
extern "C" {
pub static PDFAnnotationLineEndingStyleNone: &'static PDFAnnotationLineEndingStyle;
}
extern "C" {
pub static PDFAnnotationLineEndingStyleSquare: &'static PDFAnnotationLineEndingStyle;
}
extern "C" {
pub static PDFAnnotationLineEndingStyleCircle: &'static PDFAnnotationLineEndingStyle;
}
extern "C" {
pub static PDFAnnotationLineEndingStyleDiamond: &'static PDFAnnotationLineEndingStyle;
}
extern "C" {
pub static PDFAnnotationLineEndingStyleOpenArrow: &'static PDFAnnotationLineEndingStyle;
}
extern "C" {
pub static PDFAnnotationLineEndingStyleClosedArrow: &'static PDFAnnotationLineEndingStyle;
}
pub type PDFAnnotationTextIconType = NSString;
extern "C" {
pub static PDFAnnotationTextIconTypeComment: &'static PDFAnnotationTextIconType;
}
extern "C" {
pub static PDFAnnotationTextIconTypeKey: &'static PDFAnnotationTextIconType;
}
extern "C" {
pub static PDFAnnotationTextIconTypeNote: &'static PDFAnnotationTextIconType;
}
extern "C" {
pub static PDFAnnotationTextIconTypeHelp: &'static PDFAnnotationTextIconType;
}
extern "C" {
pub static PDFAnnotationTextIconTypeNewParagraph: &'static PDFAnnotationTextIconType;
}
extern "C" {
pub static PDFAnnotationTextIconTypeParagraph: &'static PDFAnnotationTextIconType;
}
extern "C" {
pub static PDFAnnotationTextIconTypeInsert: &'static PDFAnnotationTextIconType;
}
pub type PDFAnnotationHighlightingMode = NSString;
extern "C" {
pub static PDFAnnotationHighlightingModeNone: &'static PDFAnnotationHighlightingMode;
}
extern "C" {
pub static PDFAnnotationHighlightingModeInvert: &'static PDFAnnotationHighlightingMode;
}
extern "C" {
pub static PDFAnnotationHighlightingModeOutline: &'static PDFAnnotationHighlightingMode;
}
extern "C" {
pub static PDFAnnotationHighlightingModePush: &'static PDFAnnotationHighlightingMode;
}
#[cfg(feature = "PDFAnnotation")]
impl PDFAnnotation {
extern_methods!(
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(font))]
#[unsafe(method_family = none)]
pub unsafe fn font(&self) -> Option<Retained<NSFont>>;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(setFont:))]
#[unsafe(method_family = none)]
pub unsafe fn setFont(&self, font: Option<&NSFont>);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(fontColor))]
#[unsafe(method_family = none)]
pub unsafe fn fontColor(&self) -> Option<Retained<NSColor>>;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(setFontColor:))]
#[unsafe(method_family = none)]
pub unsafe fn setFontColor(&self, font_color: Option<&NSColor>);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(interiorColor))]
#[unsafe(method_family = none)]
pub unsafe fn interiorColor(&self) -> Option<Retained<NSColor>>;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(setInteriorColor:))]
#[unsafe(method_family = none)]
pub unsafe fn setInteriorColor(&self, interior_color: Option<&NSColor>);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(alignment))]
#[unsafe(method_family = none)]
pub unsafe fn alignment(&self) -> NSTextAlignment;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(setAlignment:))]
#[unsafe(method_family = none)]
pub unsafe fn setAlignment(&self, alignment: NSTextAlignment);
#[unsafe(method(startPoint))]
#[unsafe(method_family = none)]
pub unsafe fn startPoint(&self) -> NSPoint;
#[unsafe(method(setStartPoint:))]
#[unsafe(method_family = none)]
pub unsafe fn setStartPoint(&self, start_point: NSPoint);
#[unsafe(method(endPoint))]
#[unsafe(method_family = none)]
pub unsafe fn endPoint(&self) -> NSPoint;
#[unsafe(method(setEndPoint:))]
#[unsafe(method_family = none)]
pub unsafe fn setEndPoint(&self, end_point: NSPoint);
#[unsafe(method(startLineStyle))]
#[unsafe(method_family = none)]
pub unsafe fn startLineStyle(&self) -> PDFLineStyle;
#[unsafe(method(setStartLineStyle:))]
#[unsafe(method_family = none)]
pub unsafe fn setStartLineStyle(&self, start_line_style: PDFLineStyle);
#[unsafe(method(endLineStyle))]
#[unsafe(method_family = none)]
pub unsafe fn endLineStyle(&self) -> PDFLineStyle;
#[unsafe(method(setEndLineStyle:))]
#[unsafe(method_family = none)]
pub unsafe fn setEndLineStyle(&self, end_line_style: PDFLineStyle);
#[unsafe(method(lineStyleFromName:))]
#[unsafe(method_family = none)]
pub unsafe fn lineStyleFromName(name: &NSString) -> PDFLineStyle;
#[unsafe(method(nameForLineStyle:))]
#[unsafe(method_family = none)]
pub unsafe fn nameForLineStyle(style: PDFLineStyle) -> Retained<NSString>;
#[unsafe(method(iconType))]
#[unsafe(method_family = none)]
pub unsafe fn iconType(&self) -> PDFTextAnnotationIconType;
#[unsafe(method(setIconType:))]
#[unsafe(method_family = none)]
pub unsafe fn setIconType(&self, icon_type: PDFTextAnnotationIconType);
#[unsafe(method(quadrilateralPoints))]
#[unsafe(method_family = none)]
pub unsafe fn quadrilateralPoints(&self) -> Option<Retained<NSArray<NSValue>>>;
#[unsafe(method(setQuadrilateralPoints:))]
#[unsafe(method_family = none)]
pub unsafe fn setQuadrilateralPoints(
&self,
quadrilateral_points: Option<&NSArray<NSValue>>,
);
#[unsafe(method(markupType))]
#[unsafe(method_family = none)]
pub unsafe fn markupType(&self) -> PDFMarkupType;
#[unsafe(method(setMarkupType:))]
#[unsafe(method_family = none)]
pub unsafe fn setMarkupType(&self, markup_type: PDFMarkupType);
#[unsafe(method(widgetFieldType))]
#[unsafe(method_family = none)]
pub unsafe fn widgetFieldType(&self) -> Retained<PDFAnnotationWidgetSubtype>;
#[unsafe(method(setWidgetFieldType:))]
#[unsafe(method_family = none)]
pub unsafe fn setWidgetFieldType(&self, widget_field_type: &PDFAnnotationWidgetSubtype);
#[unsafe(method(widgetControlType))]
#[unsafe(method_family = none)]
pub unsafe fn widgetControlType(&self) -> PDFWidgetControlType;
#[unsafe(method(setWidgetControlType:))]
#[unsafe(method_family = none)]
pub unsafe fn setWidgetControlType(&self, widget_control_type: PDFWidgetControlType);
#[unsafe(method(isMultiline))]
#[unsafe(method_family = none)]
pub unsafe fn isMultiline(&self) -> bool;
#[unsafe(method(setMultiline:))]
#[unsafe(method_family = none)]
pub unsafe fn setMultiline(&self, multiline: bool);
#[unsafe(method(isActivatableTextField))]
#[unsafe(method_family = none)]
pub unsafe fn isActivatableTextField(&self) -> bool;
#[unsafe(method(isPasswordField))]
#[unsafe(method_family = none)]
pub unsafe fn isPasswordField(&self) -> bool;
#[unsafe(method(hasComb))]
#[unsafe(method_family = none)]
pub unsafe fn hasComb(&self) -> bool;
#[unsafe(method(setComb:))]
#[unsafe(method_family = none)]
pub unsafe fn setComb(&self, comb: bool);
#[unsafe(method(maximumLength))]
#[unsafe(method_family = none)]
pub unsafe fn maximumLength(&self) -> NSInteger;
#[unsafe(method(setMaximumLength:))]
#[unsafe(method_family = none)]
pub unsafe fn setMaximumLength(&self, maximum_length: NSInteger);
#[unsafe(method(widgetStringValue))]
#[unsafe(method_family = none)]
pub unsafe fn widgetStringValue(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setWidgetStringValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setWidgetStringValue(&self, widget_string_value: Option<&NSString>);
#[unsafe(method(widgetDefaultStringValue))]
#[unsafe(method_family = none)]
pub unsafe fn widgetDefaultStringValue(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setWidgetDefaultStringValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setWidgetDefaultStringValue(
&self,
widget_default_string_value: Option<&NSString>,
);
#[unsafe(method(allowsToggleToOff))]
#[unsafe(method_family = none)]
pub unsafe fn allowsToggleToOff(&self) -> bool;
#[unsafe(method(setAllowsToggleToOff:))]
#[unsafe(method_family = none)]
pub unsafe fn setAllowsToggleToOff(&self, allows_toggle_to_off: bool);
#[unsafe(method(radiosInUnison))]
#[unsafe(method_family = none)]
pub unsafe fn radiosInUnison(&self) -> bool;
#[unsafe(method(setRadiosInUnison:))]
#[unsafe(method_family = none)]
pub unsafe fn setRadiosInUnison(&self, radios_in_unison: bool);
#[unsafe(method(isReadOnly))]
#[unsafe(method_family = none)]
pub unsafe fn isReadOnly(&self) -> bool;
#[unsafe(method(setReadOnly:))]
#[unsafe(method_family = none)]
pub unsafe fn setReadOnly(&self, read_only: bool);
#[unsafe(method(isListChoice))]
#[unsafe(method_family = none)]
pub unsafe fn isListChoice(&self) -> bool;
#[unsafe(method(setListChoice:))]
#[unsafe(method_family = none)]
pub unsafe fn setListChoice(&self, list_choice: bool);
#[unsafe(method(choices))]
#[unsafe(method_family = none)]
pub unsafe fn choices(&self) -> Option<Retained<NSArray<NSString>>>;
#[unsafe(method(setChoices:))]
#[unsafe(method_family = none)]
pub unsafe fn setChoices(&self, choices: Option<&NSArray<NSString>>);
#[unsafe(method(values))]
#[unsafe(method_family = none)]
pub unsafe fn values(&self) -> Option<Retained<NSArray<NSString>>>;
#[unsafe(method(setValues:))]
#[unsafe(method_family = none)]
pub unsafe fn setValues(&self, values: Option<&NSArray<NSString>>);
#[unsafe(method(buttonWidgetState))]
#[unsafe(method_family = none)]
pub unsafe fn buttonWidgetState(&self) -> PDFWidgetCellState;
#[unsafe(method(setButtonWidgetState:))]
#[unsafe(method_family = none)]
pub unsafe fn setButtonWidgetState(&self, button_widget_state: PDFWidgetCellState);
#[unsafe(method(buttonWidgetStateString))]
#[unsafe(method_family = none)]
pub unsafe fn buttonWidgetStateString(&self) -> Retained<NSString>;
#[unsafe(method(setButtonWidgetStateString:))]
#[unsafe(method_family = none)]
pub unsafe fn setButtonWidgetStateString(&self, button_widget_state_string: &NSString);
#[unsafe(method(isOpen))]
#[unsafe(method_family = none)]
pub unsafe fn isOpen(&self) -> bool;
#[unsafe(method(setOpen:))]
#[unsafe(method_family = none)]
pub unsafe fn setOpen(&self, open: bool);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(paths))]
#[unsafe(method_family = none)]
pub unsafe fn paths(&self) -> Option<Retained<NSArray<NSBezierPath>>>;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(addBezierPath:))]
#[unsafe(method_family = none)]
pub unsafe fn addBezierPath(&self, path: &NSBezierPath);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(removeBezierPath:))]
#[unsafe(method_family = none)]
pub unsafe fn removeBezierPath(&self, path: &NSBezierPath);
#[cfg(feature = "PDFDestination")]
#[unsafe(method(destination))]
#[unsafe(method_family = none)]
pub unsafe fn destination(&self) -> Option<Retained<PDFDestination>>;
#[cfg(feature = "PDFDestination")]
#[unsafe(method(setDestination:))]
#[unsafe(method_family = none)]
pub unsafe fn setDestination(&self, destination: Option<&PDFDestination>);
#[unsafe(method(URL))]
#[unsafe(method_family = none)]
pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
#[unsafe(method(setURL:))]
#[unsafe(method_family = none)]
pub unsafe fn setURL(&self, url: Option<&NSURL>);
#[unsafe(method(fieldName))]
#[unsafe(method_family = none)]
pub unsafe fn fieldName(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setFieldName:))]
#[unsafe(method_family = none)]
pub unsafe fn setFieldName(&self, field_name: Option<&NSString>);
#[unsafe(method(caption))]
#[unsafe(method_family = none)]
pub unsafe fn caption(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setCaption:))]
#[unsafe(method_family = none)]
pub unsafe fn setCaption(&self, caption: Option<&NSString>);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(backgroundColor))]
#[unsafe(method_family = none)]
pub unsafe fn backgroundColor(&self) -> Option<Retained<NSColor>>;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(setBackgroundColor:))]
#[unsafe(method_family = none)]
pub unsafe fn setBackgroundColor(&self, background_color: Option<&NSColor>);
#[unsafe(method(stampName))]
#[unsafe(method_family = none)]
pub unsafe fn stampName(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setStampName:))]
#[unsafe(method_family = none)]
pub unsafe fn setStampName(&self, stamp_name: Option<&NSString>);
);
}