macosx: Add a new fullscreen controller
authorMarvin Scholz <epirat07@gmail.com>
Mon, 3 Oct 2016 10:01:52 +0000 (12:01 +0200)
committerMarvin Scholz <epirat07@gmail.com>
Sun, 30 Oct 2016 21:44:29 +0000 (22:44 +0100)
This introduces a new fullscreen controller
which uses NSVisualEffectView for it's background
and the icons that are used throughout the rest of
the macOS user interface, hence making it more
consistent with the overall look of VLC.

Additionally the new fullscreen controller is
resizable and, as it already used to be, can be
move around on the screen.

The user interface is now described in a interface
builder file (xib) instead of doing everything in
code. This allows easy usage of autolayout, which
is heavily used to allow adaption of the
buttons/sliders depending on the panel width and
height.

16 files changed:
Makefile.am
extras/package/macosx/Resources/Button-Icons/VLCBackwardTemplate.pdf [new file with mode: 0644]
extras/package/macosx/Resources/Button-Icons/VLCForwardTemplate.pdf [new file with mode: 0644]
extras/package/macosx/Resources/Button-Icons/VLCFullscreenOffTemplate.pdf [new file with mode: 0644]
extras/package/macosx/Resources/Button-Icons/VLCFullscreenOnTemplate.pdf [new file with mode: 0644]
extras/package/macosx/Resources/Button-Icons/VLCVolumeOffTemplate.pdf [new file with mode: 0644]
extras/package/macosx/Resources/Button-Icons/VLCVolumeOnTemplate.pdf [new file with mode: 0644]
extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib [new file with mode: 0644]
extras/package/macosx/Resources/vlcmenubaricon/VLCPlayTemplate.pdf
extras/package/macosx/vlc.xcodeproj/project.pbxproj
modules/gui/macosx/Makefile.am
modules/gui/macosx/VLCFSPanelController.h [new file with mode: 0644]
modules/gui/macosx/VLCFSPanelController.m [new file with mode: 0644]
modules/gui/macosx/VLCMainWindow.h
modules/gui/macosx/VLCMainWindow.m
modules/gui/macosx/Windows.m

index c5c24cd..eef85cd 100644 (file)
@@ -162,6 +162,7 @@ EXTRA_DIST += \
        extras/package/macosx/Resources/English.lproj/VideoEffects.xib \
        extras/package/macosx/Resources/English.lproj/VLCStatusBarIconMainMenu.xib \
        extras/package/macosx/Resources/English.lproj/VLCRendererDialog.xib \
+       extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib \
        extras/package/macosx/Resources/fspanel/fs_background.png \
        extras/package/macosx/Resources/fspanel/fs_background@2x.png \
        extras/package/macosx/Resources/fspanel/fs_exit_fullscreen.png \
@@ -863,6 +864,12 @@ EXTRA_DIST += \
        extras/package/macosx/Resources/vlcmenubaricon/VLCPreviousTemplate.pdf \
        extras/package/macosx/Resources/vlcmenubaricon/VLCShuffleTemplate.pdf \
        extras/package/macosx/Resources/vlcmenubaricon/VLCStatusBarIcon.pdf \
+       extras/package/macosx/Resources/Button-Icons/VLCBackwardTemplate.pdf \
+       extras/package/macosx/Resources/Button-Icons/VLCForwardTemplate.pdf \
+       extras/package/macosx/Resources/Button-Icons/VLCVolumeOnTemplate.pdf \
+       extras/package/macosx/Resources/Button-Icons/VLCVolumeOffTemplate.pdf \
+       extras/package/macosx/Resources/Button-Icons/VLCVolumeOnTemplate.pdf \
+       extras/package/macosx/Resources/Button-Icons/VLCVolumeOffTemplate.pdf \
        extras/package/macosx/Resources/vlc.scriptSuite \
        extras/package/macosx/Resources/vlc.scriptTerminology \
        extras/package/macosx/ub.sh \
