summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--commonheaders.h1
-rw-r--r--init.cpp2
-rw-r--r--juick.vcproj4
-rw-r--r--m_buttonbar.h54
-rw-r--r--ui.cpp27
5 files changed, 87 insertions, 1 deletions
diff --git a/commonheaders.h b/commonheaders.h
index 8c01fb2..fa1b354 100644
--- a/commonheaders.h
+++ b/commonheaders.h
@@ -39,4 +39,5 @@ using std::list;
#include "globals.h"
#include "main.h"
#include "utilities.h"
+#include "m_buttonbar.h"
#endif
diff --git a/init.cpp b/init.cpp
index 003e676..8e1ed91 100644
--- a/init.cpp
+++ b/init.cpp
@@ -81,7 +81,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
nu.szSettingsModule = szModuleName;
nu.szDescriptiveName = "Juick plugin HTTP connections (avatars)";
nu.flags = NUF_OUTGOING | NUF_HTTPCONNS;
- CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nu);
+ CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nu);
return 0;
}
diff --git a/juick.vcproj b/juick.vcproj
index eef7c93..15c4afd 100644
--- a/juick.vcproj
+++ b/juick.vcproj
@@ -638,6 +638,10 @@
>
</File>
<File
+ RelativePath=".\ui.cpp"
+ >
+ </File>
+ <File
RelativePath=".\utilities.cpp"
>
</File>
diff --git a/m_buttonbar.h b/m_buttonbar.h
new file mode 100644
index 0000000..9be67e9
--- /dev/null
+++ b/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
diff --git a/ui.cpp b/ui.cpp
new file mode 100644
index 0000000..478a13b
--- /dev/null
+++ b/ui.cpp
@@ -0,0 +1,27 @@
+// Copyright © 2010 sss
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+#include "commonheaders.h"
+
+int CreateButtons()
+{
+ CustomButtonData button;
+ button.bIMButton = TRUE;
+ button.pszModuleName = szModuleName;
+ button.ptszTooltip = _T("Test button");
+ CB_AddButton(0, (LPARAM)&button);
+ CB_InitCustomButtons();
+} \ No newline at end of file