Documentation
¶
Index ¶
- type Advanced
- type Any
- type ClassName
- type Code
- type CodeCompletionKind
- type CodeCompletionLocation
- type Completion
- type Constant
- type Extension
- type Globals
- type ID
- type Implementation
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsScriptLanguage() ScriptLanguage.Instance
- func (self Instance) AsScriptLanguageExtension() Instance
- func (self Instance) ID() ID
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
- type LookupResultType
- type ProfilingInfo
- type StackInfo
- type StackLevelLocals
- type StackLevelMembers
- type Template
- type TemplateLocation
- type Validation
- type ValidationError
- type Warning
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 Code ¶
type Code struct { Result Error.Code `gd:"result"` Type int `gd:"type"` ClassName string `gd:"class_name"` ClassMember string `gd:"class_member"` Description string `gd:"description"` IsDeprecated bool `gd:"is_deprecated"` DeprecatedMessage string `gd:"deprecated_message"` IsExperimental bool `gd:"is_experimental"` ExperimentalMessage string `gd:"experimental_message"` DocType string `gd:"doc_type"` Enumeration string `gd:"enumeration"` IsBitfield bool `gd:"is_bitfield"` Value string `gd:"value"` Script Script.Instance `gd:"script"` ScriptPath string `gd:"script_path"` Location int `gd:"location"` }
type CodeCompletionKind ¶
type CodeCompletionKind int //gd:ScriptLanguageExtension.CodeCompletionKind
const ( CodeCompletionKindClass CodeCompletionKind = 0 CodeCompletionKindFunction CodeCompletionKind = 1 CodeCompletionKindSignal CodeCompletionKind = 2 CodeCompletionKindVariable CodeCompletionKind = 3 CodeCompletionKindMember CodeCompletionKind = 4 CodeCompletionKindEnum CodeCompletionKind = 5 CodeCompletionKindConstant CodeCompletionKind = 6 CodeCompletionKindNodePath CodeCompletionKind = 7 CodeCompletionKindFilePath CodeCompletionKind = 8 CodeCompletionKindPlainText CodeCompletionKind = 9 CodeCompletionKindMax CodeCompletionKind = 10 )
type CodeCompletionLocation ¶
type CodeCompletionLocation int //gd:ScriptLanguageExtension.CodeCompletionLocation
const ( // The option is local to the location of the code completion query - e.g. a local variable. Subsequent value of location represent options from the outer class, the exact value represent how far they are (in terms of inner classes). LocationLocal CodeCompletionLocation = 0 // The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc.) to store the depth of an option in the class or a parent class. LocationParentMask CodeCompletionLocation = 256 // The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons). LocationOtherUserCode CodeCompletionLocation = 512 // The option is from other engine code, not covered by the other enum constants - e.g. built-in classes. LocationOther CodeCompletionLocation = 1024 )
type Completion ¶
type Completion struct { Kind CodeCompletionKind `gd:"kind"` Display string `gd:"display"` InsertText string `gd:"insert_text"` FontColor struct { R float32 G float32 B float32 A float32 } `gd:"font_color"` Icon string `gd:"icon"` DefaultValue string `gd:"default_value"` Location string `gd:"location"` Matches []int32 `gd:"matches"` Force bool `gd:"force"` CallHint string `gd:"call_hint"` Result Error.Code `gd:"result"` }
type Extension ¶
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]) AsScriptLanguage ¶
func (self *Extension[T]) AsScriptLanguage() ScriptLanguage.Instance
func (*Extension[T]) AsScriptLanguageExtension ¶
type Globals ¶
type Globals struct { Globals []string `gd:"globals"` Values []interface{} `gd:"values"` }
type 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.
type Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
type Instance [1]gdclass.ScriptLanguageExtension
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 (Instance) AsScriptLanguage ¶
func (self Instance) AsScriptLanguage() ScriptLanguage.Instance
func (Instance) AsScriptLanguageExtension ¶
type Interface ¶
type Interface interface { GetName() string Init() GetType() string GetExtension() string Finish() GetReservedWords() []string IsControlFlowKeyword(keyword string) bool GetCommentDelimiters() []string GetDocCommentDelimiters() []string GetStringDelimiters() []string MakeTemplate(template string, class_name string, base_class_name string) Script.Instance GetBuiltInTemplates(obj string) [][]Template IsUsingTemplates() bool Validate(script string, path string, validate_functions bool, validate_errors bool, validate_warnings bool, validate_safe_lines bool) Validation ValidatePath(path string) string CreateScript() Object.Instance HasNamedClasses() bool SupportsBuiltinMode() bool SupportsDocumentation() bool CanInheritFromFile() bool // Returns the line where the function is defined in the code, or -1 if the function is not present. FindFunction(function string, code string) int MakeFunction(class_name string, function_name string, function_args []string) string CanMakeFunction() bool OpenInExternalEditor(script Script.Instance, line int, column int) error OverridesExternalEditor() bool PreferredFileNameCasing() ScriptLanguage.ScriptNameCasing CompleteCode(code string, path string, owner Object.Instance) Completion LookupCode(code string, symbol string, path string, owner Object.Instance) Code AutoIndentCode(code string, from_line int, to_line int) string AddGlobalConstant(name string, value any) AddNamedGlobalConstant(name string, value any) RemoveNamedGlobalConstant(name string) ThreadEnter() ThreadExit() DebugGetError() string DebugGetStackLevelCount() int DebugGetStackLevelLine(level int) int DebugGetStackLevelFunction(level int) string // Returns the source associated with a given debug stack position. DebugGetStackLevelSource(level int) string DebugGetStackLevelLocals(level int, max_subitems int, max_depth int) StackLevelLocals DebugGetStackLevelMembers(level int, max_subitems int, max_depth int) StackLevelMembers DebugGetStackLevelInstance(level int) gdextension.Pointer DebugGetGlobals(max_subitems int, max_depth int) Globals DebugParseStackLevelExpression(level int, expression string, max_subitems int, max_depth int) string DebugGetCurrentStackInfo() []StackInfo ReloadAllScripts() ReloadScripts(scripts []Script.Instance, soft_reload bool) ReloadToolScript(script Script.Instance, soft_reload bool) GetRecognizedExtensions() []string GetPublicFunctions() [][]struct{} GetPublicConstants() []Constant GetPublicAnnotations() [][]struct{} ProfilingStart() ProfilingStop() ProfilingSetSaveNativeCalls(enable bool) ProfilingGetAccumulatedData(info_array *ProfilingInfo, info_max int) int ProfilingGetFrameData(info_array *ProfilingInfo, info_max int) int Frame() HandlesGlobalClassType(atype string) bool GetGlobalClassName(path string) ClassName }
type LookupResultType ¶
type LookupResultType int //gd:ScriptLanguageExtension.LookupResultType
const ( LookupResultScriptLocation LookupResultType = 0 LookupResultClass LookupResultType = 1 LookupResultClassConstant LookupResultType = 2 LookupResultClassProperty LookupResultType = 3 LookupResultClassMethod LookupResultType = 4 LookupResultClassSignal LookupResultType = 5 LookupResultClassEnum LookupResultType = 6 LookupResultClassTbdGlobalscope LookupResultType = 7 LookupResultClassAnnotation LookupResultType = 8 LookupResultLocalConstant LookupResultType = 9 LookupResultLocalVariable LookupResultType = 10 LookupResultMax LookupResultType = 11 )
type ProfilingInfo ¶
type ProfilingInfo = gd.ScriptLanguageExtensionProfilingInfo
type StackLevelLocals ¶
type StackLevelLocals struct { Locals []string `gd:"locals"` Values []interface{} `gd:"values"` }
type StackLevelMembers ¶
type StackLevelMembers struct { Members []string `gd:"members"` Values []interface{} `gd:"values"` }
type TemplateLocation ¶
type TemplateLocation int
const ( TemplateBuiltIn TemplateLocation = iota TemplateEditor TemplateProject )
type Validation ¶
type Validation struct { Functions []string `gd:"functions"` Errors []ValidationError `gd:"errors"` Warnings []Warning `gd:"warnings"` SafeLines []int32 `gd:"safe_lines"` Valid bool `gd:"valid"` }