diff --git a/extras/package/macosx/Resources/Button-Icons/VLCBackwardTemplate.pdf b/extras/package/macosx/Resources/Button-Icons/VLCBackwardTemplate.pdf
new file mode 100644 (file)
index 0000000..d8c49df
Binary files /dev/null and b/extras/package/macosx/Resources/Button-Icons/VLCBackwardTemplate.pdf differ
diff --git a/extras/package/macosx/Resources/Button-Icons/VLCForwardTemplate.pdf b/extras/package/macosx/Resources/Button-Icons/VLCForwardTemplate.pdf
new file mode 100644 (file)
index 0000000..54135e0
Binary files /dev/null and b/extras/package/macosx/Resources/Button-Icons/VLCForwardTemplate.pdf differ
diff --git a/extras/package/macosx/Resources/Button-Icons/VLCFullscreenOffTemplate.pdf b/extras/package/macosx/Resources/Button-Icons/VLCFullscreenOffTemplate.pdf
new file mode 100644 (file)
index 0000000..e14daf4
Binary files /dev/null and b/extras/package/macosx/Resources/Button-Icons/VLCFullscreenOffTemplate.pdf differ
diff --git a/extras/package/macosx/Resources/Button-Icons/VLCFullscreenOnTemplate.pdf b/extras/package/macosx/Resources/Button-Icons/VLCFullscreenOnTemplate.pdf
new file mode 100644 (file)
index 0000000..cf922da
Binary files /dev/null and b/extras/package/macosx/Resources/Button-Icons/VLCFullscreenOnTemplate.pdf differ
diff --git a/extras/package/macosx/Resources/Button-Icons/VLCVolumeOffTemplate.pdf b/extras/package/macosx/Resources/Button-Icons/VLCVolumeOffTemplate.pdf
new file mode 100644 (file)
index 0000000..d079fc8
Binary files /dev/null and b/extras/package/macosx/Resources/Button-Icons/VLCVolumeOffTemplate.pdf differ
diff --git a/extras/package/macosx/Resources/Button-Icons/VLCVolumeOnTemplate.pdf b/extras/package/macosx/Resources/Button-Icons/VLCVolumeOnTemplate.pdf
new file mode 100644 (file)
index 0000000..662fb40
Binary files /dev/null and b/extras/package/macosx/Resources/Button-Icons/VLCVolumeOnTemplate.pdf differ
diff --git a/extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib b/extras/package/macosx/Resources/English.lproj/VLCFullScreenPanel.xib
new file mode 100644 (file)
index 0000000..75d49a3
--- /dev/null
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11201"/>
+        <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
+        <capability name="system font weights other than Regular or Bold" minToolsVersion="7.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="VLCFSPanelController">
+            <connections>
+                <outlet property="backwardButton" destination="7QH-jb-QdM" id="VnK-HH-sNu"/>
+                <outlet property="controllsView" destination="Npt-C5-K77" id="LzR-iZ-qy0"/>
+                <outlet property="elapsedTime" destination="nJc-M4-sMF" id="DFf-yw-e6A"/>
+                <outlet property="forwardButton" destination="jSN-hV-r5D" id="3PN-jP-xPY"/>
+                <outlet property="mediaTitle" destination="Vd8-0f-Usz" id="NZ0-KY-l4T"/>
+                <outlet property="nextButton" destination="2ai-dB-Wpq" id="Axl-RO-LfI"/>
+                <outlet property="playPauseButton" destination="YSL-bH-k6U" id="I6W-Cy-q85"/>
+                <outlet property="previousButton" destination="TVM-DT-2yo" id="yKP-tY-0j2"/>
+                <outlet property="remainingOrTotalTime" destination="T3x-es-c7v" id="7qI-yb-OUT"/>
+                <outlet property="timeSlider" destination="f9T-Kg-gn6" id="Zc0-RY-bsd"/>
+                <outlet property="volumeSlider" destination="Ihl-7x-5mN" id="WGR-5h-Y9H"/>
+                <outlet property="window" destination="a2r-mH-Iqe" id="Hd9-Q4-8sG"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <window title="Fullscreen Controlls" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hasShadow="NO" hidesOnDeactivate="YES" oneShot="NO" showsToolbarButton="NO" visibleAtLaunch="NO" frameAutosaveName="VLCFullscreenControls" animationBehavior="default" id="a2r-mH-Iqe">
+            <windowCollectionBehavior key="collectionBehavior" fullScreenAuxiliary="YES" fullScreenDisallowsTiling="YES"/>
+            <windowPositionMask key="initialPositionMask" bottomStrut="YES"/>
+            <rect key="contentRect" x="376" y="105" width="480" height="80"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
+            <value key="minSize" type="size" width="480" height="60"/>
+            <value key="maxSize" type="size" width="4068" height="90"/>
+            <view key="contentView" id="Npt-C5-K77">
+                <rect key="frame" x="0.0" y="0.0" width="480" height="80"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="VLH-qy-cwr">
+                        <rect key="frame" x="0.0" y="0.0" width="480" height="42"/>
+                        <subviews>
+                            <button translatesAutoresizingMaskIntoConstraints="NO" id="YSL-bH-k6U">
+                                <rect key="frame" x="226" y="7" width="35" height="29"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" secondItem="YSL-bH-k6U" secondAttribute="height" multiplier="1:1" constant="6" id="2if-S8-t0u"/>
+                                </constraints>
+                                <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="VLCPlayTemplate" imagePosition="overlaps" alignment="center" alternateImage="VLCPauseTemplate" imageScaling="proportionallyUpOrDown" inset="2" id="IvT-4x-6Go">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                                <connections>
+                                    <action selector="togglePlayPause:" target="-2" id="9os-DP-jAN"/>
+                                </connections>
+                            </button>
+                            <button translatesAutoresizingMaskIntoConstraints="NO" id="jSN-hV-r5D">
+                                <rect key="frame" x="263" y="7" width="34" height="29"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" secondItem="jSN-hV-r5D" secondAttribute="height" multiplier="19:16" id="m1w-9i-bkp"/>
+                                </constraints>
+                                <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="VLCForwardTemplate" imagePosition="only" alignment="center" continuous="YES" imageScaling="proportionallyUpOrDown" inset="2" id="i5R-0v-MD5">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                                <connections>
+                                    <action selector="jumpForward:" target="-2" id="bjn-qc-BJ7"/>
+                                </connections>
+                            </button>
+                            <button translatesAutoresizingMaskIntoConstraints="NO" id="7QH-jb-QdM">
+                                <rect key="frame" x="189" y="7" width="35" height="29"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" secondItem="7QH-jb-QdM" secondAttribute="height" multiplier="19:16" id="isk-o2-kZY"/>
+                                </constraints>
+                                <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="VLCBackwardTemplate" imagePosition="only" alignment="center" continuous="YES" imageScaling="proportionallyUpOrDown" inset="2" id="kH8-lS-ZyV">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                                <connections>
+                                    <action selector="jumpBackward:" target="-2" id="ft8-Or-fZy"/>
+                                </connections>
+                            </button>
+                            <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ihl-7x-5mN">
+                                <rect key="frame" x="50" y="13" width="80" height="16"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="15" id="2ZX-Ma-yc0"/>
+                                    <constraint firstAttribute="width" relation="lessThanOrEqual" constant="80" id="qcW-zc-UJI"/>
+                                    <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="50" id="zHK-AF-Ru9"/>
+                                </constraints>
+                                <sliderCell key="cell" controlSize="mini" continuous="YES" state="on" alignment="left" maxValue="100" doubleValue="50" tickMarkPosition="above" sliderType="linear" id="L1r-AD-Y0K"/>
+                                <connections>
+                                    <action selector="volumeSliderUpdate:" target="-2" id="doI-qM-Pde"/>
+                                </connections>
+                            </slider>
+                            <button translatesAutoresizingMaskIntoConstraints="NO" id="2ai-dB-Wpq">
+                                <rect key="frame" x="299" y="7" width="34" height="29"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" secondItem="2ai-dB-Wpq" secondAttribute="height" multiplier="19:16" id="Itj-7f-YDa"/>
+                                </constraints>
+                                <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="VLCNextTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="gqA-yG-zOb">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                                <connections>
+                                    <action selector="gotoNext:" target="-2" id="flJ-52-Pcb"/>
+                                </connections>
+                            </button>
+                            <button translatesAutoresizingMaskIntoConstraints="NO" id="TVM-DT-2yo">
+                                <rect key="frame" x="153" y="7" width="34" height="29"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" secondItem="TVM-DT-2yo" secondAttribute="height" multiplier="19:16" id="oKb-iw-6S1"/>
+                                </constraints>
+                                <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="VLCPreviousTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="ykW-vZ-DAm">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                                <connections>
+                                    <action selector="gotoPrevious:" target="-2" id="4p6-Eg-e9d"/>
+                                </connections>
+                            </button>
+                            <button translatesAutoresizingMaskIntoConstraints="NO" id="iYd-wn-Bnl">
+                                <rect key="frame" x="20" y="14" width="25" height="14"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="10" id="Ccf-qh-Z4p"/>
+                                    <constraint firstAttribute="width" constant="25" id="yjy-it-Bea"/>
+                                </constraints>
+                                <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="VLCVolumeOnTemplate" imagePosition="only" alignment="center" alternateImage="VLCVolumeOffTemplate" imageScaling="proportionallyUpOrDown" inset="2" id="KZQ-HO-iWj">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                            </button>
+                            <button translatesAutoresizingMaskIntoConstraints="NO" id="C5K-aX-3aJ">
+                                <rect key="frame" x="438" y="10" width="22" height="22"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" secondItem="C5K-aX-3aJ" secondAttribute="height" multiplier="1:1" id="VWl-0x-p1I"/>
+                                </constraints>
+                                <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="VLCFullscreenOnTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="0tH-cP-VqB">
+                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                    <font key="font" metaFont="system"/>
+                                </buttonCell>
+                                <connections>
+                                    <action selector="toggleFullscreen:" target="-2" id="rLd-CX-M6u"/>
+                                </connections>
+                            </button>
+                        </subviews>
+                        <constraints>
+                            <constraint firstAttribute="bottom" secondItem="C5K-aX-3aJ" secondAttribute="bottom" constant="10" id="9hx-OK-TYA"/>
+                            <constraint firstItem="Ihl-7x-5mN" firstAttribute="centerY" secondItem="VLH-qy-cwr" secondAttribute="centerY" id="AlO-aJ-1Je"/>
+                            <constraint firstItem="YSL-bH-k6U" firstAttribute="leading" secondItem="7QH-jb-QdM" secondAttribute="trailing" constant="2" id="CeI-3j-0dg"/>
+                            <constraint firstItem="2ai-dB-Wpq" firstAttribute="leading" secondItem="jSN-hV-r5D" secondAttribute="trailing" constant="2" id="H1a-Fw-P0C"/>
+                            <constraint firstItem="jSN-hV-r5D" firstAttribute="top" secondItem="VLH-qy-cwr" secondAttribute="top" constant="6" id="M4G-Sz-X3l"/>
+                            <constraint firstItem="YSL-bH-k6U" firstAttribute="top" secondItem="VLH-qy-cwr" secondAttribute="top" constant="6" id="QnM-aB-bM3"/>
+                            <constraint firstAttribute="bottom" secondItem="TVM-DT-2yo" secondAttribute="bottom" constant="7" id="RYT-zW-Br7"/>
+                            <constraint firstItem="2ai-dB-Wpq" firstAttribute="top" secondItem="VLH-qy-cwr" secondAttribute="top" constant="6" id="SQA-fK-Mpa"/>
+                            <constraint firstItem="TVM-DT-2yo" firstAttribute="leading" secondItem="Ihl-7x-5mN" secondAttribute="trailing" priority="250" constant="20" id="UBD-5x-a7g"/>
+                            <constraint firstAttribute="bottom" secondItem="YSL-bH-k6U" secondAttribute="bottom" constant="7" id="Wu7-Pv-Dqf"/>
+                            <constraint firstItem="TVM-DT-2yo" firstAttribute="top" secondItem="VLH-qy-cwr" secondAttribute="top" constant="6" id="YDA-hw-CAe"/>
+                            <constraint firstAttribute="bottom" secondItem="2ai-dB-Wpq" secondAttribute="bottom" constant="7" id="ae5-nP-phG"/>
+                            <constraint firstAttribute="bottom" secondItem="7QH-jb-QdM" secondAttribute="bottom" constant="7" id="bFr-EA-byV"/>
+                            <constraint firstAttribute="bottom" secondItem="jSN-hV-r5D" secondAttribute="bottom" constant="7" id="de6-Gd-Mn7"/>
+                            <constraint firstItem="iYd-wn-Bnl" firstAttribute="top" secondItem="VLH-qy-cwr" secondAttribute="top" constant="14" id="ioy-Pv-ElU"/>
+                            <constraint firstItem="7QH-jb-QdM" firstAttribute="top" secondItem="VLH-qy-cwr" secondAttribute="top" constant="6" id="n70-bj-Orj"/>
+                            <constraint firstItem="iYd-wn-Bnl" firstAttribute="leading" secondItem="VLH-qy-cwr" secondAttribute="leading" constant="20" id="pMX-wi-DB4"/>
+                            <constraint firstAttribute="bottom" secondItem="iYd-wn-Bnl" secondAttribute="bottom" constant="14" id="rdI-uU-xtV"/>
+                            <constraint firstItem="YSL-bH-k6U" firstAttribute="centerX" secondItem="VLH-qy-cwr" secondAttribute="centerX" constant="3.5" id="sGc-io-ure"/>
+                            <constraint firstAttribute="trailing" secondItem="C5K-aX-3aJ" secondAttribute="trailing" constant="20" id="sHZ-rt-hX0"/>
+                            <constraint firstItem="jSN-hV-r5D" firstAttribute="leading" secondItem="YSL-bH-k6U" secondAttribute="trailing" constant="2" id="sb6-YO-6fS"/>
+                            <constraint firstItem="Ihl-7x-5mN" firstAttribute="leading" secondItem="iYd-wn-Bnl" secondAttribute="trailing" constant="5" id="sbi-nB-Ucp"/>
+                            <constraint firstItem="7QH-jb-QdM" firstAttribute="leading" secondItem="TVM-DT-2yo" secondAttribute="trailing" constant="2" id="v6c-zz-7Sx"/>
+                            <constraint firstItem="C5K-aX-3aJ" firstAttribute="top" secondItem="VLH-qy-cwr" secondAttribute="top" constant="10" id="yLu-H1-w7g"/>
+                        </constraints>
+                    </customView>
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nJc-M4-sMF" customClass="VLCTimeField">
+                        <rect key="frame" x="18" y="57" width="79" height="14"/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="75" id="IGO-bJ-xu2"/>
+                            <constraint firstAttribute="height" constant="14" id="pcR-j4-JCD"/>
+                        </constraints>
+                        <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="left" title="0:00" id="ebb-BZ-1l4">
+                            <font key="font" metaFont="systemThin" size="11"/>
+                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="T3x-es-c7v" customClass="VLCTimeField">
+                        <rect key="frame" x="383" y="57" width="79" height="14"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="14" id="a6B-fU-pHt"/>
+                            <constraint firstAttribute="width" constant="75" id="m9r-7l-uQt"/>
+                        </constraints>
+                        <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="right" placeholderString="∞" id="PYh-Xz-irE">
+                            <font key="font" metaFont="systemThin" size="11"/>
+                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Vd8-0f-Usz">
+                        <rect key="frame" x="98" y="57" width="284" height="14"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="14" id="SsE-i5-v4k"/>
+                        </constraints>
+                        <textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingTail" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="center" placeholderString="Nothing Playing" usesSingleLineMode="YES" id="uA0-hc-yIU">
+                            <font key="font" metaFont="systemThin" size="11"/>
+                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
+                    <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="f9T-Kg-gn6">
+                        <rect key="frame" x="20" y="39" width="440" height="17"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="15" id="lag-bs-Ziy"/>
+                        </constraints>
+                        <sliderCell key="cell" controlSize="small" continuous="YES" state="on" alignment="left" maxValue="10000" tickMarkPosition="above" sliderType="linear" id="OBM-DB-OBK"/>
+                        <connections>
+                            <action selector="timeSliderUpdate:" target="-2" id="6Na-ur-p5P"/>
+                        </connections>
+                    </slider>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="T3x-es-c7v" firstAttribute="leading" secondItem="Vd8-0f-Usz" secondAttribute="trailing" constant="5" id="1vL-HQ-doh"/>
+                    <constraint firstItem="VLH-qy-cwr" firstAttribute="leading" secondItem="Npt-C5-K77" secondAttribute="leading" id="AXK-9N-Zst"/>
+                    <constraint firstItem="VLH-qy-cwr" firstAttribute="top" secondItem="Npt-C5-K77" secondAttribute="top" constant="38" id="FRE-MB-iBT"/>
+                    <constraint firstItem="f9T-Kg-gn6" firstAttribute="leading" secondItem="Npt-C5-K77" secondAttribute="leading" constant="20" id="Ibl-1I-f2u"/>
+                    <constraint firstItem="f9T-Kg-gn6" firstAttribute="top" secondItem="Npt-C5-K77" secondAttribute="top" constant="25" id="N8D-Lc-aKn"/>
+                    <constraint firstItem="f9T-Kg-gn6" firstAttribute="top" secondItem="nJc-M4-sMF" secondAttribute="bottom" constant="2" id="Pix-DL-2C0"/>
+                    <constraint firstItem="f9T-Kg-gn6" firstAttribute="top" secondItem="T3x-es-c7v" secondAttribute="bottom" constant="2" id="S1j-CH-Xvt"/>
+                    <constraint firstItem="Vd8-0f-Usz" firstAttribute="leading" secondItem="nJc-M4-sMF" secondAttribute="trailing" constant="5" id="SvX-6Y-TRg"/>
+                    <constraint firstAttribute="trailing" secondItem="f9T-Kg-gn6" secondAttribute="trailing" constant="20" id="TIT-A8-rRx"/>
+                    <constraint firstItem="f9T-Kg-gn6" firstAttribute="top" secondItem="Vd8-0f-Usz" secondAttribute="bottom" constant="2" id="dwA-kL-5MW"/>
+                    <constraint firstAttribute="bottom" secondItem="VLH-qy-cwr" secondAttribute="bottom" id="oFk-fv-UiZ"/>
+                    <constraint firstItem="nJc-M4-sMF" firstAttribute="leading" secondItem="Npt-C5-K77" secondAttribute="leading" constant="20" id="r2T-tn-CTU"/>
+                    <constraint firstAttribute="trailing" secondItem="VLH-qy-cwr" secondAttribute="trailing" id="rxJ-QQ-cyy"/>
+                    <constraint firstAttribute="trailing" secondItem="T3x-es-c7v" secondAttribute="trailing" constant="20" id="ykz-Sa-B1m"/>
+                </constraints>
+            </view>
+            <connections>
+                <outlet property="delegate" destination="-2" id="3Re-S7-TmJ"/>
+            </connections>
+            <point key="canvasLocation" x="139" y="257"/>
+        </window>
+        <userDefaultsController representsSharedInstance="YES" id="hMn-b4-4vy"/>
+    </objects>
+    <resources>
+        <image name="VLCBackwardTemplate" width="128" height="128"/>
+        <image name="VLCForwardTemplate" width="128" height="128"/>
+        <image name="VLCFullscreenOnTemplate" width="128" height="128"/>
+        <image name="VLCNextTemplate" width="128" height="128"/>
+        <image name="VLCPauseTemplate" width="128" height="128"/>
+        <image name="VLCPlayTemplate" width="128" height="128"/>
+        <image name="VLCPreviousTemplate" width="128" height="128"/>
+        <image name="VLCVolumeOffTemplate" width="128" height="128"/>
+        <image name="VLCVolumeOnTemplate" width="128" height="128"/>
+    </resources>
+</document>
index 7503d68..58977bc 100644 (file)
Binary files a/extras/package/macosx/Resources/vlcmenubaricon/VLCPlayTemplate.pdf and b/extras/package/macosx/Resources/vlcmenubaricon/VLCPlayTemplate.pdf differ
index f6523ae..ee9aa96 100644 (file)
                6B846FE61CF5D88C00112E54 /* VLCHUDRadiobuttonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B846FE11CF5D88C00112E54 /* VLCHUDRadiobuttonCell.m */; };
                6B846FE71CF5D88C00112E54 /* VLCHUDSliderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B846FE31CF5D88C00112E54 /* VLCHUDSliderCell.m */; };
                6B846FEB1CF5DBFF00112E54 /* VLCHUDTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B846FEA1CF5DBFF00112E54 /* VLCHUDTextFieldCell.m */; };
