1 /* 2 * Copyright 2007 Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com 7 * Ryan Leavengood, leavengood@gmail.com 8 */ 9 10 11 #include "Joysticks.h" 12 #include "JoyWin.h" 13 14 #include <Window.h> 15 #include <View.h> 16 #include <Button.h> 17 #include <Box.h> 18 #include <StringView.h> 19 20 21 int main(void) 22 { 23 Joysticks application("application/x-vnd.Haiku-Joysticks"); 24 25 // Start Application 26 application.Run(); 27 28 return 0; 29 } 30 31 32 Joysticks::Joysticks(const char *signature) : BApplication(signature) 33 { 34 35 } 36 37 38 Joysticks::~Joysticks() 39 { 40 41 } 42 43 44 void Joysticks::ReadyToRun() 45 { 46 fJoywin = new JoyWin(BRect(100, 100, 500, 400), "Joysticks", 47 B_DOCUMENT_WINDOW_LOOK, 48 B_NORMAL_WINDOW_FEEL, 49 B_NOT_ZOOMABLE); 50 51 if (fJoywin != NULL) 52 fJoywin->Show(); 53 else 54 be_app->PostMessage(B_QUIT_REQUESTED); 55 } 56 57