-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from OscarL/haiku-fixes
Fix compilation, add stubbed out version of missing source files.
- Loading branch information
Showing
36 changed files
with
324 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#include "BarberPole.h" | ||
|
||
|
||
BarberPole::BarberPole(BRect pRect, const char *pName, uint32 resizingMode, uint32 flags, int pDirection) | ||
: BView(pRect, pName, resizingMode, flags) { | ||
|
||
spinning_thread_id = spawn_thread(spinningThread, pName, B_DISPLAY_PRIORITY, this); | ||
is_running = false; | ||
direction = pDirection; | ||
}; | ||
|
||
BarberPole::~BarberPole(){ | ||
kill_thread(spinning_thread_id); | ||
} | ||
|
||
void BarberPole::Start(){ | ||
resume_thread(spinning_thread_id); | ||
is_running = true; | ||
} | ||
|
||
void BarberPole::Stop(){ | ||
suspend_thread(spinning_thread_id); | ||
is_running = false; | ||
} | ||
|
||
bool BarberPole::IsRunning(){ | ||
return is_running; | ||
} | ||
|
||
int32 BarberPole::spinningThread(void *data){ | ||
BarberPole *lBarberPole = (BarberPole*)data; | ||
pattern lStripes; | ||
|
||
lStripes.data[0] = 0x0f; | ||
lStripes.data[1] = 0x1e; | ||
lStripes.data[2] = 0x3c; | ||
lStripes.data[3] = 0x78; | ||
lStripes.data[4] = 0xf0; | ||
lStripes.data[5] = 0xe1; | ||
lStripes.data[6] = 0xc3; | ||
lStripes.data[7] = 0x87; | ||
|
||
while(1==1){ | ||
lBarberPole->LockLooper(); | ||
lBarberPole->FillRect(lBarberPole->Bounds(), lStripes); | ||
lBarberPole->UnlockLooper(); | ||
|
||
if(lBarberPole->direction == FROM_RIGHT_TO_LEFT){ | ||
uchar tmp = lStripes.data[0]; | ||
for (int j = 0; j < 7; ++j) { | ||
lStripes.data[j] = lStripes.data[j+1]; | ||
} | ||
lStripes.data[7] = tmp; | ||
} else { | ||
uchar tmp = lStripes.data[7]; | ||
for (int j = 7; j > 0; --j) { | ||
lStripes.data[j] = lStripes.data[j-1]; | ||
} | ||
lStripes.data[0] = tmp; | ||
|
||
} | ||
snooze(25000); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef _BARBERPOLE_H_ | ||
#define _BARBERPOLE_H_ | ||
|
||
#include <View.h> | ||
|
||
const int FROM_RIGHT_TO_LEFT = 0; | ||
const int FROM_LEFT_TO_RIGHT = 1; | ||
|
||
class BarberPole : public BView { | ||
public: | ||
BarberPole(BRect pRect, const char *pName, uint32 resizingMode, uint32 flags = 0, int pDirection = FROM_LEFT_TO_RIGHT); | ||
~BarberPole(); | ||
|
||
void Start(); | ||
void Stop(); | ||
|
||
bool IsRunning(); | ||
|
||
protected: | ||
thread_id spinning_thread_id; | ||
bool is_running; | ||
|
||
private: | ||
int direction; | ||
static int32 spinningThread(void *data); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Dortmund, Germany. | ||
December, 12th 1998 | ||
|
||
BarberPole is a little class, that shows this little spinning barber pole, you probably know from Net+ or the Tracker. | ||
|
||
This is V1.0 and should compile on both x86 and PPC, although I currently haven't tested it on PPC. If you want to set the color of the pole, do it by using | ||
|
||
myBarberPol->SetHighColor(...) | ||
and | ||
myBarberPole->SetLowColor(...) | ||
|
||
BarberPole is Freeware. If you made any changes, please report it to me, so I could update it. | ||
|
||
[email protected] // Member of DeBUG - German Be User Group | ||
// http://www.BeUserGroup.de |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
|
||
#include <Rect.h> | ||
#include <Message.h> | ||
#include <View.h> | ||
|
||
/* | ||
* Class: RefDragMessage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Stubbed out Globals.h for Tim Vernum's TraX. | ||
|
||
#ifndef GLOBALS_H | ||
#define GLOBALS_H | ||
|
||
#include "ResultsHandler.h" | ||
|
||
static ResultsHandler gResults; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Stubbed out Joins.h for Tim Vernum's TraX. | ||
|
||
#ifndef JOINS_H | ||
#define JOINS_H | ||
|
||
static const char* const kOpenStrings[] = { "", "(" }; | ||
static const char* const kCloseStrings[] = { "", ")" }; | ||
static const char* const kNotStrings[] = { "", "not" }; | ||
static const char* const kConjunctionStrings[] = { "", "and" }; | ||
|
||
// Fixme: these are just wild guesses for now: | ||
static const char* const kOpenValues[] = { "", "(" }; | ||
static const char* const kCloseValues[] = { "", ")" }; | ||
static const char* const kNotValues[] = { "", "!" }; | ||
static const char* const kConjunctionValues[] = { "", "&&" }; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Stubbed out ResultsHandler.{h,cpp} for Tim Vernum's TraX. | ||
|
||
#include "ResultsHandler.h" | ||
#include "ResultsWindow.h" | ||
|
||
|
||
ResultsHandler::ResultsHandler() | ||
{ | ||
} | ||
|
||
|
||
void | ||
ResultsHandler::Init() | ||
{ | ||
} | ||
|
||
|
||
int | ||
ResultsHandler::AddResult(const char* foobar) | ||
{ | ||
return ResultsWindow::AddResult(foobar); | ||
} | ||
|
||
|
||
void | ||
ResultsHandler::NewSearch() | ||
{ | ||
} | ||
|
||
|
||
void | ||
ResultsHandler::EndSearch() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Stubbed out ResultsHandler.{h,cpp} for Tim Vernum's TraX. | ||
|
||
#ifndef RESULTSHANDLER_H | ||
#define RESULTSHANDLER_H | ||
|
||
|
||
class ResultsHandler { | ||
public: | ||
ResultsHandler(); | ||
|
||
void Init(); | ||
|
||
void NewSearch(); | ||
void EndSearch(); | ||
|
||
static int AddResult(const char*); | ||
}; | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,4 @@ class ResultsWindow : public BWindow | |
} ; | ||
|
||
|
||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Stubbed out Settings.cpp for Tim Vernum's TraX. | ||
|
||
#include "Settings.h" | ||
|
||
TraxSettings gSettings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Stubbed out Settings.h for Tim Vernum's TraX. | ||
|
||
#ifndef SETTINGS_H | ||
#define SETTINGS_H | ||
|
||
|
||
typedef struct settings { | ||
enum { | ||
eShowBrackets, | ||
eShowJoinPanel, | ||
eShowNot | ||
}; | ||
|
||
int fConjunction; | ||
const char* fDefaultFolder; | ||
bool fUseTracker; | ||
int fShow; | ||
} TraxSettings; | ||
|
||
|
||
extern TraxSettings gSettings; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Stubbed out SettingsWindow.{h,cpp} for Tim Vernum's TraX. | ||
|
||
#include "SettingsWindow.h" | ||
|
||
|
||
SettingsWindow::SettingsWindow() | ||
: BWindow(BRect( 100, 100, 400, 250 ) , "Settings", B_DOCUMENT_WINDOW, B_NOT_CLOSABLE | B_NOT_RESIZABLE) | ||
{ | ||
|
||
} |
Oops, something went wrong.