summaryrefslogtreecommitdiff
path: root/plugins/ExternalAPI/m_buttonbar.h
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
commit48540940b6c28bb4378abfeb500ec45a625b37b6 (patch)
tree2ef294c0763e802f91d868bdef4229b6868527de /plugins/ExternalAPI/m_buttonbar.h
parent5c350913f011e119127baeb32a6aedeb4f0d33bc (diff)
initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@2 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ExternalAPI/m_buttonbar.h')
-rw-r--r--plugins/ExternalAPI/m_buttonbar.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/plugins/ExternalAPI/m_buttonbar.h b/plugins/ExternalAPI/m_buttonbar.h
new file mode 100644
index 0000000000..9be67e965b
--- /dev/null
+++ b/plugins/ExternalAPI/m_buttonbar.h
@@ -0,0 +1,54 @@
+#ifndef _BUTTONSBAR_H
+#define _BUTTONSBAR_H
+
+#define MIN_CBUTTONID 4000
+#define MAX_CBUTTONID 5000
+
+#define BBSF_IMBUTTON (1<<0)
+#define BBSF_CHATBUTTON (1<<1)
+#define BBSF_CANBEHIDDEN (1<<2)
+#define BBSF_NTBSWAPED (1<<3)
+#define BBSF_NTBDESTRUCT (1<<4)
+
+typedef struct _tagCustomButtonData
+ {
+ DWORD dwButtonOrigID; // id of button used while button creation and to store button info in DB
+ char * pszModuleName; //module name without spaces and underline symbols (e.g. "tabsrmm")
+
+ DWORD dwButtonCID;
+ DWORD dwArrowCID; //only use with BBBF_ISARROWBUTTON flag
+
+ TCHAR * ptszTooltip; //button's tooltip
+
+ DWORD dwPosition; // default order pos of button, counted from window edge (left or right)
+ int iButtonWidth; //must be 22 for regular button and 33 for button with arrow
+ HANDLE hIcon; //Handle to icolib registred icon
+ BOOL bIMButton,bChatButton;
+ BOOL bCanBeHidden,bHidden,bAutoHidden,bDummy,bDisabled,bPushButton;
+ BOOL bLSided,bRSided;
+ BYTE opFlags;
+ }CustomButtonData;
+
+static INT_PTR CB_ModifyButton(WPARAM wParam, LPARAM lParam);
+static INT_PTR CB_RemoveButton(WPARAM wParam, LPARAM lParam);
+static INT_PTR CB_AddButton(WPARAM wParam, LPARAM lParam);
+static INT_PTR CB_GetButtonState(WPARAM wParam, LPARAM lParam);
+static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam);
+static void CB_GetButtonSettings(HANDLE hContact,CustomButtonData *cbd);
+
+void CB_WriteButtonSettings(HANDLE hContact,CustomButtonData *cbd);
+int sstSortButtons(const void * vmtbi1, const void * vmtbi2);
+
+void CB_DeInitCustomButtons();
+void CB_InitCustomButtons();
+void CB_InitDefaultButtons();
+void CB_ReInitCustomButtons();
+
+/* MinGW doesn't like this struct declatations below */
+void BB_UpdateIcons(HWND hdlg,struct TWindowData *dat);
+void BB_RefreshTheme(const TWindowData *dat);
+void CB_DestroyAllButtons(HWND hwndDlg,struct TWindowData *dat);
+void CB_DestroyButton(HWND hwndDlg,struct TWindowData *dat,DWORD dwButtonCID,DWORD dwFlags);
+void CB_ChangeButton(HWND hwndDlg,struct TWindowData *dat,CustomButtonData* cbd);
+
+#endif