-
Notifications
You must be signed in to change notification settings - Fork 19
Home en
- About IGN SDK API
- Structure IGN SDK API
- IGN SDK Application Creator and Builder
- How to use IGN SDK API
- Function of IGN SDK API
- State of IGN SDK API
- IGN SDK Widget Config Parser
IGN SDK API is a collection of some command function that integrated on IGN operating system. This API has several facilities in order to access multiple systems and also other facilities. This API was created to simplify the creation of applications on IGN.
The structure of IGN SDK API is as follows:
ign.name_of_function()
-
.ign
use to call the facility of IGN SDK. -
.name_of_function()
is the name of function that provided of IGN SDK.
IGN SDK Application Creator is an API command on IGN are used to build an application or project from IGN SDK.
IGN SDK Format Application Builder use the following directions:
ignsdk-app-creator [OPTION]
Several options on IGN SDK Application Creator :
- -p, --pkgname =[PACKAGE NAME]
Example :
ignsdk-app-creator -p control-panel
IGN SDK Application Builder is an API command on IGN are used for build an application from the application project package that has been created.
Format of IGN SDK Application Builder uses as below:
ignsdk-app-builder [OPTION] [PACKAGE NAME or PROJECT DIRECTORY]
Some options that IGN SDK Application Builder uses are :
- -p, --pkgname is used to creating an packet of application project according to project name
- -d, --dir is used to making a branch or project directory
Example :
$ignsdk-app-builder --pkgname control-panel
$ignsdk-app-builder --dir /home/igos/IGNSDK-APP/control-panel.ign
IGN SDK API can be used on 2 condition, that is:
- Placed on the line in the script, like this:
<script>ign.name_of_function();</script>
- Placed on the function in element
<input class="btn btn-primary" type="submit" onclick="ign.name_of_function()">
IGN API Message is an IGN SDK API that used to making an access a message box on IGN
-
.showMessage()
is used to showing a message box. Format to using API like thisign.showMessage('content_of_message')
IGN API Developer Mode is an API from IGN SDK that used to activating an inspection to show debugging mode on application of IGN SDK. This API can be used to look about wrong source code.
-
.setDev(true)
is used to show additional debugging menu. Format to using API like thisign.setDev(true)
IGN API is the API of the IGN SDK that can be used to provide signal interruption in IGN SDK applications
-
.quit()
is used to close from the application frame. Used like thisign.quit()
-
.back()
is used to back to frame before application. Used like thisign.back()
-
.forward()
is used to forward the frame to the destination application. Used like thisign.forward()
-
.reload()
is used to activated right click to reload. Used like thisign.reload()
-
.stop()
is used to stop a process. Used like thisign.stop()
API IGN Windows Function is an API from IGN SDK that can be used to manage desktop view of application.
-
.windowMaximized(bool)
is used to make maximizing desktop. Used like thisign.windowsMaximized(bool)
-
.widgetSizeMax(width,height)
is used to set a maximized custom desktop. Used like thisign.widgetSizeMax(300,100)
-
.widgetSizeMin(width,height)
is used to set a minimized custom desktop. Used like thisign.widgetSizeMin(300,100)
-
.widgetSize(width,height)
is used to set custom default desktop. Used like thisign.widgetSize(300,100)
-
.getFullScreen(bool)
is used to get a fullscreen desktop. Uset like thisign.getFullScreen(bool)
-
.getToggleFullScreen()
is used to get a fullscreen desktop with toggle. Used like thisign.getToggleFullScreen()
-
.showMaximized()
is used to maximized desktop. Used like thisign.showMaximized()
-
.showMinimized()
is used to minimized desktop. Used like thisign.showMinimized()
IGN API Sistem is a API from IGN SDK that can used on application script to relationship with some system access functions.
-
.cliOut()
is used to get output from system comment. Used like thisign.cliOut('perintah_sistem')
-
.loadBin(name_of_file)
is used to execution of a binary file (give a return path from app.ign/bin/scriptbash). Used like thisign.loadBin("bashscript-example")
-
.exec(name_of_file)
is used to execution a binary file from another resource. Used like thisign.exec(file_to_execution)
API IGN Security is API from IGN SDK that used to activate some application configure.
-
.websecurity()
is used to activate websecurity in javascript with taking into account the circumstances and this also can be used to allow or not cross domain XHR request. Used like thisign.websecurity(bool)
API File System is API from IGN SDK that used to access file system on application
-
.homePath()
is used to get path form home (home path). Used like thisign.homePath()
-
.createFile()
is used to create a file. Used like thisign.createFile()
-
.readFile()
is used to read a file. Used like thisign.readFile()
-
.mkdir()
is used to create a directory. Used like thisign.mkdir()
-
.dirExist()
is used to check status of a directory. Used like thisign.dirExist()
-
.fileExist()
is used to check status of a file. Used like thisign.fileExist()
-
.fileRemove()
is used to remove a file. Used like thisign.fileRemove()
-
.rmdir()
is used to remove a directory. Used like thisign.rmdir()
IGN API Network is API from IGN SDK that used to manage communication with network.
-
.saveFile().download(url,path,id selector feedbask)
is used to download a file from url. Used like thisign.download(url,ign.homePath()+"/dl","meter1")
IGN API Hash is API from IGN SDK that used to create a hashing with IGN SDK
-
.hash(string:md4,md5,sha1)
is use to hashing a string. Support with md4, md5 and sha1. Used like thishash("string_yang_di_hash","md5")
IGN API Database is API from IGN SDK that used to communicated and get an interaction with database management system.
-
.sql()
used to call IGN SDK API sql. used like thisign.sql()
-
.driver("name_database","server_location:user_database:password:_password_database")
is used to connect to database. used like thissql.driver (“mysql”, “localhost: root: password: ignsdk”)
-
.query ("query_that_you_need")
is used to make query from database. used like thisign.query ("select * from participants")
-
console.log(query.status)
is used to check database connection status. The output can be true or false. used like thisconsole.log ($. parseJSON (sql.query (“select * from participants”)).status)
or query can be split to new variable. -
console.log (query.content);
is used to show data record. used like thisconsole.log ($. parseJSON (sql.query (“select * from participants”)).content)
or query can be split to new variable.
Note how to use spesific database
- set driver :
sql.driver("sql_driver ex:sqlite2/sqlite3/mysql","connection")
- connection :
mysql = "hostname:user:password:database";
sqlite2 or sqlite3 = "database file";
Example Of SQL Database uses
/ / call IGNSDK sql API
var sql = ign.sql();
/ / connect to database
var driver = sql.driver (“mysql”, “localhost: root: password: ignsdk”);
/ / query
var query = $. parseJSON (sql.query (“select * from participants”));
/ / check connection status
console.log (query.status); / / false or true
/ / get data record
console.log (query.content);
- Example complete project can open on
https://github.com/anak10thn/ignsdk-example/tree/master/mysql.ign
API Options is API from IGN SDK that used to running application that make from IGN SDK.
-
-p
refers to accessing project in IGN SDK. Used like this$ ignsdk -p <project_location>
. Example:$ ignsdk -p /usr/share/ign-sdk/test/widget.ign
. -
-f
refers to make a custom main file on IGN SDK application that default is indek.html. Used like this$ ignsdk -p <project_location> -f <name_of_main_file>
. Example$ ignsdk -p /usr/share/ign-sdk/test/widget.ign -f main.html
. -
-d
or--dev
refers to debugging function on IGN SDK Application. Debugging mode is used by right click and then select a choiceinspect
. Used like this$ ignsdk -p <project_location> -d
. Example:$ ignsdk -p /usr/share/ign-sdk/test/widget.ign -d
. -
-v
or--version
refers to information about IGN SDK version. Example:$ ignsdk --v
or$ ignsdk --version
.
-
-t
or--transparent
refers to make a transparent widget on IGN SDK. This API can be used if xcomgr or compiz activated. Used like this$ ignsdk -p <project_location> -t
or$ ignsdk -p <project_location> --transparent
. Example:$ ignsdk -p /usr/share/ign-sdk/test/widget.ign --transparent
or$ ignsdk -p /usr/share/ign-sdk/test/widget.ign -t
. -
--noFrame
refers to disable Frame widget IGN SDK. Used like this$ ignsdk -p <lokasi_project> -noFrame
. Example:$ ignsdk -p /usr/share/ign-sdk/test/widget.ign --noFrame
.
- python di IGNSDK (FIX)
- cliOut() or spwan (FIX)
- exec() (FIX)
- transparant widget (FIX)
- widget config parser (FIX)
- none frame option (Experiment)
- toggle fullscreen() mode (FIX)
- json parser (Experiment)
- Sqlite (FIX)
- web storage HTML5 (FIX)
- geolocation (Experiment)
- Application creator (on progress)
- Aplication builder
- Template (experiment)
- Check network connection (experiment code)
- SQL Driver (FIX)
IGN SDK Widget Config Parser can be found on ignsdk.json
file on project directory of IGN SDK Application. false
for disable function and true
to enable function.
Example :
{
"config" : {
"debug" : true ,
"websecurity" : true,
"name" : "tes ign config"
},
"window" : {
"transparent" : true,
"maximize" : true,
"noframe" : false,
"fullscreen" : false,
"width" : 200,
"height" : 100
},
"button" : [
"back",
"forward",
"stop",
"reload"
]
}
Note:
-
"config" : { "debug" : true }
refers to run debugging mode. -
"config" : {"websecurity" : true }
refers to activated websecurity in javascript and can be used to setting XHR request cross domain -
"config" : {"name" : "tes ign config"}
refers to change default name of window manifest. On this statement name of manifest will be change from ignsdk to be "tes ign config". -
"window" : { "transparent":true, "noframe":false, "fullscreen":false "width":200, "height":100}
refers to widget configuration. Some configuration are transparent mode, noFrame mode and fulscreen mode and make a manual size of desktop. -
"button" : { "back", "forward", "stop", "reload" }
refers to custom button on IGN SDK Application.