Commit a4a766a3 authored by Eric Petit's avatar Eric Petit

beos/* : New Preferences window that lets you configure everything.

          It is not complete yet (see the TODO in PreferencesWindow.cpp)
parent c7bfd461
...@@ -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.8 2003/03/30 18:14:37 gbazin Exp $ * $Id: BeOS.cpp,v 1.9 2003/05/03 13:37:21 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>
...@@ -51,28 +51,6 @@ vlc_module_begin(); ...@@ -51,28 +51,6 @@ vlc_module_begin();
add_submodule(); add_submodule();
set_capability( "interface", 100 ); set_capability( "interface", 100 );
set_callbacks( E_(OpenIntf), E_(CloseIntf) ); set_callbacks( E_(OpenIntf), E_(CloseIntf) );
add_integer( "beos-intf-width", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-intf-height", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-intf-xpos", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-intf-ypos", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-playlist-width", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-playlist-height", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-playlist-xpos", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-playlist-ypos", 0, NULL, "", "", VLC_TRUE );
add_bool( "beos-playlist-show", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-messages-width", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-messages-height", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-messages-xpos", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-messages-ypos", 0, NULL, "", "", VLC_TRUE );
add_bool( "beos-messages-show", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-settings-width", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-settings-height", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-settings-xpos", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-settings-ypos", 0, NULL, "", "", VLC_TRUE );
add_bool( "beos-settings-show", 0, NULL, "", "", VLC_TRUE );
add_integer( "beos-screenshot-format", 0, NULL, "", "", VLC_TRUE );
add_string( "beos-screenshot-path", 0, NULL, "", "", VLC_TRUE );
add_bool( "beos-use-dvd-menus", 0, NULL, "", "", VLC_TRUE );
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.11 2003/03/12 23:15:03 titer Exp $ * $Id: Interface.cpp,v 1.12 2003/05/03 13:37:21 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>
...@@ -85,7 +85,10 @@ int E_(OpenIntf) ( vlc_object_t *p_this ) ...@@ -85,7 +85,10 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
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( 1 );
} else { }
else
{
/* Make the be_app aware the interface has been created */
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);
......
This diff is collapsed.
This diff is collapsed.
...@@ -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.9 2003/02/09 17:10:52 stippi Exp $ * $Id: PreferencesWindow.h,v 1.10 2003/05/03 13:37:21 titer Exp $
* *
* Authors: Eric Petit <titer@videolan.org> * Authors: Eric Petit <titer@videolan.org>
* *
...@@ -25,106 +25,61 @@ ...@@ -25,106 +25,61 @@
#define BEOS_PREFERENCES_WINDOW_H #define BEOS_PREFERENCES_WINDOW_H
#include <Window.h> #include <Window.h>
#include <String.h>
#define PREFS_WINDOW_WIDTH 400 #define PREFS_WINDOW_WIDTH 600
#define PREFS_WINDOW_HEIGHT 280 #define PREFS_WINDOW_HEIGHT 300
#define PREFS_ITEM_SELECTED 'pris'
#define PREFS_OK 'prok'
#define PREFS_REVERT 'prre'
#define PREFS_APPLY 'prap'
#define TEXT_HEIGHT 16
#define PREFS_OK 'prok' class ConfigView : public BView
#define PREFS_CANCEL 'prcb'
#define PREFS_DEFAULTS 'prde'
#define PREFS_REVERT 'prrv'
#define FFMPEG_UPDATE 'ffup'
#define ADJUST_UPDATE 'ajst'
#define DVDMENUS_CHECK 'dvme'
#define SET_TRANSLATOR 'sttr'
#define SET_FOLDER 'stdr'
class BTabView;
class BCheckBox;
class BSlider;
class BStringView;
class BMenuField;
class BTextControl;
class PreferencesWindow : public BWindow
{ {
public: public:
PreferencesWindow( intf_thread_t* p_intf, ConfigView( BRect frame, const char * name,
BRect frame, uint32 resizingMode, uint32 flags );
const char* name );
virtual ~PreferencesWindow(); /* When we create the view, we have to give it an arbitrary size because
it will be the size of the BScrollView. That's why we keep the real size
in fRealBounds so we can have a correct BScrollBar later */
BRect fRealBounds;
};
virtual bool QuitRequested(); class StringItemWithView : public BStringItem
virtual void MessageReceived(BMessage* message); {
virtual void Show(); public:
StringItemWithView( const char * text );
void ReallyQuit(); /* Here we store the ConfigView associated to this module */
ConfigView * fConfigView;
};
private: class PreferencesWindow : public BWindow
void _SetGUI( bool dvdMenus, {
int32 postProcessing, public:
float brightness, PreferencesWindow( intf_thread_t * p_intf,
float contrast, BRect frame,
int32 hue, const char * name );
float saturation, virtual ~PreferencesWindow();
const char* screenShotPath,
uint32 screenShotTranslator );
void _SetDefaults();
void _SetToSettings();
void _RevertChanges();
void _ApplyChanges(); virtual bool QuitRequested();
virtual void MessageReceived(BMessage* message);
virtual void FrameResized( float, float );
void _ApplyScreenShotSettings(); void Update();
void _ApplyPictureSettings(); void UpdateScrollBar();
void _ApplyFFmpegSettings(); void ApplyChanges( bool doIt );
void _ApplyDVDSettings();
BView* fPrefsView; void ReallyQuit();
BTabView* fTabView;
BView* fGeneralView;
BView* fAdjustView;
BTab* fGeneralTab;
BTab* fAdjustTab;
BCheckBox* fDvdMenusCheck;
BSlider* fPpSlider;
BSlider* fContrastSlider;
BSlider* fBrightnessSlider;
BSlider* fHueSlider;
BSlider* fSaturationSlider;
BStringView* fRestartString;
BMenuField* fScreenShotFormatMF;
BTextControl* fScreenShotPathTC;
bool fDVDMenusBackup; private:
int32 fPostProcessingBackup; BView * fPrefsView;
float fBrightnessBackup; BOutlineListView * fOutline;
float fContrastBackup; BView * fDummyView;
int32 fHueBackup; BScrollView * fConfigScroll;
float fSaturationBackup;
BString fScreenShotPathBackup;
uint32 fScreenShotFormatBackup;
intf_thread_t* p_intf; intf_thread_t * p_intf;
}; };
// some global support functions
int32
get_config_int( intf_thread_t* intf,
const char* field,
int32 defaultValue );
float
get_config_float( intf_thread_t* intf,
const char* field,
float defaultValue );
// don't leak the return value! (use free())
char*
get_config_string( intf_thread_t* intf,
const char* field,
const char* defaultString );
#endif // BEOS_PREFERENCES_WINDOW_H #endif // BEOS_PREFERENCES_WINDOW_H
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