gdjson

package
v0.0.0-...-e95b224 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Abstracted = map[string]bool{
	"RenderingDevice": true,
}
View Source
var Callables = map[string][]string{}/* 121 elements not displayed */
View Source
var ClassMethodOwnership = map[string]map[string]map[string]OwnershipSemantics{}/* 119 elements not displayed */
View Source
var Resources = map[string]reflect.Type{}/* 1628 elements not displayed */
View Source
var Structables = map[string]reflect.Type{}/* 148 elements not displayed */

Functions

This section is empty.

Types

type Atlas

type Atlas struct {
	Points []Vector2.XY `gd:"points"`
	Size   Vector2i.XY  `gd:"size"`
}

type AuthorInfo

type AuthorInfo struct {
	LeadDevelopers  []string `gd:"lead_developers"`
	Founders        []string `gd:"founders"`
	ProjectManagers []string `gd:"project_managers"`
	Developers      []string `gd:"developers"`
}

type Class

type Class struct {
	Name    string `json:"name"`
	Rename  string `json:"rename,omitempty"`
	Package string `json:"package,omitempty"`
	IsEnum  bool   `json:"is_enum"`

	Description    string `json:"description"`
	IsRefcounted   bool   `json:"is_refcounted"`
	IsInstantiable bool   `json:"is_instantiable"`
	IsSingleton    bool

	IsKeyed   bool `json:"is_keyed"` // builtin class
	Operators []struct {
		Name       string `json:"name"`
		RightType  string `json:"right_type,omitempty"`
		ReturnType string `json:"return_type"`
	} `json:"operators"` // builtin class
	Constructors []struct {
		Index     int `json:"index"`
		Arguments []struct {
			Name string `json:"name"`
			Type string `json:"type"`
			Meta string `json:"meta"`
		} `json:"arguments,omitempty"`
	} `json:"constructors"` // builtin class
	HasDestructor      bool   `json:"has_destructor"`                 // builtin class
	IndexingReturnType string `json:"indexing_return_type,omitempty"` // builtin class

	Inherits string   `json:"inherits,omitempty"`
	APIType  string   `json:"api_type"`
	Enums    []Enum   `json:"enums,omitempty"`
	Methods  []Method `json:"methods,omitempty"`

	Members []struct {
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"members,omitempty"` // builtin class

	Signals    []Signal `json:"signals,omitempty"`
	Properties []struct {
		Type        string `json:"type"`
		Name        string `json:"name"`
		Description string `json:"description"`
		Setter      string `json:"setter"`
		Getter      string `json:"getter"`
		Index       *int   `json:"index"`
	} `json:"properties,omitempty"`
	Constants []struct {
		Name  string `json:"name"`
		Type  string `json:"type"` // builtin class
		Value any    `json:"value"`
	} `json:"constants,omitempty"`
}

type Commit

type Commit map[any]any

type CompletionInfo

type CompletionInfo struct {
	Kind         any             `gd:"kind" type:"[1]gdclass.CodeEditCodeCompletionKind"`
	DisplayText  string          `gd:"display_text"`
	InsertText   string          `gd:"insert_text"`
	FontColor    Color.RGBA      `gd:"font_color"`
	Icon         Path.ToResource `gd:"icon"`
	DefaultValue string          `gd:"default_value"`
}

type Configuration

type Configuration struct {
	IceServers []IceServer `gd:"ice_servers"`
}

type Conn

type Conn struct {
	Connection any  `gd:"connection" type:"[1]gdclass.WebRTCPeerConnection"`
	Channels   any  `gd:"channels" type:"[][1]gdclass.WebRTCDataChannel"`
	Connected  bool `gd:"connected"`
}

type Connection

type Connection struct {
	FromPort int    `gd:"from_port"`
	FromNode string `gd:"from_node"`
	ToPort   int    `gd:"to_port"`
	ToNode   string `gd:"to_node"`
}
type Copyright struct {
	Name  string `gd:"name"`
	Parts []Part `gd:"parts"`
}

type Date

type Date struct {
	Year    int `gd:"year"`
	Month   int `gd:"month"`
	Day     int `gd:"day"`
	Weekday int `gd:"weekday"`
	Hour    int `gd:"hour"`
	Minute  int `gd:"minute"`
	Second  int `gd:"second"`
}

type DateOnly

type DateOnly struct {
	Year    int `gd:"year"`
	Month   int `gd:"month"`
	Day     int `gd:"day"`
	Weekday int `gd:"weekday"`
}

type DiffFile

type DiffFile map[any]any

type DiffHunk

type DiffHunk map[any]any

type DiffLine

type DiffLine map[any]any

type DonorInfo

type DonorInfo struct {
	PlatinumSponsors []string `gd:"platinum_sponsors"`
	GoldSponsors     []string `gd:"gold_sponsors"`
	SilverSponsors   []string `gd:"silver_sponsors"`
	BronzeSponsors   []string `gd:"bronze_sponsors"`
	MiniSponsors     []string `gd:"mini_sponsors"`
	GoldDonors       []string `gd:"gold_donors"`
	SilverDonors     []string `gd:"silver_donors"`
	BronzeDonors     []string `gd:"bronze_donors"`
}

type Entry

type Entry struct {
	Color Color.RGBA `gd:"color"`
}

type Enum

type Enum struct {
	Name   string `json:"name"`
	Values []struct {
		Name        string `json:"name"`
		Value       int    `json:"value"`
		Description string `json:"description"`
	} `json:"values"`
}

type FileDialogOption

type FileDialogOption struct {
	Name    string   `gd:"name"`
	Values  []string `gd:"values"`
	Default int      `gd:"default"`
}

type GlobalClass

type GlobalClass struct {
	Base     string `gd:"base"`
	Class    string `gd:"class"`
	Icon     string `gd:"icon"`
	Language string `gd:"language"`
	Path     string `gd:"path"`
}

type IceServer

type IceServer struct {
	URLs       []string `gd:"urls"`
	Username   string   `gd:"username"`
	Credential string   `gd:"credential"`
}

type JoyInfo

type JoyInfo struct {
	XinputIndex       int    `gd:"xinput_index"`
	RawName           string `gd:"raw_name"`
	VendorID          string `gd:"vendor_id"`
	ProductID         string `gd:"product_id"`
	SteamInputPresent int    `gd:"steam_input_present"`
}

type LocalInterface

type LocalInterface struct {
	Index     string       `gd:"index"`
	Name      string       `gd:"name"`
	Friendly  string       `gd:"friendly"`
	Addresses []netip.Addr `gd:"addresses"`
}

type MemoryInfo

type MemoryInfo struct {
	Physical  int `gd:"physical"`
	Free      int `gd:"free"`
	Available int `gd:"available"`
	Stack     int `gd:"stack"`
}

type Method

type Method struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	IsConst     bool   `json:"is_const"`
	IsVararg    bool   `json:"is_vararg"`
	IsStatic    bool   `json:"is_static"`
	IsVirtual   bool   `json:"is_virtual"`
	Hash        int64  `json:"hash"`
	ReturnType  string `json:"return_type"` // builtin class
	ReturnValue struct {
		Type string `json:"type"`
		Meta string `json:"meta"`
	} `json:"return_value,omitempty"`
	Arguments []struct {
		Name         string  `json:"name"`
		Type         string  `json:"type"`
		Meta         string  `json:"meta"`
		DefaultValue *string `json:"default_value"`
	} `json:"arguments,omitempty"`
}

type Metrics

type Metrics struct {
	Max             Float.X `gd:"max"`
	Mean            Float.X `gd:"mean"`
	MeanSquared     Float.X `gd:"mean_squared"`
	RootMeanSquared Float.X `gd:"root_mean_squared"`
	PeakSNR         Float.X `gd:"peak_snr"`
}

type Notification

type Notification struct {
	Method string `gd:"method"`
	Params any    `gd:"params"`
}

type OnTheClock

type OnTheClock struct {
	Hour   int `gd:"hour"`
	Minute int `gd:"minute"`
	Second int `gd:"second"`
}

type Options

type Options struct {
	Negotiated        bool   `gd:"negotiated"`
	ID                int    `gd:"id"`
	MaxRetransmits    int    `gd:"max_retransmits"`
	MaxPacketLifeTime int    `gd:"max_packet_life_time"`
	Ordered           bool   `gd:"ordered"`
	Protocol          string `gd:"protocol"`
}

type OwnershipSemantics

type OwnershipSemantics int

OwnershipSemantics attempts to capture a proposal and pragmatic categorization around the ownership semantics for non-RefCounted godot objects.

const (
	// RefCountedManagement is the default ownership semantics for objects that
	// extend the RefCounted class.
	RefCountedManagement OwnershipSemantics = iota

	// OwnershipTransferred means that the receiver of the value is responsible
	// for freeing the memory associated with the value. After transferring the
	// ownership of a value this way, no direct references may be kept by the prior
	// owner, although they may keep copies of the InstanceID and use it to look
	// up the object in the future.
	OwnershipTransferred

	// ReversesTheOwnership applies to function arguments and means if (and only
	// if) the class is known to be the owner of the object, or is known to bind
	// the lifetime of this value, once the function returns, the caller will own
	// the object instead and is no longer under an obligation to keep it alive.
	// In such cases, the caller becomes responsible for freeing the object.
	ReversesTheOwnership

	// IsTemporaryReference only applies to function arguments and means that
	// the function borrows the argument (for the lifetime of the call) and does
	// not take ownership of it. The function may store the InstanceID of an
	// argument, in order to look it up in future.
	IsTemporaryReference

	// MustAssertInstanceID means that the receiver must always assert that
	// the instance ID is valid before using the object. The object may be
	// freed at any time.
	MustAssertInstanceID

	// LifetimeBoundToClass when applied to function arguments, means that the
	// receiver may keep a reference to the object and the caller must keep
	// it alive for as long as the class is alive. For return values, they
	// are only valid as long as the class they are returned from is alive,
	// the caller may not free the object.
	LifetimeBoundToClass
)

type Part

type Part struct {
	Files     []string `gd:"files"`
	Copyright []string `gd:"copyright"`
	License   string   `gd:"license"`
}

type PhysicsDirectSpaceState2D_Intersection

type PhysicsDirectSpaceState2D_Intersection struct {
	Collider   any        `gd:"collider" type:"Object.Instance"`
	ColliderID int64      `gd:"collider_id" type:"Object.ID"`
	Normal     Vector2.XY `gd:"normal"`
	Position   Vector2.XY `gd:"position"`
	RID        RID.Any    `gd:"rid"`
	Shape      int        `gd:"shape"`
}

type PhysicsDirectSpaceState2D_RestInfo

type PhysicsDirectSpaceState2D_RestInfo struct {
	ColliderID     int64      `gd:"collider_id" type:"Object.ID"`
	LinearVelocity Vector2.XY `gd:"linear_velocity"`
	Normal         Vector2.XY `gd:"normal"`
	Point          Vector2.XY `gd:"point"`
	RID            RID.Any    `gd:"rid"`
	Shape          int        `gd:"shape"`
}

type PhysicsDirectSpaceState3D_Intersection

type PhysicsDirectSpaceState3D_Intersection struct {
	Collider   any         `gd:"collider" type:"Object.Instance"`
	ColliderID int64       `gd:"collider_id" type:"Object.ID"`
	Normal     Vector3.XYZ `gd:"normal"`
	Position   Vector3.XYZ `gd:"position"`
	FaceIndex  int         `gd:"face_index"`
	RID        RID.Any     `gd:"rid"`
	Shape      int         `gd:"shape"`
}

type PhysicsDirectSpaceState3D_RestInfo

type PhysicsDirectSpaceState3D_RestInfo struct {
	ColliderID     int64       `gd:"collider_id" type:"Object.ID"`
	LinearVelocity Vector3.XYZ `gd:"linear_velocity"`
	Normal         Vector3.XYZ `gd:"normal"`
	Point          Vector3.XYZ `gd:"point"`
	RID            RID.Any     `gd:"rid"`
	Shape          int         `gd:"shape"`
}

type Pipe

type Pipe struct {
	Stdio  any `gd:"stdio" type:"[1]gdclass.FileAccess"`
	Stderr any `gd:"stderr" type:"[1]gdclass.FileAccess"`
	PID    int `gd:"pid"`
}

type PropertyInfo

type PropertyInfo struct {
	ClassName  string       `gd:"class_name"`
	Name       string       `gd:"name"`
	Hint       int          `gd:"hint"`
	HintString string       `gd:"hint_string"`
	Type       reflect.Type `gd:"type"`
	Usage      int          `gd:"usage"`
}

type RangeConfig

type RangeConfig struct {
	Min  Float.X `gd:"min"`
	Max  Float.X `gd:"max"`
	Step Float.X `gd:"step"`
	Expr string  `gd:"expr"`
}

type Request

type Request struct {
	Method string `gd:"method"`
	Params any    `gd:"params"`
	ID     string `gd:"id"`
}

type Response

type Response struct {
	Result any    `gd:"result"`
	ID     string `gd:"id"`
}

type ResponseError

type ResponseError struct {
	Code    int    `gd:"code"`
	Message string `gd:"message"`
	ID      int    `gd:"id"`
}

type Signal

type Signal struct {
	Name      string `json:"name"`
	Arguments []struct {
		Name string `json:"name"`
		Type string `json:"type"`
		Meta string `json:"meta"`
	} `json:"arguments,omitempty"`
}

type SignalConnection

type SignalConnection struct {
	Signal   any               `gd:"signal" type:"SignalType.Any"`
	Callable Callable.Function `gd:"callable"`
	Flags    int               `gd:"Signal.ConnectFlags"`
}

type SignalInfo

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

type Specification

type Specification struct {
	Header struct {
		VersionMajor    int    `json:"version_major"`
		VersionMinor    int    `json:"version_minor"`
		VersionPatch    int    `json:"version_patch"`
		VersionStatus   string `json:"version_status"`
		VersionBuild    string `json:"version_build"`
		VersionFullName string `json:"version_full_name"`
	} `json:"header"`
	BuiltinClassSizes []struct {
		BuildConfiguration string `json:"build_configuration"`
		Sizes              []struct {
			Name string `json:"name"`
			Size int    `json:"size"`
		} `json:"sizes"`
	} `json:"builtin_class_sizes"`
	BuiltinClassMemberOffsets []struct {
		BuildConfiguration string `json:"build_configuration"`
		Classes            []struct {
			Name    string `json:"name"`
			Members []struct {
				Member string `json:"member"`
				Offset int    `json:"offset"`
			} `json:"members"`
		} `json:"classes"`
	} `json:"builtin_class_member_offsets"`
	GlobalConstants  []interface{} `json:"global_constants"`
	GlobalEnums      []Enum        `json:"global_enums"`
	UtilityFunctions []struct {
		Name       string `json:"name"`
		ReturnType string `json:"return_type,omitempty"`
		Category   string `json:"category"`
		IsVararg   bool   `json:"is_vararg"`
		Hash       int    `json:"hash"`
		Arguments  []struct {
			Name string `json:"name"`
			Type string `json:"type"`
			Meta string `json:"meta"`
		} `json:"arguments,omitempty"`
	} `json:"utility_functions"`
	BuiltinClasses []Class `json:"builtin_classes"`
	Classes        []Class `json:"classes"`
	Singletons     []struct {
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"singletons"`
	NativeStructures []struct {
		Name   string `json:"name"`
		Format string `json:"format"`
	} `json:"native_structures"`
}

Specification of the Godot Extension API. Created with https://mholt.github.io/json-to-go/

func LoadSpecification

func LoadSpecification() (*Specification, error)

LoadSpecification, either from a local file or by downloading it from the Godot Github repository.

type StatusFile

type StatusFile map[any]any

type Structure

type Structure map[any]any

type Surface

type Surface map[any]any

type TextToSpeechVoice

type TextToSpeechVoice struct {
	Name     string `gd:"name"`
	ID       string `gd:"id"`
	Language string `gd:"language"`
}

type VersionInfo

type VersionInfo struct {
	Major     int    `gd:"major"`
	Minor     int    `gd:"minor"`
	Patch     int    `gd:"patch"`
	Hex       int    `gd:"hex"`
	Status    string `gd:"status"`
	Build     string `gd:"build"`
	Hash      string `gd:"hash"`
	Timestamp int    `gd:"timestamp"`
	String    string `gd:"string"`
}

Jump to

Keyboard shortcuts

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