diff options
Diffstat (limited to 'src/modules/extraicons')
-rw-r--r-- | src/modules/extraicons/BaseExtraIcon.cpp | 4 | ||||
-rw-r--r-- | src/modules/extraicons/CallbackExtraIcon.cpp | 6 | ||||
-rw-r--r-- | src/modules/extraicons/DefaultExtraIcons.cpp | 14 | ||||
-rw-r--r-- | src/modules/extraicons/ExtraIcon.cpp | 2 | ||||
-rw-r--r-- | src/modules/extraicons/ExtraIcon.h | 44 | ||||
-rw-r--r-- | src/modules/extraicons/ExtraIconGroup.cpp | 14 | ||||
-rw-r--r-- | src/modules/extraicons/IcolibExtraIcon.cpp | 8 | ||||
-rw-r--r-- | src/modules/extraicons/extraicons.cpp | 8 | ||||
-rw-r--r-- | src/modules/extraicons/extraicons.h | 4 | ||||
-rw-r--r-- | src/modules/extraicons/options_ei.cpp | 2 |
10 files changed, 53 insertions, 53 deletions
diff --git a/src/modules/extraicons/BaseExtraIcon.cpp b/src/modules/extraicons/BaseExtraIcon.cpp index 0baffeba67..e60276bad4 100644 --- a/src/modules/extraicons/BaseExtraIcon.cpp +++ b/src/modules/extraicons/BaseExtraIcon.cpp @@ -65,13 +65,13 @@ void BaseExtraIcon::setDescIcon(const char *icon) szDescIcon = mir_strdup(icon);
}
-void BaseExtraIcon::onClick(HANDLE hContact)
+void BaseExtraIcon::onClick(HCONTACT hContact)
{
if (OnClick != NULL)
OnClick((WPARAM)hContact, (LPARAM)ConvertToClistSlot(slot), onClickParam);
}
-int BaseExtraIcon::ClistSetExtraIcon(HANDLE hContact, HANDLE hImage)
+int BaseExtraIcon::ClistSetExtraIcon(HCONTACT hContact, HANDLE hImage)
{
ExtraIcon *tmp = extraIconsByHandle[id - 1];
if (tmp != this)
diff --git a/src/modules/extraicons/CallbackExtraIcon.cpp b/src/modules/extraicons/CallbackExtraIcon.cpp index b271aef8bb..6c83193971 100644 --- a/src/modules/extraicons/CallbackExtraIcon.cpp +++ b/src/modules/extraicons/CallbackExtraIcon.cpp @@ -50,7 +50,7 @@ void CallbackExtraIcon::rebuildIcons() RebuildIcons(0, 0);
}
-void CallbackExtraIcon::applyIcon(HANDLE hContact)
+void CallbackExtraIcon::applyIcon(HCONTACT hContact)
{
if (!isEnabled() || hContact == NULL)
return;
@@ -61,7 +61,7 @@ void CallbackExtraIcon::applyIcon(HANDLE hContact) ApplyIcon((WPARAM)hContact, 0);
}
-int CallbackExtraIcon::setIcon(int id, HANDLE hContact, HANDLE icon)
+int CallbackExtraIcon::setIcon(int id, HCONTACT hContact, HANDLE icon)
{
if (!isEnabled() || hContact == NULL || id != this->id)
return -1;
@@ -69,7 +69,7 @@ int CallbackExtraIcon::setIcon(int id, HANDLE hContact, HANDLE icon) return ClistSetExtraIcon(hContact, icon);
}
-int CallbackExtraIcon::setIconByName(int id, HANDLE hContact, const char *icon)
+int CallbackExtraIcon::setIconByName(int id, HCONTACT hContact, const char *icon)
{
return -1;
}
diff --git a/src/modules/extraicons/DefaultExtraIcons.cpp b/src/modules/extraicons/DefaultExtraIcons.cpp index 9b968d81f1..fe75c5b1a8 100644 --- a/src/modules/extraicons/DefaultExtraIcons.cpp +++ b/src/modules/extraicons/DefaultExtraIcons.cpp @@ -33,7 +33,7 @@ ExtraIcon* GetExtraIcon(HANDLE id); HANDLE hExtraVisibility, hExtraChat, hExtraGender, hExtraProto;
-static void SetVisibility(HANDLE hContact, int apparentMode, bool clear)
+static void SetVisibility(HCONTACT hContact, int apparentMode, bool clear)
{
if (hContact == NULL)
return;
@@ -69,7 +69,7 @@ static void SetVisibility(HANDLE hContact, int apparentMode, bool clear) }
}
-static void SetGender(HANDLE hContact, int gender, bool clear)
+static void SetGender(HCONTACT hContact, int gender, bool clear)
{
if (hContact == NULL)
return;
@@ -134,7 +134,7 @@ static Info infos[] = &EmailOnClick },
};
-static void SetExtraIcons(HANDLE hContact)
+static void SetExtraIcons(HCONTACT hContact)
{
if (hContact == NULL)
return;
@@ -161,7 +161,7 @@ static void SetExtraIcons(HANDLE hContact) static int SettingChanged(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -209,7 +209,7 @@ static int DefaultOnClick(WPARAM wParam, LPARAM lParam, LPARAM param) if (p == NULL)
return 0;
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -279,7 +279,7 @@ static ProtoInfo* FindProto(const char *proto) static int ProtocolApplyIcon(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
char *proto = GetContactProto(hContact);
if (IsEmpty(proto))
return 0;
@@ -319,7 +319,7 @@ void DefaultExtraIcons_Load() p.hExtraIcon = ExtraIcon_Register(p.name, p.desc, LoadSkinnedIconName(p.iSkinIcon));
}
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
SetExtraIcons(hContact);
SetVisibility(hContact, -1, false);
SetGender(hContact, -1, false);
diff --git a/src/modules/extraicons/ExtraIcon.cpp b/src/modules/extraicons/ExtraIcon.cpp index 197da8976f..0da9413ef8 100644 --- a/src/modules/extraicons/ExtraIcon.cpp +++ b/src/modules/extraicons/ExtraIcon.cpp @@ -67,7 +67,7 @@ void ExtraIcon::applyIcons() if (!isEnabled())
return;
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
// Clear to assert that it will be cleared
Clist_SetExtraIcon(hContact, slot, INVALID_HANDLE_VALUE);
applyIcon(hContact);
diff --git a/src/modules/extraicons/ExtraIcon.h b/src/modules/extraicons/ExtraIcon.h index 31ec96a490..de259cbd9c 100644 --- a/src/modules/extraicons/ExtraIcon.h +++ b/src/modules/extraicons/ExtraIcon.h @@ -35,12 +35,12 @@ public: virtual void rebuildIcons() = 0;
virtual void applyIcons();
- virtual void applyIcon(HANDLE hContact) =0 ;
- virtual void onClick(HANDLE hContact) = 0;
+ virtual void applyIcon(HCONTACT hContact) =0 ;
+ virtual void onClick(HCONTACT hContact) = 0;
- virtual int setIcon(int id, HANDLE hContact, HANDLE icon) = 0;
- virtual int setIconByName(int id, HANDLE hContact, const char* icon) = 0;
- virtual void storeIcon(HANDLE hContact, void *icon) {};
+ virtual int setIcon(int id, HCONTACT hContact, HANDLE icon) = 0;
+ virtual int setIconByName(int id, HCONTACT hContact, const char* icon) = 0;
+ virtual void storeIcon(HCONTACT hContact, void *icon) {};
virtual const char *getName() const;
virtual const TCHAR *getDescription() const = 0;
@@ -55,7 +55,7 @@ public: virtual bool isEnabled() const;
- virtual int ClistSetExtraIcon(HANDLE hContact, HANDLE hImage) = 0;
+ virtual int ClistSetExtraIcon(HCONTACT hContact, HANDLE hImage) = 0;
int hLangpack;
@@ -82,10 +82,10 @@ public: virtual void setDescIcon(const char *icon);
virtual int getType() const =0;
- virtual void onClick(HANDLE hContact);
+ virtual void onClick(HCONTACT hContact);
virtual void setOnClick(MIRANDAHOOKPARAM OnClick, LPARAM param);
- virtual int ClistSetExtraIcon(HANDLE hContact, HANDLE hImage);
+ virtual int ClistSetExtraIcon(HCONTACT hContact, HANDLE hImage);
protected:
int id;
@@ -108,10 +108,10 @@ public: virtual int getType() const;
virtual void rebuildIcons();
- virtual void applyIcon(HANDLE hContact);
+ virtual void applyIcon(HCONTACT hContact);
- virtual int setIcon(int id, HANDLE hContact, HANDLE icon);
- virtual int setIconByName(int id, HANDLE hContact, const char* icon);
+ virtual int setIcon(int id, HCONTACT hContact, HANDLE icon);
+ virtual int setIconByName(int id, HCONTACT hContact, const char* icon);
private:
int(*RebuildIcons)(WPARAM wParam, LPARAM lParam);
@@ -132,11 +132,11 @@ public: virtual int getType() const;
virtual void rebuildIcons();
- virtual void applyIcon(HANDLE hContact);
+ virtual void applyIcon(HCONTACT hContact);
- virtual int setIcon(int id, HANDLE hContact, HANDLE icon);
- virtual int setIconByName(int id, HANDLE hContact, const char* icon);
- virtual void storeIcon(HANDLE hContact, void *icon);
+ virtual int setIcon(int id, HCONTACT hContact, HANDLE icon);
+ virtual int setIconByName(int id, HCONTACT hContact, const char* icon);
+ virtual void storeIcon(HCONTACT hContact, void *icon);
};
/////////////////////////////////////////////////////////////////////////////////////////
@@ -144,7 +144,7 @@ public: class ExtraIconGroup : public ExtraIcon
{
- int internalSetIcon(int id, HANDLE hContact, HANDLE icon, bool bByName);
+ int internalSetIcon(int id, HCONTACT hContact, HANDLE icon, bool bByName);
public:
ExtraIconGroup(const char *name);
virtual ~ExtraIconGroup();
@@ -152,11 +152,11 @@ public: virtual void addExtraIcon(BaseExtraIcon *extra);
virtual void rebuildIcons();
- virtual void applyIcon(HANDLE hContact);
- virtual void onClick(HANDLE hContact);
+ virtual void applyIcon(HCONTACT hContact);
+ virtual void onClick(HCONTACT hContact);
- virtual int setIcon(int id, HANDLE hContact, HANDLE icon);
- virtual int setIconByName(int id, HANDLE hContact, const char *icon);
+ virtual int setIcon(int id, HCONTACT hContact, HANDLE icon);
+ virtual int setIconByName(int id, HCONTACT hContact, const char *icon);
virtual const TCHAR* getDescription() const;
virtual const char* getDescIcon() const;
@@ -167,14 +167,14 @@ public: LIST<BaseExtraIcon> items;
- virtual int ClistSetExtraIcon(HANDLE hContact, HANDLE hImage);
+ virtual int ClistSetExtraIcon(HCONTACT hContact, HANDLE hImage);
protected:
ptrT tszDescription;
bool setValidExtraIcon;
bool insideApply;
- virtual ExtraIcon *getCurrentItem(HANDLE hContact) const;
+ virtual ExtraIcon *getCurrentItem(HCONTACT hContact) const;
};
#endif // __EXTRAICON_H__
diff --git a/src/modules/extraicons/ExtraIconGroup.cpp b/src/modules/extraicons/ExtraIconGroup.cpp index 5ec33e2b2c..9df088c1c8 100644 --- a/src/modules/extraicons/ExtraIconGroup.cpp +++ b/src/modules/extraicons/ExtraIconGroup.cpp @@ -54,7 +54,7 @@ void ExtraIconGroup::rebuildIcons() items[i]->rebuildIcons();
}
-void ExtraIconGroup::applyIcon(HANDLE hContact)
+void ExtraIconGroup::applyIcon(HCONTACT hContact)
{
if (!isEnabled() || hContact == NULL)
return;
@@ -91,7 +91,7 @@ void ExtraIconGroup::setSlot(int slot) items[i]->setSlot(slot);
}
-ExtraIcon * ExtraIconGroup::getCurrentItem(HANDLE hContact) const
+ExtraIcon * ExtraIconGroup::getCurrentItem(HCONTACT hContact) const
{
int id = (int)db_get_dw(hContact, MODULE_NAME, szName, 0);
if (id < 1)
@@ -104,24 +104,24 @@ ExtraIcon * ExtraIconGroup::getCurrentItem(HANDLE hContact) const return NULL;
}
-void ExtraIconGroup::onClick(HANDLE hContact)
+void ExtraIconGroup::onClick(HCONTACT hContact)
{
ExtraIcon *extra = getCurrentItem(hContact);
if (extra != NULL)
extra->onClick(hContact);
}
-int ExtraIconGroup::setIcon(int id, HANDLE hContact, HANDLE value)
+int ExtraIconGroup::setIcon(int id, HCONTACT hContact, HANDLE value)
{
return internalSetIcon(id, hContact, (void*)value, false);
}
-int ExtraIconGroup::setIconByName(int id, HANDLE hContact, const char *value)
+int ExtraIconGroup::setIconByName(int id, HCONTACT hContact, const char *value)
{
return internalSetIcon(id, hContact, (void*)value, true);
}
-int ExtraIconGroup::internalSetIcon(int id, HANDLE hContact, void *value, bool bByName)
+int ExtraIconGroup::internalSetIcon(int id, HCONTACT hContact, void *value, bool bByName)
{
if (insideApply) {
for (int i=0; i < items.getCount(); i++)
@@ -208,7 +208,7 @@ int ExtraIconGroup::getType() const return EXTRAICON_TYPE_GROUP;
}
-int ExtraIconGroup::ClistSetExtraIcon(HANDLE hContact, HANDLE hImage)
+int ExtraIconGroup::ClistSetExtraIcon(HCONTACT hContact, HANDLE hImage)
{
if (hImage != INVALID_HANDLE_VALUE)
setValidExtraIcon = true;
diff --git a/src/modules/extraicons/IcolibExtraIcon.cpp b/src/modules/extraicons/IcolibExtraIcon.cpp index 78c020ce3a..acf38d3ead 100644 --- a/src/modules/extraicons/IcolibExtraIcon.cpp +++ b/src/modules/extraicons/IcolibExtraIcon.cpp @@ -46,7 +46,7 @@ void IcolibExtraIcon::rebuildIcons() {
}
-void IcolibExtraIcon::applyIcon(HANDLE hContact)
+void IcolibExtraIcon::applyIcon(HCONTACT hContact)
{
if (!isEnabled() || hContact == NULL)
return;
@@ -60,7 +60,7 @@ void IcolibExtraIcon::applyIcon(HANDLE hContact) ClistSetExtraIcon(hContact, hImage);
}
-int IcolibExtraIcon::setIcon(int id, HANDLE hContact, HANDLE hIcoLib)
+int IcolibExtraIcon::setIcon(int id, HCONTACT hContact, HANDLE hIcoLib)
{
if (hContact == NULL || id != this->id)
return -1;
@@ -84,7 +84,7 @@ int IcolibExtraIcon::setIcon(int id, HANDLE hContact, HANDLE hIcoLib) return 0;
}
-int IcolibExtraIcon::setIconByName(int id, HANDLE hContact, const char *icon)
+int IcolibExtraIcon::setIconByName(int id, HCONTACT hContact, const char *icon)
{
if (hContact == NULL || id != this->id)
return -1;
@@ -106,7 +106,7 @@ int IcolibExtraIcon::setIconByName(int id, HANDLE hContact, const char *icon) return 0;
}
-void IcolibExtraIcon::storeIcon(HANDLE hContact, void *icon)
+void IcolibExtraIcon::storeIcon(HCONTACT hContact, void *icon)
{
if (hContact == NULL)
return;
diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp index 99abd93ed0..a85fb18a28 100644 --- a/src/modules/extraicons/extraicons.cpp +++ b/src/modules/extraicons/extraicons.cpp @@ -82,7 +82,7 @@ int ExtraImage_ExtraIDToColumnNum(int extra) return (extra < 1 || extra > EXTRA_ICON_COUNT) ? -1 : extra-1;
}
-int Clist_SetExtraIcon(HANDLE hContact, int slot, HANDLE hImage)
+int Clist_SetExtraIcon(HCONTACT hContact, int slot, HANDLE hImage)
{
if (cli.hwndContactTree == 0)
return -1;
@@ -248,7 +248,7 @@ int ClistExtraListRebuild(WPARAM wParam, LPARAM lParam) int ClistExtraImageApply(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -262,7 +262,7 @@ int ClistExtraImageApply(WPARAM wParam, LPARAM lParam) int ClistExtraClick(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -313,7 +313,7 @@ void fnReloadExtraIcons() bImageCreated = true;
}
-void fnSetAllExtraIcons(HANDLE hContact)
+void fnSetAllExtraIcons(HCONTACT hContact)
{
if (cli.hwndContactTree == 0)
return;
diff --git a/src/modules/extraicons/extraicons.h b/src/modules/extraicons/extraicons.h index 3926cdc963..cedddefb0c 100644 --- a/src/modules/extraicons/extraicons.h +++ b/src/modules/extraicons/extraicons.h @@ -41,14 +41,14 @@ ExtraIcon * GetExtraIconBySlot(int slot); int GetNumberOfSlots();
int ConvertToClistSlot(int slot);
-int Clist_SetExtraIcon(HANDLE hContact, int slot, HANDLE hImage);
+int Clist_SetExtraIcon(HCONTACT hContact, int slot, HANDLE hImage);
void DefaultExtraIcons_Load();
HANDLE ExtraIcon_Add(HICON hIcon);
void fnReloadExtraIcons();
-void fnSetAllExtraIcons(HANDLE hContact);
+void fnSetAllExtraIcons(HCONTACT hContact);
static inline BOOL IsEmpty(const char *str)
{
diff --git a/src/modules/extraicons/options_ei.cpp b/src/modules/extraicons/options_ei.cpp index 8432b945a9..19117a0de8 100644 --- a/src/modules/extraicons/options_ei.cpp +++ b/src/modules/extraicons/options_ei.cpp @@ -70,7 +70,7 @@ BOOL ScreenToClient(HWND hWnd, LPRECT lpRect) static void RemoveExtraIcons(int slot)
{
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
Clist_SetExtraIcon(hContact, slot, INVALID_HANDLE_VALUE);
}
|