Commit 30a5f368 authored by Jon Lech Johansen's avatar Jon Lech Johansen

* Added Open disc and network panels.

  * Some changes to the control layout.
parent 1521d766
......@@ -3,31 +3,67 @@
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{
ACTIONS = {
fullscreen_toggle = id;
openFile = id;
faster = id;
next = id;
pause = id;
play = id;
prev = id;
quit = id;
speedslider_update = id;
slower = id;
stop = id;
timeslider_update = id;
timesliderUpdate = id;
};
CLASS = Intf_Controller;
LANGUAGE = ObjC;
OUTLETS = {
o_currenttime = id;
o_menu_fullscreen = id;
o_pause = id;
o_play = id;
o_playlistds = id;
o_stepf = id;
o_stepr = id;
o_stop = id;
o_time = id;
o_timeslider = id;
o_window = id;
};
SUPERCLASS = NSObject;
},
{
ACTIONS = {
openDisc = id;
openDiscTypeChanged = id;
openFile = id;
openNet = id;
openNetBroadcast = id;
openNetChannel = id;
panelCancel = id;
panelOk = id;
};
CLASS = Intf_Open;
LANGUAGE = ObjC;
OUTLETS = {
o_disc_chapter = id;
o_disc_device = id;
o_disc_panel = id;
o_disc_title = id;
o_disc_type = id;
o_net_channel_addr = id;
o_net_channel_checkbox = id;
o_net_channel_port = id;
o_net_channel_port_label = id;
o_net_channel_pstepper = id;
o_net_panel = id;
o_net_protocol = id;
o_net_server_addr = id;
o_net_server_addr_label = id;
o_net_server_baddr = id;
o_net_server_bcheckbox = id;
o_net_server_port = id;
o_net_server_port_label = id;
o_net_server_pstepper = id;
};
SUPERCLASS = NSObject;
},
{
CLASS = Intf_PlaylistDS;
LANGUAGE = ObjC;
......
......@@ -3,21 +3,17 @@
<plist version="0.9">
<dict>
<key>IBDocumentLocation</key>
<string>120 494 428 240 0 0 1600 1178 </string>
<string>729 10 500 426 0 0 1600 1178 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
<string>73 282 257 44 0 0 1152 746 </string>
<string>108 456 205 44 0 0 1600 1178 </string>
<key>460</key>
<string>120 456 104 66 0 0 1600 1178 </string>
</dict>
<key>IBFramework Version</key>
<string>248.0</string>
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>5Q45</string>
<string>5Q125</string>
</dict>
</plist>
......@@ -79,6 +79,8 @@
F679974A020DCC2A01A80112,
F6EA76F5024171E201A80112,
F6EA76F6024171E201A80112,
F66B34EC0271A5AF01A80112,
F66B34ED0271A5AF01A80112,
);
isa = PBXGroup;
name = Files;
......@@ -338,6 +340,18 @@
//F62
//F63
//F64
F66B34EC0271A5AF01A80112 = {
isa = PBXFileReference;
name = intf_open.c;
path = plugins/macosx/intf_open.c;
refType = 4;
};
F66B34ED0271A5AF01A80112 = {
isa = PBXFileReference;
name = intf_open.h;
path = plugins/macosx/intf_open.h;
refType = 4;
};
F6799746020DCC2A01A80112 = {
isa = PBXFileReference;
name = intf_macosx.c;
......
macosx_SOURCES = macosx.c aout_macosx.c vout_macosx.c vout_window.c vout_qdview.c vout_vlc_wrapper.c intf_macosx.c intf_controller.c intf_vlc_wrapper.c
macosx_SOURCES = macosx.c aout_macosx.c vout_macosx.c vout_window.c vout_qdview.c vout_vlc_wrapper.c intf_macosx.c intf_controller.c intf_vlc_wrapper.c intf_open.c
......@@ -2,7 +2,7 @@
* intf_controller.c: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_controller.c,v 1.5 2002/04/16 23:00:54 massiot Exp $
* $Id: intf_controller.c,v 1.6 2002/04/23 03:21:21 jlj Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -67,7 +67,7 @@
{
if( [o_intf playlistPlaying] )
{
[o_currenttime setStringValue: [o_intf getTimeAsString]];
[o_time setStringValue: [o_intf getTimeAsString]];
if( f_slider == f_slider_old )
{
......@@ -120,43 +120,42 @@
/* Functions attached to user interface */
- (IBAction)openFile:(id)sender
- (IBAction)pause:(id)sender
{
NSOpenPanel *o_panel = [NSOpenPanel openPanel];
[o_panel setAllowsMultipleSelection: YES];
[o_intf playlistPause];
}
if( [o_panel runModalForDirectory: NSHomeDirectory()
file: nil types: nil] == NSOKButton )
{
NSString *o_file;
NSEnumerator *o_files = [[o_panel filenames] objectEnumerator];
- (IBAction)play:(id)sender
{
[o_intf playlistPlay];
}
while( ( o_file = (NSString *)[o_files nextObject] ) )
{
[o_intf playlistAdd: o_file];
}
- (IBAction)stop:(id)sender
{
[o_intf playlistStop];
}
[o_intf playlistPlayCurrent];
}
- (IBAction)faster:(id)sender
{
[o_intf playFaster];
}
- (IBAction)pause:(id)sender
- (IBAction)slower:(id)sender
{
[o_intf playlistPause];
[o_intf playSlower];
}
- (IBAction)play:(id)sender
- (IBAction)prev:(id)sender
{
[o_intf playlistPlayCurrent];
[o_intf playlistPrev];
}
- (IBAction)stop:(id)sender
- (IBAction)next:(id)sender
{
[o_intf playlistStop];
[o_intf playlistNext];
}
- (IBAction)timeslider_update:(id)slider
- (IBAction)timesliderUpdate:(id)slider
{
switch( [[NSApp currentEvent] type] )
{
......@@ -174,16 +173,6 @@
}
}
- (IBAction)speedslider_update:(id)slider
{
[o_intf setSpeed: (intf_speed_t)[slider intValue]];
}
- (IBAction)fullscreen_toggle:(id)sender
{
}
- (IBAction)quit:(id)sender
{
[o_intf quit];
......
......@@ -2,7 +2,7 @@
* intf_controller.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_controller.h,v 1.4 2002/03/19 03:33:52 jlj Exp $
* $Id: intf_controller.h,v 1.5 2002/04/23 03:21:21 jlj Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
*
......@@ -54,8 +54,7 @@
IBOutlet NSButton *o_stepr;
IBOutlet NSButton *o_stepf;
IBOutlet NSSlider *o_timeslider;
IBOutlet NSTextField *o_currenttime;
IBOutlet NSMenuItem *o_menu_fs;
IBOutlet NSTextField *o_time;
IBOutlet Intf_PlaylistDS *o_playlistds;
}
......@@ -67,13 +66,14 @@
- (void)terminate;
/* Functions atteched to user interface */
- (IBAction)openFile:(id)sender;
- (IBAction)pause:(id)sender;
- (IBAction)play:(id)sender;
- (IBAction)stop:(id)sender;
- (IBAction)timeslider_update:(id)slider;
- (IBAction)speedslider_update:(id)slider;
- (IBAction)fullscreen_toggle:(id)sender;
- (IBAction)faster:(id)sender;
- (IBAction)slower:(id)sender;
- (IBAction)prev:(id)sender;
- (IBAction)next:(id)sender;
- (IBAction)timesliderUpdate:(id)slider;
- (IBAction)quit:(id)sender;
@end
This diff is collapsed.
/*****************************************************************************
* intf_open.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_open.h,v 1.1 2002/04/23 03:21:21 jlj Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#import <Cocoa/Cocoa.h>
/*****************************************************************************
* Intf_Open interface
*****************************************************************************/
@interface Intf_Open : NSObject
{
IBOutlet id o_disc_panel;
IBOutlet id o_disc_type;
IBOutlet id o_disc_title;
IBOutlet id o_disc_chapter;
IBOutlet id o_disc_device;
IBOutlet id o_net_panel;
IBOutlet id o_net_protocol;
IBOutlet id o_net_channel_addr;
IBOutlet id o_net_channel_checkbox;
IBOutlet id o_net_channel_port;
IBOutlet id o_net_channel_port_label;
IBOutlet id o_net_channel_pstepper;
IBOutlet id o_net_server_addr;
IBOutlet id o_net_server_addr_label;
IBOutlet id o_net_server_baddr;
IBOutlet id o_net_server_bcheckbox;
IBOutlet id o_net_server_port;
IBOutlet id o_net_server_port_label;
IBOutlet id o_net_server_pstepper;
}
- (id)init;
+ (Intf_Open *)instance;
- (void)awakeFromNib;
- (IBAction)openDisc:(id)sender;
- (IBAction)openDiscTypeChanged:(id)sender;
- (IBAction)openFile:(id)sender;
- (IBAction)openNet:(id)sender;
- (IBAction)openNetBroadcast:(id)sender;
- (IBAction)openNetChannel:(id)sender;
- (IBAction)panelCancel:(id)sender;
- (IBAction)panelOk:(id)sender;
@end
This diff is collapsed.
......@@ -2,7 +2,7 @@
* intf_vlc_wrapper.h: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.h,v 1.4 2002/03/19 03:33:52 jlj Exp $
* $Id: intf_vlc_wrapper.h,v 1.5 2002/04/23 03:21:21 jlj Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -22,45 +22,50 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
typedef enum intf_speed_e
{
SPEED_SLOW = 0,
SPEED_NORMAL,
SPEED_FAST
} intf_speed_t;
/* Intf_VLCWrapper is a singleton class
(only one instance at any time) */
@interface Intf_VLCWrapper : NSObject
{
intf_speed_t e_speed;
}
/* Initialization */
/* initialization */
+ (Intf_VLCWrapper *)instance;
- (bool)manage;
- (void)quit;
/* Playback control */
- (void)setSpeed:(intf_speed_t)e_speed;
/* playback control */
- (bool)playlistPlay;
- (void)playlistPause;
- (void)playlistStop;
- (void)playlistNext;
- (void)playlistPrev;
- (void)playSlower;
- (void)playFaster;
/* playback info */
- (NSString *)getTimeAsString;
- (float)getTimeAsFloat;
- (void)setTimeAsFloat:(float)i_offset;
/* Playlist control */
- (bool)playlistPlaying;
- (NSArray *)playlistAsArray;
/*
- (int)playlistLength;
- (NSString *)playlistItem:(int)i_pos;
- (bool)playlistPlayCurrent;
- (void)playlistPause;
- (void)playlistStop;
- (void)playlistPlayNext;
- (void)playlistPlayPrev;
- (void)playlistPlayItem:(int)i_item;
- (void)playlistAdd:(NSString *)o_filename;
- (void)clearPlaylist;
- (bool)playlistPlaying;
*/
/* open file/disc/network */
- (void)openFiles:(NSArray*)o_files;
- (void)openDisc:(NSString*)o_type device:(NSString*)o_device title:(int)i_title chapter:(int)i_chapter;
- (void)openNet:(NSString*)o_protocol addr:(NSString*)o_addr port:(int)i_port baddr:(NSString*)o_baddr;
- (void)openNetChannel:(NSString*)o_addr port:(int)i_port;
@end
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