summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/TabSRMM/src/buttonbar.h4
-rw-r--r--plugins/TabSRMM/src/commonheaders.h2
-rw-r--r--plugins/TabSRMM/src/functions.h2
-rw-r--r--plugins/TabSRMM/src/m_cln_skinedit.h147
-rw-r--r--plugins/TabSRMM/src/msgs.h2
-rw-r--r--plugins/TabSRMM/src/themes.cpp6
-rw-r--r--plugins/TabSRMM/src/themes.h118
7 files changed, 127 insertions, 154 deletions
diff --git a/plugins/TabSRMM/src/buttonbar.h b/plugins/TabSRMM/src/buttonbar.h
index ae99ebdf0d..e9ef31310d 100644
--- a/plugins/TabSRMM/src/buttonbar.h
+++ b/plugins/TabSRMM/src/buttonbar.h
@@ -1,10 +1,12 @@
#ifndef _BUTTONSBAR_H
#define _BUTTONSBAR_H
-
+
#define MIN_CBUTTONID 4000
#define MAX_CBUTTONID 5000
struct CustomButtonData;
+struct TWindowData;
+
void CB_WriteButtonSettings(MCONTACT hContact, CustomButtonData *cbd);
void CB_DeInitCustomButtons();
diff --git a/plugins/TabSRMM/src/commonheaders.h b/plugins/TabSRMM/src/commonheaders.h
index 3e8d8e1724..e66fa8fb24 100644
--- a/plugins/TabSRMM/src/commonheaders.h
+++ b/plugins/TabSRMM/src/commonheaders.h
@@ -113,8 +113,6 @@ typedef struct _DWM_THUMBNAIL_PROPERTIES
BOOL fSourceClientAreaOnly;
} DWM_THUMBNAIL_PROPERTIES, *PDWM_THUMBNAIL_PROPERTIES;
-#include "m_cln_skinedit.h"
-
#include "resource.h"
#include "version.h"
#include "buttonbar.h"
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h
index d4d3057920..f5fa1e308f 100644
--- a/plugins/TabSRMM/src/functions.h
+++ b/plugins/TabSRMM/src/functions.h
@@ -29,6 +29,8 @@
#ifndef _TABSRMM_FUNCTIONS_H
#define _TABSRMM_FUNCTIONS_H
+class CImageItem;
+
int MyAvatarChanged(WPARAM wParam, LPARAM lParam);
int IconsChanged(WPARAM wParam, LPARAM lParam);
int IcoLibIconsChanged(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/TabSRMM/src/m_cln_skinedit.h b/plugins/TabSRMM/src/m_cln_skinedit.h
deleted file mode 100644
index 5ee66829c5..0000000000
--- a/plugins/TabSRMM/src/m_cln_skinedit.h
+++ /dev/null
@@ -1,147 +0,0 @@
-
-/*
- * services
- */
-
-#define MS_CLNSE_INVOKE "CLN_Skinedit/Invoke"
-#define MS_CLNSE_FILLBYCURRENTSEL "CLN_Skinedit/FillByCurrentSel"
-
-/*
- * data structs
- */
-
-struct TWindowData;
-class CImageItem;
-
-struct ButtonItem {
- TCHAR szName[40];
- HWND hWnd;
- LONG xOff, yOff;
- LONG width, height;
- CImageItem *imgNormal, *imgPressed, *imgHover;
- LONG_PTR normalGlyphMetrics[4];
- LONG_PTR hoverGlyphMetrics[4];
- LONG_PTR pressedGlyphMetrics[4];
- DWORD dwFlags, dwStockFlags;
- DWORD uId;
- TCHAR szTip[256];
- char szService[256];
- char szModule[256], szSetting[256];
- BYTE bValuePush[256], bValueRelease[256];
- DWORD type;
- void (*pfnAction)(ButtonItem *item, HWND hwndDlg, TWindowData *dat, HWND hwndItem);
- void (*pfnCallback)(ButtonItem *item, HWND hwndDlg, TWindowData *dat, HWND hwndItem);
- TCHAR tszLabel[40];
- ButtonItem* nextItem;
- HANDLE hContact;
- TWindowData *dat;
-};
-
-typedef struct _tagButtonSet {
- ButtonItem *items;
- LONG left, top, right, bottom; // client area offsets, calculated from button layout
-} ButtonSet;
-
-struct CSkinItem {
- TCHAR szName[40];
- char szDBname[40];
- int statusID;
-
- BYTE GRADIENT;
- BYTE CORNER;
-
- DWORD COLOR;
- DWORD COLOR2;
-
- BYTE COLOR2_TRANSPARENT;
-
- DWORD TEXTCOLOR;
-
- int ALPHA;
-
- int MARGIN_LEFT;
- int MARGIN_TOP;
- int MARGIN_RIGHT;
- int MARGIN_BOTTOM;
- BYTE IGNORED;
- DWORD BORDERSTYLE;
- CImageItem *imageItem;
-};
-
-typedef struct _tagSkinDescription {
- DWORD cbSize;
- CSkinItem *StatusItems;
- int lastItem;
- int firstItem;
- char szModule[100];
- HWND hWndParent, hWndTab;
- HWND hwndCLUI;
- HWND hwndSkinEdit; /* out param */
- HWND hwndImageEdit; /* out param */
- HMENU hMenuItems;
- void (*pfnSaveCompleteStruct)(void);
- void (*pfnClcOptionsChanged )(void);
- void* (*pfnMalloc)(unsigned int);
- void (*pfnFree)(void);
- void* (*pfnRealloc)(void *, unsigned int);
- void* reserved[20];
-} SKINDESCRIPTION;
-
-// defines
-
-// FLAGS
-#define CORNER_NONE 0
-#define CORNER_ACTIVE 1
-#define CORNER_TL 2
-#define CORNER_TR 4
-#define CORNER_BR 8
-#define CORNER_BL 16
-#define CORNER_ALL (CORNER_TL | CORNER_TR | CORNER_BR | CORNER_BL | CORNER_ACTIVE)
-
-#define GRADIENT_NONE 0
-#define GRADIENT_ACTIVE 1
-#define GRADIENT_LR 2
-#define GRADIENT_RL 4
-#define GRADIENT_TB 8
-#define GRADIENT_BT 16
-
-#define IMAGE_PERPIXEL_ALPHA 1
-#define IMAGE_FLAG_DIVIDED 2
-#define IMAGE_FILLSOLID 4
-#define IMAGE_GLYPH 8
-
-#define IMAGE_STRETCH_V 1
-#define IMAGE_STRETCH_H 2
-#define IMAGE_STRETCH_B 4
-
-#define BUTTON_ISINTERNAL 1
-#define BUTTON_ISTOGGLE 2
-#define BUTTON_ISSERVICE 4
-#define BUTTON_ISPROTOSERVICE 8
-#define BUTTON_PASSHCONTACTW 16
-#define BUTTON_PASSHCONTACTL 32
-#define BUTTON_ISDBACTION 64
-#define BUTTON_ISCONTACTDBACTION 128
-#define BUTTON_DBACTIONONCONTACT 256
-#define BUTTON_ISSIDEBAR 512
-#define BUTTON_NORMALGLYPHISICON 1024
-#define BUTTON_PRESSEDGLYPHISICON 2048
-#define BUTTON_HOVERGLYPHISICON 4096
-#define BUTTON_HASLABEL 8192
-
-#define CLCDEFAULT_GRADIENT 0
-#define CLCDEFAULT_CORNER 0
-
-#define CLCDEFAULT_COLOR 0xd0d0d0
-#define CLCDEFAULT_COLOR2 0xd0d0d0
-
-#define CLCDEFAULT_TEXTCOLOR 0x000000
-
-#define CLCDEFAULT_COLOR2_TRANSPARENT 1
-
-#define CLCDEFAULT_ALPHA 100
-#define CLCDEFAULT_MRGN_LEFT 0
-#define CLCDEFAULT_MRGN_TOP 0
-#define CLCDEFAULT_MRGN_RIGHT 0
-#define CLCDEFAULT_MRGN_BOTTOM 0
-#define CLCDEFAULT_IGNORE 1
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index e1f79b8717..8af86b04ac 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -169,6 +169,8 @@ struct TContainerSettings
BYTE reserved[10];
};
+struct ButtonItem;
+
struct TContainerData
{
TContainerData *pNext;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index d32fd28c82..60af86107e 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -2508,6 +2508,6 @@ void CSkin::FillBack(const HDC hdc, RECT* rc)
/////////////////////////////////////////////////////////////////////////////////////////
bool CSkin::IsThemed()
-{
- return !(m_skinEnabled && !SkinItems[ID_EXTBKBUTTONSNPRESSED].IGNORED && !SkinItems[ID_EXTBKBUTTONSPRESSED].IGNORED && !SkinItems[ID_EXTBKBUTTONSMOUSEOVER].IGNORED);
-}
+{
+ return !(m_skinEnabled && !SkinItems[ID_EXTBKBUTTONSNPRESSED].IGNORED && !SkinItems[ID_EXTBKBUTTONSPRESSED].IGNORED && !SkinItems[ID_EXTBKBUTTONSMOUSEOVER].IGNORED);
+}
diff --git a/plugins/TabSRMM/src/themes.h b/plugins/TabSRMM/src/themes.h
index e115a1ccd8..5246b619f7 100644
--- a/plugins/TabSRMM/src/themes.h
+++ b/plugins/TabSRMM/src/themes.h
@@ -59,6 +59,63 @@ void CustomizeButton(HWND hwndButton);
#define BUTTONSETASSIDEBARBUTTON (BUTTONSETASFLATBTN + 22)
#define BUTTONSETOVERLAYICON (BUTTONSETASFLATBTN + 23)
+// FLAGS
+#define CORNER_NONE 0
+#define CORNER_ACTIVE 1
+#define CORNER_TL 2
+#define CORNER_TR 4
+#define CORNER_BR 8
+#define CORNER_BL 16
+#define CORNER_ALL (CORNER_TL | CORNER_TR | CORNER_BR | CORNER_BL | CORNER_ACTIVE)
+
+#define GRADIENT_NONE 0
+#define GRADIENT_ACTIVE 1
+#define GRADIENT_LR 2
+#define GRADIENT_RL 4
+#define GRADIENT_TB 8
+#define GRADIENT_BT 16
+
+#define IMAGE_PERPIXEL_ALPHA 1
+#define IMAGE_FLAG_DIVIDED 2
+#define IMAGE_FILLSOLID 4
+#define IMAGE_GLYPH 8
+
+#define IMAGE_STRETCH_V 1
+#define IMAGE_STRETCH_H 2
+#define IMAGE_STRETCH_B 4
+
+#define BUTTON_ISINTERNAL 1
+#define BUTTON_ISTOGGLE 2
+#define BUTTON_ISSERVICE 4
+#define BUTTON_ISPROTOSERVICE 8
+#define BUTTON_PASSHCONTACTW 16
+#define BUTTON_PASSHCONTACTL 32
+#define BUTTON_ISDBACTION 64
+#define BUTTON_ISCONTACTDBACTION 128
+#define BUTTON_DBACTIONONCONTACT 256
+#define BUTTON_ISSIDEBAR 512
+#define BUTTON_NORMALGLYPHISICON 1024
+#define BUTTON_PRESSEDGLYPHISICON 2048
+#define BUTTON_HOVERGLYPHISICON 4096
+#define BUTTON_HASLABEL 8192
+
+#define CLCDEFAULT_GRADIENT 0
+#define CLCDEFAULT_CORNER 0
+
+#define CLCDEFAULT_COLOR 0xd0d0d0
+#define CLCDEFAULT_COLOR2 0xd0d0d0
+
+#define CLCDEFAULT_TEXTCOLOR 0x000000
+
+#define CLCDEFAULT_COLOR2_TRANSPARENT 1
+
+#define CLCDEFAULT_ALPHA 100
+#define CLCDEFAULT_MRGN_LEFT 0
+#define CLCDEFAULT_MRGN_TOP 0
+#define CLCDEFAULT_MRGN_RIGHT 0
+#define CLCDEFAULT_MRGN_BOTTOM 0
+#define CLCDEFAULT_IGNORE 1
+
struct AeroEffect
{
TCHAR tszName[40];
@@ -191,6 +248,33 @@ private:
CImageItem* m_nextItem; // next item in a set of image items (usually the skin set)
};
+
+struct CSkinItem {
+ TCHAR szName[40];
+ char szDBname[40];
+ int statusID;
+
+ BYTE GRADIENT;
+ BYTE CORNER;
+
+ DWORD COLOR;
+ DWORD COLOR2;
+
+ BYTE COLOR2_TRANSPARENT;
+
+ DWORD TEXTCOLOR;
+
+ int ALPHA;
+
+ int MARGIN_LEFT;
+ int MARGIN_TOP;
+ int MARGIN_RIGHT;
+ int MARGIN_BOTTOM;
+ BYTE IGNORED;
+ DWORD BORDERSTYLE;
+ CImageItem *imageItem;
+};
+
/**
* Implements the skinning engine. There is only one instance of this class and
* it always holds the currently loaded skin (if any).
@@ -359,7 +443,6 @@ private:
int m_nrSkinIcons;
DWORD m_dwmColor;
-private:
static void TSAPI AeroEffectCallback_Milk(const HDC hdc, const RECT *rc, int iEffectArea);
static void TSAPI AeroEffectCallback_Carbon(const HDC hdc, const RECT *rc, int iEffectArea);
static void TSAPI AeroEffectCallback_Solid(const HDC hdc, const RECT *rc, int iEffectArea);
@@ -396,4 +479,37 @@ struct TabControlData
extern CSkin *Skin;
+/*
+* data structs
+*/
+
+struct ButtonItem {
+ TCHAR szName[40];
+ HWND hWnd;
+ LONG xOff, yOff;
+ LONG width, height;
+ CImageItem *imgNormal, *imgPressed, *imgHover;
+ LONG_PTR normalGlyphMetrics[4];
+ LONG_PTR hoverGlyphMetrics[4];
+ LONG_PTR pressedGlyphMetrics[4];
+ DWORD dwFlags, dwStockFlags;
+ DWORD uId;
+ TCHAR szTip[256];
+ char szService[256];
+ char szModule[256], szSetting[256];
+ BYTE bValuePush[256], bValueRelease[256];
+ DWORD type;
+ void(*pfnAction)(ButtonItem *item, HWND hwndDlg, TWindowData *dat, HWND hwndItem);
+ void(*pfnCallback)(ButtonItem *item, HWND hwndDlg, TWindowData *dat, HWND hwndItem);
+ TCHAR tszLabel[40];
+ ButtonItem* nextItem;
+ HANDLE hContact;
+ TWindowData *dat;
+};
+
+typedef struct _tagButtonSet {
+ ButtonItem *items;
+ LONG left, top, right, bottom; // client area offsets, calculated from button layout
+} ButtonSet;
+
#endif /* __THEMES_H */