quicklookui

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package quicklookui provides a fluent Go API over the macOS QuickLookUI framework.

Construction

New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.

Lifecycle

A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.

Main-thread requirements

Methods, setters, and constructors of classes Apple isolates to the main thread run there automatically; callers never need to arrange main-thread dispatch for the generated API.

Delegates

A …Delegate interface is implemented by a plain Go value and installed with the matching With… setter; the package builds the Objective-C delegate object behind the scenes. Optional protocol methods are separate one-method …Handler interfaces — implement the ones you need on the same value and the framework calls them too.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SharedPreviewPanelExists added in v0.17.0

func SharedPreviewPanelExists() bool

SharedPreviewPanelExists reports whether returns a Boolean value that indicates whether the system has created a shared Quick Look preview panel.

Types

type CGLCPContextPriorityRequest

type CGLCPContextPriorityRequest int32
const (
	KCGLCPContextPriorityRequestHigh   CGLCPContextPriorityRequest = 0
	KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1
	KCGLCPContextPriorityRequestLow    CGLCPContextPriorityRequest = 2
)

func (CGLCPContextPriorityRequest) String

String returns the CGLCPContextPriorityRequest constant's name, or its numeric form when the value is not a known constant.

type Clockid added in v0.17.0

type Clockid int32
const (
	ClockidRealtime           Clockid = 0
	ClockidMonotonic          Clockid = 6
	ClockidMonotonicRaw       Clockid = 4
	ClockidMonotonicRawApprox Clockid = 5
	ClockidUptimeRaw          Clockid = 8
	ClockidUptimeRawApprox    Clockid = 9
	ClockidProcessCputimeID   Clockid = 12
	ClockidThreadCputimeID    Clockid = 16
)

func (Clockid) String added in v0.17.0

func (e Clockid) String() string

String returns the Clockid constant's name, or its numeric form when the value is not a known constant.

type DispatchAutoreleaseFrequency added in v0.17.0

type DispatchAutoreleaseFrequency uint64
const (
	DispatchAutoreleaseFrequencyInherit  DispatchAutoreleaseFrequency = 0
	DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1
	DispatchAutoreleaseFrequencyNever    DispatchAutoreleaseFrequency = 2
)

func (DispatchAutoreleaseFrequency) String added in v0.17.0

String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.

type DispatchBlockFlags added in v0.17.0

type DispatchBlockFlags uint64

Bitmask — values may be combined with |.

const (
	DispatchBlockFlagsBarrier         DispatchBlockFlags = 1
	DispatchBlockFlagsDetached        DispatchBlockFlags = 2
	DispatchBlockFlagsAssignCurrent   DispatchBlockFlags = 4
	DispatchBlockFlagsNoQosClass      DispatchBlockFlags = 8
	DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16
	DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32
)

func (DispatchBlockFlags) String added in v0.17.0

func (e DispatchBlockFlags) String() string

String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.

type EntryID added in v0.17.0

type EntryID int32
const (
	EntryIDFirstEntry EntryID = 0
	EntryIDNextEntry  EntryID = -1
	EntryIDLastEntry  EntryID = -2
)

func (EntryID) String added in v0.17.0

func (e EntryID) String() string

String returns the EntryID constant's name, or its numeric form when the value is not a known constant.

type EvCmd

type EvCmd int32
const (
	EVNOP   EvCmd = 0
	EVHIDE  EvCmd = 1
	EVSHOW  EvCmd = 2
	EVMOVE  EvCmd = 3
	EVLEVEL EvCmd = 4
)

func (EvCmd) String

func (e EvCmd) String() string

String returns the EvCmd constant's name, or its numeric form when the value is not a known constant.

type FilePreviewRequest added in v0.17.0

type FilePreviewRequest struct {
	objref.Handle
}

FilePreviewRequest is an idiomatic wrapper over the Objective-C class QLFilePreviewRequest.

A Quick Look preview request that indicates the content to preview.

func FilePreviewRequestFromID added in v0.17.0

func FilePreviewRequestFromID(id objc.ID) *FilePreviewRequest

FilePreviewRequestFromID adopts an existing Objective-C object as a FilePreviewRequest (nil for 0), retaining it and registering a release finalizer.

func NewFilePreviewRequest added in v0.17.0

func NewFilePreviewRequest() *FilePreviewRequest

NewFilePreviewRequest creates a new FilePreviewRequest.

func (*FilePreviewRequest) Description added in v0.17.0

func (fpr *FilePreviewRequest) Description() string

Description returns the object's -description text.

func (*FilePreviewRequest) FileURL added in v0.17.0

func (fpr *FilePreviewRequest) FileURL() string

FileURL returns the file URL.

func (*FilePreviewRequest) IsEqual added in v0.17.0

func (fpr *FilePreviewRequest) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*FilePreviewRequest) IsKind added in v0.17.0

