ScriptExtension

package
v0.0.0-...-ff35923 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 25 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 an extension of this class. T should be the type that is embedding this [Extension]See Interface for methods that can be overridden by T.

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

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

func (*Extension[T]) AsScript

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

func (*Extension[T]) AsScriptExtension

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

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 (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AsScript

func (self Instance) AsScript() Script.Instance

func (Instance) AsScriptExtension

func (self Instance) AsScriptExtension() Instance

func (Instance) ID

func (self Instance) ID() ID

func (*Instance) SetObject

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

func (Instance) Virtual

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

type Interface

type Interface interface {
	EditorCanReloadFromFile() bool
	PlaceholderErased(placeholder gdextension.Pointer)
	CanInstantiate() bool
	GetBaseScript() Script.Instance
	GetGlobalName() string
	InheritsScript(script Script.Instance) bool
	GetInstanceBaseType() string
	InstanceCreate(for_object Object.Instance) gdextension.Pointer
	PlaceholderInstanceCreate(for_object Object.Instance) gdextension.Pointer
	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
	// Return the expected argument count for the given 'method', or null if it can't be determined (which will then fall back to the default behavior).
	GetScriptMethodArgumentCount(method string) any
	GetMethodInfo(method string) Object.MethodInfo
	IsTool() bool
	IsValid() bool
	// Returns true if the script is an abstract script. Abstract scripts cannot be instantiated directly, instead other scripts should inherit them. Abstract scripts will be either unselectable or hidden in the Create New Node dialog (unselectable if there are non-abstract classes inheriting it, otherwise hidden).
	IsAbstract() bool
	GetLanguage() ScriptLanguage.Instance
	HasScriptSignal(signal string) bool
	GetScriptSignalList() [][]Object.MethodInfo
	HasPropertyDefaultValue(property string) bool
	GetPropertyDefaultValue(property string) any
	UpdateExports()
	GetScriptMethodList() [][]Object.MethodInfo
	GetScriptPropertyList() [][]Object.PropertyInfo
	GetMemberLine(member string) int
	GetConstants() map[string]interface{}
	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 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