Biblioteca System

.html ›› .html ››
Parent Previous Next

Biblioteca System

Biblioteca que contém funções para lidar com o dispositivo do usuário e outras funcionalidades básicas.

Todas as funções estão contidas na unidade "system.lua".


Exemplo de uso:

-- Primeiro, é necessário usar a unidade "system.lua"
require("system.lua");   

-- Agora é possível acessar as funções da biblioteca
System.FUNCAO_DA_BIBLIOTECA(Parametro1, Parametro2, ...);



Funções da biblioteca System


function System.setClipboardText(text)


Altera o conteúdo do Clipboard/Área de Transferência do sistema operacional (ctrl+c).


Parâmetros:


Retorno:



function System.getClipboardText()


Retorna o conteúdo do Clibpboard/Área de Transferência do sistema operacional (ctrl+c)


Retorno:



function System.readClipboardAsDragNDrop(callback, [options])


Read the device clipboard as a drag-and-drop operation. Helpful to read multiple clipboard formats (such as files and images).


Parameters:


Returns:


Remarks:



function System.getScreenSize()


Retorna as dimensões da tela do dispositivo do usuário.


Retorno:


Exemplo:

local largura, altura = system.getScreenSize();




function System.isMobile()


Retorna se o plugin está rodando no Firecast Mobile.


Retorno:



function System.getTickCount()


Retorna um número contendo há quantos milisegundos o dispositivo do usuário está ligado. Ótimo para calcular o tempo decorrido entre operações.


SDK3 API Version Functions

Version history

Major

Minor

Description

87

0

SDK 3.6 (Firecast 8+)

87

1

SDK 3.6b (Firecast 8.5+)

87

2

SDK 3.6c (Firecast 8.6+)

87

3

SDK 3.6d (Firecast 8.8+)

87

4

SDK 3.6e (Firecast 8.11+)

88

0

SDK 3.7 (Firecast 8.12+)


Identical major versions possess compatibility with each other. 

For example, you can compile a plugin using SDK3.6b (87.1), and it will still run fine on an SDK 3.6 (87.0) running API because the two have the same major version.



function System.checkAPIVersion(major, [minor])


Checks if the current running SDK3 API version is greater or equal to a specific version.


Parameters:


Returns:


Remarks:



function System.getAPIVersion()


Gets the current running SDK3 API version.


Returns:


Remarks:



function System.makeAPIVersionNumber(major, [minor])


Make an API version integer number that you can use to compare versions.


Parameters:


Returns:


Remarks:

Created with the Personal Edition of HelpNDoc: HelpNDoc's Project Analyzer: Incredible documentation assistant