func (fpr *FilePreviewRequest) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*FilePreviewRequest) String added in v0.17.0

func (fpr *FilePreviewRequest) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type FilesecProperty added in v0.17.0

type FilesecProperty int32
const (
	FilesecPropertyOwner        FilesecProperty = 1
	FilesecPropertyGroup        FilesecProperty = 2
	FilesecPropertyUUID         FilesecProperty = 3
	FilesecPropertyMode         FilesecProperty = 4
	FilesecPropertyACL          FilesecProperty = 5
	FilesecPropertyGrpuuid      FilesecProperty = 6
	FilesecPropertyACLRaw       FilesecProperty = 100
	FilesecPropertyACLAllocsize FilesecProperty = 101
)

func (FilesecProperty) String added in v0.17.0

func (e FilesecProperty) String() string

String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.

type Flag added in v0.17.0

type Flag int32
const (
	FlagFlagDeferInherit      Flag = 1
	FlagFlagNoInherit         Flag = 131072
	FlagEntryInherited        Flag = 16
	FlagEntryFileInherit      Flag = 32
	FlagEntryDirectoryInherit Flag = 64
	FlagEntryLimitInherit     Flag = 128
	FlagEntryOnlyInherit      Flag = 256
)

func (Flag) String added in v0.17.0

func (e Flag) String() string

String returns the Flag constant's name, or its numeric form when the value is not a known constant.

type Idtype added in v0.17.0

type Idtype int32
const (
	IdtypeAll  Idtype = 0
	IdtypePid  Idtype = 1
	IdtypePgid Idtype = 2
)

func (Idtype) String added in v0.17.0

func (e Idtype) String() string

String returns the Idtype constant's name, or its numeric form when the value is not a known constant.

type IpcInfoObjectType added in v0.17.0

type IpcInfoObjectType uint32
const (
	IpcInfoObjectTypeNone               IpcInfoObjectType = 0
	IpcInfoObjectTypeThreadControl      IpcInfoObjectType = 1
	IpcInfoObjectTypeTaskControl        IpcInfoObjectType = 2
	IpcInfoObjectTypeHost               IpcInfoObjectType = 3
	IpcInfoObjectTypeHostPriv           IpcInfoObjectType = 4
	IpcInfoObjectTypeProcessor          IpcInfoObjectType = 5
	IpcInfoObjectTypeProcessorSet       IpcInfoObjectType = 6
	IpcInfoObjectTypeProcessorSetName   IpcInfoObjectType = 7
	IpcInfoObjectTypeTimer              IpcInfoObjectType = 8
	IpcInfoObjectTypePortSubstOnce      IpcInfoObjectType = 9
	IpcInfoObjectTypeMig                IpcInfoObjectType = 10
	IpcInfoObjectTypeMemoryObject       IpcInfoObjectType = 11
	IpcInfoObjectTypeXmmPager           IpcInfoObjectType = 12
	IpcInfoObjectTypeXmmKernel          IpcInfoObjectType = 13
	IpcInfoObjectTypeXmmReply           IpcInfoObjectType = 14
	IpcInfoObjectTypeUndReply           IpcInfoObjectType = 15
	IpcInfoObjectTypeHostNotify         IpcInfoObjectType = 16
	IpcInfoObjectTypeHostSecurity       IpcInfoObjectType = 17
	IpcInfoObjectTypeLedger             IpcInfoObjectType = 18
	IpcInfoObjectTypeMainDevice         IpcInfoObjectType = 19
	IpcInfoObjectTypeTaskName           IpcInfoObjectType = 20
	IpcInfoObjectTypeSubsystem          IpcInfoObjectType = 21
	IpcInfoObjectTypeIODoneQueue        IpcInfoObjectType = 22
	IpcInfoObjectTypeSemaphore          IpcInfoObjectType = 23
	IpcInfoObjectTypeLockSet            IpcInfoObjectType = 24
	IpcInfoObjectTypeClock              IpcInfoObjectType = 25
	IpcInfoObjectTypeClockCtrl          IpcInfoObjectType = 26
	IpcInfoObjectTypeIokitIdent         IpcInfoObjectType = 27
	IpcInfoObjectTypeNamedEntry         IpcInfoObjectType = 28
	IpcInfoObjectTypeIokitConnect       IpcInfoObjectType = 29
	IpcInfoObjectTypeIokitObject        IpcInfoObjectType = 30
	IpcInfoObjectTypeUpl                IpcInfoObjectType = 31
	IpcInfoObjectTypeMemObjControl      IpcInfoObjectType = 32
	IpcInfoObjectTypeAuSessionport      IpcInfoObjectType = 33
	IpcInfoObjectTypeFileport           IpcInfoObjectType = 34
	IpcInfoObjectTypeLabelh             IpcInfoObjectType = 35
	IpcInfoObjectTypeTaskResume         IpcInfoObjectType = 36
	IpcInfoObjectTypeVoucher            IpcInfoObjectType = 37
	IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38
	IpcInfoObjectTypeWorkInterval       IpcInfoObjectType = 39
	IpcInfoObjectTypeUxHandler          IpcInfoObjectType = 40
	IpcInfoObjectTypeUextObject         IpcInfoObjectType = 41
	IpcInfoObjectTypeArcadeReg          IpcInfoObjectType = 42
	IpcInfoObjectTypeEventlink          IpcInfoObjectType = 43
	IpcInfoObjectTypeTaskInspect        IpcInfoObjectType = 44
	IpcInfoObjectTypeTaskRead           IpcInfoObjectType = 45
	IpcInfoObjectTypeThreadInspect      IpcInfoObjectType = 46
	IpcInfoObjectTypeThreadRead         IpcInfoObjectType = 47
	IpcInfoObjectTypeSuidCred           IpcInfoObjectType = 48
	IpcInfoObjectTypeHypervisor         IpcInfoObjectType = 49
	IpcInfoObjectTypeTaskIDToken        IpcInfoObjectType = 50
	IpcInfoObjectTypeTaskFatal          IpcInfoObjectType = 51
	IpcInfoObjectTypeKcdata             IpcInfoObjectType = 52
	IpcInfoObjectTypeExclavesResource   IpcInfoObjectType = 53
	IpcInfoObjectTypeThreadResume       IpcInfoObjectType = 54
	IpcInfoObjectTypeUnknown            IpcInfoObjectType = 4294967295
)