+               6B8CD3FC1DA2D3590087C27A /* VLCBackwardTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 6B8CD3FA1DA2D3590087C27A /* VLCBackwardTemplate.pdf */; };
+               6B8CD3FD1DA2D3590087C27A /* VLCForwardTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 6B8CD3FB1DA2D3590087C27A /* VLCForwardTemplate.pdf */; };
+               6B8CD4001DA2FE7C0087C27A /* VLCVolumeOffTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 6B8CD3FE1DA2FE7C0087C27A /* VLCVolumeOffTemplate.pdf */; };
+               6B8CD4011DA2FE7C0087C27A /* VLCVolumeOnTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 6B8CD3FF1DA2FE7C0087C27A /* VLCVolumeOnTemplate.pdf */; };
+               6B8CD4041DA304050087C27A /* VLCFullscreenOffTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 6B8CD4021DA304050087C27A /* VLCFullscreenOffTemplate.pdf */; };
+               6B8CD4051DA304050087C27A /* VLCFullscreenOnTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 6B8CD4031DA304050087C27A /* VLCFullscreenOnTemplate.pdf */; };
                6BBBB8AA1D108A17001BD9BA /* VLCRendererDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BBBB8A81D108A17001BD9BA /* VLCRendererDialog.m */; };
                6BBBB8B41D112BAC001BD9BA /* VLCRendererItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BBBB8B11D10A994001BD9BA /* VLCRendererItem.m */; };
                6BBBB8B71D114628001BD9BA /* VLCRendererDiscovery.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BBBB8B61D114628001BD9BA /* VLCRendererDiscovery.m */; };
                6BBBB8B81D12AF72001BD9BA /* VLCRendererDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6BBBB8AC1D108A87001BD9BA /* VLCRendererDialog.xib */; };
