Commit 254f695e authored by Eric Petit's avatar Eric Petit

+ src/libvlc.h: use KEY_SPACE instead of ' '

 + gui/beos/*: got rid of the VlcWrapper thing which is unneccessaraly
               complex now that we have variables

 Language/subtitle selection works again in the BeOS UI, but there's
 still a lot to fix :|
parent 4632a220
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface * intf_beos.cpp: beos interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: Interface.cpp,v 1.16 2004/01/26 16:52:31 zorglub Exp $ * $Id$
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -41,10 +41,17 @@ ...@@ -41,10 +41,17 @@
#include <vlc/aout.h> #include <vlc/aout.h>
#include <aout_internal.h> #include <aout_internal.h>
#include "VlcWrapper.h"
#include "InterfaceWindow.h" #include "InterfaceWindow.h"
#include "MsgVals.h" #include "MsgVals.h"
/*****************************************************************************
* intf_sys_t: internal variables of the BeOS interface
*****************************************************************************/
struct intf_sys_t
{
InterfaceWindow * p_window;
};
/***************************************************************************** /*****************************************************************************
* Local prototype * Local prototype
*****************************************************************************/ *****************************************************************************/
...@@ -59,44 +66,36 @@ int E_(OpenIntf) ( vlc_object_t *p_this ) ...@@ -59,44 +66,36 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
/* Allocate instance and initialize some members */ /* Allocate instance and initialize some members */
p_intf->p_sys = (intf_sys_t*) malloc( sizeof( intf_sys_t ) ); p_intf->p_sys = (intf_sys_t*) malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL ) if( !p_intf->p_sys )
{ {
msg_Err( p_intf, "out of memory" ); msg_Err( p_intf, "out of memory" );
return( 1 ); return VLC_EGENERIC;
} }
p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
p_intf->p_sys->p_wrapper = new VlcWrapper( p_intf );
p_intf->pf_run = Run; p_intf->pf_run = Run;
/* Create the interface window */ /* Create the interface window */
BScreen screen(B_MAIN_SCREEN_ID); BScreen screen( B_MAIN_SCREEN_ID );
BRect rect = screen.Frame(); BRect rect = screen.Frame();
rect.top = rect.bottom-100; rect.top = rect.bottom - 100;
rect.bottom -= 50; rect.bottom -= 50;
rect.left += 50; rect.left += 50;
rect.right = rect.left + 350; rect.right = rect.left + 350;
p_intf->p_sys->p_window = p_intf->p_sys->p_window =
new InterfaceWindow( rect, new InterfaceWindow( p_intf, rect, "VLC " VERSION );
"VLC " PACKAGE_VERSION, if( !p_intf->p_sys->p_window )
p_intf );
if( p_intf->p_sys->p_window == 0 )
{ {
free( p_intf->p_sys ); free( p_intf->p_sys );
msg_Err( p_intf, "cannot allocate InterfaceWindow" ); msg_Err( p_intf, "cannot allocate InterfaceWindow" );
return( 1 ); return VLC_EGENERIC;
}
else
{
/* Make the be_app aware the interface has been created */
BMessage message(INTERFACE_CREATED);
message.AddPointer("window", p_intf->p_sys->p_window);
be_app->PostMessage(&message);
} }
p_intf->p_sys->b_loop = 0;
p_intf->p_sys->b_mute = 0; /* Make the be_app aware the interface has been created */
BMessage message( INTERFACE_CREATED );
return( 0 ); message.AddPointer( "window", p_intf->p_sys->p_window );
be_app->PostMessage( &message );
return VLC_SUCCESS;
} }
/***************************************************************************** /*****************************************************************************
...@@ -106,14 +105,11 @@ void E_(CloseIntf) ( vlc_object_t *p_this ) ...@@ -106,14 +105,11 @@ void E_(CloseIntf) ( vlc_object_t *p_this )
{ {
intf_thread_t *p_intf = (intf_thread_t*) p_this; intf_thread_t *p_intf = (intf_thread_t*) p_this;
msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
/* Destroy the interface window */ /* Destroy the interface window */
if( p_intf->p_sys->p_window->Lock() ) if( p_intf->p_sys->p_window->Lock() )
p_intf->p_sys->p_window->Quit(); p_intf->p_sys->p_window->Quit();
/* Destroy structure */ /* Destroy structure */
delete p_intf->p_sys->p_wrapper;
free( p_intf->p_sys ); free( p_intf->p_sys );
} }
...@@ -125,13 +121,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -125,13 +121,7 @@ static void Run( intf_thread_t *p_intf )
{ {
while( !p_intf->b_die ) while( !p_intf->b_die )
{ {
/* Update VlcWrapper internals (p_input, etc) */
p_intf->p_sys->p_wrapper->UpdateInput();
/* Manage the slider */
p_intf->p_sys->p_window->UpdateInterface(); p_intf->p_sys->p_window->UpdateInterface();
/* Wait a bit */
msleep( INTF_IDLE_SLEEP ); msleep( INTF_IDLE_SLEEP );
} }
} }
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* InterfaceWindow.h: BeOS interface window class prototype * InterfaceWindow.h: BeOS interface window class prototype
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.h,v 1.15 2004/01/26 16:52:31 zorglub Exp $ * $Id$
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au> * Tony Castley <tcastley@mail.powerup.com.au>
...@@ -36,7 +36,6 @@ class PlayListWindow; ...@@ -36,7 +36,6 @@ class PlayListWindow;
class BFilePanel; class BFilePanel;
class PreferencesWindow; class PreferencesWindow;
class MessagesWindow; class MessagesWindow;
class VlcWrapper;
class CDMenu : public BMenu class CDMenu : public BMenu
{ {
...@@ -53,16 +52,16 @@ class CDMenu : public BMenu ...@@ -53,16 +52,16 @@ class CDMenu : public BMenu
class LanguageMenu : public BMenu class LanguageMenu : public BMenu
{ {
public: public:
LanguageMenu( const char* name, LanguageMenu( intf_thread_t * p_intf,
int menu_kind, const char * psz_name,
VlcWrapper *p_wrapper ); char * psz_variable );
virtual ~LanguageMenu(); virtual ~LanguageMenu();
virtual void AttachedToWindow(); virtual void AttachedToWindow();
private: private:
VlcWrapper * p_wrapper; intf_thread_t * p_intf;
int kind; char * psz_variable;
}; };
class TitleMenu : public BMenu class TitleMenu : public BMenu
...@@ -91,9 +90,9 @@ class ChapterMenu : public BMenu ...@@ -91,9 +90,9 @@ class ChapterMenu : public BMenu
class InterfaceWindow : public BWindow class InterfaceWindow : public BWindow
{ {
public: public:
InterfaceWindow( BRect frame, InterfaceWindow( intf_thread_t * p_intf,
const char* name, BRect frame,
intf_thread_t* p_interface ); const char * name );
virtual ~InterfaceWindow(); virtual ~InterfaceWindow();
// BWindow // BWindow
...@@ -119,10 +118,11 @@ class InterfaceWindow : public BWindow ...@@ -119,10 +118,11 @@ class InterfaceWindow : public BWindow
void _RestoreSettings(); void _RestoreSettings();
void _StoreSettings(); void _StoreSettings();
intf_thread_t* p_intf; intf_thread_t * p_intf;
es_descriptor_t* p_spu_es; input_thread_t * p_input;
playlist_t * p_playlist;
es_descriptor_t * p_spu_es;
bool fPlaylistIsEmpty;
BFilePanel* fFilePanel; BFilePanel* fFilePanel;
PlayListWindow* fPlaylistWindow; PlayListWindow* fPlaylistWindow;
PreferencesWindow* fPreferencesWindow; PreferencesWindow* fPreferencesWindow;
...@@ -151,7 +151,6 @@ class InterfaceWindow : public BWindow ...@@ -151,7 +151,6 @@ class InterfaceWindow : public BWindow
bigtime_t fLastUpdateTime; bigtime_t fLastUpdateTime;
BMessage* fSettings; // we keep the message arround BMessage* fSettings; // we keep the message arround
// for forward compatibility // for forward compatibility
VlcWrapper* p_wrapper;
}; };
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ListViews.h: BeOS interface list view class prototype * ListViews.h: BeOS interface list view class prototype
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: ListViews.h,v 1.5 2004/01/26 16:52:31 zorglub Exp $ * $Id$
* *
* Authors: Stephan Aßmus <stippi@yellowbites.com> * Authors: Stephan Aßmus <stippi@yellowbites.com>
* *
...@@ -113,9 +113,9 @@ class DragSortableListView : public BListView ...@@ -113,9 +113,9 @@ class DragSortableListView : public BListView
class PlaylistView : public DragSortableListView class PlaylistView : public DragSortableListView
{ {
public: public:
PlaylistView( BRect frame, PlaylistView( intf_thread_t * p_intf,
BRect frame,
InterfaceWindow* mainWindow, InterfaceWindow* mainWindow,
VlcWrapper* wrapper,
BMessage* selectionChangeMessage = NULL ); BMessage* selectionChangeMessage = NULL );
~PlaylistView(); ~PlaylistView();
...@@ -154,14 +154,14 @@ class PlaylistView : public DragSortableListView ...@@ -154,14 +154,14 @@ class PlaylistView : public DragSortableListView
BListItem* _PlayingItem() const; BListItem* _PlayingItem() const;
void _SetPlayingIndex( BListItem* item ); void _SetPlayingIndex( BListItem* item );
intf_thread_t * p_intf;
int32 fCurrentIndex; int32 fCurrentIndex;
bool fPlaying; bool fPlaying;
uint32 fDisplayMode; uint32 fDisplayMode;
InterfaceWindow* fMainWindow; InterfaceWindow* fMainWindow;
BMessage* fSelectionChangeMessage; BMessage* fSelectionChangeMessage;
PlaylistItem* fLastClickedItem; PlaylistItem* fLastClickedItem;
VlcWrapper* fVlcWrapper;
}; };
#endif // LIST_VIEWS_H #endif // LIST_VIEWS_H
...@@ -38,7 +38,6 @@ extern "C" ...@@ -38,7 +38,6 @@ extern "C"
} }
/* BeOS interface headers */ /* BeOS interface headers */
#include "VlcWrapper.h"
#include "Bitmaps.h" #include "Bitmaps.h"
#include "DrawingTidbits.h" #include "DrawingTidbits.h"
#include "InterfaceWindow.h" #include "InterfaceWindow.h"
...@@ -67,6 +66,7 @@ const rgb_color kSeekRedLight = (rgb_color){ 255, 152, 152, 255 }; ...@@ -67,6 +66,7 @@ const rgb_color kSeekRedLight = (rgb_color){ 255, 152, 152, 255 };
const rgb_color kSeekRedShadow = (rgb_color){ 178, 0, 0, 255 }; const rgb_color kSeekRedShadow = (rgb_color){ 178, 0, 0, 255 };
#define DISABLED_SEEK_MESSAGE _("Drop files to play") #define DISABLED_SEEK_MESSAGE _("Drop files to play")
#define SEEKSLIDER_RANGE 2048
enum enum
{ {
...@@ -77,17 +77,16 @@ enum ...@@ -77,17 +77,16 @@ enum
}; };
// constructor // constructor
MediaControlView::MediaControlView(BRect frame, intf_thread_t *p_interface) MediaControlView::MediaControlView( intf_thread_t * _p_intf, BRect frame)
: BBox(frame, NULL, B_FOLLOW_NONE, B_WILL_DRAW | B_FRAME_EVENTS | B_PULSE_NEEDED, : BBox(frame, NULL, B_FOLLOW_NONE, B_WILL_DRAW | B_FRAME_EVENTS | B_PULSE_NEEDED,
B_PLAIN_BORDER), B_PLAIN_BORDER),
p_intf( _p_intf ),
fScrubSem(B_ERROR), fScrubSem(B_ERROR),
fCurrentRate(INPUT_RATE_DEFAULT), fCurrentRate(INPUT_RATE_DEFAULT),
fCurrentStatus(-1), fCurrentStatus(-1),
fBottomControlHeight(0.0), fBottomControlHeight(0.0),
fIsEnabled( true ) fIsEnabled( true )
{ {
p_intf = p_interface;
BRect frame(0.0, 0.0, 10.0, 10.0); BRect frame(0.0, 0.0, 10.0, 10.0);
// Seek Slider // Seek Slider
...@@ -1335,6 +1334,7 @@ PositionInfoView::Pulse() ...@@ -1335,6 +1334,7 @@ PositionInfoView::Pulse()
bigtime_t now = system_time(); bigtime_t now = system_time();
if ( now - fLastPulseUpdate > 900000 ) if ( now - fLastPulseUpdate > 900000 )
{ {
#if 0
int32 index, size; int32 index, size;
p_intf->p_sys->p_wrapper->GetPlaylistInfo( index, size ); p_intf->p_sys->p_wrapper->GetPlaylistInfo( index, size );
SetFile( index + 1, size ); SetFile( index + 1, size );
...@@ -1344,6 +1344,7 @@ PositionInfoView::Pulse() ...@@ -1344,6 +1344,7 @@ PositionInfoView::Pulse()
SetChapter( index, size ); SetChapter( index, size );
SetTime( p_intf->p_sys->p_wrapper->GetTimeAsString() ); SetTime( p_intf->p_sys->p_wrapper->GetTimeAsString() );
fLastPulseUpdate = now; fLastPulseUpdate = now;
#endif
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* MediaControlView.h: beos interface * MediaControlView.h: beos interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: MediaControlView.h,v 1.5 2003/01/25 01:03:44 titer Exp $ * $Id$
* *
* Authors: Tony Castley <tony@castley.net> * Authors: Tony Castley <tony@castley.net>
* Stephan Aßmus <stippi@yellowbites.com> * Stephan Aßmus <stippi@yellowbites.com>
...@@ -38,7 +38,7 @@ class VolumeSlider; ...@@ -38,7 +38,7 @@ class VolumeSlider;
class MediaControlView : public BBox class MediaControlView : public BBox
{ {
public: public:
MediaControlView( BRect frame, intf_thread_t *p_intf ); MediaControlView( intf_thread_t * p_intf, BRect frame );
virtual ~MediaControlView(); virtual ~MediaControlView();
// BBox // BBox
...@@ -70,6 +70,7 @@ class MediaControlView : public BBox ...@@ -70,6 +70,7 @@ class MediaControlView : public BBox
bool resizeWidth = false, bool resizeWidth = false,
bool resizeHeight = false) const; bool resizeHeight = false) const;
intf_thread_t * p_intf;
VolumeSlider* fVolumeSlider; VolumeSlider* fVolumeSlider;
SeekSlider* fSeekSlider; SeekSlider* fSeekSlider;
...@@ -88,7 +89,6 @@ class MediaControlView : public BBox ...@@ -88,7 +89,6 @@ class MediaControlView : public BBox
BRect fOldBounds; BRect fOldBounds;
bool fIsEnabled; bool fIsEnabled;
intf_thread_t * p_intf;
}; };
class SeekSlider : public BControl class SeekSlider : public BControl
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* MessagesWindow.cpp: beos interface * MessagesWindow.cpp: beos interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: MessagesWindow.cpp,v 1.12 2004/01/26 16:52:31 zorglub Exp $ * $Id$
* *
* Authors: Eric Petit <titer@videolan.org> * Authors: Eric Petit <titer@videolan.org>
* *
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <vlc/intf.h> #include <vlc/intf.h>
/* BeOS module headers */ /* BeOS module headers */
#include "VlcWrapper.h"
#include "InterfaceWindow.h" #include "InterfaceWindow.h"
#include "MessagesWindow.h" #include "MessagesWindow.h"
...@@ -39,6 +38,7 @@ ...@@ -39,6 +38,7 @@
*****************************************************************************/ *****************************************************************************/
void MessagesView::Pulse() void MessagesView::Pulse()
{ {
#if 0
bool isScrolling = false; bool isScrolling = false;
if( fScrollBar->LockLooper() ) if( fScrollBar->LockLooper() )
{ {
...@@ -123,6 +123,7 @@ void MessagesView::Pulse() ...@@ -123,6 +123,7 @@ void MessagesView::Pulse()
} }
BTextView::Pulse(); BTextView::Pulse();
#endif
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* MessagesWindow.h * MessagesWindow.h
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: MessagesWindow.h,v 1.4 2003/05/17 18:30:41 titer Exp $ * $Id$
* *
* Authors: Eric Petit <titer@videolan.org> * Authors: Eric Petit <titer@videolan.org>
* *
...@@ -36,7 +36,6 @@ class MessagesView : public BTextView ...@@ -36,7 +36,6 @@ class MessagesView : public BTextView
resizingMode, flags ) resizingMode, flags )
{ {
p_intf = _p_intf; p_intf = _p_intf;
p_sub = ((intf_sys_t*)p_intf->p_sys)->p_sub;
} }
virtual void Pulse(); virtual void Pulse();
......
...@@ -19,8 +19,6 @@ SOURCES_beos = \ ...@@ -19,8 +19,6 @@ SOURCES_beos = \
MessagesWindow.h \ MessagesWindow.h \
MediaControlView.cpp \ MediaControlView.cpp \
MediaControlView.h \ MediaControlView.h \
VlcWrapper.cpp \
VlcWrapper.h \
Bitmaps.h \ Bitmaps.h \
MsgVals.h \ MsgVals.h \
VideoWindow.h \ VideoWindow.h \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* PlayListWindow.cpp: beos interface * PlayListWindow.cpp: beos interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PlayListWindow.cpp,v 1.10 2004/01/26 16:52:31 zorglub Exp $ * $Id$
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <vlc/intf.h> #include <vlc/intf.h>
/* BeOS interface headers */ /* BeOS interface headers */
#include "VlcWrapper.h"
#include "InterfaceWindow.h" #include "InterfaceWindow.h"
#include "ListViews.h" #include "ListViews.h"
#include "MsgVals.h" #include "MsgVals.h"
...@@ -67,8 +66,12 @@ PlayListWindow::PlayListWindow( BRect frame, const char* name, ...@@ -67,8 +66,12 @@ PlayListWindow::PlayListWindow( BRect frame, const char* name,
B_WILL_ACCEPT_FIRST_CLICK | B_ASYNCHRONOUS_CONTROLS ), B_WILL_ACCEPT_FIRST_CLICK | B_ASYNCHRONOUS_CONTROLS ),
fMainWindow( mainWindow ) fMainWindow( mainWindow )
{ {
char psz_tmp[1024];
#define ADD_ELLIPSIS( a ) \
memset( psz_tmp, 0, 1024 ); \
snprintf( psz_tmp, 1024, "%s%s", a, B_UTF8_ELLIPSIS );
p_intf = p_interface; p_intf = p_interface;
p_wrapper = p_intf->p_sys->p_wrapper;
SetName( _("playlist") ); SetName( _("playlist") );
...@@ -81,8 +84,8 @@ PlayListWindow::PlayListWindow( BRect frame, const char* name, ...@@ -81,8 +84,8 @@ PlayListWindow::PlayListWindow( BRect frame, const char* name,
// Add the File menu // Add the File menu
BMenu *fileMenu = new BMenu( _("File") ); BMenu *fileMenu = new BMenu( _("File") );
fMenuBar->AddItem( fileMenu ); fMenuBar->AddItem( fileMenu );
BMenuItem* item = new BMenuItem( _AddEllipsis(_("Open File")), ADD_ELLIPSIS( _("Open File") );
new BMessage( OPEN_FILE ), 'O' ); BMenuItem* item = new BMenuItem( psz_tmp, new BMessage( OPEN_FILE ), 'O' );
item->SetTarget( fMainWindow ); item->SetTarget( fMainWindow );
fileMenu->AddItem( item ); fileMenu->AddItem( item );
...@@ -154,7 +157,7 @@ fRandomizeMI->SetEnabled( false ); ...@@ -154,7 +157,7 @@ fRandomizeMI->SetEnabled( false );
frame.top += fMenuBar->Bounds().IntegerHeight() + 1; frame.top += fMenuBar->Bounds().IntegerHeight() + 1;
frame.right -= B_V_SCROLL_BAR_WIDTH; frame.right -= B_V_SCROLL_BAR_WIDTH;
fListView = new PlaylistView( frame, fMainWindow, p_wrapper, fListView = new PlaylistView( p_intf, frame, fMainWindow,
new BMessage( MSG_SELECTION_CHANGED ) ); new BMessage( MSG_SELECTION_CHANGED ) );
fBackgroundView = new BScrollView( "playlist scrollview", fBackgroundView = new BScrollView( "playlist scrollview",
fListView, B_FOLLOW_ALL_SIDES, fListView, B_FOLLOW_ALL_SIDES,
...@@ -282,9 +285,10 @@ PlayListWindow::UpdatePlaylist( bool rebuild ) ...@@ -282,9 +285,10 @@ PlayListWindow::UpdatePlaylist( bool rebuild )
{ {
if ( rebuild ) if ( rebuild )
fListView->RebuildList(); fListView->RebuildList();
#if 0
fListView->SetCurrent( p_wrapper->PlaylistCurrent() ); fListView->SetCurrent( p_wrapper->PlaylistCurrent() );
fListView->SetPlaying( p_wrapper->IsPlaying() ); fListView->SetPlaying( p_wrapper->IsPlaying() );
#endif
_CheckItemsEnableState(); _CheckItemsEnableState();
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* PlayListWindow.h: BeOS interface window class prototype * PlayListWindow.h: BeOS interface window class prototype
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PlayListWindow.h,v 1.8 2004/01/26 16:52:31 zorglub Exp $ * $Id$
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au> * Tony Castley <tcastley@mail.powerup.com.au>
...@@ -75,7 +75,6 @@ class PlayListWindow : public BWindow ...@@ -75,7 +75,6 @@ class PlayListWindow : public BWindow
BMenu* fViewMenu; BMenu* fViewMenu;
intf_thread_t * p_intf; intf_thread_t * p_intf;
VlcWrapper * p_wrapper;
}; };
#endif // BEOS_PLAY_LIST_WINDOW_H #endif // BEOS_PLAY_LIST_WINDOW_H
......
This diff is collapsed.
/*****************************************************************************
* VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: VlcWrapper.h,v 1.26 2003/06/22 00:40:18 titer Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
* Tony Castley <tony@castley.net>
* Stephan Aßmus <stippi@yellowbites.com>
* Eric Petit <titer@videolan.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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <SupportKit.h>
#define SEEKSLIDER_RANGE 2048
class InterfaceWindow;
class VlcWrapper;
/*****************************************************************************
* intf_sys_t: internal variables of the BeOS interface
*****************************************************************************/
struct intf_sys_t
{
msg_subscription_t * p_sub;
InterfaceWindow * p_window;
vlc_bool_t b_loop;
vlc_bool_t b_mute;
int i_part;
int i_channel;
VlcWrapper * p_wrapper;
};
/* Necessary because of i18n */
const char * _AddEllipsis( char * string );
/*****************************************************************************
* VlcWrapper
*****************************************************************************
* This class makes the link between the BeOS interface and the vlc core.
* There is only one VlcWrapper instance at any time, which is stored
* in p_intf->p_sys->p_wrapper
*****************************************************************************/
class VlcWrapper
{
public:
VlcWrapper( intf_thread_t *p_intf );
~VlcWrapper();
/* Input */
void UpdateInput();
bool HasInput();
int InputStatus();
int InputRate();
void InputSetRate( int rate );
BList * GetChannels( int i_cat );
void ToggleLanguage( int i_language );
void ToggleSubtitle( int i_subtitle );
const char * GetTimeAsString();
float GetTimeAsFloat();
void SetTimeAsFloat( float i_offset );
bool IsPlaying();
/* Playlist */
void OpenFiles( BList *o_files, bool replace = true,
int32 index = -1 );
void OpenDisc( BString o_type, BString o_device,
int i_title, int i_chapter );
int PlaylistSize();
char * PlaylistItemName( int );
int PlaylistCurrent();
bool PlaylistPlay();
void PlaylistPause();
void PlaylistStop();
void PlaylistNext();
void PlaylistPrev();
bool PlaylistPlaying();
void GetPlaylistInfo( int32& currentIndex,
int32& maxIndex );
void PlaylistJumpTo( int );
void GetNavCapabilities( bool * canSkipPrev,
bool * canSkipNext );
void NavigatePrev();
void NavigateNext();
/* Playlist manipulation */
bool PlaylistLock() const;
void PlaylistUnlock() const;
// playlist must be locked prior to calling all of these!
void* PlaylistItemAt( int index ) const;
// both functions return a copy of the removed item
// so that it can be added at another index
void* PlaylistRemoveItem( int index ) const;
void* PlaylistRemoveItem( void* item ) const;
// uses playlist_AddItem()
bool PlaylistAddItem( void* item, int index ) const;
void* PlaylistCloneItem( void* item ) const;
// only modifies playlist, doesn't effect playback
void PlaylistSetPlaying( int index ) const;
/* Audio */
unsigned short GetVolume();
void SetVolume( int value );
void VolumeMute();
void VolumeRestore();
bool IsMuted();
/* DVD */
bool IsUsingMenus();
bool HasTitles();
BList * GetTitles();
void PrevTitle();
void NextTitle();
void ToggleTitle( int i_title );
void TitleInfo( int32& currentIndex, int32& maxIndex );
bool HasChapters();
BList * GetChapters();
void PrevChapter();
void NextChapter();
void ToggleChapter( int i_chapter );
void ChapterInfo( int32& currentIndex, int32& maxIndex );
/* Miscellanous */
void LoadSubFile( const char * psz_file );
void FilterChange();
private:
intf_thread_t * p_intf;
input_thread_t * p_input;
playlist_t * p_playlist;
};
...@@ -1065,7 +1065,7 @@ vlc_module_begin(); ...@@ -1065,7 +1065,7 @@ vlc_module_begin();
#else #else
# define KEY_FULLSCREEN 'f' # define KEY_FULLSCREEN 'f'
# define KEY_PLAY_PAUSE ' ' # define KEY_PLAY_PAUSE KEY_SPACE
# define KEY_PAUSE KEY_UNSET # define KEY_PAUSE KEY_UNSET
# define KEY_PLAY KEY_UNSET # define KEY_PLAY KEY_UNSET
# define KEY_FASTER '+' # define KEY_FASTER '+'
......
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