inputmethodkit

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: 12 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package inputmethodkit provides a fluent Go API over the macOS InputMethodKit 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.

Index

Constants

View Source
const (
	KIMKAnnotation                          = 1
	KIMKLocateCandidatesAboveHint           = 1
	KIMKLocateCandidatesBelowHint           = 2
	KIMKLocateCandidatesLeftHint            = 3
	KIMKLocateCandidatesRightHint           = 4
	KIMKMain                                = 0
	KIMKScrollingGridCandidatePanel         = 2
	KIMKSingleColumnScrollingCandidatePanel = 1
	KIMKSingleRowSteppingCandidatePanel     = 3
	KIMKSubList                             = 2
)

Variables

This section is empty.

Functions

func IMKCandidatesOpacityAttributeName

func IMKCandidatesOpacityAttributeName() obj.Object

IMKCandidatesOpacityAttributeName returns the string constant IMKCandidatesOpacityAttributeName, for use as a dictionary key or argument.

func IMKCandidatesSendServerKeyEventFirst

func IMKCandidatesSendServerKeyEventFirst() obj.Object

IMKCandidatesSendServerKeyEventFirst returns the string constant IMKCandidatesSendServerKeyEventFirst, for use as a dictionary key or argument.

func IMKControllerClass

func IMKControllerClass() obj.Object

IMKControllerClass returns the string constant IMKControllerClass, for use as a dictionary key or argument.

func IMKDelegateClass

func IMKDelegateClass() obj.Object

IMKDelegateClass returns the string constant IMKDelegateClass, for use as a dictionary key or argument.

func IMKModeDictionary

func IMKModeDictionary() obj.Object

IMKModeDictionary returns the string constant IMKModeDictionary, for use as a dictionary key or argument.

func KIMKCommandClientName

func KIMKCommandClientName() obj.Object

KIMKCommandClientName returns the string constant kIMKCommandClientName, for use as a dictionary key or argument.

func KIMKCommandMenuItemName

func KIMKCommandMenuItemName() obj.Object

KIMKCommandMenuItemName returns the string constant kIMKCommandMenuItemName, for use as a dictionary key or argument.

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 Candidates added in v0.17.0

type Candidates struct {
	objref.Handle
}

Candidates is an idiomatic wrapper over the Objective-C class IMKCandidates.

The IMKCandidates class presents candidates to users and notifies the appropriate IMKInputController object when the user selects a candidate. Candidates are alternate characters for a given input sequence. The IMKCandidates class supports using a candidates window in your input method; using IMKCandidates is optional. Not all input methods require them.

func CandidatesFromID added in v0.17.0

func CandidatesFromID(id objc.ID) *Candidates

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

func NewCandidatesWithServerPanelType added in v0.17.0

func NewCandidatesWithServerPanelType(server *Server, panelType int) *Candidates

NewCandidatesWithServerPanelType returns the initialized IMKCandidates object.

func NewCandidatesWithServerPanelTypeStyleType added in v0.17.0

func NewCandidatesWithServerPanelTypeStyleType(server *Server, panelType int, style int) *Candidates

NewCandidatesWithServerPanelTypeStyleType creates a new Candidates.

func (*Candidates) AttachChildToCandidateType added in v0.17.0

func (c *Candidates) AttachChildToCandidateType(child *Candidates, candidateIdentifier int, theType int)

AttachChildToCandidateType attach an IMKCandidates object to the specified selection. The IMKCandidate can be a sublist or an annotation.

func (*Candidates) Attributes added in v0.17.0

func (c *Candidates) Attributes() obj.Object

Attributes returns a dictionary of the style attributes used for the candidates window..

func (*Candidates) CandidateFrame added in v0.17.0

func (c *Candidates) CandidateFrame() corefoundation.CGRect

CandidateFrame returns the candidate frame.

func (*Candidates) CandidateIdentifierAtLineNumber added in v0.17.0

func (c *Candidates) CandidateIdentifierAtLineNumber(lineNumber int) int

CandidateIdentifierAtLineNumber returns the candidate identifier for a given line in the candidate window display. Maps the lineNumber to a candidate identifier. Line number 0 corresponds to the candidate in the cell currently in the first (top for vertical) line of the candidate window. This is convienient for input methods that support selecting a candidate by a number key. Line Number values depend on the column arrangement of your candidate. If you are displaying a single column candidate window, lines that have been scrolled out of view will have negative values. For a single row grid line, numbers will correspond to the cell's position in the row (i.e. the first cell will be 0, the second 1, etc). Finally, for a grid, the line numbers correspond to the grid row. If the line number is invalid, NSNotFound is returned.