func (IpcInfoObjectType) String added in v0.17.0

func (e IpcInfoObjectType) String() string

String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.

type LaunchDataType added in v0.17.0

type LaunchDataType int32
const (
	LaunchDataTypeDictionary LaunchDataType = 1
	LaunchDataTypeArray      LaunchDataType = 2
	LaunchDataTypeFd         LaunchDataType = 3
	LaunchDataTypeInteger    LaunchDataType = 4
	LaunchDataTypeReal       LaunchDataType = 5
	LaunchDataTypeBool       LaunchDataType = 6
	LaunchDataTypeString     LaunchDataType = 7
	LaunchDataTypeOpaque     LaunchDataType = 8
	LaunchDataTypeErrno      LaunchDataType = 9
	LaunchDataTypeMachport   LaunchDataType = 10
)

func (LaunchDataType) String added in v0.17.0

func (e LaunchDataType) String() string

String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.

type MDLabelDomain

type MDLabelDomain int32

These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.

type MDQueryOptionFlags

type MDQueryOptionFlags int32
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int32
const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlags added in v0.17.0

type MachVMRangeFlags uint64

Bitmask — values may be combined with |.

const (
	MachVMRangeFlagsNone MachVMRangeFlags = 0
)

func (MachVMRangeFlags) String added in v0.17.0

func (e MachVMRangeFlags) String() string

String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlavor added in v0.17.0

type MachVMRangeFlavor uint32
const (
	MachVMRangeFlavorInvalid MachVMRangeFlavor = 0
	MachVMRangeFlavorV1      MachVMRangeFlavor = 1
)

func (MachVMRangeFlavor) String added in v0.17.0

func (e MachVMRangeFlavor) String() string

String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeTag added in v0.17.0

type MachVMRangeTag uint16
const (
	MachVMRangeTagDefault MachVMRangeTag = 0
	MachVMRangeTagData    MachVMRangeTag = 1
	MachVMRangeTagFixed   MachVMRangeTag = 2
)

func (MachVMRangeTag) String added in v0.17.0

func (e MachVMRangeTag) String() string

String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.

type MpoFlags added in v0.17.0

type MpoFlags uint32

Bitmask — values may be combined with |.

const (
	MpoFlagsPort                        MpoFlags = 0
	MpoFlagsServicePort                 MpoFlags = 1024
	MpoFlagsConnectionPort              MpoFlags = 2048
	MpoFlagsReplyPort                   MpoFlags = 4096
	MpoFlagsWeakReplyPort               MpoFlags = 16384
	MpoFlagsNotificationPort            MpoFlags = 17408
	MpoFlagsExceptionPort               MpoFlags = 32768
	MpoFlagsConnectionPortWithPortArray MpoFlags = 65536
)

func (MpoFlags) String added in v0.17.0

func (e MpoFlags) String() string

String returns the MpoFlags constant's name, or its numeric form when the value is not a known constant.

type NXMouseButton

type NXMouseButton int32
const (
	NX_OneButton   NXMouseButton = 0
	NX_LeftButton  NXMouseButton = 1
	NX_RightButton NXMouseButton = 2
)

func (NXMouseButton) String

func (e NXMouseButton) String() string

