Documentation
¶
Overview ¶
Package inputmethodkit provides a fluent Go API over the macOS InputMethodKit framework.
Index ¶
- type Candidates
- func (x *Candidates) AttachChildToCandidateType(child *raw.IMKCandidates, candidateIdentifier int, theType uint)
- func (x *Candidates) Attributes() *foundation.NSDictionary[objc.ID, objc.ID]
- func (x *Candidates) CandidateFrame() corefoundation.CGRect
- func (x *Candidates) CandidateIdentifierAtLineNumber(lineNumber int) int
- func (x *Candidates) CandidateStringIdentifier(candidateString objc.ID) int
- func (x *Candidates) ClearSelection()
- func (x *Candidates) DetachChild(candidateIdentifier int)
- func (x *Candidates) DismissesAutomatically() bool
- func (x *Candidates) Hide()
- func (x *Candidates) HideChild()
- func (x *Candidates) ID() objc.ID
- func (x *Candidates) IsVisible() bool
- func (x *Candidates) LineNumberForCandidateWithIdentifier(candidateIdentifier int) int
- func (x *Candidates) PanelType() uint
- func (x *Candidates) SelectCandidate(candidateIdentifier int)
- func (x *Candidates) SelectCandidateWithIdentifier(candidateIdentifier int) bool
- func (x *Candidates) SelectedCandidate() int
- func (x *Candidates) SelectedCandidateString() *foundation.NSAttributedString
- func (x *Candidates) SelectionKeys() *foundation.NSArray[objc.ID]
- func (x *Candidates) SelectionKeysKeylayout() unsafe.Pointer
- func (x *Candidates) SetAttributes(attributes *foundation.NSDictionary[objc.ID, objc.ID])
- func (x *Candidates) SetCandidateData(candidatesArray *foundation.NSArray[objc.ID])
- func (x *Candidates) SetCandidateFrameTopLeft(point corefoundation.CGPoint)
- func (x *Candidates) SetDismissesAutomatically(flag bool)
- func (x *Candidates) SetPanelType(panelType uint)
- func (x *Candidates) SetSelectionKeys(keyCodes *foundation.NSArray[objc.ID])
- func (x *Candidates) SetSelectionKeysKeylayout(layout unsafe.Pointer)
- func (x *Candidates) Show(locationHint uint)
- func (x *Candidates) ShowAnnotation(annotationString *foundation.NSAttributedString)
- func (x *Candidates) ShowCandidates()
- func (x *Candidates) ShowChild()
- func (x *Candidates) ShowSublistSubListDelegate(candidates *foundation.NSArray[objc.ID], delegate objc.ID)
- func (x *Candidates) Unwrap() *raw.IMKCandidates
- func (x *Candidates) UpdateCandidates()
- type Candidatesable
- type InputController
- func (x *InputController) AnnotationSelectedForCandidate(annotationString *foundation.NSAttributedString, ...)
- func (x *InputController) CancelComposition()
- func (x *InputController) CandidateSelected(candidateString *foundation.NSAttributedString)
- func (x *InputController) CandidateSelectionChanged(candidateString *foundation.NSAttributedString)
- func (x *InputController) Client() objc.ID
- func (x *InputController) CompositionAttributesAtRange(range_ foundation.NSRange) *foundation.NSMutableDictionary[objc.ID, objc.ID]
- func (x *InputController) Delegate() objc.ID
- func (x *InputController) DoCommandBySelectorCommandDictionary(aSelector objc.SEL, infoDictionary *foundation.NSDictionary[objc.ID, objc.ID])
- func (x *InputController) HidePalettes()
- func (x *InputController) ID() objc.ID
- func (x *InputController) InputControllerWillClose()
- func (x *InputController) MarkForStyleAtRange(style int, range_ foundation.NSRange) *foundation.NSDictionary[objc.ID, objc.ID]
- func (x *InputController) Menu() *appkit.NSMenu
- func (x *InputController) ReplacementRange() foundation.NSRange
- func (x *InputController) SelectionRange() foundation.NSRange
- func (x *InputController) Server() *Server
- func (x *InputController) SetDelegate(newDelegate objc.ID)
- func (x *InputController) Unwrap() *raw.IMKInputController
- func (x *InputController) UpdateComposition()
- type InputControllerable
- type Server
- type Serverable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Candidates ¶
type Candidates struct {
// contains filtered or unexported fields
}
Candidates wraps raw.IMKCandidates with a fluent Go API.
func CandidatesFromID ¶
func CandidatesFromID(id objc.ID) *Candidates
CandidatesFromID adopts an existing object pointer as a Candidates (nil for 0).
func NewCandidatesWithServerPanelType ¶
func NewCandidatesWithServerPanelType(server *raw.IMKServer, panelType uint) *Candidates
NewCandidatesWithServerPanelType creates a new Candidates.
func NewCandidatesWithServerPanelTypeStyleType ¶
func NewCandidatesWithServerPanelTypeStyleType(server *raw.IMKServer, panelType uint, style uint) *Candidates
NewCandidatesWithServerPanelTypeStyleType creates a new Candidates.
func (*Candidates) AttachChildToCandidateType ¶
func (x *Candidates) AttachChildToCandidateType(child *raw.IMKCandidates, candidateIdentifier int, theType uint)
AttachChildToCandidateType calls the underlying AttachChildToCandidateType.
func (*Candidates) Attributes ¶
func (x *Candidates) Attributes() *foundation.NSDictionary[objc.ID, objc.ID]
Attributes calls the underlying Attributes.
func (*Candidates) CandidateFrame ¶
func (x *Candidates) CandidateFrame() corefoundation.CGRect
CandidateFrame calls the underlying CandidateFrame.
func (*Candidates) CandidateIdentifierAtLineNumber ¶
func (x *Candidates) CandidateIdentifierAtLineNumber(lineNumber int) int
CandidateIdentifierAtLineNumber calls the underlying CandidateIdentifierAtLineNumber.
func (*Candidates) CandidateStringIdentifier ¶
func (x *Candidates) CandidateStringIdentifier(candidateString objc.ID) int
CandidateStringIdentifier calls the underlying CandidateStringIdentifier.
func (*Candidates) ClearSelection ¶
func (x *Candidates) ClearSelection()
ClearSelection calls the underlying ClearSelection.
func (*Candidates) DetachChild ¶
func (x *Candidates) DetachChild(candidateIdentifier int)
DetachChild calls the underlying DetachChild.
func (*Candidates) DismissesAutomatically ¶
func (x *Candidates) DismissesAutomatically() bool
DismissesAutomatically calls the underlying DismissesAutomatically.
func (*Candidates) HideChild ¶
func (x *Candidates) HideChild()
HideChild calls the underlying HideChild.
func (*Candidates) ID ¶
func (x *Candidates) ID() objc.ID
ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.
func (*Candidates) IsVisible ¶
func (x *Candidates) IsVisible() bool
IsVisible calls the underlying IsVisible.
func (*Candidates) LineNumberForCandidateWithIdentifier ¶
func (x *Candidates) LineNumberForCandidateWithIdentifier(candidateIdentifier int) int
LineNumberForCandidateWithIdentifier calls the underlying LineNumberForCandidateWithIdentifier.
func (*Candidates) PanelType ¶
func (x *Candidates) PanelType() uint
PanelType calls the underlying PanelType.
func (*Candidates) SelectCandidate ¶
func (x *Candidates) SelectCandidate(candidateIdentifier int)
SelectCandidate calls the underlying SelectCandidate.
func (*Candidates) SelectCandidateWithIdentifier ¶
func (x *Candidates) SelectCandidateWithIdentifier(candidateIdentifier int) bool
SelectCandidateWithIdentifier calls the underlying SelectCandidateWithIdentifier.
func (*Candidates) SelectedCandidate ¶
func (x *Candidates) SelectedCandidate() int
SelectedCandidate calls the underlying SelectedCandidate.
func (*Candidates) SelectedCandidateString ¶
func (x *Candidates) SelectedCandidateString() *foundation.NSAttributedString
SelectedCandidateString calls the underlying SelectedCandidateString.
func (*Candidates) SelectionKeys ¶
func (x *Candidates) SelectionKeys() *foundation.NSArray[objc.ID]
SelectionKeys calls the underlying SelectionKeys.
func (*Candidates) SelectionKeysKeylayout ¶
func (x *Candidates) SelectionKeysKeylayout() unsafe.Pointer
SelectionKeysKeylayout calls the underlying SelectionKeysKeylayout.
func (*Candidates) SetAttributes ¶
func (x *Candidates) SetAttributes(attributes *foundation.NSDictionary[objc.ID, objc.ID])
SetAttributes calls the underlying SetAttributes.
func (*Candidates) SetCandidateData ¶
func (x *Candidates) SetCandidateData(candidatesArray *foundation.NSArray[objc.ID])
SetCandidateData calls the underlying SetCandidateData.
func (*Candidates) SetCandidateFrameTopLeft ¶
func (x *Candidates) SetCandidateFrameTopLeft(point corefoundation.CGPoint)
SetCandidateFrameTopLeft calls the underlying SetCandidateFrameTopLeft.
func (*Candidates) SetDismissesAutomatically ¶
func (x *Candidates) SetDismissesAutomatically(flag bool)
SetDismissesAutomatically calls the underlying SetDismissesAutomatically.
func (*Candidates) SetPanelType ¶
func (x *Candidates) SetPanelType(panelType uint)
SetPanelType calls the underlying SetPanelType.
func (*Candidates) SetSelectionKeys ¶
func (x *Candidates) SetSelectionKeys(keyCodes *foundation.NSArray[objc.ID])
SetSelectionKeys calls the underlying SetSelectionKeys.
func (*Candidates) SetSelectionKeysKeylayout ¶
func (x *Candidates) SetSelectionKeysKeylayout(layout unsafe.Pointer)
SetSelectionKeysKeylayout calls the underlying SetSelectionKeysKeylayout.
func (*Candidates) Show ¶
func (x *Candidates) Show(locationHint uint)
Show calls the underlying Show.
func (*Candidates) ShowAnnotation ¶
func (x *Candidates) ShowAnnotation(annotationString *foundation.NSAttributedString)
ShowAnnotation calls the underlying ShowAnnotation.
func (*Candidates) ShowCandidates ¶
func (x *Candidates) ShowCandidates()
ShowCandidates calls the underlying ShowCandidates.
func (*Candidates) ShowChild ¶
func (x *Candidates) ShowChild()
ShowChild calls the underlying ShowChild.
func (*Candidates) ShowSublistSubListDelegate ¶
func (x *Candidates) ShowSublistSubListDelegate(candidates *foundation.NSArray[objc.ID], delegate objc.ID)
ShowSublistSubListDelegate calls the underlying ShowSublistSubListDelegate.
func (*Candidates) Unwrap ¶
func (x *Candidates) Unwrap() *raw.IMKCandidates
Unwrap returns the underlying raw.IMKCandidates.
func (*Candidates) UpdateCandidates ¶
func (x *Candidates) UpdateCandidates()
UpdateCandidates calls the underlying UpdateCandidates.
type Candidatesable ¶
type Candidatesable interface {
Unwrap() *raw.IMKCandidates
PanelType() uint
SetPanelType(panelType uint)
Show(locationHint uint)
Hide()
IsVisible() bool
UpdateCandidates()
ShowAnnotation(annotationString *foundation.NSAttributedString)
ShowSublistSubListDelegate(candidates *foundation.NSArray[objc.ID], delegate objc.ID)
CandidateFrame() corefoundation.CGRect
SetSelectionKeys(keyCodes *foundation.NSArray[objc.ID])
SelectionKeys() *foundation.NSArray[objc.ID]
SetSelectionKeysKeylayout(layout unsafe.Pointer)
SelectionKeysKeylayout() unsafe.Pointer
SetAttributes(attributes *foundation.NSDictionary[objc.ID, objc.ID])
Attributes() *foundation.NSDictionary[objc.ID, objc.ID]
SetDismissesAutomatically(flag bool)
DismissesAutomatically() bool
SelectedCandidate() int
SetCandidateFrameTopLeft(point corefoundation.CGPoint)
ShowChild()
HideChild()
AttachChildToCandidateType(child *raw.IMKCandidates, candidateIdentifier int, theType uint)
DetachChild(candidateIdentifier int)
SetCandidateData(candidatesArray *foundation.NSArray[objc.ID])
SelectCandidateWithIdentifier(candidateIdentifier int) bool
SelectCandidate(candidateIdentifier int)
ShowCandidates()
CandidateStringIdentifier(candidateString objc.ID) int
SelectedCandidateString() *foundation.NSAttributedString
CandidateIdentifierAtLineNumber(lineNumber int) int
LineNumberForCandidateWithIdentifier(candidateIdentifier int) int
ClearSelection()
}
Candidatesable is the interface implemented by Candidates, for mocking and DI.
type InputController ¶
type InputController struct {
// contains filtered or unexported fields
}
InputController wraps raw.IMKInputController with a fluent Go API.
func InputControllerFromID ¶
func InputControllerFromID(id objc.ID) *InputController
InputControllerFromID adopts an existing object pointer as a InputController (nil for 0).
func NewInputControllerWithServerDelegateClient ¶
func NewInputControllerWithServerDelegateClient(server *raw.IMKServer, delegate objc.ID, inputClient objc.ID) *InputController
NewInputControllerWithServerDelegateClient creates a new InputController.
func (*InputController) AnnotationSelectedForCandidate ¶
func (x *InputController) AnnotationSelectedForCandidate(annotationString *foundation.NSAttributedString, candidateString *foundation.NSAttributedString)
AnnotationSelectedForCandidate calls the underlying AnnotationSelectedForCandidate.
func (*InputController) CancelComposition ¶
func (x *InputController) CancelComposition()
CancelComposition calls the underlying CancelComposition.
func (*InputController) CandidateSelected ¶
func (x *InputController) CandidateSelected(candidateString *foundation.NSAttributedString)
CandidateSelected calls the underlying CandidateSelected.
func (*InputController) CandidateSelectionChanged ¶
func (x *InputController) CandidateSelectionChanged(candidateString *foundation.NSAttributedString)
CandidateSelectionChanged calls the underlying CandidateSelectionChanged.
func (*InputController) Client ¶
func (x *InputController) Client() objc.ID
Client calls the underlying Client.
func (*InputController) CompositionAttributesAtRange ¶
func (x *InputController) CompositionAttributesAtRange(range_ foundation.NSRange) *foundation.NSMutableDictionary[objc.ID, objc.ID]
CompositionAttributesAtRange calls the underlying CompositionAttributesAtRange.
func (*InputController) Delegate ¶
func (x *InputController) Delegate() objc.ID
Delegate calls the underlying Delegate.
func (*InputController) DoCommandBySelectorCommandDictionary ¶
func (x *InputController) DoCommandBySelectorCommandDictionary(aSelector objc.SEL, infoDictionary *foundation.NSDictionary[objc.ID, objc.ID])
DoCommandBySelectorCommandDictionary calls the underlying DoCommandBySelectorCommandDictionary.
func (*InputController) HidePalettes ¶
func (x *InputController) HidePalettes()
HidePalettes calls the underlying HidePalettes.
func (*InputController) ID ¶
func (x *InputController) ID() objc.ID
ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.
func (*InputController) InputControllerWillClose ¶
func (x *InputController) InputControllerWillClose()
InputControllerWillClose calls the underlying InputControllerWillClose.
func (*InputController) MarkForStyleAtRange ¶
func (x *InputController) MarkForStyleAtRange(style int, range_ foundation.NSRange) *foundation.NSDictionary[objc.ID, objc.ID]
MarkForStyleAtRange calls the underlying MarkForStyleAtRange.
func (*InputController) Menu ¶
func (x *InputController) Menu() *appkit.NSMenu
Menu calls the underlying Menu.
func (*InputController) ReplacementRange ¶
func (x *InputController) ReplacementRange() foundation.NSRange
ReplacementRange calls the underlying ReplacementRange.
func (*InputController) SelectionRange ¶
func (x *InputController) SelectionRange() foundation.NSRange
SelectionRange calls the underlying SelectionRange.
func (*InputController) Server ¶
func (x *InputController) Server() *Server
Server calls the underlying Server.
func (*InputController) SetDelegate ¶
func (x *InputController) SetDelegate(newDelegate objc.ID)
SetDelegate calls the underlying SetDelegate.
func (*InputController) Unwrap ¶
func (x *InputController) Unwrap() *raw.IMKInputController
Unwrap returns the underlying raw.IMKInputController.
func (*InputController) UpdateComposition ¶
func (x *InputController) UpdateComposition()
UpdateComposition calls the underlying UpdateComposition.
type InputControllerable ¶
type InputControllerable interface {
Unwrap() *raw.IMKInputController
UpdateComposition()
CancelComposition()
CompositionAttributesAtRange(range_ foundation.NSRange) *foundation.NSMutableDictionary[objc.ID, objc.ID]
SelectionRange() foundation.NSRange
ReplacementRange() foundation.NSRange
MarkForStyleAtRange(style int, range_ foundation.NSRange) *foundation.NSDictionary[objc.ID, objc.ID]
DoCommandBySelectorCommandDictionary(aSelector objc.SEL, infoDictionary *foundation.NSDictionary[objc.ID, objc.ID])
HidePalettes()
Menu() *appkit.NSMenu
Delegate() objc.ID
SetDelegate(newDelegate objc.ID)
Server() *Server
Client() objc.ID
InputControllerWillClose()
AnnotationSelectedForCandidate(annotationString *foundation.NSAttributedString, candidateString *foundation.NSAttributedString)
CandidateSelectionChanged(candidateString *foundation.NSAttributedString)
CandidateSelected(candidateString *foundation.NSAttributedString)
}
InputControllerable is the interface implemented by InputController, for mocking and DI.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps raw.IMKServer with a fluent Go API.
func NewServerWithNameBundleIdentifier ¶
NewServerWithNameBundleIdentifier creates a new Server.
func NewServerWithNameControllerClassDelegateClass ¶
func NewServerWithNameControllerClassDelegateClass(name string, controllerClassID objc.Class, delegateClassID objc.Class) *Server
NewServerWithNameControllerClassDelegateClass creates a new Server.
func ServerFromID ¶
ServerFromID adopts an existing object pointer as a Server (nil for 0).
func (*Server) Bundle ¶
func (x *Server) Bundle() *foundation.NSBundle
Bundle calls the underlying Bundle.
func (*Server) ID ¶
ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.
func (*Server) LastKeyEventWasDeadKey ¶
LastKeyEventWasDeadKey calls the underlying LastKeyEventWasDeadKey.
func (*Server) PaletteWillTerminate ¶
PaletteWillTerminate calls the underlying PaletteWillTerminate.
type Serverable ¶
type Serverable interface {
Unwrap() *raw.IMKServer
Bundle() *foundation.NSBundle
PaletteWillTerminate() bool
LastKeyEventWasDeadKey() bool
}
Serverable is the interface implemented by Server, for mocking and DI.