Mercurial > mplayer.hg
annotate libvo/osx_objc_common.h @ 36892:f50427ad9ff6
Internally map item 'potmeter' onto 'hpotmeter'.
Former version of the GUI treated a potmeter very similar to a hpotmeter
(the Win32 GUI still does so) and lots of skins are solely using
potmeters instead of hpotmeters, although this doesn't make sense at
all.
The current version of the GUI is treating a potmeter differently, but
in order to not break old skins, restore the old behaviour.
For the X11/GTK GUI, a potmeter is now simply a hpotmeter with
button=NULL and (button)width=(button)height=0. For the Win32 GUI
(where skins unfortunately are handled a bit differently and things
are more complicated) a potmeter is now a hpotmeter without button
but (button)width=(widget)width and (button)height=(widget)height.
Additionally, print a legacy information, because the item 'potmeter' is
obsolete now and oughtn't be used any longer.
author | ib |
---|---|
date | Mon, 10 Mar 2014 17:32:29 +0000 |
parents | f51965824a2b |
children |
rev | line source |
---|---|
35086
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
1 /* |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
2 * CoreVideo video output driver |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
3 * |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
4 * Copyright (c) 2005 Nicolas Plourde <nicolasplourde@gmail.com> |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
5 * |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
6 * This file is part of MPlayer. |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
7 * |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
8 * MPlayer is free software; you can redistribute it and/or modify |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
11 * (at your option) any later version. |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
12 * |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
13 * MPlayer is distributed in the hope that it will be useful, |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
16 * GNU General Public License for more details. |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
17 * |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License along |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
19 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
21 */ |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
22 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
23 #ifndef MPLAYER_OSX_OBJC_COMMON_H |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
24 #define MPLAYER_OSX_OBJC_COMMON_H |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
25 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
26 #import <Cocoa/Cocoa.h> |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
27 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
28 @interface MPCommonOpenGLView : NSOpenGLView |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
29 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
30 <NSWindowDelegate> |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
31 #endif |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
32 { |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
33 //Cocoa |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
34 NSWindow *window; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
35 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
36 BOOL mouseHide; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
37 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
38 //menu command id |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
39 NSMenuItem *kHalfScreenCmd; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
40 NSMenuItem *kNormalScreenCmd; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
41 NSMenuItem *kDoubleScreenCmd; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
42 NSMenuItem *kFullScreenCmd; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
43 NSMenuItem *kKeepAspectCmd; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
44 NSMenuItem *kAspectOrgCmd; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
45 NSMenuItem *kAspectFullCmd; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
46 NSMenuItem *kAspectWideCmd; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
47 NSMenuItem *kPanScanCmd; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
48 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
49 //timestamps for disabling screensaver and mouse hiding |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
50 int lastMouseHide; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
51 int lastScreensaverUpdate; |
35091 | 52 |
53 int event_flags; | |
35086
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
54 @public |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
55 float winSizeMult; |
35094 | 56 NSOpenGLContext *glContext; |
35086
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
57 } |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
58 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
59 - (BOOL) acceptsFirstResponder; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
60 - (BOOL) becomeFirstResponder; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
61 - (BOOL) resignFirstResponder; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
62 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
63 //window & rendering |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
64 - (void) preinit; |
36267 | 65 - (void) configWidth: (uint32_t) width height: (uint32_t) height flags: (uint32_t)flags; |
35092 | 66 - (void) drawRect: (NSRect *) bounds; |
35091 | 67 - (void) reshape; |
35086
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
68 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
69 //vo control |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
70 - (void) fullscreen: (BOOL) animate; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
71 - (void) ontop; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
72 - (void) rootwin; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
73 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
74 //menu |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
75 - (void) initMenu; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
76 - (void) menuAction:(id)sender; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
77 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
78 //event |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
79 - (void) keyDown: (NSEvent *) theEvent; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
80 - (void) mouseMoved: (NSEvent *) theEvent; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
81 - (void) mouseDown: (NSEvent *) theEvent; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
82 - (void) mouseUp: (NSEvent *) theEvent; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
83 - (void) rightMouseDown: (NSEvent *) theEvent; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
84 - (void) rightMouseUp: (NSEvent *) theEvent; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
85 - (void) otherMouseDown: (NSEvent *) theEvent; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
86 - (void) otherMouseUp: (NSEvent *) theEvent; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
87 - (void) scrollWheel: (NSEvent *) theEvent; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
88 - (void) mouseEvent: (NSEvent *) theEvent; |
35091 | 89 - (int) check_events; |
35086
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
90 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
91 - (void) update_screen_info; |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
92 @end |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
93 |
8848682f4035
Split out an objective-C common OS X layer, to be reused by -vo gl.
reimar
parents:
diff
changeset
|
94 #endif /* MPLAYER_OSX_OBJC_COMMON_H */ |