ScriptExtension

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsScriptExtension() Instance
}

type ArgumentDoc

type ArgumentDoc struct {
	Name         string `gd:"name"`
	Type         string `gd:"type"`
	Enumeration  string `gd:"enumeration"`
	IsBitfield   bool   `gd:"is_bitfield"`
	DefaultValue string `gd:"default_value"`
}

type ClassDoc

type ClassDoc struct {
	Name                string             `gd:"name"`
	Inherits            string             `gd:"inherits"`
	BriefDescription    string             `gd:"brief_description"`
	Description         string             `gd:"description"`
	Keywords            string             `gd:"keywords"`
	Tutorials           []TutorialDoc      `gd:"tutorials"`
	Constructors        []MethodDoc        `gd:"constructors"`
	Methods             []MethodDoc        `gd:"methods"`
	Operators           []MethodDoc        `gd:"operators"`
	Signals             []MethodDoc        `gd:"signals"`
	Constants           []ConstantDoc      `gd:"constants"`
	Enums               map[string]EnumDoc `gd:"enums"`
	Properties          []PropertyDoc      `gd:"properties"`
	Annotations         []MethodDoc        `gd:"annotations"`
	ThemeProperties     []ThemeItemDoc     `gd:"theme_properties"`
	IsDeprecated        bool               `gd:"is_deprecated"`
	DeprecatedMessage   string             `gd:"deprecated_message"`
	IsExperimental      bool               `gd:"is_experimental"`
	ExperimentalMessage string             `gd:"experimental_message"`
	IsScriptDoc         bool               `gd:"is_script_doc"`
	ScriptPath          string             `gd:"script_path"`
}

type ConstantDoc

type ConstantDoc struct {
	Name                string `gd:"name"`
	Value               string `gd:"value"`
	IsValueValid        bool   `gd:"is_value_valid"`
	Type                string `gd:"type"`
	Enumeration         string `gd:"enumeration"`
	IsBitfield          bool   `gd:"is_bitfield"`
	Description         string `gd:"description"`
	IsDeprecated        bool   `gd:"is_deprecated"`
	DeprecatedMessage   string `gd:"deprecated_message"`
	IsExperimental      bool   `gd:"is_experimental"`
	ExperimentalMessage string `gd:"experimental_message"`
	Keywords            string `gd:"keywords"`
}

type EnumDoc

