]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/intf.h
macosx: use modern ObjC syntax for C-Numbers to NSNumber conversations
[vlc] / modules / gui / macosx / intf.h
index 43fe3f9bb8e2bbe222dcebf2a9572b244cc8ea11..768b149056d234860c9cde3ec3bb892bbb89f4f3 100644 (file)
@@ -1,13 +1,14 @@
 /*****************************************************************************
  * intf.h: MacOS X interface module
  *****************************************************************************
- * Copyright (C) 2002-2012 VLC authors and VideoLAN
+ * Copyright (C) 2002-2013 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
- *          Christophe Massiot <massiot@via.ecp.fr>
  *          Derk-Jan Hartman <hartman at videolan dot org>
  *          Felix Paul Kühne <fkuehne at videolan dot org>
+ *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
+ *          Pierre d'Herbemont <pdherbemont # videolan org>
  *
  * 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
 #import <vlc_vout.h>
 #import <vlc_aout.h>
 #import <vlc_input.h>
+#import <vlc_vout_window.h>
 
 #import <Cocoa/Cocoa.h>
 #import "CompatibilityFixes.h"
 #import "SPMediaKeyTap.h"                   /* for the media key support */
 #import "misc.h"
 #import "MainWindow.h"
+#import "VLCVoutWindowController.h"
 #import "StringUtility.h"
 
 #import <IOKit/pwr_mgt/IOPMLib.h>           /* for sleep prevention */
@@ -52,6 +55,7 @@
 // You need to release those objects after use
 input_thread_t *getInput(void);
 vout_thread_t *getVout(void);
+vout_thread_t *getVoutForActiveWindow(void);
 audio_output_t *getAout(void);
 
 /*****************************************************************************
@@ -63,9 +67,6 @@ struct intf_sys_t
     bool b_input_update;
     bool b_aout_update;
     bool b_vout_update;
-
-    /* The messages window */
-    msg_subscription_t sub;
 };
 
 /*****************************************************************************
@@ -76,10 +77,11 @@ struct intf_sys_t
 @class VLCEmbeddedWindow;
 @class VLCControls;
 @class VLCPlaylist;
+
 @interface VLCMain : NSObject <NSWindowDelegate, NSApplicationDelegate>
 {
     intf_thread_t *p_intf;      /* The main intf object */
-    input_thread_t *p_current_input;
+    input_thread_t *p_current_input, *p_input_changed;
     id o_mainmenu;              /* VLCMainMenu */
     id o_prefs;                 /* VLCPrefs       */
     id o_sprefs;                /* VLCSimplePrefs */
@@ -140,15 +142,27 @@ struct intf_sys_t
 
     /* sleep management */
     IOPMAssertionID systemSleepAssertionID;
+    IOPMAssertionID userActivityAssertionID;
+
+    VLCVoutWindowController *o_vout_controller;
+
+    /* iTunes play/pause support */
+    BOOL b_has_itunes_paused;
+    NSTimer *o_itunes_play_timer;
+
+    BOOL b_playlist_updated_selector_in_queue;
 }
 
+@property (readonly) VLCVoutWindowController* voutController;
+@property (readonly) BOOL nativeFullscreenMode;
+@property (nonatomic, readwrite) BOOL playlistUpdatedSelectorInQueue;
 + (VLCMain *)sharedInstance;
 
 - (intf_thread_t *)intf;
 - (void)setIntf:(intf_thread_t *)p_mainintf;
 
 - (id)mainMenu;
-- (id)mainWindow;
+- (VLCMainWindow *)mainWindow;
 - (id)controls;
 - (id)bookmarks;
 - (id)open;
@@ -157,8 +171,6 @@ struct intf_sys_t
 - (id)playlist;
 - (id)info;
 - (id)wizard;
-- (id)getVideoViewAtPositionX: (int *)pi_x Y: (int *)pi_y withWidth: (unsigned int*)pi_width andHeight: (unsigned int*)pi_height;
-- (void)setNativeVideoSize:(NSSize)size;
 - (id)coreDialogProvider;
 - (id)eyeTVController;
 - (id)appleRemoteController;
@@ -166,9 +178,8 @@ struct intf_sys_t
 - (BOOL)activeVideoPlayback;
 - (void)applicationWillTerminate:(NSNotification *)notification;
 - (void)updateCurrentlyUsedHotkeys;
-- (void)fullscreenChanged;
 - (BOOL)hasDefinedShortcutKey:(NSEvent *)o_event force:(BOOL)b_force;
-- (void)checkFullscreenChange:(NSNumber *)o_full;
+
 - (void)PlaylistItemChanged;
 - (void)playbackStatusUpdated;
 - (void)sendDistributedNotificationWithUpdatedPlaybackStatus;
@@ -192,7 +203,7 @@ struct intf_sys_t
 - (IBAction)showMessagesPanel:(id)sender;
 - (IBAction)updateMessagesPanel:(id)sender;
 
-- (void)processReceivedlibvlcMessage:(const msg_item_t *) item ofType: (int)type withStr: (char *)str;
+- (void)processReceivedlibvlcMessage:(const vlc_log_t *) item ofType: (int)type withStr: (char *)str;
 
 - (void)updateTogglePlaylistState;
 
@@ -201,11 +212,6 @@ struct intf_sys_t
 - (void)mediaKeyTap:(SPMediaKeyTap*)keyTap receivedMediaKeyEvent:(NSEvent*)event;
 @end
 
-@interface VLCMain (Internal)
-- (void)handlePortMessage:(NSPortMessage *)o_msg;
-- (void)resetMediaKeyJump;
-- (void)coreChangedMediaKeySupportSetting: (NSNotification *)o_notification;
-@end
 
 /*****************************************************************************
  * VLCApplication interface