Built-in front calls summary

Various front-end functions are implemented within Genero front-ends.

This section describes the front-end functions available for all types of front-ends. Note that several front-end functions are specific to the type of front-end.

Table 1. Standard front-end functions
Function Name Description GDC GBC GMA GMI
ui.Interface.frontCall("standard", "cbAdd",
  [text], [result]) 
Adds to the content of the clipboard. Yes No No No
ui.Interface.frontCall("standard", "cbClear",
  [], [result]) 
Clears the content of the clipboard. Yes No No No
ui.Interface.frontCall("standard", "cbGet",
   [], [text]) 
Gets the content of the clipboard. Yes No No No
ui.Interface.frontCall("standard", "cbPaste",
   [], [result]) 
Pastes the content of the clipboard to the current field. Yes No No No
ui.Interface.frontCall("standard", "cbSet",
 [text], [result]) 
Set the content of the clipboard. Yes Yes No No
ui.Interface.frontCall("standard", "clearFileCache",
  [], [result]) 
Clears the local file cache. Yes No No No
ui.Interface.frontCall("standard", "execute",
 [cmd,wait], [result]) 
Executes a command on the front-end platform, with or without waiting. Yes No No No
ui.Interface.frontCall("standard", "feInfo",
 [name], [result]) 
Queries general front-end properties. Yes Yes Yes Yes
ui.Interface.frontCall("standard", "getEnv",
 [name], [value]) 
Returns an environment variable set in the user session on the front end platform. Yes No No No
ui.Interface.frontCall("standard", "getWindowId",
 [aui-win-id], [loc-win-id]) 
Returns the local window manager identifier of the window corresponding to the AUI window id passed as parameter. Yes No No No
ui.Interface.frontCall("standard", "hardCopy",
 [pgsize], [result]) 
Prints a screenshot of the current window Yes Yes No No
ui.Interface.frontCall("standard", "launchURL",
  [ url [, mode ] ], [] )
Opens a URL with the default URL handler of the front-end. Yes Yes Yes Yes
ui.Interface.frontCall("standard", "mdClose",
 [name], [result]) 
Unloads a DLL or shared library front call module. Yes No No No
ui.Interface.frontCall("standard", "openDir",
 [path,caption], [result]) 
Displays a file dialog window to get a directory path on the local file system. Yes No No No
ui.Interface.frontCall("standard", "openFile",
 [path,name,wildcards,caption],
 [result])
Displays a file dialog window to let the user select a single file path on the local file system. Yes Yes Yes Yes
ui.Interface.frontCall("standard", "openFiles",
 [path,name,wildcards,caption],
 [result])
Displays a file dialog window to let the user select a list of file paths on the local file system. Yes Yes Yes Yes
ui.Interface.frontCall("standard", "playSound",
  [resource], [])
Plays the sound file passed as parameter on the front-end platform. Yes Yes Yes Yes
ui.Interface.frontCall("standard", "saveFile",
  [path,name,filetype,caption],
  [result]) 
Displays a file dialog window to get a path to save a file on the local file system. Yes No No No
ui.Interface.frontCall("standard", "setReportFont",
  [font], [result]) 
Override the font used for GDC report generation for the current application (DBPRINT=FGLSERVER). Yes No No No
ui.Interface.frontCall("standard", "setReportPrinter",
  [printer], [result])
Override the GDC printer configuration used for report generation for the current application (DBPRINT=FGLSERVER). Yes No No No
Important:

This feature is deprecated, its use is discouraged although not prohibited.

ui.Interface.frontCall("standard", "setWebComponentPath",
  [path], [])
Defines the base path where web components are located. Yes N/A Yes Yes
ui.Interface.frontCall("standard", "shellExec",
  [document, action], [result])
Opens a file on the front-end platform with the program associated to the file extension. Yes No No No
Table 2. Webcomponent module front-end functions
Function Name Description
ui.Interface.frontCall("webcomponent", "call",
  [aui-name, function-name [, param1, param2, ... ] ],
  [result]
)
Calls a JavaScript function through the web component.
ui.Interface.frontCall("webcomponent", "frontCallAPIVersion",
  [],[result])
Returns the API version of web component front-end calls.
ui.Interface.frontCall("webcomponent", "getTitle",
  [aui-name], [result] )
Returns the title of the HTML doc rendered by a web component.
Table 3. monitor module front-end functions
Function Name Description
ui.Interface.frontCall("monitor", "update",
  [ path-to-update-file [,warning-text [,elevation-prompt] ] ],
  [ result ])
Starts the GDC update.
Table 4. Windows DDE front-end functions
Function name Description
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINDDE","DDEConnect",
 [ program, document, encoding ], [result] )
