Skip to main content

Globals

Available system globals.

ARCH

global ARCH: string

The current platform tuple used for native modules loading, for example: "x86_64-linux", "x86_64-darwin", "x86_64-windows", etc...


ARGS

global ARGS: table<integer, string>

The command line arguments given to pragtical.


COMPAT_DISABLE_FIX_PATTERN

global COMPAT_DISABLE_FIX_PATTERN: boolean

DATADIR

global DATADIR: string

Directory that holds the editor lua sources and other data files.


DEFAULT_SCALE

global DEFAULT_SCALE: number

Default system scale.


EXEDIR

global EXEDIR: string

Directory where the editor executable resides.


EXEFILE

global EXEFILE: string

Full path of pragtical executable.


HOME

global HOME: string

Path to the users home directory.


LUAJIT

global LUAJIT: boolean

This is set to true if pragtical was compiled with luajit.


MOD_VERSION_MAJOR

global MOD_VERSION_MAJOR: integer

Same as application major version.


MOD_VERSION_MINOR

global MOD_VERSION_MINOR: integer

Same as application minor version.


MOD_VERSION_PATCH

global MOD_VERSION_PATCH: integer

Same as application patch version.


MOD_VERSION_STRING

global MOD_VERSION_STRING: string

Same as application version.


PATHSEP

global PATHSEP: string

Current platform path separator, usually / or \ on windows.


PLATFORM

global PLATFORM: string|"Android"|"Linux"|"Mac OS X"|"Windows"...(+1)

The current operating system.


SCALE

global SCALE: number

The current text or ui scale.


USERDIR

global USERDIR: string

Directory that holds the user configuration files, plugins, colors, etc...


VERSION

global VERSION: string

The application version.


bit

global bit: bit

Mike Pall bit operations library included on every Lua runtime for consistency with the patch https://github.com/LuaJIT/LuaJIT/issues/384 applied for newer Lua versions support.

See: https://bitop.luajit.org/

[View Library]


dirmonitor

global dirmonitor: dirmonitor

Functionality that allows to monitor a directory or file for changes using the native facilities provided by the current operating system for better efficiency and performance.

[View Library]


encoding

global encoding: encoding

Utilities for encoding detection and conversion.

[View Library]


global

global global: function

used to define a global variable


process

global process: process

Functionality that allows you to launch subprocesses and read or write to them in a non-blocking fashion.

[View Library]


regex

global regex: regex

Provides the base functionality for regular expressions matching.

[View Library]


renderer

global renderer: renderer

Core functionality to render or draw elements into the screen.

[View Library]


renwindow

global renwindow: renwindow

Functionality to create and manage windows.

[View Library]


shmem

global shmem: shmem

Functionality that allows to share data between processes.

[View Library]


system

global system: system

Utilites for managing current window, files and more.

[View Library]


thread

global thread: thread

Provides threading capabilities.

[View Library]


utf8

global utf8: table

utf8extra

global utf8extra: utf8extra

Additional utf8 support not provided by lua.

[View Library]