summaryrefslogtreecommitdiff
path: root/plugins/ExternalAPI
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ExternalAPI')
-rw-r--r--plugins/ExternalAPI/delphi/m_actman.inc48
-rw-r--r--plugins/ExternalAPI/delphi/m_addcontactplus.inc29
-rw-r--r--plugins/ExternalAPI/delphi/m_alarms.inc57
-rw-r--r--plugins/ExternalAPI/delphi/m_assocmgr.inc8
-rw-r--r--plugins/ExternalAPI/delphi/m_avatarhistory.inc50
-rw-r--r--plugins/ExternalAPI/delphi/m_changekeyboardlayout.inc8
-rw-r--r--plugins/ExternalAPI/delphi/m_dbeditorpp.inc2
-rw-r--r--plugins/ExternalAPI/delphi/m_dropbox.inc26
-rw-r--r--plugins/ExternalAPI/delphi/m_flags.inc58
-rw-r--r--plugins/ExternalAPI/delphi/m_folders.inc10
-rw-r--r--plugins/ExternalAPI/delphi/m_ftpfile.inc101
-rw-r--r--plugins/ExternalAPI/delphi/m_historypp.inc124
-rw-r--r--plugins/ExternalAPI/delphi/m_historystats.inc6
-rw-r--r--plugins/ExternalAPI/delphi/m_httpserver.inc14
-rw-r--r--plugins/ExternalAPI/delphi/m_kbdnotify.inc12
-rw-r--r--plugins/ExternalAPI/delphi/m_msg_buttonsbar.inc117
-rw-r--r--plugins/ExternalAPI/delphi/m_mydetails.inc2
-rw-r--r--plugins/ExternalAPI/delphi/m_notify.inc45
-rw-r--r--plugins/ExternalAPI/delphi/m_nudge.inc15
-rw-r--r--plugins/ExternalAPI/delphi/m_nxsn.inc20
-rw-r--r--plugins/ExternalAPI/delphi/m_quickcontacts.inc3
-rw-r--r--plugins/ExternalAPI/delphi/m_quotes.inc36
-rw-r--r--plugins/ExternalAPI/delphi/m_sendss.inc66
-rw-r--r--plugins/ExternalAPI/delphi/m_sessions.inc22
-rw-r--r--plugins/ExternalAPI/delphi/m_shutdown.inc25
-rw-r--r--plugins/ExternalAPI/delphi/m_simplestatusmsg.inc51
-rw-r--r--plugins/ExternalAPI/delphi/m_skin_eng.inc445
-rw-r--r--plugins/ExternalAPI/delphi/m_spellchecker.inc6
-rw-r--r--plugins/ExternalAPI/delphi/m_splash.inc11
-rw-r--r--plugins/ExternalAPI/delphi/m_statusplugins.inc9
-rw-r--r--plugins/ExternalAPI/delphi/m_stopspam.inc41
-rw-r--r--plugins/ExternalAPI/delphi/m_text.inc269
-rw-r--r--plugins/ExternalAPI/delphi/m_toptoolbar.inc2
-rw-r--r--plugins/ExternalAPI/delphi/m_versioninfo.inc4
-rw-r--r--plugins/ExternalAPI/delphi/m_winterspeak.inc5
-rw-r--r--plugins/ExternalAPI/delphi/m_yamn.inc43
-rw-r--r--plugins/ExternalAPI/delphi/m_yapp.inc18
37 files changed, 1551 insertions, 257 deletions
diff --git a/plugins/ExternalAPI/delphi/m_actman.inc b/plugins/ExternalAPI/delphi/m_actman.inc
index 635b576758..5f0089a60c 100644
--- a/plugins/ExternalAPI/delphi/m_actman.inc
+++ b/plugins/ExternalAPI/delphi/m_actman.inc
@@ -7,24 +7,17 @@
const
AutoStartName:PWideChar = '#Autostart';
const
- DBBranch = 'ActMan';
-const
- ACCF_DISABLED = $10000000; // action disabled
- ACCF_EXPORT = $08000000; // action to export
- ACCF_VOLATILE = $04000000; // don't save in DB
- ACCF_IMPORTED = ACCF_EXPORT;
- ACCF_FLAGS = ACCF_DISABLED or ACCF_EXPORT or ACCF_IMPORTED or ACCF_VOLATILE;
- ACCF_OVERLOAD = $01000000; // imported action overwrite old
-
- ACCF_ID = $02000000; // for MS_ACT_SELECT, lParam is ID (else name)
- ACCF_CLEAR = $01000000; // clear other flags, else - set
+ // 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
- order:dword;
+ flags:dword; // ACCF_* flags ?? right now - just selection/overload
+ order:dword; // ??
end;
const
@@ -58,26 +51,27 @@ const
}
MS_ACT_RUNPARAMS:PAnsiChar = 'Actions/RunWithParams';
const
- ACTP_BYNAME = 1;
- ACTP_WAIT = 2;
+ 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
- flags :dword; // ACTP_*
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;
- ACTM_DELETE = $00000002;
- ACTM_RELOAD = $00000004;
- ACTM_RENAME = $00000008;
- ACTM_SORT = $00000010;
- ACTM_ACT = $10000000; // do not check, internal
- ACTM_ACTS = $20000000; // do not check, internal
- ACTM_LOADED = $80000000;
+ ACTM_NEW = $00000001; // new macros was added
+ ACTM_DELETE = $00000002; // some macros was deleted
+ ACTM_RENAME = $00000008; // possible, some macro names was changed
+ ACTM_SORT = $00000010; // possible, macro order in list was changed
+ ACTM_LOADED = $80000000; // All macros loaded and ready to work (at plugin start)
{
Event: action group list was changed: some was added or deleted
@@ -107,9 +101,9 @@ const
{
Select/unselect specified action
- wParam - set of ACCF_* consts
+ wParam - mask (bit 0 = ID if set/name; bit 1 = clear if set/set; bit 2 = get if set/set)
lParam - unicode action name / number
- Return - -1 if unsuccesful
+ Return - 0 if unsuccesful
}
MS_ACT_SELECT:PAnsiChar = 'Actions/Select';
diff --git a/plugins/ExternalAPI/delphi/m_addcontactplus.inc b/plugins/ExternalAPI/delphi/m_addcontactplus.inc
new file mode 100644
index 0000000000..678d796dcc
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_addcontactplus.inc
@@ -0,0 +1,29 @@
+{
+AddContact+ plugin for Miranda IM
+
+Copyright (C) 2007-2011 Bartosz 'Dezeath' Biaіek
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+}
+
+{$IFNDEF M_ADDCONTACTPLUS}
+{$DEFINE M_ADDCONTACTPLUS}
+
+// Brings up the add contact dialog
+// wParam = lParam = 0
+const
+ MS_ADDCONTACTPLUS_SHOW:PAnsiChar = 'AddContactPlus/Show';
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_alarms.inc b/plugins/ExternalAPI/delphi/m_alarms.inc
new file mode 100644
index 0000000000..4882407160
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_alarms.inc
@@ -0,0 +1,57 @@
+{$IFNDEF M_ALARMS}
+{$DEFINE M_ALARMS}
+
+const
+// flags for alarm action
+ AAF_POPUP = 1; // show a popup window (or a popup from popups plugin, if installed and activated via options)
+ AAF_SOUND = 2; // play a sound
+ AAF_COMMAND = 4; // run a command
+ AAF_SYSTRAY = 8; // flash systray icon (not implemented)
+
+type
+ TOccurrence = (
+ OC_ONCE, // all fields in time (see below) are valid
+ OC_DAILY, // only wHour, wMinute, and wSecond are valid
+ OC_WEEKLY, // wHour, wMinute, wSecond, and wDayOfWeek are valid
+ OC_WEEKDAYS, // only wHour, wMinute, and wSecond are valid
+ OC_MONTHLY, // wHour, wMinute, wSecond, and wDay are valid
+ OC_YEARLY // all fields except wYear are valid
+ );
+
+const
+// flags
+ ALF_HIDDEN = $01; // do not show in GUI (either options or reminder frame)
+ ALF_NOREMINDER = $02; // do not show in reminder frame
+ ALF_SUSPENDED = $04; // do not trigger next occurence
+ ALF_NOSTARTUP = $08; // do not trigger on startup if it was due when miranda was not running
+ ALF_NOSNOOZE = $10; // do not allow snoozing of this alarm
+
+type
+ TALARMINFO = record
+ szTitle :TChar;
+ szDesc :TChar;
+ occurrence :TOccurrence;
+ snoozer :LongBool; // this alarm is a 'once-off', the result of the user pressing the 'snooze'
+ // button - the time field no longer contains the original alarm time
+ time :TSYSTEMTIME; // the time the alarm is triggered at - different fields are valid depending on
+ // what the 'occurence' value is set to (see definition of Occurence type above)
+ action :word; // bitwise OR of AAF_* constants above
+ szCommand :TChar; // passed to ShellExecute (if action & AAF_COMMAND) when the alarm is triggered
+ szCommandParams:TChar; // passed as parameters for above command
+ sound_num :byte; // use alarm sound 1, 2, or 3 (if action & AAF_SOUND) (4 == speak, version 0.0.7.0+)
+ flags :int; // ALF_* above
+ end;
+
+const
+// set an alarm
+// wparam = 0
+// lparam = (ALARMINFO *)&alarm
+ MS_ALARMS_ADDALARM:PAnsiChar = 'Alarms/AddAlarm';
+
+// event sent when an alarm is triggered
+// wparam=0
+// lparam=(ALARMINFO *)&alarm
+// returning non-zero from your hook will prevent the alarm actions from being carried out
+ ME_ALARMS_TRIGGERED:PAnsiChar = 'Alarms/Triggered';
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_assocmgr.inc b/plugins/ExternalAPI/delphi/m_assocmgr.inc
index 22321a00b4..44b0892196 100644
--- a/plugins/ExternalAPI/delphi/m_assocmgr.inc
+++ b/plugins/ExternalAPI/delphi/m_assocmgr.inc
@@ -40,7 +40,7 @@ ME_SYSTEM_MODULESLOADED is fired.
lParam : (PFILETYPEDESC)ftd
Returns 0 on success, nonzero otherwise.
}
- MS_ASSOCMGR_ADDNEWFILETYPE = 'AssocMgr/AddNewFileType';
+ MS_ASSOCMGR_ADDNEWFILETYPE:PAnsiChar = 'AssocMgr/AddNewFileType';
type
PFILETYPEDESC = ^TFILETYPEDESC;
@@ -115,7 +115,7 @@ associated with the file type.
lParam : (PAnsiChar)pszFileExt
Returns 0 on success, nonzero otherwise.
}
- MS_ASSOCMGR_REMOVEFILETYPE = 'AssocMgr/RemoveFileType';
+ MS_ASSOCMGR_REMOVEFILETYPE:PAnsiChar = 'AssocMgr/RemoveFileType';
{ Add a new url protocol type v0.1.0.0+
Add a new url type to be registered with Windows.
@@ -125,7 +125,7 @@ ME_SYSTEM_MODULESLOADED is fired.
lParam : (PURLTYPEDESC)utd
Returns 0 on success, nonzero otherwise.
}
- MS_ASSOCMGR_ADDNEWURLTYPE = 'AssocMgr/AddNewUrlType';
+ MS_ASSOCMGR_ADDNEWURLTYPE:PAnsiChar = 'AssocMgr/AddNewUrlType';
type
PURLTYPEDESC = ^TURLTYPEDESC;
@@ -171,6 +171,6 @@ associated with the url type.
lParam : (PAnsiChar)pszProtoPrefix
Returns 0 on success, nonzero otherwise.
}
- MS_ASSOCMGR_REMOVEURLTYPE = 'AssocMgr/RemoveUrlType';
+ MS_ASSOCMGR_REMOVEURLTYPE:PAnsiChar = 'AssocMgr/RemoveUrlType';
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_avatarhistory.inc b/plugins/ExternalAPI/delphi/m_avatarhistory.inc
new file mode 100644
index 0000000000..5cfdd7b190
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_avatarhistory.inc
@@ -0,0 +1,50 @@
+{
+Copyright (C) 2006 MattJ, Ricardo Pescuma Domenecci
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+}
+
+
+{$IFNDEF M_AVATARHISTORY}
+{$DEFINE M_AVATARHISTORY}
+
+const
+ EVENTTYPE_AVATAR_CHANGE = 9003;
+
+{
+Return TRUE is Avatar History is enabled for this contact
+
+wParam: hContact
+lParam: ignored
+}
+ MS_AVATARHISTORY_ENABLED:PAnsiChar = 'AvatarHistory/IsEnabled';
+
+
+{
+Get cached avatar
+
+wParam: (char *) protocol name
+lParam: (char *) hash
+return: (TCHAR *) NULL if none is found or the path to the avatar. You need to free this string
+ with mir_free.
+}
+ MS_AVATARHISTORY_GET_CACHED_AVATAR:PAnsiChar = 'AvatarHistory/GetCachedAvatar';
+
+
+ MS_AVATARHISTORY_SHOWDIALOG:PAnsiChar = 'AvatarHistory/ShowDialog';
+
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_changekeyboardlayout.inc b/plugins/ExternalAPI/delphi/m_changekeyboardlayout.inc
index b1df7628c1..99f7ddcdd7 100644
--- a/plugins/ExternalAPI/delphi/m_changekeyboardlayout.inc
+++ b/plugins/ExternalAPI/delphi/m_changekeyboardlayout.inc
@@ -6,18 +6,18 @@ const
// wParam - HWND or NULL for current window
// lParam must be 0
// returns 0 on success and returns non-zero (-1) on error.
- MS_CKL_CHANGELAYOUT 'ChangeKeyboardLayout/ChangeLayout';
+ MS_CKL_CHANGELAYOUT:PAnsiChar = 'ChangeKeyboardLayout/ChangeLayout';
//wParam должен быть ноль.
//lParam - LPCTSTR текста, раскладку которого требуется определить,
//Возвращает HKL раскладку текста, или NULL в случае ошибки.
//Примечание: При определении раскладки учитывается опция "Раскладка текста - текущая раскладка"
- MS_CKL_GETLAYOUTOFTEXT = 'ChangeKeyboardLayout/GetLayoutOfText';
+ MS_CKL_GETLAYOUTOFTEXT:PAnsiChar = 'ChangeKeyboardLayout/GetLayoutOfText';
type
CKLLayouts = record
hklFrom:HKL; // layout of the current text
- hklTo :HKL; // layout of the result text
+ hklTo :HKL; // layout of the result text
bTwoWay:bool;
end;
@@ -26,6 +26,6 @@ const
//lParam - указатель на структуру CKLLayouts, содержащую раскладки для
//изменения текста и опцию "двунаправленного преобразования"
//Возвращает LPTSTR на результирующую строку
- MS_CKL_CHANGETEXTLAYOUT = 'ChangeKeyboardLayout/ChangeTextLayout';
+ MS_CKL_CHANGETEXTLAYOUT:PAnsiChar = 'ChangeKeyboardLayout/ChangeTextLayout';
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_dbeditorpp.inc b/plugins/ExternalAPI/delphi/m_dbeditorpp.inc
index e6e9a0c5c8..d9b11f23b3 100644
--- a/plugins/ExternalAPI/delphi/m_dbeditorpp.inc
+++ b/plugins/ExternalAPI/delphi/m_dbeditorpp.inc
@@ -11,7 +11,7 @@ const
{
Import settings\contacts from file
- wParam=(HANDLE)hContact
+ wParam=hContact
lParam=(char*)FilePath
always returns 0
}
diff --git a/plugins/ExternalAPI/delphi/m_dropbox.inc b/plugins/ExternalAPI/delphi/m_dropbox.inc
index e2b6ab0cba..8e7cb913e2 100644
--- a/plugins/ExternalAPI/delphi/m_dropbox.inc
+++ b/plugins/ExternalAPI/delphi/m_dropbox.inc
@@ -2,21 +2,27 @@
{$DEFINE M_DROPBOX}
const
-//upload file on Dropbox
-//wParam = (MCONTACT)hContact
-//lParam = (LPARAM)(const wchar_t*)path - full path to file
+// upload file on Dropbox
+// wParam = (MCONTACT)hContact - NULL to send to the Dropbox contact
+// lParam = (LPARAM)(const wchar_t*)path - full path to file
// returns file htansfer handle or NULL on failure
// returns immediately, without waiting for the send
+// note, that you can track progress by using ME_PROTO_ACK
MS_DROPBOX_SEND_FILE:PAnsiChar = 'Dropbox/Send/File';
-// notifies a caller about file send end
-// wParam = (MCONTACT)hContact
-// lParam = (LPARAM)(const wchar_t*)url - "\r\n" separated download link to file
- ME_DROPBOX_SEND_SUCCEEDED:PAnsiChar = 'Dropbox/Send/Succeeded';
+// if you want to get download links of sent files
+// use ME_DROPBOX_SENT hook. you'll get:
+type
+ TTRANSFERINFO = record
+ hProcess:THANDLE; // hProcess
+ status :int; // status of transfer. 0 on success otherwise fail
+ data :pointer; // NULL ended array of download links
+ end;
-// notifies a caller about file send failure
+const
+// notifies a caller that file has been sent
// wParam = (MCONTACT)hContact
-// lParam = (LPARAM)(HANDLE)hProcess
- ME_DROPBOX_SEND_FAILED:PAnsiChar = 'Dropbox/Send/Failed';
+// lParam = (LPARAM)(TRANSFERINFO*)info - transfer info
+ ME_DROPBOX_SENT:PAnsiChar = 'Dropbox/Sent/Event';
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_flags.inc b/plugins/ExternalAPI/delphi/m_flags.inc
index f060b10608..0fc53209c0 100644
--- a/plugins/ExternalAPI/delphi/m_flags.inc
+++ b/plugins/ExternalAPI/delphi/m_flags.inc
@@ -21,54 +21,56 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
{$DEFINE M_FLAGS}
const
-
-{
- Country Flags Plugin v0.1.0.3
-}
-
-{ interface id }
- MIID_FLAGS: TGUID = '{88A3B66E-C438-4381-BC17-71D99D225F9C}';
-
-{ Load a country flag icon from the skin library. v0.1.0.0+
+{* Load a country flag icon from the skin library. v0.1.0.0+
The retrieved icon should be released using MS_SKIN2_RELEASEICON after use.
The country numbers can be retrieved using MS_UTILS_GETCOUNTRYLIST.
Another way to get the country numbers are the CTRY_* constants in winnls.h of WinAPI.
To retrieve the country number from a locale, call GetLocaleInfo().
with LOCALE_ICOUNTRY.
- wParam : countryNumber
- lParam : (bool)fReturnHandle (nonzero to to retrieve the icolib handle instead of the icon)
+ wParam=countryNumber
+ lParam=(BOOL)fReturnHandle (nonzero to to retrieve the icolib handle instead of the icon)
Returns a icon handle (HICON) on success, NULL on error.
-}
- MS_FLAGS_LOADCOUNTRYFLAGICON = 'Flags/LoadCountryFlagIcon';
+*}
+ MS_FLAGS_LOADFLAGICON:PAnsiChar = 'Flags/LoadFlagIcon';
-{ Create a merged country flag icon. v0.1.0.0+
+ CTRY_UNSPECIFIED = 0;
+ CTRY_OTHER = 9999;
+ CTRY_UNKNOWN = $FFFF;
+
+{* Create a merged country flag icon. v0.1.0.0+
The retrieved icon should be released using DestroyIcon() after use.
- wParam : countryNumberUpper
- lParam : countryNumberLower
+ wParam=countryNumberUpper
+ lParam=countryNumberLower
Returns a icon handle (HICON) on success, NULL on error.
-}
- MS_FLAGS_CREATEMERGEDFLAGICON = 'Flags/CreateMergedFlagIcon';
+*}
+ MS_FLAGS_CREATEMERGEDFLAGICON:PAnsiChar = 'Flags/CreateMergedFlagIcon';
-{ Get a corresponding country given an (external) IP address. v0.1.0.0+
+{* Get a corresponding country given an (external) IP address. v0.1.0.0+
The retrieved number can be converted to a normal country name
using MS_UTILS_GETCOUNTRYBYNUMBER.
- wParam : dwExternalIP (same format as used Netlib)
- lParam : 0
+ wParam=dwExternalIP (same format as used in Netlib)
+ lParam=0
Returns a country number on success,
or 0xFFFF on failure (MS_UTILS_GETCOUNTRYBYNUMBER returns "Unknown" for this).
-}
- MS_FLAGS_IPTOCOUNTRY = 'Flags/IpToCountry';
+*}
+ MS_FLAGS_IPTOCOUNTRY:PAnsiChar = 'Flags/IpToCountry';
-{ Detect the origin country of a contact. v0.1.0.0+
+{* Detect the origin country of a contact. v0.1.0.0+
This uses the contacts's IP first, and falls back on using
CNF_COUNTRY and CNF_COCOUNTRY of contact details.
To get the contact's IP it relies on the db setting
"RealIP" in the proto module.
- wParam : (WPARAM)(HANDLE)hContact
- lParam : 0
+ wParam=(WPARAM)(HANDLE)hContact
+ lParam=0
Returns a country number on success,
or 0xFFFF on failure (MS_UTILS_GETCOUNTRYBYNUMBER returns "Unknown" for this).
-}
- MS_FLAGS_DETECTCONTACTORIGINCOUNTRY = 'Flags/DetectContactOriginCountry';
+*}
+ MS_FLAGS_DETECTCONTACTORIGINCOUNTRY:PAnsiChar = 'Flags/DetectContactOriginCountry';
+ MS_FLAGS_GETCONTACTORIGINCOUNTRY :PAnsiChar = 'Flags/GetContactOriginCountry';//for beta version 0.1.1.0
+
+ SETTING_SHOWSTATUSICONFLAG_DEFAULT = 1;
+ SETTING_SHOWEXTRAIMGFLAG_DEFAULT = 1;
+ SETTING_USEUNKNOWNFLAG_DEFAULT = 1;
+ SETTING_USEIPTOCOUNTRY_DEFAULT = 1;
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_folders.inc b/plugins/ExternalAPI/delphi/m_folders.inc
index 7bafe3248e..d1f555d3ae 100644
--- a/plugins/ExternalAPI/delphi/m_folders.inc
+++ b/plugins/ExternalAPI/delphi/m_folders.inc
@@ -41,7 +41,7 @@ const
FOLDER_LOGS = PROFILE_PATH+'\'+CURRENT_PROFILE+'\logs';
FOLDER_RECEIVED_FILES = PROFILE_PATH+'\'+CURRENT_PROFILE+'\received files';
FOLDER_DOCS = MIRANDA_PATH+'\'+'docs';
-
+
FOLDER_CONFIG = PLUGINS_PATH+'\config';
FOLDER_SCRIPTS = MIRANDA_PATH+'\scripts';
FOLDER_UPDATES = MIRANDA_PATH+'\updates';
@@ -84,7 +84,7 @@ const
Returns a handle to the registered path or 0 on error.
You need to use this to call the other services.
}
- MS_FOLDERS_REGISTER_PATH = 'Folders/Register/Path';
+ MS_FOLDERS_REGISTER_PATH:PAnsiChar = 'Folders/Register/Path';
{
Folders/Get/PathSize service
@@ -94,7 +94,7 @@ const
it will either call strlen() or wcslen() to get the length of the string.
Returns the size of the buffer.
}
- MS_FOLDERS_GET_SIZE = 'Folders/Get/PathSize';
+ MS_FOLDERS_GET_SIZE:PAnsiChar = 'Folders/Get/PathSize';
type
TFOLDERSGETDATA = record
@@ -114,7 +114,7 @@ const
lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
Should return 0 on success, or nonzero otherwise.
}
- MS_FOLDERS_GET_PATH = 'Folders/Get/Path';
+ MS_FOLDERS_GET_PATH:PAnsiChar = 'Folders/Get/Path';
{
Folders/On/Path/Changed
@@ -122,6 +122,6 @@ const
lParam - (LPARAM) 0
Triggered when the folders change, you should reget the paths you registered.
}
- ME_FOLDERS_PATH_CHANGED = 'Folders/On/Path/Changed';
+ ME_FOLDERS_PATH_CHANGED:PAnsiChar = 'Folders/On/Path/Changed';
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_ftpfile.inc b/plugins/ExternalAPI/delphi/m_ftpfile.inc
new file mode 100644
index 0000000000..0f43e8941e
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_ftpfile.inc
@@ -0,0 +1,101 @@
+{
+FTP File YM plugin
+Copyright (C) 2007-2010 Jan Holub
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+}
+
+
+{$IFNDEF M_FTP_FILE}
+{$DEFINE M_FTP_FILE}
+
+const
+ FNUM_DEFAULT = 0; // user's default FTP server
+ FNUM_FTP1 = 1; // first FTP server in setting
+ FNUM_FTP2 = 2; // second...
+ FNUM_FTP3 = 3;
+ FNUM_FTP4 = 4;
+ FNUM_FTP5 = 5;
+
+ FMODE_RAWFILE = 1; // Object list contains path(s) to file(s) which will be uploaded as they are
+ FMODE_ZIPFILE = 2; // ... path(s) to file(s) which will be zipped and uploaded as one ZIP file
+ FMODE_ZIPFOLDER = 4; // ... path to folder which will be zipped and uploaded as one ZIP file (objectCount == 1)
+
+ FUPL_UNICODE = 1; // Object list contains WCHAR* paths
+
+type
+ TFTPUPLOAD = record
+ cbSize:int; // size of the structure
+ hContact:TMCONTACT; // contact handle, can be NULL
+ ftpNum:byte; // number of the FTP server which will be used for upload, can be one of FNUM_* values
+ mode:byte; // upload mode, can be one of FMODE_* values
+ flags:dword; // bitwise OR of the FUPL_* flags above
+ pszObjects:^TChar; // pointer to the array of the object(s) to upload, content is determined by MODE value
+ objectCount:int; // number of items in Object list
+ end;
+
+const
+//
+// Send file(s) or folder in selected mode to the FTP server
+// wParam = 0; not used
+// lParam = (LPARAM)(FTPUPLOAD*)&ftpu; pointer to FTPUPLOAD
+// returns 0 if upload started with no errors, nonzero otherwise
+//
+ MS_FTPFILE_UPLOAD:PAnsiChar = 'FTPFile/Upload';
+
+(*
+__inline static INT_PTR FTPFileUploadA(MCONTACT hContact, BYTE ftpNum, BYTE mode, char **pszObjects, int objCount)
+{
+ FTPUPLOAD ftpu = {0};
+ ftpu.cbSize = sizeof(ftpu);
+ ftpu.hContact = hContact;
+ ftpu.ftpNum = ftpNum;
+ ftpu.mode = mode;
+ ftpu.pszObjects = pszObjects;
+ ftpu.objectCount = objCount;
+ return CallService(MS_FTPFILE_UPLOAD, 0, (LPARAM)&ftpu);
+}
+
+__inline static INT_PTR FTPFileUploadW(MCONTACT hContact, BYTE ftpNum, BYTE mode, wchar_t **pswzObjects, int objCount)
+{
+ FTPUPLOAD ftpu = {0};
+ ftpu.cbSize = sizeof(ftpu);
+ ftpu.hContact = hContact;
+ ftpu.ftpNum = ftpNum;
+ ftpu.mode = mode;
+ ftpu.flags = FUPL_UNICODE;
+ ftpu.pswzObjects = pswzObjects;
+ ftpu.objectCount = objCount;
+ return CallService(MS_FTPFILE_UPLOAD, 0, (LPARAM)&ftpu);
+}
+*)
+
+//
+// Show a simple file manager
+// wParam = 0; not used
+// lParam = 0; not used
+// returns 0 always
+//
+ MS_FTPFILE_SHOWMANAGER:PAnsiChar = 'FTPFile/ShowManager';
+
+
+//
+// OBSOLOTE SERVICE (used by Send Screenshot plugin)
+// Do NOT use it!
+//
+ MS_FTPFILE_SHAREFILE:PAnsiChar = 'FTPFile/ShareFiles';
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_historypp.inc b/plugins/ExternalAPI/delphi/m_historypp.inc
index f651c0a09f..9e0bbec4ea 100644
--- a/plugins/ExternalAPI/delphi/m_historypp.inc
+++ b/plugins/ExternalAPI/delphi/m_historypp.inc
@@ -1,7 +1,7 @@
{
History++ plugin for Miranda IM: the free IM client for Microsoft* Windows*
- Copyright (‘) 2006-2007 theMIROn, 2003-2006 Art Fedorov.
+ Copyright (C) 2006-2009 theMIROn, 2003-2006 Art Fedorov.
History+ parts (C) 2001 Christian Kastner
This program is free software; you can redistribute it and/or modify
@@ -48,60 +48,61 @@
{$DEFINE M_HISTORYPP}
const
- //** VALUES FOR TItemRenderDetails.dwHistoryWindow
- //** Used in ME_HPP_RICHEDIT_ITEMPROCESS event
- //** This is one of the following params,
- //** saying what kind of history window displays
- //** processed item.
-
- // IRDHW_CONTACTHISTORY. The window is ordinary
- // contact history.
- IRDHW_CONTACTHISTORY = $0001;
- // IRDHW_GLOBALHISTORY. The window is global
- // history (system history). Invokes by
- // Menu -> System History
- IRDHW_GLOBALHISTORY = $0002;
- // IRDHW_GLOBALSEARCH. The window is search
- // window and the processed item is the
- // result of the global search.
- IRDHW_GLOBALSEARCH = $0003;
- // IRDHW_EXTERNAL. The window is external window
- IRDHW_EXTERNALGRID = $0004;
-
- //** VALUES FOR TItemRenderDetails.dwFlags
- //** Used in ME_HPP_RICHEDIT_ITEMPROCESS event
- //** These flags inform you about what you are
- //** processing. Like saying that the item is
- //** selected or it's inline or such stuff
-
- // IRDF_SELECTED. The processed item is selected.
- // The background color will always be clHighlight
- // even if you change it (i will change it back).
- // Though, I will not touch font or font color.
- IRDF_SELECTED = $0001;
- // IRDF_INLINE. The RichEdit provided is not one
- // that is used for drawing a cell, but the one
- // used for "inline editing".
- IRDF_INLINE = $0002;
- // IRDF_EVENT. The RichEdit provided is from "Open Event"
- // window. It's the window which opens when you right-click
- // item in contact's history and select "Open"
- IRDF_EVENT = $0004;
+
+ //** VALUES FOR TItemRenderDetails.dwHistoryWindow
+ //** Used in ME_HPP_RICHEDIT_ITEMPROCESS event
+ //** This is one of the following params,
+ //** saying what kind of history window displays
+ //** processed item.
+
+ // IRDHW_CONTACTHISTORY. The window is ordinary
+ // contact history.
+ IRDHW_CONTACTHISTORY = $0001;
+ // IRDHW_GLOBALHISTORY. The window is global
+ // history (system history). Invokes by
+ // Menu -> System History
+ IRDHW_GLOBALHISTORY = $0002;
+ // IRDHW_GLOBALSEARCH. The window is search
+ // window and the processed item is the
+ // result of the global search.
+ IRDHW_GLOBALSEARCH = $0003;
+ // IRDHW_EXTERNAL. The window is external window
+ IRDHW_EXTERNALGRID = $0004;
+
+ //** VALUES FOR TItemRenderDetails.dwFlags
+ //** Used in ME_HPP_RICHEDIT_ITEMPROCESS event
+ //** These flags inform you about what you are
+ //** processing. Like saying that the item is
+ //** selected or it's inline or such stuff
+
+ // IRDF_SELECTED. The processed item is selected.
+ // The background color will always be clHighlight
+ // even if you change it (i will change it back).
+ // Though, I will not touch font or font color.
+ IRDF_SELECTED = $0001;
+ // IRDF_INLINE. The RichEdit provided is not one
+ // that is used for drawing a cell, but the one
+ // used for "inline editing".
+ IRDF_INLINE = $0002;
+ // IRDF_EVENT. The RichEdit provided is from "Open Event"
+ // window. It's the window which opens when you right-click
+ // item in contact's history and select "Open"
+ IRDF_EVENT = $0004;
type
TItemRenderDetails = record
- cbSize :dword; // size of the structure in bytes
- hContact :THANDLE; // handle to the contact for which the event is processed
- hDBEvent :THANDLE; // handle to the event which is processed
- dwEventTime :dword; // timestamp of the event
- wEventType :word; // Event's flags (see m_database, EVENTTYPE_*; m_icq, ICQEVENTTYPE_*)
- IsEventSent :ByteBool; // Outgoing event. True if DBEF_SENT event flag is present (see m_database)
- dwFlags :dword; // Any reasonable combination of IRDF_* flags.
- bHistoryWindow:byte; // What kind of window history. See IRDHW_* values
- pProto :PAnsiChar; // Proto of the event, if available
- pModule :PAnsiChar; // Module of the event, if available
- pText :PWideChar; // Text of the event, not used now
- pExtended :PAnsiChar; // Extended text, used for storing urls, paths and so on
+ cbSize : DWord; // size of the structure in bytes
+ hContact : TMCONTACT; // handle to the contact for which the event is processed
+ hDBEvent : THANDLE; // handle to the event which is processed
+ dwEventTime : DWord; // timestamp of the event
+ wEventType : Word; // Event's flags (see m_database, EVENTTYPE_*; m_icq, ICQEVENTTYPE_*)
+ IsEventSent : ByteBool; // Outgoing event. True if DBEF_SENT event flag is present (see m_database)
+ bHistoryWindow: Byte; // What kind of window history. See IRDHW_* values
+ dwFlags : DWord; // Any reasonable combination of IRDF_* flags.
+ pProto : PAnsiChar; // Proto of the event, if available
+ pModule : PAnsiChar; // Module of the event, if available
+ pText : PWideChar; // Text of the event, not used now
+ pExtended : PAnsiChar; // Extended text, used for storing urls, paths and so on
end;
PItemRenderDetails = ^TItemRenderDetails;
@@ -144,15 +145,14 @@ const
// lParam - zero
MS_HPP_SHOWGLOBALSEARCH = 'History++/ShowGlobalSearch';
-type
- TOpenEventParams = record
- cbSize : dword;
- hContact : THANDLE;
- hDBEvent : THANDLE;
- pPassword: PAnsiChar;
- end;
-
- POpenEventParams = ^TOpenEventParams;
+ type
+ POpenEventParams = ^TOpenEventParams;
+ TOpenEventParams = record
+ cbSize : DWord;
+ hContact : TMCONTACT;
+ hDBEvent : THANDLE;
+ pPassword: PAnsiChar;
+ end;
const
@@ -164,7 +164,7 @@ const
// provided event
// wParam - pointer to TOpenEventParams structure
// lParam - zero
- // Return - bool, True if contact opened, False if password
+ // Return - BOOL, True if contact opened, False if password
// field opened
// Note: if you just want to show contact's history,
// use system service MS_HISTORY_SHOWCONTACTHISTORY
diff --git a/plugins/ExternalAPI/delphi/m_historystats.inc b/plugins/ExternalAPI/delphi/m_historystats.inc
index 03955de447..dbd5c886bf 100644
--- a/plugins/ExternalAPI/delphi/m_historystats.inc
+++ b/plugins/ExternalAPI/delphi/m_historystats.inc
@@ -7,7 +7,7 @@ const
*
* @version 0.1.5.1+
*)
- MIID_HISTORYSTATS:TGUD:= '$AF0DAD8E-$0695-$414B-$B306-$F4C7B7B41DA0';
+ MIID_HISTORYSTATS:TGUID = '{AF0DAD8E-0695-414B-B306-F4C7B7B41DA0}';
(**
* Checks if a specified contact is set to be excluded from the statistics generated
@@ -20,7 +20,7 @@ const
* @param lParam Must be set to 0.
* @return Returns 1 if the specified contact is set to be excluded and 0 otherwise.
*)
- MS_HISTORYSTATS_ISEXCLUDED = 'HistoryStats/IsExcluded';
+ MS_HISTORYSTATS_ISEXCLUDED:PAnsiChar = 'HistoryStats/IsExcluded';
(**
* Sets if a specified contact should be included in or excluded from the statistics
@@ -36,6 +36,6 @@ const
* 0 if you no longer want to exclude the specified contact.
* @return Always returns 0.
*)
- MS_HISTORYSTATS_SETEXCLUDE = 'HistoryStats/SetExclude';
+ MS_HISTORYSTATS_SETEXCLUDE:PAnsiChar = 'HistoryStats/SetExclude';
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_httpserver.inc b/plugins/ExternalAPI/delphi/m_httpserver.inc
index 4ac210ce9d..c5ba79d19c 100644
--- a/plugins/ExternalAPI/delphi/m_httpserver.inc
+++ b/plugins/ExternalAPI/delphi/m_httpserver.inc
@@ -27,10 +27,10 @@ type
PSTFileShareInfo = ^TSTFileShareInfo;
TSTFileShareInfo = record
lStructSize :dword; // Set to sizeof(STFileShareInfo)
- pszSrvPath :PAnsiChar; // Server path
+ pszSrvPath :TChar; // Server path
dwMaxSrvPath :dword; // Buffer allocated for Server path only used when information
// is requested from HTTP server.
- pszRealPath :PAnsiChar; // Real path can be relative or complete
+ pszRealPath :TChar; // Real path can be relative or complete
dwMaxRealPath:dword; // Buffer allocated for Real path only used when information is
// requested from HTTP server.
dwAllowedIP :dword; // The IP address which is allowed to access this share
@@ -58,7 +58,7 @@ const
// will just be updated with the new settings.
//
// returns 0 on success, nonzero on failure
- MS_HTTP_ADD_CHANGE_REMOVE = 'HTTPServer/AddChangeRemove';
+ MS_HTTP_ADD_CHANGE_REMOVE:PAnsiChar = 'HTTPServer/AddChangeRemove';
/////////////////////////////////////////////
////// Service MS_HTTP_GET_SHARE //////
@@ -71,7 +71,7 @@ const
//
// returns 0 on success, nonzero on failure
- MS_HTTP_GET_SHARE = 'HTTPServer/GetShare';
+ MS_HTTP_GET_SHARE:PAnsiChar = 'HTTPServer/GetShare';
/////////////////////////////////////////////
/// Service MS_HTTP_ACCEPT_CONNECTIONS ///
@@ -84,7 +84,7 @@ const
//
// returns 0 on success, nonzero on failure
- MS_HTTP_ACCEPT_CONNECTIONS = 'HTTPServer/AcceptConnections';
+ MS_HTTP_ACCEPT_CONNECTIONS:PAnsiChar = 'HTTPServer/AcceptConnections';
/////////////////////////////////////////////
//// Service MS_HTTP_GET_ALL_SHARES /////
@@ -99,7 +99,7 @@ const
//
// returns the count of shares in the buffer pointed to by LPSTFileShareInfo
- MS_HTTP_GET_ALL_SHARES = 'HTTPServer/GetAllShares';
+ MS_HTTP_GET_ALL_SHARES:PAnsiChar = 'HTTPServer/GetAllShares';
/////////////////////////////////////////////
//// Service MS_HTTP_GET_LINK /////
@@ -112,6 +112,6 @@ const
//
// Return the URL link to the pszSrvPath
- MS_HTTP_GET_LINK = 'HTTPServer/GetLink';
+ MS_HTTP_GET_LINK:PAnsiChar = 'HTTPServer/GetLink';
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_kbdnotify.inc b/plugins/ExternalAPI/delphi/m_kbdnotify.inc
index b6967ecead..36db2afcb5 100644
--- a/plugins/ExternalAPI/delphi/m_kbdnotify.inc
+++ b/plugins/ExternalAPI/delphi/m_kbdnotify.inc
@@ -22,38 +22,38 @@ const
//wParam=0
//lParam=0
//returns 0
- MS_KBDNOTIFY_ENABLE = 'KeyboardNotify/Enable';
+ MS_KBDNOTIFY_ENABLE:PAnsiChar = 'KeyboardNotify/Enable';
//Disables all notifications (for use by BossKey)
//wParam=0
//lParam=0
//returns 0
- MS_KBDNOTIFY_DISABLE = 'KeyboardNotify/Disable';
+ MS_KBDNOTIFY_DISABLE:PAnsiChar = 'KeyboardNotify/Disable';
//Makes the flashing begin
//wParam=(unsigned int)eventCount
//lParam=(AnsiChar *)szFlashingSequence or NULL if you want the plugin to use current settings
//returns 0
- MS_KBDNOTIFY_STARTBLINK = 'KeyboardNotify/StartBlinking';
+ MS_KBDNOTIFY_STARTBLINK:PAnsiChar = 'KeyboardNotify/StartBlinking';
//Receives the number of events that were opened (usuful for the 'until events opened' setting)
//wParam=(unsigned int)eventCount
//lParam=0
//returns 0
- MS_KBDNOTIFY_EVENTSOPENED = 'KeyboardNotify/EventsWereOpened';
+ MS_KBDNOTIFY_EVENTSOPENED:PAnsiChar = 'KeyboardNotify/EventsWereOpened';
//Informs if the flashing is active
//wParam=0
//lParam=0
//returns 0 if the flashing is inactive or a pointer to the string representing the sequence being used
- MS_KBDNOTIFY_FLASHINGACTIVE = 'KeyboardNotify/IsFlashingActive';
+ MS_KBDNOTIFY_FLASHINGACTIVE:PAnsiChar = 'KeyboardNotify/IsFlashingActive';
//Normalizes the flashing sequence informed
//wParam=0
//lParam=(AnsiChar *)szFlashingSequence <- it is rewritten
//returns a pointer to the string representing the sequence normalized (which is in fact lParam)
- MS_KBDNOTIFY_NORMALSEQUENCE = 'KeyboardNotify/NormalizeSequence';
+ MS_KBDNOTIFY_NORMALSEQUENCE:PAnsiChar = 'KeyboardNotify/NormalizeSequence';
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_msg_buttonsbar.inc b/plugins/ExternalAPI/delphi/m_msg_buttonsbar.inc
new file mode 100644
index 0000000000..ee97f3d3ce
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_msg_buttonsbar.inc
@@ -0,0 +1,117 @@
+{$IFNDEF M_MSG_BUTTONSBAR}
+{$DEFINE M_MSG_BUTTONSBAR}
+
+//////////////////////////////////////////////////////////////////////////
+// Services
+//
+//////////////////////////////////////////////////////////////////////////
+// Adding a button
+//
+// wParam = 0
+// lParam = (BBButton *) &description
+const
+ MS_BB_ADDBUTTON:PAnsiChar = 'TabSRMM/ButtonsBar/AddButton';
+
+//////////////////////////////////////////////////////////////////////////
+// Remove button
+//
+// wParam = 0
+// lParam = (BBButton *) &description, only button ID and ModuleName used
+ MS_BB_REMOVEBUTTON:PAnsiChar = 'TabSRMM/ButtonsBar/RemoveButton';
+
+//////////////////////////////////////////////////////////////////////////
+// ModifyButton(global)
+//
+// wParam = 0
+// lParam = (BBButton *) &description
+ MS_BB_MODIFYBUTTON:PAnsiChar = 'TabSRMM/ButtonsBar/ModifyButton';
+
+
+ BBSF_HIDDEN = 1;
+ BBSF_DISABLED = 2;
+ BBSF_PUSHED = 4;
+ BBSF_RELEASED = 8;
+
+//////////////////////////////////////////////////////////////////////////
+// GetButtonState(local)
+//
+// wParam = hContact
+// lParam = (BBButton *) &description , only ModuleName and ID used
+// Returns BBButton struct with BBSF_ bbbFlags:
+ MS_BB_GETBUTTONSTATE:PansiChar = 'TabSRMM/ButtonsBar/GetButtonState';
+
+//////////////////////////////////////////////////////////////////////////
+// SetButtonState (local)
+//
+// wParam = hContact
+// lParam = (BBButton *) &description , ModuleName, ID,hIcon,Tooltip, and BBSF_ bbbFlags are used
+ MS_BB_SETBUTTONSTATE:PAnsiChar = 'TabSRMM/ButtonsBar/SetButtonState';
+
+
+////////////////////////////////////////////////////////////////
+//Events
+//
+///////////////////////////////////////////////////
+// ToolBar loaded event
+// wParam = 0;
+// lParam = 0;
+// This event will be send after module loaded and after each toolbar reset
+// You should add your buttons on this event
+ ME_MSG_TOOLBARLOADED:PAnsiChar = 'TabSRMM/ButtonsBar/ModuleLoaded';
+
+///////////////////////////////////////////////////
+// ButtonClicked event
+// wParam = (HANDLE)hContact;
+// lParam = (CustomButtonClickData *)&CustomButtonClickData;
+// catch to show a popup menu, etc.
+ ME_MSG_BUTTONPRESSED:PAnsiChar = 'TabSRMM/ButtonsBar/ButtonPressed';
+
+//event flags
+ BBCF_RIGHTBUTTON = 1;
+ BBCF_SHIFTPRESSED = 2;
+ BBCF_CONTROLPRESSED = 4;
+ BBCF_ARROWCLICKED = 8;
+
+type
+ pCustomButtonClickData = ^tCustomButtonClickData;
+ tCustomButtonClickData = record
+ cbSize :int;
+ pt :TPOINT; // screen coordinates for menus
+ pszModule :PAnsiChar; // button owners name
+ dwButtonId:dword; // registered button ID
+ hwndFrom :HWND; // button parents HWND
+ hContact :TMCONTACT;
+ flags :dword; // BBCF_ flags
+ end;
+
+const
+//button flags
+ BBBF_DISABLED = $0001;
+ BBBF_HIDDEN = $0002;
+ BBBF_ISPUSHBUTTON = $0004;
+ BBBF_ISARROWBUTTON = $0008;
+ BBBF_ISCHATBUTTON = $0010;
+ BBBF_ISIMBUTTON = $0020;
+ BBBF_ISLSIDEBUTTON = $0040;
+ BBBF_ISRSIDEBUTTON = $0080;
+ BBBF_CANBEHIDDEN = $0100;
+ BBBF_ISDUMMYBUTTON = $0200;
+ BBBF_ANSITOOLTIP = $0400;
+ BBBF_CREATEBYID = $0800; //only for tabsrmm internal use
+
+type
+ tagBBButton = record
+ cbSize :int; // size of structure
+ dwButtonID :dword; // your button ID, will be combined with pszModuleName for storing settings, etc...
+ pszModuleName:PAnsiChar; // module name without spaces and underline symbols (e.g. "tabsrmm")
+ szTooltip :TChar; // button's tooltip
+ dwDefPos :dword; // default order pos of button, counted from window edge (left or right)
+ // use value >100, because internal buttons using 10,20,30... 80, etc
+ iButtonWidth :int; // must be 0
+ bbbFlags :dword; // combine of BBBF_ flags above
+ hIcon :HICON; // Handle to icolib registered icon, it's better to register with pszSection = "TabSRMM/Toolbar"
+ end;
+ tBBButton = tagBBButton;
+
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_mydetails.inc b/plugins/ExternalAPI/delphi/m_mydetails.inc
index c908849a7b..571504a2a2 100644
--- a/plugins/ExternalAPI/delphi/m_mydetails.inc
+++ b/plugins/ExternalAPI/delphi/m_mydetails.inc
@@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
}
-{$FINDEF M_MYDETAILS}
+{$IFNDEF M_MYDETAILS}
{$DEFINE M_MYDETAILS}
const
diff --git a/plugins/ExternalAPI/delphi/m_notify.inc b/plugins/ExternalAPI/delphi/m_notify.inc
index e8c614d282..6d269b0f99 100644
--- a/plugins/ExternalAPI/delphi/m_notify.inc
+++ b/plugins/ExternalAPI/delphi/m_notify.inc
@@ -8,60 +8,59 @@ like osd, popup, ticker etc.
const
{ Options UI event and service. The same as for miranda options }
- ME_NOTIFY_OPT_INITIALISE = 'Notify/Opt/Initialise';
- MS_NOTIFY_OPT_ADDPAGE = 'Notify/Opt/AddPage';
+ ME_NOTIFY_OPT_INITIALISE:PAnsiChar = 'Notify/Opt/Initialise';
+ MS_NOTIFY_OPT_ADDPAGE:PAnsiChar = 'Notify/Opt/AddPage';
type
- tagMNOTIFYACTIONINFO = record
+ PMNOTIFYACTIONINFO = ^TMNOTIFYACTIONINFO;
+ TMNOTIFYACTIONINFO = record
icon :HICON;
name :array [0..MAXMODULELABELLENGTH-1] of AnsiChar;
service:array [0..MAXMODULELABELLENGTH-1] of AnsiChar;
cookie :dword;
end;
- MNOTIFYACTIONINFO = tagMNOTIFYACTIONINFO;
// Just like miranda pluginLink... This should work faster then services,
// we need some reactivity in notifications.
type
- tagMNNOTIFYLINK = record
+ PMNOTIFYLINK = ^TMNOTIFYLINK;
+ TMNOTIFYLINK = record
// Create a new notification type
- function Register(name:PAnsiChar;icon:HICON):THANDLE;cdecl;
+ Register:function(name:PAnsiChar;icon:HICON):THANDLE;cdecl;
// Create a new notification object
- function Create(atype:THANDLE):THANDLE;cdecl;
+ Create:function(atype:THANDLE):THANDLE;cdecl;
// Check is handle is a valid notification object
- function IsValid(notify:THANDLE):integer;cdecl;
+ IsValid:function(notify:THANDLE):integer;cdecl;
// Set/get information about object, or type defaults
- function Set(notifyORtype:THANDLE;name:PAnsiChar;val:TDBVARIANT):integer;cdecl;
- function Get(notifyORtype:THANDLE;name:PAnsiChar;val:PDBVARIANT):integer;cdecl;
+ _Set:function(notifyORtype:THANDLE;name:PAnsiChar;val:TDBVARIANT):integer;cdecl;
+ _Get:function(notifyORtype:THANDLE;name:PAnsiChar;val:PDBVARIANT):integer;cdecl;
// Set/get actions
- function AddAction (notifyORtype:THANDLE;icon:HICON;name:PAnsiChar;service:PAnsiChar;cookie:dword):integer;cdecl;
- function GetActions(notifyORtype:THANDLE;actions:PMNOTIFYACTIONINFO):integer;cdecl;
+ AddAction :function(notifyORtype:THANDLE;icon:HICON;name:PAnsiChar;service:PAnsiChar;cookie:dword):integer;cdecl;
+ GetActions:function(notifyORtype:THANDLE;actions:PMNOTIFYACTIONINFO):integer;cdecl;
// Increment/decrement refer count of notification object. Unreferred objects are destroyed
- function AddRef (notify:THANDLE):integer;cdecl;
- function Release(notify:THANDLE):integer;cdecl;
+ AddRef :function(notify:THANDLE):integer;cdecl;
+ Release:function(notify:THANDLE):integer;cdecl;
// Notify user
- procedure Show (notify:THANDLE);cdecl;
- procedure Update(notify:THANDLE);cdecl;
- procedure Remove(notify:THANDLE);cdecl;
+ Show :procedure(notify:THANDLE);cdecl;
+ Update:procedure(notify:THANDLE);cdecl;
+ Remove:procedure(notify:THANDLE);cdecl;
end;
- PMNOTIFYLINK = ^TMNOTIFYLINK;
- TMNOTIFYLINK = tagMNOTIFYLINK;
const
// Get the MNOTIFYLINK struct
// result = (LRESULT)(MNOTIFYLINK* )notifyLink
- MS_NOTIFY_GETLINK = 'Notify/GetLink';
+ MS_NOTIFY_GETLINK:PAnsiChar = 'Notify/GetLink';
// Hook this to process corresponding actions
- ME_NOTIFY_SHOW = 'Notify/Show';
- ME_NOTIFY_UPDATE = 'Notify/Update';
- ME_NOTIFY_REMOVE = 'Notify/Remove';
+ ME_NOTIFY_SHOW :PAnsiChar = 'Notify/Show';
+ ME_NOTIFY_UPDATE:PAnsiChar = 'Notify/Update';
+ ME_NOTIFY_REMOVE:PAnsiChar = 'Notify/Remove';
var
notifyLink:PMNOTIFYLINK;
diff --git a/plugins/ExternalAPI/delphi/m_nudge.inc b/plugins/ExternalAPI/delphi/m_nudge.inc
index 631a28f785..dfc72e19db 100644
--- a/plugins/ExternalAPI/delphi/m_nudge.inc
+++ b/plugins/ExternalAPI/delphi/m_nudge.inc
@@ -1,5 +1,5 @@
-{$INFDEF NUDGE}
-{$DEFINE NUDGE}
+{$IFNDEF M_NUDGE}
+{$DEFINE M_NUDGE}
const
// protocol service that sends a nudge
PS_SEND_NUDGE = '/SendNudge';
@@ -8,9 +8,10 @@ const
PE_NUDGE = '/Nudge';
const
- MS_SHAKE_CLIST = 'SHAKE/Service/ShakeClist';
- MS_SHAKE_CHAT = 'SHAKE/Service/ShakeChat';
- MS_SHAKE_CLIST_TRIGGER = 'SHAKE/Service/TriggerShakeClist';
- MS_SHAKE_CHAT_TRIGGER = 'SHAKE/Service/TirggerShakeChat';
- MS_NUDGE_SEND = 'NUDGE/Send';
+ MS_SHAKE_CLIST :PAnsiChar = 'SHAKE/Service/ShakeClist';
+ MS_SHAKE_CHAT :PAnsiChar = 'SHAKE/Service/ShakeChat';
+ MS_SHAKE_CLIST_TRIGGER:PAnsiChar = 'SHAKE/Service/TriggerShakeClist';
+ MS_SHAKE_CHAT_TRIGGER :PAnsiChar = 'SHAKE/Service/TirggerShakeChat';
+ MS_NUDGE_SEND :PAnsiChar = 'NUDGE/Send';
+
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_nxsn.inc b/plugins/ExternalAPI/delphi/m_nxsn.inc
new file mode 100644
index 0000000000..2d1093db74
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_nxsn.inc
@@ -0,0 +1,20 @@
+{$IFNDEF M_NXSN}
+{$DEFINE M_NXSN}
+
+const
+// tabSRMM stuff (logging to message window)
+ EVENTTYPE_STATUSCHANGE = 25368;
+
+{
+MCONTACT hContact = wParam;
+WORD oldStatus = LOWORD(lParam);
+WORD newStatus = HIWORD(lParam);
+oldStatus is the status the contact was before the change.
+newStatus is the status the contact is now.
+Cast them to (int) if you need them that way.
+}
+ ME_STATUSCHANGE_CONTACTSTATUSCHANGED:PAnsiChar = 'Miranda/StatusChange/ContactStatusChanged';
+
+ MS_STATUSCHANGE_MENUCOMMAND:PAnsiChar = 'NewStatusNotify/EnableDisableMenuCommand';
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_quickcontacts.inc b/plugins/ExternalAPI/delphi/m_quickcontacts.inc
index d82d23f5e7..af3de6696f 100644
--- a/plugins/ExternalAPI/delphi/m_quickcontacts.inc
+++ b/plugins/ExternalAPI/delphi/m_quickcontacts.inc
@@ -27,5 +27,6 @@ wParam: ignored
lParam: ignored
}
const
- MS_QC_SHOW_DIALOG = 'QuickContacts/ShowDialog';
+ MS_QC_SHOW_DIALOG:PAnsiChar = 'QuickContacts/ShowDialog';
+
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_quotes.inc b/plugins/ExternalAPI/delphi/m_quotes.inc
new file mode 100644
index 0000000000..1a6c597b6d
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_quotes.inc
@@ -0,0 +1,36 @@
+{$IFNDEF M_QUOTES}
+{$DEFINE M_QUOTES}
+
+const
+{*
+ * Export the contact (or all contacts) to xml file
+ * wParam = (WPARAM)(HANDLE)hContact to export or 0 to export all contacts
+ * lParam = (LPARAM)(const char*)pszFileName - pointer to file name to export or
+ * 0 in this case the dialog to select a file to export would be shown
+ * returns 0 if export was successfull,
+ * -1 if user canceled export and
+ * value greater than zero if error occurred during exporting
+ *}
+ MS_QUOTES_EXPORT:PAnsiChar = 'Quotes/Export';
+
+{*
+ * Import the contact (or all contacts) from xml file
+ * wParam = flags
+ * lParam = (LPARAM)(const char*)pszFileName - pointer to file name to import or
+ * 0 in this case the dialog to select a file to import would be shown
+ * returns 0 if import was successfull,
+ * -1 if user canceled import and
+ * value greater than zero if error occurred during importing
+ *}
+
+// if contact(s) exists user would be asked to overwrite these contacts
+// #define QUOTES_IMPORT_PROMPT_TO_OVERWRITE_EXISTING_CONTACTS 0x0000
+// if contact(s) exists it would be overwrite without any prompt
+// #define QUOTES_IMPORT_SILENT_OVERWRITE_EXISTING_CONTACTS 0x0001
+// if contact(s) exists during importing it would be ignored
+ QUOTES_IMPORT_SKIP_EXISTING_CONTACTS = 2;
+
+ MS_QUOTES_IMPORT:PAnsiChar = 'Quotes/Import';
+
+{$ENDIF}
+
diff --git a/plugins/ExternalAPI/delphi/m_sendss.inc b/plugins/ExternalAPI/delphi/m_sendss.inc
new file mode 100644
index 0000000000..e4a58a79ff
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_sendss.inc
@@ -0,0 +1,66 @@
+//This file is part of Send Screenshot a Miranda IM plugin
+//Copyright (c) 2004-2006 Sйrgio Vieira Rolanski
+//
+//This program is free software; you can redistribute it and/or
+//modify it under the terms of the GNU General Public License
+//as published by the Free Software Foundation; either
+//version 2 of the License, or (at your option) any later version.
+//
+//This program is distributed in the hope that it will be useful,
+//but WITHOUT ANY WARRANTY; without even the implied warranty of
+//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//GNU General Public License for more details.
+//
+//You should have received a copy of the GNU General Public License
+//along with this program; if not, write to the Free Software
+//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+{$IFNDEF M_SENDSS}
+{$DEFINE M_SENDSS}
+
+const
+//////////////////////////////////////////////////////////////////////////////
+// Open the main capture dialog, but does not capture anything
+// wParam = contact handle
+// lParam = 0
+// Returns zero on success
+// -1 if was not possibly to create capture window
+ MS_SENDSS_OPENDIALOG:PAnsiChar = 'SendSS/OpenCaptureDialog';
+
+//////////////////////////////////////////////////////////////////////////////
+// Send an image to imageshack.us
+// wParam = (char*)filename
+// lParam = (HANDLE)contact (can be null)
+// v0.8.0.0+
+// Returns always 0 (if lParam != 0)
+// Returns (char*)URL or error message if lParam = 0. caller must mir_free the pointer
+ MS_SENDSS_SEND2IMAGESHACK:PAnsiChar = 'SendSS/Send2ImageShack';
+
+//////////////////////////////////////////////////////////////////////////////
+// 1. Send a screenshot of the desktop to the selected contact
+// wParam = contact handle
+// lParam = 0
+// 2. Open the capture dialog in take screenshot only mode (it will not be sent)
+// wParam = 0
+// lParam = anything but 0
+// Returns:
+// zero on success
+// -1 if was not possibly to create capture window
+ MS_SENDSS_SENDDESKTOP:PAnsiChar = 'SendSS/SendDesktop';
+
+//////////////////////////////////////////////////////////////////////////////
+// Edit a in-memory bitmap on the edit window
+// wParam = (SENDSSCB) callback function address to call when editing is done
+// lParam = (HBITMAP) bitmap handle, a copy is made so the calling function can free this handle after the service function returns
+// Returns:
+// Zero on success
+// -1 if could not create the edit window
+// -2 if was not possible to alocate needed memory
+ MS_SENDSS_EDITBITMAP:PAnsiChar = 'SendSS/EditBitmap';
+
+// The parameter passed is the bitmap handle
+// the called function must free this handle when it's not needed anymore
+// Don't do much processing on the called function or you will lock miranda up
+//typedef void (__stdcall *SENDSSCB)(LPVOID);
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_sessions.inc b/plugins/ExternalAPI/delphi/m_sessions.inc
index b6e6c19bfd..9fac7d8d23 100644
--- a/plugins/ExternalAPI/delphi/m_sessions.inc
+++ b/plugins/ExternalAPI/delphi/m_sessions.inc
@@ -66,7 +66,7 @@ type
dwFrom :dword; // SDR_*, SDR_ALL is not a good thing
wParam :WPARAM;
lParam :LPARAM;
- reserved[0..1] of dword; // is actually apart of the structure and is used internally
+ reserved:array [0..1] of dword; // is actually apart of the structure and is used internally
end;
{
@@ -78,7 +78,7 @@ a message to an entity by name, e.g. "ICQ" it will only goto "ICQ" and not
to anyone else.
}
const
- MS_SION_PIPE = 'Sion/PipeCall';
+ MS_SION_PIPE:PAnsiChar = 'Sion/PipeCall';
{
wParam=0
@@ -104,7 +104,7 @@ you know what your entity name is already, you should not rely on .szEntity
being anything, but if it is there, the message is for you only and no one else
will get it and the value of .szEntity is dependant on the message.
}
- MS_SION_PIPEHOOK = 'Sion/PipeHook';
+ MS_SION_PIPEHOOK:PAnsiChar = 'Sion/PipeHook';
{
wParam=0
@@ -115,14 +115,14 @@ switch threads if it needs to to send ENTITY_CREATE to both .szUI and .szProto
}
type
SION_ENTITY_DESCRIPTOR = record
- cbSize:int;
- szUI:PAnsiChar;
- szProto:PAnsiChar;
+ cbSize :int;
+ szUI :PAnsiChar;
+ szProto :PAnsiChar;
hSession:THANDLE; // returned if successful
end;
const
- MS_SION_ENTITY_CREATE = 'Sion/EntityCreate';
+ MS_SION_ENTITY_CREATE:PAnsiChar = 'Sion/EntityCreate';
{
wParam=0
@@ -136,7 +136,7 @@ During handle shutdown, ENTITY_DESTROY will be sent to the protocol and then the
note that you do not need to give .szUI or .szProto because the handle knows
who it is binded to.
}
- MS_SION_ENTITY_RELEASE = 'Sion/EntityRelease';
+ MS_SION_ENTITY_RELEASE:PAnsiChar = 'Sion/EntityRelease';
{
wParam=0
@@ -144,7 +144,7 @@ lParam=HANDLE
Add one to the reference count of HANDLE.
}
- MS_SION_ENTITY_CLONE = 'Sion/EntityClone';
+ MS_SION_ENTITY_CLONE:PAnsiChar = 'Sion/EntityClone';
{
wParam=0
@@ -166,7 +166,7 @@ type
persist :int; // if TRUE and data is NULL then data will not be wiped
end;
const
- MS_SION_ENTITY_SETCOOKIE = 'Sion/EntitySetCookie';
+ MS_SION_ENTITY_SETCOOKIE:PAnsiChar = 'Sion/EntitySetCookie';
{
wParam=0
@@ -176,7 +176,7 @@ Given .data and SDR_code, finds the associated .hSession and returns
a reference to it, note that .data can not be NULL, .dwSdr is used
to match the type of cookie.
}
- MS_SION_ENTITY_FINDCOOKIE = 'Sion/EntityFindCookie';
+ MS_SION_ENTITY_FINDCOOKIE:PAnsiChar = 'Sion/EntityFindCookie';
(*
// -- Helper functions --
diff --git a/plugins/ExternalAPI/delphi/m_shutdown.inc b/plugins/ExternalAPI/delphi/m_shutdown.inc
index 9dfa5e7d28..fbdede1fb6 100644
--- a/plugins/ExternalAPI/delphi/m_shutdown.inc
+++ b/plugins/ExternalAPI/delphi/m_shutdown.inc
@@ -113,7 +113,7 @@ Returns 0 on success, nonzero otherwise.
Checks if the watcher is currently active or not.
wParam=lParam=0
Returns TRUE if the watcher is enabled, FALSE otherwise.
-}/
+}
MS_AUTOSHUTDOWN_ISWATCHERENABLED:PAnsiChar = 'AutoShutdown/IsWatcherEnabled';
//******************************************************************/
@@ -148,6 +148,16 @@ Unused, return always 0 here.
}
ME_AUTOSHUTDOWN_WATCHERCHANGED:PAnsiChar = 'AutoShutdown/Watcher/Changed';
+ SDWTF_SPECIFICTIME = $0001;
+ SDWTF_ST_TIME = $0002;
+ SDWTF_ST_COUNTDOWN = $0004;
+ SDWTF_ST_MASK = $0006; // bitmask for SDWTF_ST_* bits
+ SDWTF_MESSAGE = $0008;
+ SDWTF_FILETRANSFER = $0010;
+ SDWTF_IDLE = $0020;
+ SDWTF_STATUS = $0040;
+ SDWTF_CPUUSAGE = $0080;
+ SDWTF_MASK = $00FF; // bitmask for all SDWTF_* bits
SETTING_REMEMBERONRESTART_DEFAULT = 0; // SDROR_RUNNING
SETTING_SHOWCONFIRMDLG_DEFAULT = 1;
@@ -157,23 +167,12 @@ Unused, return always 0 here.
SETTING_SMARTOFFLINECHECK_DEFAULT = 1;
SETTING_SHUTDOWNTYPE_DEFAULT = SDSDT_SHUTDOWN;
- SETTING_WATCHERFLAGS_DEFAULT = (SDWTF_SPECIFICTIME|SDWTF_ST_COUNTDOWN);
+ SETTING_WATCHERFLAGS_DEFAULT = SDWTF_SPECIFICTIME or SDWTF_ST_COUNTDOWN;
SETTING_COUNTDOWN_DEFAULT = 30;
SETTING_COUNTDOWNUNIT_DEFAULT = 60; // x times countdown seconds
SETTING_TIMESTAMP_DEFAULT = SETTING_COUNTDOWN_DEFAULT*SETTING_COUNTDOWNUNIT_DEFAULT;
SETTING_CPUUSAGETHRESHOLD_DEFAULT = 90; // percent
- SDWTF_SPECIFICTIME = $0001;
- SDWTF_ST_TIME = $0002;
- SDWTF_ST_COUNTDOWN = $0004;
- SDWTF_ST_MASK = $0006; // bitmask for SDWTF_ST_* bits
- SDWTF_MESSAGE = $0008;
- SDWTF_FILETRANSFER = $0010;
- SDWTF_IDLE = $0020;
- SDWTF_STATUS = $0040;
- SDWTF_CPUUSAGE = $0080;
- SDWTF_MASK = $00FF; // bitmask for all SDWTF_* bits
-
SDROR_RUNNING = 3;
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_simplestatusmsg.inc b/plugins/ExternalAPI/delphi/m_simplestatusmsg.inc
new file mode 100644
index 0000000000..6a1cea8f8c
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_simplestatusmsg.inc
@@ -0,0 +1,51 @@
+{
+Simple Status Message plugin for Miranda IM
+Copyright (C) 2006-2011 Bartosz 'Dezeath' Biaіek, (C) 2005 Harven
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+}
+
+{$IFNDEF M_SIMPLESTATUSMSG}
+{$DEFINE M_SIMPLESTATUSMSG}
+
+const
+// Change global status mode/message
+// wParam = (int)new status, 0 if for current
+// lParam = (LPARAM)(TCHAR *)status message
+ MS_SIMPLESTATUSMSG_SETSTATUS:PAnsiChar = 'SimpleStatusMsg/SetStatus';
+
+// Bring up the status message dialog
+// wParam = 0
+// lParam = (LPARAM)(char *)protocol name, NULL if for all protocols
+ MS_SIMPLESTATUSMSG_SHOWDIALOG:PAnsiChar = 'SimpleStatusMsg/ShowDialog';
+
+// Force a change of status mode/message. The status message dialog will
+// appear depending on settings
+// wParam = (int)new status
+// lParam = (LPARAM)(char *)protocol name, NULL if for all protocols
+// Returns 1 when changed without showing the status message dialog
+ MS_SIMPLESTATUSMSG_CHANGESTATUSMSG:PAnsiChar = 'SimpleStatusMsg/ChangeStatusMessage';
+
+// Copy the status message of a contact to clipboard
+// wParam = (WPARAM)(HANDLE)hContact
+// lParam = 0
+ MS_SIMPLESTATUSMSG_COPYMSG:PAnsiChar = 'SimpleStatusMsg/CopyMsg';
+
+// Go to URL in status message of a contact
+// wParam = (WPARAM)(HANDLE)hContact
+// lParam = 0
+ MS_SIMPLESTATUSMSG_GOTOURLMSG:PAnsiChar = 'SimpleStatusMsg/GoToURLMsg';
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_skin_eng.inc b/plugins/ExternalAPI/delphi/m_skin_eng.inc
new file mode 100644
index 0000000000..986d31718c
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_skin_eng.inc
@@ -0,0 +1,445 @@
+{
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2008 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_SKE}
+{$DEFINE M_SKE}
+
+const
+//*defaults*/
+// DEFAULT_FIT_MODE = FM_STRETCH;
+// DEFAULT_STYLE = ST_BRUSH ;
+// DEFAULT_BKCOLOUR GetSysColor(COLOR_3DFACE);
+// DEFAULT_SELBKCOLOUR GetSysColor(COLOR_HIGHLIGHT);
+
+ SIZING_MARGIN = 3;
+
+//* Fit mode */
+ FM_STRETCH = 0;
+ FM_TILE_HORZ = 1;
+ FM_TILE_VERT = 2;
+ FM_TILE_BOTH = 3;
+
+//*Object types*/
+ OT_ANY = 0;
+ OT_GLYPHOBJECT = 1;
+ OT_FONTOBJECT = 2;
+
+//*STYLE INDEXEX*/
+ ST_SKIP = 0;
+ ST_PARENT = 1;
+ ST_BRUSH = 2;
+ ST_IMAGE = 3;
+ ST_SOLARIZE = 4; //Not used yet.
+ ST_FRAGMENT = 5;
+ ST_GRADIENT = 6;
+
+//formats:
+ ADT_TOP = $00000000;
+ ADT_LEFT = $00000000;
+ ADT_HCENTER = $00000001;
+ ADT_RIGHT = $00000002;
+ ADT_VCENTER = $00000004;
+ ADT_BOTTOM = $00000008;
+// ADT_ECLIPSE = 64;
+
+
+//*SERVICES*/
+
+//toggle the 'hide offline contacts' flag and call CLUI
+//wParam=0
+//lParam=0
+ MS_CLIST_TOGGLEHIDEOFFLINE:PAnsiChar = 'CList/ToggleHideOffline';
+
+ MS_CLIST_TOGGLEGROUPS:PAnsiChar = 'CList/ToggleGroups';
+
+ MS_CLIST_TOGGLESOUNDS:PAnsiChar = 'CList/ToggleSounds';
+
+// Add new object to skin object list.
+// wParam = pointer to SKINOBJECTDESCRIPTOR structure
+// lParam = 0 ( used for internal purposes: pointer to skin object list)
+ MS_SKIN_REGISTEROBJECT:PAnsiChar = 'ModernList/RegisterObject';
+
+// Add new object to skin object list.
+// wParam = pointer to DEF_SKIN_OBJECT_PARAMS structure
+// lParam = 0 ( used for internal purposes: pointer to skin object list)
+ MS_SKIN_REGISTERDEFOBJECT:PAnsiChar = 'ModernList/RegisterDefObject';
+
+type
+ DEF_SKIN_OBJECT_PARAMS = record
+ szObjectID:PAnsiChar;
+ defStyle:byte;
+ defColor:dword;
+ // Skin: PSKINOBJECTSLIST;
+ end;
+
+const
+// Request painting glyph object
+// wParam = pointer to SKINDRAWREQUEST structure
+// lParam = 0
+ MS_SKIN_DRAWGLYPH:PAnsiChar = 'ModernList/DrawGlyph';
+
+
+//* EVENTS */
+ ME_SKIN_SERVICESCREATED:PAnsiChar = 'ModernList/ServicesCreated';
+
+//* DRAWGLYPH Request structure */
+type
+ PSKINDRAWREQUEST = ^TSKINDRAWREQUEST;
+ TSKINDRAWREQUEST = record
+ szObjectID:array [0..254] of AnsiChar; // Unic Object ID (path) to paint
+ rcDestRect:TRECT; // Rectangle to fit
+ rcClipRect:TRECT; // Rectangle to paint in.
+ hDC:HDC; // Handler to device context to paint in.
+ end;
+
+//* SKINOBJECTDESCRIPTOR opbject descriptor structure */
+type
+ PSKINOBJECTDESCRIPTOR = ^TSKINOBJECTDESCRIPTOR;
+ TSKINOBJECTDESCRIPTOR = record
+ bType:byte; // One of OT_* values.
+ szObjectID:PAnsiChar; // Unic Object ID (path) [255] max
+ Data:pointer; // Pointer to GLYPHOBJECT strycture if bType==OT_GLYPHOBJECT
+ end;
+
+//* SKINOBJECTDESCRIPTOR opbject descriptor structure */
+type
+ PGLYPHOBJECT = ^TGLYPHOBJECT;
+ TGLYPHOBJECT = record
+ Style :byte; // One of ST_* values
+ hGlyph :HBITMAP; // Bitmap handler (for internal use only)
+ dwTop,
+ dwLeft,
+ dwBottom,
+ dwRight :dword; // Margins
+ szFileName :PAnsiChar; // FileName of image
+ dwColor :dword; // Fill color
+ dwAlpha :byte; // Constant alpha-transparency level
+ FitMode :byte; // One of FM_* values
+ clipArea :TPOINT; // Object image rect on full image
+ szclipArea :TSIZE; // Object image rect on full image
+ plTextList :PSortedList; // List of GLYPHTEXT
+ bmWidth :long;
+ bmHeight :long;
+ bmBitsPixel:byte;
+ end;
+
+//* SKINTEXTDESCRIPTOR opbject descriptor structure */
+type
+ PGLYPHTEXT = ^TGLYPHTEXT;
+ TGLYPHTEXT = record
+ szGlyphTextID:PAnsiChar;
+ stText :TChar;
+ stValueText :TChar;
+ dwFlags :dword;
+ dwColor :dword; // Color (InvAA)(RR)(GG)(BB)
+ dwShadow :dword; //ToDo: Color2/Shaddow
+ iLeft,iTop,iRight,iBottom:int;
+ RelativeFlags:byte;
+ szFontID :PAnsiChar;
+ hFont :HFONT;
+ szObjectName :PAnsiChar;
+ end;
+
+//* SKINTEXTDESCRIPTOR opbject descriptor structure */
+type
+ PSKINFONT = ^TSKINFONT;
+ TSKINFONT = record
+ szFontID:PAnsiChar;
+ hFont :HFONT;
+ end;
+
+//* HELPER FUNCTIONS */
+(*
+//Paint ObjectID as parent background for frame hwndIn
+int __inline SkinDrawWindowBack(HWND hwndIn, HDC hdc, RECT * rcClip, char * objectID)
+{
+ SKINDRAWREQUEST rq;
+ POINT pt={0};
+ RECT rc,r1;
+
+ HWND hwnd=(HWND)CallService(MS_CLUI_GETHWND,0,0);
+ if (!objectID) return 0;
+ GetWindowRect(hwndIn,&r1);
+ pt.x=r1.left;
+ pt.y=r1.top;
+ //ClientToScreen(hwndIn,&pt);
+ GetWindowRect(hwnd,&rc);
+ OffsetRect(&rc,-pt.x ,-pt.y);
+ rq.hDC=hdc;
+ rq.rcDestRect=rc;
+ rq.rcClipRect=*rcClip;
+ lstrcpynA(rq.szObjectID,objectID,sizeof(rq.szObjectID));
+ ///ske_Service_DrawGlyph((WPARAM)&rq,0); //$$$
+ return CallService(MS_SKIN_DRAWGLYPH,(WPARAM)&rq,0);
+}
+
+
+//Paint ObjectID
+int __inline SkinDrawGlyph(HDC hdc, RECT * rcSize, RECT * rcClip, char * objectID);
+
+//Register object with predefined style
+int __inline CreateGlyphedObjectDefStyle(char * ObjID,BYTE defStyle);
+int __inline CreateGlyphedObjectDefColor(char * ObjID,dword defColor);
+//Register default object
+int __inline CreateGlyphedObject(char * ObjID);
+
+
+//// Creating and registering objects
+//int __inline CreateGlyphedObject(char * ObjID)
+//{
+// DEF_SKIN_OBJECT_PARAMS prm={0};
+// prm.defColor=DEFAULT_BKCOLOUR;
+// prm.defStyle=DEFAULT_STYLE;
+// prm.szObjectID=ObjID;
+// return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
+//}
+static BOOL __inline ScreenToClientRect(HWND hWnd, LPRECT lpRect)
+{
+ BOOL ret;
+
+ POINT pt;
+
+ pt.x = lpRect->left;
+ pt.y = lpRect->top;
+
+ ret = ScreenToClient(hWnd, &pt);
+
+ if (!ret) return ret;
+
+ lpRect->left = pt.x;
+ lpRect->top = pt.y;
+
+
+ pt.x = lpRect->right;
+ pt.y = lpRect->bottom;
+
+ ret = ScreenToClient(hWnd, &pt);
+
+ lpRect->right = pt.x;
+ lpRect->bottom = pt.y;
+
+ return ret;
+}
+
+//int __inline CreateGlyphedObjectDefStyle(char * ObjID,BYTE defStyle)
+//{
+// DEF_SKIN_OBJECT_PARAMS prm={0};
+// prm.defColor=DEFAULT_BKCOLOUR;
+// prm.defStyle=defStyle;
+// prm.szObjectID=ObjID;
+// return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
+//}
+//int __inline CreateGlyphedObjectDefColor(char * ObjID,dword defColor)
+//{
+// DEF_SKIN_OBJECT_PARAMS prm={0};
+// prm.defColor=defColor;
+// prm.defStyle=ST_BRUSH;
+// prm.szObjectID=ObjID;
+// return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
+//}
+static int __inline SkinDrawGlyph(HDC hdc, RECT * rcSize, RECT * rcClip, char * objectID)
+{
+ SKINDRAWREQUEST rq;
+ if (!objectID) return 0;
+ rq.hDC=hdc;
+ rq.rcDestRect=*rcSize;
+ rq.rcClipRect=*rcClip;
+ lstrcpynA(rq.szObjectID,objectID,sizeof(rq.szObjectID));
+ return CallService(MS_SKIN_DRAWGLYPH,(WPARAM)&rq,0);
+}
+*)
+//#include "../hdr/modern_skin_selector.h"
+
+//////////////////////////////////////////////
+// //
+// New Painting sequence servises //
+// //
+//////////////////////////////////////////////
+
+type
+ sPaintRequest = record
+ dStructSize :dword; // size of structure
+ hWnd :HWND; // called by window
+ hDC :HDC; // context to draw on
+ rcUpdate :TRECT; // rectangle to be painted in (relative to Top-Left corner of Main window)
+ dwFlags :dword; // drawing flags
+ CallbackData:pointer; // Data for passing to callback procedure
+ Reserved :array [0..15] of byte; // reserved for farther usage;
+ end;
+
+const
+// Request to register sub for callback painting frame area
+// wParam = hWnd of called frame
+// lParam = pointer to tPaintCallBackProc (or NULL to remove)
+// return 1 - succes, 0 - failure
+ MS_SKINENG_REGISTERPAINTSUB:PAnsiChar = 'SkinEngine/ske_Service_RegisterFramePaintCallbackProcedure';
+
+// Request to repaint frame or change/drop callback data immeadeately
+// wParam = hWnd of called frame
+// lParam = pointer to sPaintRequest (or NULL to redraw all)
+ MS_SKINENG_UPTATEFRAMEIMAGE:PAnsiChar = 'SkinEngine/ske_Service_UpdateFrameImage';
+
+// Request to repaint frame or change/drop callback data
+// wParam = hWnd of called frame
+// lParam = pointer to sPaintRequest (or NULL to redraw all)
+// return 2 - already queued, data updated, 1-have been queued, 0 - failure
+ MS_SKINENG_INVALIDATEFRAMEIMAGE:PAnsiChar = 'SkinEngine/ske_Service_InvalidateFrameImage';
+
+// Callback proc type
+type
+ tPaintCallbackProc = function(hWnd:HWND; hDC:HDC; rcPaint:PRECT; rgnUpdate:HRGN;
+ dFlags:dword; CallBackData:pointer):int;
+
+// HELPER TO UPDATEIMAGEFRAME
+
+(*
+inline BOOL isSkinEngineEnabled()
+{
+ return ServiceExists(MS_SKINENG_REGISTERPAINTSUB) && !DBGetContactSettingByte(NULL, "ModernData", "DisableEngine", FALSE);
+}
+
+
+inline BOOL isLayeredEnabled()
+{
+ return isSkinEngineEnabled() && DBGetContactSettingByte(NULL, "ModernData", "EnableLayering", TRUE);
+}
+
+int __inline SkinEngUpdateImageFrame(HWND hwnd, RECT * rcUpdate, dword dwFlags, void * CallBackData)
+{
+ sPaintRequest sr={0};
+ sr.dStructSize=sizeof(sPaintRequest);
+ sr.hWnd=hwnd;
+ if (rcUpdate)
+ sr.rcUpdate=*rcUpdate;
+ sr.dwFlags=dwFlags;
+ sr.CallbackData=CallBackData;
+ return CallService(MS_SKINENG_UPTATEFRAMEIMAGE,(WPARAM)hwnd,(LPARAM)&sr);
+}
+
+int __inline SkinEngInvalidateImageFrame(HWND hwnd, CONST RECT * rcUpdate, dword dwFlags, void * CallBackData)
+{
+ sPaintRequest sr={0};
+ if (hwnd && !isLayeredEnabled()) return InvalidateRect(hwnd,rcUpdate,dwFlags);
+ sr.dStructSize=sizeof(sPaintRequest);
+ sr.hWnd=hwnd;
+ if (rcUpdate)
+ sr.rcUpdate=*rcUpdate;
+ sr.dwFlags=dwFlags;
+ sr.CallbackData=CallBackData;
+ return CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE,(WPARAM)hwnd,(LPARAM)&sr);
+}
+
+
+int __inline SkinInvalidateFrame(HWND hWnd, CONST RECT* lpRect,BOOL bErase)
+{
+ return SkinEngInvalidateImageFrame(hWnd,lpRect,0,0);
+}
+*)
+// Alpha channel GDI replacements/helpers
+
+const
+//
+// Paints text with correct alpha channel
+// wParam - pointer to AlphaTextOutParams
+ MS_SKINENG_ALPHATEXTOUT:PAnsiChar = 'SkinEngine/ske_AlphaTextOut';
+
+type
+ TAlphaTextOutParams = record
+ HDC :HDC;
+ lpString :TChar;
+ nCount :int;
+ lpRect :PRECT;
+ forma :uint;
+ ARGBcolor:dword;
+ reserv :array [0..15] of byte;
+ end;
+(*
+int __inline AlphaText(HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRect, UINT format, dword ARGBcolor)
+{
+ AlphaTextOutParams ap={0};
+ ap.hDC=hDC;
+ ap.lpString=lpString;
+ ap.nCount=nCount;
+ ap.lpRect=lpRect;
+ ap.format=format;
+ ap.ARGBcolor=ARGBcolor;
+ return CallService(MS_SKINENG_ALPHATEXTOUT,(WPARAM)&ap,0);
+}
+*)
+type
+ ImageListFixParam = record
+ himl :THANDLE; //HIMAGELIST;
+ index:int;
+ hicon:HICON;
+ end;
+
+type
+ DrawIconFixParam = record
+ hdc :HDC;
+ xLeft :int;
+ yTop :int;
+ hIcon :HICON;
+ cxWidth :int;
+ cyWidth :int;
+ istepIfAniCur :uint;
+ hbrFlickerFreeDraw:HBRUSH;
+ diFlags :uint;
+ end;
+
+const
+//wParam - pointer to DrawIconFixParam
+ MS_SKINENG_DRAWICONEXFIX:PAnsiChar = 'SkinEngine/DrawIconEx_Fix';
+(*
+int __inline mod_DrawIconEx_helper(HDC hdc,int xLeft,int yTop,HICON hIcon,int cxWidth,int cyWidth, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags)
+{
+ DrawIconFixParam p={0};
+ p.hdc=hdc;
+ p.xLeft=xLeft;
+ p.yTop=yTop;
+ p.hIcon=hIcon;
+ p.cxWidth=cxWidth;
+ p.cyWidth=cyWidth;
+ p.istepIfAniCur=istepIfAniCur;
+ p.hbrFlickerFreeDraw=hbrFlickerFreeDraw;
+ p.diFlags=diFlags;
+ return CallService(MS_SKINENG_DRAWICONEXFIX,(WPARAM)&p,0);
+}
+*)
+const
+// Register of plugin's user
+//
+// wParam = (WPARAM)szSetting - string that describes a user
+// format: Category/ModuleName,
+// eg: "Contact list background/CLUI",
+// "Status bar background/StatusBar"
+// lParam = (LPARAM)dwFlags
+//
+ MS_BACKGROUNDCONFIG_REGISTER:PAnsiChar = 'ModernBkgrCfg/Register';
+
+//
+// Notification about changed background
+// wParam = ModuleName
+// lParam = 0
+ ME_BACKGROUNDCONFIG_CHANGED:PAnsiChar = 'ModernBkgrCfg/Changed';
+
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_spellchecker.inc b/plugins/ExternalAPI/delphi/m_spellchecker.inc
index e2f8c5e0a7..9f776d2fd7 100644
--- a/plugins/ExternalAPI/delphi/m_spellchecker.inc
+++ b/plugins/ExternalAPI/delphi/m_spellchecker.inc
@@ -45,7 +45,7 @@ wParam: SPELLCHECKER_ITEM *
lParam: ignored
return: 0 on success
}
- MS_SPELLCHECKER_ADD_RICHEDIT = 'SpellChecker/AddRichedit';
+ MS_SPELLCHECKER_ADD_RICHEDIT:PAnsiChar = 'SpellChecker/AddRichedit';
{
Removes a richedit control for the spell checker to check
@@ -54,7 +54,7 @@ wParam: HWND
lParam: ignored
return: 0 on success
}
- MS_SPELLCHECKER_REMOVE_RICHEDIT = 'SpellChecker/RemoveRichedit';
+ MS_SPELLCHECKER_REMOVE_RICHEDIT:PAnsiChar = 'SpellChecker/RemoveRichedit';
{
Show context menu
@@ -63,6 +63,6 @@ wParam: SPELLCHECKER_POPUPMENU
lParam: ignored
return: the control id selected by the user, 0 if no one was selected, < 0 on error
}
- MS_SPELLCHECKER_SHOW_POPUP_MENU = 'SpellChecker/ShowPopupMenu';
+ MS_SPELLCHECKER_SHOW_POPUP_MENU:PAnsiChar = 'SpellChecker/ShowPopupMenu';
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_splash.inc b/plugins/ExternalAPI/delphi/m_splash.inc
new file mode 100644
index 0000000000..0ff1dde6f6
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_splash.inc
@@ -0,0 +1,11 @@
+{$IFNDEF M_SPLASH}
+{$DEFINE M_SPLASH}
+
+// Shows splash image
+// wParam = (char *) image filename, either relative to Miranda dir or absolute
+// lParam = (int) time to display in milliseconds, 0 - infinite (hangs on screen until clicked)
+// returns: 1 if success and 0 if failed
+const
+ MS_SHOWSPLASH:PAnsiChar = 'SplashScreen/Show';
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_statusplugins.inc b/plugins/ExternalAPI/delphi/m_statusplugins.inc
index dea88463fb..9852d0cf14 100644
--- a/plugins/ExternalAPI/delphi/m_statusplugins.inc
+++ b/plugins/ExternalAPI/delphi/m_statusplugins.inc
@@ -80,17 +80,17 @@ const
// -- AdvancedAutoAway --
type
- STATES = [
+ STATES = (
ACTIVE, // user is active
STATUS1_SET, // first status change happened
STATUS2_SET, // second status change happened
SET_ORGSTATUS, // user was active again, original status will be restored
- HIDDEN_ACTIVE, // user is active, but this is not shown to the outside world
+ HIDDEN_ACTIVE // user is active, but this is not shown to the outside world
// STATUS1_SET2, // first status change happened, but user may be active ('on inactive only was disabled')
// STATUS2_SET2 // second status change happened, but user may be active ('on inactive only was disabled')
- ];
+ );
type
AUTOAWAYSETTING = record
@@ -160,6 +160,7 @@ const
// returns 0
MS_KS_ANNOUNCESTATUSCHANGE:PAnsiChar = 'KeepStatus/AnnounceStatusChange';
+{
function announce_status_change(szProto:PAnsiChar;newstatus:integer;szMsg:TChar):integer;// cdecl;
var
ps:PROTOCOLSETTINGEX;
@@ -177,5 +178,5 @@ begin
result:=CallService(MS_KS_ANNOUNCESTATUSCHANGE, 0,dword(@ps));
end;
-
+}
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_stopspam.inc b/plugins/ExternalAPI/delphi/m_stopspam.inc
new file mode 100644
index 0000000000..2bae1fa6a8
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_stopspam.inc
@@ -0,0 +1,41 @@
+{
+Miranda NG: the free IM client for Microsoft* Windows*
+
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2004-009 Roman Miklashevsky, A. Petkevich, Kosh&chka, persei
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_STOPSPAM}
+{$DEFINE M_STOPSPAM}
+
+const
+ CS_NOTPASSED = 0;
+ CS_PASSED = 1;
+
+//check is contact pass the stopspam
+//wParam=(HANDLE)hContact
+//lParam=0
+//returns a "Contact State" flag
+ MS_STOPSPAM_CONTACTPASSED:PAnsiChar = 'StopSpam/IsContactPassed';
+
+//remove all temporary contacts from db
+//wParam=0
+//lParam=0
+//returns 0
+ MS_STOPSPAM_REMTEMPCONTACTS:PAnsiChar = 'StopSpam/RemoveTempContacts';
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_text.inc b/plugins/ExternalAPI/delphi/m_text.inc
new file mode 100644
index 0000000000..5847cd92e1
--- /dev/null
+++ b/plugins/ExternalAPI/delphi/m_text.inc
@@ -0,0 +1,269 @@
+{$IFNDEF M_MTEXT}
+{$DEFINE M_MTEXT}
+
+// NEW mtextcontrol interface:
+//
+// obtain the full mtextcontrol interface from the library. it is much faster as use of
+// miranda core CallService to access to mtextcontrol (no core traffic).
+// This interface provides full access to mtextcontrol internal functions,
+// thus enabling devs to fully utilize the mtextcontrol API.
+// All functions will be exported as miranda services for compatibility.
+//
+// the interface is populated during the Load(PLUGINLINK *link) handler, so you can assume it is ready when Miranda
+// throw the ME_SYSTEM_MODULESLOADED event and you can generate a warning in your ModulesLoaded() when
+// it depends on the mtextcontrol interface and the mtextcontrol plugin is missing.
+//
+// example:
+//
+// MTEXT_INTERFACE MText = {0};
+//
+// mir_getMTI(&MText);
+//
+// all interface function designed as old mtextcontrol helper functions.
+// therefore it is easy to convert your old plugin code to new interface.
+//
+// example:
+//
+// old code: MTextCreate (...
+// new code: MText.Create(...
+
+// Text control
+const
+ MTEXTCONTROLCLASS = 'MTextControl';
+ MTM_SETUSER = WM_USER;
+ MTM_UPDATE = WM_USER+1;
+
+type
+ TMTEXT_INTERFACE = record
+ cbSize:size_t;
+ version:dword;
+
+ Register :function(const userTitle:PAnsiChar; options:dword):THANDLE; stdcall;
+ Create :function(userHandle:THANDLE; text:pointer):THANDLE; stdcall;
+ CreateEx :function(userHandle:THANDLE; hContact:TMCONTACT; text:pointer; flags:dword):THANDLE; stdcall;
+ Measure :function(dc:HDC; sz:PSIZE; text:THANDLE):int; stdcall;
+ Display :function(dc:HDC; pos:TPOINT; sz:TSIZE; text:THANDLE):int; stdcall;
+ SetParent :function(text:THANDLE; hwnd:HWND; rect:TRECT):int; stdcall;
+ SendMsg :function(hwnd:HWND; text:THANDLE; msg:uint; wParam:WPARAM; lParam:LPARAM):int; stdcall;
+ CreateProxy:function(text:THANDLE):HWND; stdcall;
+ Destroy :function(text:THANDLE):int; stdcall;
+ end;
+
+const
+// get access to the interface
+// wParam = 0
+// lParam = (LPARAM)(MTEXT_INTERFACE*)Mtext
+// dont vorget to set cbSize before call service
+ MS_TEXT_GETINTERFACE:PAnsiChar = 'MText/GetInterface';
+(*
+__forceinline INT_PTR mir_getMTI( MTEXT_INTERFACE* dest )
+{
+ dest->cbSize = sizeof(*dest);
+ INT_PTR result = CallService(MS_TEXT_GETINTERFACE, 0, (LPARAM)dest);
+ return result;
+}
+*)
+const
+ // visual text options, used in MS_TEXT_REGISTER
+ MTEXT_FANCY_SMILEYS = $00000010; // SmileyAdd smileys
+ MTEXT_FANCY_BBCODES = $00000020; // [b], [u], [i]
+ MTEXT_FANCY_MATHMOD = $00000040; // enable math module formula parsing
+ MTEXT_FANCY_URLS = $00000080; // underline urls
+ MTEXT_FANCY_BBCODES2 = $00000100; // [color], [img], [url], not implemented yet
+ MTEXT_FANCY_SIMPLEFMT = $00000200; // simple formatting ("_", "/" and "*")
+ MTEXT_FANCY_MASK = $00007FFF;
+ MTEXT_FANCY_DEFAULT = $00008000; // Use default options
+
+ // text options, used in MS_TEXT_REGISTER
+ MTEXT_SYSTEM_HICONS = $00010000; // [$handle=i<HICON as dword>$]
+ MTEXT_SYSTEM_HBITMAPS = $00010000; // [$handle=b<HBITMAP as dword>$], not implemented yet
+ MTEXT_SYSTEM_ESCAPED = $00020000; // passed text is escaped with slashes, not implemented yet
+ MTEXT_SYSTEM_MASK = $7FFF0000;
+ MTEXT_SYSTEM_DEFAULT = $80000000; // Use default option -- just nothing system is used :)
+
+ // text object flags
+ MTEXT_FLG_CHAR = $00000000;
+ MTEXT_FLG_WCHAR = $00000001;
+ MTEXT_FLG_BIDI_RTL = $00000002;
+
+// used in MS_TEXT_CREATEEX
+type
+ PMTEXTCREATE = ^TMTEXTCREATE;
+ TMTEXTCREATE = record
+ cbSize :dword;
+ hContact:TMCONTACT;
+ text :TChar; // this is 'char *' or 'WCHAR *'
+ flags :dword;
+ end;
+
+// used in MS_TEXT_MEASURE and MS_TEXT_DISPLAY
+type
+ PMTEXTDISPLAY = ^TMTEXTDISPLAY;
+ TMTEXTDISPLAY = record
+ cbSize:dword;
+ dc :HDC;
+ pos :TPOINT;
+ sz :TSIZE;
+ text :THANDLE;
+ end;
+
+// used in MS_TEXT_SETPARENT
+type
+ PMTEXTSETPARENT = ^TMTEXTSETPARENT;
+ TMTEXTSETPARENT = record
+ text:THANDLE;
+ hwnd:HWND;
+ rc :TRECT;
+ end;
+
+// used in MS_TEXT_SENDMESSAGE
+type
+ PMTEXTMESSAGE = ^TMTEXTMESSAGE;
+ TMTEXTMESSAGE = record
+ hwnd :HWND;
+ text :THANDLE;
+ msg :uint;
+ wParam:WPARAM;
+ lParam:LPARAM;
+ end;
+
+const
+//---------------------------------------------------------------------------
+// deprecatet service and helper functions
+// replaced by new mtext interface !!!!!!!
+//---------------------------------------------------------------------------
+
+// subscribe to MText services
+// wParam = (WPARAM)(DOWRD)defaultOptions
+// lParam = (LPARAM)(char *)userTitle
+// result = (LRESULT)(HANDLE)userHandle
+ MS_TEXT_REGISTER:PAnsiChar = 'MText/Register';
+
+// allocate text object (unicode)
+// wParam = (WPARAM)(HANDLE)userHandle
+// lParam = (LPARAM)(WCHAR *)text
+// result = (LRESULT)(HANDLE)textHandle
+ MS_TEXT_CREATEW:PAnsiChar = 'MText/CreateW';
+
+// allocate text object (advanced)
+// wParam = (WPARAM)(HANDLE)userHandle
+// lParam = (LPARAM)(LPMTEXTCREATE)createInfo
+// result = (LRESULT)(HANDLE)textHandle
+ MS_TEXT_CREATEEX:PAnsiChar = 'MText/CreateEx';
+
+(*
+__inline HANDLE MTextCreateEx(HANDLE userHandle, HANDLE hContact, void *text, DWORD flags)
+{
+ #ifdef __cplusplus
+ MTEXTCREATE textCreate;
+ #else
+ MTEXTCREATE textCreate = {0};
+ textCreate.cbSize = sizeof(textCreate);
+ #endif
+ textCreate.hContact = hContact;
+ textCreate.text = text;
+ textCreate.flags = flags;
+ return (HANDLE)CallService(MS_TEXT_CREATEEX, (WPARAM)userHandle, (LPARAM)&textCreate);
+}
+*)
+
+// measure text object
+// wParam = (LPARAM)(LPMTEXTDISPLAY)displayInfo
+// result = 1 (success), 0 (failure)
+// displayInfo->size.cx is interpreted as maximum width allowed.
+// wrapped text size is stored in displayInfo->size, text
+ MS_TEXT_MEASURE:PAnsiChar = 'MText/Measure';
+
+(*
+__inline int MTextMeasure(HDC dc, SIZE *sz, HANDLE text)
+{
+ #ifdef __cplusplus
+ MTEXTDISPLAY displayInfo;
+ #else
+ MTEXTDISPLAY displayInfo = {0};
+ displayInfo.cbSize = sizeof(displayInfo);
+ #endif
+ displayInfo.dc = dc;
+ displayInfo.pos.x = displayInfo.pos.y = 0;
+ displayInfo.sz = *sz;
+ displayInfo.text = text;
+ int result = (int)CallService(MS_TEXT_MEASURE, (WPARAM)&displayInfo, 0);
+ *sz = displayInfo.sz;
+ return result;
+}
+*)
+
+// display text object
+// wParam = (LPARAM)(LPMTEXTDISPLAY)displayInfo
+// result = 1 (success), 0 (failure)
+ MS_TEXT_DISPLAY:PAnsiChar = 'MText/Display';
+
+(*
+__inline int MTextDisplay(HDC dc, POINT pos, SIZE sz, HANDLE text)
+{
+ #ifdef __cplusplus
+ MTEXTDISPLAY displayInfo;
+ #else
+ MTEXTDISPLAY displayInfo = {0};
+ displayInfo.cbSize = sizeof(displayInfo);
+ #endif
+ displayInfo.dc = dc;
+ displayInfo.pos = pos;
+ displayInfo.sz = sz;
+ displayInfo.text = text;
+ return (int)CallService(MS_TEXT_DISPLAY, (WPARAM)&displayInfo, 0);
+}
+*)
+
+// set parent window for text object (this is required for mouse handling, etc)
+// wParam = (WPARAM)(LPMTEXTSETPARENT)info
+// result = message result
+ MS_TEXT_SETPARENT:PAnsiChar = 'MText/SetParent';
+
+(*
+__inline int MTextSetParent(HANDLE text, HWND hwnd, RECT rect)
+{
+ MTEXTSETPARENT info;
+ info.text = text;
+ info.hwnd = hwnd;
+ info.rc = rect;
+ return (int)CallService(MS_TEXT_SETPARENT, (WPARAM)&info, 0);
+}
+*)
+
+// send message to an object
+// wParam = (WPARAM)(LPMTEXTMESSAGE)message
+// result = message result
+ MS_TEXT_SENDMESSAGE:PAnsiChar = 'MText/SendMessage';
+
+(*
+__inline int MTextSendMessage(HWND hwnd, HANDLE text, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ #ifdef __cplusplus
+ MTEXTMESSAGE message;
+ #else
+ MTEXTMESSAGE message = {0};
+ #endif
+ message.hwnd = hwnd;
+ message.text = text;
+ message.msg = msg;
+ message.wParam = wParam;
+ message.lParam = lParam;
+ return (int)CallService(MS_TEXT_SENDMESSAGE, (WPARAM)&message, 0);
+}
+*)
+
+// create a proxy window
+// wParam = (LPARAM)(HANDLE)textHandle
+ MS_TEXT_CREATEPROXY:PAnsiChar = 'MText/CreateProxy';
+
+
+// destroy text object
+// wParam = (LPARAM)(HANDLE)textHandle
+ MS_TEXT_DESTROY:PAnsiChar = 'MText/Destroy';
+
+
+// MS_TEXT_QDISPLAY :PAnsiChar = 'MText/QDisplay';
+// MS_TEXT_QDISPLAYW:PAnsiChar = 'MText/QDisplayW';
+
+{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_toptoolbar.inc b/plugins/ExternalAPI/delphi/m_toptoolbar.inc
index 2d39beea74..5dfbee3b53 100644
--- a/plugins/ExternalAPI/delphi/m_toptoolbar.inc
+++ b/plugins/ExternalAPI/delphi/m_toptoolbar.inc
@@ -72,7 +72,7 @@ const
lparam = (LPARAM) state
returns: 0 on success, -1 on failure.
}
- TTBST_PUSHED = 1;
+ TTBST_PUSHED = 1;
MS_TTB_SETBUTTONSTATE:PAnsiChar = 'TopToolBar/SetState';
diff --git a/plugins/ExternalAPI/delphi/m_versioninfo.inc b/plugins/ExternalAPI/delphi/m_versioninfo.inc
index b56b4138fa..02aa22df49 100644
--- a/plugins/ExternalAPI/delphi/m_versioninfo.inc
+++ b/plugins/ExternalAPI/delphi/m_versioninfo.inc
@@ -27,7 +27,7 @@ const
wParam - not used
lParam - not used
}
- MS_VERSIONINFO_MENU_COMMAND = 'VersionInfo/MenuCommand';
+ MS_VERSIONINFO_MENU_COMMAND:PAnsiChar = 'VersionInfo/MenuCommand';
{
Returns a string containing the versioninfo post
@@ -44,6 +44,6 @@ how to use:
if GetInfoService(TRUE,LPARAM(@data))=0 then
//success
}
- MS_VERSIONINFO_GETINFO = 'Versioninfo/GetInfo';
+ MS_VERSIONINFO_GETINFO:PAnsiChar = 'Versioninfo/GetInfo';
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_winterspeak.inc b/plugins/ExternalAPI/delphi/m_winterspeak.inc
index b00c7330d8..597b423c21 100644
--- a/plugins/ExternalAPI/delphi/m_winterspeak.inc
+++ b/plugins/ExternalAPI/delphi/m_winterspeak.inc
@@ -4,6 +4,9 @@ const
{
wParam - contact Handle
lParam - Unicode text
+ Notes: difference of services is for "ignore" checks, status or messages
+ offline contacts don't processes (use hCantact = 0 instead)
+ if English voice choosen, it can't process non-English texts (silence on Russian, for example)
}
- MS_SPEAK_STATUS:PAnsiChar = 'Speak/Status';
+ MS_SPEAK_STATUS :PAnsiChar = 'Speak/Status';
MS_SPEAK_MESSAGE:PAnsiChar = 'Speak/Message';
diff --git a/plugins/ExternalAPI/delphi/m_yamn.inc b/plugins/ExternalAPI/delphi/m_yamn.inc
index f18edb8d19..7ecaa5ae25 100644
--- a/plugins/ExternalAPI/delphi/m_yamn.inc
+++ b/plugins/ExternalAPI/delphi/m_yamn.inc
@@ -5,21 +5,16 @@
//================================== VARIABLES STRUCT ========================================
//
-{$IFNDEF MIRANDASERVICE}
-type
- MIRANDASERVICE = function(WPARAM,LPARAM:int):int; cdecl;
-{$ENDIF}
-
const
YAMN_VARIABLESVERSION = 3;
type
PYAMN_VARIABLES = ^TYAMN_VARIABLES;
TYAMN_VARIABLES = record
- hInst:HINSTANCE;
- MessageWnds:THANDLE;
+ hInst :HINST;
+ MessageWnds :THANDLE;
NewMailAccountWnd:THANDLE;
- Shutdown:int;
+ Shutdown :int;
end;
CYAMNVariables = TYAMN_VARIABLES;
@@ -28,14 +23,14 @@ type
//
type
CExportedFunctions = record
- ID:PAnsiChar;
+ ID :PAnsiChar;
Ptr:pointer;
end;
type
CExportedServices = record
- ID:PAnsiChar;
- Ptr:MIRANDASERVICE;
+ ID :PAnsiChar;
+ Ptr:TMIRANDASERVICE;
end;
//
@@ -45,14 +40,14 @@ type
const
//UninstallPlugin Event
//Sent when user wants to uninstall YAMN and all its plugins
- ME_YAMN_UNINSTALLPLUGINS = 'YAMN/MirandaEvents/UninstallPlugins';
+ ME_YAMN_UNINSTALLPLUGINS:PAnsiChar = 'YAMN/MirandaEvents/UninstallPlugins';
//NewMail Event
//Notifies you about new mail
//no arguments now (Developers, send mail, which params would you like to have, but note there's problem that
//params are 32b numbers. When it is pointer to some data, these data should persist while every plugin read them and
//after that they can be removed from memory. So it is problem)
- ME_YAMN_NEWMAIL = 'YAMN/MirandaEvents/NewMail';
+ ME_YAMN_NEWMAIL:PAnsiChar = 'YAMN/MirandaEvents/NewMail';
//
//================================== YAMN SERVICES ==================================
@@ -74,26 +69,26 @@ const
//WPARAM- function ID. It is string representating function you need to get pointer (e.g. YAMN_WRITEWAITID)
//LPARAM- not used now, but set it to 0
//returns pointer to YAMN function or NULL when functions does not exist
- MS_YAMN_GETFCNPTR = 'YAMN/Service/GetFcn';
+ MS_YAMN_GETFCNPTR:PAnsiChar = 'YAMN/Service/GetFcn';
//GetVariables Service
//Ask YAMN for pointer to CYAMNVariables structure.
//WPARAM- YAMN_VARIABLESVERSION
//LPARAM- any value
//returns pointer to YAMN_VARIABLES or NULL when version of structure does not match
- MS_YAMN_GETVARIABLES = 'YAMN/Service/GetVar';
+ MS_YAMN_GETVARIABLES:PAnsiChar = 'YAMN/Service/GetVar';
//ForceCheck Service
//Check mail on accounts
//WPARAM- not used
//LPARAM- not used
- MS_YAMN_FORCECHECK = 'YAMN/Service/ForceCheck';
+ MS_YAMN_FORCECHECK:PAnsiChar = 'YAMN/Service/ForceCheck';
//AccountCheck Service
//Check mail on individual account
//WPARAM- HACCOUNT
//LPARAM- not used
- MS_YAMN_ACCOUNTCHECK = 'YAMN/Service/AccountCheck';
+ MS_YAMN_ACCOUNTCHECK:PAnsiChar = 'YAMN/Service/AccountCheck';
//Contact List Context Menu Click
//wParam=(WPARAM)hContact
@@ -103,7 +98,7 @@ const
//it is upto the caller to check for the protocol & status
//of the TMCONTACT, it's not done for you anymore since it didn't make
//sense to store all this information in memory, etc.
- MS_YAMN_CLISTCONTEXT = 'YAMN/Service/ClistContactContextMenu';
+ MS_YAMN_CLISTCONTEXT:PAnsiChar = 'YAMN/Service/ClistContactContextMenu';
//Contact List Context Menu Click for application
//wParam=(WPARAM)hContact
@@ -113,7 +108,7 @@ const
//it is upto the caller to check for the protocol & status
//of the TMCONTACT, it's not done for you anymore since it didn't make
//sense to store all this information in memory, etc.
- MS_YAMN_CLISTCONTEXTAPP = 'YAMN/Service/ClistContactContextMenuApp';
+ MS_YAMN_CLISTCONTEXTAPP:PAnsiChar = 'YAMN/Service/ClistContactContextMenuApp';
//Contact List Double Click
//wParam=(WPARAM)hContact
@@ -123,34 +118,34 @@ const
//it is upto the caller to check for the protocol & status
//of the TMCONTACT, it's not done for you anymore since it didn't make
//sense to store all this information in memory, etc.
- MS_YAMN_CLISTDBLCLICK = 'YAMN/Service/ClistContactDoubleclicked';
+ MS_YAMN_CLISTDBLCLICK:PAnsiChar = 'YAMN/Service/ClistContactDoubleclicked';
//FilterMail Service
//Ask YAMN to process mail filtering. YAMN calls filter plugins to mark mail as spam etc... Warning! Leave all
//read or write access to mail as this function waits for write-access to mail!
//WPARAM- (HACCOUNT) account to which mail belongs
//LPARAM- (HYAMNMAIL) mail to filter
- MS_YAMN_FILTERMAIL = 'YAMN/Service/FilterMail';
+ MS_YAMN_FILTERMAIL:PAnsiChar = 'YAMN/Service/FilterMail';
//MailBrowser Service
//runs mail browser window (or tray icon only or popups only)
//WPARAM- pointer to YAMN_MAILBROWSERPARAM structure, data to mailbrowser. You do not need to fill ThreadRunningEV event member.
//LPARAM- YAMN_MAILBROWSERPARAM structure version param. Use YAMN_MAILBROWSERVERSION definition.
//returns zero if failed, nonzero if succeed
- MS_YAMN_MAILBROWSER = 'YAMN/Service/RunMailBrowser';
+ MS_YAMN_MAILBROWSER:PAnsiChar = 'YAMN/Service/RunMailBrowser';
//NoNewMail Service
//runs no new mail procedure (shows popups e.g.)
//WPARAM- pointer to YAMN_NONEWMAILPARAM structure, data to no new mail procedure. You do not need to fill ThreadRunningEV event member.
//LPARAM- YAMN_NONEWMAILPARAM structure version param. Use YAMN_NONEWMAILVERSION definition.
//returns zero if failed, nonzero if succeed
- MS_YAMN_NONEWMAILPROC = 'YAMN/Service/NoNewMailProc';
+ MS_YAMN_NONEWMAILPROC:PAnsiChar = 'YAMN/Service/NoNewMailProc';
//BadConnection Service
//runs bad connection window
//WPARAM- pointer to YAMN_BADCONNECTIONPARAM structure, data to mailbrowser. You do not need to fill ThreadRunningEV event member.
//LPARAM- YAMN_BADCONNECTIONPARAM structure version param. Use YAMN_BADCONNECTIONVERSION definition.
//returns zero if failed, nonzero if succeed
- MS_YAMN_BADCONNECTION = 'YAMN/Service/BadConnection';
+ MS_YAMN_BADCONNECTION:PAnsiChar = 'YAMN/Service/BadConnection';
{$ENDIF}
diff --git a/plugins/ExternalAPI/delphi/m_yapp.inc b/plugins/ExternalAPI/delphi/m_yapp.inc
index ed42f17b91..cd5652fb71 100644
--- a/plugins/ExternalAPI/delphi/m_yapp.inc
+++ b/plugins/ExternalAPI/delphi/m_yapp.inc
@@ -9,13 +9,13 @@ type
TPopupData = record
cbSize :int;
flags :int; // OR of PDF_* flags below
- hContact :HANDLE;
+ hContact :THANDLE;
hIcon :HICON;
szTitle :TChar;
szText :TChar;
colorBack :COLORREF; // if colorBack and colorText are equal, defaults will be used
colorText :COLORREF;
- windowProc:WNDPROC; // optional custom window procedure
+ windowProc:TWNDPROC; // optional custom window procedure
timeout :int; // -1 == infinite, 0 == default, otherwise timeout in seconds
opaque :pointer;
end;
@@ -32,19 +32,19 @@ const
//wParam = &PopupData
//lParam = 0
// returns -1 if popups disabled
- MS_YAPP_SHOWPOPUP = 'YAPP/ShowPopup';
+ MS_YAPP_SHOWPOPUP:PAnsiChar = 'YAPP/ShowPopup';
// get hContact from PopupData
// wParam = hWnd
// lParam = 0
// return hContact
- MS_YAPP_GETCONTACT = 'YAPP/GetContact';
+ MS_YAPP_GETCONTACT:PAnsiChar = 'YAPP/GetContact';
// get opaque from PopupData
// wParam = hWnd
// lParam = 0
// returns opaque
- MS_YAPP_GETOPAQUE = 'YAPP/GetOpaque';
+ MS_YAPP_GETOPAQUE:PAnsiChar = 'YAPP/GetOpaque';
//------------- Class API ----------------//
@@ -57,7 +57,7 @@ type
hIcon :HICON;
colorBack :COLORREF;
colorText :COLORREF;
- windowProc :WNDPROC;
+ windowProc :TWNDPROC;
timeout :int;
end;
@@ -66,7 +66,7 @@ const
// wParam = 0
// lParam = (POPUPCLASS *)&pc
- MS_POPUP_REGISTERCLASS = 'Popup/RegisterClass';
+ MS_POPUP_REGISTERCLASS:PAnsiChar = 'PopUp/RegisterClass';
type
TPopupClassInstance = record
@@ -75,12 +75,12 @@ type
szTitle :TChar;
szText :TChar;
opaque :pointer;
- hContact :HANDLE;
+ hContact :THANDLE;
end;
const
// wParam = 0
// lParam = (POPUPDATACLASS *)&pdc
- MS_POPUP_ADDPOPUPCLASS = 'Popup/AddPopupClass';
+ MS_POPUP_ADDPOPUPCLASS:PAnsiChar = 'PopUp/AddPopupClass';
{$ENDIF}