From 32fd6b6b54cc4003398710e75c946fd81a121ab1 Mon Sep 17 00:00:00 2001 From: Phil Greenway Date: Wed, 7 Jul 2004 09:33:22 +0000 Subject: [PATCH] missing file. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8337 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/cdplayer/CDPlayer.cpp | 76 ++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 src/apps/cdplayer/CDPlayer.cpp diff --git a/src/apps/cdplayer/CDPlayer.cpp b/src/apps/cdplayer/CDPlayer.cpp new file mode 100644 index 0000000000..f94ce6c608 --- /dev/null +++ b/src/apps/cdplayer/CDPlayer.cpp @@ -0,0 +1,76 @@ +/* + +CDPlayer + +Author: Sikosis + +(C)2004 Haiku - http://haiku-os.org/ + +*/ + +// Includes ------------------------------------------------------------------------------------------ // +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "CDPlayer.h" +#include "CDPlayerWindows.h" +#include "CDPlayerViews.h" +#include "CDPlayerConstants.h" +// Constants ---------------------------------------------------------------------------------------- // + +const char *APP_SIGNATURE = "application/x-vnd.Haiku.CDPlayer"; // Application Signature and Title + +// -------------------------------------------------------------------------------------------------- // + +CDPlayerWindow *ptrCDPlayerWindow; + +// CDPlayer - Constructor +CDPlayer::CDPlayer() : BApplication (APP_SIGNATURE) +{ + // Default Window Size - Position doesn't matter as we centre the form to the current screen size + BRect screenFrame = (BScreen(B_MAIN_SCREEN_ID).Frame()); + + float FormTopDefault = 0; + float FormLeftDefault = 0; + float FormWidthDefault = 500; + float FormHeightDefault = 100; + BRect CDPlayerWindowRect(FormTopDefault,FormLeftDefault,FormLeftDefault+FormWidthDefault,FormTopDefault+FormHeightDefault); + + ptrCDPlayerWindow = new CDPlayerWindow(CDPlayerWindowRect); +} +// ------------------------------------------------------------------------------------------------- // + +// CDPlayer::MessageReceived -- handles incoming messages +void CDPlayer::MessageReceived (BMessage *message) +{ + switch(message->what) + { + default: + BApplication::MessageReceived(message); // pass it along ... + break; + } +} +// ------------------------------------------------------------------------------------------------- // + +// CDPlayer Main +int main(void) +{ + CDPlayer theApp; + theApp.Run(); + return 0; +} +// end --------------------------------------------------------------------------------------------- // +