ARSA Language  2.8
(Encryption, GPU and Web 3.0)
operator.h
Go to the documentation of this file.
1 
112 
116 void arsalang(const char* src_name);
117 
119 
142 bool psd(const char* filename, bool clear = true, bool cache = true, bool snd = true);
143 
145 
165 bool openloading(const char* filename, bool only_psd = true);
166 
168 
171 void closeloading();
172 
174 
183 void textarea(const char* layername, const char* areaname, const char* string, int r = 255, int g = 255, int b = 255, int a = 255);
184 
186 
196 void textareafont(const char* layername, const char* areaname, const char* fontname, const char* string, int r = 255, int g = 255, int b = 255, int a = 255);
197 
199 
207 void textlayer(const char* layername, const char* string, int r = 255, int g = 255, int b = 255, int a = 255);
208 
210 
219 void textlayerfont(const char* layername, const char* fontname, const char* string, int r = 255, int g = 255, int b = 255, int a = 255);
220 
222 
227 void text(int x, int y, const char* string);
228 
230 
242 void textalign(int align);
243 
245 
255 void text(int x, int y, const char* string, int r, int g, int b, int a);
256 
258 
265 void text(const char* fontname, int fontsize, int x, int y, const char* string);
266 
268 
280 void text(const char* fontname, int fontsize, int x, int y, const char* string, int r, int g, int b, int a);
281 
283 
309 void int(const char* name, int value);
310 
312 
317 void gint(const char* name, int value);
318 
320 
341 void float(const char* name, float value);
342 
344 
349 void gfloat(const char* name, int value);
350 
352 
373 void string(const char* name, const char* value);
374 
376 
381 void gstring(const char* name, int value);
382 
384 
425 void struct(const char* name, const char* element, ...);
426 
428 
433 void gstruct(const char* name, int value);
434 
436 
440 void set(const char* name,const char* value);
441 
443 
447 void setstring(const char* name, const char* value);
448 
450 
454 void add(const char* name,const char* value);
455 
457 
461 void addstring(const char* name, const char* value);
462 
464 
468 void sub(const char* name,const char* value);
469 
471 
475 void mul(const char* name,const char* value);
476 
478 
482 void div(const char* name,const char* value);
483 
485 
489 void mod(const char* name,const char* value);
490 
492 
496 void _sin(const char* name,const char* value);
497 
499 
503 void _cos(const char* name,const char* value);
504 
506 
514 if(test_expr) void* function;
515 
517 
528 ifcount (const char* name, test_expr, int count ) void* function;
529 
531 
542 iftime(const char* name, test_expr, int delay) void* function;
543 
545 
548 void ifreset(const char* name = "");
549 
551 
561 void function(const char* name);
562 
564 
575 void procedure( void* function1 >> void* function2 >> ... >> void* functionN );
576 
578 void proc(void* function1 >> void* function2 >> ... >> void* functionN);
579 
581 
590 ifelse(test_expr, void* function1, void* function2);
591 
593 
609 for(init_expr; test_expr; increment_expr) void* function;
610 
612 
622 while(test_expr) void* function;
623 
625 
628 long gettime();
629 
631 
634 long getrealtime();
635 
637 
640 float getdeltatime();
641 
643 
646 int random();
647 
649 
654 int random(int min, int max);
655 
657 
661 const char* random_string(int len);
662 
664 
675 const char* random_guid(bool with_letter = false);
676 
678 
688 const char* random_string_custom(int len, const char* string_custom);
689 
691 
694 void setdebug(int debug);
695 
697 
700 int isdebug();
701 
703 
706 void msgbox(const char* msg);
707 
709 
719 void alog( const char* msg );
720 
722 
761 bool touch(const char* state);
762 
764 
771 void touch(const char* state, void* function);
772 
774 
782 bool touch(const char* state, const char* layername);
783 
785 
798 void touch(const char* state, const char* layername, void* function);
799 
801 
804 void touchclear();
805 
807 
810 int touchmax();
811 
813 
850 bool touchid(int touch_id, const char* state);
851 
853 
861 void touchid(int touch_id, const char* state, void* function);
862 
864 
873 bool touchid(int touch_id, const char* state, const char* layername);
874 
876 
885 void touchid(int touch_id, const char* state, const char* layername, void* function);
886 
888 
894 bool strstr(const char* string, const char* keyword);
895 
897 
927 const char* strtok(const char* string, const char* token = "");
928 
931 void return();
932 
935 void break();
936 
938 void continue();
939 
941 
944 void setgamefps(int fps);
945 
947 
950 int getgamefps();
951 
953 
956 int getcurrentfps();
957 int getcurrentfps();
958 
960 
964 void winsize(int width, int height);
965 
967 
970 int getwinsizewidth();
971 
973 
976 int getwinsizeheight();
977 
979 
982 void setlandscape();
983 
985 
988 void setportrait();
989 
991 
998 float getzrot(float x1, float y1, float x2, float y2);
999 
1001 
1007 void setbgcolor(int r, int g, int b, int a);
1008 
1010 
1013 const char* version();
1014 
1016 
1019 const char* getversion();
1020 
1022 
1025 const char* getredeemcode();
1026 
1028 
1031 const char* getuuid();
1032 
1034 
1037 const char* getpackage();
1038 
1040 
1050 const char* getplatform();
1051 
1053 
1056 void setuserstring(const char* str);
1057 
1059 
1062 const char* getuserstring();
1063 
1065 void exit();
1066 
1068 void clear();
1069 
1071 
1075 void drawonce( bool clear = false, bool updateall = false );
1076 
1078 
1090 bool url(const char* url, bool webapp = false , bool use_webbrowser = true);
1091 
1093 
1101 bool phonecall(const char* number);
1102 
1104 
1119 bool sharefile(const char* mailto, const char* subject, const char* msg, const char* filename);
1120 
1122 
1126 const char* savescreenshot( bool silent = false );
1127 
1129 
1139 bool sharescreenshot(const char* mailto, const char* subject, const char* msg);
1140 
1142 
1145 const char* getscreenshotname();
1146 
1148 
1152 const char* getgps();
1153 
1155 
1159 bool isset(const char* var );
1160 
1162 
1166 bool isnumber(const char* var);
1167 
1169 
1173 bool isint(const char* var);
1174 
1176 
1180 bool isfloat(const char* var);
1181 
1183 
1187 bool isstring(const char* var);
1188 
1190 
1194 bool isspace(const char* var);
1195 
1197 void clearqueuerender();
1198 
1200 void psdrenderall();
1201 
1205 
1208 const char* camera();
1209 
1211 
1219 bool pickup(const char* state, const char* layername);
1220 
1222 
1225 const char* pickupgetlayername();
1226 
1228 void pickupclear();
1229 
1231 
1235 const char* base64encode(const char* str);
1236 
1238 
1242 const char* base64decode(const char* str);
1243 
1245 
1249 const char* scanvar(const char* str);
1250 
1252 
1256 const char* urlencode(const char* str);
1257 
1259 
1263 const char* urldecode(const char* str);
1264 
1266 
1270 const char* getwritepath(const char* filename);
1271 
1273 
1277 const char* md5(const char* filename_or_string);
1278 
1280 
1284 const char* sha256(const char* filename_or_string);
1285 
1287 
1300 const char* openfile( );
1301 
1304 
1324 const char* getpushfile();
1325 
1327 
1331 bool voicestart(const char* savefilename);
1332 
1334 void voicestop();
1335 
1337 
1340 int clamp(int value, int min, int max);
1341 
1343 
1346 float clamp(float value, float min, float max);
1347 
1349 
1352 int lerp(int a, int b, float t);
1353 
1355 
1358 float lerp(float a, float b, float t);
1359 
1361 
1364 void setclipboard(const char* text);
1365 
1367 
1370 const char* getclipboard();
1371 
1373 void delay( int millisec );
1374 
1376 
1408 const char* strftime(const char* format);
1409 
1411 
1416 const char* strcmp(const char* str1, const char* str2);
1417 
1419 
1424 const char* getfilebasename(const char* filename, bool keep_extension = true );
1425 
1427 
1431 const char* getfileextension(const char* filename);
1432 
1434 
1438 const char* getfiledir(const char* filename);
1439 
1441 
1450 bool permission(const char* permission_name, bool require = true );
1451 
1453 
1457 bool ispsdfile(const char* filename);
1458 
1460 
1463 float getaccx();
1464 
1466 
1469 float getaccy();
1470 
1472 
1475 float getaccz();
1476 
1478 
1487 int getorient();
1488 
1490 
1493 float getdpid();
1494 
1496 
1499 float getdpix();
1500 
1502 
1505 float getdpiy();
1506 
1508 
1516 bool _or(test_expr, ...);
1517 
1519 
1527 bool _and(test_expr, ...);
1528 
1530 
1533 void maxsize(int left, int top, int right, int bottom);
1534 
1536 
1539 int getmaxsizestartx();
1540 
1542 
1545 int getmaxsizestarty();
1546 
1548 
1551 int getmaxsizewidth();
1552 
1554 
1557 int getmaxsizeheight();
1558 
1564 
1573 void screensize(int width, int height, bool upscale = false);
1574 
1577 
1582 void setscreentexturesize(int width, int height);
1583 
1585 
1589 
1591 
1595 
1598 
1601 void updatescreentoucharea();
1602 
1604 
1607 void setscreenupscale( bool active );
1608 
1610 
1613 bool isscreenupscale();
1614 
1616 
1623 int getsizeupscalewidth(int ow, int oh, int maxw, int maxh);
1624 
1626 
1633 int getsizeupscaleheight(int ow, int oh, int maxw, int maxh);
1634 
1636 
1639 int getscreensizewidth();
1640 
1642 
1645 int getscreensizeheight();
bool isnumber(const char *var)
Determine if a variable is a number both int or float.
void clearqueuerender()
clear queue rendering both psd and font.
bool permission(const char *permission_name, bool require=true)
checking permission on mobile devices only.
void textlayer(const char *layername, const char *string, int r=255, int g=255, int b=255, int a=255)
display text follow layer position and attribute (build-in font is default)
void procedure(void *function1 >> void *function2 >> ... >> void *functionN)
procedure, a single line of commands that together perform a task
void textareafont(const char *layername, const char *areaname, const char *fontname, const char *string, int r=255, int g=255, int b=255, int a=255)
display text in area with custom font follow layer position and attribute.
bool sharefile(const char *mailto, const char *subject, const char *msg, const char *filename)
share text and file
void setscreentexturesize(int width, int height)
bool ispsdfile(const char *filename)
checking is psd file
bool isint(const char *var)
Determine if a variable is an int.
void maxsize(int left, int top, int right, int bottom)
maximum scene size
const char * getscreenshotname()
get a random name of screenshot
void updatescreentoucharea()
void setportrait()
set portrait mode call before screensize()
void add(const char *name, const char *value)
add value on variable
int getwinsizeheight()
get height on windows size Emulator only!!!
int getsizeupscaleheight(int ow, int oh, int maxw, int maxh)
get a new size upscale in height, calculate from original and max size.
int getcurrentfps()
get current fps
float getdpix()
get screen dpi x
float getdpiy()
get screen dpi y
void textlayerfont(const char *layername, const char *fontname, const char *string, int r=255, int g=255, int b=255, int a=255)
display text with custom font follow layer position and attribute.
iftime(const char *name, test_expr, int delay) void *function
An if statement with time delay in millisecond. reset call ifreset()
void setdebug(int debug)
set debug mode
float getdeltatime()
get delta time
bool url(const char *url, bool webapp=false, bool use_webbrowser=true)
open url
int getmaxsizestartx()
get start point on x axis in maximum scene
void ifreset(const char *name="")
reset ifcount() and iftime(), maybe call in deinit function.
float getaccx()
get accelerometer x
const char * base64decode(const char *str)
base64 decode
int getscreentexturesizewidth()
get width on texture screensize
void _sin(const char *name, const char *value)
_sin value on variable
void voicestop()
stop voice recording.
int getgamefps()
get game fps
r
rotation layer
Definition: builtin.h:39
bool sharescreenshot(const char *mailto, const char *subject, const char *msg)
share current screenshot
const char * savescreenshot(bool silent=false)
save current screenshot to jpg format
void exit()
exit application
ifelse(test_expr, void *function1, void *function2)
if else condition
void gstruct(const char *name, int value)
define global structure
float getdpid()
get screen dpi density
bool voicestart(const char *savefilename)
start voice recording and removing savefilename from audio system before recording.
void psdrenderall()
adding all layers in current psd file to queue rendering.
const char * random_guid(bool with_letter=false)
get random GUID number
int getmaxsizestarty()
get start point on y axis in maximum scene
const char * getuuid()
get device UUID
void clear()
free current psd file
void textalign(int align)
set text alignment, !!!call this before draw text function!!!
void sub(const char *name, const char *value)
subtract value on variable
void textarea(const char *layername, const char *areaname, const char *string, int r=255, int g=255, int b=255, int a=255)
display text in area follow layer position and attribute (build-in font is default)
void setgamefps(int fps)
set game fps, default: 60
int getwinsizewidth()
get width on windows size Emulator only!!!
void setscreenupscale(bool active)
set screen to upscale
void text(int x, int y, const char *string)
display text on screen by build-in font
bool openloading(const char *filename, bool only_psd=true)
show loading screen when load psd file
void setstring(const char *name, const char *value)
set string on variable, don't skip space
void delay(int millisec)
delay cpu circle in milli second
bool strstr(const char *string, const char *keyword)
search string, case sensitive
bool _and(test_expr,...)
AND operation with if statement consists of a boolean expression followed by one or more statements.
const char * random_string_custom(int len, const char *string_custom)
get random string with custom string
const char * openfile()
openfile dialog.
int getmaxsizewidth()
get width on maximum scene
bool _or(test_expr,...)
OR operation with if statement consists of a boolean expression followed by one or more statements.
bool psd(const char *filename, bool clear=true, bool cache=true, bool snd=true)
load a new psd file
void alog(const char *msg)
log message, a msg is showing on log window
const char * urldecode(const char *str)
url decode
int getsizeupscalewidth(int ow, int oh, int maxw, int maxh)
get a new size upscale in width, calculate from original and max size.
void mod(const char *name, const char *value)
mod value on variable
void setbgcolor(int r, int g, int b, int a)
set background color
const char * getfileextension(const char *filename)
get extension from from full path.
void winsize(int width, int height)
windows size, Emulator only!!!
int lerp(int a, int b, float t)
lerp value as int, Computes the linear interpolation between a and b, if the parameter t is inside [0...
const char * strftime(const char *format)
Get time format.
void string(const char *name, const char *value)
define local variable as string
const char * getversion()
get version of ARSA Framework in a string format.
bool isset(const char *var)
Determine if a variable is considered set, this means if a variable is declared and is different than...
bool isspace(const char *var)
Determine if a variable is a whitespace.
bool isstring(const char *var)
Determine if a variable is a string.
int touchmax()
get touch maximum id.
bool isscreenupscale()
is screen upscale
const char * strcmp(const char *str1, const char *str2)
The strcmp() compares two strings character by character. If the strings are equal,...
const char * getpushfile()
void setlandscape()
set landscape mode, call before screensize()
const char * getfilebasename(const char *filename, bool keep_extension=true)
get filename from full path.
const char * sha256(const char *filename_or_string)
get sha256
const char * getwritepath(const char *filename)
get write path with filename and extension
int getorient()
get current screen orientation
const char * getfiledir(const char *filename)
get directory from from full path.
const char * camera()
int getscreensizeheight()
get height on screensize
int clamp(int value, int min, int max)
clamp value as int
void div(const char *name, const char *value)
divide value on variable
const char * getuserstring()
get user string
void gfloat(const char *name, int value)
define global variable as float
bool phonecall(const char *number)
phone call
void set(const char *name, const char *value)
set value on variable
const char * urlencode(const char *str)
url encode
float getaccy()
get accelerometer y
void _cos(const char *name, const char *value)
_cos value on variable
void addstring(const char *name, const char *value)
string cat, don't skip space
const char * md5(const char *filename_or_string)
get md5
void int(const char *name, int value)
define local variable as integer
void drawonce(bool clear=false, bool updateall=false)
drawing screen immediately!
bool touch(const char *state)
query touch state
void gint(const char *name, int value)
define global variable as integer
const char * random_string(int len)
get random string in lenght
const char * scanvar(const char *str)
scan string variable and math replacement
const char * version()
get version of thrid party libs in a string format.
const char * pickupgetlayername()
get layername from user pickup layer.
bool pickup(const char *state, const char *layername)
pickup on layername by state condition.
void setuserstring(const char *str)
set user string
void screensize(int width, int height, bool upscale=false)
int random()
get random number
const char * base64encode(const char *str)
base64 encode
void msgbox(const char *msg)
show message box
void arsalang(const char *src_name)
load external code, !!!use in Photoshop layer only!!!
int getmaxsizeheight()
get height on maximum scene
int getscreensizewidth()
get width on screensize
long gettime()
get virtual time
void proc(void *function1 >> void *function2 >> ... >> void *functionN)
short version of procedure().
void gstring(const char *name, int value)
define global variable as string
void touchclear()
touch clear buffer.
ifcount(const char *name, test_expr, int count) void *function
An if statement with count. reset call ifreset()
const char * getclipboard()
Get UTF-8 text from the clipboard.
int isdebug()
query this psd is on debug mode
void setclipboard(const char *text)
Put UTF-8 text into the clipboard.
const char * getredeemcode()
get current redeem code
float getzrot(float x1, float y1, float x2, float y2)
get z rotation between vector2d(x1,y1) and vector2d(x2,y2)
int getscreentexturesizeheight()
get height on texture screensize
const char * getgps()
get a gps location
long getrealtime()
get real time
void pickupclear()
clear pickup buffer.
bool touchid(int touch_id, const char *state)
query touch state by id
float getaccz()
get accelerometer z
bool isfloat(const char *var)
Determine if a variable is a float.
void float(const char *name, float value)
define local variable as float
void closeloading()
close loading screen when load psd file
const char * getpackage()
get application package
const char * strtok(const char *string, const char *token="")
Split string into tokens, DON'T USE ',' (comma) as token
const char * getplatform()
get current patform using.
void mul(const char *name, const char *value)
multiply value on variable