From c8c8057167bf2a55e839566f8c7a3ef8aeca5477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 25 Jun 2003 10:36:38 +0000 Subject: [PATCH] Here is an alpha version. Restart media services still crashes the app git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3662 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/prefs/media/Jamfile | 5 +- src/prefs/media/Media.cpp | 72 +-- src/prefs/media/Media.h | 10 +- src/prefs/media/MediaAlert.cpp | 172 +++++++ src/prefs/media/MediaAlert.h | 51 ++ src/prefs/media/MediaConstants.h | 18 - src/prefs/media/MediaListItem.cpp | 166 +++++-- src/prefs/media/MediaListItem.h | 29 +- src/prefs/media/MediaPrefsApp.cpp | 22 - src/prefs/media/MediaPrefsApp.h | 12 - src/prefs/media/MediaPrefsSlider.cpp | 9 - src/prefs/media/MediaPrefsSlider.h | 10 - src/prefs/media/MediaPrefsView.cpp | 7 - src/prefs/media/MediaPrefsView.h | 8 - src/prefs/media/MediaPrefsWindow.cpp | 65 --- src/prefs/media/MediaPrefsWindow.h | 17 - src/prefs/media/MediaViews.cpp | 220 ++++++--- src/prefs/media/MediaViews.h | 51 +- src/prefs/media/MediaWindow.cpp | 667 +++++++++++++++++++++------ src/prefs/media/MediaWindow.h | 60 +++ src/prefs/media/MediaWindows.h | 52 --- src/prefs/media/devices.h | 44 -- src/prefs/media/iconfile.h | 139 ++++++ src/prefs/media/mixer.h | 44 -- src/prefs/media/tv.h | 44 -- 25 files changed, 1300 insertions(+), 694 deletions(-) create mode 100644 src/prefs/media/MediaAlert.cpp create mode 100644 src/prefs/media/MediaAlert.h delete mode 100644 src/prefs/media/MediaConstants.h delete mode 100644 src/prefs/media/MediaPrefsApp.cpp delete mode 100644 src/prefs/media/MediaPrefsApp.h delete mode 100644 src/prefs/media/MediaPrefsSlider.cpp delete mode 100644 src/prefs/media/MediaPrefsSlider.h delete mode 100644 src/prefs/media/MediaPrefsView.cpp delete mode 100644 src/prefs/media/MediaPrefsView.h delete mode 100644 src/prefs/media/MediaPrefsWindow.cpp delete mode 100644 src/prefs/media/MediaPrefsWindow.h create mode 100644 src/prefs/media/MediaWindow.h delete mode 100644 src/prefs/media/MediaWindows.h delete mode 100644 src/prefs/media/devices.h create mode 100644 src/prefs/media/iconfile.h delete mode 100644 src/prefs/media/mixer.h delete mode 100644 src/prefs/media/tv.h diff --git a/src/prefs/media/Jamfile b/src/prefs/media/Jamfile index 8b1e7aac9f..edbb1a48df 100644 --- a/src/prefs/media/Jamfile +++ b/src/prefs/media/Jamfile @@ -8,6 +8,7 @@ Preference Media : Media.cpp MediaWindow.cpp MediaViews.cpp -; + MediaListItem.cpp + MediaAlert.cpp ; -LinkSharedOSLibs Media : be libmedia.so ; \ No newline at end of file +LinkSharedOSLibs Media : be media ; \ No newline at end of file diff --git a/src/prefs/media/Media.cpp b/src/prefs/media/Media.cpp index 6059352155..2249d214ee 100644 --- a/src/prefs/media/Media.cpp +++ b/src/prefs/media/Media.cpp @@ -7,51 +7,53 @@ Media by Sikosis */ // Includes -------------------------------------------------------------------------------------------------- // -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #include -#include -#include -#include -#include - #include "Media.h" -#include "MediaWindows.h" -#include "MediaViews.h" -#include "MediaConstants.h" -// ---------------------------------------------------------------------------------------------------------- // - -MediaWindow *ptrMediaWindow; // Media -- constructor -Media::Media() : BApplication (APP_SIGNATURE) +Media::Media() +: BApplication (APP_SIGNATURE) { - // Default Window Size - even though we centre the form to the current screen size - //BRect screenFrame = (BScreen(B_MAIN_SCREEN_ID).Frame()); + BRect rect(32,64,637,442); - float FormTopDefault = 0; - float FormLeftDefault = 0; - float FormWidthDefault = 654; - float FormHeightDefault = 392; - - BRect MediaWindowRect(FormTopDefault,FormLeftDefault,FormLeftDefault+FormWidthDefault,FormTopDefault+FormHeightDefault); + BPath path; + if(find_directory(B_USER_SETTINGS_DIRECTORY, &path) == B_OK) { + path.Append(SETTINGS_FILE); + BFile file(path.Path(),B_READ_ONLY); + if(file.InitCheck()==B_OK) { + char buffer[255]; + ssize_t size = 0; + while((size = file.Read(buffer, 255))>0) { + int32 i=0; + while(buffer[i]=='#') { + while(i0){ + if(c-a>=int(rect.Width())) { + rect.left = a; + rect.right = c; + } + if(d-b>=int(rect.Height())) { + rect.top = b; + rect.bottom = d; + } + } + } + } + } - ptrMediaWindow = new MediaWindow(MediaWindowRect); + mWindow = new MediaWindow(rect); + mWindow->SetSizeLimits(605.0, 10000.0, 378.0, 10000.0); } // ---------------------------------------------------------------------------------------------------------- // - // Media::MessageReceived -- handles incoming messages -void Media::MessageReceived (BMessage *message) +/*void Media::MessageReceived (BMessage *message) { switch(message->what) { @@ -59,7 +61,7 @@ void Media::MessageReceived (BMessage *message) BApplication::MessageReceived(message); // pass it along ... break; } -} +}*/ // ---------------------------------------------------------------------------------------------------------- // // Media Main diff --git a/src/prefs/media/Media.h b/src/prefs/media/Media.h index 55b7b633b5..086ebebfef 100644 --- a/src/prefs/media/Media.h +++ b/src/prefs/media/Media.h @@ -9,15 +9,19 @@ Media Header by Sikosis #ifndef __MEDIA_H__ #define __MEDIA_H__ -extern const char *APP_SIGNATURE; +// Constants ------------------------------------------------------------------------------------------------- // +const char *APP_SIGNATURE = "application/x-vnd.OBOS.Media"; // Application Signature and Title + +#include +#include "MediaWindow.h" class Media : public BApplication { public: Media(); - virtual void MessageReceived(BMessage *message); - + private: + MediaWindow *mWindow; }; diff --git a/src/prefs/media/MediaAlert.cpp b/src/prefs/media/MediaAlert.cpp new file mode 100644 index 0000000000..fec1e521b4 --- /dev/null +++ b/src/prefs/media/MediaAlert.cpp @@ -0,0 +1,172 @@ +// Standard Includes ----------------------------------------------------------- +#include + +// System Includes ------------------------------------------------------------- +#include "MediaAlert.h" +#include +#include + +#include +#include +#include +#include + +// Project Includes ------------------------------------------------------------ + +// Local Includes -------------------------------------------------------------- + +// Local Defines --------------------------------------------------------------- + +// Globals --------------------------------------------------------------------- + +const int kWindowIconOffset = 27; +const int kIconStripeWidth = 30; +const int kTextIconOffset = kWindowIconOffset + kIconStripeWidth - 2; +const int kTextTopOffset = 6; + +//------------------------------------------------------------------------------ +class TAlertView : public BView +{ + public: + TAlertView(BRect frame); + TAlertView(BMessage* archive); + ~TAlertView(); + + virtual void Draw(BRect updateRect); + + void SetBitmap(BBitmap* Icon) { fIconBitmap = Icon; } + BBitmap* Bitmap() { return fIconBitmap; } + + private: + BBitmap* fIconBitmap; +}; + +//------------------------------------------------------------------------------ +MediaAlert::MediaAlert(BRect rect, const char* title, const char* text) + : BWindow(rect, title, B_MODAL_WINDOW, + B_NOT_CLOSABLE | B_NOT_RESIZABLE) +{ + fTextView = NULL; + + // Set up the "_master_" view + TAlertView* MasterView = new TAlertView(Bounds()); + MasterView->SetBitmap(InitIcon()); + AddChild(MasterView); + + // Set up the text view + BRect TextViewRect(kTextIconOffset, kTextTopOffset, + Bounds().right, Bounds().bottom); + BRect rect = TextViewRect; + rect.OffsetTo(B_ORIGIN); + rect.InsetBy(4,2); + fTextView = new BTextView(TextViewRect, "_tv_", + rect, + B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); + fTextView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + fTextView->SetText(text, strlen(text)); + fTextView->MakeEditable(false); + fTextView->MakeSelectable(false); + fTextView->SetWordWrap(true); + + fTextView->SetFontAndColor(be_bold_font); + + MasterView->AddChild(fTextView); + + BRect screenFrame = (BScreen(B_MAIN_SCREEN_ID).Frame()); + BPoint pt; + pt.x = screenFrame.Width()/2 - Bounds().Width()/2; + pt.y = screenFrame.Height()/2 - Bounds().Height()/2; + + if (screenFrame.Contains(pt)) + MoveTo(pt); +} + +//------------------------------------------------------------------------------ +MediaAlert::~MediaAlert() +{ + +} + +//------------------------------------------------------------------------------ +BTextView* MediaAlert::TextView() const +{ + return fTextView; +} + +//------------------------------------------------------------------------------ +BBitmap* MediaAlert::InitIcon() +{ + // After a bit of a search, I found the icons in app_server. =P + BBitmap* Icon = NULL; + BPath Path; + if (find_directory(B_BEOS_SERVERS_DIRECTORY, &Path) == B_OK) + { + Path.Append("app_server"); + BFile File; + if (File.SetTo(Path.Path(), B_READ_ONLY) == B_OK) + { + BResources Resources; + if (Resources.SetTo(&File) == B_OK) + { + // Which icon are we trying to load? + const char* iconName = "warn"; + + // Load the raw icon data + size_t size; + const void* rawIcon = + Resources.LoadResource('ICON', iconName, &size); + + if (rawIcon) + { + // Now build the bitmap + Icon = new BBitmap(BRect(0, 0, 31, 31), B_CMAP8); + Icon->SetBits(rawIcon, size, 0, B_CMAP8); + } + } + } + } + + return Icon; +} +//------------------------------------------------------------------------------ + + +//------------------------------------------------------------------------------ +// #pragma mark - +// #pragma mark TAlertView +// #pragma mark - +//------------------------------------------------------------------------------ +TAlertView::TAlertView(BRect frame) + : BView(frame, "TAlertView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW), + fIconBitmap(NULL) +{ + SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); +} +//------------------------------------------------------------------------------ +TAlertView::~TAlertView() +{ + if (fIconBitmap) + { + delete fIconBitmap; + } +} +//------------------------------------------------------------------------------ +void TAlertView::Draw(BRect updateRect) +{ + // Here's the fun stuff + if (fIconBitmap) + { + BRect StripeRect = Bounds(); + StripeRect.right = kIconStripeWidth; + SetHighColor(tint_color(ViewColor(), B_DARKEN_1_TINT)); + FillRect(StripeRect); + + SetDrawingMode(B_OP_OVER); + DrawBitmapAsync(fIconBitmap, BPoint(18, 6)); + SetDrawingMode(B_OP_COPY); + } +} +//------------------------------------------------------------------------------ + + + diff --git a/src/prefs/media/MediaAlert.h b/src/prefs/media/MediaAlert.h new file mode 100644 index 0000000000..d1baf586e4 --- /dev/null +++ b/src/prefs/media/MediaAlert.h @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// Copyright (c) 2001-2002, OpenBeOS +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// +// File Name: MediaAlert.h +// Author: Jérôme Duval +// Description: MediaAlert displays a modal alert window. (from Alert.cpp) +//------------------------------------------------------------------------------ + +#ifndef _MEDIAALERT_H +#define _MEDIAALERT_H + +// System Includes ------------------------------------------------------------- +#include +#include +#include + +// MediaAlert class ---------------------------------------------------------------- +class MediaAlert : public BWindow +{ +public: + + MediaAlert(BRect rect, const char* title, const char* text); +virtual ~MediaAlert(); + BTextView* TextView() const; +private: + BBitmap *InitIcon(); + + BTextView *fTextView; +}; +//------------------------------------------------------------------------------ + +#endif // _MEDIAALERT_H + diff --git a/src/prefs/media/MediaConstants.h b/src/prefs/media/MediaConstants.h deleted file mode 100644 index a97be406d8..0000000000 --- a/src/prefs/media/MediaConstants.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - -Media Constants by Sikosis - -(C)2003 - -*/ - -#ifndef __MEDIACONSTANTS_H__ -#define __MEDIACONSTANTS_H__ - - -// Constants ------------------------------------------------------------------------------------------------- // -const char *APP_SIGNATURE = "application/x-vnd.OBOS.Media"; // Application Signature and Title - - - -#endif diff --git a/src/prefs/media/MediaListItem.cpp b/src/prefs/media/MediaListItem.cpp index 8db3e38e42..590e56e60f 100644 --- a/src/prefs/media/MediaListItem.cpp +++ b/src/prefs/media/MediaListItem.cpp @@ -7,57 +7,56 @@ MediaListItem.cpp by Sikosis */ // Includes -------------------------------------------------------------------------------------------------- // -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -//#include "MediaConstants.h" #include "MediaListItem.h" -const char *media_names[] = { - "Audio Settings","Audio Mixer","None In","None Out", - "Video Settings","Video Window Consumer" -}; - +#define kITEM_MARGIN 1 // MediaListItem - Constructor -MediaListItem::MediaListItem(const char *label, int32 MediaName, BBitmap *bitmap, BMessage *msg, uint32 modifiers = 0) : BListItem() +MediaListItem::MediaListItem(dormant_node_info *info, uint32 level, bool isVideo, BList *icons, uint32 modifiers=0) + : BListItem(level), + mIsVideo(isVideo), + mIsAudioMixer(false), + mIsDefaultInput(false), + mIsDefaultOutput(false) +{ + mIcons = icons; + mInfo = info; + mLabel = mInfo->name; + + SetHeight(16 + kITEM_MARGIN); +} + +MediaListItem::MediaListItem(const char* label, uint32 level, bool isVideo, BList *icons, uint32 modifiers=0) + : BListItem(level), + mIsVideo(isVideo), + mLabel(label), + mIsAudioMixer(false), + mIsDefaultInput(false), + mIsDefaultOutput(false) +{ + mIcons = icons; + mInfo = NULL; + + SetHeight(16 + kITEM_MARGIN); +} + +MediaListItem::~MediaListItem() { - kMediaName = MediaName; - icon = bitmap; } //--------------------------------------------------------------------------------------------------------------// //MediaListItem - DrawItem -void MediaListItem::DrawItem(BView *owner, BRect frame, bool complete) +void +MediaListItem::DrawItem(BView *owner, BRect frame, bool complete) { rgb_color kHighlight = { 140,140,140,0 }; - rgb_color kBlackColor = { 0,0,0,0 }; - rgb_color kMedGray = { 140,140,140,0 }; + rgb_color kBlack = { 0,0,0,0 }; + rgb_color kWhite = { 255,255,255,0 }; - BRect r; - r.top = frame.top; - r.left = frame.left-10; - r.right = frame.right; - r.bottom = frame.bottom; + BRect r(frame); if (IsSelected() || complete) { @@ -71,21 +70,94 @@ void MediaListItem::DrawItem(BView *owner, BRect frame, bool complete) owner->SetHighColor(color); owner->SetLowColor(color); owner->FillRect(r); + owner->SetHighColor(kBlack); + + } else { + owner->SetLowColor(owner->ViewColor()); } - owner->MovePenTo(frame.left-10,frame.top); - owner->DrawBitmap(icon); - - owner->MovePenTo(frame.left+10, frame.bottom-2); - if (IsEnabled()) - { - owner->SetHighColor(kBlackColor); - } else { - owner->SetHighColor(kMedGray); + frame.left += 4; + BRect iconFrame(frame); + iconFrame.Set(iconFrame.left, iconFrame.top+1, iconFrame.left+15, iconFrame.top+16); + uint32 index = 0; + if(OutlineLevel()==0 || (mIsDefaultInput&&mIsDefaultOutput)) { + if(mIsDefaultInput && mIsVideo) + index = 4; + else if(mIsDefaultInput && !mIsVideo) + index = 2; + owner->SetDrawingMode(B_OP_OVER); + owner->DrawBitmap(static_cast(mIcons->ItemAt(index)), iconFrame); + owner->SetDrawingMode(B_OP_COPY); + } + iconFrame.OffsetBy(16, 0); + if(mIsDefaultInput || mIsDefaultOutput || mIsAudioMixer) { + if(mIsAudioMixer) + index = 1; + else if(mIsDefaultOutput) { + if(mIsVideo) + index = 5; + else + index = 3; + } else { + if(mIsVideo) + index = 4; + else + index = 2; + } + owner->SetDrawingMode(B_OP_OVER); + owner->DrawBitmap(static_cast(mIcons->ItemAt(index)), iconFrame); + owner->SetDrawingMode(B_OP_COPY); } - owner->DrawString(media_names[kMediaName]); - owner->AttachedToWindow(); + frame.left += 16 * (OutlineLevel() + 1); + owner->SetHighColor(kBlack); + + BFont font = be_plain_font; + font_height finfo; + font.GetHeight(&finfo); + owner->SetFont(&font); + owner->MovePenTo(frame.left+10, frame.top + ((frame.Height() - (finfo.ascent + finfo.descent + finfo.leading)) / 2) + + (finfo.ascent + finfo.descent) - 1); + owner->DrawString(mLabel); } //--------------------------------------------------------------------------------------------------------------// +void +MediaListItem::SetDefault(bool isDefault, bool isInput) +{ + if(isInput) + mIsDefaultInput = isDefault; + else + mIsDefaultOutput = isDefault; +} + +void +MediaListItem::SetAudioMixer(bool isAudioMixer) +{ + mIsAudioMixer = isAudioMixer; +} + +void +MediaListItem::Update(BView *owner, const BFont *finfo) +{ + // we need to override the update method so we can make sure are + // list item size doesn't change + BListItem::Update(owner, finfo); + if ((Height() < 16 + kITEM_MARGIN)) { + SetHeight(16 + kITEM_MARGIN); + } +} + +int +MediaListItem::Compare(const void *firstArg, const void *secondArg) +{ + MediaListItem *item1 = *static_cast(firstArg); + MediaListItem *item2 = *static_cast(secondArg); + if(item1->mIsVideo != item2->mIsVideo) + return item1->mIsVideo ? 1 : -1; + if(item1->OutlineLevel()!=item2->OutlineLevel()) + return item1->OutlineLevel()>item2->OutlineLevel() ? 1 : -1; + if(item1->mIsAudioMixer!=item2->mIsAudioMixer) + return item2->mIsAudioMixer ? 1 : -1; + return strcmp(item1->mLabel, item2->mLabel); +} diff --git a/src/prefs/media/MediaListItem.h b/src/prefs/media/MediaListItem.h index 226c328b22..37a2729fa9 100644 --- a/src/prefs/media/MediaListItem.h +++ b/src/prefs/media/MediaListItem.h @@ -10,17 +10,34 @@ MediaListItem Header by Sikosis #define __MEDIALISTITEM_H__ #include -#include +#include class MediaListItem : public BListItem { public: - MediaListItem(const char* label,int32 MediaName, BBitmap* bitmap,BMessage* msg, uint32 modifiers=0); - virtual void DrawItem (BView *owner, BRect frame, bool complete = false); - enum { AS, AM, NI, NO, VS, VWC }; + MediaListItem(dormant_node_info *info, uint32 level, bool isVideo, BList *icons, uint32 modifiers=0); + MediaListItem(const char* label, uint32 level, bool isVideo, BList *icons, uint32 modifiers=0); + ~MediaListItem(); + virtual void Update(BView *owner, const BFont *finfo); + virtual void DrawItem(BView *owner, BRect frame, bool complete = false); + void SetDefault(bool isDefaultInput, bool isInput); + void SetAudioMixer(bool isAudioMixer); + bool IsDefault(bool isInput) { return isInput ? mIsDefaultInput : mIsDefaultOutput; } + bool IsAudioMixer() { return mIsAudioMixer; } + bool IsVideo() { return mIsVideo; } + const char* GetLabel() { return mLabel; } + + dormant_node_info *mInfo; + + static int Compare(const void *firstArg, const void *secondArg); private: - BBitmap* icon; - int32 kMediaName; + const char *mLabel; + bool mIsAudioMixer; + bool mIsVideo; + bool mIsDefaultInput; + bool mIsDefaultOutput; + dormant_node_info node_info; + BList *mIcons; }; diff --git a/src/prefs/media/MediaPrefsApp.cpp b/src/prefs/media/MediaPrefsApp.cpp deleted file mode 100644 index 7b65fd2887..0000000000 --- a/src/prefs/media/MediaPrefsApp.cpp +++ /dev/null @@ -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; -} diff --git a/src/prefs/media/MediaPrefsApp.h b/src/prefs/media/MediaPrefsApp.h deleted file mode 100644 index 756433ab4d..0000000000 --- a/src/prefs/media/MediaPrefsApp.h +++ /dev/null @@ -1,12 +0,0 @@ -#include - -#include "MediaPrefsWindow.h" - -class MediaPrefsApp : public BApplication { - - public: - MediaPrefsApp(); - - private: - MediaPrefsWindow *window; -}; diff --git a/src/prefs/media/MediaPrefsSlider.cpp b/src/prefs/media/MediaPrefsSlider.cpp deleted file mode 100644 index 1e63e013d8..0000000000 --- a/src/prefs/media/MediaPrefsSlider.cpp +++ /dev/null @@ -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 ) -{ -} diff --git a/src/prefs/media/MediaPrefsSlider.h b/src/prefs/media/MediaPrefsSlider.h deleted file mode 100644 index 6ddcd8fec6..0000000000 --- a/src/prefs/media/MediaPrefsSlider.h +++ /dev/null @@ -1,10 +0,0 @@ -#include - -#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 ); -}; diff --git a/src/prefs/media/MediaPrefsView.cpp b/src/prefs/media/MediaPrefsView.cpp deleted file mode 100644 index 1b81e3e3e9..0000000000 --- a/src/prefs/media/MediaPrefsView.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "MediaPrefsView.h" - - -MediaPrefsView::MediaPrefsView( BRect r, char *name ) - : BView( r, name, B_FOLLOW_ALL_SIDES, B_WILL_DRAW ) -{ -} diff --git a/src/prefs/media/MediaPrefsView.h b/src/prefs/media/MediaPrefsView.h deleted file mode 100644 index 54dbfc0e9c..0000000000 --- a/src/prefs/media/MediaPrefsView.h +++ /dev/null @@ -1,8 +0,0 @@ -#include - -class MediaPrefsView : public BView { - - public: - MediaPrefsView( BRect r, char *name ); - -}; diff --git a/src/prefs/media/MediaPrefsWindow.cpp b/src/prefs/media/MediaPrefsWindow.cpp deleted file mode 100644 index a8cc6d2ff3..0000000000 --- a/src/prefs/media/MediaPrefsWindow.cpp +++ /dev/null @@ -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 ); - } -} diff --git a/src/prefs/media/MediaPrefsWindow.h b/src/prefs/media/MediaPrefsWindow.h deleted file mode 100644 index d6d6af255a..0000000000 --- a/src/prefs/media/MediaPrefsWindow.h +++ /dev/null @@ -1,17 +0,0 @@ -#include - -#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; -}; diff --git a/src/prefs/media/MediaViews.cpp b/src/prefs/media/MediaViews.cpp index 4bee4647e5..b3d8c3f19b 100644 --- a/src/prefs/media/MediaViews.cpp +++ b/src/prefs/media/MediaViews.cpp @@ -7,102 +7,176 @@ MediaViews by Sikosis */ // Includes -------------------------------------------------------------------------------------------------- // -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include - -#include "MediaWindows.h" +#include #include "MediaViews.h" -//#include "MediaConstants.h" -// ------------------------------------------------------------------------------------------------------------- // -// MediaView - Constructor -MediaView::MediaView (BRect frame) : BView (frame, "MediaView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW ) +BarView::BarView(BRect frame) + : BView (frame, "barView", B_FOLLOW_LEFT_RIGHT, B_WILL_DRAW ) { - SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); } -// ---------------------------------------------------------------------------------------------------------- // - -void MediaView::Draw(BRect updateRect) +void +BarView::Draw(BRect updateRect) { - BRect r; - r = Bounds(); -} -// ---------------------------------------------------------------------------------------------------------- // - - - -// IconView - Constructor -IconView::IconView (BRect frame) : BView (frame, "IconView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW ) -{ - -} -// ---------------------------------------------------------------------------------------------------------- // - - -void IconView::Draw(BRect updateRect) -{ - BRect r; - r = Bounds(); -} -// ---------------------------------------------------------------------------------------------------------- // - - -// AvailableViewArea - Constructor -AvailableViewArea::AvailableViewArea (BRect frame) : BView (frame, "AvailableViewArea", B_FOLLOW_ALL_SIDES, B_WILL_DRAW ) -{ - SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); -} -// ---------------------------------------------------------------------------------------------------------- // - - -void AvailableViewArea::Draw(BRect updateRect) -{ - BRect r; - r = Bounds(); + BRect r = Bounds(); // Display the 3D Look Divider Bar SetHighColor(140,140,140,0); - StrokeLine(BPoint(0,27),BPoint(490,27)); + StrokeLine(BPoint(r.left,r.top),BPoint(r.right,r.top)); SetHighColor(255,255,255,0); - StrokeLine(BPoint(1,28),BPoint(489,28)); + StrokeLine(BPoint(r.left,r.bottom),BPoint(r.right,r.bottom)); } -// ---------------------------------------------------------------------------------------------------------- // - -// AudioSettingsView - Constructor -AudioSettingsView::AudioSettingsView (BRect frame) : BView (frame, "AudioSettingsView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW ) +SettingsView::SettingsView (BRect frame, bool isVideo) + : BView (frame, "SettingsView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW ), + mIsVideo(isVideo) { SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + BRect rect(frame); + rect.left += 11; + rect.top += 12; + rect.right -=20; + rect.bottom = rect.top + 104; + BBox *defaultsBox = new BBox(rect, "defaults"); + defaultsBox->SetLabel(mIsVideo ? "Default Nodes" : "Defaults"); + AddChild(defaultsBox); + + BRect defaultRect(20, 22, 250, 40); + mMenu1 = new BMenu("menu1"); + mMenu1->SetLabelFromMarked(true); + BMenuField *menuField1 = new BMenuField(defaultRect, "menuField1", + mIsVideo ? "Video Input:" : "Audio Input:", mMenu1); + defaultsBox->AddChild(menuField1); + menuField1->SetDivider(75); + + defaultRect.OffsetBy(0, 26); + mMenu2 = new BMenu("menu2"); + mMenu2->SetLabelFromMarked(true); + BMenuField *menuField2 = new BMenuField(defaultRect, "menuField2", + mIsVideo ? "Video Output:" : "Audio Output:", mMenu2); + defaultsBox->AddChild(menuField2); + menuField2->SetDivider(75); + + if(!mIsVideo) { + defaultRect.OffsetBy(186, 0); + BMenu *mMenu3 = new BMenu("menu3"); + mMenu3->SetLabelFromMarked(true); + BMenuField *menuField3 = new BMenuField(defaultRect, "menuField3", + "Channel:", mMenu3); + defaultsBox->AddChild(menuField3); + menuField3->SetDivider(50); + defaultRect.OffsetBy(-186, 0); + } + + defaultRect.OffsetBy(0, 32); + BRect restartTextRect(defaultRect); + restartTextRect.OffsetTo(B_ORIGIN); + restartTextRect.InsetBy(1,1); + rgb_color red_color = {222, 32, 33}; + mRestartTextView = new BTextView(defaultRect, "restartTextView", restartTextRect, + be_plain_font, &red_color, B_FOLLOW_ALL, B_WILL_DRAW); + mRestartTextView->Insert("Restart the Media Server to apply changes."); + mRestartTextView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + defaultsBox->AddChild(mRestartTextView); + mRestartTextView->Hide(); + + rect.top = rect.bottom + 10; + rect.bottom = rect.top + 162; + BBox *realtimeBox = new BBox(rect, "realtime"); + realtimeBox->SetLabel("Real-Time"); + AddChild(realtimeBox); + + BMessage *message = new BMessage(ML_ENABLE_REAL_TIME); + message->AddBool("isVideo", mIsVideo); + BRect rect2(22,20, 190, 40); + mRealtimeCheckBox = new BCheckBox(rect2, "realtimeCheckBox", + mIsVideo ? "Enable Real-Time Video" : "Enable Real-Time Audio", message); + realtimeBox->AddChild(mRealtimeCheckBox); + + uint32 flags; + BMediaRoster::Roster()->GetRealtimeFlags(&flags); + if(flags & (mIsVideo ? B_MEDIA_REALTIME_VIDEO : B_MEDIA_REALTIME_AUDIO)) + mRealtimeCheckBox->SetValue(B_CONTROL_ON); + + rect2.top += 26; + rect2.bottom = rect2.top + 80; + rect2.right = rect.right - 15; + BRect textRect(3, 3, rect2.Width() - 3, rect2.Height() - 3); + BTextView *textView = new BTextView(rect2, "textView", textRect, B_FOLLOW_ALL, B_WILL_DRAW); + textView->Insert(mIsVideo ? "Enabling Real-Time Video allows the BeOS to perform video operations as fast and smoothly as possible. It achieves optimum performance by using more RAM." + : "Enabling Real-time Audio allows BeOS to record and play audio as fast as possible. It achieves this performance by using more CPU and RAM."); + textView->Insert("\n\nOnly enable this feature if you need the lowest latency possible."); + textView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + realtimeBox->AddChild(textView); + + rect.top = rect.bottom + 11; + rect.bottom = rect.top + 20; + rect.left = rect.right - 130; + BButton *restartButton = new BButton(rect, "restartButton", + "Restart Media Services", new BMessage(ML_RESTART_MEDIA_SERVER)); + AddChild(restartButton); + + if(!mIsVideo) { + rect.top += 4; + rect.left = frame.left + 33; + rect.right = rect.left + 180; + + mVolumeCheckBox = new BCheckBox(rect, "volumeCheckBox", + "Show Volume Control on Deskbar", new BMessage(ML_SHOW_VOLUME_CONTROL)); + AddChild(mVolumeCheckBox); + + if(BDeskbar().HasItem("MediaReplicant")) + mVolumeCheckBox->SetValue(B_CONTROL_ON); + } } -// ---------------------------------------------------------------------------------------------------------- // - -void AudioSettingsView::Draw(BRect updateRect) +void +SettingsView::AddNodes(BList &list, bool isInput) { - BRect r; - r = Bounds(); + BMenu *menu = isInput ? mMenu1 : mMenu2; + BMenuItem *item; + while(item = menu->RemoveItem((int32)0)) + delete item; + + BMessage message(ML_DEFAULT_CHANGE); + message.AddBool("isVideo", mIsVideo); + message.AddBool("isInput", isInput); + + for(int32 i=0; i(list.ItemAt(i)); + menu->AddItem(new SettingsItem(info, new BMessage(message))); + } } -// ---------------------------------------------------------------------------------------------------------- // - -// AudioMixerView - Constructor -AudioMixerView::AudioMixerView (BRect frame) : BView (frame, "AudioMixerView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW ) +void +SettingsView::SetDefault(dormant_node_info &info, bool isInput) { - SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + BMenu *menu = isInput ? mMenu1 : mMenu2; + + for(int32 i=0; iCountItems(); i++) { + SettingsItem *item = static_cast(menu->ItemAt(i)); + if(item->mInfo && item->mInfo->addon == info.addon && item->mInfo->flavor_id == info.flavor_id) { + item->SetMarked(true); + break; + } + } } -// ---------------------------------------------------------------------------------------------------------- // - -void AudioMixerView::Draw(BRect updateRect) +SettingsItem::SettingsItem(dormant_node_info *info, BMessage *message, + char shortcut, uint32 modifiers) + : BMenuItem(info->name, message, shortcut, modifiers), + mInfo(info) { - BRect r; - r = Bounds(); + } -// ---------------------------------------------------------------------------------------------------------- // - + \ No newline at end of file diff --git a/src/prefs/media/MediaViews.h b/src/prefs/media/MediaViews.h index fb3c9db3c9..ccd25edda2 100644 --- a/src/prefs/media/MediaViews.h +++ b/src/prefs/media/MediaViews.h @@ -8,44 +8,45 @@ MediaViews Header by Sikosis #ifndef __MEDIAVIEWS_H__ #define __MEDIAVIEWS_H__ +#include +#include +#include -#include "Media.h" -#include "MediaWindows.h" +const uint32 ML_RESTART_MEDIA_SERVER = 'resr'; +const uint32 ML_SHOW_VOLUME_CONTROL = 'shvc'; +const uint32 ML_ENABLE_REAL_TIME = 'enrt'; +const uint32 ML_DEFAULT_CHANGE = 'dech'; -class MediaView : public BView +class BarView : public BView { public: - MediaView(BRect frame); + BarView(BRect frame); virtual void Draw(BRect updateRect); }; -class IconView : public BView +class SettingsItem : public BMenuItem { public: - IconView(BRect frame); - virtual void Draw(BRect updateRect); + SettingsItem(dormant_node_info *info, BMessage *message, + char shortcut = 0, uint32 modifiers = 0); + dormant_node_info *mInfo; }; -class AvailableViewArea : public BView +class SettingsView : public BView { public: - AvailableViewArea(BRect frame); - virtual void Draw(BRect updateRect); -}; - -class AudioSettingsView : public BView -{ - public: - AudioSettingsView(BRect frame); - virtual void Draw(BRect updateRect); -}; - -class AudioMixerView : public BView -{ - public: - AudioMixerView(BRect frame); - virtual void Draw(BRect updateRect); -}; + SettingsView(BRect frame, bool isVideo); + void AddNodes(BList &list, bool isInput); + void SetDefault(dormant_node_info &info, bool isInput); + BCheckBox *mRealtimeCheckBox; + BCheckBox *mVolumeCheckBox; + BMenu *mMenu1; + BMenu *mMenu2; + BMenu *mMenu3; + BTextView *mRestartTextView; + private: + bool mIsVideo; +}; #endif diff --git a/src/prefs/media/MediaWindow.cpp b/src/prefs/media/MediaWindow.cpp index 4a3a028a98..a91abb1f1c 100644 --- a/src/prefs/media/MediaWindow.cpp +++ b/src/prefs/media/MediaWindow.cpp @@ -8,67 +8,34 @@ Media - MediaWindow by Sikosis // Includes -------------------------------------------------------------------------------------------------- // -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Media Includes -#include -#include -#include #include -#include - -#include "Media.h" -#include "MediaViews.h" -#include "MediaWindows.h" -#include "MediaListItem.h" +#include +#include +#include +#include +#include +#include +#include +#include "MediaWindow.h" +#include +#include +#include +#include +#include "MediaAlert.h" // Images -#include "devices.h" -#include "mixer.h" -#include "tv.h" - -const uint32 ML_AUDIO_SETTINGS = 'MlAS'; -const uint32 ML_AUDIO_MIXER = 'MlAM'; -const uint32 NEW_MSG = 'nmsg'; - -// CenterWindowOnScreen -- Centers the BWindow to the Current Screen -static void CenterWindowOnScreen(BWindow* w) -{ - BRect screenFrame = (BScreen(B_MAIN_SCREEN_ID).Frame()); - BPoint pt; - pt.x = screenFrame.Width()/2 - w->Bounds().Width()/2; - pt.y = screenFrame.Height()/2 - w->Bounds().Height()/2; - - if (screenFrame.Contains(pt)) - w->MoveTo(pt); -} -// ---------------------------------------------------------------------------------------------------------- // +#include "iconfile.h" +const uint32 ML_SELECTED_NODE = 'MlSN'; +const uint32 ML_INIT_MEDIA = 'MlIM'; // MediaWindow - Constructor -MediaWindow::MediaWindow(BRect frame) : BWindow (frame, "OBOS Media", B_TITLED_WINDOW, B_NORMAL_WINDOW_FEEL , 0) +MediaWindow::MediaWindow(BRect frame) +: BWindow (frame, "OBOS Media", B_TITLED_WINDOW, B_NORMAL_WINDOW_FEEL , 0), + mCurrentNode(NULL), + mParamWeb(NULL) { InitWindow(); - CenterWindowOnScreen(this); Show(); } @@ -76,120 +43,308 @@ MediaWindow::MediaWindow(BRect frame) : BWindow (frame, "OBOS Media", B_TITLED_W // MediaWindow - Destructor MediaWindow::~MediaWindow() { - exit(0); + for(int i=0; iReleaseNode(*mCurrentNode); + + char buffer[512]; + BRect rect = Frame(); + rect.PrintToStream(); + sprintf(buffer, "# MediaPrefs Settings\n rect = %i,%i,%i,%i\n", int(rect.left), int(rect.top), int(rect.right), int(rect.bottom)); + + BPath path; + if(find_directory(B_USER_SETTINGS_DIRECTORY, &path) == B_OK) { + path.Append(SETTINGS_FILE); + BFile file(path.Path(),B_READ_WRITE|B_CREATE_FILE|B_ERASE_FILE); + if(file.InitCheck()==B_OK) { + file.Write(buffer, strlen(buffer)); + } + } } +void +MediaWindow::FindNodes(media_type type, uint64 kind, BList &list) +{ + dormant_node_info node_info[64]; + int32 node_info_count = 64; + media_format format; + media_format *format1 = NULL, *format2 = NULL; + BMediaRoster *roster = BMediaRoster::Roster(); + format.type = type; + + if(kind & B_PHYSICAL_OUTPUT) + format1 = &format; + else if(kind & B_PHYSICAL_INPUT) + format2 = &format; + else + return; + + if(roster->GetDormantNodes(node_info, &node_info_count, format1, format2, NULL, kind)!=B_OK) { + printf("error\n"); + return; + } + + for(int32 i=0; iname, node_info[i].name); + info->flavor_id = node_info[i].flavor_id; + info->addon = node_info[i].addon; + list.AddItem(info); + } +} + +MediaListItem * +MediaWindow::FindMediaListItem(dormant_node_info *info) +{ + for(int32 j=0; jCountItems(); j++) { + MediaListItem *item = static_cast(mListView->ItemAt(j)); + if(item->mInfo && item->mInfo->addon == info->addon && item->mInfo->flavor_id == info->flavor_id) { + return item; + break; + } + } + return NULL; +} + +void +MediaWindow::AddNodes(BList &list, bool isVideo) +{ + for(int32 i=0; i(list.ItemAt(i)); + if(!FindMediaListItem(info)) + mListView->AddItem(new MediaListItem(info, 1, isVideo, &mIcons)); + } +} // MediaWindow::InitWindow -- Initialization Commands here void MediaWindow::InitWindow(void) { - BRect r; - r = Bounds(); // the whole view - - // Grab Media Info - media_node mixerNode; - BMediaRoster* roster = BMediaRoster::Roster(); - roster->GetAudioMixer(&mixerNode); - roster->GetParameterWebFor(mixerNode, &mParamWeb); - - // we look up the global BMediaRoster object, - // ask it for a reference to the global system mixer's node, - // then get a copy of the node's BParameterWeb. - BMediaTheme* theme = BMediaTheme::PreferredTheme(); - BView* paramView = theme->ViewFor(mParamWeb); - - // Create the OutlineView - BRect outlinerect(r.left+12,r.top+12,r.left+146,r.bottom-10); - BRect AvailableRect(r.left+160,r.top+12,r.right-10,r.bottom-10); - BRect TitleRect(0,0,140,16); - BRect AudioMixerRect(0,30,470,400); - - BOutlineListView *outline; - //MediaListItem *topmenu; - //MediaListItem *submenu; - BListItem *topmenu; - BListItem *submenu; - BScrollView *outlinesv; - BStringView *stvAudioSettings; - BStringView *stvAudioMixer; - - outline = new BOutlineListView(outlinerect,"audio_list", B_SINGLE_SELECTION_LIST); - outline->AddItem(topmenu = new BStringItem("Audio Settings")); - outline->AddUnder(submenu = new BStringItem("Audio Mixer"), topmenu); - outline->AddUnder(new BStringItem("None Out"), submenu); - outline->AddUnder(new BStringItem("None In"), submenu); - outline->AddItem(topmenu = new BStringItem("Video Settings")); - outline->AddUnder(submenu = new BStringItem("Video Window Consumer"), topmenu); - // Bitmaps - BRect BitmapFrame(0,0,15,15); - BBitmap *DevicesIcon = new BBitmap(BitmapFrame,B_RGB32); - DevicesIcon->SetBits(devicesicon,768,0,B_RGB32); - BBitmap *MixerIcon = new BBitmap(BitmapFrame,B_RGB32); - MixerIcon->SetBits(mixericon,768,0,B_RGB32); - BBitmap *TVIcon = new BBitmap(BitmapFrame,B_RGB32); - TVIcon->SetBits(tvicon,768,0,B_RGB32); + BRect iconRect(0,0,15,15); + BBitmap *icon = new BBitmap(iconRect, B_CMAP8); + icon->SetBits(kDevicesBits, kDevicesWidth*kDevicesHeight, 0, kDevicesColorSpace); + mIcons.AddItem(icon); + icon = new BBitmap(iconRect, B_CMAP8); + icon->SetBits(kMixerBits, kMixerWidth*kMixerHeight, 0, kMixerColorSpace); + mIcons.AddItem(icon); + icon = new BBitmap(iconRect, B_CMAP8); + icon->SetBits(kMicBits, kMicWidth*kMicHeight, 0, kMicColorSpace); + mIcons.AddItem(icon); + icon = new BBitmap(iconRect, B_CMAP8); + icon->SetBits(kSpeakerBits, kSpeakerWidth*kSpeakerHeight, 0, kSpeakerColorSpace); + mIcons.AddItem(icon); + icon = new BBitmap(iconRect, B_CMAP8); + icon->SetBits(kCamBits, kCamWidth*kCamHeight, 0, kCamColorSpace); + mIcons.AddItem(icon); + icon = new BBitmap(iconRect, B_CMAP8); + icon->SetBits(kTVBits, kTVWidth*kTVHeight, 0, kTVColorSpace); + mIcons.AddItem(icon); + + + BRect bounds = Bounds(); // the whole view + + // Create the OutlineView + BRect menuRect(bounds.left+14,bounds.top+14,bounds.left+146,bounds.bottom-14); + BRect titleRect(menuRect.right+14,menuRect.top,bounds.right-10,menuRect.top+16); + BRect availableRect(menuRect.right+14,titleRect.bottom+12,bounds.right-10,bounds.bottom-14); + BRect barRect(titleRect.left,titleRect.bottom+10,titleRect.right,titleRect.bottom+11); + - /*outline->AddItem(topmenu = new MediaListItem("Audio Settings", MediaListItem::AS, DevicesIcon, new BMessage(ML_AUDIO_SETTINGS))); - outline->AddItem(submenu = new MediaListItem("Audio Mixer", MediaListItem::AM, MixerIcon, new BMessage(ML_AUDIO_MIXER))); - outline->AddUnder(new BStringItem("None Out"), submenu); - outline->AddUnder(new BStringItem("None In"), submenu); - outline->AddItem(topmenu = new MediaListItem("Video Settings", MediaListItem::VS, DevicesIcon, new BMessage(NEW_MSG))); - outline->AddItem(submenu = new MediaListItem("Video Window Consumer", MediaListItem::VWC, TVIcon, new BMessage(NEW_MSG)));*/ + - topmenu->SetHeight(18); - submenu->SetHeight(18); + + mListView = new BListView(menuRect,"audio_list", B_SINGLE_SELECTION_LIST, B_FOLLOW_ALL_SIDES); + mListView->SetSelectionMessage(new BMessage(ML_SELECTED_NODE)); // Add ScrollView to Media Menu - outlinesv = new BScrollView("scroll_audio", outline, B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, false, B_FANCY_BORDER); - - // StringViews - rgb_color TitleFontColor = { 0,0,0,0 }; - stvAudioSettings = new BStringView(TitleRect, "AudioSettings", "Audio Settings", B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); - stvAudioSettings->SetFont(be_bold_font); - stvAudioSettings->SetFontSize(12.0); - stvAudioSettings->SetHighColor(TitleFontColor); - stvAudioMixer = new BStringView(TitleRect, "AudioMixer", "Audio Mixer", B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); - stvAudioMixer->SetFont(be_bold_font); - stvAudioMixer->SetFontSize(12.0); - stvAudioMixer->SetHighColor(TitleFontColor); - - // Setup the OutlineView - outline->AllAttached(); - outlinesv->SetBorderHighlighted(true); - - // Back and Fore ground Colours - outline->SetHighColor(0,0,0,0); - outline->SetLowColor(255,255,255,0); - - // Font Settings - BFont OutlineFont; - OutlineFont.SetSpacing(B_CHAR_SPACING); - OutlineFont.SetSize(12); - outline->SetFont(&OutlineFont,B_FONT_SHEAR | B_FONT_SPACING); + BScrollView *scrollView = new BScrollView("scroll_audio", mListView, B_FOLLOW_LEFT|B_FOLLOW_TOP_BOTTOM, 0, false, false, B_FANCY_BORDER); // Create the Views - AddChild(ptrMediaView = new MediaView(r)); + mBox = new BBox(bounds, "mediaView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW | B_FRAME_EVENTS, B_PLAIN_BORDER); // Add Child(ren) - ptrMediaView->AddChild(outlinesv); - ptrMediaView->AddChild(ptrAvailableViewArea = new AvailableViewArea(AvailableRect)); - ptrAvailableViewArea->AddChild(ptrAudioMixerView = new AudioMixerView(AudioMixerRect)); + AddChild(mBox); + mBox->AddChild(scrollView); - // Add Child(ren) - Audio Settings View - ptrAvailableViewArea->AddChild(stvAudioSettings); - stvAudioSettings->Hide(); + // StringViews + rgb_color titleFontColor = { 0,0,0,0 }; + mTitleView = new BStringView(titleRect, "AudioSettings", "Audio Settings", B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); + mTitleView->SetFont(be_bold_font); + mTitleView->SetFontSize(12.0); + mTitleView->SetHighColor(titleFontColor); + + mBox->AddChild(mTitleView); + + mContentView = new BBox(availableRect, "contentView", B_FOLLOW_ALL_SIDES, B_WILL_DRAW | B_FRAME_EVENTS, B_NO_BORDER); + mBox->AddChild(mContentView); + + BRect settingsRect(0,0,availableRect.Width(), availableRect.Height()); + mAudioView = new SettingsView(settingsRect, false); + mVideoView = new SettingsView(settingsRect, true); + + mBar = new BarView(barRect); + mBox->AddChild(mBar); - // Add Child(ren) - Audio Mixer View - ptrAvailableViewArea->AddChild(stvAudioMixer); - //stvAudioMixer->Hide(); - ptrAudioMixerView->AddChild(paramView); + // Grab Media Info + /*FindNodes(B_MEDIA_RAW_AUDIO, B_PHYSICAL_OUTPUT, mAudioOutputs); + FindNodes(B_MEDIA_RAW_AUDIO, B_PHYSICAL_INPUT, mAudioInputs); + FindNodes(B_MEDIA_RAW_VIDEO, B_PHYSICAL_OUTPUT, mVideoOutputs); + FindNodes(B_MEDIA_RAW_VIDEO, B_PHYSICAL_INPUT, mVideoInputs); + FindNodes(B_MEDIA_ENCODED_VIDEO, B_PHYSICAL_OUTPUT, mVideoOutputs); + FindNodes(B_MEDIA_ENCODED_VIDEO, B_PHYSICAL_INPUT, mVideoInputs); + + AddNodes(mAudioOutputs, false); + AddNodes(mAudioInputs, false); + AddNodes(mVideoOutputs, true); + AddNodes(mVideoInputs, true); + + mAudioView->AddNodes(mAudioOutputs, false); + mAudioView->AddNodes(mAudioInputs, true); + mVideoView->AddNodes(mVideoOutputs, false); + mVideoView->AddNodes(mVideoInputs, true); + + mListView->AddItem(item = new MediaListItem("Audio Settings", 0, false, &mIcons)); + mListView->AddItem(item = new MediaListItem("Video Settings", 0, true, &mIcons)); + + mListView->AddItem(mixer = new MediaListItem("Audio Mixer", 1, false, &mIcons)); + mixer->SetAudioMixer(true); + + mListView->SortItems(&MediaListItem::Compare); + + media_node default_node; + dormant_node_info node_info; + BMediaRoster* roster = BMediaRoster::Roster(); + + roster->GetAudioInput(&default_node); + roster->GetDormantNodeFor(default_node, &node_info); + item = FindMediaListItem(&node_info); + if(item) + item->SetDefault(true, true); + mAudioView->SetDefault(node_info, true); + + roster->GetAudioOutput(&default_node); + roster->GetDormantNodeFor(default_node, &node_info); + item = FindMediaListItem(&node_info); + if(item) + item->SetDefault(true, false); + mAudioView->SetDefault(node_info, false); + + roster->GetVideoInput(&default_node); + roster->GetDormantNodeFor(default_node, &node_info); + item = FindMediaListItem(&node_info); + if(item) + item->SetDefault(true, true); + mVideoView->SetDefault(node_info, true); + + roster->GetVideoOutput(&default_node); + roster->GetDormantNodeFor(default_node, &node_info); + item = FindMediaListItem(&node_info); + if(item) + item->SetDefault(true, false); + mVideoView->SetDefault(node_info, false);*/ + + InitMedia(true); } // ---------------------------------------------------------------------------------------------------------- // +void +MediaWindow::InitMedia(bool first) +{ + BListItem *listItem; + while(listItem = mListView->RemoveItem((int32)0)) + delete listItem; + + MediaListItem *item, *mixer; + + // Grab Media Info + FindNodes(B_MEDIA_RAW_AUDIO, B_PHYSICAL_OUTPUT, mAudioOutputs); + FindNodes(B_MEDIA_RAW_AUDIO, B_PHYSICAL_INPUT, mAudioInputs); + FindNodes(B_MEDIA_RAW_VIDEO, B_PHYSICAL_OUTPUT, mVideoOutputs); + FindNodes(B_MEDIA_RAW_VIDEO, B_PHYSICAL_INPUT, mVideoInputs); + FindNodes(B_MEDIA_ENCODED_VIDEO, B_PHYSICAL_OUTPUT, mVideoOutputs); + FindNodes(B_MEDIA_ENCODED_VIDEO, B_PHYSICAL_INPUT, mVideoInputs); + + AddNodes(mAudioOutputs, false); + AddNodes(mAudioInputs, false); + AddNodes(mVideoOutputs, true); + AddNodes(mVideoInputs, true); + + mAudioView->AddNodes(mAudioOutputs, false); + mAudioView->AddNodes(mAudioInputs, true); + mVideoView->AddNodes(mVideoOutputs, false); + mVideoView->AddNodes(mVideoInputs, true); + + mListView->AddItem(item = new MediaListItem("Audio Settings", 0, false, &mIcons)); + mListView->AddItem(item = new MediaListItem("Video Settings", 0, true, &mIcons)); + + mListView->AddItem(mixer = new MediaListItem("Audio Mixer", 1, false, &mIcons)); + mixer->SetAudioMixer(true); + + mListView->SortItems(&MediaListItem::Compare); + + media_node default_node; + dormant_node_info node_info; + BMediaRoster* roster = BMediaRoster::Roster(); + + roster->GetAudioInput(&default_node); + roster->GetDormantNodeFor(default_node, &node_info); + item = FindMediaListItem(&node_info); + if(item) + item->SetDefault(true, true); + mAudioView->SetDefault(node_info, true); + + roster->GetAudioOutput(&default_node); + roster->GetDormantNodeFor(default_node, &node_info); + item = FindMediaListItem(&node_info); + if(item) + item->SetDefault(true, false); + mAudioView->SetDefault(node_info, false); + + roster->GetVideoInput(&default_node); + roster->GetDormantNodeFor(default_node, &node_info); + item = FindMediaListItem(&node_info); + if(item) + item->SetDefault(true, true); + mVideoView->SetDefault(node_info, true); + + roster->GetVideoOutput(&default_node); + roster->GetDormantNodeFor(default_node, &node_info); + item = FindMediaListItem(&node_info); + if(item) + item->SetDefault(true, false); + mVideoView->SetDefault(node_info, false); + + if(first) { + mCurrentNode = new media_node(); + BMediaRoster* roster = BMediaRoster::Roster(); + roster->GetAudioMixer(mCurrentNode); + roster->GetParameterWebFor(*mCurrentNode, &mParamWeb); + BMediaTheme* theme = BMediaTheme::PreferredTheme(); + BView* paramView = theme->ViewFor(mParamWeb); + if(paramView) { + mContentView->AddChild(paramView); + paramView->ResizeTo(mContentView->Bounds().Width(), mContentView->Bounds().Height()); + mListView->Select(mListView->IndexOf(mixer)); + } else { + delete mCurrentNode; + mCurrentNode = NULL; + } + } +} // MediaWindow::QuitRequested -- Post a message to the app to quit -bool MediaWindow::QuitRequested() +bool +MediaWindow::QuitRequested() { be_app->PostMessage(B_QUIT_REQUESTED); return true; @@ -198,7 +353,8 @@ bool MediaWindow::QuitRequested() // MediaWindow::FrameResized -- When the main frame is resized fix up the other views -void MediaWindow::FrameResized (float width, float height) +void +MediaWindow::FrameResized (float width, float height) { // This makes sure our SideBar colours down to the bottom when resized BRect r; @@ -207,7 +363,8 @@ void MediaWindow::FrameResized (float width, float height) // ---------------------------------------------------------------------------------------------------------- // // ErrorAlert -- Displays a BAlert Box with a Custom Error or Debug Message -void ErrorAlert(char* errorMessage) { +void +ErrorAlert(char* errorMessage) { printf("%s\n", errorMessage); BAlert *alert = new BAlert("BAlert", errorMessage, "OK", NULL, NULL, B_WIDTH_AS_USUAL, B_STOP_ALERT); alert->Go(); @@ -217,16 +374,224 @@ void ErrorAlert(char* errorMessage) { // MediaWindow::MessageReceived -- receives messages -void MediaWindow::MessageReceived (BMessage *message) +void +MediaWindow::MessageReceived (BMessage *message) { switch(message->what) { - case ML_AUDIO_SETTINGS: - exit(1); // debug of course ;) + case ML_INIT_MEDIA: + InitMedia(false); + break; + case ML_DEFAULT_CHANGE: + { + bool isVideo = true; + bool isInput = true; + if(message->FindBool("isVideo", &isVideo)!=B_OK) + break; + if(message->FindBool("isInput", &isInput)!=B_OK) + break; + int32 index; + if(message->FindInt32("index", &index)!=B_OK) + break; + SettingsView *settingsView = isVideo ? mVideoView : mAudioView; + BMenu *menu = isInput ? settingsView->mMenu1 : settingsView->mMenu2; + SettingsItem *item = static_cast(menu->ItemAt(index)); + + if(item) { + printf("cocuou isVideo %i isInput %i\n", isVideo, isInput); + BMediaRoster *roster = BMediaRoster::Roster(); + if(isVideo) { + if(isInput) + roster->SetVideoInput(*item->mInfo); + else + roster->SetVideoOutput(*item->mInfo); + } else { + if(isInput) + roster->SetAudioInput(*item->mInfo); + else + roster->SetAudioOutput(*item->mInfo); + } + + MediaListItem *oldListItem = NULL; + for(int32 j=0; jCountItems(); j++) { + oldListItem = static_cast(mListView->ItemAt(j)); + if(oldListItem->mInfo && oldListItem->IsVideo() == isVideo + && oldListItem->IsDefault(isInput)) + break; + } + if(oldListItem) + oldListItem->SetDefault(false, isInput); + else + printf("oldListItem not found\n"); + + MediaListItem *listItem = FindMediaListItem(item->mInfo); + if(listItem) { + listItem->SetDefault(true, isInput); + } else + printf("MediaListItem not found\n"); + mListView->Invalidate(); + + if(settingsView->mRestartTextView->IsHidden()) + settingsView->mRestartTextView->Show(); + } else + printf("SettingsItem not found\n"); + } + break; + case ML_RESTART_MEDIA_SERVER: + { + thread_id tid; + tid = spawn_thread(&MediaWindow::RestartMediaServices, "restart_thread", B_NORMAL_PRIORITY, this); + if(tidmVolumeCheckBox->Value()==B_CONTROL_ON) { + BEntry entry("/bin/desklink", true); + int32 id; + entry_ref ref; + entry.GetRef(&ref); + if(deskbar.AddItem(&ref, &id)!=B_OK) + printf("Couldn't add Volume control in Deskbar\n"); + } else { + if(deskbar.RemoveItem("MediaReplicant")!=B_OK) + printf("Couldn't remove Volume control in Deskbar\n"); + } + } + break; + case ML_ENABLE_REAL_TIME: + { + bool isVideo = true; + if(message->FindBool("isVideo", &isVideo)!=B_OK) + break; + SettingsView *settingsView = isVideo ? mVideoView : mAudioView; + uint32 flags; + uint32 realtimeFlag = isVideo ? B_MEDIA_REALTIME_VIDEO : B_MEDIA_REALTIME_AUDIO; + BMediaRoster *roster = BMediaRoster::Roster(); + roster->GetRealtimeFlags(&flags); + if(settingsView->mRealtimeCheckBox->Value()==B_CONTROL_ON) + flags |= realtimeFlag; + else + flags &= !realtimeFlag; + roster->SetRealtimeFlags(flags); + } + break; + case ML_SELECTED_NODE: + { + MediaListItem *item = static_cast(mListView->ItemAt(mListView->CurrentSelection())); + BMediaRoster* roster = BMediaRoster::Roster(); + if(mCurrentNode) + roster->ReleaseNode(*mCurrentNode); + mCurrentNode = NULL; + if(mParamWeb) + delete mParamWeb; + mParamWeb = NULL; + + if(mContentView->ChildAt(0)!=NULL) + mContentView->RemoveChild(mContentView->ChildAt(0)); + + mTitleView->SetText(item->GetLabel()); + //if(item->OutlineLevel() == 0 || item->IsAudioMixer()) { + // Display the 3D Look Divider Bar + if(mBar->IsHidden()) + mBar->Show(); + //} else + // if(!mBar->IsHidden()) + // mBar->Hide(); + + if(item->OutlineLevel() == 0) { + if(item->IsVideo()) + mContentView->AddChild(mVideoView); + else + mContentView->AddChild(mAudioView); + } else { + + if(!mCurrentNode) + mCurrentNode = new media_node(); + media_node_id node_id; + if(item->IsAudioMixer()) + roster->GetAudioMixer(mCurrentNode); + else if(roster->GetInstancesFor(item->mInfo->addon, item->mInfo->flavor_id, &node_id)!=B_OK) + roster->InstantiateDormantNode(*(item->mInfo), mCurrentNode); + else + roster->GetNodeFor(node_id, mCurrentNode); + + + if(roster->GetParameterWebFor(*mCurrentNode, &mParamWeb)==B_OK) { + BMediaTheme* theme = BMediaTheme::PreferredTheme(); + BView* paramView = theme->ViewFor(mParamWeb); + mContentView->AddChild(paramView); + paramView->ResizeTo(mContentView->Bounds().Width(), mContentView->Bounds().Height()); + } else { + mParamWeb = NULL; + BRect bounds = mContentView->Bounds(); + BStringView* stringView = new BStringView(bounds, + "noControls", "This hardware has no controls.", B_FOLLOW_V_CENTER | B_FOLLOW_H_CENTER); + stringView->ResizeToPreferred(); + mContentView->AddChild(stringView); + stringView->MoveBy((bounds.Width()-stringView->Bounds().Width())/2, + (bounds.Height()-stringView->Bounds().Height())/2); + if(mBar->IsHidden()) + mBar->Show(); + } + } + + } break; default: BWindow::MessageReceived(message); break; } } -// ---------------------------------------------------------------------------------------------------------- // + +status_t +MediaWindow::RestartMediaServices(void *data) +{ + MediaWindow *window = (MediaWindow *)data; + MediaAlert *alert = new MediaAlert(BRect(0,0,300,60), + "restart_alert", "Restarting Media Services\nShutting down Media Server\n"); + + alert->Show(); + + shutdown_media_server(B_INFINITE_TIMEOUT, MediaWindow::UpdateProgress, alert); + launch_media_server(); + + snooze(2000000); + + alert->PostMessage(B_QUIT_REQUESTED); + + window->PostMessage(ML_INIT_MEDIA); +} + +bool +MediaWindow::UpdateProgress(int stage, const char * message, void * cookie) +{ + //BAlert *alert = static_cast(cookie); + MediaAlert *alert = static_cast(cookie); + printf("stage : %i\n", stage); + char *string; + switch(stage) { + case 10: + string = "Stopping Media Server..."; + break; + case 20: + string = "Telling media_addon_server to quit."; + break; + case 40: + string = "Waiting for media_server to quit."; + break; + case 70: + string = "Cleaning Up."; + break; + case 100: + string = "Done Shutting Down."; + break; + } + alert->Lock(); + alert->TextView()->SetText(string); + alert->Unlock(); + return true; +} \ No newline at end of file diff --git a/src/prefs/media/MediaWindow.h b/src/prefs/media/MediaWindow.h new file mode 100644 index 0000000000..9318ff7438 --- /dev/null +++ b/src/prefs/media/MediaWindow.h @@ -0,0 +1,60 @@ +/* + +Media Windows Header by Sikosis + +(C)2003 + +*/ + +#ifndef __MEDIAWINDOWS_H__ +#define __MEDIAWINDOWS_H__ + +#include +#include +#include +#include +#include +#include + +#include "MediaViews.h" +#include "MediaListItem.h" + +#define SETTINGS_FILE "MediaPrefs Settings" + +class MediaWindow : public BWindow +{ + public: + MediaWindow(BRect frame); + ~MediaWindow(); + virtual bool QuitRequested(); + virtual void MessageReceived(BMessage *message); + virtual void FrameResized(float width, float height); + private: + void InitMedia(bool first); + void FindNodes(media_type type, uint64 kind, BList &list); + void AddNodes(BList &list, bool isVideo); + MediaListItem *FindMediaListItem(dormant_node_info *info); + void InitWindow(void); + static status_t RestartMediaServices(void *data); + static bool UpdateProgress(int stage, const char * message, void * cookie); + + BBox * mBox; + BListView* mListView; + BStringView* mTitleView; + BView* mContentView; + SettingsView* mAudioView; + SettingsView* mVideoView; + BarView* mBar; + + media_node* mCurrentNode; + BParameterWeb* mParamWeb; + + BList mAudioInputs; + BList mAudioOutputs; + BList mVideoInputs; + BList mVideoOutputs; + + BList mIcons; +}; + +#endif diff --git a/src/prefs/media/MediaWindows.h b/src/prefs/media/MediaWindows.h deleted file mode 100644 index 2f8be18567..0000000000 --- a/src/prefs/media/MediaWindows.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - -Media Windows Header by Sikosis - -(C)2003 - -*/ - -#ifndef __MEDIAWINDOWS_H__ -#define __MEDIAWINDOWS_H__ - -#include "Media.h" -#include "MediaViews.h" -#include "MediaListItem.h" - -class BParameterWeb; -class BContinuousParameter; -class BMultiChannelControl; - -class MediaView; -class IconView; -class AvailableViewArea; -class AudioSettingsView; -class AudioMixerView; - -class MediaListItem; - -class MediaWindow : public BWindow -{ - public: - MediaWindow(BRect frame); - ~MediaWindow(); - virtual bool QuitRequested(); - virtual void MessageReceived(BMessage *message); - virtual void FrameResized(float width, float height); - private: - void InitWindow(void); - - MediaView* ptrMediaView; - IconView* ptrIconView; - AvailableViewArea* ptrAvailableViewArea; - AudioSettingsView* ptrAudioSettingsView; - AudioMixerView* ptrAudioMixerView; - - BParameterWeb* mParamWeb; - BMultiChannelControl* mGainControl; - BContinuousParameter* mGainParam; - float mScale, mOffset; - int32 mControlMin; -}; - -#endif diff --git a/src/prefs/media/devices.h b/src/prefs/media/devices.h deleted file mode 100644 index 665c734a65..0000000000 --- a/src/prefs/media/devices.h +++ /dev/null @@ -1,44 +0,0 @@ -unsigned char devicesicon[768] ={ -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC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,0x58,0x58,0x58,0xB0,0xB0,0xB0, -0x3C,0x3C,0x3C,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0x59,0x59,0x59,0x4A,0x4A,0x4A,0x78,0x78,0x78,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC}; diff --git a/src/prefs/media/iconfile.h b/src/prefs/media/iconfile.h new file mode 100644 index 0000000000..65adb8727b --- /dev/null +++ b/src/prefs/media/iconfile.h @@ -0,0 +1,139 @@ +const int32 kDevicesWidth = 16; +const int32 kDevicesHeight = 16; +const color_space kDevicesColorSpace = B_CMAP8; + +const unsigned char kDevicesBits [] = { + 0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x9f,0x29,0x29,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x70,0x37,0x9f,0x01,0x29,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x01,0xfa,0xfa,0x77,0x3a,0xb7,0x29,0x29,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x91,0x3e,0x91,0xdc,0x77,0x97,0x97,0x29,0x00,0x00,0xff,0xff,0xff, + 0xff,0xff,0x00,0x90,0x7f,0x71,0xfa,0x6b,0xfa,0x71,0x97,0x07,0x13,0x29,0xff,0xff, + 0xff,0xff,0x00,0x71,0x70,0x6b,0xfa,0xcb,0x6b,0x3e,0x08,0x14,0x00,0xff,0xff,0xff, + 0xff,0xff,0x00,0x6b,0x45,0xfa,0xfa,0xaa,0xfa,0x71,0x05,0x11,0x29,0xff,0xff,0xff, + 0xff,0xff,0x00,0x4b,0xe5,0x3c,0x77,0x71,0x71,0xfa,0x06,0x11,0x29,0xff,0xff,0xff, + 0xff,0xff,0x00,0x91,0xfa,0xb7,0x71,0x3c,0x77,0x70,0x07,0x12,0x00,0xff,0xff,0xff, + 0xff,0xff,0x29,0x00,0xfa,0x51,0x6b,0x3a,0xfa,0xfa,0x06,0x12,0x29,0xff,0xff,0xff, + 0xff,0xff,0xff,0x29,0x00,0x97,0xf9,0x51,0xfa,0x97,0x08,0x16,0x01,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x29,0x00,0x97,0xfa,0x06,0x07,0x16,0x00,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x29,0x00,0x00,0x06,0x16,0x00,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x0d,0x00,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0xff +}; + +const int32 kMixerWidth = 16; +const int32 kMixerHeight = 16; +const color_space kMixerColorSpace = B_CMAP8; + +const unsigned char kMixerBits [] = { + 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x17,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x17,0x17,0x18,0x3f,0x00,0x00,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x17,0x17,0x31,0x18,0x00,0x3f,0x3f,0x00,0x00,0xff,0xff,0xff, + 0xff,0xff,0x00,0x17,0x17,0x18,0x3f,0x17,0x17,0x00,0x00,0x3f,0x3f,0x00,0x00,0xff, + 0xff,0x00,0x17,0x17,0x31,0x18,0x00,0x3f,0x3f,0x17,0x17,0x00,0x00,0x18,0x17,0x00, + 0x00,0x17,0x18,0x17,0x3f,0x17,0x17,0x00,0x00,0x3f,0x3f,0x17,0x17,0x18,0x0a,0x00, + 0x00,0x3f,0x31,0x17,0x00,0x3f,0x3f,0x17,0x17,0x00,0x00,0x18,0x17,0x0b,0x04,0x00, + 0x00,0x17,0x18,0x3f,0x3f,0x00,0x00,0x3f,0x3f,0x17,0x17,0x18,0x0a,0x05,0x0a,0x00, + 0x00,0x11,0x11,0x18,0x17,0x3f,0x3f,0x00,0x00,0x17,0x17,0x0b,0x04,0x0b,0x00,0x0f, + 0x00,0x04,0x04,0x11,0x11,0x18,0x17,0x3f,0x3f,0x17,0x0b,0x04,0x0a,0x00,0x0f,0xff, + 0x00,0x11,0x11,0x04,0x04,0x11,0x11,0x17,0x18,0x0a,0x05,0x0a,0x00,0x0f,0xff,0xff, + 0xff,0x00,0x00,0x11,0x11,0x04,0x04,0x11,0x0b,0x04,0x0b,0x00,0x0e,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0x11,0x11,0x04,0x04,0x0b,0x00,0x0f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x11,0x0a,0x00,0x0f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x0e,0xff,0xff,0xff,0xff,0xff,0xff +}; + +const int32 kTVWidth = 16; +const int32 kTVHeight = 16; +const color_space kTVColorSpace = B_CMAP8; + +const unsigned char kTVBits [] = { + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x06,0x06,0x05,0x06,0xff,0xff,0x00,0xff,0xff,0x00,0xff,0xff,0xff,0xff, + 0xff,0x05,0x3f,0x3f,0x1e,0x17,0x05,0x06,0x00,0xff,0x00,0xff,0xff,0xff,0xff,0xff, + 0xff,0x04,0x3f,0x3f,0x1d,0x1e,0x1d,0x19,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x05,0x13,0x14,0x3f,0x3f,0x1e,0x1e,0x00,0x06,0x06,0x00,0xff,0xff,0xff,0xff, + 0xff,0x05,0x11,0xd5,0x0c,0x13,0x3f,0x3f,0x1e,0x1e,0x1e,0x01,0xff,0xff,0xff,0xff, + 0xff,0x05,0x11,0xd5,0x60,0x0c,0x0a,0x15,0x3f,0x3f,0x16,0x01,0xff,0xff,0xff,0xff, + 0xff,0x05,0x11,0xd5,0x60,0x60,0x86,0xd5,0x15,0x17,0x0c,0x03,0xff,0xff,0xff,0xff, + 0xff,0x05,0x11,0xd5,0x60,0x60,0x86,0xd3,0x60,0x19,0x0f,0x03,0xff,0xff,0xff,0xff, + 0xff,0x05,0x11,0xd3,0x86,0x86,0x86,0x23,0x60,0x19,0x0f,0x03,0xff,0xff,0xff,0xff, + 0xff,0x00,0x15,0x1c,0x1d,0x3f,0xd3,0xd3,0x60,0x19,0x10,0x05,0x11,0xff,0xff,0xff, + 0xff,0xff,0x02,0x02,0x11,0x19,0x3f,0x3f,0x60,0x16,0x11,0x05,0x11,0x11,0x11,0xff, + 0xff,0xff,0xff,0xff,0x02,0x02,0x11,0x1a,0x20,0x15,0x12,0x05,0x11,0x11,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x02,0x02,0x12,0x2a,0x0f,0x00,0x11,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x02,0x05,0x00,0x11,0xff,0xff,0xff,0xff +}; + +const int32 kCamWidth = 16; +const int32 kCamHeight = 16; +const color_space kCamColorSpace = B_CMAP8; + +const unsigned char kCamBits [] = { + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0xff,0xff,0xff, + 0xff,0x00,0x00,0x1b,0x1c,0x00,0xff,0xff,0xff,0x00,0x01,0x3f,0x1b,0x01,0xff,0xff, + 0x00,0x3f,0x1c,0x1a,0x01,0x00,0xff,0x00,0x00,0x1a,0x1c,0x1c,0x3f,0x0f,0x00,0xff, + 0x00,0x15,0x15,0x3f,0x1c,0x1b,0x02,0x1c,0x1c,0x1c,0x3f,0x0f,0x0f,0x0f,0x00,0xff, + 0xff,0x00,0x00,0x15,0x15,0x3f,0x3f,0x3f,0x3f,0x0f,0x0f,0x0f,0x0f,0x0f,0x00,0xff, + 0xff,0xff,0xff,0x00,0x00,0x0a,0x15,0x0a,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x00,0xff, + 0xff,0x05,0x05,0x05,0x00,0x14,0x0b,0x0a,0x0f,0x0f,0x0f,0x0f,0x0f,0x00,0xff,0xff, + 0x02,0x02,0x1c,0x0e,0x00,0x07,0x07,0x07,0x0f,0x0f,0x0f,0x0f,0x06,0x00,0x0f,0x0f, + 0x00,0x15,0x06,0x3f,0x05,0x07,0x07,0x07,0x0f,0x0f,0x06,0x00,0x00,0x0f,0x0f,0x0f, + 0x00,0x06,0x06,0x3f,0x05,0x07,0x07,0x07,0x0f,0x00,0x00,0x0f,0x0f,0x0f,0xff,0xff, + 0x02,0x02,0x02,0x02,0x05,0x7b,0x07,0x00,0x00,0x0f,0x0f,0x0f,0xff,0xff,0xff,0xff, + 0xff,0x00,0x00,0x05,0xff,0x00,0x00,0x0f,0x0f,0x0f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff +}; + +const int32 kMicWidth = 16; +const int32 kMicHeight = 16; +const color_space kMicColorSpace = B_CMAP8; + +const unsigned char kMicBits [] = { + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x03,0x19,0x19,0x19,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x09,0x12,0x19,0x19,0x0f,0x00,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x19,0x19,0x12,0x09,0x0f,0x0f,0x00,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x09,0x12,0x19,0x19,0x05,0x0f,0x00,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x02,0x09,0x19,0x19,0x09,0x05,0x0f,0x0f,0x00,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x19,0x12,0x12,0x19,0x0f,0x05,0x0f,0x00,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x09,0x19,0x19,0x09,0x05,0x0f,0x00,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x19,0x12,0x09,0x19,0x0f,0x0f,0x00,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x19,0x19,0x09,0x05,0x0f,0x00,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x00,0x08,0x0c,0x08,0x00,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x0c,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x00,0x00,0x3f,0x0c,0x09,0x00,0x00,0x00,0x0f,0x0f,0xff,0xff, + 0xff,0xff,0x00,0x3f,0x1c,0x1c,0x19,0x0f,0x0f,0x09,0x09,0x09,0x00,0x0f,0x0f,0xff, + 0xff,0xff,0x00,0x00,0x1c,0x1c,0x19,0x14,0x0f,0x0f,0x09,0x00,0x00,0x0f,0x0f,0xff, + 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0f,0x0f,0x0f,0xff,0xff +}; + +const int32 kSpeakerWidth = 16; +const int32 kSpeakerHeight = 16; +const color_space kSpeakerColorSpace = B_CMAP8; + +const unsigned char kSpeakerBits [] = { + 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x3f,0x1c,0x1c,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x00,0x3f,0x1c,0x1c,0x1c,0x1c,0x1c,0x00,0x00,0xff,0xff,0xff,0xff, + 0xff,0xff,0x00,0x3f,0x3f,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x11,0x00,0xff,0xff,0xff, + 0xff,0xff,0x00,0x17,0x18,0x3f,0x3f,0x1c,0x1c,0x1c,0x11,0x0f,0x00,0xff,0xff,0xff, + 0xff,0xff,0x00,0x17,0x17,0x18,0x17,0x3f,0x3f,0x11,0x0f,0x0f,0x00,0xff,0xff,0xff, + 0xff,0xff,0x00,0x11,0x00,0x00,0x00,0x17,0x11,0x0f,0x0f,0x0f,0x00,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x08,0x09,0x00,0x11,0x11,0x0f,0x0f,0x0f,0x00,0xff,0xff,0xff, + 0xff,0xff,0x00,0x00,0x08,0x0f,0x0b,0x08,0x11,0x0f,0x0f,0x0f,0x00,0xff,0xff,0xff, + 0xff,0xff,0x00,0x11,0x00,0x0a,0x0f,0x09,0x11,0x0f,0x0f,0x0f,0x00,0xff,0xff,0xff, + 0xff,0xff,0x00,0x17,0x11,0x08,0x09,0x11,0x11,0x0f,0x0f,0x0f,0x00,0xff,0xff,0xff, + 0xff,0xff,0x00,0x17,0x17,0x17,0x17,0x17,0x11,0x0f,0x0f,0x0f,0x00,0x0f,0xff,0xff, + 0xff,0xff,0x00,0x00,0x17,0x17,0x2d,0x18,0x11,0x0f,0x0f,0x00,0x0f,0x0f,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x00,0x17,0x17,0x11,0x0f,0x00,0x0f,0x0f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x11,0x00,0x0f,0x0f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x0f,0x0f,0xff,0xff,0xff,0xff,0xff +}; + + diff --git a/src/prefs/media/mixer.h b/src/prefs/media/mixer.h deleted file mode 100644 index 688484d586..0000000000 --- a/src/prefs/media/mixer.h +++ /dev/null @@ -1,44 +0,0 @@ -unsigned char mixericon[768] ={ -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0x59,0x57,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xC3,0xC3,0xC3,0xDB,0xDB,0xDB,0x5C,0x5C,0x5C,0xA2,0xA2,0xA2, -0x44,0x44,0x44,0x9B,0x9B,0x9B,0xA2,0xA2,0xA2,0x56,0x56,0x56,0x2A,0x2A,0x2A,0x56,0x56,0x56, -0x30,0x30,0x30,0x78,0x78,0x78,0x00,0x00,0x00,0x88,0x88,0x88,0x44,0x44,0x44,0x44,0x44,0x44, -0x88,0x88,0x88,0x88,0x88,0x88,0xC3,0xC3,0xC3,0xDB,0xDB,0xDB,0xBA,0xBA,0xBA,0xA2,0xA2,0xA2, -0x56,0x56,0x56,0x2A,0x2A,0x2A,0x54,0x54,0x54,0x34,0x34,0x34,0x76,0x76,0x76,0x77,0x75,0x77, -0x3B,0x3A,0x3B,0x44,0x44,0x44,0x88,0x88,0x88,0x88,0x88,0x88,0x44,0x44,0x44,0x44,0x44,0x44, -0x88,0x88,0x88,0x88,0x88,0x88,0xA3,0xA3,0xA3,0x54,0x54,0x54,0x2C,0x2C,0x2C,0x54,0x54,0x54, -0x34,0x34,0x34,0x76,0x76,0x76,0x77,0x75,0x77,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0x3B,0x3A,0x3B,0x44,0x44,0x44,0x88,0x88,0x88,0x88,0x88,0x88,0x44,0x44,0x44,0x44,0x44,0x44, -0x6C,0x6C,0x6C,0x2C,0x2C,0x2C,0x54,0x54,0x54,0x34,0x34,0x34,0x76,0x76,0x76,0x77,0x75,0x77, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0x3B,0x3A,0x3B,0x44,0x44,0x44,0x88,0x88,0x88,0x88,0x88,0x88,0x36,0x36,0x36,0x54,0x54,0x54, -0x32,0x32,0x32,0x78,0x78,0x78,0x77,0x75,0x77,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0x3B,0x3A,0x3B,0x44,0x44,0x44,0x6C,0x6C,0x6C,0x34,0x34,0x34,0x78,0x78,0x78,0x75,0x73,0x75, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC}; diff --git a/src/prefs/media/tv.h b/src/prefs/media/tv.h deleted file mode 100644 index 2632a9ae2d..0000000000 --- a/src/prefs/media/tv.h +++ /dev/null @@ -1,44 +0,0 @@ -unsigned char tvicon[768] ={ -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0x3B,0x3A,0x3B,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0x53,0x53,0x53,0x3B,0x3A,0x3B,0x59,0x57,0x59,0x6E,0x6E,0x6E,0x3B,0x3A,0x3B, -0xFC,0xFC,0xFC,0x3B,0x3A,0x3B,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0x53,0x53,0x53,0xDC,0xDC,0xDC, -0xDE,0xDE,0xDE,0x84,0x84,0x84,0x98,0x98,0x98,0xDC,0xDC,0xDC,0x70,0x70,0x70,0x1D,0x1D,0x1D, -0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0x59,0x57,0x59,0x59,0x57,0x59,0xFC,0xFC,0x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