func (*Candidates) CandidateStringIdentifier added in v0.17.0

func (c *Candidates) CandidateStringIdentifier(candidateString obj.Object) int

CandidateStringIdentifier map a candidateString to an identifier. Beginning with MacOS 10.7, candidate strings are mapped internally to an unique identifier of type NSInteger. Using identifiers to identify a particular candidate is the first stage of enabling data types other than NSString and NSAttributedString for containing the contents of a candidate.

func (*Candidates) ClearSelection added in v0.17.0

func (c *Candidates) ClearSelection()

ClearSelection clears selection.

func (*Candidates) Description added in v0.17.0

func (c *Candidates) Description() string

Description returns the object's -description text.

func (*Candidates) DetachChild added in v0.17.0

func (c *Candidates) DetachChild(candidateIdentifier int)

DetachChild detach the IMKCandidates object attached to candidate

func (*Candidates) DismissesAutomatically added in v0.17.0

func (c *Candidates) DismissesAutomatically() bool

DismissesAutomatically reports whether returns the state of the flag that determines whether the candidates window dismisses automatically.

func (*Candidates) Hide added in v0.17.0

func (c *Candidates) Hide()

Hide hides a candidates window, if it is visible.

func (*Candidates) HideChild added in v0.17.0

func (c *Candidates) HideChild()

HideChild if the current selection has a child IMKCandidates that is being shown hide it. Typically a client will not need to call this as IMKCandidates automatically hides and shows children.

func (*Candidates) IsEqual added in v0.17.0

func (c *Candidates) IsEqual(other obj.Object) bool

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

func (*Candidates) IsKind added in v0.17.0

func (c *Candidates) IsKind(className string) bool

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

func (*Candidates) IsVisible added in v0.17.0

func (c *Candidates) IsVisible() bool

IsVisible reports whether the candidates window is visible.

func (*Candidates) LineNumberForCandidateWithIdentifier added in v0.17.0

func (c *Candidates) LineNumberForCandidateWithIdentifier(candidateIdentifier int) int

LineNumberForCandidateWithIdentifier returns the line number for a given CandidateID. If the cell that contains the candidate is at the top line of the candidate window, the return value will be 0.

func (*Candidates) PanelType added in v0.17.0

func (c *Candidates) PanelType() int

PanelType returns the style of the candidates window.

func (*Candidates) SelectCandidate added in v0.17.0

func (c *Candidates) SelectCandidate(candidateIdentifier int)

SelectCandidate selects candidate.

func (*Candidates) SelectCandidateWithIdentifier added in v0.17.0

func (c *Candidates) SelectCandidateWithIdentifier(candidateIdentifier int) bool

SelectCandidateWithIdentifier select the candidate whose identifier matches the identifier parameter.

func (*Candidates) SelectedCandidate added in v0.17.0

func (c *Candidates) SelectedCandidate() int

SelectedCandidate returns the currently selected candidate identifer. Attempts to determine the identifier for the selected candidate. If there is no selection the return value will be NSNotFound.

func (*Candidates) SelectedCandidateString added in v0.17.0

func (c *Candidates) SelectedCandidateString() *foundation.AttributedString

SelectedCandidateString returns the currently selected candidate string. Attempts to determine the string for the selected candidate. If there is no selection the return value can be nil. The attributed string is an autoreleased object.

func (*Candidates) SelectionKeys added in v0.17.0

func (c *Candidates) SelectionKeys() obj.Object

SelectionKeys returns an array of NSNumber objects where each NSNumber object represents a virtual key code.

func (*Candidates) SelectionKeysKeylayout added in v0.17.0

func (c *Candidates) SelectionKeysKeylayout() obj.Object

SelectionKeysKeylayout returns the key layout that maps virtual key codes to selection keys.

func (*Candidates) SetAttributes added in v0.17.0

func (c *Candidates) SetAttributes(attributes obj.Object)

SetAttributes sets the style attributes for the candidates window.

func (*Candidates) SetCandidateData added in v0.17.0

func (c *Candidates) SetCandidateData(candidatesArray obj.Object)

SetCandidateData set the candidates data directly rather than supplying data via [IMKInputContoller candidates:]. The elements of the array can be strings or attributed strings.

func (*Candidates) SetCandidateFrameTopLeft added in v0.17.0

func (c *Candidates) SetCandidateFrameTopLeft(point corefoundation.CGPoint)

SetCandidateFrameTopLeft positions the top-left corner of the candidate window’s frame rectangle at a given point in screen coordinates.

func (*Candidates) SetDismissesAutomatically added in v0.17.0

func (c *Candidates) SetDismissesAutomatically(flag bool)

