Up |
Here are listed only all not documented Scol functions in the Scol language reference. By alphabetic order.
A short description / explanation can be added or the minimal Scol version given.
Please, note these functions can be ok, bugged, incompletes, obsoletes or under development !
So, ask before including them in your project.
Updates notes here.
Please, see Scol 4.5 updates and Scol 5.x updates too.
Please, post all errors / questions / ... in this documentation / these functions to the Scolring.
Note : this page can be not up-to-date. This page should be visited only if the function has not been found in the regular sections.
Kernel go
Plugins :
2D Graphic go | 2D OS go | 5DT data glove go | Audio go | Benchmark go |
BitmapToolkit / OpenCV go | Curl go | Emotiv EPOC Developer Headset control go | GTK+ go | HTML go |
Joypad / Xinput Joypad go | Neurosky go | Nonin medical go | OpenNI / Kinect go | Optitrack / Natural Point go |
Perl Compatible Regular Expression go | Science go | Security go | SerialIO go | SMI RED go |
SpacePoint Fusion go | SO3Engine go | Speech go | SQLite3 go | String (others) go |
Syspack go | Temporary files go | USB-UIRT go | UTIL_G go | VLC go |
VLC Stream go | Wiimote go | WSystem go | X10 Protocol go | XML2 go |
ZooEngine go |
_loadhard : fun [S] I bugged !
_uncypherpack : fun [S S] I (5.22)
CBO_CLOSED : I combo state - not used
CBO_OPENED : I combo state - not used
_DESKTOPwindow : fun [ObjWin] I
not implemented
_FULLSCREENwindow : fun [ObjWin I I] I
not implemented
See http://redmine.scolring.org/projects/scol/repository/changes/trunk/plugins/test/docs/curl.html
Don't use this API !
_curlNewFtp : fun [Chn S [[S I] r1] S S fun [ObjCurl u0 S I S S] u1 u0] ObjCurl
channel, server ip or domain, FTP commands / headers, username (should be nil if anonymous request accepted by the server only), password (should be nil if anonymous request accepted by the server only), callback to the response, a user parameter
_curlNewFtpGet : fun [Chn S S S S fun [ObjCurl u0 S I S S] u1 u0] ObjCurl
channel, server ip or domain, remote filename, username (should be nil if anonymous request accepted by the server only), password (should be nil if anonymous request accepted by the server only), callback to the response, a user parameter
_curlNewFtpPut : fun [Chn S S [[S I] r1] S S fun [ObjCurl u0 S I S S] u1 u0] ObjCurl
channel, server ip or domain, local filename (file to upload, must be in the Scol partition), FTP commands / headers (can be nil), username (should be nil if anonymous request accepted by the server only), password (should be nil if anonymous request accepted by the server only), callback to the response, a user parameter
_curlNewSFtp : fun [Chn S [[S I] r1] S S fun [ObjCurl u0 S I S S] u1 u0] ObjCurl
channel, server ip or domain, local filename (file to upload, must be in the Scol partition), SFTP commands / headers (can be nil), username (should be nil if anonymous request accepted by the server only), password (should be nil if anonymous request accepted by the server only), callback to the response, a user parameter
_curlNewSmtp : fun [Chn S S [S r1] S fun [ObjCurl u0 S I S S] u1 u0] ObjCurl
channel, smtp server (address), from, to, body, callback to the response, a user parameter
_curlNewUrl : fun [Chn S [S r1] I S fun [ObjCurl u0 S I S S] u1 u0] ObjCurl
channel, url, header (can be nil), request mode (get = 0, post = 1, put = 2 or +10 (not verify with https://)), datas (can be nil), callback to the response, a user parameter
_curlNewUrlAuth : fun [Chn S [S r1] [S I] I S fun [ObjCurl u0 S I S S] u1 u0] ObjCurl
channel, url, auth (user:password) and mode (any = 0, basic = 1, digest = 2), request mode (get = 0, post = 1, put = 2 or +10 (not verify with https://)), datas (can be nil), callback to the response, a user parameter
_curlDsUrl : fun [ObjCurl] I
_CBEpocAffectivData : fun [ObjEpoc fun [ObjEpoc u0 F F F F F] u1 u0] ObjEpoc
_CBEpocBadSignal : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocCognitivData : fun [ObjEpoc fun [ObjEpoc u0 I F] u1 u0] ObjEpoc
_CBEpocCognitivTrainingCompleted : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocCognitivTrainingErased : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocCognitivTrainingFailed : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocCognitivTrainingRejected : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocCognitivTrainingStarted : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocCognitivTrainingSucceeded : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocConnected : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocDisconnected : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocExpressivData : fun [ObjEpoc fun [ObjEpoc u0 I I F I F] u1 u0] ObjEpoc
_CBEpocExpressivTrainingCompleted : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocExpressivTrainingErased : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
CBEpocExpressivTrainingFailed : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocExpressivTrainingRejected : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocExpressivTrainingStarted : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocExpressivTrainingSucceeded : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocHeadsetData : fun [ObjEpoc fun [ObjEpoc u0 [I I] [I I I I I I I] [I I I I I I I] [F F] F] u1 u0] ObjEpoc define the callback for new headset data received from Emotiv EPOC
_CBEpocLowBattery : fun [ObjEpoc fun [ObjEpoc u0] u1 u0] ObjEpoc
_CBEpocRawEEGData : fun [ObjEpoc fun [ObjEpoc u0 [F r1]] u1 u0] ObjEpoc
_CREpoc : fun [Chn] ObjEpoc
_DSEpoc : fun [ObjEpoc] I
_EraseCognitivTraining : fun [ObjEpoc I] I
_EraseExpressivTraining : fun [ObjEpoc I] I
_LoadProfile : fun [ObjEpoc S] I
_SaveProfile : fun [ObjEpoc S] I
_StartCognitivTraining : fun [ObjEpoc I] I
_StartExpressivTraining : fun [ObjEpoc I] I
Under development, all informations and currents APIs are in the wiki : http://redmine.scolring.org/projects/lib2dgtk/wiki
More infos : http://www.nonin.com
_CBNoninConnected : fun [ObjNonin fun [ObjNonin u0] u1 u0] ObjNonin
_CBNoninDisconnected : fun [ObjNonin fun [ObjNonin u0] u1 u0] ObjNonin
_CBNoninHR : fun [ObjNonin fun [ObjNonin u0 I] u1 u0] ObjNonin
_CBNoninLowBattery : fun [ObjNonin fun [ObjNonin u0] u1 u0] ObjNonin
_CBNoninSNSA : fun [ObjNonin fun [ObjNonin u0] u1 u0] ObjNonin
_CBNoninSPO2 : fun [ObjNonin fun [ObjNonin u0 I] u1 u0] ObjNonin
_CRNonin : fun [Chn I] ObjNonin
_DSNonin : fun [ObjNonin] I
NONIN_1_VALUE_AVERAGE : I flag
NONIN_4_VALUE_AVERAGE : I flag
NONIN_8_VALUE_AVERAGE : I flag
NONIN_DISPLAY_FULL : I flag
NONIN_DISPLAY_PARTIAL : I flag
NONIN_HR_ENABLE : I flag
NONIN_PROGRAMMED : I flag
NONIN_SENSOR_CONNECT : I flag
NONIN_SPO2_ENABLE : I flag
NONIN_SPOT_CHECK : I flag
_NoninGetOptions : fun [ObjNonin] I
_NoninGetSerialNumber : fun [ObjNonin] S
_NoninSetOptions : fun [ObjNonin I] I
See http://redmine.scolring.org/projects/openniscol/repository/entry/README too.
_CBOptitrackCameraConnected : fun [ObjOptitrackCamera fun [ObjOptitrackCamera u0] u1 u0] ObjOptitrackCamera
_CBOptitrackCameraDisconnected : fun [ObjOptitrackCamera fun [ObjOptitrackCamera u0] u1 u0] ObjOptitrackCamera
_CROptitrackCamera : fun [Chn] ObjOptitrackCamera
_DSOptitrackCamera : fun [ObjOptitrackCamera] I
_OptitrackCameraGetExposure : fun [ObjOptitrackCamera] I
_OptitrackCameraGetIntensity : fun [ObjOptitrackCamera] I
_OptitrackCameraSetExposure : fun [ObjOptitrackCamera I] I
_OptitrackCameraSetIntensity : fun [ObjOptitrackCamera I] I
_pcreEasyMatch : fun [S S] I
the regular expression, the string to scan for matches. Returns 1 if matched, else 0 (or nil if string or pattern are nil)
_pcreEasyReplace : fun [S S S] S
Replaces all occurrences of the pattern in string with a replacement text. Returns new string containing the replacements
_pcreEasySplit : fun [S S] [S r1]
pattern, string. Returns a list of substrings or nil
_pcreNormalMatch : fun [S S I I I I] [[S I I] r1]
See source code
_pcreNormalReplace : fun [S S S I I I] S
See source code
_pcreNormalSplit : fun [S S I I I I] [S r1]
See source code
PHIf : fun [ ] F nombre d'or, Phi = (1 + 5 ^ 0.5) / 2
_scienceDateDayNumber : fun [I I I] I
the day (from 1 to 28, 29, 30 or 31), the month (from 1 to 12), the year (from 1582). Returns the number of days from the 1st january
_scienceDateLeapYear : fun [I] I
should be posterior or equal at 1582 (gregorian calendar). Returns 1 if the year is a leap year
_scienceDateSun : fun [[I I] [I I] [I I I]] [S S]
tuple 0 : latitude => degree (0-180), minute (0 - 59). Positive to north, negative to south; tuple 1 : longitude => degree (0-180),minute (0-59). Positive to east, negative to west; tuple 3 : date => day (1 - 31), month (1-12), year (>= 1582). Can be nil (if in this case, takes the current date). Returns sunrise and sunset, at UTC, "--" if not sunrise / sunset, nil if error
_scienceMathsChuteLibre : fun [F F F I F] F
g (9.81 by default), initial speed (positive, the object goes to up, negative, the object goes to bottom), initial height (from the referential), a flag (SCOLMATHS_MVT_GETSPEED_TOTIME will return the speed from the time, or SCOLMATHS_MVT_GETTIME_TOSPEED will return the elapsed time from the given speed or SCOLMATHS_MVT_GETHEIGHT_TOTIME will return the current height from the elapsed time or SCOLMATHS_MVT_GETHEIGHT_TOSPEED will return the height from the current speed or SCOLMATHS_MVT_GETSPEED_TOHEIGHT will return the speed from the current height or SCOLMATHS_MVT_GETTIME_TOHEIGHT will return the elapsed time from the current height), and a parameter which depends on the previous flag
for example, if flag is SCOLMATHS_MVT_GETSPEED_TOTIME and you want get the speed after 2 seconds, this parameter should be set to '2.0'
_scienceMathsEquation2nd : fun [F F F] [F F]
ax2 + bx +c = 0.
Returns only if the result is a real number, otherwise, returns nil
_scienceMathsVolumeSphere : fun [F F I] F
radius, height and flag : SCOLMATHS_VOLUME_SPHERE or SCOLMATHS_VOLUME_SPHERICAL_CAP or SCOLMATHS_VOLUME_SPHERE_CONE_INTERSECT or SCOLMATHS_VOLUME_SPHERE_CYLINDER
_scienceStatisticStringsAdd : fun [S S] S
add two string number
example : "243" "39901" = "40144"
_scienceStatisticStringsCmp : fun [S S] I
compare two string number
_scienceStatisticStringsSub : fun [S S] S
substract two string number
example : "782" "1626" = "-844"
_scienceStatisticStringIsNegative : fun [S] I
example "-10" will return 1
_scienceStatisticFactorielle : fun [I] S
example 10 will retusn "3628800" (10!)
_scienceStatisticFactorielleF : fun [I] F
1 to 34, 35 and more is ignored
_scienceStatisticArrangementAvecRepetition : fun [I I] S
n^k
_scienceStatisticArrangementSansReptition : fun [I I] S
n! / (n-k)!
_scienceStatisticCombinaisonAvecRepetition : fun [I I] S
(n+k-1)! / k!(n-1)!
_scienceStatisticCombinaisonSansRepetition : fun [I I] S
n! / k!(n-k)!
_scienceWeatherDecodeMetar : fun [S I] [S S S S S S S S S S S S S S S S S S S S]
metar code and a flag FROM_NOAA
_scienceWeatherDecodeMetarLight : fun [S I] [S S S I S S I I I]
metar code and a flag FROM_NOAA
_scienceWeatherMetarNew : fun [Chn S I] ObjScienceWeatherMetar
channel, metar code and a flag FROM_NOAA
_scienceWeatherMetarPressure : fun [ObjScienceWeatherMetar] I
returns the mean sea level pressure
_testSIO : fun [SerialIO S] I (4.5) test the library
_CBSmiCalibrationDone : fun [ObjSmi fun [ObjSmi u0] u1 u0] ObjSmi
_CBSmiConnected : fun [ObjSmi fun [ObjSmi u0] u1 u0] ObjSmi
_CBSmiDisconnected : fun [ObjSmi fun [ObjSmi u0] u1 u0] ObjSmi
_CBSmiNewFixation : fun [ObjSmi fun [ObjSmi u0 F I I] u1 u0] ObjSmi
_CBSmiNewSample : fun [ObjSmi fun [ObjSmi u0 [F I I] [F I I]] u1 u0] ObjSmi
_CloseSmiDevice : fun [ObjSmi] I
_OpenSmiDevice : fun [Chn S I S I] ObjSmi
_ShowEyes : fun [ObjSmi I] I
_StartCalibration : fun [ObjSmi I I I I I I I I] I
_CBFusionButton : fun [ObjFusion fun [ObjFusion u0 I] u1 u0] ObjFusion
_CBFusionConnected : un [ObjFusion fun [ObjFusion u0] u1 u0] ObjFusion
_CBFusionDisconnected : un [ObjFusion fun [ObjFusion u0] u1 u0] ObjFusion
_CBFusionOrientationData : fun [ObjFusion fun [ObjFusion u0 [F F F] [F F F F]] u1 u0] ObjFusion
_CBFusionRawData : fun [ObjFusion fun [ObjFusion u0 [I I I] [I I I] [I I I] [I I]] u1 u0] ObjFusion
_CloseFusionDevice : fun [ObjFusion] I
_OpenFusionDevice : fun [Chn I] ObjFusion
channel and interface mode for the HID device (0 to get raw data, 1 to get orientation data such as quaternion)
Consult the svn. See the current documentation : http://redmine.scolring.org/projects/so3engine/repository/show/Docs/html
_fooP : fun [u0] u0
you should not use this function
_fooPTab : fun [tab u0] tab u0
you should not use this function
_gbaseChecksumP : fun [P I] S
computes the checksum of a file. The flag set the hashing algorithm to use = 0 -> MD5 (default), 1 -> SHA-1, 2 -> SHA-256
_gbaseChecksumS : fun [S I] S
computes the checksum of a string. The flag set the hashing algorithm to use = 0 -> MD5 (default), 1 -> SHA-1, 2 -> SHA-256
_gBaseDirCur : fun [] S
returns the Scol executable directory
_gbaseFileStat : fun [P] [I I I I]
returns size, last access, last modification, last state changed but this function can crash
_gBaseHostName : fun [] S
returns the machine host name
_gbaseIsIp : fun [S] I
tests if a string is a form of an IPv4 or IPv6 address. Return 1 if true else 0
_gBasePathAbsolute : fun [S] I
returns 1 if the given file_name is an absolute file name
_gBasePathBase : fun [S] S
returns the last element of the filename (basename)
_gBasePathBuild : fun [[S r1] I] S
creates a filename from a list of elements using the correct separator for filenames. Argument : 1 = OS separator (e.g. "\" on MS Windows, "/" on Linux), otherwise Scol separator ("/")
Example : fun main ()= _showconsole; let "tools" :: "mytool" :: "mytool.scol" :: nil -> l in ( _fooS _gBasePathBuild l 1; // tools\mytool\mytool.scol (on MS Windows) _fooS _gBasePathBuild l 0; // tools/mytool/mytool.scol ); 0;;
_gBasePathDir : fun [S] S
returns the directory components of a file name
_gbaseSleep : fun [I] I
pauses the current thread for the given number of milliseconds. Returns nil if error
_gBaseStringUTF8 : fun [S I] S
Converts a string in the current locale into a UTF-8 string or reverse. The flag is at 1 from locale to UTF8, 0 from UTF-8 to current locale
_gbaseUserName : fun [] S
returns the name of the system user
Example : Here is a content of a key file : # this is just an example # there can be comments before the first group [First Group] Name=Key File Example\tthis value shows\nescaping # localized strings are stored in multiple key-value pairs Welcome=Hello Welcome[de]=Hallo Welcome[fr_FR]=Bonjour Welcome[it]=Ciao Welcome[be@latin]=Hello [Another Group] Numbers=2;20;-200;0 Booleans=true;false;true;true #comment -> username [username] Name=Foundations of GTK+ Development # A list of strings that are localized Hi=Hello Hi[fr]=Bonjour Hi[de]=Hallo Hi[es]=Hola Bool=true;true;false Nums=1;1;2;3;5;8 Strings=One;One;Two;Three;Five;Eight Int=42 Doubles=0.0;1.0;50.4 Strings[de]=Ein;Ein;Zwei;Funf hi=Salut !! hi[en]=Good morning test=0;1;2; test[fr]=0;1;2; [test] test=test Now, the Scol code : fun extrcatIniSub (list)= if list == nil then 0 else let hd list -> [key value] in ( _fooS strcatn ".... " :: key :: " : " :: value :: nil; extrcatIniSub tl list );; fun extrcatIni (list)= if list == nil then 0 else let hd list -> [group sublist] in ( _fooS strcat ".. " group; extrcatIniSub sublist; extrcatIni tl list );; typeof Ini = ObjKeyFile;; fun main ()= _showconsole; set Ini = _gkeyFileLoadP _channel _checkpack "tests/gkeyfile/0.ini" nil 3; extrcatIni _gkeyFileGetDatas Ini; set Ini = _gkeyFileSetValue Ini "username" "hi" "Salut !!" GKF_VALUE_STRING; set Ini = _gkeyFileSetLocaleValue Ini "username" "hi" "Good morning" "en"; set Ini = _gkeyFileSetValue Ini "test" "test" "test" GKF_VALUE_STRING; _fooId _gkeyFileSave Ini _getmodifypack "tests/gkeyfile/0.ini"; _fooId _gkeyFileDestroy Ini; 0;;
_gkeyFileDataExist : fun [ObjKeyFile S S] I
looks whether the key file has the datas. The arguments : a group name, a key name. Returns :
If the group name and the key name are not nil, this function searches the key into the group. If found, 1 is returned, else 0
If the group name is nil, this function searches the key into all groups. The returned value is the number of this key, 0 if not found.
If the key name is nil, this function searches the group into the keyfile. If found, 1 is returned, else 0.
If the keyfile is nil or if the group and key names are nil, nil is returned.
_gkeyFileDestroy : fun [ObjKeyFile] I
_gkeyFileGetComment : fun [ObjKeyFile S S] S
returns the comment (if exists) to any group and any key
_gkeyFileGetContent : fun [ObjKeyFile] [S I]
returns the content and its length or nil if error
_gkeyFileGetDatas : fun [ObjKeyFile] [[S [[S S] r1]] r1]
returns a list of group names and for each group name, a list of tuple [key value] or nil if error
_gkeyFileGetGroups : fun [ObjKeyFile] [S r1]
_gkeyFileGetLocaleValue : fun [ObjKeyFile S S S] S
returns the locale value for any key in any group. The last argument is the locale (can be nil).
Note : If locale is nil or not found, the value of the default key (without localization) will be returned. When the ObjKeyFile has been created, if the flag is at 0 or 1, the current locale can be used only. In this last case, to get a value of an other locale, the flag should have set to 2 or 3.
_gkeyFileGetNbGroups : fun [ObjKeyFile] I
_gkeyFileGetValue : fun [ObjKeyFile S S I] S
returns the value for any key in any group. The last argument is a flag : GKF_VALUE_RAW, GKF_VALUE_STRING, GKF_VALUE_INTEGER, GKF_VALUE_INTEGER64, GKF_VALUE_UINTEGER64, GKF_VALUE_DOUBLE, GKF_VALUE_BOOLEAN. Returns nil if error or not found
_gkeyFileGetValueList : fun [ObjKeyFile S S] [S r1]
returns the values associated with key under group
_gkeyFileGetValueLocaleList : fun [ObjKeyFile S S S] [S r1]
returns the locale values associated with key under group
_gkeyFileLoadP : fun [Chn P S I] ObjKeyFile
any read referenced file, the list separator or nil (default ";"). One character only (if more, they are ignored), flag : 0 -> no flags, default behaviour, 1 -> use this flag if you plan to write the (possibly modified) contents of the key file back to a file otherwise all comments will be lost when the key file is written back, 2 -> use this flag if you plan to write the (possibly modified) contents of the key file back to a file otherwise only the translations for the current language will be written back, 3 -> 1 and 2
_gkeyFileLoadS : fun [Chn S S I] ObjKeyFile
see _gkeyFileLoadP
_gkeyFileReadP : fun [P S] [[S [[S S] r1]] r1]
read a key file. It is a convenience to get easely the content without threatment
_gkeyFileRemComment : fun [ObjKeyFile S S] ObjKeyFile
removes the comment associated to a key from a group
_gkeyFileRemGroup : fun [ObjKeyFile S] ObjKeyFile
Removes the specified group
_gkeyFileRemKey : fun [ObjKeyFile S S] ObjKeyFile
removes a key from a group
_gkeyFileSave : fun [ObjKeyFile W] I
_gkeyFileSetComment : fun [ObjKeyFile S S S] ObjKeyFile
add a comment to a key under a group
_gkeyFileSetLocaleValue : fun [ObjKeyFile S S S S] ObjKeyFile
the last argument is the locale
_gkeyFileSetLocaleValueList : fun [ObjKeyFile S S S [S r1]] ObjKeyFile
_gkeyFileSetValue : fun [ObjKeyFile S S S I] ObjKeyFile
Associates a new value with key under group : a group name, a key name, a new value, a flag : GKF_VALUE_RAW or GKF_VALUE_STRING
_gkeyFileSetValueList : fun [ObjKeyFile S S [S r1]] ObjKeyFile
_gnetConnect : fun [S S] S
See the svn for more informations
_cbVlcMediaEvent : fun [ObjVlcPlayer fun [ObjVlcPlayer u0 I] u1 u0] I
_crVlcPlayer : fun [Chn] ObjVlcPlayer
_crVlcVmenPlayer : fun [Chn ObjBitmap] ObjVlcPlayer
_dsVlcPlayer : fun [ObjVlcPlayer] I
_getVlcAudioDevices : fun [] [S r1]
_getVlcAudioMute : fun [ObjVlcPlayer] I
_getVlcAudioVolume : fun [ObjVlcPlayer] I
_getVlcPlayerDuration : fun [ObjVlcPlayer] I
_getVlcPlayerLoop : fun [ObjVlcPlayer] I
_getVlcPlayerPosition : fun [ObjVlcPlayer] F
_getVlcPlayerFullScreenState : fun [ObjVlcPlayer] I
_getVlcPlayerState : fun [ObjVlcPlayer] I
_getVlcPlayerTime : fun [ObjVlcPlayer] I
_getVlcVideoDevices : fun [] [S r1]
_pauseVlcPlayer : fun [ObjVlcPlayer] ObjVlcPlayer
_playVlcPlayer : fun [ObjVlcPlayer] ObjVlcPlayer
_saveVlcPlayerSnapShot : fun [ObjVlcPlayer W I I] I
the two last parameters are the width and the height
_seekVlcPlayer : fun [ObjVlcPlayer F] F
_setVlcAudioMute : fun [ObjVlcPlayer I] ObjVlcPlayer
_setVlcAudioVolume : fun [ObjVlcPlayer I] ObjVlcPlayer
_setVlcPlayerFile : fun [ObjVlcPlayer P] I
_setVlcPlayerFullScreenState : fun [ObjVlcPlayer I] I
_setVlcPlayerLoop : fun [ObjVlcPlayer I] I
_setVlcPlayerPosition : fun [ObjVlcPlayer F] F
_setVlcPlayerTime : fun [ObjVlcPlayer I] ObjVlcPlayer
_setVlcPlayerUrl : fun [ObjVlcPlayer S] I
_setVlcPlayerWindow : fun [ObjVlcPlayer ObjWin] ObjVlcPlayer
_stopVlcPlayer : fun [ObjVlcPlayer] ObjVlcPlayer
See the svn for more informations
_crVlmStream : fun [Chn S I S I] ObjVlmStream
parameters are : the channel, the name, the rate, the server ip, the port
_dsVlmStream : fun [ObjVlmStream] I
_enableVlmStream : fun [ObjVlmStream I] ObjVlmStream
_getVlmStreamDuration : fun [ObjVlmStream] I
_getVlmStreamPosition : fun [ObjVlmStream] F
_getVlmStreamTime : fun [ObjVlmStream] I
_pauseVlmStream : fun [ObjVlmStream] ObjVlmStream
_playVlmStream : fun [ObjVlmStream] ObjVlmStream
_seekVlmStream : fun [ObjVlmStream F] F
_setVlmStreamInput : fun [ObjVlmStream S I I] ObjVlmStream
parameters are : scol object, device name, width, height
_stopVlmStream : fun [ObjVlmStream] ObjVlmStream
_SystemPowerState : fun [I] I
_SystemShutDown : fun [I] I
See the documentation here too
Example : typeof xml = ObjXmlRead2;; fun getDatasRead (l)= if l == nil then ( _fooS "finished !"; 0 ) else let hd l -> [n d] in ( _fooS strcatn (itoa n) :: " : " :: d :: nil; getDatasRead tl l );; fun cbEnded (obj, user_parameter, state)= _fooS user_parameter; _fooId state; if (!state) then ( let _readxml2Read xml /* READXML2_VERSION|READXML2_ENCODING|READXML2_STANDALONE|READXML2_LANG| READXML2_NODE_VALUE|*/READXML2_NODE_NAME|READXML2_ATTRIBUTES|READXML2_ATTRVALUES /* | READXML2_NODE_DEPTH|READXML2_LINECOL|READXML2_NODE_TYPE|READXML2_NODE_STRING*/ -> l in getDatasRead l ) else 0;; fun xmlRead ()= set xml = _readxml2CreateFromFile _channel _checkpack "tests/libxml2/1.xml" nil READXML2_OPTION_NONE @cbEnded "ended"; 0;; fun main ()= _showconsole; xmlRead; 0;;
_readxml2CreateFromFile : fun [Chn P S I fun [ObjXmlRead2 u0 I] u1 u0] ObjXmlRead2
Create an object from a file (within the active partition). This creation is made in the specific thread. All threatment should be done after a nil return by the callback.
_readxml2CreateFromString : fun [Chn S S I fun [ObjXmlRead2 u0 I] u1 u0] ObjXmlRead2
Create an object from a string in memory. This creation is made in the specific thread. All threatment should be done after a nil return by the callback.
_readxml2CreateFromUrl : fun [Chn S S I fun [ObjXmlRead2 u0 I] u1 u0] ObjXmlRead2
Create an object from an url. This creation is made in the specific thread. All threatment should be done after a nil return by the callback.
READXML2_OPTION_NOBLANKS : I
Used to the creation. Remove any blank nodes
READXML2_OPTION_NONE : I
Used to the creation. No flag asked. It should be the most useful
READXML2_OPTION_NONET : I
Used to the creation. Forbid network access
READXML2_NSCLEAN : I
Used to the creation. Remove the redundant namespaces declarations
READXML2_OPTION_RECOVER : I
Used to the creation. Try to recover on errors
_readxml2Destroy : fun [ObjXmlRead2] I
_readxml2EntityGet : fun [ObjXmlRead2] I
_readxml2EntitySet : fun [ObjXmlRead2 I] I
By default the xmlReader will report entities as such and not replace them with their content. To replace them, set this function to 1
_readxml2Read : fun [ObjXmlRead2 I] [[I S] r1]
Reads the content. Returns a list of tuples [[I S] r1]. The first member is a read flag, the second is the result
READXML2_ATTRIBUTES : I
Used to read the content. Return the attributes of the elements
READXML2_ATTRVALUES : I
Used to read the content. Return the value of each attribute
READXML2_ENCODING : I
Used to read the content. Return the xml encoding, if available.
Example : "UTF-8"
READXML2_LANG : I
Used to read the content. Return the xml language, if available
READXML2_LINECOL : I
Used to read the content. Line;Column
READXML2_NODE_DEPTH : I
Used to read the content. Return the depth of the current node
READXML2_NODE_NAME : I
Used to read the content. Return the name of an element.
Example : xml file => <TEST> it is a test</TEST> will return "TEST"
READXML2_NODE_STRING : I
Used to read the content. Don't use it
READXML2_NODE_TYPE : I
Used to read the content. Return the type of the current node : "NONE", "ELEMENT_START", "ELEMENT_END", "ATTRIBUTE", "TEXT", "CDATA", "COMMENT", "DOCUMENT", "DOCUMENT_TYPE", "DOCUMENT_FRAGMENT", "XML_DECLARATION", "ENTITY_START", "ENTITY_END" or nil
READXML2_NODE_VALUE : I
Used to read the content. Return any text of an element.
Example : xml file => <TEST> it is a test</TEST> will return "it is a test"
READXML2_STANDALONE : I
Used to read the content. Return whether is a standalone or not.
Example : "1"
READXML2_VALIDITY : I
Used to read the content. Not really implemented. Tests the validity (via a DTD or others)
READXML2_VERSION : I
Used to read the content. return the xml used version, if available
The XML datas should be in UTF-8 format if the encoding attribute is not present.
The reader runs on a specific child thread.
To make a basic parser, you must :
Example : typeof xml = ObjSax2;; // callback when a new element starts fun cbElementStart (obj, user_parameter, name, attrs)= _fooS user_parameter; _fooS strcat "element = " name; _fooSList attrs; 0;; // callback when an element ends fun cbElementEnd (obj, user_parameter, name)= _fooS user_parameter; _fooS strcat "element = " name; 0;; // callback to the beginning (the ending) of a xml document fun cbDocument (obj, user_parameter)= _fooS if user_parameter then "END DOCUMENT" else "BEGIN DOCUMENT"; 0;; // clabback called when the reading is finished and the Scol object is destroyed fun cbFinished (obj, user_parameter)= _fooS "Finished !"; 0;; // 1 : create a new ObjSax2 object, 2 : define the callbacks, 3 : launch the reader fun xmlParse ()= set xml = _sax2CreateFromFile _channel _checkpack "tools\os3dplugins\input\serial\serial.xml"; _sax2CBelementStart xml @cbElementStart "startElement"; _sax2CBelementEnd xml @cbElementEnd "endElement"; _sax2CBdocumentStart xml @cbDocument 0; _sax2CBdocumentEnd xml @cbDocument 1; _sax2CBdestroyed xml @cbFinished 0; _sax2Read xml; 0;;
_sax2CBcdata : fun [ObjSax2 fun [ObjSax2 u0 S I] u1 u0] ObjSax2
called when a cdata block has been parsed. The two supplemental parameterso f the callback are this block (string) and its length (integer)
_sax2CBcharacters : fun [ObjSax2 fun [ObjSax2 u0 S] u1 u0] ObjSax2w
called when the reader receiving some chars.
_sax2CBcomment : fun [ObjSax2 fun [ObjSax2 u0 S] u1 u0] ObjSax2
called when the reader meets any comments
_sax2CBdestroyed : fun [ObjSax2 fun [ObjSax2 u0] u1 u0] ObjSax2
called when all is finished
_sax2CBdocumentEnd : fun [ObjSax2 fun [ObjSax2 u0] u1 u0] ObjSax2
This is called when the reader ends the parsing
_sax2CBdocumentStart : fun [ObjSax2 fun [ObjSax2 u0] u1 u0] ObjSax2
This is called when the reader starts the parsing
_sax2CBelementEnd : fun [ObjSax2 fun [ObjSax2 u0 S] u1 u0] ObjSax2
The supplemetal argument of the reflex is the name of the element
_sax2CBelementStart : fun [ObjSax2 fun [ObjSax2 u0 S [S r1]] u1 u0] ObjSax2
The supplementals parameters of the callback are : first, the name of the element, and second, a list attribut / value (an attribut and next the associated value)
_sax2CBentity : fun [ObjSax2 fun [ObjSax2 u0 S] u1 u0] ObjSax2
called when the reader meets an entity
_sax2CBreference : fun [ObjSax2 fun [ObjSax2 u0 S] u1 u0] ObjSax2
called when the reader detects a reference
_sax2CreateFromFile : fun [Chn P] ObjSax2
Create an object from a file. The content is not loaded in the memory. So it is useful for the large file.
_sax2CreateFromString : fun [Chn S] ObjSax2
_sax2EncAsk : fun [ObjSax2 S S] ObjSax2
This function allows to define an encoding conversion. It must call before the reader. This function is experimental yet. The arguments are : from, to
_sax2Read : fun [ObjSax2] I
Returns 0 if success
_treexml2CreateFromFile : fun [Chn P S I] ObjXmlTree2
_treexml2CreateFromFileObject : fun [Chn File S I] ObjXmlTree2
_treexml2CreateFromString : fun [Chn S S I] ObjXmlTree2
_treexml2CreateFromUrl : fun [Chn S S I] ObjXmlTree2
_treexml2Read : fun [ObjXmlTree2 fun [ObjXmlTree2 u0 [[S [[I S S] r1]] r1]] u1 u0] ObjXmlTree2