+               6BCB590C1DA247CD009BCA66 /* VLCFSPanelController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BCB590A1DA247CD009BCA66 /* VLCFSPanelController.m */; };
+               6BCB59111DA25799009BCA66 /* VLCFullScreenPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6BCB590E1DA2482A009BCA66 /* VLCFullScreenPanel.xib */; };
                7D3F6525188051F2005776C4 /* BWQuincyMain.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D3F6523188051F2005776C4 /* BWQuincyMain.xib */; };
                7D5678ED1D5BA1DC002698F3 /* VLCApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D5678EC1D5BA1DC002698F3 /* VLCApplication.m */; };
                7D5678F01D5BA397002698F3 /* VLCMainWindowControlsBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D5678EF1D5BA397002698F3 /* VLCMainWindowControlsBar.m */; };
                6B846FE31CF5D88C00112E54 /* VLCHUDSliderCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCHUDSliderCell.m; path = ../../../modules/gui/macosx/VLCHUDSliderCell.m; sourceTree = "<group>"; };
                6B846FE91CF5DBFF00112E54 /* VLCHUDTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCHUDTextFieldCell.h; path = ../../../modules/gui/macosx/VLCHUDTextFieldCell.h; sourceTree = "<group>"; };
                6B846FEA1CF5DBFF00112E54 /* VLCHUDTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCHUDTextFieldCell.m; path = ../../../modules/gui/macosx/VLCHUDTextFieldCell.m; sourceTree = "<group>"; };
+               6B8CD3FA1DA2D3590087C27A /* VLCBackwardTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = VLCBackwardTemplate.pdf; path = "Resources/Button-Icons/VLCBackwardTemplate.pdf"; sourceTree = "<group>"; };
+               6B8CD3FB1DA2D3590087C27A /* VLCForwardTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = VLCForwardTemplate.pdf; path = "Resources/Button-Icons/VLCForwardTemplate.pdf"; sourceTree = "<group>"; };
+               6B8CD3FE1DA2FE7C0087C27A /* VLCVolumeOffTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = VLCVolumeOffTemplate.pdf; path = "Resources/Button-Icons/VLCVolumeOffTemplate.pdf"; sourceTree = "<group>"; };
+               6B8CD3FF1DA2FE7C0087C27A /* VLCVolumeOnTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = VLCVolumeOnTemplate.pdf; path = "Resources/Button-Icons/VLCVolumeOnTemplate.pdf"; sourceTree = "<group>"; };
+               6B8CD4021DA304050087C27A /* VLCFullscreenOffTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = VLCFullscreenOffTemplate.pdf; path = "Resources/Button-Icons/VLCFullscreenOffTemplate.pdf"; sourceTree = "<group>"; };
+               6B8CD4031DA304050087C27A /* VLCFullscreenOnTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = VLCFullscreenOnTemplate.pdf; path = "Resources/Button-Icons/VLCFullscreenOnTemplate.pdf"; sourceTree = "<group>"; };
                6BBBB8A71D108A17001BD9BA /* VLCRendererDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCRendererDialog.h; path = ../../../modules/gui/macosx/VLCRendererDialog.h; sourceTree = "<group>"; };
                6BBBB8A81D108A17001BD9BA /* VLCRendererDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCRendererDialog.m; path = ../../../modules/gui/macosx/VLCRendererDialog.m; sourceTree = "<group>"; };
                6BBBB8AD1D108A87001BD9BA /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/VLCRendererDialog.xib; sourceTree = "<group>"; };
                6BBBB8B11D10A994001BD9BA /* VLCRendererItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCRendererItem.m; path = ../../../modules/gui/macosx/VLCRendererItem.m; sourceTree = "<group>"; };
                6BBBB8B51D114628001BD9BA /* VLCRendererDiscovery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCRendererDiscovery.h; path = ../../../modules/gui/macosx/VLCRendererDiscovery.h; sourceTree = "<group>"; };
                6BBBB8B61D114628001BD9BA /* VLCRendererDiscovery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCRendererDiscovery.m; path = ../../../modules/gui/macosx/VLCRendererDiscovery.m; sourceTree = "<group>"; };
+               6BCB59091DA247CD009BCA66 /* VLCFSPanelController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCFSPanelController.h; path = ../../../modules/gui/macosx/VLCFSPanelController.h; sourceTree = "<group>"; };
+               6BCB590A1DA247CD009BCA66 /* VLCFSPanelController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCFSPanelController.m; path = ../../../modules/gui/macosx/VLCFSPanelController.m; sourceTree = "<group>"; };
+               6BCB590F1DA2482A009BCA66 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/VLCFullScreenPanel.xib; sourceTree = "<group>"; };
                7D3F6524188051F2005776C4 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/BWQuincyMain.xib; sourceTree = "<group>"; };
                7D3F652618805297005776C4 /* BWQuincyManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BWQuincyManager.h; path = ../../../modules/gui/macosx/BWQuincyManager.h; sourceTree = SOURCE_ROOT; };
                7D3F652718805297005776C4 /* BWQuincyManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = BWQuincyManager.m; path = ../../../modules/gui/macosx/BWQuincyManager.m; sourceTree = SOURCE_ROOT; };
                                CC6EDD500B9CA2140096068A /* VLCEyeTvController.m */,
                                2AEF857609A5FEC900130822 /* VLCFSPanel.h */,
                                2AEF857709A5FEC900130822 /* VLCFSPanel.m */,
