[vlc-commits] macosx: split detached vout window from main window

Felix Paul Kühne git at videolan.org
Tue Jan 29 23:34:58 CET 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Tue Jan 29 19:48:46 2019 +0100| [391d26e98d0d2d6a28889d9dd082f1a54ea71f75] | committer: Felix Paul Kühne

macosx: split detached vout window from main window

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=391d26e98d0d2d6a28889d9dd082f1a54ea71f75
---

 .../package/macosx/VLC.xcodeproj/project.pbxproj   |  6 ++++
 modules/gui/macosx/Makefile.am                     |  1 +
 modules/gui/macosx/VLCDetachedVideoWindow.h        | 28 ++++++++++++++++
 modules/gui/macosx/VLCDetachedVideoWindow.m        | 38 ++++++++++++++++++++++
 modules/gui/macosx/VLCMainWindow.h                 |  5 ---
 modules/gui/macosx/VLCMainWindow.m                 | 18 +---------
 modules/gui/macosx/VLCVideoOutputProvider.m        |  1 +
 7 files changed, 75 insertions(+), 22 deletions(-)

diff --git a/extras/package/macosx/VLC.xcodeproj/project.pbxproj b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
index 4df4f3c775..e878b5a495 100644
--- a/extras/package/macosx/VLC.xcodeproj/project.pbxproj
+++ b/extras/package/macosx/VLC.xcodeproj/project.pbxproj
@@ -124,6 +124,7 @@
 		7D2E0EDE20CD206F0033A221 /* VLCVideoWindowCommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D2E0EDD20CD206F0033A221 /* VLCVideoWindowCommon.m */; };
 		7D66D4362200BC340040D04A /* VLCClickerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D66D4352200BC340040D04A /* VLCClickerManager.m */; };
 		7D66D4392200C5B80040D04A /* VLCVideoFilterHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D66D4382200C5B80040D04A /* VLCVideoFilterHelper.m */; };
+		7D66D43C2200D6090040D04A /* VLCDetachedVideoWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D66D43B2200D6090040D04A /* VLCDetachedVideoWindow.m */; };
 		7DB40D2A20CBCEB500F63173 /* VLCMainMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DB40D2920CBCEB500F63173 /* VLCMainMenu.m */; };
 		7DB40D2D20CBCEC200F63173 /* VLCStatusBarIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DB40D2B20CBCEC200F63173 /* VLCStatusBarIcon.m */; };
 		7DB7F1EC20CC036D00C2CAED /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DB7F1EB20CC036D00C2CAED /* AudioUnit.framework */; };
@@ -443,6 +444,8 @@
 		7D66D4352200BC340040D04A /* VLCClickerManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCClickerManager.m; sourceTree = "<group>"; };
 		7D66D4372200C5B80040D04A /* VLCVideoFilterHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCVideoFilterHelper.h; sourceTree = "<group>"; };
 		7D66D4382200C5B80040D04A /* VLCVideoFilterHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCVideoFilterHelper.m; sourceTree = "<group>"; };
+		7D66D43A2200D6090040D04A /* VLCDetachedVideoWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCDetachedVideoWindow.h; sourceTree = "<group>"; };
+		7D66D43B2200D6090040D04A /* VLCDetachedVideoWindow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCDetachedVideoWindow.m; sourceTree = "<group>"; };
 		7D871D371B5E6844000B56C0 /* VLCMain+OldPrefs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VLCMain+OldPrefs.h"; sourceTree = "<group>"; };
 		7D871D381B5E6844000B56C0 /* VLCMain+OldPrefs.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "VLCMain+OldPrefs.m"; sourceTree = "<group>"; };
 		7D871D391B5E684D000B56C0 /* helpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = helpers.h; sourceTree = "<group>"; };
@@ -973,6 +976,8 @@
 				7D2E0ED920CD204D0033A221 /* VLCWindow.m */,
 				7D2E0EDC20CD206F0033A221 /* VLCVideoWindowCommon.h */,
 				7D2E0EDD20CD206F0033A221 /* VLCVideoWindowCommon.m */,
+				7D66D43A2200D6090040D04A /* VLCDetachedVideoWindow.h */,
+				7D66D43B2200D6090040D04A /* VLCDetachedVideoWindow.m */,
 			);
 			name = Windows;
 			sourceTree = "<group>";
@@ -1632,6 +1637,7 @@
 				1C3113F31E508C7600D4DD76 /* VLCRendererMenuController.m in Sources */,
 				6B4D50931E7979CB004479B5 /* VLCSimplePrefsWindow.m in Sources */,
 				6B397C4F216C8EB200403ED0 /* NSString+Helpers.m in Sources */,
+				7D66D43C2200D6090040D04A /* VLCDetachedVideoWindow.m in Sources */,
 				1C31138E1E508C6900D4DD76 /* VLCAboutWindowController.m in Sources */,
 				1C3113901E508C6900D4DD76 /* VLCHelpWindowController.m in Sources */,
 				1C3113921E508C6900D4DD76 /* VLCAddonListItem.m in Sources */,
