Removed old files.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4005 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 838 B |
Binary file not shown.
|
Before Width: | Height: | Size: 838 B |
Binary file not shown.
|
Before Width: | Height: | Size: 838 B |
@@ -1,22 +0,0 @@
|
|||||||
#include "MediaPrefsApp.h"
|
|
||||||
|
|
||||||
|
|
||||||
MediaPrefsApp::MediaPrefsApp()
|
|
||||||
: BApplication( "application/x-vnd.OBeOS.Media" )
|
|
||||||
{
|
|
||||||
BRect r;
|
|
||||||
|
|
||||||
r.Set( 100, 100, 200, 300 );
|
|
||||||
window = new MediaPrefsWindow( r );
|
|
||||||
window->Show();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main( int argc, char **argv )
|
|
||||||
{
|
|
||||||
MediaPrefsApp app;
|
|
||||||
|
|
||||||
app.Run();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#include <Application.h>
|
|
||||||
|
|
||||||
#include "MediaPrefsWindow.h"
|
|
||||||
|
|
||||||
class MediaPrefsApp : public BApplication {
|
|
||||||
|
|
||||||
public:
|
|
||||||
MediaPrefsApp();
|
|
||||||
|
|
||||||
private:
|
|
||||||
MediaPrefsWindow *window;
|
|
||||||
};
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#include "MediaPrefsSlider.h"
|
|
||||||
//#include "VolumeControl.h"
|
|
||||||
|
|
||||||
|
|
||||||
MediaPrefsSlider::MediaPrefsSlider( BRect r, const char *name, const char *label, BMessage *model,
|
|
||||||
int32 channels, uint32 resize, uint32 flags )
|
|
||||||
: BChannelSlider( r, name, label, model, B_VERTICAL, channels, resize, flags )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#include <ChannelSlider.h>
|
|
||||||
|
|
||||||
#define vI2F (float)(9.999 / 100)
|
|
||||||
|
|
||||||
class MediaPrefsSlider : public BChannelSlider {
|
|
||||||
|
|
||||||
public:
|
|
||||||
MediaPrefsSlider( BRect r, const char *name, const char *label, BMessage *model,
|
|
||||||
int32 channels, uint32 resize, uint32 flags );
|
|
||||||
};
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#include "MediaPrefsView.h"
|
|
||||||
|
|
||||||
|
|
||||||
MediaPrefsView::MediaPrefsView( BRect r, char *name )
|
|
||||||
: BView( r, name, B_FOLLOW_ALL_SIDES, B_WILL_DRAW )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#include <View.h>
|
|
||||||
|
|
||||||
class MediaPrefsView : public BView {
|
|
||||||
|
|
||||||
public:
|
|
||||||
MediaPrefsView( BRect r, char *name );
|
|
||||||
|
|
||||||
};
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
#include "MediaPrefsApp.h"
|
|
||||||
//#include "VolumeControl.h"
|
|
||||||
|
|
||||||
|
|
||||||
MediaPrefsWindow::MediaPrefsWindow( BRect wRect )
|
|
||||||
: BWindow( wRect, "Media", B_TITLED_WINDOW, B_ASYNCHRONOUS_CONTROLS )
|
|
||||||
{
|
|
||||||
float fLeft, fRight;
|
|
||||||
int32 iLeft, iRight;
|
|
||||||
|
|
||||||
wRect.OffsetTo( B_ORIGIN );
|
|
||||||
view = new MediaPrefsView( wRect, "MainView" );
|
|
||||||
view->SetViewColor( ui_color( B_PANEL_BACKGROUND_COLOR ) );
|
|
||||||
|
|
||||||
this->AddChild( view );
|
|
||||||
|
|
||||||
slider = new MediaPrefsSlider( wRect, "MasterVol", "Master",
|
|
||||||
new BMessage( 'mVol' ), 2,
|
|
||||||
B_FOLLOW_LEFT|B_FOLLOW_TOP, B_WILL_DRAW );
|
|
||||||
slider->SetLimits( 0, 100 );
|
|
||||||
slider->SetLimitLabels( "0", "100" );
|
|
||||||
|
|
||||||
view->AddChild( slider );
|
|
||||||
|
|
||||||
// use private API
|
|
||||||
// if ( MediaKitPrivate::GetMasterVolume( &fLeft, &fRight ) == B_OK ) {
|
|
||||||
// // left,right range is 0..9.999
|
|
||||||
// iLeft = (int32)( fLeft / vI2F );
|
|
||||||
// iRight = (int32)( fRight / vI2F );
|
|
||||||
// } else {
|
|
||||||
iLeft = 0;
|
|
||||||
iRight = 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
slider->SetValueFor( 0, iLeft );
|
|
||||||
slider->SetValueFor( 1, iRight );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool MediaPrefsWindow::QuitRequested()
|
|
||||||
{
|
|
||||||
be_app->PostMessage( B_QUIT_REQUESTED );
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MediaPrefsWindow::MessageReceived( BMessage *msg )
|
|
||||||
{
|
|
||||||
switch ( msg->what ) {
|
|
||||||
case 'mVol':
|
|
||||||
{
|
|
||||||
int32 iLeft = slider->ValueFor( 0 );
|
|
||||||
int32 iRight = slider->ValueFor( 1 );
|
|
||||||
|
|
||||||
float fLeft = float( iLeft ) * vI2F;
|
|
||||||
float fRight = float( iRight ) * vI2F;
|
|
||||||
|
|
||||||
// MediaKitPrivate::SetMasterVolume( fLeft, fRight );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
BWindow::MessageReceived( msg );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#include <Window.h>
|
|
||||||
|
|
||||||
#include "MediaPrefsView.h"
|
|
||||||
#include "MediaPrefsSlider.h"
|
|
||||||
|
|
||||||
|
|
||||||
class MediaPrefsWindow : public BWindow {
|
|
||||||
|
|
||||||
public:
|
|
||||||
MediaPrefsWindow( BRect wRect );
|
|
||||||
virtual bool QuitRequested();
|
|
||||||
virtual void MessageReceived( BMessage *msg );
|
|
||||||
|
|
||||||
private:
|
|
||||||
MediaPrefsView *view;
|
|
||||||
MediaPrefsSlider *slider;
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user