actions

package
v0.12.5 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(instance CanSetAction, handler ActionHandler)

Set action for an ojbc instance, if it has hasTarget and setAction method.

Types

type ActionHandler

type ActionHandler func(sender objc.IObject)

ActionHandler is a callback function for an ActionTarget.

type ActionTarget

type ActionTarget struct {
	objc.Object
}

ActionTarget hold an objc ActionTarget target instance

func NewAction

func NewAction(handler ActionHandler) ActionTarget

NewAction create a new objc ActionTarget instance, from ActionHandler

type CanSetAction

type CanSetAction interface {
	SetTarget(target objc.IObject)
	SetAction(sel objc.Selector)
}

CanSetAction is an interface for objc instance which can set a target and action

Jump to

Keyboard shortcuts

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