summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10>2010-04-22 05:04:36 +0000
committer(no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10>2010-04-22 05:04:36 +0000
commit3eab86e88f98801a4983c7ed5d08936b81741f3e (patch)
treed5ffbf111cf859e574eedc4ba83685bb989248d9
parentc12debcb441a2078c30372ba77cfcf6bdb219bfd (diff)
API standardization cosmetic changes
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@510 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r--yapp/docs/m_popup.h10
-rw-r--r--yapp/docs/m_yapp.h8
-rw-r--r--yapp/notify_imp.cpp2
-rw-r--r--yapp/options.cpp4
-rw-r--r--yapp/popups2.cpp6
-rw-r--r--yapp/popwin.cpp2
-rw-r--r--yapp/services.cpp4
7 files changed, 19 insertions, 17 deletions
diff --git a/yapp/docs/m_popup.h b/yapp/docs/m_popup.h
index 7efad50..8078d86 100644
--- a/yapp/docs/m_popup.h
+++ b/yapp/docs/m_popup.h
@@ -85,8 +85,8 @@ typedef struct
};
union
{
- WCHAR lptzText[MAX_CONTACTNAME];
- WCHAR lpwzText[MAX_CONTACTNAME];
+ WCHAR lptzText[MAX_SECONDLINE];
+ WCHAR lpwzText[MAX_SECONDLINE];
};
COLORREF colorBack;
COLORREF colorText;
@@ -124,17 +124,17 @@ You may pass additional creation flags via lParam:
#define APF_CUSTOM_POPUP 0x2
#define MS_POPUP_ADDPOPUP "PopUp/AddPopUp"
-static int __inline PUAddPopUp(POPUPDATA* ppdp) {
+static INT_PTR __inline PUAddPopUp(POPUPDATA* ppdp) {
return CallService(MS_POPUP_ADDPOPUP, (WPARAM)ppdp,0);
}
#define MS_POPUP_ADDPOPUPEX "PopUp/AddPopUpEx"
-static int __inline PUAddPopUpEx(POPUPDATAEX* ppdp) {
+static INT_PTR __inline PUAddPopUpEx(POPUPDATAEX* ppdp) {
return CallService(MS_POPUP_ADDPOPUPEX, (WPARAM)ppdp,0);
}
#define MS_POPUP_ADDPOPUPW "PopUp/AddPopUpW"
-static int __inline PUAddPopUpW(POPUPDATAW* ppdp) {
+static INT_PTR __inline PUAddPopUpW(POPUPDATAW* ppdp) {
return CallService(MS_POPUP_ADDPOPUPW, (WPARAM)ppdp,0);
}
diff --git a/yapp/docs/m_yapp.h b/yapp/docs/m_yapp.h
index 96d15e7..2fdd106 100644
--- a/yapp/docs/m_yapp.h
+++ b/yapp/docs/m_yapp.h
@@ -102,7 +102,7 @@ typedef struct {
// wParam = 0
// lParam = (POPUPCLASS *)&pc
-#define MS_YAPP_REGISTERCLASS "YAPP/RegisterClass"
+#define MS_POPUP_REGISTERCLASS "PopUp/RegisterClass"
typedef struct {
int cbSize;
@@ -123,20 +123,20 @@ typedef struct {
// wParam = 0
// lParam = (POPUPDATACLASS *)&pdc
-#define MS_YAPP_CLASSINSTANCE "YAPP/ClassInstance"
+#define MS_POPUP_ADDPOPUPCLASS "PopUp/AddPopupClass"
static int __inline ShowClassPopupA(const char *name, const char *title, const char *text) {
PopupClassInstance d = {sizeof(d), name};
d.pszTitle = title;
d.pszText = text;
- return CallService(MS_YAPP_CLASSINSTANCE, 0, (LPARAM)&d);
+ return CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&d);
}
static int __inline ShowClassPopupW(const char *name, const wchar_t *title, const wchar_t *text) {
PopupClassInstance d = {sizeof(d), name};
d.pwszTitle = title;
d.pwszText = text;
- return CallService(MS_YAPP_CLASSINSTANCE, 0, (LPARAM)&d);
+ return CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&d);
}
#ifdef _UNICODE
diff --git a/yapp/notify_imp.cpp b/yapp/notify_imp.cpp
index 89fde14..66f31e3 100644
--- a/yapp/notify_imp.cpp
+++ b/yapp/notify_imp.cpp
@@ -100,7 +100,7 @@ int NotifyOptionsInitialize(WPARAM wParam,LPARAM lParam)
odp.cbSize = sizeof(odp);
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_NOTIFY);
- odp.pszTitle = Translate("YAPP Popups");
+ odp.pszTitle = LPGEN("YAPP Popups");
odp.flags=ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgProcPopUps;
CallService(MS_NOTIFY_OPT_ADDPAGE, wParam, (LPARAM)&odp);
diff --git a/yapp/options.cpp b/yapp/options.cpp
index 2b095ef..5edca0b 100644
--- a/yapp/options.cpp
+++ b/yapp/options.cpp
@@ -434,14 +434,14 @@ static INT_PTR CALLBACK DlgProcOptsClasses(HWND hwndDlg, UINT msg, WPARAM wParam
PopupClassInstance d = {sizeof(d), pc.pszName};
d.pwszTitle = L"Preview";
d.pwszText = L"The quick brown fox jumps over the lazy dog.";
- CallService(MS_YAPP_CLASSINSTANCE, (WPARAM)&pc, (LPARAM)&d);
+ CallService(MS_POPUP_ADDPOPUPCLASS, (WPARAM)&pc, (LPARAM)&d);
} else {
PopupClass pc = newclasses[i];
pc.windowProc = 0;
PopupClassInstance d = {sizeof(d), pc.pszName};
d.pszTitle = "Preview";
d.pszText = "The quick brown fox jumps over the lazy dog.";
- CallService(MS_YAPP_CLASSINSTANCE, (WPARAM)&pc, (LPARAM)&d);
+ CallService(MS_POPUP_ADDPOPUPCLASS, (WPARAM)&pc, (LPARAM)&d);
}
break;
}
diff --git a/yapp/popups2.cpp b/yapp/popups2.cpp
index a800af7..845635b 100644
--- a/yapp/popups2.cpp
+++ b/yapp/popups2.cpp
@@ -60,6 +60,7 @@ extern "C" BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LP
extern "C" POPUPS2_API PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
+ pluginInfo.cbSize = sizeof(PLUGININFOEX);
return &pluginInfo;
}
@@ -152,7 +153,8 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
}
- if(ServiceExists(MS_FONT_REGISTERW)) {
+ if(ServiceExists(MS_FONT_REGISTERW))
+ {
font_id_firstlinew.cbSize = sizeof(FontIDW);
font_id_firstlinew.flags = FIDF_ALLOWEFFECTS;
t2w(TranslateT("Popups"), font_id_firstlinew.group, 64);
@@ -355,7 +357,7 @@ extern "C" int POPUPS2_API Load(PLUGINLINK *link) {
test.iSeconds = 10;
test.ptszDescription = TranslateT("Test popup class");
test.pszName = "popup/testclass";
- CallService(MS_YAPP_REGISTERCLASS, 0, (WPARAM)&test);
+ CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&test);
*/
return 0;
diff --git a/yapp/popwin.cpp b/yapp/popwin.cpp
index 64496c8..010da7a 100644
--- a/yapp/popwin.cpp
+++ b/yapp/popwin.cpp
@@ -183,7 +183,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
//pwd->barBrush = CreateSolidBrush(pd->colorBack / 2); // make sidebar a dark version of the bg
//DWORD darkBg = (((pd->colorBack & 0xff0000) >> 1) & 0xff0000) + (((pd->colorBack & 0xff00) >> 1) & 0xff00) + (((pd->colorBack & 0xff) >> 1) & 0xff);
//DWORD darkBg = (pdColorBack >> 1) & 0x7f7f7f; // equivalent to above :)
-
+
DWORD darkBg = pd->colorBack - ((pd->colorBack >> 2) & 0x3f3f3f); // 3/4 of current individual RGB components
pwd->barBrush = CreateSolidBrush(darkBg); // make sidebar a dark version of the bg
pwd->underlineBrush = CreateSolidBrush(pd->colorBack); // make sidebar a dark version of the bg
diff --git a/yapp/services.cpp b/yapp/services.cpp
index e21b721..9cda824 100644
--- a/yapp/services.cpp
+++ b/yapp/services.cpp
@@ -463,8 +463,8 @@ HANDLE hEventBuildMenu;
void InitServices() {
int i = 0;
hService[i++] = CreateServiceFunction(MS_YAPP_SHOWPOPUP, ShowPopup);
- hService[i++] = CreateServiceFunction(MS_YAPP_REGISTERCLASS, RegisterPopupClass);
- hService[i++] = CreateServiceFunction(MS_YAPP_CLASSINSTANCE, CreateClassPopup);
+ hService[i++] = CreateServiceFunction(MS_POPUP_REGISTERCLASS, RegisterPopupClass);
+ hService[i++] = CreateServiceFunction(MS_POPUP_ADDPOPUPCLASS, CreateClassPopup);
hService[i++] = CreateServiceFunction(MS_YAPP_GETCONTACT, GetContact);
hService[i++] = CreateServiceFunction(MS_YAPP_GETOPAQUE, GetOpaque);