summaryrefslogtreecommitdiffstats
path: root/macosx/NSWindow+HBAdditions.h
blob: 7adb69d5d14ffa127f2d1a1f39b5e145c80faff3 (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 keepInScreenRect:(BOOL)keepInScreenRect centerPoint:(NSPoint)center animate:(BOOL)animateFlag;

/**
 *  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