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 <stdio.h> 15#include <stdlib.h> 16 17#include <Window.h> 18#include <View.h> 19#include <Button.h> 20#include <Box.h> 21#include <StringView.h> 22 23int main(void) 24{ 25 Joysticks application("application/x-vnd.Haiku-Joysticks"); 26 application.Run(); 27 return 0; 28} 29 30 31Joysticks::Joysticks(const char *signature) 32 : BApplication(signature) 33{ 34} 35 36 37Joysticks::~Joysticks() 38{ 39 be_app_messenger.SendMessage(B_QUIT_REQUESTED); 40} 41 42 43bool 44Joysticks::QuitRequested() 45{ 46 return BApplication::QuitRequested(); 47} 48 49 50void 51Joysticks::ReadyToRun() 52{ 53 fJoywin = new JoyWin(BRect(100, 100, 500, 400), "Joysticks"); 54 if (fJoywin != NULL) 55 fJoywin->Show(); 56 else 57 be_app->PostMessage(B_QUIT_REQUESTED); 58} 59 60