Menu
Home
Blog
Add-ons
Forum
Wiki
Developers
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
components
integration
src
macosx
sbMacWindowMoveService.h
Go to the documentation of this file.
1
/*
2
*=BEGIN SONGBIRD GPL
3
*
4
* This file is part of the Songbird web player.
5
*
6
* Copyright(c) 2005-2009 POTI, Inc.
7
* http://www.songbirdnest.com
8
*
9
* This file may be licensed under the terms of of the
10
* GNU General Public License Version 2 (the ``GPL'').
11
*
12
* Software distributed under the License is distributed
13
* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
14
* express or implied. See the GPL for the specific language
15
* governing rights and limitations.
16
*
17
* You should have received a copy of the GPL along with this
18
* program. If not, go to http://www.gnu.org/licenses/gpl.html
19
* or write to the Free Software Foundation, Inc.,
20
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
*
22
*=END SONGBIRD GPL
23
*/
24
25
#ifndef sbMacWindowMoveService_h_
26
#define sbMacWindowMoveService_h_
27
28
#include <sbIWindowMoveService.h>
29
30
#import <AppKit/AppKit.h>
31
32
class
sbMacWindowMoveService
;
33
34
35
//==============================================================================
36
//
37
// @brief Native ObjC class used as a delegate for window move/resize event
38
// fowarding to the XPCOM service.
39
//
40
//==============================================================================
41
42
@interface
SBMacCocoaWindowListener
: NSObject
43
{
44
@private
45
NSMutableDictionary *mListenerWinDict;
// strong
46
sbMacWindowMoveService
*mService;
// weak, it owns us.
47
BOOL mIsObserving;
48
}
49
50
//
51
// @brief Init a cocoa window listener instace with a callback to the parent
52
// window resize/move service.
53
// @param aService The parent service to callback to when window events occur.
54
//
55
- (
id
)initWithService:(
sbMacWindowMoveService
*)aService;
56
57
//
58
// @brief Start watching a window. Any move or resize events that occur on
59
// |aWindow| will result in callbacks to the parent service.
60
// @param aWindow The window to start watching.
61
// @param aListener The listener to inform of window move/resize events.
62
//
63
- (void)beginObservingWindow:(NSWindow *)aWindow
64
forListener:(
sbIWindowMoveListener
*)aListener;
65
66
//
67
// @brief Stop watching a window.
68
// @param aWindow The window to stop watching for move and resize events.
69
// @param aListener The listener that was watching the window.
70
//
71
- (void)stopObservingWindow:(NSWindow *)aWindow
72
forListener:(
sbIWindowMoveListener
*)aListener;
73
74
@end
75
76
77
//==============================================================================
78
//
79
// @interface sbMacWindowMoveService
80
// @brief XPCOM service to provide window move notifications to a
81
// listener for a given (gecko) window.
82
//
83
//==============================================================================
84
85
class
sbMacWindowMoveService
:
public
sbIWindowMoveService
86
{
87
public
:
88
sbMacWindowMoveService
();
89
virtual
~sbMacWindowMoveService
();
90
91
NS_DECL_ISUPPORTS
92
NS_DECL_SBIWINDOWMOVESERVICE
93
94
nsresult
Init
();
95
96
private
:
97
SBMacCocoaWindowListener
*mWinListener;
// strong
98
};
99
100
#endif // sbMacWindowMoveService_h_
101
-[sbMacWindowMoveService sbMacWindowMoveService]
sbMacWindowMoveService()
Definition:
sbMacWindowMoveService.mm:357
id
menuItem id
Definition:
FeedWriter.js:971
SBMacCocoaWindowListener
Definition:
sbMacWindowMoveService.h:42
sbIWindowMoveService
Definition:
sbIWindowMoveService.idl:61
sbIWindowMoveListener
Definition:
sbIWindowMoveService.idl:38
-[sbMacWindowMoveService Init]
NS_DECL_ISUPPORTS NS_DECL_SBIWINDOWMOVESERVICE nsresult Init()
Definition:
sbMacWindowMoveService.mm:367
NS_DECL_ISUPPORTS
NS_DECL_ISUPPORTS
Definition:
sbPlaylistCommandsHelper.cpp:49
sbMacWindowMoveService
Definition:
sbMacWindowMoveService.h:85
-[sbMacWindowMoveService ~sbMacWindowMoveService]
virtual ~sbMacWindowMoveService()
Definition:
sbMacWindowMoveService.mm:361