[120762] branches/gsoc14-interactive/API Description.txt
shasha at macports.org
shasha at macports.org
Fri Jun 6 05:30:10 PDT 2014
Revision: 120762
https://trac.macports.org/changeset/120762
Author: shasha at macports.org
Date: 2014-06-06 05:30:10 -0700 (Fri, 06 Jun 2014)
Log Message:
-----------
First draft for the API description
Added Paths:
-----------
branches/gsoc14-interactive/API Description.txt
Added: branches/gsoc14-interactive/API Description.txt
===================================================================
--- branches/gsoc14-interactive/API Description.txt (rev 0)
+++ branches/gsoc14-interactive/API Description.txt 2014-06-06 12:30:10 UTC (rev 120762)
@@ -0,0 +1,63 @@
+API DEFINITION FOR INTERACTIVE QUESTIONS
+
+FUNCTION CALLS AVAILABLE
+
+ui_ask_yesno
+DESC: Displays a question with 'yes' and 'no' as options. Waits for user input indefinitely unless a timeout is specified.
+ Shows the list of port passed to it without any numbers.
+
+PARAMETERS: (may change)
+ "message": Message as a string
+ portname : Name of the port which triggered the question
+ <list> : May contain one or more portnames
+ def : The default answer for the question
+ 10s : Time for timeout (with 0 as default value which signifies no timeout)
+
+RETURN VALUES: Return a unique value for each case
+ -1: Timeout occured
+ -2: Default
+ 0: Yes
+ 1: No
+
+ui_ask_singlechoice
+DESC: Displays a question with a list of numbered choices and asks the user to enter a number to specify their choice.
+ Waits for user input indefinitely unless a timeout is specified.
+
+PARAMETERS: (may change)
+ "message": Message as a string
+ portname : Name of the port which triggered the question
+ <list> : May contain one or more portnames
+ def : The default answer for the question
+ 10s : Time for timeout (with 0 as default value which signifies no timeout)
+
+RETURN VALUES: Return a unique value for each case
+ -1: Timeout occured
+ -2: Default
+ i: Index of the list that was initially passed to the function
+
+ui_ask_multichoice
+DESC: Displays a question with a list of numbered choices and asks the user to enter a space separated string of numbers to specify their choice.
+ Waits for user input indefinitely unless a timeout is specified.
+
+PARAMETERS: (may change)
+ "message": Message as a string
+ portname : Name of the port which triggered the question
+ <list> : May contain one or more portnames
+ def : The default answer for the question
+ 10s : Time for timeout (with 0 as default value which signifies no timeout)
+
+RETURN VALUES: Return a unique value for each case
+ -1: Timeout occured
+ -2: Default
+ <list>: Indices of the list that was initially passed in the form of a list
+
+ui_timeout
+DESC: Function internal to the client that prints the visualisation for a timeout. Runs for the specified time interval.
+
+PARAMETERS: (may change)
+ 10s : Time for timeout
+
+RETURN VALUES: Return a unique value for each case
+ 1: Timeout completed
+ 0: Timeout aborted
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140606/3006c06f/attachment-0001.html>
More information about the macports-changes
mailing list