2 * Copyright 2007-2008 Haiku.
3 * Distributed under the terms of the MIT License.
6 * Oliver Ruiz Dorantes oliver.ruiz.dorantes_at_gmail.com
7 * Ryan Leavengood leavengood@gmail.com
8 * Fredrik Modéen fredrik@modeen.se
25 class JoyWin
: public BWindow
{
27 JoyWin(BRect frame
,const char *title
);
29 virtual void MessageReceived(BMessage
*message
);
30 virtual bool QuitRequested();
33 status_t
_AddToList(BListView
*list
, uint32 command
,
34 const char* rootPath
, BEntry
*rootEntry
= NULL
);
36 status_t
_Calibrate();
37 status_t
_PerformProbe(const char* path
);
38 status_t
_ApplyChanges();
39 status_t
_GetSettings();
40 status_t
_CheckJoystickExist(const char* path
);
43 status_t
_ShowProbeMesage(const char* str
);
44 status_t
_ShowCantFindFileMessage(const char* port
);
45 void _ShowNoDeviceConnectedMessage(const char* joy
,
47 void _ShowNoCompatibleJoystickMessage();
50 BString
_FixPathToName(const char* port
);
51 BString
_BuildDisabledJoysticksFile();
52 PortItem
* _GetSelectedItem(BListView
* list
);
53 void _SelectDeselectJoystick(BListView
* list
, bool enable
);
54 int32
_FindStringItemInList(BListView
*view
,
56 BString
_FindFilePathForSymLink(const char* symLinkPath
,
58 status_t
_FindStick(const char* name
);
59 const char* _FindSettingString(const char* name
, const char* strPath
);
60 bool _GetLine(BString
& string
);
62 //this one are used when we select joystick when portare selected
63 bool fSystemUsedSelect
;
67 BStringView
* fGamePortS
;
68 BStringView
* fConControllerS
;
69 BListView
* fGamePortL
;
70 BListView
* fConControllerL
;
71 BButton
* fCalibrateButton
;
72 BButton
* fProbeButton
;
74 BFile
* fFileTempProbeJoystick
;
75 // int32 fSourceEncoding;
77 off_t fPositionInBuffer
;
81 #endif /* _JOY_WIN_H */