SetDismissesAutomatically sets the state of the flag that determines whether the candidates window dismisses automatically.

func (*Candidates) SetPanelType added in v0.17.0

func (c *Candidates) SetPanelType(panelType int)

SetPanelType sets the style of the candidates window.

func (*Candidates) SetSelectionKeys added in v0.17.0

func (c *Candidates) SetSelectionKeys(keyCodes obj.Object)

SetSelectionKeys sets the selection keys for the candidates.

func (*Candidates) SetSelectionKeysKeylayout added in v0.17.0

func (c *Candidates) SetSelectionKeysKeylayout(layout obj.Object)

SetSelectionKeysKeylayout sets the key layout that is used to map virtual key codes to characters.

func (*Candidates) Show added in v0.17.0

func (c *Candidates) Show(locationHint int)

Show shows the candidates window.

func (*Candidates) ShowAnnotation added in v0.17.0

func (c *Candidates) ShowAnnotation(annotationString obj.Object)

ShowAnnotation displays an annotation string in an annotation window.

func (*Candidates) ShowCandidates added in v0.17.0

func (c *Candidates) ShowCandidates()

ShowCandidates show the candidate window. This simply shows the candidates. No effort is made to position the candidate. The caller should move the candidate window to an appropriate location prior to showing.

func (*Candidates) ShowChild added in v0.17.0

func (c *Candidates) ShowChild()

ShowChild if the current selection has a child IMKCandidates object that will be shown. If there is a failure in showing the child this method will throw an exception.

func (*Candidates) ShowSublistSubListDelegate added in v0.17.0

func (c *Candidates) ShowSublistSubListDelegate(candidates obj.Object, delegate obj.Object)

ShowSublistSubListDelegate shows sublist sub list delegate.

func (*Candidates) String added in v0.17.0

func (c *Candidates) String() string

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

func (*Candidates) UpdateCandidates added in v0.17.0

func (c *Candidates) UpdateCandidates()

UpdateCandidates updates the candidates that are displayed in the candidates window.

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 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 InputController added in v0.17.0

type InputController struct {
	objref.Handle
}

InputController is an idiomatic wrapper over the Objective-C class IMKInputController.

The IMKInputController class provides a base class for custom input controller classes. The IMKServer class, which is allocated in the main function of an input method, creates an input controller object for each input session created by a client application. For every input session there is a corresponding IMKInputController object.

func InputControllerFromID added in v0.17.0

func InputControllerFromID(id objc.ID) *InputController

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

func NewInputControllerWithServerDelegateClient added in v0.17.0

func NewInputControllerWithServerDelegateClient(server *Server, delegate obj.Object, inputClient obj.Object) *InputController

NewInputControllerWithServerDelegateClient initializes the input control by setting the delegate.

func (*InputController) AnnotationSelectedForCandidate added in v0.17.0

func (ic *InputController) AnnotationSelectedForCandidate(annotationString obj.Object, candidateString obj.Object)

AnnotationSelectedForCandidate sends the selected candidate string and annotation string to the input controller.

func (*InputController) CancelComposition added in v0.17.0

func (ic *InputController) CancelComposition()

CancelComposition stops the current composition and replaces marked text with the original text.

func (*InputController) CandidateSelected added in v0.17.0

func (ic *InputController) CandidateSelected(candidateString obj.Object)

CandidateSelected informs an input controller that a new candidate is selected.

func (*InputController) CandidateSelectionChanged added in v0.17.0

func (ic *InputController) CandidateSelectionChanged(candidateString obj.Object)

CandidateSelectionChanged informs an input controller that the current candidate selection in the candidate window has changed.

func (*InputController) Client added in v0.17.0

func (ic *InputController) Client() obj.Object

Client returns the client object associated with the input controller.

func (*InputController) CompositionAttributesAtRange added in v0.17.0

func (ic *InputController) CompositionAttributesAtRange(range_ foundation.NSRange) obj.Object

CompositionAttributesAtRange returns a dictionary of text attributes.

func (*InputController) Delegate added in v0.17.0

func (ic *InputController) Delegate() obj.Object

Delegate returns the delegate for input controller object.

func (*InputController) Description added in v0.17.0

func (ic *InputController) Description() string

Description returns the object's -description text.

func (*InputController) HidePalettes added in v0.17.0

func (ic *InputController) HidePalettes()

HidePalettes informs an input method that it should close any visible user interface.

func (*InputController) InputControllerWillClose added in v0.17.0

func (ic *InputController) InputControllerWillClose()

InputControllerWillClose called to notify an input controller that it is about to be closed.

func (*InputController) IsEqual added in v0.17.0

