* MediaControlView.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: MediaControlView.cpp,v 1.20 2003/09/07 22:53:09 fenrir Exp $
+ * $Id: MediaControlView.cpp,v 1.21 2003/12/28 01:49:12 titer Exp $
*
* Authors: Tony Castley <tony@castley.net>
* Stephan Aßmus <stippi@yellowbites.com>
/* VLC headers */
#include <vlc/vlc.h>
#include <vlc/intf.h>
+extern "C"
+{
+ #include <audio_output.h>
+}
/* BeOS interface headers */
#include "VlcWrapper.h"
InterfaceWindow* window = dynamic_cast<InterfaceWindow*>(Window());
if (window && window->IsStopped())
fPlayPause->SetStopped();
+
+ unsigned short i_volume;
+ aout_VolumeGet( p_intf, (audio_volume_t*)&i_volume );
+ fVolumeSlider->SetValue( i_volume );
}
// SetProgress
* vout_beos.cpp: beos video output display method
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: VideoOutput.cpp,v 1.28 2003/12/22 11:14:25 titer Exp $
+ * $Id: VideoOutput.cpp,v 1.29 2003/12/28 01:49:12 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
AddShortcut( '2', 0, new BMessage( RESIZE_100 ) );
AddShortcut( '3', 0, new BMessage( RESIZE_200 ) );
- // workaround to have Alt+X shortcuts working
- BMessage * message;
- for( unsigned i = 1; /* skip KEY_UNSET */
- i < sizeof( vlc_keys ) / sizeof( key_descriptor_t ); i++ )
- {
- /* Alt+X */
- message = new BMessage( SHORTCUT );
- message->AddInt32( "key", vlc_keys[i].i_key_code | KEY_MODIFIER_ALT );
- AddShortcut( ConvertKeyFromVLC( vlc_keys[i].i_key_code ),
- 0, message );
-
- /* Alt+Shift+X */
- message = new BMessage( SHORTCUT );
- message->AddInt32( "key", vlc_keys[i].i_key_code |
- KEY_MODIFIER_ALT | KEY_MODIFIER_SHIFT );
- AddShortcut( ConvertKeyFromVLC( vlc_keys[i].i_key_code ),
- B_SHIFT_KEY, message );
-
- /* Alt+Ctrl+X */
- message = new BMessage( SHORTCUT );
- message->AddInt32( "key", vlc_keys[i].i_key_code |
- KEY_MODIFIER_ALT | KEY_MODIFIER_CTRL );
- AddShortcut( ConvertKeyFromVLC( vlc_keys[i].i_key_code ),
- B_CONTROL_KEY, message );
-
- /* Alt+Shift+Ctrl+X */
- message = new BMessage( SHORTCUT );
- message->AddInt32( "key", vlc_keys[i].i_key_code |
- KEY_MODIFIER_ALT | KEY_MODIFIER_SHIFT | KEY_MODIFIER_CTRL );
- AddShortcut( ConvertKeyFromVLC( vlc_keys[i].i_key_code ),
- B_SHIFT_KEY | B_CONTROL_KEY, message );
- }
-
_SetToSettings();
}
menu->AddSeparatorItem();
- // Windwo Feel Items
+ // Window Feel Items
/* BMessage *winNormFeel = new BMessage(WINDOW_FEEL);
winNormFeel->AddInt32("WinFeel", (int32_t)B_NORMAL_WINDOW_FEEL);
BMenuItem *normWindItem = new BMenuItem("Normal Window", winNormFeel);
}
/*****************************************************************************
- * VLCVIew::KeyDown
+ * VLCVIew::KeyUp
*****************************************************************************/
-void VLCView::KeyDown( const char *bytes, int32 numBytes )
+void VLCView::KeyUp( const char *bytes, int32 numBytes )
{
if( numBytes < 1 )
{
}
uint32_t mods = modifiers();
- vlc_value_t val;
+ vlc_value_t val;
val.i_int = ConvertKeyToVLC( *bytes );
+ if( mods & B_COMMAND_KEY )
+ {
+ val.i_int |= KEY_MODIFIER_ALT;
+ }
if( mods & B_SHIFT_KEY )
{
val.i_int |= KEY_MODIFIER_SHIFT;
* VideoWindow.h: BeOS video window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: VideoWindow.h,v 1.10 2003/12/22 11:14:25 titer Exp $
+ * $Id: VideoWindow.h,v 1.11 2003/12/28 01:49:12 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
const BMessage* dragMessage);
virtual void Pulse();
virtual void Draw(BRect updateRect);
- virtual void KeyDown(const char* bytes, int32 numBytes);
+ virtual void KeyUp(const char* bytes, int32 numBytes);
private:
vout_thread_t *p_vout;