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 --------------------------------------------------------------------------------------------- // +