+                               6BCB59091DA247CD009BCA66 /* VLCFSPanelController.h */,
+                               6BCB590A1DA247CD009BCA66 /* VLCFSPanelController.m */,
                                7D871D391B5E684D000B56C0 /* helpers.h */,
                                7DF812ED1B555A340052293C /* VLCInputManager.h */,
                                7DF812EE1B555A340052293C /* VLCInputManager.m */,
                CC0430EE13B2461A00D7D52E /* ui graphics */ = {
                        isa = PBXGroup;
                        children = (
+                               6B8CD3FA1DA2D3590087C27A /* VLCBackwardTemplate.pdf */,
+                               6B8CD3FB1DA2D3590087C27A /* VLCForwardTemplate.pdf */,
+                               6B8CD3FE1DA2FE7C0087C27A /* VLCVolumeOffTemplate.pdf */,
+                               6B8CD3FF1DA2FE7C0087C27A /* VLCVolumeOnTemplate.pdf */,
+                               6B8CD4021DA304050087C27A /* VLCFullscreenOffTemplate.pdf */,
+                               6B8CD4031DA304050087C27A /* VLCFullscreenOnTemplate.pdf */,
                                7D9516BB1C60B6C700D14E1A /* status bar item */,
                                1C88BC5719DC7CB300645190 /* fspanel-yosemite */,
                                CCCB86BF0ACFDE4A00CF1E10 /* fspanel */,
                                7DE78AC41B5D0A360019454C /* StreamOutput.xib */,
                                6BBBB8AC1D108A87001BD9BA /* VLCRendererDialog.xib */,
                                7D9516B51C60B69200D14E1A /* VLCStatusBarIconMainMenu.xib */,
+                               6BCB590E1DA2482A009BCA66 /* VLCFullScreenPanel.xib */,
                        );
                        name = xibs;
                        sourceTree = "<group>";
                                CC9E5D9D15975F5B00D14E83 /* fs_forward_highlight@2x.png in Resources */,
                                1C88BA7F19DC7B2200645190 /* yosemite-window-zoom-over-graphite@2x.png in Resources */,
                                CC9E5D9E15975F5B00D14E83 /* fs_forward@2x.png in Resources */,
+                               6B8CD4001DA2FE7C0087C27A /* VLCVolumeOffTemplate.pdf in Resources */,
                                1C88BB3519DC7C7800645190 /* ys-play-pressed@2x.png in Resources */,
                                CC9E5D9F15975F5B00D14E83 /* fs_pause_highlight@2x.png in Resources */,
                                CC9E5DA015975F5B00D14E83 /* fs_pause@2x.png in Resources */,
                                CC9E5DA215975F5B00D14E83 /* fs_play@2x.png in Resources */,
                                CC9E5DA315975F5B00D14E83 /* fs_rewind_highlight@2x.png in Resources */,
                                CC9E5DA415975F5B00D14E83 /* fs_rewind@2x.png in Resources */,
+                               6B8CD3FC1DA2D3590087C27A /* VLCBackwardTemplate.pdf in Resources */,
                                1C88BBEC19DC7C8100645190 /* ys-backward-6btns-dark@2x.png in Resources */,
                                1C88BC9319DC7CB300645190 /* ys-fs_exit_fullscreen_highlight@2x.png in Resources */,
                                CC9E5DA515975F5B00D14E83 /* fs_skip_next_highlight@2x.png in Resources */,
                                CC9E5E00159760B100D14E83 /* repeat-one@2x.png in Resources */,
                                CC9E5E01159760B100D14E83 /* repeat-pressed@2x.png in Resources */,
                                CC9E5E02159760B100D14E83 /* repeat@2x.png in Resources */,
+                               6B8CD4011DA2FE7C0087C27A /* VLCVolumeOnTemplate.pdf in Resources */,
                                CC9E5E03159760B100D14E83 /* shuffle-blue-pressed@2x.png in Resources */,
                                CC9E5E04159760B100D14E83 /* shuffle-blue@2x.png in Resources */,
                                CC9E5E05159760B100D14E83 /* shuffle-pressed@2x.png in Resources */,
                                1C88BB3319DC7C7800645190 /* ys-pause@2x.png in Resources */,
+                               6B8CD4051DA304050087C27A /* VLCFullscreenOnTemplate.pdf in Resources */,
                                1C88BA9C19DC7C5D00645190 /* ys-sidebar-podcast@2x.png in Resources */,
                                CC9E5E06159760B100D14E83 /* shuffle@2x.png in Resources */,
                                CC9E5E07159760B100D14E83 /* stop-pressed@2x.png in Resources */,
                                CC9E5E0C159760B100D14E83 /* volume-slider-track@2x.png in Resources */,
                                CC91906E159B4BB800E634A7 /* volume-high_dark@2x.png in Resources */,
                                1C88BA6A19DC7B2200645190 /* yosemite-window-fullscreen.png in Resources */,
+                               6B8CD3FD1DA2D3590087C27A /* VLCForwardTemplate.pdf in Resources */,
                                CC91906F159B4BB800E634A7 /* volume-low_dark@2x.png in Resources */,
                                1C88BC1719DC7C8100645190 /* ys-playlist-1btn-dark-pressed.png in Resources */,
                                CC919070159B4BB800E634A7 /* volume-slider-knob_dark@2x.png in Resources */,
                                1C88BA6519DC7B2200645190 /* yosemite-window-fullscreen-on@2x.png in Resources */,
                                CC91907A159B4BB800E634A7 /* topbar-dark-center-fill@2x.png in Resources */,
                                1C88BCB819DC7CB300645190 /* ys-fs_volume_max_highlight.png in Resources */,
+                               6B8CD4041DA304050087C27A /* VLCFullscreenOffTemplate.pdf in Resources */,
                                CC91907B159B4BB800E634A7 /* topbar-dark-left@2x.png in Resources */,
                                1C88BBFE19DC7C8100645190 /* ys-forward-3btns-dark@2x.png in Resources */,
                                CC91907C159B4BB800E634A7 /* topbar-dark-right@2x.png in Resources */,
                                CC9190DA159B4CA800E634A7 /* lion-window-minimize-over-graphite@2x.png in Resources */,
                                CC9190DB159B4CA800E634A7 /* lion-window-minimize-over@2x.png in Resources */,
                                1C88BB5C19DC7C7800645190 /* ys-repeat.png in Resources */,
+                               6BCB59111DA25799009BCA66 /* VLCFullScreenPanel.xib in Resources */,
                                CC9190DC159B4CA800E634A7 /* lion-window-minimize@2x.png in Resources */,
                                CC9190DD159B4CA800E634A7 /* lion-window-zoom-graphite@2x.png in Resources */,
                                CC9190DE159B4CA800E634A7 /* lion-window-zoom-on-graphite@2x.png in Resources */,
                                1CCB5F741A62A724004C3E90 /* macosx.m in Sources */,
                                1CCB5F751A62A724004C3E90 /* VLCMainMenu.h in Sources */,
                                1CCB5F761A62A724004C3E90 /* VLCMainMenu.m in Sources */,
+                               6BCB590C1DA247CD009BCA66 /* VLCFSPanelController.m in Sources */,
                                1CCB5F771A62A724004C3E90 /* VLCMainWindow.h in Sources */,
                                1CCB5F781A62A724004C3E90 /* VLCMainWindow.m in Sources */,
                                6B846FE61CF5D88C00112E54 /* VLCHUDRadiobuttonCell.m in Sources */,
                        name = VLCRendererDialog.xib;
                        sourceTree = "<group>";
                };