String returns the NXMouseButton constant's name, or its numeric form when the value is not a known constant.

type OSClockid added in v0.17.0

type OSClockid uint32
const (
	OSClockidTime OSClockid = 32
)

func (OSClockid) String added in v0.17.0

func (e OSClockid) String() string

String returns the OSClockid constant's name, or its numeric form when the value is not a known constant.

type OSUnfairLockFlags added in v0.17.0

type OSUnfairLockFlags uint32

Bitmask — values may be combined with |.

const (
	OSUnfairLockFlagsNone         OSUnfairLockFlags = 0
	OSUnfairLockFlagsAdaptiveSpin OSUnfairLockFlags = 262144
)

func (OSUnfairLockFlags) String added in v0.17.0

func (e OSUnfairLockFlags) String() string

String returns the OSUnfairLockFlags constant's name, or its numeric form when the value is not a known constant.

type PMPageToPaperMappingType

type PMPageToPaperMappingType int32
const (
	KPMPageToPaperMappingNone       PMPageToPaperMappingType = 1
	KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2
)

func (PMPageToPaperMappingType) String

func (e PMPageToPaperMappingType) String() string

String returns the PMPageToPaperMappingType constant's name, or its numeric form when the value is not a known constant.

type Perm added in v0.17.0

type Perm int32
const (
	PermReadData           Perm = 2
	PermListDirectory      Perm = 2
	PermWriteData          Perm = 4
	PermAddFile            Perm = 4
	PermExecute            Perm = 8
	PermSearch             Perm = 8
	PermDelete             Perm = 16
	PermAppendData         Perm = 32
	PermAddSubdirectory    Perm = 32
	PermDeleteChild        Perm = 64
	PermReadAttributes     Perm = 128
	PermWriteAttributes    Perm = 256
	PermReadExtattributes  Perm = 512
	PermWriteExtattributes Perm = 1024
	PermReadSecurity       Perm = 2048
	PermWriteSecurity      Perm = 4096
	PermChangeOwner        Perm = 8192
	PermSynchronize        Perm = 1048576
)

func (Perm) String added in v0.17.0

func (e Perm) String() string

String returns the Perm constant's name, or its numeric form when the value is not a known constant.

type PreviewItem added in v0.17.0

type PreviewItem interface {
}

PreviewItem is the Go form of the Objective-C protocol QLPreviewItem.

type PreviewPDFStyle deprecated added in v0.17.0

type PreviewPDFStyle int32

Deprecated: Use a QLPreviewingController in a Preview Extension to provide previews for your file types.

const (
	// Deprecated: Use a QLPreviewingController in a Preview Extension to provide previews for your file types.
	KQLPreviewPDFStandardStyle PreviewPDFStyle = 0
	// Deprecated: Use a QLPreviewingController in a Preview Extension to provide previews for your file types.
	KQLPreviewPDFPagesWithThumbnailsOnRightStyle PreviewPDFStyle = 3
	KQLPreviewPDFPagesWithThumbnailsOnLeftStyle  PreviewPDFStyle = 4
)

func (PreviewPDFStyle) String added in v0.17.0

func (e PreviewPDFStyle) String() string

String returns the PreviewPDFStyle constant's name, or its numeric form when the value is not a known constant.

type PreviewPanel added in v0.17.0

type PreviewPanel struct {
	objref.Handle
}

PreviewPanel is an idiomatic wrapper over the Objective-C class QLPreviewPanel.

A class that implements the Quick Look preview panel to display a preview of a list of items.

func NewPreviewPanel added in v0.17.0

func NewPreviewPanel() *PreviewPanel

NewPreviewPanel creates a new PreviewPanel.

func PreviewPanelFromID added in v0.17.0

func PreviewPanelFromID(id objc.ID) *PreviewPanel

PreviewPanelFromID adopts an existing Objective-C object as a PreviewPanel (nil for 0), retaining it and registering a release finalizer.

func SharedPreviewPanel added in v0.17.0

func SharedPreviewPanel() *PreviewPanel

SharedPreviewPanel returns the shared Quick Look preview panel instance.

func (*PreviewPanel) CurrentController added in v0.17.0

func (pp *PreviewPanel) CurrentController() obj.Object

CurrentController returns the current first responder accepting to control the preview panel. You should never change the preview panel’s state (for example, its delegate, datasource, and so on) if you aren’t controlling it.

func (*PreviewPanel) CurrentPreviewItemIndex added in v0.17.0

func (pp *PreviewPanel) CurrentPreviewItemIndex() int

CurrentPreviewItemIndex returns the index of the current preview item. The value is `NSNotFound` if there’s no current preview item.

func (*PreviewPanel) Description added in v0.17.0

func (pp *PreviewPanel) Description() string

Description returns the object's -description text.

func (*PreviewPanel) DisplayState added in v0.17.0