func (ic *InputController) IsEqual(other obj.Object) bool

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

func (*InputController) IsKind added in v0.17.0

func (ic *InputController) IsKind(className string) bool

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

func (*InputController) MarkForStyleAtRange added in v0.17.0

func (ic *InputController) MarkForStyleAtRange(style int, range_ foundation.NSRange) obj.Object

MarkForStyleAtRange returns a dictionary of text attributes that can mark a range of an attributed string to send to a client.

func (*InputController) Menu added in v0.17.0

func (ic *InputController) Menu() obj.Object

Menu returns a menu of commands that are specific to an input method.

func (*InputController) ReplacementRange added in v0.17.0

func (ic *InputController) ReplacementRange() foundation.NSRange

ReplacementRange returns the range in the client document that the text should replace.

func (*InputController) SelectionRange added in v0.17.0

func (ic *InputController) SelectionRange() foundation.NSRange

SelectionRange returns where the range of the selection that should be placed inside marked text.

func (*InputController) Server added in v0.17.0

func (ic *InputController) Server() *Server

Server returns the server object that manages the input controller.

func (*InputController) SetDelegate added in v0.17.0

func (ic *InputController) SetDelegate(newDelegate obj.Object)

SetDelegate sets the delegate for input controller object.

func (*InputController) String added in v0.17.0

func (ic *InputController) String() string

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

func (*InputController) UpdateComposition added in v0.17.0

func (ic *InputController) UpdateComposition()

UpdateComposition informs the input controller that the composition has changed.

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 MouseHandling added in v0.17.0

type MouseHandling interface {
	MouseDownOnCharacterIndexCoordinateWithModifierContinueTrackingClient(index int, point corefoundation.CGPoint, flags int, keepTracking obj.Object, sender obj.Object) bool
	MouseUpOnCharacterIndexCoordinateWithModifierClient(index int, point corefoundation.CGPoint, flags int, sender obj.Object) bool
	MouseMovedOnCharacterIndexCoordinateWithModifierClient(index int, point corefoundation.CGPoint, flags int, sender obj.Object) bool
}

MouseHandling is the Go form of the Objective-C protocol IMKMouseHandling.

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 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 Server added in v0.17.0

type Server struct {
	objref.Handle
}

Server is an idiomatic wrapper over the Objective-C class IMKServer.

The IMKServer class manages client connections to your input method. When you write the main function for your input method, you create an IMKServer object. You should never need to override this class.

func NewServerWithNameBundleIdentifier added in v0.17.0

func NewServerWithNameBundleIdentifier(name string, bundleIdentifier string) *Server

NewServerWithNameBundleIdentifier creates and returns a server object from property list information contained in the provided bundle.

func ServerFromID added in v0.17.0

func ServerFromID(id objc.ID) *Server

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

func (*Server) Bundle added in v0.17.0

func (s *Server) Bundle() *foundation.Bundle

Bundle returns an NSBundle object for the input method.

func (*Server) Description added in v0.17.0

func (s *Server) Description() string

Description returns the object's -description text.

func (*Server) IsEqual added in v0.17.0

func (s *Server) IsEqual(other obj.Object) bool

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

func (*Server) IsKind added in v0.17.0

func (s *Server) IsKind(className string) bool

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

func (*Server) LastKeyEventWasDeadKey added in v0.17.0

func (s *Server) LastKeyEventWasDeadKey() bool

LastKeyEventWasDeadKey reports whether returns a BOOL indicating whether or not the last key press was a dead key.

func (*Server) PaletteWillTerminate added in v0.17.0

func (s *Server) PaletteWillTerminate() bool

PaletteWillTerminate reports whether call this before terminating a palette IM. Palettes need to be able to terminate. When this method is called the IMKServer will notify each client of the palette that the palette is about to terminate. The palette can terminate safely if a value of true is returned. If the caller of this method is not an input method of type palette an exception will be thrown. If the method returns false the palette should not terminate.

func (*Server) String added in v0.17.0

func (s *Server) String() string

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

type ServerProxy added in v0.17.0

type ServerProxy interface {
}

ServerProxy is the Go form of the Objective-C protocol IMKServerProxy.

type StateSetting added in v0.17.0

type StateSetting interface {
	ActivateServer(sender obj.Object)
	DeactivateServer(sender obj.Object)
	ValueForTagClient(tag int, sender obj.Object) obj.Object
	SetValueForTagClient(value obj.Object, tag int, sender obj.Object)
	Modes(sender obj.Object) obj.Object
	RecognizedEvents(sender obj.Object) int
	ShowPreferences(sender obj.Object)
}

StateSetting is the Go form of the Objective-C protocol IMKStateSetting.

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