Commit efa2f96d authored by Brendon Justin's avatar Brendon Justin Committed by Jean-Baptiste Kempf

macosx: Lua extensions infrastructure

Add files for extension creation management, add them to the build process, and
add them to the XCode project.
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 4c0f1687
...@@ -286,6 +286,12 @@ ...@@ -286,6 +286,12 @@
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
2AEF857609A5FEC900130822 /* fspanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fspanel.h; path = ../../../modules/gui/macosx/fspanel.h; sourceTree = SOURCE_ROOT; }; 2AEF857609A5FEC900130822 /* fspanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fspanel.h; path = ../../../modules/gui/macosx/fspanel.h; sourceTree = SOURCE_ROOT; };
2AEF857709A5FEC900130822 /* fspanel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = fspanel.m; path = ../../../modules/gui/macosx/fspanel.m; sourceTree = SOURCE_ROOT; }; 2AEF857709A5FEC900130822 /* fspanel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = fspanel.m; path = ../../../modules/gui/macosx/fspanel.m; sourceTree = SOURCE_ROOT; };
5CCED71014C0D4A90057F8D1 /* ExtensionsDialogProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExtensionsDialogProvider.h; path = ../../../modules/gui/macosx/ExtensionsDialogProvider.h; sourceTree = SOURCE_ROOT; };
5CCED71114C0D4A90057F8D1 /* ExtensionsDialogProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ExtensionsDialogProvider.m; path = ../../../modules/gui/macosx/ExtensionsDialogProvider.m; sourceTree = SOURCE_ROOT; };
5CCED71214C0D4A90057F8D1 /* ExtensionsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExtensionsManager.h; path = ../../../modules/gui/macosx/ExtensionsManager.h; sourceTree = SOURCE_ROOT; };
5CCED71314C0D4A90057F8D1 /* ExtensionsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ExtensionsManager.m; path = ../../../modules/gui/macosx/ExtensionsManager.m; sourceTree = SOURCE_ROOT; };
5CCED71414C0D4A90057F8D1 /* VLCUIWidgets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCUIWidgets.h; path = ../../../modules/gui/macosx/VLCUIWidgets.h; sourceTree = SOURCE_ROOT; };
5CCED71514C0D4A90057F8D1 /* VLCUIWidgets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCUIWidgets.m; path = ../../../modules/gui/macosx/VLCUIWidgets.m; sourceTree = SOURCE_ROOT; };
8E49720006417F6800370C9F /* playlistinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = playlistinfo.h; path = ../../../modules/gui/macosx/playlistinfo.h; sourceTree = SOURCE_ROOT; }; 8E49720006417F6800370C9F /* playlistinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = playlistinfo.h; path = ../../../modules/gui/macosx/playlistinfo.h; sourceTree = SOURCE_ROOT; };
8E49720106417F6800370C9F /* playlistinfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = playlistinfo.m; path = ../../../modules/gui/macosx/playlistinfo.m; sourceTree = SOURCE_ROOT; }; 8E49720106417F6800370C9F /* playlistinfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = playlistinfo.m; path = ../../../modules/gui/macosx/playlistinfo.m; sourceTree = SOURCE_ROOT; };
8E55FB7F0459B0FD00FB3317 /* output.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = output.h; path = ../../../modules/gui/macosx/output.h; sourceTree = SOURCE_ROOT; }; 8E55FB7F0459B0FD00FB3317 /* output.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = output.h; path = ../../../modules/gui/macosx/output.h; sourceTree = SOURCE_ROOT; };
...@@ -706,6 +712,12 @@ ...@@ -706,6 +712,12 @@
CC448A6313B68A0B009F72E0 /* MainWindow.m */, CC448A6313B68A0B009F72E0 /* MainWindow.m */,
CC4A33220F8CB017000FC4A7 /* coredialogs.h */, CC4A33220F8CB017000FC4A7 /* coredialogs.h */,
CC4A33210F8CB017000FC4A7 /* coredialogs.m */, CC4A33210F8CB017000FC4A7 /* coredialogs.m */,
5CCED71014C0D4A90057F8D1 /* ExtensionsDialogProvider.h */,
5CCED71114C0D4A90057F8D1 /* ExtensionsDialogProvider.m */,
5CCED71214C0D4A90057F8D1 /* ExtensionsManager.h */,
5CCED71314C0D4A90057F8D1 /* ExtensionsManager.m */,
5CCED71414C0D4A90057F8D1 /* VLCUIWidgets.h */,
5CCED71514C0D4A90057F8D1 /* VLCUIWidgets.m */,
8E6BC6FA041684EC0059A3A7 /* controls.h */, 8E6BC6FA041684EC0059A3A7 /* controls.h */,
8ED6C27B03E2EB1C0059A3A7 /* controls.m */, 8ED6C27B03E2EB1C0059A3A7 /* controls.m */,
8E6BC6F6041643860059A3A7 /* applescript.h */, 8E6BC6F6041643860059A3A7 /* applescript.h */,
......
/*****************************************************************************
* ExtensionsDialogProvider.h: Mac OS X Extensions Dialogs
*****************************************************************************
* Copyright (C) 2005-2012 VLC authors and VideoLAN
* $Id$
*
* Authors: Brendon Justin <brendonjustin at gmail.com>,
* Derk-Jan Hartman <hartman at videolan dot org>,
* Felix Paul Kühne <fkuehne at videolan dot 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
* 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 "coredialogs.h"
#import "intf.h"
#import "VLCUIWidgets.h"
#import <vlc_common.h>
#import <vlc_dialog.h>
#import <vlc_extensions.h>
#import <Cocoa/Cocoa.h>
/*****************************************************************************
* ExtensionsDialogProvider interface
*****************************************************************************/
at interface ExtensionsDialogProvider : NSObject <NSWindowDelegate>
{
intf_thread_t *p_intf;
}
+ (ExtensionsDialogProvider *)sharedInstance:(intf_thread_t *)_p_intf;
+ (void)killInstance;
- (id)initWithIntf:(intf_thread_t *)_p_intf;
- (void)performEventWithObject: (NSValue *)o_value ofType:(const char*)type;
- (void)triggerClick:(id)sender;
- (void)syncTextField:(NSNotification *)notifcation;
- (void)tableViewSelectionDidChange:(NSNotification *)notifcation;
- (void)popUpSelectionChanged:(id)sender;
- (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize;
- (BOOL)windowShouldClose:(id)sender;
- (void)updateWidgets:(extension_dialog_t *)dialog;
- (VLCDialogWindow *)createExtensionDialog:(extension_dialog_t *)p_dialog;
- (int)destroyExtensionDialog:(extension_dialog_t *)o_value;
- (VLCDialogWindow *)updateExtensionDialog:(NSValue *)o_value;
- (void)manageDialog:(extension_dialog_t *)p_dialog;
at end
This diff is collapsed.
/*****************************************************************************
* extensions_manager.h: Extensions manager for Cocoa
****************************************************************************
* Copyright (C) 2012 VideoLAN and authors
* $Id$
*
* Authors: Brendon Justin <brendonjustin at gmail.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.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#import "ExtensionsDialogProvider.h"
#import "intf.h"
#import <vlc_extensions.h>
#import <Cocoa/Cocoa.h>
at class ExtensionsDialogProvider;
at protocol ExtensionsDelegate <NSObject>
- (void)extensionsUpdated;
at end
at interface ExtensionsManager : NSObject
{
intf_thread_t *p_intf;
extensions_manager_t *p_extensions_manager;
ExtensionsDialogProvider *p_edp;
NSMutableDictionary *p_extDict;
BOOL b_unloading; ///< Work around threads + emit issues, see isUnloading
BOOL b_failed; ///< Flag set to true if we could not load the module
id <ExtensionsDelegate> delegate;
};
+ (ExtensionsManager *)getInstance:(intf_thread_t *)_p_intf;
- (id)initWithIntf:(intf_thread_t *)_p_intf;
- (void)buildMenu:(NSMenu *)extMenu;
- (extensions_manager_t *)getManager;
- (BOOL)loadExtensions;
- (void)unloadExtensions;
- (void)reloadExtensions;
- (void)triggerMenu:(id)sender;
- (void)inputChanged:(input_thread_t *)p_input;
- (void)playingChanged:(int)state;
- (void)metaChanged:(input_item_t *)p_input;
- (BOOL)isLoaded;
- (BOOL)cannotLoad;
at property (readonly) BOOL isUnloading;
at end
This diff is collapsed.
...@@ -17,6 +17,12 @@ SOURCES_macosx = \ ...@@ -17,6 +17,12 @@ SOURCES_macosx = \
MainWindow.m \ MainWindow.m \
CoreInteraction.h \ CoreInteraction.h \
CoreInteraction.m \ CoreInteraction.m \
ExtensionsManager.h \
ExtensionsManager.m \
ExtensionsDialogProvider.h \
ExtensionsDialogProvider.m \
VLCUIWidgets.h \
VLCUIWidgets.m \
about.h \ about.h \
about.m \ about.m \
applescript.h \ applescript.h \
......
/*****************************************************************************
* VLCUIWidgets.h: Widgets for VLC's Minimal Dialog Provider for Mac OS X
*****************************************************************************
* Copyright (C) 2009-2012 the VideoLAN team
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan dot>
*
* 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 <vlc_extensions.h>
at class VLCDialogGridView;
at interface VLCDialogButton : NSButton
at property (readwrite) extension_widget_t *widget;
at end
at interface VLCDialogPopUpButton : NSPopUpButton
at property (readwrite) extension_widget_t *widget;
at end
at interface VLCDialogTextField : NSTextField
at property (readwrite) extension_widget_t *widget;
at end
at interface VLCDialogWindow : NSWindow
at property (readwrite) extension_dialog_t *dialog;
at property (readwrite) BOOL has_lock;
at end
at interface VLCDialogList : NSTableView <NSTableViewDataSource>
at property (readwrite) extension_widget_t *widget;
at property (readwrite, retain) NSMutableArray *contentArray;
at end
at interface VLCDialogGridView : NSView {
NSUInteger _rowCount, _colCount;
NSMutableArray *_griddedViews;
}
- (void)addSubview:(NSView *)view atRow:(NSUInteger)row column:(NSUInteger)column rowSpan:(NSUInteger)rowSpan colSpan:(NSUInteger)colSpan;
- (NSSize)flexSize:(NSSize)size;
- (void)removeSubview:(NSView *)view;
at property (readonly) NSUInteger numViews;
at end
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment