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 @@
* beos.cpp : BeOS plugin for vlc
*****************************************************************************
* 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>
* Samuel Hocevar <sam@zoy.org>
......@@ -51,28 +51,6 @@ vlc_module_begin();
add_submodule();
set_capability( "interface", 100 );
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();
set_capability( "video output", 100 );
set_callbacks( E_(OpenVideo), E_(CloseVideo) );
......
......@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface
*****************************************************************************
* 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>
* Samuel Hocevar <sam@zoy.org>
......@@ -85,7 +85,10 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
free( p_intf->p_sys );
msg_Err( p_intf, "cannot allocate InterfaceWindow" );
return( 1 );
} else {
}
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);
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* PreferencesWindow.h
*****************************************************************************
* 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>
*
......@@ -25,106 +25,61 @@
#define BEOS_PREFERENCES_WINDOW_H
#include <Window.h>
#include <String.h>
#define PREFS_WINDOW_WIDTH 400
#define PREFS_WINDOW_HEIGHT 280
#define PREFS_WINDOW_WIDTH 600
#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'
#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
class ConfigView : public BView
{
public:
PreferencesWindow( intf_thread_t* p_intf,
BRect frame,
const char* name );
virtual ~PreferencesWindow();
public:
ConfigView( BRect frame, const char * name,
uint32 resizingMode, uint32 flags );
/* 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();
virtual void MessageReceived(BMessage* message);
virtual void Show();
class StringItemWithView : public BStringItem
{
public:
StringItemWithView( const char * text );
void ReallyQuit();
/* Here we store the ConfigView associated to this module */
ConfigView * fConfigView;
};
private:
void _SetGUI( bool dvdMenus,
int32 postProcessing,
float brightness,
float contrast,
int32 hue,
float saturation,
const char* screenShotPath,
uint32 screenShotTranslator );
void _SetDefaults();
void _SetToSettings();
void _RevertChanges();
class PreferencesWindow : public BWindow
{
public:
PreferencesWindow( intf_thread_t * p_intf,
BRect frame,
const char * name );
virtual ~PreferencesWindow();
void _ApplyChanges();
virtual bool QuitRequested();
virtual void MessageReceived(BMessage* message);
virtual void FrameResized( float, float );
void _ApplyScreenShotSettings();
void _ApplyPictureSettings();
void _ApplyFFmpegSettings();
void _ApplyDVDSettings();
void Update();
void UpdateScrollBar();
void ApplyChanges( bool doIt );
BView* fPrefsView;
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;
void ReallyQuit();
bool fDVDMenusBackup;
int32 fPostProcessingBackup;
float fBrightnessBackup;
float fContrastBackup;
int32 fHueBackup;
float fSaturationBackup;
BString fScreenShotPathBackup;
uint32 fScreenShotFormatBackup;
private:
BView * fPrefsView;
BOutlineListView * fOutline;
BView * fDummyView;
BScrollView * fConfigScroll;
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
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