home *** CD-ROM | disk | FTP | other *** search
-
- // JavaScript wrapper for r3task.h
- // Auto generated file, do not modify by hand
- // Copyrights 2002, Realsoft Graphics Oy
-
- var R3_TASK_H = 1;
- include("oops/r3root.js")
-
-
- var R3CLID_TASK = 1;
-
-
-
-
- // Description: Wait one or more signal objects.
- // Note, the task must own the signals to be waited.
- // p3: R3TAG *, one or more R3TA_Signal tags with signals to be waited
-
- R3TM_WAIT = 1000;
-
- function mR3TM_WAIT(p3) {
- R3Do(this.r3obj, R3TM_WAIT, p3);
- }
-
- // Description: A class message. Finds a task object with given name
- // Returns: Object, address of the task or NULL if task was not found
- // p3: String(0), name of the task to be found
-
- R3TCM_FIND_TASK = 1001;
-
- function mR3TCM_FIND_TASK(p3) {
- return R3DoA(this.r3obj, R3TCM_FIND_TASK, p3);
- }
-
- // Description: Allocates signal from the tasks signal pool.
- // Returns: Integer, If succeeded, non-negative value indentifying the allocated signal.
- // If failed, negative value is returned. NOTE: you don't need this
- // method unless you are going to implement new signal objects.
-
- R3TM_ALLOCSIG = 1002;
-
- function mR3TM_ALLOCSIG() {
- return R3DoA(this.r3obj, R3TM_ALLOCSIG, 0);
- }
-
- // Description: Free signal. NOTE: you don't need this method unless you are
- // going to implement new signal objects.
- // p3: Integer, signal identifier.
-
- R3TM_FREESIG = 1003;
-
- function mR3TM_FREESIG(p3) {
- R3DoA(this.r3obj, R3TM_FREESIG, p3);
- }
-
- // Description: Return the last interrupt handled. (interrupt here == Unix signal)
-
- R3TM_LASTINTERRUPT = 1004;
-
- function mR3TM_LASTINTERRUPT() {
- R3DoA(this.r3obj, R3TM_LASTINTERRUPT, 0);
- }
-
-
-
-
- // R3TA_Stack: Integer, size of the stack in bytes
- R3TA_Stack = 1500;
- function SetR3TA_Stack(value) {
- R3Set(this.r3obj, R3TA_Stack, value);
- }
-
- function GetR3TA_Stack() {
- return R3Get(this.r3obj, R3TA_Stack, R3TID_INTEGER, TRUE); // R3INT
- }
-
- // R3TA_Code: address of the function to be called by the task object to be created
- R3TA_Code = 1501;
- function SetR3TA_Code(value) {
- R3Set(this.r3obj, R3TA_Code, value);
- }
-
- function GetR3TA_Code() {
- return R3Get(this.r3obj, R3TA_Code, R3TID_INTEGER, TRUE); // void(*)(...)
- }
-
- // R3TA_Data: Object, User specific data for the thread, this will automatically be freed when the task is terminated
- R3TA_Data = 1502;
- function SetR3TA_Data(value) {
- R3Set(this.r3obj, R3TA_Data, value);
- }
-
- function GetR3TA_Data() {
- return R3Get(this.r3obj, R3TA_Data, R3TID_INTEGER, TRUE); // void*
- }
-
- // R3TA_DataSize: Integer, size of the user specific data
- R3TA_DataSize = 1503;
- function SetR3TA_DataSize(value) {
- R3Set(this.r3obj, R3TA_DataSize, value);
- }
-
- function GetR3TA_DataSize() {
- return R3Get(this.r3obj, R3TA_DataSize, R3TID_INTEGER, TRUE); // R3INT
- }
-
- // R3TA_Param: Integer, one or more parameters for the function to be executed
- R3TA_Param = 1504;
- function SetR3TA_Param(value) {
- R3Set(this.r3obj, R3TA_Param, value);
- }
-
- function GetR3TA_Param() {
- return R3Get(this.r3obj, R3TA_Param, R3TID_INTEGER, TRUE); // R3INT
- }
-
- // R3TA_Priority: Integer, see priority codes below
- R3TA_Priority = 1505;
- function SetR3TA_Priority(value) {
- R3Set(this.r3obj, R3TA_Priority, value);
- }
-
- function GetR3TA_Priority() {
- return R3Get(this.r3obj, R3TA_Priority, R3TID_INTEGER, TRUE); // R3INT
- }
-
- // R3TA_Signal: Object, tag for the R3TM_WAIT method
- R3TA_Signal = 1506;
- function SetR3TA_Signal(value) {
- R3Set(this.r3obj, R3TA_Signal, value);
- }
-
- function GetR3TA_Signal() {
- return R3Get(this.r3obj, R3TA_Signal, R3TID_INTEGER, TRUE); // R3OBJ*
- }
-
- // R3TA_ThreadId: Integer, task identifier
- R3TA_ThreadId = 1507;
- function SetR3TA_ThreadId(value) {
- R3Set(this.r3obj, R3TA_ThreadId, value);
- }
-
- function GetR3TA_ThreadId() {
- return R3Get(this.r3obj, R3TA_ThreadId, R3TID_INTEGER, TRUE); // R3INT
- }
-
- var R3TPRI_IDLE = 0;
- var R3TPRI_LOWEST = 1;
- var R3TPRI_BELOWNORMAL = 2;
- var R3TPRI_NORMAL = 3;
- var R3TPRI_ABOVENORMAL = 4;
- var R3TPRI_HIGHEST = 5;
- var R3TASK_MAXSIGNALS = 15;
-
-
- function r3Task () {
- this.base = r3God;
- if(arguments.length) {
- this.base(R3CLID_TASK, arguments);
- }
- // Methods
- this.WAIT=mR3TM_WAIT;
- this.FIND_TASK=mR3TCM_FIND_TASK;
- this.ALLOCSIG=mR3TM_ALLOCSIG;
- this.FREESIG=mR3TM_FREESIG;
- this.LASTINTERRUPT=mR3TM_LASTINTERRUPT;
-
- // Attributes
- this.GetStack=GetR3TA_Stack;
- this.SetStack=SetR3TA_Stack;
- this.GetCode=GetR3TA_Code;
- this.SetCode=SetR3TA_Code;
- this.GetData=GetR3TA_Data;
- this.SetData=SetR3TA_Data;
- this.GetDataSize=GetR3TA_DataSize;
- this.SetDataSize=SetR3TA_DataSize;
- this.GetParam=GetR3TA_Param;
- this.SetParam=SetR3TA_Param;
- this.GetPriority=GetR3TA_Priority;
- this.SetPriority=SetR3TA_Priority;
- this.GetSignal=GetR3TA_Signal;
- this.SetSignal=SetR3TA_Signal;
- this.GetThreadId=GetR3TA_ThreadId;
- this.SetThreadId=SetR3TA_ThreadId;
- }
-
- r3Task.prototype=new r3Root;
- // r3task.h_H