func (pp *PreviewPanel) DisplayState() obj.Object

DisplayState returns the preview panel’s display state. This property is an opaque object that Quick Look uses to get and set the current display state of the preview. The display state could be, for example, the currently displayed page, the zoom factor on an image, or the position in a movie. You can use this property to get and save the current display state of the preview before switching to another. This saving allows you to restore a preview later on when the user switches back to it.

func (*PreviewPanel) EnterFullScreenModeWithOptions added in v0.17.0

func (pp *PreviewPanel) EnterFullScreenModeWithOptions(screen obj.Object, options obj.Object) bool

EnterFullScreenModeWithOptions instructs the panel to enter full screen mode.

func (*PreviewPanel) ExitFullScreenModeWithOptions added in v0.17.0

func (pp *PreviewPanel) ExitFullScreenModeWithOptions(options obj.Object)

ExitFullScreenModeWithOptions instructs the panel to exit full screen mode.

func (*PreviewPanel) IsEqual added in v0.17.0

func (pp *PreviewPanel) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*PreviewPanel) IsInFullScreenMode added in v0.17.0

func (pp *PreviewPanel) IsInFullScreenMode() bool

IsInFullScreenMode reports whether the property that indicates whether the panel is in full screen mode. The value is <doc://com.apple.documentation/documentation/objectivec/yes> if the panel is currently open and in full screen mode; otherwise it’s <doc://com.apple.documentation/documentation/objectivec/no>.

func (*PreviewPanel) IsKind added in v0.17.0

func (pp *PreviewPanel) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*PreviewPanel) RefreshCurrentPreviewItem added in v0.17.0

func (pp *PreviewPanel) RefreshCurrentPreviewItem()

RefreshCurrentPreviewItem asks the preview panel to recompute the preview of the current preview item.

func (*PreviewPanel) ReloadData added in v0.17.0

func (pp *PreviewPanel) ReloadData()

ReloadData asks the preview panel to reload its data from its data source.

func (*PreviewPanel) String added in v0.17.0

func (pp *PreviewPanel) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*PreviewPanel) UpdateController added in v0.17.0

func (pp *PreviewPanel) UpdateController()

UpdateController asks the preview panel to update its current controller.

func (*PreviewPanel) WithCurrentPreviewItemIndex added in v0.17.0

func (pp *PreviewPanel) WithCurrentPreviewItemIndex(currentPreviewItemIndex int) *PreviewPanel

WithCurrentPreviewItemIndex sets the index of the current preview item.

func (*PreviewPanel) WithDisplayState added in v0.17.0

func (pp *PreviewPanel) WithDisplayState(displayState obj.Object) *PreviewPanel

WithDisplayState sets the preview panel’s display state.

type PreviewPanelDataSource added in v0.17.0

type PreviewPanelDataSource interface {
	NumberOfPreviewItemsInPreviewPanel(panel *PreviewPanel) int
	PreviewPanelPreviewItemAtIndex(panel *PreviewPanel, index int) obj.Object
}

PreviewPanelDataSource is the Go form of the Objective-C protocol QLPreviewPanelDataSource.

type PreviewPanelDelegate added in v0.17.0

type PreviewPanelDelegate interface {
}

PreviewPanelDelegate receives the callbacks of the Objective-C protocol QLPreviewPanelDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (PreviewPanelDelegate…Handler): implement the ones you need on the same value and the framework will call them too.

type PreviewPanelDelegatePreviewPanelHandleEventHandler added in v0.17.0

type PreviewPanelDelegatePreviewPanelHandleEventHandler interface {
	PreviewPanelHandleEvent(panel *PreviewPanel, event obj.Object) bool
}

PreviewPanelDelegatePreviewPanelHandleEventHandler is the optional QLPreviewPanelDelegate method previewPanel:handleEvent:. Implement it on a PreviewPanelDelegate value to receive that callback; a value without it is simply never sent one.

type PreviewProvider added in v0.17.0

type PreviewProvider struct {
	objref.Handle
}

PreviewProvider is an idiomatic wrapper over the Objective-C class QLPreviewProvider.

A class that you subclass to provide a data-based Quick Look preview extension.

func NewPreviewProvider added in v0.17.0

func NewPreviewProvider() *PreviewProvider

NewPreviewProvider creates a new PreviewProvider.

func PreviewProviderFromID added in v0.17.0

func PreviewProviderFromID(id objc.ID) *PreviewProvider

PreviewProviderFromID adopts an existing Objective-C object as a PreviewProvider (nil for 0), retaining it and registering a release finalizer.

func (*PreviewProvider) Description added in v0.17.0

func (pp *PreviewProvider) Description() string

Description returns the object's -description text.

func (*PreviewProvider) IsEqual added in v0.17.0

