* Add Jamfiles to allow building the stickit sample code. It allows testing of

the BJoystick API and joystick drivers.
* Also fix a few warnings in the code that were caused by using NULL instead of
  0 for BWindow/BView flags.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41852 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2011-05-31 02:33:28 +00:00
parent f46bc7f19e
commit f202fdc6ed
4 changed files with 62 additions and 51 deletions
+1
View File
@@ -1,6 +1,7 @@
SubDir HAIKU_TOP src tests kits ; SubDir HAIKU_TOP src tests kits ;
SubInclude HAIKU_TOP src tests kits app ; SubInclude HAIKU_TOP src tests kits app ;
SubInclude HAIKU_TOP src tests kits device ;
SubInclude HAIKU_TOP src tests kits game ; SubInclude HAIKU_TOP src tests kits game ;
SubInclude HAIKU_TOP src tests kits interface ; SubInclude HAIKU_TOP src tests kits interface ;
SubInclude HAIKU_TOP src tests kits locale ; SubInclude HAIKU_TOP src tests kits locale ;
+3
View File
@@ -0,0 +1,3 @@
SubDir HAIKU_TOP src tests kits device ;
SubInclude HAIKU_TOP src tests kits device stickit_BJoystick ;
@@ -0,0 +1,7 @@
SubDir HAIKU_TOP src tests kits device stickit_BJoystick ;
SimpleTest stickit :
JoystickWindow.cpp
StickItApp.cpp
StickItWindow.cpp
: be device ;
@@ -29,7 +29,7 @@
#include "StickItWindow.h" #include "StickItWindow.h"
StickItWindow::StickItWindow(BRect frame) StickItWindow::StickItWindow(BRect frame)
: BWindow(frame, "StickIt", B_TITLED_WINDOW, NULL) : BWindow(frame, "StickIt", B_TITLED_WINDOW, 0)
{ {
frame = Bounds(); frame = Bounds();
frame.InsetBy(5, 5); frame.InsetBy(5, 5);
@@ -37,7 +37,7 @@ StickItWindow::StickItWindow(BRect frame)
// Allocate object // Allocate object
BView* view = new BView(Bounds(), "", B_FOLLOW_ALL_SIDES, NULL); BView* view = new BView(Bounds(), "", B_FOLLOW_ALL_SIDES, 0);
view->SetViewColor(216, 216, 216); view->SetViewColor(216, 216, 216);
view->SetLowColor(216, 216, 216); view->SetLowColor(216, 216, 216);
@@ -63,10 +63,10 @@ StickItWindow::StickItWindow(BRect frame)
// Adding object // Adding object
box->AddChild(new BScrollView("fListView1", fListView1, box->AddChild(new BScrollView("fListView1", fListView1,
B_FOLLOW_LEFT_RIGHT, NULL, false, true)); B_FOLLOW_LEFT_RIGHT, 0, false, true));
box->AddChild(new BScrollView("fListView2", fListView2, box->AddChild(new BScrollView("fListView2", fListView2,
B_FOLLOW_ALL_SIDES, NULL, false, true)); B_FOLLOW_ALL_SIDES, 0, false, true));
box->AddChild(stringview1); box->AddChild(stringview1);
box->AddChild(stringview2); box->AddChild(stringview2);