DDEConnect opens a DDE connection.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINDDE","DDEExecute",
  [ program, document, command, encoding ], [result] )
DDEExecute executes a DDE command.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINDDE","DDEFinish",
  [ program, document ], [result] )
DDEFinish closes a DDE connection.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINDDE","DDEFinishAll",
  [], [result] )
DDEFinishAll closes all DDE connections.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINDDE","DDEError",
  [], [errmsg] )
DDEError returns error information about the last DDE operation.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINDDE","DDEPeek",
  [ program, container, cells, encoding ], [ result, value ] )
DDEPeek retrieves data from the specified program and document using the DDE channel.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINDDE","DDEPoke",
  [ program, container, cells, values, encoding ], [result] )
DDEPoke sends data to the specified program and document using the DDE channel.
Table 5. Windows® COM front-end functions
Function name Description
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINCOM","CreateInstance",
  [program], [handle] )
The CreateInstance function creates an instance of a registered COM object.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINCOM","CallMethod",
  [ handle, method, arg1, ... ], [result] )  
The CallMethod function calls a method on a specified object.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINCOM","GetProperty",
  [ handle, member ], [result] )
The GetProperty function gets a property of an object.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINCOM","SetProperty", 
  [ handle, member, value ], [result] )
The SetProperty function sets a property of an object.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINCOM","GetError",
  [], [result] )
The GetError function gets a description of the last error which occurred.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WINCOM","ReleaseInstance",
  [handle], [result] )
The ReleaseInstance function releases an instance of a COM object.
Table 6. WinMail front-end functions: General
Function name Description
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","Init",
  [], [id ] )
  • ret is the identifier of the message initialized.
  • For each Init function, a Close must be called.
The Init function initializes the module.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","Close",
  [id], [ result ] )
The Close function clears all information corresponding to a message, and frees the memory occupied by the message.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","SetBody",
  [ id, body ], [ result ] )
The SetBody function sets the body of the mail.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","SetSubject",
  [ id, subject ], [ result ] )
The SetSubject function sets the subject of the mail.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","AddTo",
  [ id, name, address ], [ result ] )
The AddTo function adds a "To" addressee to the mail.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","AddCC",
  [ id, name, address ], [ result ] )
The AddCC function adds a "CC" addressee to the mail.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","AddBCC",
  [ id, name, address ], [ result ] )
The AddBCC function adds a "BCC" addressee to the mail.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","AddAttachment",
  [ id, fileName], [ result ] )
The AddAttachment function adds a file as an attachment to the mail.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","SendMailSMTP",
  [ id ], [result] )
The SendMailSMTP function sends the mail with the SMTP protocol.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","SendMailMAPI",
  [ id ], [result] )
The SendMailMAPI function sends the mail with the MAPI protocol.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","GetError",
  [ id ], [ result ] )
The GetError function gets a description of the last error that occurred.
Table 7. WinMail front-end functions: SMTP-specific
Function name Description
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","SetSmtp",
 [ id, smtp:port ], [ result ] )
The SetSmtp function sets the SMTP server to be used.
Important:

This feature is deprecated, its use is discouraged although not prohibited.

CALL ui.Interface.frontCall("WinMail","SetFrom",
  [ id, name, address ], [ result ] )
The SetFrom function sets sender information.
Table 8. theme module front-end functions
Function Name Description
ui.Interface.frontCall("theme", "setTheme",
   [name], [])
Activates a specific GBC theme.
ui.Interface.frontCall("theme", "getCurrentTheme",
   [], [result])
Gets the active GBC theme.
ui.Interface.frontCall("theme", "listThemes",
   [], [result])
Lists all available GBC themes.
Table 9. localStorage module front-end functions
Function Name Description
ui.Interface.frontCall("localStorage", "clear",
   [], [])
Removes all local storage key/value pairs.
ui.Interface.frontCall("localStorage", "getItem",
   [key], [value])
Returns the current value of local storage key.
ui.Interface.frontCall("localStorage", "keys",
   [], [key-list] )
Returns the list of defined local storage keys.
ui.Interface.frontCall("localStorage", "removeItem",
   [key], [])
Deletes the specified local storage key.
ui.Interface.frontCall("localStorage", "setItem",
   [key,value], [])
Sets a value for local storage key.
Table 10. Common mobile module front-end functions
Function Name Description
ui.Interface.frontCall("mobile", "chooseContact",
   [], [result])
Lets the user choose a contact from the mobile device contact list and returns the vCard.
ui.Interface.frontCall("mobile", "choosePhoto",
   [], [path])
