diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 |
commit | ddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch) | |
tree | 5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/ExternalAPI | |
parent | c39340bf493a1745a41317bbf937fc7eb6cbb26a (diff) |
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts
git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ExternalAPI')
-rw-r--r-- | plugins/ExternalAPI/m_ContactSettings.h | 2 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_account.h | 2 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_flash.h | 2 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_ftpfile.h | 14 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_ieview.h | 20 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_msg_buttonsbar.h | 14 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_popup2.h | 4 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_smileyadd.h | 10 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_spellchecker.h | 2 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_text.h | 4 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_tipper.h | 2 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_userinfoex.h | 2 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_variables.h | 56 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_weather.h | 2 |
14 files changed, 66 insertions, 70 deletions
diff --git a/plugins/ExternalAPI/m_ContactSettings.h b/plugins/ExternalAPI/m_ContactSettings.h index 3f58d4cd39..9118a97a0f 100644 --- a/plugins/ExternalAPI/m_ContactSettings.h +++ b/plugins/ExternalAPI/m_ContactSettings.h @@ -26,7 +26,7 @@ typedef struct { int Type; // one of CSIT_ constants; value of this field depends on what settings dialog was opened: contact settings or group settings
union
{
- HANDLE hContact; // used when Type == CSIT_CONTACT
+ HCONTACT hContact; // used when Type == CSIT_CONTACT
int groupID; // used when Type == CSIT_GROUP
};
} CONTACTSETTINGSINIT;
diff --git a/plugins/ExternalAPI/m_account.h b/plugins/ExternalAPI/m_account.h index d8441578eb..88ad067239 100644 --- a/plugins/ExternalAPI/m_account.h +++ b/plugins/ExternalAPI/m_account.h @@ -187,7 +187,7 @@ typedef struct CAccount PSWMRG MessagesAccessSO;
//For clist contact notification
- HANDLE hContact;
+ HCONTACT hContact;
BOOL isCounting;
struct CAccount *Next;
diff --git a/plugins/ExternalAPI/m_flash.h b/plugins/ExternalAPI/m_flash.h index 2718e1982a..868a6cda07 100644 --- a/plugins/ExternalAPI/m_flash.h +++ b/plugins/ExternalAPI/m_flash.h @@ -79,7 +79,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // FLASHAVATAR structure
typedef struct {
- HANDLE hContact; // contact who flash avatar belongs to
+ HCONTACT hContact; // contact who flash avatar belongs to
HWND hWindow; // handle of flash avatar object
HWND hParentWindow; // handle of flash avatar's parent object
TCHAR* cUrl; // url of .swf file
diff --git a/plugins/ExternalAPI/m_ftpfile.h b/plugins/ExternalAPI/m_ftpfile.h index b5e49a0766..6bf82bb469 100644 --- a/plugins/ExternalAPI/m_ftpfile.h +++ b/plugins/ExternalAPI/m_ftpfile.h @@ -43,11 +43,11 @@ Boston, MA 02111-1307, USA. typedef struct
{
- int cbSize; // size of the structure
- HANDLE hContact; // contact handle, can be NULL
- BYTE ftpNum; // number of the FTP server which will be used for upload, can be one of FNUM_* values
- BYTE mode; // upload mode, can be one of FMODE_* values
- DWORD flags; // bitwise OR of the FUPL_* flags above
+ int cbSize; // size of the structure
+ HCONTACT hContact; // contact handle, can be NULL
+ BYTE ftpNum; // number of the FTP server which will be used for upload, can be one of FNUM_* values
+ BYTE mode; // upload mode, can be one of FMODE_* values
+ DWORD flags; // bitwise OR of the FUPL_* flags above
union {
TCHAR **pstzObjects; // pointer to the array of the object(s) to upload, content is determined by MODE value
@@ -66,7 +66,7 @@ typedef struct //
#define MS_FTPFILE_UPLOAD "FTPFile/Upload"
-__inline static INT_PTR FTPFileUploadA(HANDLE hContact, BYTE ftpNum, BYTE mode, char **pszObjects, int objCount)
+__inline static INT_PTR FTPFileUploadA(HCONTACT hContact, BYTE ftpNum, BYTE mode, char **pszObjects, int objCount)
{
FTPUPLOAD ftpu = {0};
ftpu.cbSize = sizeof(ftpu);
@@ -78,7 +78,7 @@ __inline static INT_PTR FTPFileUploadA(HANDLE hContact, BYTE ftpNum, BYTE mode, return CallService(MS_FTPFILE_UPLOAD, 0, (LPARAM)&ftpu);
}
-__inline static INT_PTR FTPFileUploadW(HANDLE hContact, BYTE ftpNum, BYTE mode, wchar_t **pswzObjects, int objCount)
+__inline static INT_PTR FTPFileUploadW(HCONTACT hContact, BYTE ftpNum, BYTE mode, wchar_t **pswzObjects, int objCount)
{
FTPUPLOAD ftpu = {0};
ftpu.cbSize = sizeof(ftpu);
diff --git a/plugins/ExternalAPI/m_ieview.h b/plugins/ExternalAPI/m_ieview.h index e8fa237900..44b8d5201d 100644 --- a/plugins/ExternalAPI/m_ieview.h +++ b/plugins/ExternalAPI/m_ieview.h @@ -161,19 +161,19 @@ typedef struct tagIEVIEWEVENTDATA { #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
+ 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
+ HCONTACT hContact; // contact
union {
- HANDLE hDbEventFirst; // first event to log, when IEE_LOG_EVENTS returns it will contain
+ 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)
+ 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
+ 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
diff --git a/plugins/ExternalAPI/m_msg_buttonsbar.h b/plugins/ExternalAPI/m_msg_buttonsbar.h index 31d75e84e9..e56bcafd81 100644 --- a/plugins/ExternalAPI/m_msg_buttonsbar.h +++ b/plugins/ExternalAPI/m_msg_buttonsbar.h @@ -79,13 +79,13 @@ typedef struct {
int cbSize;
- POINT pt; // screen coordinates for menus
- char* pszModule; // button owners name
- DWORD dwButtonId; // registered button ID
- HWND hwndFrom; // button parents HWND
- HANDLE hContact; //
- DWORD flags; // BBCF_ flags
- } CustomButtonClickData;
+ POINT pt; // screen coordinates for menus
+ char* pszModule; // button owners name
+ DWORD dwButtonId; // registered button ID
+ HWND hwndFrom; // button parents HWND
+ HCONTACT hContact;
+ DWORD flags; // BBCF_ flags
+} CustomButtonClickData;
//button flags
diff --git a/plugins/ExternalAPI/m_popup2.h b/plugins/ExternalAPI/m_popup2.h index 3ddd798454..c28a94cded 100644 --- a/plugins/ExternalAPI/m_popup2.h +++ b/plugins/ExternalAPI/m_popup2.h @@ -70,7 +70,7 @@ typedef struct DWORD flags;
// miranda bindings
- HANDLE lchContact;
+ HCONTACT lchContact;
HANDLE lchEvent;
// style
@@ -123,7 +123,7 @@ typedef struct // Unicode version of POPUPDATAEX_V2
typedef struct
{
- HANDLE lchContact;
+ HCONTACT lchContact;
HICON lchIcon;
union
{
diff --git a/plugins/ExternalAPI/m_smileyadd.h b/plugins/ExternalAPI/m_smileyadd.h index 1575502817..c0d9aacaa7 100644 --- a/plugins/ExternalAPI/m_smileyadd.h +++ b/plugins/ExternalAPI/m_smileyadd.h @@ -37,7 +37,7 @@ typedef struct //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
+ HCONTACT hContact; //Contact handle
} SMADD_RICHEDIT3;
//Replace smileys in a rich edit control...
@@ -65,7 +65,7 @@ typedef struct 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
+ HCONTACT hContact; //Contact handle
} SMADD_SHOWSEL3;
//Show smiley selection window
@@ -85,7 +85,7 @@ typedef struct //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
+ HCONTACT hContact; //Contact handle
} SMADD_INFO2;
//get button smiley icon
@@ -131,7 +131,7 @@ typedef struct 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
+ HCONTACT hContact; //Contact handle
} SMADD_BATCHPARSE2;
typedef struct
@@ -237,7 +237,7 @@ typedef struct typedef struct
{
unsigned cbSize; // size of the structure
- HANDLE hContact;
+ HCONTACT hContact;
int type; // 0 - directory, 1 - file;
TCHAR* path; // smiley category name for reference
} SMADD_CONT;
diff --git a/plugins/ExternalAPI/m_spellchecker.h b/plugins/ExternalAPI/m_spellchecker.h index 15386af5dd..d3d4378872 100644 --- a/plugins/ExternalAPI/m_spellchecker.h +++ b/plugins/ExternalAPI/m_spellchecker.h @@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. typedef struct {
int cbSize;
- HANDLE hContact; // The contact to get the settings from, or NULL
+ HCONTACT hContact; // The contact to get the settings from, or NULL
HWND hwnd; // The hwnd of the richedit
char *window_name; // A name for this richedit
} SPELLCHECKER_ITEM;
diff --git a/plugins/ExternalAPI/m_text.h b/plugins/ExternalAPI/m_text.h index a87b7d36f0..3f8007b26d 100644 --- a/plugins/ExternalAPI/m_text.h +++ b/plugins/ExternalAPI/m_text.h @@ -47,7 +47,7 @@ typedef struct _tagMTEXT_interface { #else
HANDLE (DLL_CALLCONV *CreateT) (HANDLE userHandle, char *text);
#endif
- HANDLE (DLL_CALLCONV *CreateEx) (HANDLE userHandle, HANDLE hContact, void *text, DWORD flags);
+ HANDLE (DLL_CALLCONV *CreateEx) (HANDLE userHandle, HCONTACT hContact, void *text, DWORD flags);
int (DLL_CALLCONV *Measure) (HDC dc, SIZE *sz, HANDLE text);
int (DLL_CALLCONV *Display) (HDC dc, POINT pos, SIZE sz, HANDLE text);
int (DLL_CALLCONV *SetParent) (HANDLE text, HWND hwnd, RECT rect);
@@ -109,7 +109,7 @@ enum typedef struct tagMTEXTCREATE
{
DWORD cbSize;
- HANDLE hContact;
+ HCONTACT hContact;
void *text; // this is 'char *' or 'WCHAR *'
DWORD flags;
diff --git a/plugins/ExternalAPI/m_tipper.h b/plugins/ExternalAPI/m_tipper.h index 21b6df7cef..eceb4cc573 100644 --- a/plugins/ExternalAPI/m_tipper.h +++ b/plugins/ExternalAPI/m_tipper.h @@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. // translation function type
// use hContact, module and setting to read your db value(s) and put the resulting string into buff
// return buff if the translation was successful, or return 0 for failure
-typedef TCHAR *(TranslateFunc)(HANDLE hContact, const char *module, const char *setting_or_prefix, TCHAR *buff, int bufflen);
+typedef TCHAR *(TranslateFunc)(HCONTACT hContact, const char *module, const char *setting_or_prefix, TCHAR *buff, int bufflen);
typedef struct {
TranslateFunc *transFunc; // address of your translation function (see typedef above)
diff --git a/plugins/ExternalAPI/m_userinfoex.h b/plugins/ExternalAPI/m_userinfoex.h index cc7b1dc572..9e244309bf 100644 --- a/plugins/ExternalAPI/m_userinfoex.h +++ b/plugins/ExternalAPI/m_userinfoex.h @@ -335,7 +335,7 @@ This service returns one of the results of MS_DB_CONTACT_GETSETTING_STR! static FORCEINLINE INT_PTR
DBGetContactSettingEx_Helper(
- HANDLE hContact,
+ HCONTACT hContact,
const char* pszProto,
const char* pszSetting,
DBVARIANT *dbv,
diff --git a/plugins/ExternalAPI/m_variables.h b/plugins/ExternalAPI/m_variables.h index 701ad423f7..2fc1d22c78 100644 --- a/plugins/ExternalAPI/m_variables.h +++ b/plugins/ExternalAPI/m_variables.h @@ -77,7 +77,7 @@ typedef struct { WCHAR *wszExtraText;
TCHAR *tszExtraText;
};
- HANDLE hContact; // Handle to contact (can be NULL) -> The field "subject"
+ HCONTACT hContact; // Handle to contact (can be NULL) -> The field "subject"
// represents this contact.
int pCount; // (output) Number of succesful parsed tokens, needs to be set
// to 0 before the call
@@ -110,37 +110,33 @@ typedef struct { // The returned string needs to be freed using mir_free.
#ifndef VARIABLES_NOHELPER
-__inline static TCHAR *variables_parse(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact) {
-
- FORMATINFO fi;
-
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.tszFormat = tszFormat;
- fi.tszExtraText = tszExtraText;
- fi.hContact = hContact;
- fi.flags = FIF_TCHAR;
-
- return (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
+__inline static TCHAR *variables_parse(TCHAR *tszFormat, TCHAR *tszExtraText, HCONTACT hContact)
+{
+ FORMATINFO fi = { sizeof(fi) };
+ fi.tszFormat = tszFormat;
+ fi.tszExtraText = tszExtraText;
+ fi.hContact = hContact;
+ fi.flags = FIF_TCHAR;
+ return (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
}
#endif
-__inline static TCHAR *variables_parse_ex(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact,
+__inline static TCHAR *variables_parse_ex(TCHAR *tszFormat, TCHAR *tszExtraText, HCONTACT hContact,
TCHAR **tszaTemporaryVars, int cbTemporaryVarsSize) {
- FORMATINFO fi;
-
- ZeroMemory(&fi, sizeof(fi));
- fi.cbSize = sizeof(fi);
- fi.tszFormat = tszFormat;
- fi.tszExtraText = tszExtraText;
- fi.hContact = hContact;
- fi.flags = FIF_TCHAR;
- fi.tszaTemporaryVars = tszaTemporaryVars;
- fi.cbTemporaryVarsSize = cbTemporaryVarsSize;
-
- return (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
+ FORMATINFO fi = { 0 };
+
+ ZeroMemory(&fi, sizeof(fi));
+ fi.cbSize = sizeof(fi);
+ fi.tszFormat = tszFormat;
+ fi.tszExtraText = tszExtraText;
+ fi.hContact = hContact;
+ fi.flags = FIF_TCHAR;
+ fi.tszaTemporaryVars = tszaTemporaryVars;
+ fi.cbTemporaryVarsSize = cbTemporaryVarsSize;
+ return (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
}
+
// Helper #2: variables_parsedup
// ------------------------
// Returns a _strdup()'ed copy of the unparsed string when Variables is not
@@ -149,9 +145,9 @@ __inline static TCHAR *variables_parse_ex(TCHAR *tszFormat, TCHAR *tszExtraText, // Note: The returned pointer needs to be released using your own free().
#ifndef VARIABLES_NOHELPER
-__inline static TCHAR *variables_parsedup(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact)
+__inline static TCHAR *variables_parsedup(TCHAR *tszFormat, TCHAR *tszExtraText, HCONTACT hContact)
{
- if ( ServiceExists(MS_VARS_FORMATSTRING)) {
+ if (ServiceExists(MS_VARS_FORMATSTRING)) {
FORMATINFO fi = { sizeof(fi) };
fi.tszFormat = tszFormat;
fi.tszExtraText = tszExtraText;
@@ -164,10 +160,10 @@ __inline static TCHAR *variables_parsedup(TCHAR *tszFormat, TCHAR *tszExtraText, return tszFormat ? mir_tstrdup(tszFormat) : tszFormat;
}
-__inline static TCHAR *variables_parsedup_ex(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact,
+__inline static TCHAR *variables_parsedup_ex(TCHAR *tszFormat, TCHAR *tszExtraText, HCONTACT hContact,
TCHAR **tszaTemporaryVars, int cbTemporaryVarsSize)
{
- if ( ServiceExists(MS_VARS_FORMATSTRING)) {
+ if (ServiceExists(MS_VARS_FORMATSTRING)) {
FORMATINFO fi = { sizeof(fi) };
fi.tszFormat = tszFormat;
fi.tszExtraText = tszExtraText;
diff --git a/plugins/ExternalAPI/m_weather.h b/plugins/ExternalAPI/m_weather.h index f76ab88db1..5a290b838d 100644 --- a/plugins/ExternalAPI/m_weather.h +++ b/plugins/ExternalAPI/m_weather.h @@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // weather conditions (added in v0.1.2.0)
typedef struct {
- HANDLE hContact;
+ HCONTACT hContact;
TCHAR id[128];
TCHAR city[128];
TCHAR update[64];
|