{
- "Name" = "vlc suite";
- "Description" = "vlc specific classes.";
+ "Name" = "VLC suite";
+ "Description" = "VLC commands.";
"Commands" = {
"OpenURL" = {
Name = "GetURL";
Description = "Get a URL";
};
+ "play" = {
+ Name = "play";
+ Description = "Start playing the current playlistitem or pause it when it is already playing.";
+ };
+ "stop" = {
+ Name = "stop";
+ Description = "Stop playing the current playlistitem.";
+ };
+ "previous" = {
+ Name = "previous";
+ Description = "Go to the previous item in the playlist or the previous chapter in the DVD/VCD.";
+ };
+ "next" = {
+ Name = "next";
+ Description = "Go to the next item in the playlist or the next chapter in the DVD/VCD.";
+ };
+ "fullscreen" = {
+ Name = "fullscreen";
+ Description = "Toggle between fullscreen and windowed mode.";
+ };
+ "mute" = {
+ Name = "mute";
+ Description = "Mute the audio";
+ };
+ "volumeUp" = {
+ Name = "volumeUp";
+ Description = "Bring the volume up by one step. There are 32 steps from 0 to 100% volume.";
+ };
+ "volumeDown" = {
+ Name = "volumeDown";
+ Description = "Bring the volume down by one step. There are 32 steps from 0 to 100% volume.";
+ };
};
}
\ No newline at end of file
AppleEventCode = "GURL";
CommandClass = "VLGetURLScriptCommand";
};
+ "play" = {
+ AppleEventCode = "VLC1";
+ CommandClass = "VLControlScriptCommand";
+ };
+ "stop" = {
+ AppleEventCode = "VLC2";
+ CommandClass = "VLControlScriptCommand";
+ };
+ "previous" = {
+ AppleEventCode = "GURL";
+ CommandClass = "VLControlScriptCommand";
+ };
+ "next" = {
+ AppleEventCode = "VLC3";
+ CommandClass = "VLControlScriptCommand";
+ };
+ "fullscreen" = {
+ AppleEventCode = "VLC4";
+ CommandClass = "VLControlScriptCommand";
+ };
+ "mute" = {
+ AppleEventCode = "VLC5";
+ CommandClass = "VLControlScriptCommand";
+ };
+ "volumeUp" = {
+ AppleEventCode = "VLC6";
+ CommandClass = "VLControlScriptCommand";
+ };
+ "volumeDown" = {
+ AppleEventCode = "VLC7";
+ CommandClass = "VLControlScriptCommand";
+ };
};
}
\ No newline at end of file
};
08FB77AFFE84173DC02AAC07 = {
children = (
+ 8E6BC6F6041643860059A3A7,
+ 8E6BC6F7041643860059A3A7,
8ED6C27A03E2EB1C0059A3A7,
+ 8E6BC6FA041684EC0059A3A7,
8ED6C27B03E2EB1C0059A3A7,
8ED6C27C03E2EB1C0059A3A7,
8ED6C27D03E2EB1C0059A3A7,
settings = {
};
};
+ 8E6BC6F6041643860059A3A7 = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ name = applescript.h;
+ path = ../../modules/gui/macosx/applescript.h;
+ refType = 2;
+ };
+ 8E6BC6F7041643860059A3A7 = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ name = applescript.m;
+ path = ../../modules/gui/macosx/applescript.m;
+ refType = 2;
+ };
+ 8E6BC6FA041684EC0059A3A7 = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ name = controls.h;
+ path = ../../modules/gui/macosx/controls.h;
+ refType = 2;
+ };
8E88833C03DD6E870059A3A7 = {
isa = PBXFileReference;
name = slow.png;
SOURCES_macosx = \
+ modules/gui/macosx/applescript.h \
+ modules/gui/macosx/applescript.m \
modules/gui/macosx/aout.m \
+ modules/gui/macosx/controls.h \
modules/gui/macosx/controls.m \
modules/gui/macosx/intf.m \
modules/gui/macosx/intf.h \
--- /dev/null
+/*****************************************************************************
+ * applescript.h: MacOS X AppleScript support
+ *****************************************************************************
+ * Copyright (C) 2002-2003 VideoLAN
+ * $Id: applescript.h,v 1.1 2003/03/06 11:43:07 hartman Exp $
+ *
+ * Authors: Derk-Jan Hartman <thedj@users.sourceforge.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.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * VLGetURLScriptCommand interface
+ *****************************************************************************/
+@interface VLGetURLScriptCommand : NSScriptCommand
+@end
+
+/*****************************************************************************
+ * VLControlScriptCommand interface
+ *****************************************************************************/
+@interface VLControlScriptCommand : NSScriptCommand
+@end
\ No newline at end of file
--- /dev/null
+/*****************************************************************************
+ * applescript.m: MacOS X AppleScript support
+ *****************************************************************************
+ * Copyright (C) 2002-2003 VideoLAN
+ * $Id: applescript.m,v 1.1 2003/03/06 11:43:07 hartman Exp $
+ *
+ * Authors: Derk-Jan Hartman <thedj@users.sourceforge.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
+ *****************************************************************************/
+#include "intf.h"
+#include "applescript.h"
+#include "controls.h"
+#include "open.h"
+
+
+/*****************************************************************************
+ * VLGetURLScriptCommand implementation
+ *****************************************************************************/
+@implementation VLGetURLScriptCommand
+
+- (id)performDefaultImplementation {
+ NSString *o_command = [[self commandDescription] commandName];
+ NSString *o_urlString = [self directParameter];
+
+ if ( [o_command isEqualToString:@"GetURL"] || [o_command isEqualToString:@"OpenURL"] )
+ {
+ intf_thread_t * p_intf = [NSApp getIntf];
+ playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist == NULL )
+ {
+ return nil;
+ }
+
+ if ( o_urlString )
+ {
+ NSURL * o_url;
+
+ int i_mode = PLAYLIST_INSERT | PLAYLIST_GO;
+
+ playlist_Add( p_playlist, [o_urlString fileSystemRepresentation],
+ i_mode, PLAYLIST_END );
+
+ o_url = [NSURL fileURLWithPath: o_urlString];
+ if( o_url != nil )
+ {
+ [[NSDocumentController sharedDocumentController]
+ noteNewRecentDocumentURL: o_url];
+ }
+ }
+ vlc_object_release( p_playlist );
+ }
+ return nil;
+}
+
+@end
+
+
+/*****************************************************************************
+ * VLControlScriptCommand implementation
+ *****************************************************************************/
+/*
+ * This entire control command needs a better design. more object oriented.
+ * Applescript developers would be very welcome (hartman)
+ */
+@implementation VLControlScriptCommand
+
+- (id)performDefaultImplementation {
+ NSString *o_command = [[self commandDescription] commandName];
+
+ intf_thread_t * p_intf = [NSApp getIntf];
+ playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist == NULL )
+ {
+ return nil;
+ }
+
+ VLCControls * o_controls = (VLCControls *)[[NSApp delegate] getControls];
+
+ if ( o_controls )
+ {
+ if ( [o_command isEqualToString:@"play"] )
+ {
+ [o_controls play:self];
+ return nil;
+ }
+ else if ( [o_command isEqualToString:@"stop"] )
+ {
+ [o_controls stop:self];
+ return nil;
+ }
+ else if ( [o_command isEqualToString:@"previous"] )
+ {
+ [o_controls prev:self];
+ return nil;
+ }
+ else if ( [o_command isEqualToString:@"next"] )
+ {
+ [o_controls next:self];
+ return nil;
+ }
+ else if ( [o_command isEqualToString:@"fullscreen"] )
+ {
+ [o_controls fullscreen:self];
+ return nil;
+ }
+ else if ( [o_command isEqualToString:@"mute"] )
+ {
+ [o_controls mute:self];
+ return nil;
+ }
+ else if ( [o_command isEqualToString:@"volumeUp"] )
+ {
+ [o_controls volumeUp:self];
+ return nil;
+ }
+ else if ( [o_command isEqualToString:@"volumeDown"] )
+ {
+ [o_controls volumeDown:self];
+ return nil;
+ }
+ }
+ vlc_object_release( p_playlist );
+ return nil;
+}
+
+@end
\ No newline at end of file
--- /dev/null
+/*****************************************************************************
+ * controls.h: MacOS X interface plugin
+ *****************************************************************************
+ * Copyright (C) 2002-2003 VideoLAN
+ * $Id: controls.h,v 1.1 2003/03/06 11:43:07 hartman Exp $
+ *
+ * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
+ * Christophe Massiot <massiot@via.ecp.fr>
+ * Derk-Jan Hartman <thedj@users.sourceforge.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.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * VLCControls interface
+ *****************************************************************************/
+@interface VLCControls : NSObject
+{
+ IBOutlet id o_open;
+ IBOutlet id o_main;
+
+ IBOutlet id o_volumeslider;
+}
+
+- (IBAction)play:(id)sender;
+- (IBAction)stop:(id)sender;
+- (IBAction)faster:(id)sender;
+- (IBAction)slower:(id)sender;
+
+- (IBAction)prev:(id)sender;
+- (IBAction)next:(id)sender;
+- (IBAction)loop:(id)sender;
+
+- (IBAction)forward:(id)sender;
+- (IBAction)backward:(id)sender;
+
+- (IBAction)volumeUp:(id)sender;
+- (IBAction)volumeDown:(id)sender;
+- (IBAction)mute:(id)sender;
+- (IBAction)volumeSliderUpdated:(id)sender;
+- (void)updateVolumeSlider;
+
+- (IBAction)halfWindow:(id)sender;
+- (IBAction)normalWindow:(id)sender;
+- (IBAction)doubleWindow:(id)sender;
+- (IBAction)fullscreen:(id)sender;
+- (IBAction)deinterlace:(id)sender;
+
+- (IBAction)toggleProgram:(id)sender;
+- (IBAction)toggleTitle:(id)sender;
+- (IBAction)toggleChapter:(id)sender;
+- (IBAction)toggleLanguage:(id)sender;
+- (IBAction)toggleVar:(id)sender;
+
+@end
\ No newline at end of file
/*****************************************************************************
* controls.m: MacOS X interface plugin
*****************************************************************************
- * Copyright (C) 2002 VideoLAN
- * $Id: controls.m,v 1.28 2003/02/12 14:22:23 hartman Exp $
+ * Copyright (C) 2002-2003 VideoLAN
+ * $Id: controls.m,v 1.29 2003/03/06 11:43:07 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
#include "intf.h"
#include "vout.h"
-
-/*****************************************************************************
- * VLCControls interface
- *****************************************************************************/
-@interface VLCControls : NSObject
-{
- IBOutlet id o_open;
- IBOutlet id o_main;
-
- IBOutlet id o_volumeslider;
-}
-
-- (IBAction)play:(id)sender;
-- (IBAction)stop:(id)sender;
-- (IBAction)faster:(id)sender;
-- (IBAction)slower:(id)sender;
-
-- (IBAction)prev:(id)sender;
-- (IBAction)next:(id)sender;
-- (IBAction)loop:(id)sender;
-
-- (IBAction)forward:(id)sender;
-- (IBAction)backward:(id)sender;
-
-- (IBAction)volumeUp:(id)sender;
-- (IBAction)volumeDown:(id)sender;
-- (IBAction)mute:(id)sender;
-- (IBAction)volumeSliderUpdated:(id)sender;
-- (void)updateVolumeSlider;
-
-- (IBAction)halfWindow:(id)sender;
-- (IBAction)normalWindow:(id)sender;
-- (IBAction)doubleWindow:(id)sender;
-- (IBAction)fullscreen:(id)sender;
-- (IBAction)deinterlace:(id)sender;
-
-- (IBAction)toggleProgram:(id)sender;
-- (IBAction)toggleTitle:(id)sender;
-- (IBAction)toggleChapter:(id)sender;
-- (IBAction)toggleLanguage:(id)sender;
-- (IBAction)toggleVar:(id)sender;
-
-@end
+#include "controls.h"
/*****************************************************************************
* VLCControls implementation
/*****************************************************************************
* intf.h: MacOS X interface plugin
*****************************************************************************
- * Copyright (C) 2002 VideoLAN
- * $Id: intf.h,v 1.30 2003/03/04 17:31:45 hartman Exp $
+ * Copyright (C) 2002-2003 VideoLAN
+ * $Id: intf.h,v 1.31 2003/03/06 11:43:07 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
IBOutlet id o_dmi_previous;
}
+- (id)getControls;
+
- (void)terminate;
- (void)manage;
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
- * $Id: intf.m,v 1.65 2003/03/04 23:36:57 massiot Exp $
+ * $Id: intf.m,v 1.66 2003/03/06 11:43:07 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
return( TRUE );
}
+- (id)getControls
+{
+ if ( o_controls )
+ {
+ return o_controls;
+ }
+ return nil;
+}
+
- (void)manage
{
NSDate * o_sleep_date;
/*****************************************************************************
* open.h: MacOS X plugin for vlc
*****************************************************************************
- * Copyright (C) 2002 VideoLAN
- * $Id: open.h,v 1.11 2003/02/16 01:29:40 massiot Exp $
+ * Copyright (C) 2002-2003 VideoLAN
+ * $Id: open.h,v 1.12 2003/03/06 11:43:07 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
- (IBAction)openFile:(id)sender;
@end
-
-@interface VLGetURLScriptCommand : NSScriptCommand
-@end
/*****************************************************************************
* open.m: MacOS X plugin for vlc
*****************************************************************************
- * Copyright (C) 2002 VideoLAN
- * $Id: open.m,v 1.23 2003/02/16 01:29:40 massiot Exp $
+ * Copyright (C) 2002-2003 VideoLAN
+ * $Id: open.m,v 1.24 2003/03/06 11:43:07 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
}
@end
-
-@implementation VLGetURLScriptCommand
-
-- (id)performDefaultImplementation {
- NSString *o_command = [[self commandDescription] commandName];
- NSString *o_urlString = [self directParameter];
-
- NSLog(@"test1");
- if ( [o_command isEqualToString:@"GetURL"] || [o_command isEqualToString:@"OpenURL"] )
- {
- intf_thread_t * p_intf = [NSApp getIntf];
- NSLog( o_command );
- playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist == NULL )
- {
- return nil;
- }
-
- if ( o_urlString )
- {
- NSURL * o_url;
-
- int i_mode = PLAYLIST_INSERT | PLAYLIST_GO;
-
- playlist_Add( p_playlist, [o_urlString fileSystemRepresentation],
- i_mode, PLAYLIST_END );
- NSLog( o_urlString );
- o_url = [NSURL fileURLWithPath: o_urlString];
- if( o_url != nil )
- {
- [[NSDocumentController sharedDocumentController]
- noteNewRecentDocumentURL: o_url];
- }
- }
- vlc_object_release( p_playlist );
- }
- return nil;
-}
-
-@end
-
* playlist.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
- * $Id: playlist.m,v 1.12 2003/02/23 05:53:53 jlj Exp $
+ * $Id: playlist.m,v 1.13 2003/03/06 11:43:07 hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
+ * Derk-Jan Hartman <thedj@users.sourceforge.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
[o_mi_play setTitle: _NS("Play")];
[o_mi_delete setTitle: _NS("Delete")];
[o_mi_selectall setTitle: _NS("Select All")];
+
+ [o_btn_add setToolTip: _NS("Add")];
+ [o_btn_remove setToolTip: _NS("Delete")];
}
- (BOOL)tableView:(NSTableView *)o_tv
/*****************************************************************************
* vout.h: MacOS X interface plugin
*****************************************************************************
- * Copyright (C) 2001, 2002 VideoLAN
- * $Id: vout.h,v 1.9 2003/02/13 02:00:56 hartman Exp $
+ * Copyright (C) 2001-2003 VideoLAN
+ * $Id: vout.h,v 1.10 2003/03/06 11:43:07 hartman Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
* vout.m: MacOS X video output plugin
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
- * $Id: vout.m,v 1.36 2003/03/04 23:32:06 hartman Exp $
+ * $Id: vout.m,v 1.37 2003/03/06 11:43:07 hartman Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
- (void)otherMouseDown:(NSEvent *)o_event
{
+ /* This is not the the wheel button. you need to poll the
+ * mouseWheel event for that. other is a third, forth or fifth button */
vout_thread_t * p_vout;
id o_window = [self window];
p_vout = (vout_thread_t *)[o_window getVout];