func (pp *PreviewProvider) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*PreviewProvider) IsKind added in v0.17.0

func (pp *PreviewProvider) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*PreviewProvider) String added in v0.17.0

func (pp *PreviewProvider) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type PreviewReply added in v0.17.0

type PreviewReply struct {
	objref.Handle
}

PreviewReply is an idiomatic wrapper over the Objective-C class QLPreviewReply.

The class you create when providing a data-based Quick Look preview extension.

func NewPreviewReplyWithContextSizeIsBitmapDrawingBlock added in v0.18.0

func NewPreviewReplyWithContextSizeIsBitmapDrawingBlock(contextSize corefoundation.CGSize, isBitmap bool, drawingBlock func(unsafe.Pointer, obj.Object, unsafe.Pointer) bool) *PreviewReply

NewPreviewReplyWithContextSizeIsBitmapDrawingBlock use this method to provide a preview by drawing into a context.

func NewPreviewReplyWithFileURL added in v0.17.0

func NewPreviewReplyWithFileURL(fileURL string) *PreviewReply

NewPreviewReplyWithFileURL creates a preview reply from an existing file URL.

func PreviewReplyFromID added in v0.17.0

func PreviewReplyFromID(id objc.ID) *PreviewReply

PreviewReplyFromID adopts an existing Objective-C object as a PreviewReply (nil for 0), retaining it and registering a release finalizer.

func (*PreviewReply) Attachments added in v0.17.0

func (pr *PreviewReply) Attachments() map[string]*PreviewReplyAttachment

Attachments returns attachments for HTML data previews. The keys of the dictionary are the attachment identifiers (eg foo) that can be referenced with the cid:id URL (eg cid:foo).

func (*PreviewReply) Description added in v0.17.0

func (pr *PreviewReply) Description() string

Description returns the object's -description text.

func (*PreviewReply) IsEqual added in v0.17.0

func (pr *PreviewReply) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*PreviewReply) IsKind added in v0.17.0

func (pr *PreviewReply) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*PreviewReply) String added in v0.17.0

func (pr *PreviewReply) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*PreviewReply) StringEncoding added in v0.17.0

func (pr *PreviewReply) StringEncoding() int

StringEncoding returns string encoding for text or html based previews. Defaults to NSUTF8StringEncoding.

func (*PreviewReply) Title added in v0.17.0

func (pr *PreviewReply) Title() string

Title returns custom display title for the preview. If left as the empty string, QuickLook will use the file name.

func (*PreviewReply) WithAttachments added in v0.17.0

func (pr *PreviewReply) WithAttachments(attachments map[string]*PreviewReplyAttachment) *PreviewReply

WithAttachments sets the attachments for a preview reply that provide additional data for the system to display the preview.

func (*PreviewReply) WithStringEncoding added in v0.17.0

func (pr *PreviewReply) WithStringEncoding(stringEncoding int) *PreviewReply

WithStringEncoding sets string encoding for text or html based previews. Defaults to NSUTF8StringEncoding.

func (*PreviewReply) WithTitle added in v0.17.0

func (pr *PreviewReply) WithTitle(title string) *PreviewReply

WithTitle sets the title for the system to display with the preview.

type PreviewReplyAttachment added in v0.17.0

type PreviewReplyAttachment struct {
	objref.Handle
}

PreviewReplyAttachment is an idiomatic wrapper over the Objective-C class QLPreviewReplyAttachment.

An attachment for a Quick Look preview reply that provides additional content for the system to display a preview.

func NewPreviewReplyAttachmentWithDataContentType added in v0.17.0

func NewPreviewReplyAttachmentWithDataContentType(data []byte, contentType obj.Object) *PreviewReplyAttachment

NewPreviewReplyAttachmentWithDataContentType creates a preview reply attachment with the specified type.

func PreviewReplyAttachmentFromID added in v0.17.0

func PreviewReplyAttachmentFromID(id objc.ID) *PreviewReplyAttachment

PreviewReplyAttachmentFromID adopts an existing Objective-C object as a PreviewReplyAttachment (nil for 0), retaining it and registering a release finalizer.

func (*PreviewReplyAttachment) ContentType added in v0.17.0

func (pra *PreviewReplyAttachment) ContentType() obj.Object

ContentType returns the content type of the attachment for an html preview

func (*PreviewReplyAttachment) Data added in v0.17.0

func (pra *PreviewReplyAttachment) Data() []byte

Data returns the data content of an html preview

func (*PreviewReplyAttachment) Description added in v0.17.0

func (pra *PreviewReplyAttachment) Description() string

Description returns the object's -description text.

func (*PreviewReplyAttachment) IsEqual added in v0.17.0

func (pra *PreviewReplyAttachment) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*PreviewReplyAttachment) IsKind added in v0.17.0

func (pra *PreviewReplyAttachment) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*PreviewReplyAttachment) String added in v0.17.0

