summaryrefslogtreecommitdiff
path: root/ExternalAPI
diff options
context:
space:
mode:
Diffstat (limited to 'ExternalAPI')
-rw-r--r--ExternalAPI/m_folders.h42
-rw-r--r--ExternalAPI/m_hpp.h11
-rw-r--r--ExternalAPI/m_ieview.h196
-rw-r--r--ExternalAPI/m_nconvers.h22
-rw-r--r--ExternalAPI/m_notify.h178
-rw-r--r--ExternalAPI/m_notify_popup.h29
-rw-r--r--ExternalAPI/m_smileyadd.h252
-rw-r--r--ExternalAPI/m_ticker.h50
8 files changed, 760 insertions, 20 deletions
diff --git a/ExternalAPI/m_folders.h b/ExternalAPI/m_folders.h
index 5070c35..5971cff 100644
--- a/ExternalAPI/m_folders.h
+++ b/ExternalAPI/m_folders.h
@@ -27,12 +27,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define CURRENT_PROFILE "%current_profile%"
#define MIRANDA_PATH "%miranda_path%"
#define PLUGINS_PATH "%miranda_path%" "\\plugins"
+#define MIRANDA_USERDATA "%miranda_userdata%"
#define TO_WIDE(x) L ## x
#define PROFILE_PATHW L"%profile_path%"
#define CURRENT_PROFILEW L"%current_profile%"
#define MIRANDA_PATHW L"%miranda_path%"
+#define MIRANDA_USERDATAW L"%miranda_userdata%"
#define FOLDER_AVATARS PROFILE_PATH "\\" CURRENT_PROFILE "\\avatars"
#define FOLDER_VCARDS PROFILE_PATH "\\" CURRENT_PROFILE "\\vcards"
@@ -78,16 +80,16 @@ typedef struct{
/*Folders/Register/Path service
wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
+ lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
the necessary information.
- Returns a handle to the registered path or 0 on error.
+ Returns a handle to the registered path or 0 on error.
You need to use this to call the other services.
*/
#define MS_FOLDERS_REGISTER_PATH "Folders/Register/Path"
/*Folders/Get/PathSize service
wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
+ lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
string (not including the null character). Depending on the flags set when creating the path
it will either call strlen() or wcslen() to get the length of the string.
Returns the size of the buffer.
@@ -141,7 +143,7 @@ typedef struct{
#ifndef FOLDERS_NO_HELPER_FUNCTIONS
#ifndef M_UTILS_H__
-#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don't want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
+#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don''t want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
#endif
//#include "../../../include/newpluginapi.h"
@@ -172,10 +174,10 @@ __inline static HANDLE FoldersRegisterCustomPathW(const char *section, const cha
return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
}
-__inline static int FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, char *notFound)
+__inline static INT_PTR FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, const char *notFound)
{
FOLDERSGETDATA fgd = {0};
- int res;
+ INT_PTR res;
fgd.cbSize = sizeof(FOLDERSGETDATA);
fgd.nMaxPathSize = size;
fgd.szPath = path;
@@ -186,14 +188,14 @@ __inline static int FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const
CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
mir_snprintf(path, size, "%s", buffer);
}
-
+
return res;
}
-__inline static int FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW)
+__inline static INT_PTR FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, const wchar_t *notFoundW)
{
FOLDERSGETDATA fgd = {0};
- int res;
+ INT_PTR res;
fgd.cbSize = sizeof(FOLDERSGETDATA);
fgd.nMaxPathSize = count;
fgd.szPathW = pathW;
@@ -203,14 +205,14 @@ __inline static int FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, c
wcsncpy(pathW, notFoundW, count);
pathW[count - 1] = '\0';
}
-
+
return res;
}
-__inline static int FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
+__inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
{
FOLDERSGETDATA fgd = {0};
- int res;
+ INT_PTR res;
fgd.cbSize = sizeof(FOLDERSGETDATA);
fgd.nMaxPathSize = size;
fgd.szPath = path;
@@ -228,19 +230,19 @@ __inline static int FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, cons
else{
path[0] = '\0';
}
-
+
if (fileName)
{
strcat(path, fileName);
}
-
+
return res;
}
-__inline static int FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
+__inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
{
FOLDERSGETDATA fgd = {0};
- int res;
+ INT_PTR res;
fgd.cbSize = sizeof(FOLDERSGETDATA);
fgd.nMaxPathSize = count;
fgd.szPathW = pathW;
@@ -250,7 +252,7 @@ __inline static int FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW,
wcsncpy(pathW, notFoundW, count);
pathW[count - 1] = '\0';
}
-
+
if (wcslen(pathW) > 0)
{
wcscat(pathW, L"\\");
@@ -258,12 +260,12 @@ __inline static int FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW,
else{
pathW[0] = L'\0';
}
-
+
if (fileNameW)
{
wcscat(pathW, fileNameW);
}
-
+
return res;
}
@@ -279,4 +281,4 @@ __inline static int FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW,
#endif
-#endif //M_CUSTOM_FOLDERS_H
+#endif //M_CUSTOM_FOLDERS_H \ No newline at end of file
diff --git a/ExternalAPI/m_hpp.h b/ExternalAPI/m_hpp.h
new file mode 100644
index 0000000..169b666
--- /dev/null
+++ b/ExternalAPI/m_hpp.h
@@ -0,0 +1,11 @@
+#ifndef __m_hhp__
+#define __m_hhp__
+
+#define MS_HPP_GETVERSION "History++/GetVersion"
+
+#define MS_HPP_EG_WINDOW "History++/ExtGrid/NewWindow"
+#define MS_HPP_EG_EVENT "History++/ExtGrid/Event"
+#define MS_HPP_EG_NAVIGATE "History++/ExtGrid/Navigate"
+#define MS_HPP_EG_OPTIONSCHANGED "History++/ExtGrid/OptionsChanged"
+
+#endif // __m_hhp__
diff --git a/ExternalAPI/m_ieview.h b/ExternalAPI/m_ieview.h
new file mode 100644
index 0000000..dbc2037
--- /dev/null
+++ b/ExternalAPI/m_ieview.h
@@ -0,0 +1,196 @@
+/*
+
+IEView Plugin for Miranda IM
+Copyright (C) 2005-2008 Piotr Piastucki
+
+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_IEVIEW_INCLUDED
+#define M_IEVIEW_INCLUDED
+
+#define MS_IEVIEW_WINDOW "IEVIEW/NewWindow"
+#define MS_IEVIEW_EVENT "IEVIEW/Event"
+#define MS_IEVIEW_UTILS "IEVIEW/Utils"
+#define MS_IEVIEW_NAVIGATE "IEVIEW/Navigate"
+#define MS_IEVIEW_SHOWSMILEYSELECTION "IEVIEW/ShowSmileySelection"
+#define ME_IEVIEW_OPTIONSCHANGED "IEVIEW/OptionsChanged"
+#define ME_IEVIEW_NOTIFICATION "IEVIEW/Notification"
+
+/* IEView window commands */
+#define IEW_CREATE 1 // create new window (control)
+#define IEW_DESTROY 2 // destroy control
+#define IEW_SETPOS 3 // set window position and size
+#define IEW_SCROLLBOTTOM 4 // scroll text to bottom
+
+/* IEView window type/mode */
+#define IEWM_SRMM 0 // regular SRMM
+#define IEWM_TABSRMM 1 // TabSRMM-compatible HTML builder
+#define IEWM_HTML 2 // HTML
+#define IEWM_SCRIVER 3 // Scriver-compatible HTML builder
+#define IEWM_MUCC 4 // MUCC group chats GUI
+#define IEWM_CHAT 5 // chat.dll group chats GUI
+#define IEWM_HISTORY 6 // history viewer
+#define IEWM_BROWSER 256 // empty browser window
+
+typedef struct {
+ int cbSize; // size of the strusture
+ int iType; // one of IEW_* values
+ DWORD dwMode; // compatibility mode - one of IEWM_* values
+ DWORD dwFlags; // flags, one of IEWF_* values
+ HWND parent; // parent window HWND
+ HWND hwnd; // IEW_CREATE returns WebBrowser control's HWND here
+ int x; // IE control horizontal position
+ int y; // IE control vertical position
+ int cx; // IE control horizontal size
+ int cy; // IE control vertical size
+} IEVIEWWINDOW;
+
+#define IEEDF_UNICODE 0x00000001 // if set pszText is a pointer to wchar_t string instead of char string
+#define IEEDF_UNICODE_TEXT 0x00000001 // if set pszText is a pointer to wchar_t string instead of char string
+#define IEEDF_UNICODE_NICK 0x00000002 // if set pszNick is a pointer to wchar_t string instead of char string
+#define IEEDF_UNICODE_TEXT2 0x00000004 // if set pszText2 is a pointer to wchar_t string instead of char string
+
+/* The following flags are valid only for message events (IEED_EVENT_MESSAGE) */
+#define IEEDF_FORMAT_FONT 0x00000100 // if set pszFont (font name) is valid and should be used
+#define IEEDF_FORMAT_SIZE 0x00000200 // if set fontSize is valid and should be used
+#define IEEDF_FORMAT_COLOR 0x00000400 // if set color is valid and should be used
+#define IEEDF_FORMAT_STYLE 0x00000800 // if set fontSize is valid and should be used
+
+#define IEEDF_READ 0x00001000 // if set
+#define IEEDF_SENT 0x00002000 // if set
+#define IEEDF_RTL 0x00004000 // if set
+
+#define IEED_EVENT_MESSAGE 0x0001 // message
+#define IEED_EVENT_STATUSCHANGE 0x0002 // status change
+#define IEED_EVENT_FILE 0x0003 // file
+#define IEED_EVENT_URL 0x0004 // url
+#define IEED_EVENT_ERRMSG 0x0005 // error message
+#define IEED_EVENT_SYSTEM 0x0006 // system event
+
+#define IEED_MUCC_EVENT_MESSAGE 0x0001 // message
+#define IEED_MUCC_EVENT_TOPIC 0x0002 // topic change
+#define IEED_MUCC_EVENT_JOINED 0x0003 // user joined
+#define IEED_MUCC_EVENT_LEFT 0x0004 // user left
+#define IEED_MUCC_EVENT_ERROR 0x0005 // error
+
+/* MUCC-related dwData bit flags */
+#define IEEDD_MUCC_SHOW_NICK 0x00000001
+#define IEEDD_MUCC_MSG_ON_NEW_LINE 0x00000002
+#define IEEDD_MUCC_SHOW_DATE 0x00000010
+#define IEEDD_MUCC_SHOW_TIME 0x00000020
+#define IEEDD_MUCC_SECONDS 0x00000040
+#define IEEDD_MUCC_LONG_DATE 0x00000080
+
+#define IEED_GC_EVENT_HIGHLIGHT 0x8000
+#define IEED_GC_EVENT_MESSAGE 0x0001
+#define IEED_GC_EVENT_TOPIC 0x0002
+#define IEED_GC_EVENT_JOIN 0x0003
+#define IEED_GC_EVENT_PART 0x0004
+#define IEED_GC_EVENT_QUIT 0x0006
+#define IEED_GC_EVENT_NICK 0x0007
+#define IEED_GC_EVENT_ACTION 0x0008
+#define IEED_GC_EVENT_KICK 0x0009
+#define IEED_GC_EVENT_NOTICE 0x000A
+#define IEED_GC_EVENT_INFORMATION 0x000B
+#define IEED_GC_EVENT_ADDSTATUS 0x000C
+#define IEED_GC_EVENT_REMOVESTATUS 0x000D
+
+/* GC-related dwData bit flags */
+#define IEEDD_GC_SHOW_NICK 0x00000001
+#define IEEDD_GC_SHOW_TIME 0x00000002
+#define IEEDD_GC_SHOW_ICON 0x00000004
+#define IEEDD_GC_MSG_ON_NEW_LINE 0x00001000
+
+#define IE_FONT_BOLD 0x000100 // Bold font flag
+#define IE_FONT_ITALIC 0x000200 // Italic font flag
+#define IE_FONT_UNDERLINE 0x000400 // Underlined font flags
+
+typedef struct tagIEVIEWEVENTDATA {
+ int cbSize;
+ int iType; // Event type, one of MUCC_EVENT_* values
+ DWORD dwFlags; // Event flags - IEEF_*
+ const char *fontName; // Text font name
+ int fontSize; // Text font size (in pixels)
+ int fontStyle; // Text font style (combination of IE_FONT_* flags)
+ COLORREF color; // Text color
+ union {
+ const TCHAR *ptszNick; // Nick, usage depends on type of event
+ const char *pszNick; // Nick - ANSII
+ const wchar_t *pszNickW; // Nick - Unicode
+ };
+ union {
+ const TCHAR *ptszText; // Text, usage depends on type of event
+ const char *pszText; // Text - ANSII
+ const wchar_t *pszTextW; // Text - Unicode
+ };
+ DWORD dwData; // DWORD data e.g. status see IEEDD_* values
+ BOOL bIsMe; // TRUE if the event is related to the user
+ DWORD time; // Time of the event
+ struct tagIEVIEWEVENTDATA *next;
+ union {
+ const TCHAR *ptszText2; // Text2, usage depends on type of event
+ const char *pszText2; // Text2 - ANSII
+ const wchar_t *pszText2W; // Text2 - Unicode
+ };
+} IEVIEWEVENTDATA;
+
+/* IEView events */
+#define IEE_LOG_DB_EVENTS 1 // log specified number of DB events
+#define IEE_CLEAR_LOG 2 // clear log
+#define IEE_GET_SELECTION 3 // get selected text
+#define IEE_SAVE_DOCUMENT 4 // save current document
+#define IEE_LOG_MEM_EVENTS 5 // log specified number of IEView events
+
+/* IEView event flags */
+#define IEEF_RTL 1 // turn on RTL support
+#define IEEF_NO_UNICODE 2 // disable Unicode support - valid for IEE_LOG_DB_EVENTS and IEE_GET_SELECTION events
+
+#define IEVIEWEVENT_SIZE_V1 28
+#define IEVIEWEVENT_SIZE_V2 32
+#define IEVIEWEVENT_SIZE_V3 36
+
+typedef struct {
+ int cbSize; // size of the strusture
+ int iType; // one of IEE_* values
+ DWORD dwFlags; // one of IEEF_* values
+ HWND hwnd; // HWND returned by IEW_CREATE
+ HANDLE hContact; // contact
+ union {
+ HANDLE hDbEventFirst; // first event to log, when IEE_LOG_EVENTS returns it will contain
+ // the last event actually logged or NULL if no event was logged (IEE_LOG_EVENTS)
+ IEVIEWEVENTDATA *eventData; // the pointer to an array of IEVIEWEVENTDATA objects (IEE_LOG_IEV_EVENTS)
+ };
+ int count; // number of events to log
+ int codepage; // ANSI codepage
+ const char *pszProto; // Name of the protocol
+} IEVIEWEVENT;
+
+#define IEN_NAVIGATE 1 // navigate to the given destination
+#define IENF_UNICODE 1 // if set urlW is used instead of urlW
+
+typedef struct {
+ int cbSize; // size of the strusture
+ int iType; // one of IEN_* values
+ DWORD dwFlags; // one of IEEF_* values
+ HWND hwnd; // HWND returned by IEW_CREATE
+ union {
+ const char *url; // Text, usage depends on type of event
+ const wchar_t *urlW; // Text - Unicode
+ };
+} IEVIEWNAVIGATE;
+
+#endif
+
diff --git a/ExternalAPI/m_nconvers.h b/ExternalAPI/m_nconvers.h
new file mode 100644
index 0000000..873d236
--- /dev/null
+++ b/ExternalAPI/m_nconvers.h
@@ -0,0 +1,22 @@
+#ifndef __m_nconvers_h__
+#define __m_nconvers_h__
+
+//replace smiley tags in a rich edit control...
+//wParam = (WPARAM) 0; not used
+//lParam = (LPARAM) (NCONVERS_GETICON*) &ncgi;
+//return: TRUE if found, FALSE if not
+
+typedef struct
+{
+ int cbSize; // = sizeof(NCONVERS_GETSMILEY)
+ char* Protocolname; // NULL means 'default'
+ char* SmileySequence; // character string containing the smiley
+ HICON SmileyIcon; // RETURN VALUE: this is filled with the icon handle...
+ // do not destroy!
+ int Smileylength; //l ength of the smiley that is found.
+} NCONVERS_GETICON;
+
+#define MS_NCONVERS_GETSMILEYICON "nConvers/GetSmileyIcon"
+
+
+#endif // __m_nconvers_h__ \ No newline at end of file
diff --git a/ExternalAPI/m_notify.h b/ExternalAPI/m_notify.h
new file mode 100644
index 0000000..91c9bf4
--- /dev/null
+++ b/ExternalAPI/m_notify.h
@@ -0,0 +1,178 @@
+#ifndef __m_notify_h__
+#define __m_notify_h__
+
+/*** Miranda Notify Dispatcher ************************************************\
+Notify Dispatcher provides common interface to different notification plugins
+like osd, popup, ticker etc.
+\******************************************************************************/
+
+/* Options UI event and service. The same as for miranda options */
+#define ME_NOTIFY_OPT_INITIALISE "Notify/Opt/Initialise"
+#define MS_NOTIFY_OPT_ADDPAGE "Notify/Opt/AddPage"
+
+#define UM_MNOTIFY_CHECK (WM_USER+100)
+
+typedef struct tagMNOTIFYACTIONINFO {
+ HICON icon;
+ char name[MAXMODULELABELLENGTH];
+ char service[MAXMODULELABELLENGTH];
+ DWORD cookie;
+} MNOTIFYACTIONINFO;
+
+// Just like miranda pluginLink... This should work faster then services,
+// we need some reactivity in notifications.
+typedef struct tagMNNOTIFYLINK
+{
+ /* Create a new notification type */
+ HANDLE (*Register)(const char *name, HICON icon);
+
+ // Create a new notification object
+ HANDLE (*Create)(HANDLE type);
+
+ // Check is handle is a valid notification object
+ int (*IsValid)(HANDLE notify);
+
+ // Set/get information about object, or type defaults
+ int (*Set)(HANDLE notifyORtype, const char *name, DBVARIANT val);
+ int (*Get)(HANDLE notifyORtype, const char *name, DBVARIANT *val);
+
+ // Set/get actions
+ int (*AddAction)(HANDLE notifyORtype, HICON icon, const char *name, const char *service, DWORD cookie);
+ int (*GetActions)(HANDLE notifyORtype, MNOTIFYACTIONINFO *actions); // pass NULL to get total number of actions
+
+ // Increment/decrement refer count of notification object. Unreferred objects are destroyed
+ int (*AddRef)(HANDLE notify);
+ int (*Release)(HANDLE notify);
+
+ // Notify user
+ void (*Show)(HANDLE notify);
+ void (*Update)(HANDLE notify);
+ void (*Remove)(HANDLE notify);
+} MNOTIFYLINK;
+
+// Get the MNOTIFYLINK struct
+// result = (LRESULT)(MNOTIFYLINK*)notifyLink
+#define MS_NOTIFY_GETLINK "Notify/GetLink"
+
+// Hook this to process corresponding actions
+#define ME_NOTIFY_SHOW "Notify/Show"
+#define ME_NOTIFY_UPDATE "Notify/Update"
+#define ME_NOTIFY_REMOVE "Notify/Remove"
+
+#if !defined(MNOTIFY_NOEXTERN)
+ extern
+ #ifdef __cpluplus
+ "C"
+ #endif
+ MNOTIFYLINK *notifyLink;
+#endif
+
+#if !defined(MNOTIFY_NOHELPERS) && !defined(MNOTIFY_NOEXTERN)
+ #define MNotifyRegister(a,b) (notifyLink?notifyLink->Register((a),(b)):0)
+ #define MNotifyCreate(a) (notifyLink?notifyLink->Create((a)):0)
+ #define MNotifyIsValid(a) (notifyLink?notifyLink->IsValid((a)):0)
+ #define MNotifySet(a,b,c) (notifyLink?notifyLink->Set((a),(b),(c)):0)
+ #define MNotifyGet(a,b,c) (notifyLink?notifyLink->Get((a),(b),(c)):0)
+ #define MNotifyAddAction(a,b,c) (notifyLink?notifyLink->AddAction((a),(b),(c)):0)
+ #define MNotifyGetActions(a,b) (notifyLink?notifyLink->GetActions((a),(b)):0)
+ #define MNotifyGet(a,b,c) (notifyLink?notifyLink->Get((a),(b),(c)):0)
+ #define MNotifyAddRef(a) (notifyLink?notifyLink->AddRef((a)):0)
+ #define MNotifyRelease(a) (notifyLink?notifyLink->Release((a)):0)
+ #define MNotifyShow(a) (notifyLink?notifyLink->Show(a):0)
+ #define MNotifyUpdate(a) (notifyLink?notifyLink->Update(a):0)
+ #define MNotifyRemove(a) (notifyLink?notifyLink->Remove(a):0)
+
+ static void __inline MNotifyGetLink()
+ {
+ notifyLink = ServiceExists(MS_NOTIFY_GETLINK) ? (MNOTIFYLINK *)CallService(MS_NOTIFY_GETLINK,0,0) : 0;
+ }
+
+ // get helpers
+ static __inline BYTE MNotifyGetByte(HANDLE notifyORtype, const char *name, BYTE defValue)
+ {
+ DBVARIANT dbv;
+ MNotifyGet(notifyORtype, name, &dbv);
+ if (dbv.type != DBVT_BYTE) return defValue;
+ return dbv.bVal;
+ }
+ static __inline WORD MNotifyGetWord(HANDLE notifyORtype, const char *name, WORD defValue)
+ {
+ DBVARIANT dbv;
+ MNotifyGet(notifyORtype, name, &dbv);
+ if (dbv.type != DBVT_WORD) return defValue;
+ return dbv.wVal;
+ }
+ static __inline DWORD MNotifyGetDWord(HANDLE notifyORtype, const char *name, DWORD defValue)
+ {
+ DBVARIANT dbv;
+ MNotifyGet(notifyORtype, name, &dbv);
+ if (dbv.type != DBVT_DWORD) return defValue;
+ return dbv.dVal;
+ }
+ static __inline const char *MNotifyGetString(HANDLE notifyORtype, const char *name, const char *defValue)
+ {
+ DBVARIANT dbv;
+ MNotifyGet(notifyORtype, name, &dbv);
+ if (dbv.type != DBVT_ASCIIZ) return defValue;
+ return dbv.pszVal;
+ }
+ static __inline const WCHAR *MNotifyGetWString(HANDLE notifyORtype, const char *name, const WCHAR *defValue)
+ {
+ DBVARIANT dbv;
+ MNotifyGet(notifyORtype, name, &dbv);
+ if (dbv.type != DBVT_WCHAR) return defValue;
+ return dbv.pwszVal;
+ }
+
+ // set helpers
+ static __inline void MNotifySetByte(HANDLE notifyORtype, const char *name, BYTE value)
+ {
+ DBVARIANT dbv;
+ dbv.type = DBVT_BYTE;
+ dbv.bVal = value;
+ MNotifySet(notifyORtype, name, dbv);
+ }
+ static __inline void MNotifySetWord(HANDLE notifyORtype, const char *name, WORD value)
+ {
+ DBVARIANT dbv;
+ dbv.type = DBVT_WORD;
+ dbv.wVal = value;
+ MNotifySet(notifyORtype, name, dbv);
+ }
+ static __inline void MNotifySetDWord(HANDLE notifyORtype, const char *name, DWORD value)
+ {
+ DBVARIANT dbv;
+ dbv.type = DBVT_DWORD;
+ dbv.dVal = value;
+ MNotifySet(notifyORtype, name, dbv);
+ }
+ static __inline void MNotifySetString(HANDLE notifyORtype, const char *name, const char *value)
+ {
+ DBVARIANT dbv;
+ dbv.type = DBVT_ASCIIZ;
+ dbv.pszVal = (char *)value;
+ MNotifySet(notifyORtype, name, dbv);
+ }
+ static __inline void MNotifySetWString(HANDLE notifyORtype, const char *name, const WCHAR *value)
+ {
+ DBVARIANT dbv;
+ dbv.type = DBVT_WCHAR;
+ dbv.pwszVal = (WCHAR *)value;
+ MNotifySet(notifyORtype, name, dbv);
+ }
+#endif
+
+// Common options for Get/Set actions
+#define NFOPT_TYPENAME "General/TypeName"
+#define NFOPT_ICON "General/Icon"
+#define NFOPT_CONTACT "General/Contact"
+#define NFOPT_EVENT "General/Event"
+#define NFOPT_TEXT "General/Text"
+#define NFOPT_TEXTW "General/TextW"
+#define NFOPT_TITLE "General/Title"
+#define NFOPT_TITLEW "General/TitleW"
+#define NFOPT_BACKCOLOR "General/BackColor"
+#define NFOPT_TEXTCOLOR "General/TextColor"
+#define NFOPT_TIMEOUT "General/Timeout"
+
+#endif // __m_notify_h__
diff --git a/ExternalAPI/m_notify_popup.h b/ExternalAPI/m_notify_popup.h
new file mode 100644
index 0000000..88b6633
--- /dev/null
+++ b/ExternalAPI/m_notify_popup.h
@@ -0,0 +1,29 @@
+#ifndef __m_notify_popup_h__
+#define __m_notify_popup_h__
+
+#define NFOPT_POPUP2_BACKCOLOR "Popup2/BackColor"
+#define NFOPT_POPUP2_TEXTCOLOR "Popup2/TextColor"
+#define NFOPT_POPUP2_TIMEOUT "Popup2/Timeout"
+#define NFOPT_POPUP2_LCLICKSVC "Popup2/LClickSvc"
+#define NFOPT_POPUP2_LCLICKCOOKIE "Popup2/LClickCookie"
+#define NFOPT_POPUP2_RCLICKSVC "Popup2/RClickSvc"
+#define NFOPT_POPUP2_RCLICKCOOKIE "Popup2/RClickCookie"
+#define NFOPT_POPUP2_STATUSMODE "Popup2/StatusMode"
+#define NFOPT_POPUP2_PLUGINDATA "Popup2/PluginData"
+#define NFOPT_POPUP2_WNDPROC "Popup2/WndProc"
+
+#define NFOPT_POPUP2_BACKCOLOR_S "Popup2/BackColor/Save"
+#define NFOPT_POPUP2_TEXTCOLOR_S "Popup2/TextColor/Save"
+#define NFOPT_POPUP2_TIMEOUT_S "Popup2/Timeout/Save"
+
+#define MS_POPUP2_SHOW "Popup2/Show"
+#define MS_POPUP2_UPDATE "Popup2/Update"
+#define MS_POPUP2_REMOVE "Popup2/Remove"
+
+#ifndef POPUP2_NOHELPERS
+ #define MPopup2Show(a) (CallService(MS_POPUP2_SHOW, 0, (LPARAM)(a)))
+ #define MPopup2Update(a) (CallService(MS_POPUP2_UPDATE, 0, (LPARAM)(a)))
+ #define MPopup2Remove(a) (CallService(MS_POPUP2_REMOVE, 0, (LPARAM)(a)))
+#endif
+
+#endif // __m_notify_popup_h__
diff --git a/ExternalAPI/m_smileyadd.h b/ExternalAPI/m_smileyadd.h
new file mode 100644
index 0000000..acb14e9
--- /dev/null
+++ b/ExternalAPI/m_smileyadd.h
@@ -0,0 +1,252 @@
+/*
+Miranda SmileyAdd Plugin
+Copyright (C) 2005 - 2009 Boris Krasnovskiy
+Copyright (C) 2003 - 2004 Rein-Peter de Boer
+
+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 version 2
+of the License.
+
+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, see <http://www.gnu.org/licenses/>.
+*/
+#include <richedit.h>
+
+#define SAFLRE_INSERTEMF 2 // insert smiley as EMF into RichEdit, otherwise bitmap inserted
+ // this flag allows "true" transparency
+#define SAFLRE_OUTGOING 4 // Parsing outgoing message
+#define SAFLRE_NOCUSTOM 8 // Do not use custom smileys
+
+typedef struct
+{
+ unsigned cbSize; //size of the structure
+ HWND hwndRichEditControl; //handle to the rich edit control
+ CHARRANGE* rangeToReplace; //same meaning as for normal Richedit use (NULL = replaceall)
+ const char* Protocolname; //protocol to use... if you have defined a protocol, u can
+ //use your own protocol name. SmileyAdd will automatically
+ //select the smileypack that is defined for your protocol.
+ //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
+ //if you prefer those icons.
+ //If not found or NULL, "Standard" will be used
+ unsigned flags; //Flags (SAFLRE_*) that define the behaivior
+ BOOL disableRedraw; //Parameter have been depricated, have no effect on operation
+ HANDLE hContact; //Contact handle
+} SMADD_RICHEDIT3;
+
+//Replace smileys in a rich edit control...
+//wParam = (WPARAM) 0; not used
+//lParam = (LPARAM) (SMADD_RICHEDIT3*) &smre; //pointer to SMADD_RICHEDIT3
+//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
+#define MS_SMILEYADD_REPLACESMILEYS "SmileyAdd/ReplaceSmileys"
+
+
+typedef struct
+{
+ unsigned cbSize; //size of the structure
+ char* Protocolname; //protocol to use... if you have defined a protocol, you can
+ //use your own protocol name. Smiley add will automatically
+ //select the smileypack that is defined for your protocol.
+ //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
+ //if you prefer those icons.
+ //If not found or NULL: "Standard" will be used
+ int xPosition; //Postition to place the selectwindow
+ int yPosition; // "
+ int Direction; //Direction (i.e. size upwards/downwards/etc) of the window 0, 1, 2, 3
+
+ HWND hwndTarget; //Window, where to send the message when smiley is selected.
+ UINT targetMessage; //Target message, to be sent.
+ LPARAM targetWParam; //Target WParam to be sent (LParam will be char* to select smiley)
+ //see the example file.
+ HWND hwndParent; //Parent window for smiley dialog
+ HANDLE hContact; //Contact handle
+} SMADD_SHOWSEL3;
+
+//Show smiley selection window
+//wParam = (WPARAM) 0; not used
+//lParam = (LPARAM) (SMADD_SHOWSEL3*) &smre; //pointer to SMADD_SHOWSEL3
+//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
+#define MS_SMILEYADD_SHOWSELECTION "SmileyAdd/ShowSmileySelection"
+
+
+typedef struct
+{
+ unsigned cbSize; //size of the structure
+ char* Protocolname; // " "
+ HICON ButtonIcon; //RETURN VALUE: this is filled with the icon handle
+ //of the smiley that can be used on the button
+ //if used with GETINFO2 handle must be destroyed by user!
+ //NULL if the buttonicon is not defined...
+ int NumberOfVisibleSmileys; //Number of visible smileys defined.
+ int NumberOfSmileys; //Number of total smileys defined
+ HANDLE hContact; //Contact handle
+} SMADD_INFO2;
+
+//get button smiley icon
+//wParam = (WPARAM) 0; not used
+//lParam = (LPARAM) (SMADD_INFO2*) &smgi; //pointer to SMADD_INFO2
+//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
+#define MS_SMILEYADD_GETINFO2 "SmileyAdd/GetInfo2"
+
+// Event notifies that SmileyAdd options have changed
+// Message dialogs usually need to redraw it's content on reception of this event
+//wParam = Contact handle which options have changed, NULL if global options changed
+//lParam = (LPARAM) 0; not used
+#define ME_SMILEYADD_OPTIONSCHANGED "SmileyAdd/OptionsChanged"
+
+#define SAFL_PATH 1 // provide smiley file path, icon otherwise
+#define SAFL_UNICODE 2 // string fields in OPTIONSDIALOGPAGE are WCHAR*
+#define SAFL_OUTGOING 4 // Parsing outgoing message
+#define SAFL_NOCUSTOM 8 // Do not use custom smileys
+
+#if defined _UNICODE || defined UNICODE
+ #define SAFL_TCHAR SAFL_UNICODE
+#else
+ #define SAFL_TCHAR 0
+#endif
+
+typedef struct
+{
+ unsigned cbSize; //size of the structure
+ const char* Protocolname; //protocol to use... if you have defined a protocol, u can
+ //use your own protocol name. Smiley add wil automatically
+ //select the smileypack that is defined for your protocol.
+ //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
+ //if you prefer those icons.
+ //If not found or NULL: "Standard" will be used
+ union {
+ TCHAR* str; //String to parse
+ char* astr;
+ wchar_t* wstr;
+ };
+ unsigned flag; //One of the SAFL_ flags specifies parsing requirements
+ //This parameter should be filled by the user
+
+ unsigned numSmileys; //Number of Smileys found, this parameter filled by SmileyAdd
+ unsigned oflag; //One of the SAFL_ flags specifies content of the parse results
+ //this parameter filled by SmileyAdd
+ HANDLE hContact; //Contact handle
+} SMADD_BATCHPARSE2;
+
+typedef struct
+{
+ unsigned startChar; //Starting smiley character
+ //Because of iterative nature of the API caller should set this
+ //parameter to correct value
+ unsigned size; //Number of characters in smiley (0 if not found)
+ //Because of iterative nature of the API caller should set this
+ //parameter to correct value
+ union {
+ const TCHAR* filepath;
+ const char* afilepath;
+ const wchar_t* wfilepath;
+ HICON hIcon; //User responsible for destroying icon handle
+ };
+} SMADD_BATCHPARSERES;
+
+//find all smileys in text, API parses the provided text and returns all smileys found
+//wParam = (WPARAM) 0; not used
+//lParam = (LPARAM) (SMADD_BATCHPARSE2*) &smgp; //pointer to SMADD_BATCHPARSE2
+//function returns pointer to array SMADD_BATCHPARSERES records for each smiley found
+//if no smileys found NULL is returned
+//if non NULL value returned pointer must be freed with MS_SMILEYADD_BATCHFREE API
+#define MS_SMILEYADD_BATCHPARSE "SmileyAdd/BatchParse"
+
+//Free memory allocated by MS_SMILEYADD_BATCHPARSE
+//wParam = (WPARAM) 0; not used
+//lParam = (LPARAM) (SMADD_BATCHPARSERES*) &smgp; //pointer to SMADD_BATCHPARSERES
+#define MS_SMILEYADD_BATCHFREE "SmileyAdd/BatchFree"
+
+typedef struct
+{
+ unsigned cbSize; //size of the structure
+ char* name; //smiley category name for reference
+ char* dispname; //smiley category name for display
+} SMADD_REGCAT;
+
+//Register smiley category
+//wParam = (WPARAM) 0; not used
+//lParam = (LPARAM) (SMADD_REGCAT*) &smgp; pointer to SMADD_REGCAT
+#define MS_SMILEYADD_REGISTERCATEGORY "SmileyAdd/RegisterCategory"
+
+//Register smiley category
+//wParam = (WPARAM) 0; not used
+//lParam = (LPARAM) Pointer to protocol name or NULL for all;
+#define MS_SMILEYADD_RELOAD "SmileyAdd/Reload"
+
+#ifndef MIID_SMILEY
+// {E03C71B2-6DEE-467e-A4F0-DD516745876A}
+#define MIID_SMILEY { 0xe03c71b2, 0x6dee, 0x467e, { 0xa4, 0xf0, 0xdd, 0x51, 0x67, 0x45, 0x87, 0x6a } }
+#endif
+
+/**
+ NM_FIREVIEWCHANGE is WM_NOTIFY Message for notify parent of host window about smiley are going to be repaint
+
+ The proposed action is next: Owner of RichEdit windows received NM_FIREVIEWCHANGE through WM_NOTIFY
+ twice first time before painting|invalidating (FVCN_PREFIRE) and second time - after (FVCN_POSTFIRE).
+ The Owner window may change any values of received FVCNDATA_NMHDR structure in order to raise needed action.
+ For example it may substitute FVCA_INVALIDATE to FVCA_CUSTOMDRAW event to force painting on self offscreen context.
+
+ It can be:
+ FVCA_CUSTOMDRAW - in this case you need to provide valid HDC to draw on and valid RECT of smiley
+ FVCA_INVALIDATE - to invalidate specified rect of window
+ FVCA_NONE - skip any action. But be aware - animation will be stopped till next repainting of smiley.
+ FVCA_SENDVIEWCHANGE - to notify richedit ole about object changed. Be aware Richedit will fully reconstruct itself
+
+ Another point is moment of received smiley rect - it is only valid if FVCA_DRAW is initially set,
+ and it is PROBABLY valid if FVCA_INVALIDATE is set. And it most probably invalid in case of FVCA_SENDVIEWCHANGE.
+ The smiley position is relative last full paint HDC. Usually it is relative to top-left corner of host
+ richedit (NOT it client area) in windows coordinates.
+
+*/
+
+// Type of Event one of
+#define FVCN_PREFIRE 1
+#define FVCN_POSTFIRE 2
+
+// Action of event are going to be done
+#define FVCA_NONE 0
+#define FVCA_DRAW 1 // do not modify hdc in case of _DRAW, Use _CUSTOMDRAW
+#define FVCA_CUSTOMDRAW 2
+//#define FVCA_INVALIDATE 3 (not supported)
+//#define FVCA_SENDVIEWCHANGE 4 (not supported)
+#define FVCA_SKIPDRAW 5
+
+// Extended NMHDR structure for WM_NOTIFY
+typedef struct
+{
+ //NMHDR structure
+ HWND hwndFrom; // Window of smiley host
+ UINT idFrom; // ignored
+ UINT code; // NM_FIREVIEWCHANGE
+
+ size_t cbSize;
+ BYTE bEvent; // FVCN_ value - pre- or post- painting
+ BYTE bAction; // FVCA_ keys
+ HDC hDC; // Canvas to draw on
+ RECT rcRect; // Valid/should be in case of FVCA_DRAW
+ COLORREF clrBackground; // color to fill background if fTransparent is not set
+ BOOL fTransparent; // if need to fill back color (not supported)
+ LPARAM lParam; // used by host window PreFire and PostFire event
+} FVCNDATA_NMHDR;
+
+// Code of WM_NOTIFY message (code)
+#define NM_FIREVIEWCHANGE NM_FIRST+1;
+
+typedef struct
+{
+ unsigned cbSize; // size of the structure
+ HANDLE hContact;
+ int type; // 0 - directory, 1 - file;
+ TCHAR* path; // smiley category name for reference
+} SMADD_CONT;
+
+//Loads all smileys for the contact
+//wParam = (WPARAM) 0; not used
+//lParam = (LPARAM) (SMADD_CONT*) &dir; // pointer to directory to load smiley from
+#define MS_SMILEYADD_LOADCONTACTSMILEYS "SmileyAdd/LoadContactSmileys"
diff --git a/ExternalAPI/m_ticker.h b/ExternalAPI/m_ticker.h
new file mode 100644
index 0000000..ff4d8a7
--- /dev/null
+++ b/ExternalAPI/m_ticker.h
@@ -0,0 +1,50 @@
+#ifndef M_TICKER_H
+#define M_TICKER_H
+
+
+/* TICKER_ADD_STRING
+wParam = (WPARAM)(*TICKERDATA)TickerDataAddress (see below)
+lParam = 0... not used..
+returns (int)TickerID on success or 0 if it fails
+*/
+#define TICKER_ADD_STRING "Ticker/AddString"
+
+/* TICKER_ADD_SIMPLESTRING
+wParam = (char*) szMessage // the text to display
+lParam = (char*) szTooltip // the Items tooltip (can be NULL)
+this service function will use default values for the rest of the TICKERDATA values
+returns (int)TickerID on success or 0 if it fails
+*/
+#define TICKER_ADD_SIMPLESTRING "Ticker/AddSimpleString"
+
+/* TICKER_ADD_FROMPOPUPPLUGIN
+This should only be called from the popup plugin before (or after.. makes no difference)
+the popup is created and the user wants to display the ticker
+wParam = (WPARAM)(*POPUPDATA)PopUpDataAddress
+lParam = 0
+returns (int)TickerID on success or 0 if it fails
+*/
+#define TICKER_ADD_FROMPOPUPPLUGIN "Ticker/AddFromPopupPlugin"
+
+
+typedef struct {
+ char* szMessage; // the message you want to display, will be copied to another mem address by me, so u can free your copy
+ char* szTooltip; // a message to display in the items tooltip, can be NULL will be copied to another mem address by me, so u can free your copy
+ COLORREF crForeground; // the foreground colour.. can be NULL
+ COLORREF crBackground; // the background colour.. can be NULL
+ WNDPROC PluginWindowProc; // for the window proc.. can be NULL -->- these are more for popup compatability but someone might find it usefull
+ HANDLE hContact; // can be NULL -/
+ void * PluginData; // other plugins might want this... -/
+} TICKERDATA, *LPTICKERDATA;
+
+
+
+
+
+
+
+
+
+
+
+#endif