summaryrefslogtreecommitdiff
path: root/protocols/Weather/src/stdafx.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-05-29 21:56:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-05-29 21:56:06 +0300
commit80042a770a94fbb2dc56d81fd889a6d8b22a5ff1 (patch)
tree6d8c476090ccf4bd742687796400695e2aeed6f3 /protocols/Weather/src/stdafx.h
parenta2692125ca412d116857438d44306ce91e3f3dce (diff)
fixes #2886 (Weather: display weather as extra-icon instead of status)
Diffstat (limited to 'protocols/Weather/src/stdafx.h')
-rw-r--r--protocols/Weather/src/stdafx.h61
1 files changed, 36 insertions, 25 deletions
diff --git a/protocols/Weather/src/stdafx.h b/protocols/Weather/src/stdafx.h
index 5b105d19ca..a734e91a14 100644
--- a/protocols/Weather/src/stdafx.h
+++ b/protocols/Weather/src/stdafx.h
@@ -34,26 +34,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <malloc.h>
#include <newpluginapi.h>
+#include <m_acc.h>
+#include <m_avatars.h>
+#include <m_button.h>
+#include <m_clc.h>
+#include <m_cluiframes.h>
#include <m_contacts.h>
-#include <m_icolib.h>
-#include <m_options.h>
-#include <m_langpack.h>
-#include <m_skin.h>
#include <m_database.h>
-#include <m_history.h>
-#include <m_protosvc.h>
-#include <m_userinfo.h>
-#include <m_netlib.h>
-#include <m_ignore.h>
#include <m_findadd.h>
-#include <m_button.h>
-#include <m_avatars.h>
-#include <m_clc.h>
#include <m_fontservice.h>
-#include <m_skin_eng.h>
-#include <m_cluiframes.h>
+#include <m_history.h>
+#include <m_icolib.h>
+#include <m_ignore.h>
+#include <m_langpack.h>
+#include <m_netlib.h>
+#include <m_options.h>
#include <m_popup.h>
-#include <m_acc.h>
+#include <m_protosvc.h>
+#include <m_skin.h>
+#include <m_skin_eng.h>
+#include <m_userinfo.h>
+#include <m_xstatus.h>
#include <m_tipper.h>
#include <m_weather.h>
@@ -71,16 +72,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define WEATHERCONDITION "Current"
// weather conditions
-#define SUNNY ID_STATUS_ONLINE
-#define NA ID_STATUS_OFFLINE
-#define PCLOUDY ID_STATUS_AWAY
-#define CLOUDY ID_STATUS_NA
-#define RAIN ID_STATUS_OCCUPIED
-#define FOG ID_STATUS_DND
-#define SNOW ID_STATUS_FREECHAT
-#define LIGHT ID_STATUS_INVISIBLE
-#define THUNDER ID_STATUS_INVISIBLE
-#define UNAVAIL 40081
+enum EWeatherCondition
+{
+ SUNNY,
+ NA,
+ PCLOUDY,
+ CLOUDY,
+ RAIN,
+ RSHOWER,
+ FOG,
+ SNOW,
+ SSHOWER,
+ LIGHT,
+ MAX_COND
+};
// status
#define NOSTATUSDATA 1
@@ -386,6 +391,10 @@ void GetPressure(wchar_t *tempchar, wchar_t *unit, wchar_t *str);
void GetDist(wchar_t *tempchar, wchar_t *unit, wchar_t *str);
void GetElev(wchar_t *tempchar, wchar_t *unit, wchar_t *str);
+void ClearStatusIcons();
+int MapCondToStatus(MCONTACT hContact);
+HICON GetStatusIcon(MCONTACT hContact);
+
WORD GetIcon(const wchar_t* cond, WIDATA *Data);
void CaseConv(wchar_t *str);
void TrimString(char *str);
@@ -505,6 +514,8 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin();
+ HINSTANCE hIconsDll;
+
int Load() override;
int Unload() override;
};