func (pra *PreviewReplyAttachment) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type PreviewView added in v0.17.0

type PreviewView struct {
	objref.Handle
}

PreviewView is an idiomatic wrapper over the Objective-C class QLPreviewView.

A Quick Look preview of an item that you can embed into your view hierarchy.

func NewPreviewViewWithFrame added in v0.17.0

func NewPreviewViewWithFrame(frame corefoundation.CGRect) *PreviewView

NewPreviewViewWithFrame creates a preview view with the provided frame.

func NewPreviewViewWithFrameStyle added in v0.17.0

func NewPreviewViewWithFrameStyle(frame corefoundation.CGRect, style PreviewViewStyle) *PreviewView

NewPreviewViewWithFrameStyle creates a preview view with the provided frame and style.

func PreviewViewFromID added in v0.17.0

func PreviewViewFromID(id objc.ID) *PreviewView

PreviewViewFromID adopts an existing Objective-C object as a PreviewView (nil for 0), retaining it and registering a release finalizer.

func (*PreviewView) Autostarts added in v0.17.0

func (pv *PreviewView) Autostarts() bool

Autostarts reports whether a Boolean value that determines whether the preview starts automatically. Set this property to allow previews of movie files to start playback automatically when displayed.

func (*PreviewView) Close added in v0.17.0

func (pv *PreviewView) Close()

Close closes the view, releasing the current preview item.

func (*PreviewView) Description added in v0.17.0

func (pv *PreviewView) Description() string

Description returns the object's -description text.

func (*PreviewView) DisplayState added in v0.17.0

func (pv *PreviewView) DisplayState() obj.Object

DisplayState returns the current display state of the <doc://com.apple.documentation/documentation/quicklookui/qlpreviewview/1504747-previewitem>. This property is an opaque object that Quick Look uses to get and set the current display state of the preview. The display state could be, for example, the currently displayed page, the zoom factor on an image, or the position in a movie. You can use this property to get and save the current display state of the preview before switching to another. This saving allows you to restore a preview later on when the user switches back to it.

func (*PreviewView) IsEqual added in v0.17.0

func (pv *PreviewView) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*PreviewView) IsKind added in v0.17.0

func (pv *PreviewView) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*PreviewView) RefreshPreviewItem added in v0.17.0

func (pv *PreviewView) RefreshPreviewItem()

RefreshPreviewItem updates the preview to display the currently previewed item.

func (*PreviewView) ShouldCloseWithWindow added in v0.17.0

func (pv *PreviewView) ShouldCloseWithWindow() bool

ShouldCloseWithWindow reports whether a Boolean value that determines whether the preview should close when its window closes. The default value of this property is <doc://com.apple.documentation/documentation/objectivec/yes>, which means that the preview automatically closes when its window closes. If you set this property to <doc://com.apple.documentation/documentation/objectivec/no>, close the preview by calling the “QuickLookUI/QLPreviewView/close“ method when finished with it. Once you close a “QuickLookUI/QLPreviewView“, it won’t accept any more preview items.

func (*PreviewView) String added in v0.17.0

func (pv *PreviewView) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*PreviewView) WithAutostarts added in v0.17.0

func (pv *PreviewView) WithAutostarts(autostarts bool) *PreviewView

WithAutostarts sets a Boolean value that determines whether the preview starts automatically.

func (*PreviewView) WithDisplayState added in v0.17.0

func (pv *PreviewView) WithDisplayState(displayState obj.Object) *PreviewView

WithDisplayState sets the current display state of the previewItem.

func (*PreviewView) WithShouldCloseWithWindow added in v0.17.0

func (pv *PreviewView) WithShouldCloseWithWindow(shouldCloseWithWindow bool) *PreviewView

WithShouldCloseWithWindow sets a Boolean value that determines whether the preview should close when its window closes.

type PreviewViewStyle added in v0.17.0

type PreviewViewStyle uint64

Styles for a Preview View.

const (
	// Provides the default preview style for larger, full-sized previews.
	PreviewViewStyleNormal PreviewViewStyle = 0
	// Provides a compact preview style suited for smaller previews or inspectors.
	PreviewViewStyleCompact PreviewViewStyle = 1
)

func (PreviewViewStyle) String added in v0.17.0

func (e PreviewViewStyle) String() string

String returns the PreviewViewStyle constant's name, or its numeric form when the value is not a known constant.

type PreviewingController added in v0.17.0

type PreviewingController interface {
}

PreviewingController is the Go form of the Objective-C protocol QLPreviewingController.

type PtrauthKey added in v0.17.0