+               6BCB590E1DA2482A009BCA66 /* VLCFullScreenPanel.xib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               6BCB590F1DA2482A009BCA66 /* English */,
+                       );
+                       name = VLCFullScreenPanel.xib;
+                       sourceTree = "<group>";
+               };
                7D3F6523188051F2005776C4 /* BWQuincyMain.xib */ = {
                        isa = PBXVariantGroup;
                        children = (
index a49774f..14bbfbe 100644 (file)
@@ -89,4 +89,5 @@ libmacosx_plugin_la_SOURCES = \
        VLCRendererDialog.h VLCRendererDialog.m \
        VLCResumeDialogController.h VLCResumeDialogController.m \
        VLCTrackSynchronizationWindowController.h VLCTrackSynchronizationWindowController.m \
-       VLCVideoEffectsWindowController.h VLCVideoEffectsWindowController.m
+       VLCVideoEffectsWindowController.h VLCVideoEffectsWindowController.m \
+       VLCFSPanelController.h VLCFSPanelController.m
diff --git a/modules/gui/macosx/VLCFSPanelController.h b/modules/gui/macosx/VLCFSPanelController.h
new file mode 100644 (file)
index 0000000..c59dd0a
--- /dev/null
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ * VLCFSPanelController.h: macOS fullscreen controls window controller
+ *****************************************************************************
+ * Copyright (C) 2006-2016 VLC authors and VideoLAN
+ * $Id$
+ *
+ * Authors: Jérôme Decoodt <djc at videolan dot org>
+ *          Felix Paul Kühne <fkuehne at videolan dot org>
+ *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
+ *          Marvin Scholz <epirat07 at gmail 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 <Cocoa/Cocoa.h>
+
+#import "misc.h"
+#import "Windows.h"
+
+@interface VLCFSPanelController : NSWindowController
+
+@property (readwrite)       NSWindow  *voutWindow;
+@property (readwrite, weak) NSTimer   *hideTimer;
+
+@property IBOutlet NSView       *controllsView;
+@property IBOutlet NSButton     *playPauseButton;
+@property IBOutlet NSButton     *forwardButton;
+@property IBOutlet NSButton     *backwardButton;
+@property IBOutlet NSButton     *nextButton;
+@property IBOutlet NSButton     *previousButton;
+@property IBOutlet NSTextField  *mediaTitle;
+@property IBOutlet VLCTimeField *elapsedTime;
+@property IBOutlet VLCTimeField *remainingOrTotalTime;
+@property IBOutlet NSSlider     *timeSlider;
+@property IBOutlet NSSlider     *volumeSlider;
+
+- (IBAction)togglePlayPause:(id)sender;
+- (IBAction)jumpForward:(id)sender;
+- (IBAction)jumpBackward:(id)sender;
+- (IBAction)gotoPrevious:(id)sender;
+- (IBAction)gotoNext:(id)sender;
+- (IBAction)toggleFullscreen:(id)sender;
+- (IBAction)timeSliderUpdate:(id)sender;
+- (IBAction)volumeSliderUpdate:(id)sender;
+
+- (void)fadeIn;
+- (void)fadeOut;
+- (void)center;
+- (void)setActive;
+- (void)setNonActive;
+- (void)setVoutWasUpdated:(VLCWindow *)voutWindow;
+
+- (void)setSeekable:(BOOL)seekable;
+- (void)setVolumeLevel:(int)value;
+- (void)updatePositionAndTime;
+- (void)setStreamTitle:(NSString *)title;
+- (void)setPlay;
+- (void)setPause;
+
+
+/**
+ Center the window on the specified screen in the lower third
+
+ \note If the screen is invalid, the main screen is used
+
+ \param screenID    The screen on which to center the window
+ */
+- (void)centerWindowOnScreen:(CGDirectDisplayID)screenID;
+
+
+@end
diff --git a/modules/gui/macosx/VLCFSPanelController.m b/modules/gui/macosx/VLCFSPanelController.m
new file mode 100644 (file)
index 0000000..c74247b
--- /dev/null
@@ -0,0 +1,404 @@
+/*****************************************************************************
+ * VLCFSPanelController.m: macOS fullscreen controls window controller
+ *****************************************************************************
+ * Copyright (C) 2006-2016 VLC authors and VideoLAN
+ * $Id$
+ *
+ * Authors: Jérôme Decoodt <djc at videolan dot org>
+ *          Felix Paul Kühne <fkuehne at videolan dot org>
+ *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
+ *          Marvin Scholz <epirat07 at gmail 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 "VLCFSPanelController.h"
+#import "VLCCoreInteraction.h"
+#import "VLCMain.h"
+
+@interface VLCFSPanelController () {
+    BOOL _isCounting;
+    CGDirectDisplayID _displayID;
+}
+
+@end
+
+@implementation VLCFSPanelController
+
+#pragma mark -
+#pragma mark Initialization
+
+- (id)init
+{
+    self = [super initWithWindowNibName:@"VLCFullScreenPanel"];
+    return self;
+}
+
+- (void)windowDidLoad
+{
+    [super windowDidLoad];
+
+    /* Do some window setup that is not possible in IB */
+    [self.window setOpaque:NO];
+    [self.window setAlphaValue:0.0f];
+    [self.window setMovableByWindowBackground:YES];
+    [self.window setLevel:NSModalPanelWindowLevel];
+    [self.window setStyleMask:self.window.styleMask | NSResizableWindowMask];
+    [self.window setBackgroundColor:[NSColor clearColor]];
+
+    /* Inject correct background view depending on OS support */
+    [self injectVisualEffectView];
+    //[self injectBackgroundView];
+
+    [(NSButtonCell*)[_playPauseButton cell] setHighlightsBy:NSPushInCellMask];
+    [(NSButtonCell*)[_playPauseButton cell] setShowsStateBy:NSContentsCellMask];
+
+    [_volumeSlider setMaxValue:[[VLCCoreInteraction sharedInstance] maxVolume]];
+    [_volumeSlider setIntValue:AOUT_VOLUME_DEFAULT];
+}
+
+#pragma mark -
+#pragma mark Control Actions
+
+- (IBAction)togglePlayPause:(id)sender
+{
+    [[VLCCoreInteraction sharedInstance] playOrPause];
+}
+
+- (IBAction)jumpForward:(id)sender
+{
+    static NSTimeInterval last_event = 0;
+    if (([NSDate timeIntervalSinceReferenceDate] - last_event) > 0.16) {
+        /* We just skipped 4 "continous" events, otherwise we are too fast */
+        [[VLCCoreInteraction sharedInstance] forwardExtraShort];
+        last_event = [NSDate timeIntervalSinceReferenceDate];
+    }
+}
+
+- (IBAction)jumpBackward:(id)sender
+{
+    static NSTimeInterval last_event = 0;
+    if (([NSDate timeIntervalSinceReferenceDate] - last_event) > 0.16) {
+        /* We just skipped 4 "continous" events, otherwise we are too fast */
+        [[VLCCoreInteraction sharedInstance] backwardExtraShort];
+        last_event = [NSDate timeIntervalSinceReferenceDate];
+    }
+}
+
+- (IBAction)gotoPrevious:(id)sender
+{
+    [[VLCCoreInteraction sharedInstance] previous];
+}
+
+- (IBAction)gotoNext:(id)sender
+{
+    [[VLCCoreInteraction sharedInstance] next];
+}
+
+- (IBAction)toggleFullscreen:(id)sender
+{
+    [[VLCCoreInteraction sharedInstance] toggleFullscreen];
+}
+
+- (IBAction)timeSliderUpdate:(id)sender
+{
+    input_thread_t *p_input;
+    p_input = pl_CurrentInput(getIntf());
+
+    if (p_input) {
+        vlc_value_t pos;
+        pos.f_float = [_timeSlider floatValue] / 10000.;
+        var_Set(p_input, "position", pos);
+        vlc_object_release(p_input);
+    }
+    [[[VLCMain sharedInstance] mainWindow] updateTimeSlider];
+}
+
+- (IBAction)volumeSliderUpdate:(id)sender
+{
+    [[VLCCoreInteraction sharedInstance] setVolume:[sender intValue]];
+}
+
+#pragma mark -
+#pragma mark Metadata and state updates
+
+- (void)setPlay
+{
+    [_playPauseButton setState:NSOffState];
+}
+
+- (void)setPause
+{
+    [_playPauseButton setState:NSOnState];
+}
+
+- (void)setStreamTitle:(NSString *)title
+{
+    [_mediaTitle setStringValue:title];
+}
+
+- (void)updatePositionAndTime
+{
+    input_thread_t *p_input = pl_CurrentInput(getIntf());
+
+    /* If nothing is playing, reset times and slider */
+    if (!p_input) {
+        [_timeSlider setFloatValue:0.0];
+        [_elapsedTime setStringValue:@""];
+        [_remainingOrTotalTime setHidden:YES];
+        return;
+    }
+
+    vlc_value_t pos;
+    char psz_time[MSTRTIME_MAX_SIZE];
+
+    var_Get(p_input, "position", &pos);
+    float f_updated = 10000. * pos.f_float;
+    [_timeSlider setFloatValue:f_updated];
+
+
+    int64_t t = var_GetInteger(p_input, "time");
+    mtime_t dur = input_item_GetDuration(input_GetItem(p_input));
+
+    /* Update total duration (right field) */
+    if (dur <= 0) {
+        [_remainingOrTotalTime setHidden:YES];
+    } else {
+        [_remainingOrTotalTime setHidden:NO];
+
+        NSString *totalTime;
+
+        if ([_remainingOrTotalTime timeRemaining]) {
+            mtime_t remaining = 0;
+            if (dur > t)
+                remaining = dur - t;
+            totalTime = [NSString stringWithFormat:@"-%s", secstotimestr(psz_time, (remaining / 1000000))];
+        } else {
+            totalTime = toNSStr(secstotimestr(psz_time, (dur / 1000000)));
+        }
+        [_remainingOrTotalTime setStringValue:totalTime];
+    }
+
+    /* Update current position (left field) */
+    NSString *playbackPosition = toNSStr(secstotimestr(psz_time, t / CLOCK_FREQ));
+
+    [_elapsedTime setStringValue:playbackPosition];
+    vlc_object_release(p_input);
+}
+
+- (void)setSeekable:(BOOL)seekable
+{
+    [_timeSlider setEnabled:seekable];
+    [_forwardButton setEnabled:seekable];
+    [_backwardButton setEnabled:seekable];
+}
+
+- (void)setVolumeLevel:(int)value
+{
+    [_volumeSlider setIntValue:value];
+}
+
+#pragma mark -
+#pragma mark Window interactions
+
+- (void)fadeIn
+{
+    [NSAnimationContext beginGrouping];
+    [[NSAnimationContext currentContext] setDuration:0.7f];
+    [[self.window animator] setAlphaValue:1.0f];
+    [NSAnimationContext endGrouping];
+
+    [self startAutohideTimer];
+}
+
+- (void)fadeOut
+{
+    [NSAnimationContext beginGrouping];
+    [[NSAnimationContext currentContext] setDuration:0.7f];
+    [[self.window animator] setAlphaValue:0.0f];
+    [NSAnimationContext endGrouping];
+}
+
+- (void)centerWindowOnScreen:(CGDirectDisplayID)screenID
+{
+    /* Find screen by its ID */
+    NSScreen *screen = [NSScreen screenWithDisplayID:screenID];
+
+    /* Check screen validity, fallback to mainScreen */
+    if (!screen)
+        screen = [NSScreen mainScreen];
+
+    NSRect screenFrame = [screen frame];
+    NSRect windowFrame = [self.window frame];
+
+    /* Calculate coordinates for new NSWindow position */
+    NSPoint coordinates;
+    coordinates.x = (screenFrame.size.width - windowFrame.size.width) / 2 + screenFrame.origin.x;
+    coordinates.y = (screenFrame.size.height / 3) - windowFrame.size.height + screenFrame.origin.y;
+
+    [self.window setFrameTopLeftPoint:coordinates];
+}
+
+- (void)center
+{
+    [self centerWindowOnScreen:_displayID];
+}
+
+- (void)setNonActive
+{
+    [self.window orderOut:self];
+}
+
+- (void)setActive
+{
+    [self.window orderFront:self];
+}
+
+#pragma mark -
+#pragma mark Misc interactions
+
+- (void)hideMouse
+{
+    [NSCursor setHiddenUntilMouseMoves:YES];
+}
+
+- (void)setVoutWasUpdated:(VLCWindow *)voutWindow
+{
+    _voutWindow = voutWindow;
+    int newDisplayID = [[self.window screen] displayID];
+
+    if (_displayID != newDisplayID) {
+        _displayID = newDisplayID;
+        [self center];
+    }
+}
+
+#pragma mark -
+#pragma mark Autohide timer management
+
+- (void)startAutohideTimer
+{
+    /* Do nothing if timer is already in place */
+    if (_isCounting)
+        return;
+
+    int _timeToKeepVisibleInSec = var_CreateGetInteger(getIntf(), "mouse-hide-timeout") / 1000;
+    _hideTimer = [NSTimer scheduledTimerWithTimeInterval:_timeToKeepVisibleInSec
+                                                  target:self
+                                                selector:@selector(autohideCallback:)
+                                                userInfo:nil
+                                                 repeats:NO];
+    _isCounting = YES;
+}
+
+- (void)stopAutohideTimer
+{
+    [_hideTimer invalidate];
+    _isCounting = NO;
+}
+
+- (void)autohideCallback:(NSTimer *)timer
+{
+    if (!NSPointInRect([NSEvent mouseLocation], [self.window frame])) {
+        [self fadeOut];
+        [self hideMouse];
+    }
+    _isCounting = NO;
+}
+
+#pragma mark -
+#pragma mark Helpers
+
+/**
+ Create an image mask for the NSVisualEffectView
+ with rounded corners in the given rect
+ This is necessary as clipping the VisualEffectView using the layers
+ rounded corners is not possible when using the NSColor clearColor
+ as background color.
+ \note  The returned image will have the necessary \c capInsets and
+        \c capResizingMode set.
+ \param bounds  The rect for the image size
+ */
+- (NSImage *)maskImageWithBounds:(NSRect)bounds
+{
+    static const float radius = 8.0;
+    NSImage *img = [NSImage imageWithSize:bounds.size flipped:YES drawingHandler:^BOOL(NSRect dstRect) {
+        NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:bounds xRadius:radius yRadius:radius];
+        [[NSColor blackColor] setFill];
+        [path fill];
+        return YES;
+    }];
+    [img setCapInsets:NSEdgeInsetsMake(radius, radius, radius, radius)];
+    [img setResizingMode:NSImageResizingModeStretch];
+    return img;
+}
+
+/**
+ Injects the visual effect view in the Windows view hierarchy
+ This is necessary as we can't use the NSVisualEffect view on
+ all macOS Versions and therefore need to dynamically insert it.
+ \warning Never call both, \c injectVisualEffectView and \c injectBackgroundView
+ */
+- (void)injectVisualEffectView
+{
+    /* Setup the view */
+    NSVisualEffectView *view = [[NSVisualEffectView alloc] initWithFrame:self.window.contentView.frame];
+    [view setMaskImage:[self maskImageWithBounds:self.window.contentView.bounds]];
+    [view setBlendingMode:NSVisualEffectBlendingModeBehindWindow];
+    [view setMaterial:NSVisualEffectMaterialDark];
+    [view setState:NSVisualEffectStateActive];
+    [view setAutoresizesSubviews:YES];
+
+    /* Inject view in view hierarchy */
+    [self.window setContentView:view];
+    [_controllsView setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameVibrantDark]];
+    [self.window.contentView addSubview:_controllsView];
+}
+
+/**
+ Injects the standard background view in the Windows view hierarchy
+ This is necessary on macOS versions that do not support the
+ NSVisualEffectView that usually is injected.
+ \warning Never call both, \c injectVisualEffectView and \c injectBackgroundView
+ */
+- (void)injectBackgroundView
+{
+    /* Setup the view */
+    NSColor *color = [NSColor colorWithCalibratedWhite:0.0 alpha:0.8];
+    NSView *view = [[NSView alloc] initWithFrame:self.window.contentView.frame];
+    [view setWantsLayer:YES];
+    [view.layer setBackgroundColor:[color CGColor]];
+    [view.layer setCornerRadius:8.0];
+    [view setAutoresizesSubviews:YES];
+
+    /* Inject view in view hierarchy */
+    [self.window setContentView:view];
+    [self.window.contentView addSubview:_controllsView];
+}
+
+- (void)dealloc
+{
+    [self stopAutohideTimer];
+}
+
+
+@end
index 06fbc48..d10c801 100644 (file)
@@ -32,7 +32,7 @@
 
 #import "Windows.h"
 #import "misc.h"
