summaryrefslogtreecommitdiffstats
path: root/macosx/NSWindow+HBAdditions.h
blob: 4f411601329fc7aa888ff6f9f33630c3a5006002 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*  NSWindow+HBAdditions.h

 This file is part of the HandBrake source code.
 Homepage: <http://handbrake.fr/>.
 It may be used under the terms of the GNU General Public License. */

#import <Cocoa/Cocoa.h>

@interface NSWindow (HBAdditions)

/**
 *  Resizes the entire window to accommodate a view of a particular size.
 */
- (void)HB_resizeToBestSizeForViewSize:(NSSize)viewSize center:(NSPoint)center animate:(BOOL)performAnimation;

/**
 *  Calculates and returns the center point of the window
 */
- (NSPoint)HB_centerPoint;

/**
 End editing on the field editor
 and keep the current first responder.

 @return success
 */
- (BOOL)HB_endEditing;

/**
 Force end editing.
 */
- (void)HB_forceEndEditing;


@end