mirror of https://code.videolan.org/videolan/vlc
macosx: Extract table view data source protocol to separate file
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
This commit is contained in:
parent
22467b95be
commit
472c6129a5
|
@ -387,6 +387,7 @@
|
|||
53C1EF862B466B13001AEEF5 /* VLCLibraryHomeViewStackViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryHomeViewStackViewController.m; sourceTree = "<group>"; };
|
||||
53C1EF882B466B13001AEEF5 /* VLCLibraryHomeViewVideoGridContainerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryHomeViewVideoGridContainerView.h; sourceTree = "<group>"; };
|
||||
53C1EF8A2B466B13001AEEF5 /* VLCLibraryHomeViewStackViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryHomeViewStackViewController.h; sourceTree = "<group>"; };
|
||||
53D6664E2B6B82940042C03D /* VLCLibraryTableViewDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryTableViewDataSource.h; sourceTree = "<group>"; };
|
||||
53D8ED982B583AAF00142EAD /* VLCLibraryModelChangeDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryModelChangeDelegate.h; sourceTree = "<group>"; };
|
||||
53D8ED992B583AAF00142EAD /* VLCLibraryModelChangeDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryModelChangeDelegate.m; sourceTree = "<group>"; };
|
||||
53ED472129C74D1F00795DB1 /* VLCLibraryAudioTableViewDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAudioTableViewDelegate.h; sourceTree = "<group>"; };
|
||||
|
@ -1306,6 +1307,7 @@
|
|||
53ED473729CAF67F00795DB1 /* VLCLibraryTableCellViewProtocol.h */,
|
||||
536283E0291146BC00640C15 /* VLCLibraryTableView.h */,
|
||||
536283DE291146BC00640C15 /* VLCLibraryTableView.m */,
|
||||
53D6664E2B6B82940042C03D /* VLCLibraryTableViewDataSource.h */,
|
||||
53ED473429CA4F3400795DB1 /* VLCLibraryTableViewDelegate.h */,
|
||||
53ED473529CA4F3400795DB1 /* VLCLibraryTableViewDelegate.m */,
|
||||
539F114929E83A4200F13460 /* VLCLibraryTwoPaneSplitViewDelegate.h */,
|
||||
|
|
|
@ -138,6 +138,7 @@ libmacosx_plugin_la_SOURCES = \
|
|||
gui/macosx/library/VLCLibrarySortingMenuController.m \
|
||||
gui/macosx/library/VLCLibraryTableView.h \
|
||||
gui/macosx/library/VLCLibraryTableView.m \
|
||||
gui/macosx/library/VLCLibraryTableViewDataSource.h \
|
||||
gui/macosx/library/VLCLibraryTableViewDelegate.h \
|
||||
gui/macosx/library/VLCLibraryTableViewDelegate.m \
|
||||
gui/macosx/library/VLCLibraryTableCellView.h \
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*****************************************************************************
|
||||
* VLCLibraryTableView.m: MacOS X interface module
|
||||
* VLCLibraryTableView.h: MacOS X interface module
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2022 VLC authors and VideoLAN
|
||||
*
|
||||
* Authors: Claudio Cambra <claudio.cambra@gmail.com>
|
||||
* Authors: Claudio Cambra <developer@claudiocambra.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
|
||||
|
@ -22,26 +22,8 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import "library/VLCLibraryDataTypes.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol VLCMediaLibraryItemProtocol;
|
||||
|
||||
@protocol VLCLibraryTableViewDataSource <NSTableViewDataSource>
|
||||
|
||||
@property (readonly) VLCMediaLibraryParentGroupType currentParentType;
|
||||
|
||||
- (NSInteger)rowForLibraryItem:(id<VLCMediaLibraryItemProtocol>)libraryItem;
|
||||
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtRow:(NSInteger)row
|
||||
forTableView:(nullable NSTableView *)tableView;
|
||||
|
||||
@optional
|
||||
- (void)connect;
|
||||
- (void)disconnect;
|
||||
|
||||
@end
|
||||
|
||||
@interface VLCLibraryTableView : NSTableView<NSMenuDelegate>
|
||||
|
||||
@end
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*****************************************************************************
|
||||
* VLCLibraryTableViewDataSource.h: MacOS X interface module
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2022 VLC authors and VideoLAN
|
||||
*
|
||||
* Authors: Claudio Cambra <developer@claudiocambra.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 "library/VLCLibraryDataTypes.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol VLCMediaLibraryItemProtocol;
|
||||
|
||||
@protocol VLCLibraryTableViewDataSource <NSTableViewDataSource>
|
||||
|
||||
@property (readonly) VLCMediaLibraryParentGroupType currentParentType;
|
||||
|
||||
- (NSInteger)rowForLibraryItem:(id<VLCMediaLibraryItemProtocol>)libraryItem;
|
||||
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtRow:(NSInteger)row
|
||||
forTableView:(nullable NSTableView *)tableView;
|
||||
|
||||
@optional
|
||||
- (void)connect;
|
||||
- (void)disconnect;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#import "library/VLCLibraryTableCellView.h"
|
||||
#import "library/VLCLibraryTableCellViewProtocol.h"
|
||||
#import "library/VLCLibraryTableView.h"
|
||||
#import "library/VLCLibraryTableViewDataSource.h"
|
||||
#import "library/VLCLibraryDataTypes.h"
|
||||
#import "library/VLCLibraryRepresentedItem.h"
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import "library/VLCLibraryTableView.h"
|
||||
#import "library/VLCLibraryTableViewDataSource.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import "library/VLCLibraryTableView.h"
|
||||
#import "library/VLCLibraryCollectionViewDataSource.h"
|
||||
#import "library/VLCLibraryTableViewDataSource.h"
|
||||
|
||||
#include "views/iCarousel/iCarousel.h"
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#import "library/VLCLibraryController.h"
|
||||
#import "library/VLCLibraryDataTypes.h"
|
||||
#import "library/VLCLibraryTableCellView.h"
|
||||
#import "library/VLCLibraryTableView.h"
|
||||
#import "library/VLCLibraryCollectionViewItem.h"
|
||||
#import "library/VLCLibraryCollectionViewFlowLayout.h"
|
||||
#import "library/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import "library/VLCLibraryCollectionViewDataSource.h"
|
||||
#import "library/VLCLibraryTableView.h"
|
||||
#import "library/VLCLibraryTableViewDataSource.h"
|
||||
|
||||
#import <vlc_media_library.h>
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import "library/VLCLibraryCollectionViewDataSource.h"
|
||||
#import "library/VLCLibraryTableView.h"
|
||||
#import "library/VLCLibraryTableViewDataSource.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
|
Loading…
Reference in New Issue