-#import "VLCFSPanel.h"
+#import "VLCFSPanelController.h"
 #import "VLCMainWindowTitleView.h"
 
 @class VLCDetachedVideoWindow;
@@ -91,7 +91,7 @@ typedef enum {
 @property (readonly) BOOL nativeFullscreenMode;
 @property (readwrite) BOOL nonembedded;
 
-@property (readonly) VLCFSPanel* fspanel;
+@property (readonly) VLCFSPanelController* fspanel;
 
 - (void)changePlaylistState:(VLCPlaylistStateEvent)event;
 
index 4d89e13..c31d461 100644 (file)
@@ -236,10 +236,8 @@ static const float f_min_window_height = 307.;
     frame.size.height = frame.size.height - 1.0;
     [_searchField setFrame:frame];
 
-    _fspanel = [[VLCFSPanel alloc] initWithContentRect:NSMakeRect(110.,267.,549.,87.)
-                                             styleMask:NSTexturedBackgroundWindowMask
-                                               backing:NSBackingStoreBuffered
-                                                 defer:YES];
+    _fspanel = [[VLCFSPanelController alloc] init];
+    [_fspanel showWindow:self];
 
     /* make sure we display the desired default appearance when VLC launches for the first time */
     if (![defaults objectForKey:@"VLCFirstRun"]) {
@@ -476,7 +474,7 @@ static const float f_min_window_height = 307.;
     [_splitView setHidden:NO];
     if (self.nativeFullscreenMode && [self fullscreen]) {
         [[self.controlsBar bottomBarView] setHidden:NO];
-        [self.fspanel setNonActive:nil];
+        [self.fspanel setNonActive];
     }
 
     [self makeFirstResponder:_playlistScrollView];
@@ -493,7 +491,7 @@ static const float f_min_window_height = 307.;
     [self.videoView setHidden:NO];
     if (self.nativeFullscreenMode && [self fullscreen]) {
         [[self.controlsBar bottomBarView] setHidden:YES];
-        [self.fspanel setActive:nil];
+        [self.fspanel setActive];
     }
 
     if ([[self.videoView subviews] count] > 0)
@@ -850,10 +848,10 @@ static const float f_min_window_height = 307.;
     if (self.nativeFullscreenMode) {
         if ([self hasActiveVideo] && [self fullscreen]) {
             [[self.controlsBar bottomBarView] setHidden: b_videoPlayback];
-            [self.fspanel setActive: nil];
+            [self.fspanel setActive];
         } else {
             [[self.controlsBar bottomBarView] setHidden: NO];
-            [self.fspanel setNonActive: nil];
+            [self.fspanel setNonActive];
         }
     }
 }
index 7a926aa..98f9558 100644 (file)
 
     // change fspanel state for the case when multiple windows are in fullscreen
     if ([self hasActiveVideo] && [self fullscreen])
-        [[[[VLCMain sharedInstance] mainWindow] fspanel] setActive:nil];
+        [[[[VLCMain sharedInstance] mainWindow] fspanel] setActive];
     else
-        [[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive:nil];
+        [[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
 }
 
 - (void)resignKeyWindow
 {
     [super resignKeyWindow];
 
-    [[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive:nil];
+    [[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
 }
 
 -(NSArray*)customWindowsToEnterFullScreenForWindow:(NSWindow *)window
     _inFullscreenTransition = NO;
 
     if ([self hasActiveVideo]) {
-        [[[[VLCMain sharedInstance] mainWindow] fspanel] setVoutWasUpdated: self];
+        [[[[VLCMain sharedInstance] mainWindow] fspanel] setVoutWasUpdated:self];
         if (![_videoView isHidden])
-            [[[[VLCMain sharedInstance] mainWindow] fspanel] setActive: nil];
+            [[[[VLCMain sharedInstance] mainWindow] fspanel] setActive];
     }
 
     NSArray *subviews = [[self videoView] subviews];
     }
 
     [NSCursor setHiddenUntilMouseMoves: NO];
-    [[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive: nil];
+    [[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
 
 
     if (_darkInterface) {
     [o_fullscreen_window setAcceptsMouseMovedEvents: YES];
 
     /* tell the fspanel to move itself to front next time it's triggered */
-    [[[[VLCMain sharedInstance] mainWindow] fspanel] setVoutWasUpdated: o_fullscreen_window];
-    [[[[VLCMain sharedInstance] mainWindow] fspanel] setActive: nil];
+    [[[[VLCMain sharedInstance] mainWindow] fspanel] setVoutWasUpdated:o_fullscreen_window];
+    [[[[VLCMain sharedInstance] mainWindow] fspanel] setActive];
 
     if ([self isVisible])
         [self orderOut: self];
         return;
     }
 
-    [[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive: nil];
+    [[[[VLCMain sharedInstance] mainWindow] fspanel] setNonActive];
     [[o_fullscreen_window screen] setNonFullscreenPresentationOptions];
 
     if (o_fullscreen_anim1) {