type EnumDoc struct {
	Description         string `gd:"description"`
	IsDeprecated        bool   `gd:"is_deprecated"`
	DeprecatedMessage   string `gd:"deprecated_message"`
	IsExperimental      bool   `gd:"is_experimental"`
	ExperimentalMessage string `gd:"experimental_message"`
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create a Go extension of this class.

T must be a type that is embedding this Extension as the first field. It is unsafe and invalid to use this type directly, or embedded in any other way. See Interface for methods that can be overridden by T.

func (*Extension[T]) AsObject

func (o *Extension[T]) AsObject() [1]gdreference.Object

func (*Extension[T]) AsRefCounted

func (o *Extension[T]) AsRefCounted() ie.RC

func (*Extension[T]) AsResource

func (o *Extension[T]) AsResource() Resource.Instance

func (*Extension[T]) AsScript

func (o *Extension[T]) AsScript() Script.Instance

func (*Extension[T]) AsScriptExtension

func (o *Extension[T]) AsScriptExtension() Instance

func (*Extension[T]) CanInstantiate

func (o *Extension[T]) CanInstantiate() bool

CanInstantiate is promoted from Script.Instance.CanInstantiate.

func (*Extension[T]) EmitChanged

func (o *Extension[T]) EmitChanged()

EmitChanged is promoted from Resource.Instance.EmitChanged.

func (*Extension[T]) GetBaseScript

func (o *Extension[T]) GetBaseScript() Script.Instance

GetBaseScript is promoted from Script.Instance.GetBaseScript.

func (*Extension[T]) GetGlobalName

func (o *Extension[T]) GetGlobalName() string

GetGlobalName is promoted from Script.Instance.GetGlobalName.

func (*Extension[T]) GetIdForPath

func (o *Extension[T]) GetIdForPath(path string) string

GetIdForPath is promoted from Resource.Instance.GetIdForPath.

func (*Extension[T]) GetInstanceBaseType

func (o *Extension[T]) GetInstanceBaseType() string

GetInstanceBaseType is promoted from Script.Instance.GetInstanceBaseType.

func (*Extension[T]) GetPropertyDefaultValue

func (o *Extension[T]) GetPropertyDefaultValue(property string) any

GetPropertyDefaultValue is promoted from Script.Instance.GetPropertyDefaultValue.

func (*Extension[T]) GetRid

func (o *Extension[T]) GetRid() Resource.ID

GetRid is promoted from Resource.Instance.GetRid.

func (*Extension[T]) GetRpcConfig

func (o *Extension[T]) GetRpcConfig() any

GetRpcConfig is promoted from Script.Instance.GetRpcConfig.

func (*Extension[T]) GetScriptConstantMap

func (o *Extension[T]) GetScriptConstantMap() map[string]any

GetScriptConstantMap is promoted from Script.Instance.GetScriptConstantMap.

func (*Extension[T]) GetScriptMethodList

func (o *Extension[T]) GetScriptMethodList() []Object.PropertyInfo

GetScriptMethodList is promoted from Script.Instance.GetScriptMethodList.

func (*Extension[T]) GetScriptPropertyList

func (o *Extension[T]) GetScriptPropertyList() []Object.PropertyInfo

GetScriptPropertyList is promoted from Script.Instance.GetScriptPropertyList.

func (*Extension[T]) GetScriptSignalList

func (o *Extension[T]) GetScriptSignalList() []Script.SignalInfo

GetScriptSignalList is promoted from Script.Instance.GetScriptSignalList.

func (*Extension[T]) HasScriptSignal

func (o *Extension[T]) HasScriptSignal(signal_name string) bool

HasScriptSignal is promoted from Script.Instance.HasScriptSignal.

func (*Extension[T]) HasSourceCode

func (o *Extension[T]) HasSourceCode() bool

HasSourceCode is promoted from Script.Instance.HasSourceCode.

func (*Extension[T]) InstanceHas

func (o *Extension[T]) InstanceHas(base_object Object.Instance) bool

InstanceHas is promoted from Script.Instance.InstanceHas.

func (*Extension[T]) IsAbstract

func (o *Extension[T]) IsAbstract() bool

IsAbstract is promoted from Script.Instance.IsAbstract.

func (*Extension[T]) IsBuiltIn

func (o *Extension[T]) IsBuiltIn() bool

IsBuiltIn is promoted from Resource.Instance.IsBuiltIn.

func (*Extension[T]) IsTool

func (o *Extension[T]) IsTool() bool

IsTool is promoted from Script.Instance.IsTool.

func (*Extension[T]) OnChanged

func (o *Extension[T]) OnChanged(cb func(), flags ...Signal.Flags) *Extension[T]

OnChanged is promoted from Resource.Instance.OnChanged.

func (*Extension[T]) OnSetupLocalToSceneRequested

func (o *Extension[T]) OnSetupLocalToSceneRequested(cb func(), flags ...Signal.Flags) *Extension[T]

OnSetupLocalToSceneRequested is promoted from Resource.Instance.OnSetupLocalToSceneRequested.

func (*Extension[T]) ResetState

func (o *Extension[T]) ResetState()

ResetState is promoted from Resource.Instance.ResetState.

func (*Extension[T]) ResourceLocalToScene

func (o *Extension[T]) ResourceLocalToScene() bool

func (*Extension[T]) ResourceName

func (o *Extension[T]) ResourceName() string

func (*Extension[T]) ResourcePath

func (o *Extension[T]) ResourcePath() string

func (*Extension[T]) ResourceSceneUniqueId

func (o *Extension[T]) ResourceSceneUniqueId() string

func (*Extension[T]) SetIdForPath

func (o *Extension[T]) SetIdForPath(path string, id string) *Extension[T]

SetIdForPath is promoted from Resource.Instance.SetIdForPath.

func (*Extension[T]) SetPathCache

func (o *Extension[T]) SetPathCache(path string) *Extension[T]

SetPathCache is promoted from Resource.Instance.SetPathCache.

func (*Extension[T]) SetResourceLocalToScene

func (o *Extension[T]) SetResourceLocalToScene(value bool) *Extension[T]

func (*Extension[T]) SetResourceName

func (o *Extension[T]) SetResourceName(value string) *Extension[T]

func (*Extension[T]) SetResourcePath

func (o *Extension[T]) SetResourcePath(value string) *Extension[T]

func (*Extension[T]) SetResourceSceneUniqueId

func (o *Extension[T]) SetResourceSceneUniqueId(value string) *Extension[T]

func (*Extension[T]) SetSourceCode

func (o *Extension[T]) SetSourceCode(value string) *Extension[T]

func (*Extension[T]) SetupLocalToScene

func (o *Extension[T]) SetupLocalToScene()

SetupLocalToScene is promoted from Resource.Instance.SetupLocalToScene.

func (*Extension[T]) SourceCode

func (o *Extension[T]) SourceCode() string

func (*Extension[T]) TakeOverPath

func (o *Extension[T]) TakeOverPath(path string)

TakeOverPath is promoted from Resource.Instance.TakeOverPath.

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Implementation

type Implementation = implementation

Implementation implements Interface with empty methods.

type Instance

type Instance [1]gdclass.ScriptExtension

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsObject

func (o Instance) AsObject() [1]gdreference.Object

func (Instance) AsRefCounted

func (o Instance) AsRefCounted() ie.RC

func (Instance) AsResource

func (o Instance) AsResource() Resource.Instance

func (Instance) AsScript

func (o Instance) AsScript() Script.Instance

func (Instance) AsScriptExtension

func (o Instance) AsScriptExtension() Instance

func (Instance) EmitChanged

func (self Instance) EmitChanged()

EmitChanged is promoted from Resource.Instance.EmitChanged.

func (Instance) GetIdForPath

func (self Instance) GetIdForPath(path string) string

GetIdForPath is promoted from Resource.Instance.GetIdForPath.

func (Instance) GetRid

func (self Instance) GetRid() Resource.ID

GetRid is promoted from Resource.Instance.GetRid.

func (Instance) GetScriptConstantMap

func (self Instance) GetScriptConstantMap() map[string]any

GetScriptConstantMap is promoted from Script.Instance.GetScriptConstantMap.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) IsBuiltIn

func (self Instance) IsBuiltIn() bool

IsBuiltIn is promoted from Resource.Instance.IsBuiltIn.

func (Instance) OnChanged

func (self Instance) OnChanged(cb func(), flags ...Signal.Flags) Instance

OnChanged is promoted from Resource.Instance.OnChanged.

func (Instance) OnSetupLocalToSceneRequested

func (self Instance) OnSetupLocalToSceneRequested(cb func(), flags ...Signal.Flags) Instance

OnSetupLocalToSceneRequested is promoted from Resource.Instance.OnSetupLocalToSceneRequested.

func (Instance) ResetState

func (self Instance) ResetState()

ResetState is promoted from Resource.Instance.ResetState.

func (Instance) ResourceLocalToScene

func (self Instance) ResourceLocalToScene() bool

ResourceLocalToScene is promoted from Resource.Instance.ResourceLocalToScene.

func (Instance) ResourceName

func (self Instance) ResourceName() string

ResourceName is promoted from Resource.Instance.ResourceName.

func (Instance) ResourcePath

func (self Instance) ResourcePath() string

ResourcePath is promoted from Resource.Instance.ResourcePath.

func (Instance) ResourceSceneUniqueId

func (self Instance) ResourceSceneUniqueId() string

ResourceSceneUniqueId is promoted from Resource.Instance.ResourceSceneUniqueId.

func (Instance) SetIdForPath

func (self Instance) SetIdForPath(path string, id string) Instance

SetIdForPath is promoted from Resource.Instance.SetIdForPath.

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gdreference.Object) bool

func (Instance) SetPathCache

func (self Instance) SetPathCache(path string) Instance

SetPathCache is promoted from Resource.Instance.SetPathCache.

func (Instance) SetResourceLocalToScene

func (self Instance) SetResourceLocalToScene(value bool) Instance

SetResourceLocalToScene is promoted from Resource.Instance.SetResourceLocalToScene.

func (Instance) SetResourceName

func (self Instance) SetResourceName(value string) Instance

SetResourceName is promoted from Resource.Instance.SetResourceName.

func (Instance) SetResourcePath

func (self Instance) SetResourcePath(value string) Instance

SetResourcePath is promoted from Resource.Instance.SetResourcePath.

func (Instance) SetResourceSceneUniqueId

func (self Instance) SetResourceSceneUniqueId(value string) Instance

SetResourceSceneUniqueId is promoted from Resource.Instance.SetResourceSceneUniqueId.

func (Instance) SetupLocalToScene

func (self Instance) SetupLocalToScene()

SetupLocalToScene is promoted from Resource.Instance.SetupLocalToScene.

func (Instance) SourceCode

func (self Instance) SourceCode() string

SourceCode is promoted from Script.Instance.SourceCode.

func (Instance) TakeOverPath

func (self Instance) TakeOverPath(path string)

TakeOverPath is promoted from Resource.Instance.TakeOverPath.

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type Interface