type PtrauthKey int32
const (
	Ptrauth_key_none                     PtrauthKey = -1
	Ptrauth_key_asia                     PtrauthKey = 0
	Ptrauth_key_asib                     PtrauthKey = 1
	Ptrauth_key_asda                     PtrauthKey = 2
	Ptrauth_key_asdb                     PtrauthKey = 3
	Ptrauth_key_process_independent_code PtrauthKey = 0
	Ptrauth_key_process_dependent_code   PtrauthKey = 1
	Ptrauth_key_process_independent_data PtrauthKey = 2
	Ptrauth_key_process_dependent_data   PtrauthKey = 3
	Ptrauth_key_return_address           PtrauthKey = 1
	Ptrauth_key_frame_pointer            PtrauthKey = 3
	Ptrauth_key_function_pointer         PtrauthKey = 0
	Ptrauth_key_block_function           PtrauthKey = 0
	Ptrauth_key_cxx_vtable_pointer       PtrauthKey = 2
	Ptrauth_key_method_list_pointer      PtrauthKey = 2
	Ptrauth_key_objc_isa_pointer         PtrauthKey = 2
	Ptrauth_key_objc_super_pointer       PtrauthKey = 2
	Ptrauth_key_objc_sel_pointer         PtrauthKey = 3
	Ptrauth_key_objc_class_ro_pointer    PtrauthKey = 2
	Ptrauth_key_block_descriptor_pointer PtrauthKey = 2
	Ptrauth_key_init_fini_pointer        PtrauthKey = 0
)

func (PtrauthKey) String added in v0.17.0

func (e PtrauthKey) String() string

String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.

type QosClass added in v0.17.0

type QosClass uint32
const (
	QosClassUserInteractive QosClass = 33
	QosClassUserInitiated   QosClass = 25
	QosClassDefault         QosClass = 21
	QosClassUtility         QosClass = 17
	QosClassBackground      QosClass = 9
	QosClassUnspecified     QosClass = 0
)

func (QosClass) String added in v0.17.0

func (e QosClass) String() string

String returns the QosClass constant's name, or its numeric form when the value is not a known constant.

type Tag added in v0.17.0

type Tag int32
const (
	TagUndefinedTag  Tag = 0
	TagExtendedAllow Tag = 1
	TagExtendedDeny  Tag = 2
)

func (Tag) String added in v0.17.0

func (e Tag) String() string

String returns the Tag constant's name, or its numeric form when the value is not a known constant.

type Type added in v0.17.0

type Type int32
const (
	TypeExtended Type = 256
	TypeAccess   Type = 0
	TypeDefault  Type = 1
	TypeAfs      Type = 2
	TypeCoda     Type = 3
	TypeNtfs     Type = 4
	TypeNwfs     Type = 5
)

func (Type) String added in v0.17.0

func (e Type) String() string

String returns the Type constant's name, or its numeric form when the value is not a known constant.

type VirtualMemoryGuardExceptionCode added in v0.17.0

type VirtualMemoryGuardExceptionCode uint32
const (
	KGUARD_EXC_DEALLOC_GAP                   VirtualMemoryGuardExceptionCode = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        VirtualMemoryGuardExceptionCode = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         VirtualMemoryGuardExceptionCode = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    VirtualMemoryGuardExceptionCode = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    VirtualMemoryGuardExceptionCode = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         VirtualMemoryGuardExceptionCode = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         VirtualMemoryGuardExceptionCode = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  VirtualMemoryGuardExceptionCode = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    VirtualMemoryGuardExceptionCode = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              VirtualMemoryGuardExceptionCode = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        VirtualMemoryGuardExceptionCode = 99
	KGUARD_EXC_SEC_COPY_DENIED               VirtualMemoryGuardExceptionCode = 100
	KGUARD_EXC_SEC_SHARING_DENIED            VirtualMemoryGuardExceptionCode = 101
	KGUARD_EXC_MTE_SYNC_FAULT                VirtualMemoryGuardExceptionCode = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          VirtualMemoryGuardExceptionCode = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          VirtualMemoryGuardExceptionCode = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204
)

func (VirtualMemoryGuardExceptionCode) String added in v0.17.0

String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.

type XpcListenerCreateFlags added in v0.17.0

type XpcListenerCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcListenerCreateFlagsNone            XpcListenerCreateFlags = 0
	XpcListenerCreateFlagsInactive        XpcListenerCreateFlags = 1
	XpcListenerCreateFlagsForceMach       XpcListenerCreateFlags = 2
	XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4
)

func (XpcListenerCreateFlags) String added in v0.17.0

func (e XpcListenerCreateFlags) String() string

String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.

type XpcSessionCreateFlags added in v0.17.0

type XpcSessionCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcSessionCreateFlagsNone           XpcSessionCreateFlags = 0
	XpcSessionCreateFlagsInactive       XpcSessionCreateFlags = 1
	XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2
)

func (XpcSessionCreateFlags) String added in v0.17.0

func (e XpcSessionCreateFlags) String() string

String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL