WindowResizeHook.h
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN SONGBIRD GPL
4 //
5 // This file is part of the Songbird web player.
6 //
7 // Copyright(c) 2005-2008 POTI, Inc.
8 // http://songbirdnest.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END SONGBIRD GPL
24 //
25  */
26 
32 #ifndef __WINDOW_RESIZE_HOOK_H__
33 #define __WINDOW_RESIZE_HOOK_H__
34 
35 // INCLUDES ===================================================================
36 
37 // XXX Remove Me !!!
38 #ifndef PRUSTRING_DEFINED
39 #define PRUSTRING_DEFINED
40 #include <string>
41 #include "nscore.h"
42 namespace std
43 {
44  typedef basic_string< PRUnichar > prustring;
45 };
46 #endif
47 
48 #include "IWindowResizeHook.h"
49 #include "../NativeWindowFromNode.h"
50 #include <list>
51 
52 // DEFINES ====================================================================
53 #define SONGBIRD_WINDOWRESIZEHOOK_CONTRACTID \
54  "@songbirdnest.com/Songbird/WindowResizeHook;1"
55 #define SONGBIRD_WINDOWRESIZEHOOK_CLASSNAME \
56  "Songbird Window Resize Hook Interface"
57 #define SONGBIRD_WINDOWRESIZEHOOK_CID \
58 { /* 147cfe40-cbbf-43e9-9225-b5caf9fe2955 */ \
59  0x147cfe40, \
60  0xcbbf, \
61  0x43e9, \
62  {0x92, 0x25, 0xb5, 0xca, 0xf9, 0xfe, 0x29, 0x55} \
63 }
64 // CLASSES ====================================================================
65 
67 {
68 public:
71 };
72 
73 LRESULT CALLBACK ResizeHook(int code, WPARAM wParam, LPARAM lParam);
74 
76 {
77 public:
79  virtual ~CWindowResizeHook();
80 
82  NS_DECL_SBIWINDOWRESIZEHOOK
83 
84 public:
85 #ifdef XP_WIN
86  static HHOOK m_hookid;
87 #endif
89 
90 protected:
92  static std::list<CWindowResizeHookItem *> m_items;
93 };
94 
95 #endif // __WINDOW_RESIZE_HOOK_H__
96 
static CWindowResizeHookItem * findItemByWindow(void *wnd)
LRESULT CALLBACK ResizeHook(int code, WPARAM wParam, LPARAM lParam)
static CWindowResizeHookItem * findItemByCallback(sbIWindowResizeHookCallback *cb)
virtual ~CWindowResizeHook()
sbIWindowResizeHookCallback * m_callback
static std::list< CWindowResizeHookItem * > m_items
#define NATIVEWINDOW
WindowResizeHook callback interface This interface describes a callback for the WindowResizeHook serv...
WindowResizeHook service interface This is an interface to the WindowResizeHook service, used to used to register callback notifications of window resizing events.