type Interface interface {
	EditorCanReloadFromFile() bool
	PlaceholderErased(placeholder uintptr)
	CanInstantiate() bool
	GetBaseScript() Script.Instance
	GetGlobalName() string
	InheritsScript(script Script.Instance) bool
	GetInstanceBaseType() string
	InstanceCreate(for_object Object.Instance) uintptr
	PlaceholderInstanceCreate(for_object Object.Instance) uintptr
	InstanceHas(obj Object.Instance) bool
	HasSourceCode() bool
	GetSourceCode() string
	SetSourceCode(code string)
	Reload(keep_state bool) error
	GetDocClassName() string
	GetDocumentation() [][]ClassDoc
	GetClassIconPath() string
	HasMethod(method string) bool
	HasStaticMethod(method string) bool
	GetScriptMethodArgumentCount(method string) any
	GetMethodInfo(method string) Object.MethodInfo
	IsTool() bool
	IsValid() bool
	IsAbstract() bool
	GetLanguage() ScriptLanguage.Instance
	HasScriptSignal(signal string) bool
	GetScriptSignalList() [][]struct{}
	HasPropertyDefaultValue(property string) bool
	GetPropertyDefaultValue(property string) any
	UpdateExports()
	GetScriptMethodList() [][]struct{}
	GetScriptPropertyList() [][]struct{}
	GetMemberLine(member string) int
	GetConstants() map[string]any
	GetMembers() []string
	IsPlaceholderFallbackEnabled() bool
	GetRpcConfig() any
}

type MethodDoc

type MethodDoc struct {
	Name                string        `gd:"name"`
	ReturnType          string        `gd:"return_type"`
	ReturnEnum          string        `gd:"return_enum"`
	ReturnIsBitfield    bool          `gd:"return_is_bitfield"`
	Qualifiers          string        `gd:"qualifiers"`
	Description         string        `gd:"description"`
	IsDeprecated        bool          `gd:"is_deprecated"`
	DeprecatedMessage   string        `gd:"deprecated_message"`
	IsExperimental      bool          `gd:"is_experimental"`
	ExperimentalMessage string        `gd:"experimental_message"`
	Arguments           []ArgumentDoc `gd:"arguments"`
	ErrorsReturned      []Error.Code  `gd:"errors_returned"`
	Keywords            string        `gd:"keywords"`
}

type PropertyDoc

type PropertyDoc struct {
	Name                string `gd:"name"`
	Type                string `gd:"type"`
	Enumeration         string `gd:"enumeration"`
	IsBitfield          bool   `gd:"is_bitfield"`
	Description         string `gd:"description"`
	Setter              string `gd:"setter"`
	Getter              string `gd:"getter"`
	DefaultValue        string `gd:"default_value"`
	Overridden          bool   `gd:"overridden"`
	Overrides           bool   `gd:"overrides"`
	IsDeprecated        bool   `gd:"is_deprecated"`
	DeprecatedMessage   string `gd:"deprecated_message"`
	IsExperimental      bool   `gd:"is_experimental"`
	ExperimentalMessage string `gd:"experimental_message"`
	Keywords            string `gd:"keywords"`
}

type SignalInfo

type SignalInfo struct {
	Name        string                `gd:"name"`
	Flags       int                   `gd:"flags"`
	ID          int                   `gd:"id"`
	DefaultArgs []any                 `gd:"default_args"`
	Args        []Object.PropertyInfo `gd:"args"`
}

type Singleton

type Singleton[T gdclass.Interface] = Extension[T]

Singleton can be embedded in a new struct to create a Go singleton extension of the class.

It will become available as a global inside scripts and any any other Go Extension types will have any *T typed fields filled in to point at this singleton once they have been instantiated.

T must be a type that is embedding this Singleton as the first field. It is unsafe and invalid to use this type directly, or embedded in any other way. See Interface for methods that can be overridden by T.

type ThemeItemDoc

type ThemeItemDoc struct {
	Name                string `gd:"name"`
	Type                string `gd:"type"`
	DataType            string `gd:"data_type"`
	Description         string `gd:"description"`
	IsDeprecated        bool   `gd:"is_deprecated"`
	DeprecatedMessage   string `gd:"deprecated_message"`
	IsExperimental      bool   `gd:"is_experimental"`
	ExperimentalMessage string `gd:"experimental_message"`
	DefaultValue        string `gd:"default_value"`
	Keywords            string `gd:"keywords"`
}

type TutorialDoc

type TutorialDoc struct {
	Link  string `gd:"link"`
	Title string `gd:"title"`
}

Jump to

Keyboard shortcuts

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