Lets the user select a picture from the mobile device's photo gallery and returns a picture identifier.
ui.Interface.frontCall("mobile", "chooseVideo",
  [], [path])
Lets the user select a video from the mobile device's video gallery and returns a video identifier.
ui.Interface.frontCall("mobile", "composeMail",
   [to, subject, content, cc, bcc, attachments ...],
   [result])
Invokes the user's default mail application for a new mail to send.
ui.Interface.frontCall("mobile", "composeSMS",
  [ recipients, content ],
  [ result ] )
Sends an SMS text to one or more phone numbers.
ui.Interface.frontCall("mobile", "connectivity",
   [], [result] )
Returns the type of network available for the mobile device.
ui.Interface.frontCall("mobile", "getGeolocation",
   [], [status, latitude, longitude] )
Returns the Global Positioning System (GPS) location of a mobile device.
ui.Interface.frontCall("mobile","getRemoteNotifications",
   [], [data] )
This front call retrieves push notification messages.
ui.Interface.frontCall("mobile", "importContact",
   [vcard], [result] )
Creates a new contact, or merges to an existing entry, the contact details passed in a vCard string.
ui.Interface.frontCall("mobile", "isForeground",
   [],  [result] )
Indicates if the mobile app is in foreground mode.
ui.Interface.frontCall("mobile", "newContact",
  [defaults],[vcard])
Opens contact input form to create a new entry in the contact database.
ui.Interface.frontCall("mobile","registerForRemoteNotifications",
   [], [registration-token] )
This front call registers a mobile device for push notifications.
ui.Interface.frontCall("mobile", "runOnServer",
   [ appurl, timeout ], [] )
Run an application from the Genero Application Server using the specified URL.
ui.Interface.frontCall("mobile", "scanBarCode",
   [], [code, type] )
Allow the user to scan a barcode with a mobile device
ui.Interface.frontCall("mobile", "takePhoto",
   [], [path] )
Lets the user take a picture with the mobile device and returns the corresponding picture identifier.
ui.Interface.frontCall("mobile", "takeVideo",
  [], [path])
Lets the user take a video with the mobile device and returns the corresponding video identifier.
ui.Interface.frontCall("mobile","unregisterFromRemoteNotifications",
   [], [] )
This front call unregisters the mobile device from push notifications.
Table 11. Android™ module front-end functions
Function Name Description
ui.Interface.frontCall("android","askForPermission",
  [permission], [result])
Ask the user to enable a dangerous feature on the Android device.
ui.Interface.frontCall("android", "showAbout",
  [],[])
Shows the GMA about box displaying version information.
ui.Interface.frontCall("android", "showSettings", [], [])
Shows the GMA settings box controlling debug options.
ui.Interface.frontCall("android","startActivity",
  [action, data, category, type, component, extras],
  [])
Starts an external Android application (activity), and returns to the GMA application immediately.
ui.Interface.frontCall("android", "startActivityForResult",
  [action, data, category, type, component, extras],
  [outdata, outextras])
Starts an external application (Android activity) and waits until the activity is closed.
Table 12. iOS module front-end functions
Function Name Description
ui.Interface.frontCall("ios", "getBadgeNumber",
  [],[value])
Returns the current badge number associated to the app.
ui.Interface.frontCall("ios", "setBadgeNumber",
  [value], [])
Sets the current badge number associated to the app.
Table 13. Cordova front-end functions
Function Name Description
ui.Interface.frontCall("cordova", "call",
  [plugin-name, function-name [, param1, param2, ... ] ],
  [result]
)
Calls a function in a Cordova plugin and returns a result.
ui.Interface.frontCall("cordova", "callWithoutWaiting",
  [plugin-name, function-name [, param1, param2, ... ] ],
  [callback-id])
Calls a function asynchronously in a Cordova plugin, without waiting for a result.
ui.Interface.frontCall("cordova", "getAllCallbackData",
  [callback-id-filter], [results])
Returns all results for asynchronous Cordova plugin front calls, based on a callback ID filter.
ui.Interface.frontCall("cordova", "getCallbackDataCount",
  [], [count])
Returns the number of pending Cordova plugin results.
ui.Interface.frontCall("cordova", "getCallbackData",
  [], [result, callback-id])
Returns the first Cordova plugin result from the result queue of all asynchronous Cordova plugin front calls, and removes it from the queue.
ui.Interface.frontCall("cordova", "getPluginInfo",
  [plugin-name], [result] )
Returns details about a specific Cordova plugin.
ui.Interface.frontCall("cordova", "listPlugins",
  [ ], [plugins] )
Returns the list of available Cordova plugins.