Skip to main content

Crate pixelscript

Crate pixelscript 

Source

Modules§

lua
python
shared

Macros§

borrow_string
Convert a borrowed C string (const char *) into a Rust &str.
borrow_var
simple Borrow a Var.
create_raw_string
Create a raw string from &str.
free_raw_string
Free a raw sring
own_string
Convert a owned C string (i.e. owned by us now.) into a Rust String.
own_var
Own a Var.
pxs_debug

Functions§

pxs_add_submod
Add a Module to a Module
pxs_addfunc
Add a callback to a module.
pxs_addmod
Add the module finally to the runtime.
pxs_addobject
Add a object to a Module.
pxs_addvar
Add a Varible to a module.
pxs_call
Call a method within a specifed runtime.
pxs_clearstate
Clear the current threads state for all languages.
pxs_eval
Evaluate code. This will return a pxs_Var.
pxs_execlua
Execute some lua code. Will return a String, an empty string means that the code executed succesffuly
pxs_execpython
Execute some Python code. Will return a String, an empty string means that the code executed successfully.
pxs_finalize
Finalize the PixelScript runtime.
pxs_freemod
Optionally free a module if you changed your mind.
pxs_freestr
Free the string created by the pixelscript library
pxs_freevar
Free a PixelScript var.
pxs_getbool
Get a Bool
pxs_getfloat
Get a float (f64)
pxs_gethost
Get the pointer of the Host Object
pxs_getint
Get a int (i64) from a var.
pxs_getstring
Get a String
pxs_getuint
Get a uint (u64)
pxs_host_fromidx
Call the opaque pointer of a object based on it’s idx from pxs_getobject This should only be used when derefing a passed in argument. For self use pxs_listget(args, 1) and pxs_gethost.
pxs_initialize
Initialize the PixelScript runtime.
pxs_listadd
Add a item to a pxs_VarList.
pxs_listget
Get a item from a pxs_VarList.
pxs_listlen
Get length of a pxs_VarList.
pxs_listset
Set a item at a specific index in a pxs_VarList.
pxs_newbool
Create a new variable bool.
pxs_newcopy
Copy the pxs_Var.
pxs_newfloat
Create a new variable float. (f64)
pxs_newhost
Make a new HostObject var.
pxs_newint
Create a new variable int. (i64)
pxs_newlist
Create a new pxs_VarList.
pxs_newmod
Create a new pixelscript Module.
pxs_newnull
Make a new Null var.
pxs_newobject
Create a new object.
pxs_newstring
Make a new Var string.
pxs_newuint
Create a new variable uint. (u64)
pxs_object_addfunc
Add a callback to a object.
pxs_object_callrt
Call a function on a object, and use a Enum for runtime rather than a var.
pxs_objectcall
Object call.
pxs_objectget
Call a objects getter.
pxs_objectset
Call a objects setter.
pxs_set_dirreader
Set a function for reading a directory.
pxs_set_filereader
Set a function for reading a file.
pxs_set_filewriter
Set a function for writing a file.
pxs_startthread
Tells PixelScript that we are in a new thread.
pxs_stopthread
Tells PixelScript that we just stopped the most recent thread.
pxs_tostring
Call a ToString method on this Var. If already a string, it won’t call it.
pxs_varcall
Call a pxs_Vars function.
pxs_varis
Check if a variable is of a type.
pxs_version
Current pixelscript version.

Type Aliases§

pxs_Opaque