Commit 02d360bd authored by Eric Petit's avatar Eric Petit

Added a window to see vlc messages.

parent 160a693d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* beos.cpp : BeOS plugin for vlc * beos.cpp : BeOS plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: BeOS.cpp,v 1.3 2003/01/25 01:03:44 titer Exp $ * $Id: BeOS.cpp,v 1.4 2003/01/25 20:15:41 titer Exp $
* *
* 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>
...@@ -59,6 +59,7 @@ vlc_module_begin(); ...@@ -59,6 +59,7 @@ vlc_module_begin();
add_integer( "beos-playlist-xpos", 0, NULL, "", "" ); add_integer( "beos-playlist-xpos", 0, NULL, "", "" );
add_integer( "beos-playlist-ypos", 0, NULL, "", "" ); add_integer( "beos-playlist-ypos", 0, NULL, "", "" );
add_bool( "beos-playlist-show", 0, NULL, "", "" ); add_bool( "beos-playlist-show", 0, NULL, "", "" );
add_bool( "beos-messages-show", 0, NULL, "", "" );
add_submodule(); add_submodule();
set_capability( "video output", 100 ); set_capability( "video output", 100 );
set_callbacks( E_(OpenVideo), E_(CloseVideo) ); set_callbacks( E_(OpenVideo), E_(CloseVideo) );
......
...@@ -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.7 2002/12/09 13:37:38 titer Exp $ * $Id: Interface.cpp,v 1.8 2003/01/25 20:15:41 titer Exp $
* *
* 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>
...@@ -55,15 +55,7 @@ static void Run ( intf_thread_t *p_intf ); ...@@ -55,15 +55,7 @@ static void Run ( intf_thread_t *p_intf );
*****************************************************************************/ *****************************************************************************/
int E_(OpenIntf) ( vlc_object_t *p_this ) int E_(OpenIntf) ( 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;
BScreen *screen;
screen = new BScreen();
BRect rect = screen->Frame();
rect.top = rect.bottom-100;
rect.bottom -= 50;
rect.left += 50;
rect.right = rect.left + 350;
delete screen;
/* 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 ) );
...@@ -73,11 +65,19 @@ int E_(OpenIntf) ( vlc_object_t *p_this ) ...@@ -73,11 +65,19 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
return( 1 ); return( 1 );
} }
p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
p_intf->p_sys->p_wrapper = new VlcWrapper( 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;
screen = new BScreen();
BRect rect = screen->Frame();
rect.top = rect.bottom-100;
rect.bottom -= 50;
rect.left += 50;
rect.right = rect.left + 350;
delete screen;
p_intf->p_sys->p_window = p_intf->p_sys->p_window =
new InterfaceWindow( rect, new InterfaceWindow( rect,
VOUT_TITLE " (BeOS interface)", p_intf ); VOUT_TITLE " (BeOS interface)", p_intf );
...@@ -87,9 +87,9 @@ int E_(OpenIntf) ( vlc_object_t *p_this ) ...@@ -87,9 +87,9 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
msg_Err( p_intf, "cannot allocate InterfaceWindow" ); msg_Err( p_intf, "cannot allocate InterfaceWindow" );
return( 1 ); return( 1 );
} else { } else {
BMessage message(INTERFACE_CREATED); BMessage message(INTERFACE_CREATED);
message.AddPointer("window", p_intf->p_sys->p_window); message.AddPointer("window", p_intf->p_sys->p_window);
be_app->PostMessage(&message); be_app->PostMessage(&message);
} }
p_intf->p_sys->i_saved_volume = AOUT_VOLUME_DEFAULT; p_intf->p_sys->i_saved_volume = AOUT_VOLUME_DEFAULT;
p_intf->p_sys->b_loop = 0; p_intf->p_sys->b_loop = 0;
...@@ -104,6 +104,8 @@ int E_(OpenIntf) ( vlc_object_t *p_this ) ...@@ -104,6 +104,8 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
void E_(CloseIntf) ( vlc_object_t *p_this ) 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 */
p_intf->p_sys->p_window->Lock(); p_intf->p_sys->p_window->Lock();
...@@ -125,7 +127,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -125,7 +127,7 @@ static void Run( intf_thread_t *p_intf )
if( p_intf->p_sys->p_wrapper->UpdateInputAndAOut() ) if( p_intf->p_sys->p_wrapper->UpdateInputAndAOut() )
{ {
/* Manage the slider */ /* Manage the slider */
p_intf->p_sys->p_window->updateInterface(); p_intf->p_sys->p_window->UpdateInterface();
} }
/* Wait a bit */ /* Wait a bit */
......
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.9 2003/01/22 01:13:22 titer Exp $ * $Id: InterfaceWindow.h,v 1.10 2003/01/25 20:15:41 titer Exp $
* *
* 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>
...@@ -35,115 +35,116 @@ class MediaControlView; ...@@ -35,115 +35,116 @@ class MediaControlView;
class PlayListWindow; class PlayListWindow;
class BFilePanel; class BFilePanel;
class PreferencesWindow; class PreferencesWindow;
class MessagesWindow;
class CDMenu : public BMenu class CDMenu : public BMenu
{ {
public: public:
CDMenu( const char* name ); CDMenu( const char* name );
virtual ~CDMenu(); virtual ~CDMenu();
virtual void AttachedToWindow(); virtual void AttachedToWindow();
private: private:
int GetCD( const char* directory ); int GetCD( const char* directory );
}; };
class LanguageMenu : public BMenu class LanguageMenu : public BMenu
{ {
public: public:
LanguageMenu( const char* name, LanguageMenu( const char* name,
int menu_kind, int menu_kind,
VlcWrapper *p_wrapper ); VlcWrapper *p_wrapper );
virtual ~LanguageMenu(); virtual ~LanguageMenu();
virtual void AttachedToWindow(); virtual void AttachedToWindow();
private: private:
void _GetChannels(); void _GetChannels();
VlcWrapper * p_wrapper; VlcWrapper * p_wrapper;
int kind; int kind;
}; };
class TitleMenu : public BMenu class TitleMenu : public BMenu
{ {
public: public:
TitleMenu( const char* name, intf_thread_t *p_interface ); TitleMenu( const char* name, intf_thread_t *p_interface );
virtual ~TitleMenu(); virtual ~TitleMenu();
virtual void AttachedToWindow(); virtual void AttachedToWindow();
intf_thread_t *p_intf; intf_thread_t *p_intf;
}; };
class ChapterMenu : public BMenu class ChapterMenu : public BMenu
{ {
public: public:
ChapterMenu( const char* name, intf_thread_t *p_interface ); ChapterMenu( const char* name, intf_thread_t *p_interface );
virtual ~ChapterMenu(); virtual ~ChapterMenu();
virtual void AttachedToWindow(); virtual void AttachedToWindow();
intf_thread_t *p_intf; intf_thread_t *p_intf;
}; };
class InterfaceWindow : public BWindow class InterfaceWindow : public BWindow
{ {
public: public:
InterfaceWindow( BRect frame, InterfaceWindow( BRect frame,
const char* name, const char* name,
intf_thread_t* p_interface ); intf_thread_t* p_interface );
virtual ~InterfaceWindow(); virtual ~InterfaceWindow();
// BWindow // BWindow
virtual void FrameResized( float width, float height ); virtual void FrameResized( float width, float height );
virtual void MessageReceived( BMessage* message ); virtual void MessageReceived( BMessage* message );
virtual bool QuitRequested(); virtual bool QuitRequested();
// InterfaceWindow // InterfaceWindow
void updateInterface(); void UpdateInterface();
bool IsStopped() const; bool IsStopped() const;
MediaControlView* p_mediaControl; MediaControlView* p_mediaControl;
private: private:
void _UpdatePlaylist(); void _UpdatePlaylist();
void _SetMenusEnabled( bool hasFile, void _SetMenusEnabled( bool hasFile,
bool hasChapters = false, bool hasChapters = false,
bool hasTitles = false ); bool hasTitles = false );
void _UpdateSpeedMenu( int rate ); void _UpdateSpeedMenu( int rate );
void _InputStreamChanged(); void _InputStreamChanged();
intf_thread_t* p_intf; intf_thread_t* p_intf;
es_descriptor_t* p_spu_es; es_descriptor_t* p_spu_es;
bool fPlaylistIsEmpty; bool fPlaylistIsEmpty;
BFilePanel* fFilePanel; BFilePanel* fFilePanel;
BFilePanel* fSubtitlesPanel; BFilePanel* fSubtitlesPanel;
PlayListWindow* fPlaylistWindow; PlayListWindow* fPlaylistWindow;
PreferencesWindow* fPreferencesWindow; PreferencesWindow* fPreferencesWindow;
BMenuBar* fMenuBar; MessagesWindow* fMessagesWindow;
BMenuItem* fNextTitleMI; BMenuBar* fMenuBar;
BMenuItem* fPrevTitleMI; BMenuItem* fNextTitleMI;
BMenuItem* fNextChapterMI; BMenuItem* fPrevTitleMI;
BMenuItem* fPrevChapterMI; BMenuItem* fNextChapterMI;
BMenuItem* fOnTopMI; BMenuItem* fPrevChapterMI;
BMenuItem* fSlowerMI; BMenuItem* fOnTopMI;
BMenuItem* fNormalMI; BMenuItem* fSlowerMI;
BMenuItem* fFasterMI; BMenuItem* fNormalMI;
BMenuItem* fPreferencesMI; BMenuItem* fFasterMI;
BMenu* fAudioMenu; BMenu* fAudioMenu;
BMenu* fNavigationMenu; BMenu* fNavigationMenu;
BMenu* fTitleMenu; BMenu* fTitleMenu;
BMenu* fChapterMenu; BMenu* fChapterMenu;
BMenu* fLanguageMenu; BMenu* fLanguageMenu;
BMenu* fSubtitlesMenu; BMenu* fSubtitlesMenu;
BMenu* fSpeedMenu; BMenu* fSpeedMenu;
BMenu* fSettingsMenu; BMenu* fShowMenu;
bigtime_t fLastUpdateTime; bigtime_t fLastUpdateTime;
VlcWrapper * p_wrapper; VlcWrapper * p_wrapper;
}; };
#endif // BEOS_INTERFACE_WINDOW_H #endif // BEOS_INTERFACE_WINDOW_H
/*****************************************************************************
* MessagesWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: MessagesWindow.cpp,v 1.1 2003/01/25 20:15:41 titer Exp $
*
* Authors: 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.
*****************************************************************************/
/* BeOS headers */
#include <InterfaceKit.h>
/* VLC headers */
#include <vlc/vlc.h>
#include <vlc/intf.h>
/* BeOS module headers */
#include "VlcWrapper.h"
#include "MessagesWindow.h"
/*****************************************************************************
* MessagesWindow::MessagesWindow
*****************************************************************************/
MessagesWindow::MessagesWindow( intf_thread_t * p_intf,
BRect frame, const char * name )
: BWindow( frame, name, B_FLOATING_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
B_NOT_ZOOMABLE )
{
this->p_intf = p_intf;
p_sub = p_intf->p_sys->p_sub;
BRect rect, rect2;
rect = Bounds();
rect.right -= B_V_SCROLL_BAR_WIDTH;
rect.bottom -= B_H_SCROLL_BAR_HEIGHT;
rect2 = rect;
rect2.InsetBy( 5, 5 );
fMessagesView = new BTextView( rect, "messages", rect2,
B_FOLLOW_ALL, B_WILL_DRAW );
fMessagesView->MakeEditable( false );
fScrollView = new BScrollView( "scrollview", fMessagesView, B_WILL_DRAW,
B_FOLLOW_ALL, true, true );
fScrollBar = fScrollView->ScrollBar( B_VERTICAL );
AddChild( fScrollView );
/* start window thread in hidden state */
Hide();
Show();
}
/*****************************************************************************
* MessagesWindow::~MessagesWindow
*****************************************************************************/
MessagesWindow::~MessagesWindow()
{
}
/*****************************************************************************
* MessagesWindow::QuitRequested
*****************************************************************************/
bool MessagesWindow::QuitRequested()
{
Hide();
return false;
}
/*****************************************************************************
* MessagesWindow::ReallyQuit
*****************************************************************************/
void MessagesWindow::ReallyQuit()
{
Hide();
Quit();
}
/*****************************************************************************
* MessagesWindow::UpdateMessages
*****************************************************************************/
void MessagesWindow::UpdateMessages()
{
int i_start;
vlc_mutex_lock( p_sub->p_lock );
int i_stop = *p_sub->pi_stop;
vlc_mutex_unlock( p_sub->p_lock );
if( p_sub->i_start != i_stop )
{
for( i_start = p_sub->i_start;
i_start != i_stop;
i_start = (i_start+1) % VLC_MSG_QSIZE )
{
/* Append all messages to log window */
/* textctrl->SetDefaultStyle( *dbg_attr );
(*textctrl) << p_sub->p_msg[i_start].psz_module; */
/* switch( p_sub->p_msg[i_start].i_type )
{
case VLC_MSG_INFO:
(*textctrl) << ": ";
textctrl->SetDefaultStyle( *info_attr );
break;
case VLC_MSG_ERR:
(*textctrl) << " error: ";
textctrl->SetDefaultStyle( *err_attr );
break;
case VLC_MSG_WARN:
(*textctrl) << " warning: ";
textctrl->SetDefaultStyle( *warn_attr );
break;
case VLC_MSG_DBG:
default:
(*textctrl) << " debug: ";
break;
} */
/* Add message */
fMessagesView->LockLooper();
fMessagesView->Insert( p_sub->p_msg[i_start].psz_msg );
fMessagesView->Insert( "\n" );
fMessagesView->UnlockLooper();
/* Scroll at the end */
fScrollBar->LockLooper();
float min, max;
fScrollBar->GetRange( &min, &max );
fScrollBar->SetValue( max );
fScrollBar->UnlockLooper();
}
vlc_mutex_lock( p_sub->p_lock );
p_sub->i_start = i_start;
vlc_mutex_unlock( p_sub->p_lock );
}
}
/*****************************************************************************
* MessagesWindow.h
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: MessagesWindow.h,v 1.1 2003/01/25 20:15:41 titer Exp $
*
* Authors: 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.
*****************************************************************************/
#ifndef BEOS_MESSAGES_WINDOW_H
#define BEOS_MESSAGES_WINDOW_H
#include <Window.h>
class MessagesWindow : public BWindow
{
public:
MessagesWindow( intf_thread_t * p_intf,
BRect frame, const char * name );
virtual ~MessagesWindow();
virtual bool QuitRequested();
void ReallyQuit();
void UpdateMessages();
private:
intf_thread_t * p_intf;
msg_subscription_t * p_sub;
BView * fBackgroundView;
BTextView * fMessagesView;
BScrollView * fScrollView;
BScrollBar * fScrollBar;
};
#endif // BEOS_PREFERENCES_WINDOW_H
...@@ -15,6 +15,8 @@ SOURCES_beos = \ ...@@ -15,6 +15,8 @@ SOURCES_beos = \
modules/gui/beos/PlayListWindow.h \ modules/gui/beos/PlayListWindow.h \
modules/gui/beos/PreferencesWindow.cpp \ modules/gui/beos/PreferencesWindow.cpp \
modules/gui/beos/PreferencesWindow.h \ modules/gui/beos/PreferencesWindow.h \
modules/gui/beos/MessagesWindow.cpp \
modules/gui/beos/MessagesWindow.h \
modules/gui/beos/MediaControlView.cpp \ modules/gui/beos/MediaControlView.cpp \
modules/gui/beos/MediaControlView.h \ modules/gui/beos/MediaControlView.h \
modules/gui/beos/VlcWrapper.cpp \ modules/gui/beos/VlcWrapper.cpp \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* MsgVals.h * MsgVals.h
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: MsgVals.h,v 1.4 2003/01/14 14:48:55 titer Exp $ * $Id: MsgVals.h,v 1.5 2003/01/25 20:15:41 titer Exp $
* *
* Authors: Tony Castley <tcastley@mail.powerup.com.au> * Authors: Tony Castley <tcastley@mail.powerup.com.au>
* Stephan Aßmus <stippi@yellowbites.com> * Stephan Aßmus <stippi@yellowbites.com>
...@@ -25,47 +25,48 @@ ...@@ -25,47 +25,48 @@
#ifndef BEOS_MESSAGE_VALUES_H #ifndef BEOS_MESSAGE_VALUES_H
#define BEOS_MESSAGE_VALUES_H #define BEOS_MESSAGE_VALUES_H
#define PLAYING 0 #define PLAYING 0
#define PAUSED 1 #define PAUSED 1
const uint32 OPEN_FILE = 'opfl'; const uint32 OPEN_FILE = 'opfl';
const uint32 OPEN_DVD = 'opdv'; const uint32 OPEN_DVD = 'opdv';
const uint32 LOAD_SUBFILE = 'losu'; const uint32 LOAD_SUBFILE = 'losu';
const uint32 SUBFILE_RECEIVED = 'sure'; const uint32 SUBFILE_RECEIVED = 'sure';
const uint32 OPEN_PLAYLIST = 'oppl'; const uint32 OPEN_PLAYLIST = 'oppl';
const uint32 STOP_PLAYBACK = 'stpl'; const uint32 STOP_PLAYBACK = 'stpl';
const uint32 START_PLAYBACK = 'play'; const uint32 START_PLAYBACK = 'play';
const uint32 PAUSE_PLAYBACK = 'papl'; const uint32 PAUSE_PLAYBACK = 'papl';
const uint32 FASTER_PLAY = 'fapl'; const uint32 FASTER_PLAY = 'fapl';
const uint32 SLOWER_PLAY = 'slpl'; const uint32 SLOWER_PLAY = 'slpl';
const uint32 NORMAL_PLAY = 'nrpl'; const uint32 NORMAL_PLAY = 'nrpl';
const uint32 SEEK_PLAYBACK = 'seek'; const uint32 SEEK_PLAYBACK = 'seek';
const uint32 VOLUME_CHG = 'voch'; const uint32 VOLUME_CHG = 'voch';
const uint32 VOLUME_MUTE = 'mute'; const uint32 VOLUME_MUTE = 'mute';
const uint32 SELECT_CHANNEL = 'chan'; const uint32 SELECT_CHANNEL = 'chan';
const uint32 SELECT_SUBTITLE = 'subt'; const uint32 SELECT_SUBTITLE = 'subt';
const uint32 PREV_TITLE = 'prti'; const uint32 PREV_TITLE = 'prti';
const uint32 NEXT_TITLE = 'nxti'; const uint32 NEXT_TITLE = 'nxti';
const uint32 TOGGLE_TITLE = 'tgti'; const uint32 TOGGLE_TITLE = 'tgti';
const uint32 PREV_CHAPTER = 'prch'; const uint32 PREV_CHAPTER = 'prch';
const uint32 NEXT_CHAPTER = 'nxch'; const uint32 NEXT_CHAPTER = 'nxch';
const uint32 TOGGLE_CHAPTER = 'tgch'; const uint32 TOGGLE_CHAPTER = 'tgch';
const uint32 PREV_FILE = 'prfl'; const uint32 PREV_FILE = 'prfl';
const uint32 NEXT_FILE = 'nxfl'; const uint32 NEXT_FILE = 'nxfl';
const uint32 NAVIGATE_PREV = 'navp'; // could be chapter, title or file const uint32 NAVIGATE_PREV = 'navp'; // could be chapter, title or file
const uint32 NAVIGATE_NEXT = 'navn'; // could be chapter, title or file const uint32 NAVIGATE_NEXT = 'navn'; // could be chapter, title or file
const uint32 OPEN_PREFERENCES = 'pref'; const uint32 OPEN_PREFERENCES = 'pref';
const uint32 TOGGLE_ON_TOP = 'ontp'; const uint32 OPEN_MESSAGES = 'mess';
const uint32 TOGGLE_FULL_SCREEN = 'tgfs'; const uint32 TOGGLE_ON_TOP = 'ontp';
const uint32 RESIZE_50 = 'rshl'; const uint32 TOGGLE_FULL_SCREEN = 'tgfs';
const uint32 RESIZE_100 = 'rsor'; const uint32 RESIZE_50 = 'rshl';
const uint32 RESIZE_200 = 'rsdb'; const uint32 RESIZE_100 = 'rsor';
const uint32 RESIZE_TRUE = 'rstr'; const uint32 RESIZE_200 = 'rsdb';
const uint32 ASPECT_CORRECT = 'asco'; const uint32 RESIZE_TRUE = 'rstr';
const uint32 VERT_SYNC = 'vsyn'; const uint32 ASPECT_CORRECT = 'asco';
const uint32 WINDOW_FEEL = 'wfel'; const uint32 VERT_SYNC = 'vsyn';
const uint32 SCREEN_SHOT = 'scrn'; const uint32 WINDOW_FEEL = 'wfel';
const uint32 INTERFACE_CREATED = 'ifcr'; /* see VlcApplication::MessageReceived() const uint32 SCREEN_SHOT = 'scrn';
const uint32 INTERFACE_CREATED = 'ifcr'; /* see VlcApplication::MessageReceived()
* in src/misc/beos_specific.cpp */ * in src/misc/beos_specific.cpp */
#endif // BEOS_MESSAGE_VALUES_H #endif // BEOS_MESSAGE_VALUES_H
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* PreferencesWindow.cpp: beos interface * PreferencesWindow.cpp: beos interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PreferencesWindow.cpp,v 1.8 2003/01/17 18:19:43 titer Exp $ * $Id: PreferencesWindow.cpp,v 1.9 2003/01/25 20:15:41 titer Exp $
* *
* Authors: Eric Petit <titer@videolan.org> * Authors: Eric Petit <titer@videolan.org>
* *
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
/***************************************************************************** /*****************************************************************************
* Preferences::PreferencesWindow * Preferences::PreferencesWindow
*****************************************************************************/ *****************************************************************************/
PreferencesWindow::PreferencesWindow( BRect frame, const char* name, PreferencesWindow::PreferencesWindow( intf_thread_t * p_intf,
intf_thread_t *p_interface ) BRect frame, const char * name )
: BWindow( frame, name, B_FLOATING_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, : BWindow( frame, name, B_FLOATING_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_NOT_CLOSABLE ) B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_NOT_CLOSABLE )
{ {
p_intf = p_interface; this->p_intf = p_intf;
BRect rect; BRect rect;
/* "background" view */ /* "background" view */
...@@ -132,8 +132,6 @@ PreferencesWindow::PreferencesWindow( BRect frame, const char* name, ...@@ -132,8 +132,6 @@ PreferencesWindow::PreferencesWindow( BRect frame, const char* name,
rect.top = rect.bottom - 10; rect.top = rect.bottom - 10;
fRestartString = new BStringView( rect, NULL, fRestartString = new BStringView( rect, NULL,
"Warning: changing settings after starting playback may have no effect." ); "Warning: changing settings after starting playback may have no effect." );
/*rgb_color redColor = {255, 0, 0, 255};
fRestartString->SetHighColor(redColor);*/
fRestartString->SetAlignment( B_ALIGN_CENTER ); fRestartString->SetAlignment( B_ALIGN_CENTER );
fPrefsView->AddChild( fRestartString ); fPrefsView->AddChild( fRestartString );
...@@ -154,9 +152,9 @@ PreferencesWindow::PreferencesWindow( BRect frame, const char* name, ...@@ -154,9 +152,9 @@ PreferencesWindow::PreferencesWindow( BRect frame, const char* name,
button = new BButton( rect, NULL, "Defaults", new BMessage( PREFS_DEFAULTS ) ); button = new BButton( rect, NULL, "Defaults", new BMessage( PREFS_DEFAULTS ) );
fPrefsView->AddChild( button ); fPrefsView->AddChild( button );
// start window thread in hidden state // start window thread in hidden state
Hide(); Hide();
Show(); Show();
} }
/***************************************************************************** /*****************************************************************************
...@@ -171,36 +169,36 @@ PreferencesWindow::~PreferencesWindow() ...@@ -171,36 +169,36 @@ PreferencesWindow::~PreferencesWindow()
*****************************************************************************/ *****************************************************************************/
void PreferencesWindow::MessageReceived( BMessage * p_message ) void PreferencesWindow::MessageReceived( BMessage * p_message )
{ {
switch ( p_message->what ) switch ( p_message->what )
{ {
case DVDOLD_CHECK: case DVDOLD_CHECK:
case SLIDER_UPDATE: case SLIDER_UPDATE:
{ {
ApplyChanges(); ApplyChanges();
break; break;
} }
case PREFS_DEFAULTS: case PREFS_DEFAULTS:
{ {
SetDefaults(); SetDefaults();
ApplyChanges(); ApplyChanges();
break; break;
} }
case PREFS_SAVE: case PREFS_SAVE:
{ {
config_SaveConfigFile( p_intf, "main" ); config_SaveConfigFile( p_intf, "main" );
config_SaveConfigFile( p_intf, "adjust" ); config_SaveConfigFile( p_intf, "adjust" );
config_SaveConfigFile( p_intf, "ffmpeg" ); config_SaveConfigFile( p_intf, "ffmpeg" );
break; break;
} }
case PREFS_OK: case PREFS_OK:
{ {
Hide(); Hide();
break; break;
} }
default: default:
BWindow::MessageReceived( p_message ); BWindow::MessageReceived( p_message );
break; break;
} }
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* PreferencesWindow.h * PreferencesWindow.h
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PreferencesWindow.h,v 1.6 2003/01/17 18:19:43 titer Exp $ * $Id: PreferencesWindow.h,v 1.7 2003/01/25 20:15:41 titer Exp $
* *
* Authors: Eric Petit <titer@videolan.org> * Authors: Eric Petit <titer@videolan.org>
* *
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
class PreferencesWindow : public BWindow class PreferencesWindow : public BWindow
{ {
public: public:
PreferencesWindow( BRect frame, PreferencesWindow( intf_thread_t * p_intf,
const char* name, BRect frame,
intf_thread_t *p_interface ); const char * name );
virtual ~PreferencesWindow(); virtual ~PreferencesWindow();
virtual void MessageReceived(BMessage *message); virtual void MessageReceived(BMessage *message);
void ReallyQuit(); void ReallyQuit();
...@@ -65,5 +65,5 @@ class PreferencesWindow : public BWindow ...@@ -65,5 +65,5 @@ class PreferencesWindow : public BWindow
intf_thread_t * p_intf; intf_thread_t * p_intf;
}; };
#endif // BEOS_PREFERENCES_WINDOW_H #endif // BEOS_PREFERENCES_WINDOW_H
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port) * VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: VlcWrapper.h,v 1.15 2003/01/22 01:13:22 titer Exp $ * $Id: VlcWrapper.h,v 1.16 2003/01/25 20:15:41 titer Exp $
* *
* Authors: Florian G. Pflug <fgp@phlo.org> * Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net> * Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -35,16 +35,18 @@ class VlcWrapper; ...@@ -35,16 +35,18 @@ class VlcWrapper;
*****************************************************************************/ *****************************************************************************/
struct intf_sys_t struct intf_sys_t
{ {
InterfaceWindow * p_window; msg_subscription_t * p_sub;
InterfaceWindow * p_window;
vlc_bool_t b_loop; vlc_bool_t b_loop;
vlc_bool_t b_mute; vlc_bool_t b_mute;
int i_part; int i_part;
audio_volume_t i_saved_volume; audio_volume_t i_saved_volume;
int i_channel; int i_channel;
bool b_dvdold; bool b_dvdold;
VlcWrapper * p_wrapper; VlcWrapper * p_wrapper;
}; };
/***************************************************************************** /*****************************************************************************
...@@ -94,8 +96,8 @@ public: ...@@ -94,8 +96,8 @@ public:
void PlaylistJumpTo( int ); void PlaylistJumpTo( int );
void GetNavCapabilities( bool * canSkipPrev, void GetNavCapabilities( bool * canSkipPrev,
bool * canSkipNext ); bool * canSkipNext );
void NavigatePrev(); void NavigatePrev();
void NavigateNext(); void NavigateNext();
/* Audio */ /* Audio */
bool HasAudio(); bool HasAudio();
...@@ -124,8 +126,8 @@ public: ...@@ -124,8 +126,8 @@ public:
void LoadSubFile( char * psz_file ); void LoadSubFile( char * psz_file );
private: private:
intf_thread_t * p_intf; intf_thread_t * p_intf;
input_thread_t * p_input; input_thread_t * p_input;
playlist_t * p_playlist; playlist_t * p_playlist;
aout_instance_t * p_aout; aout_instance_t * p_aout;
}; };
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