diff --git a/modules/gui/macosx/Makefile.am b/modules/gui/macosx/Makefile.am
index 4d543ae115..bb8a70b275 100644
--- a/modules/gui/macosx/Makefile.am
+++ b/modules/gui/macosx/Makefile.am
@@ -91,6 +91,7 @@ libmacosx_plugin_la_SOURCES = \
 	gui/macosx/VLCInputManager.h gui/macosx/VLCInputManager.m \
 	gui/macosx/VLCRemoteControlService.h gui/macosx/VLCRemoteControlService.m \
 	gui/macosx/VLCMainWindow.h gui/macosx/VLCMainWindow.m \
+	gui/macosx/VLCDetachedVideoWindow.h gui/macosx/VLCDetachedVideoWindow.m \
 	gui/macosx/VLCRendererDiscovery.h gui/macosx/VLCRendererDiscovery.m \
 	gui/macosx/VLCRendererItem.h gui/macosx/VLCRendererItem.m \
 	gui/macosx/VLCRendererMenuController.h gui/macosx/VLCRendererMenuController.m \
diff --git a/modules/gui/macosx/VLCDetachedVideoWindow.h b/modules/gui/macosx/VLCDetachedVideoWindow.h
new file mode 100644
index 0000000000..4a69ee0446
--- /dev/null
+++ b/modules/gui/macosx/VLCDetachedVideoWindow.h
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * VLCDetachedVideoWindow.m: MacOS X interface module
+ *****************************************************************************
+ * Copyright (C) 2002-2019 VLC authors and VideoLAN
+ *
+ * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
+ *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#import "VLCVideoWindowCommon.h"
+
+ at interface VLCDetachedVideoWindow : VLCVideoWindowCommon
+
+ at end
diff --git a/modules/gui/macosx/VLCDetachedVideoWindow.m b/modules/gui/macosx/VLCDetachedVideoWindow.m
new file mode 100644
index 0000000000..046ee6b483
--- /dev/null
+++ b/modules/gui/macosx/VLCDetachedVideoWindow.m
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * VLCDetachedVideoWindow.m: MacOS X interface module
+ *****************************************************************************
+ * Copyright (C) 2002-2019 VLC authors and VideoLAN
+ *
+ * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
+ *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#import "VLCDetachedVideoWindow.h"
+#import "VLCControlsBarCommon.h"
+
+ at implementation VLCDetachedVideoWindow
+
+- (void)awakeFromNib
+{
+    // sets lion fullscreen behaviour
+    [super awakeFromNib];
+    [self setAcceptsMouseMovedEvents: YES];
+
+    [self setContentMinSize: NSMakeSize(363., f_min_video_height + [[self controlsBar] height])];
+}
+
+ at end
diff --git a/modules/gui/macosx/VLCMainWindow.h b/modules/gui/macosx/VLCMainWindow.h
index 7c89f7241e..3330407221 100644
--- a/modules/gui/macosx/VLCMainWindow.h
+++ b/modules/gui/macosx/VLCMainWindow.h
@@ -33,7 +33,6 @@
 #import "misc.h"
 #import "VLCFSPanelController.h"
 
- at class VLCDetachedVideoWindow;
 @class VLCMainWindowControlsBar;
 @class VLCVoutView;
 @class PXSourceList;
@@ -124,7 +123,3 @@ typedef enum {
 - (void)setVideoplayEnabled;
 
 @end
-
- at interface VLCDetachedVideoWindow : VLCVideoWindowCommon
-
- at end
diff --git a/modules/gui/macosx/VLCMainWindow.m b/modules/gui/macosx/VLCMainWindow.m
index 54e145503c..c29eaecf3d 100644
--- a/modules/gui/macosx/VLCMainWindow.m
+++ b/modules/gui/macosx/VLCMainWindow.m
@@ -49,7 +49,7 @@
 #import "VLCMainWindowControlsBar.h"
 #import "VLCVoutView.h"
 #import "VLCVideoOutputProvider.h"
-
+#import "VLCDetachedVideoWindow.h"
 
 @interface VLCMainWindow() <PXSourceListDataSource, PXSourceListDelegate, NSOutlineViewDataSource, NSOutlineViewDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate>
 {
@@ -1186,19 +1186,3 @@ static const float f_min_window_height = 307.;
 }
 
 @end
-
- at interface VLCDetachedVideoWindow ()
- at end
-
- at implementation VLCDetachedVideoWindow
-
-- (void)awakeFromNib
-{
-    // sets lion fullscreen behaviour
-    [super awakeFromNib];
-    [self setAcceptsMouseMovedEvents: YES];
-
-    [self setContentMinSize: NSMakeSize(363., f_min_video_height + [[self controlsBar] height])];
-}
-
- at end
diff --git a/modules/gui/macosx/VLCVideoOutputProvider.m b/modules/gui/macosx/VLCVideoOutputProvider.m
index 1fb6a73e8b..c1748f40ab 100644
--- a/modules/gui/macosx/VLCVideoOutputProvider.m
+++ b/modules/gui/macosx/VLCVideoOutputProvider.m
@@ -27,6 +27,7 @@
 #import "VLCVideoOutputProvider.h"
 #import "VLCMain.h"
 #import "VLCMainWindow.h"
+#import "VLCDetachedVideoWindow.h"
 #import "VLCVoutView.h"
 
 #import "VLCVideoEffectsWindowController.h"



More information about the vlc-commits mailing list