diff options
author | Alexey Kulakov <panda75@bk.ru> | 2014-12-22 17:11:45 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2014-12-22 17:11:45 +0000 |
commit | 3a4943c2453812a4c6d9f2d6d968e0f7c357f6b9 (patch) | |
tree | ac7c864262652c4b2df2d0307317cf7bee1ec528 /plugins/ExternalAPI | |
parent | 481fdcdb42e01422b33aad54dd1671cea705ce22 (diff) |
Actman API header updated to v.3
git-svn-id: http://svn.miranda-ng.org/main/trunk@11586 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ExternalAPI')
-rw-r--r-- | plugins/ExternalAPI/delphi/m_actman.inc | 90 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_actman.h | 105 |
2 files changed, 108 insertions, 87 deletions
diff --git a/plugins/ExternalAPI/delphi/m_actman.inc b/plugins/ExternalAPI/delphi/m_actman.inc index 8498732ba8..6a65b9446a 100644 --- a/plugins/ExternalAPI/delphi/m_actman.inc +++ b/plugins/ExternalAPI/delphi/m_actman.inc @@ -4,35 +4,58 @@ // defined in interfaces.inc
//const MIID_ACTMANAGER:MUUID='{9584DA04-FB4F-40c1-9325-E4F9CAAFCB5D}';
-// new and common Actman data
const
AutoStartName:PWideChar = '#Autostart';
+
+//----- Macro executing services -----
+
const
- // Get list service (full share)
- ACCF_EXPORT = $08000000; // action to export (UA export)
- ACCF_IMPORT = ACCF_EXPORT; // (UA import)
+ {
+ wParam - id: dword
+ lParam - parameter
+ }
+ MS_ACT_RUNBYID :PAnsiChar = 'Actions/RunById';
+
+ {
+ wParam - unicode macro name
+ lParam - parameter
+ }
+ MS_ACT_RUNBYNAME:PAnsiChar = 'Actions/RunByName';
-//----- Old Actman compatibility -----
const
- DBBranch = 'ActMan';
+ ACTP_BYNAME = 1; // id points on unicode name
+ ACTP_WAIT = 2; // waiting for macro finish
+ ACTP_NOTIFY = 4; // notify (raise event) for start/finish macro
+ ACTP_SAMETHREAD = 8; // execute macro in same thread (with finish waiting)
+ ACTP_KEEPRESULT = 16; // (internal) keep last result
+type
+ pAct_Param = ^tAct_Param;
+ tAct_Param = record
+ Id :uint_ptr; // Id or name
+ wParam:WPARAM;
+ lParam:LPARAM;
+ flags :dword; // ACTP_*
+ lPType:dword; // last result (in lParam) type
+ end;
+
const
- ACCF_DISABLED = $10000000; // action disabled
- ACCF_OVERLOAD = $01000000; // imported action overwrite old
- ACCF_IMPORTED = ACCF_EXPORT;
- ACCF_VOLATILE = $04000000; // don't save in DB
- ACCF_ID = $02000000; // for MS_ACT_SELECT, lParam is ID (else name)
- ACCF_CLEAR = $01000000; // clear other flags, else - set
- ACCF_FLAGS = ACCF_DISABLED or ACCF_EXPORT or ACCF_IMPORTED or ACCF_VOLATILE;
+ { Starts macro with 2 parameters
+ wParam: 0
+ lParam: pointer to TAct_Param
+ }
+ MS_ACT_RUNPARAMS:PAnsiChar = 'Actions/RunWithParams';
+
+//----- Macro list operations -----
+
const
- ACTM_ACT = $10000000; // do not check, internal
- ACTM_ACTS = $20000000; // do not check, internal
- ACTM_RELOAD = $00000004;
-//----- End of compatibility block -----
+ // Get list service (full share)
+ ACCF_EXPORT = $08000000; // action to export (UA export)
+ ACCF_IMPORT = ACCF_EXPORT; // (UA import)
type
pChain = ^tChain;
tChain = record
- descr:pWideChar;
+ descr:PWideChar;
id :dword;
flags:dword; // ACCF_* flags ?? right now - just selection/overload
order:dword; // ??
@@ -52,37 +75,6 @@ const lParam - list address (pointer to data returned by MS_ACT_GETLIST)
}
MS_ACT_FREELIST:PAnsiChar = 'Actions/FreeList';
- {
- wParam - id: dword
- lParam - parameter
- }
- MS_ACT_RUNBYID :PAnsiChar = 'Actions/RunById';
- {
- wParam - unicode action name
- lParam - parameter
- }
- MS_ACT_RUNBYNAME:PAnsiChar = 'Actions/RunByName';
-
-{ Starts action with 2 parameters
- wParam: 0
- lParam: pointer to TAct_Param
-}
- MS_ACT_RUNPARAMS:PAnsiChar = 'Actions/RunWithParams';
-const
- ACTP_BYNAME = 1; // id points on unicode name
- ACTP_WAIT = 2; // waiting for macro finish
- ACTP_NOTIFY = 4; // notify (raise event) for start/finish macro
- ACTP_SAMETHREAD = 8; // execute macro in same thread (with finish waiting)
- ACTP_KEEPRESULT = 16; // (internal) keep last result
-type
- pAct_Param = ^tAct_Param;
- tAct_Param = record
- Id :uint_ptr; // Id or name
- wParam:WPARAM;
- lParam:LPARAM;
- flags :dword; // ACTP_*
- lPType:dword; // last result (in lParam) type
- end;
const
ACTM_NEW = $00000001; // new macros was added
diff --git a/plugins/ExternalAPI/m_actman.h b/plugins/ExternalAPI/m_actman.h index c900ba9c6c..2382b40aae 100644 --- a/plugins/ExternalAPI/m_actman.h +++ b/plugins/ExternalAPI/m_actman.h @@ -1,19 +1,49 @@ #ifndef M_ACTMAN
#define M_ACTMAN
-#define ACCF_DISABLED 0x10000000 // action disabled
-#define ACCF_EXPORT 0x08000000 // action to export
-#define ACCF_VOLATILE 0x04000000 // don't save in DB
-#define ACCF_IMPORTED ACF_EXPORT
-#define ACCF_FLAGS (ACCF_DISABLED | ACCF_EXPORT | ACCF_IMPORTED | ACCF_VOLATILE)
-#define ACCF_ID 0x02000000 // for MS_ACT_SELECT, lParam is ID (else name)
-#define ACCF_CLEAR 0x01000000 // clear other flags, else - set
+#define AutoStartName "#Autostart"
+
+//----- Macro executing services -----
+
+// Service to call action defined in wParam;
+// wParam: ID of an action (see ACTION.ActID) when calling MS_ACT_RUN
+// or description of an action (see ACTION.ActDescr) when calling MS_ACT_RUNGROUP
+// lParam: parameter (will be passed to action called)
+#define MS_ACT_RUNBYID "Actions/RunById"
+#define MS_ACT_RUNBYNAME "Actions/RunByName"
+
+// Starts action with 2 parameters
+// wParam: 0
+// lParam: pointer to TAct_Param
+
+#define MS_ACT_RUNPARAMS "Actions/RunWithParams"
+
+#define ACTP_BYNAME 1 // id points on unicode name
+#define ACTP_WAIT 2 // waiting for macro finish
+#define ACTP_NOTIFY 4 // notify (raise event) for start/finish macro
+#define ACTP_SAMETHREAD 8 // execute macro in same thread (with finish waiting)
+#define ACTP_KEEPRESULT 16 // (internal) keep last result
+
+typedef struct TAct_Param
+ {
+ uint_ptr id; // Id or name
+ WPARAM wParam;
+ LPARAM lParam;
+ DWORD flags; // ACTP_*
+ DWORD lPType; // last result (in lParam) type
+ } TAct_Param, *PAct_Param;
+
+//----- Macro list operations -----
+
+#define ACCF_EXPORT 0x08000000 // action to export
+#define ACCF_IMPORT ACF_EXPORT
typedef struct{
WCHAR* Descr;
DWORD ID;
DWORD flags; // ACCF_* flags
+ DWORD order;
} TChain, *PChain;
// Service to get list of all configured actions;
@@ -28,40 +58,16 @@ typedef struct{ // lParam : list address (pointer to ACTION returned by MS_ACT_GETLIST)
#define MS_ACT_FREELIST "Actions/FreeList"
-// Service to call action defined in wParam;
-// wParam: ID of an action (see ACTION.ActID) when calling MS_ACT_RUN
-// or description of an action (see ACTION.ActDescr) when calling MS_ACT_RUNGROUP
-// lParam: parameter (will be passed to action called)
-#define MS_ACT_RUNBYID "Actions/RunById"
-#define MS_ACT_RUNBYNAME "Actions/RunByName"
-
-// Event: action group list was changed: something was added or deleted
-// wParam: set of ACTM_* flags
-// lParam : 0
-#define ME_ACT_CHANGED "Actions/Changed"
-
-// Starts action with 2 parameters
-// wParam: 0
-// lParam: pointer to TAct_Param
-
-#define MS_ACT_RUNPARAMS "Actions/RunWithParams"
-typedef struct TAct_Param
- {
- DWORD flags; // 0 - ID, 1 - Name
- DWORD ID; // Id or name
- WPARAM wParam;
- LPARAM lParam;
- } TAct_Param, *PAct_Param;
-
#define ACTM_NEW 0x00000001
#define ACTM_DELETE 0x00000002
-#define ACTM_RELOAD 0x00000004
#define ACTM_RENAME 0x00000008
#define ACTM_SORT 0x00000010
-#define ACTM_ACT 0x10000000 // do not check, internal
-#define ACTM_ACTS 0x20000000 // do not check, internal
#define ACTM_LOADED 0x80000000
+// Event: action group list was changed: something was added or deleted
+// wParam: set of ACTM_* flags
+// lParam : 0
+#define ME_ACT_CHANGED "Actions/Changed"
#define ACIO_EXPORT 0x00000001 // export, else - import
#define ACIO_APPEND 0x00000002 // append file on export
@@ -73,24 +79,47 @@ typedef struct TAct_Param // Return - true, if totally succesful
#define MS_ACT_INOUT "Actions/ImpExp"
-
//Event: Export actions
// wParam - ACIO_* flags
// lParam - unicode filename
#define ME_ACT_INOUT "Actions/InOut"
-
// Select/unselect specified action
// wParam: set of ACCF_* consts
// lParam: unicode action name / number
// Return - -1 if unsuccesful
#define MS_ACT_SELECT "Actions/Select"
-
// Event: Action started/finished
// wParam - Action status: 0 - started, 1 - finished
// lParam - action id
#define ME_ACT_ACTION "Actions/Action"
+//----- Scheduling part services -----
+
+// Enable or disable tasks
+// wParam - 1/0 (enable/disable)
+// lParam - unicode task name
+// Note - works for all tasks with same started name
+#define MS_ACT_TASKENABLE "Actions/TaskEnable"
+
+// Delete task
+// wParam - 0
+// lParam - unicode task name
+// Note - works for all tasks with same started name
+#define MS_ACT_TASKDELETE "Actions/TaskDelete"
+
+// Set task repeat count
+// wParam - repeat count
+// lParam - unicode task name
+// Return - old repeat count value
+// Note - works for all tasks with same started name
+#define MS_ACT_TASKCOUNT "Actions/TaskCount"
+
+// Event for task start
+// wParam - counter of call (from 0 to repeat count)
+// lParam - unicode task name
+#define ME_ACT_BELL "Actions/Bell"
+
#endif
|