Skip to content

Commit 941c5b4

Browse files
committed
haiku: Rename internal functions from BE_* to HAIKU_*
Fixes Bugzilla #2349.
1 parent c0ac09e commit 941c5b4

18 files changed

Lines changed: 177 additions & 177 deletions

src/main/haiku/SDL_BApp.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class SDL_BApp : public BApplication {
231231
SDL_SendMouseMotion(win, 0, 0, x, y);
232232

233233
/* Tell the application that the mouse passed over, redraw needed */
234-
BE_UpdateWindowFramebuffer(NULL,win,NULL,-1);
234+
HAIKU_UpdateWindowFramebuffer(NULL,win,NULL,-1);
235235
}
236236

237237
void _HandleMouseButton(BMessage *msg) {
@@ -274,11 +274,11 @@ class SDL_BApp : public BApplication {
274274
}
275275

276276
/* Make sure this isn't a repeated event (key pressed and held) */
277-
if(state == SDL_PRESSED && BE_GetKeyState(scancode) == SDL_PRESSED) {
277+
if(state == SDL_PRESSED && HAIKU_GetKeyState(scancode) == SDL_PRESSED) {
278278
return;
279279
}
280-
BE_SetKeyState(scancode, state);
281-
SDL_SendKeyboardKey(state, BE_GetScancodeFromBeKey(scancode));
280+
HAIKU_SetKeyState(scancode, state);
281+
SDL_SendKeyboardKey(state, HAIKU_GetScancodeFromBeKey(scancode));
282282

283283
if (state == SDL_PRESSED && SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
284284
const int8 *keyUtf8;

src/video/haiku/SDL_BWin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class SDL_BWin:public BDirectWindow
8888
_clips = NULL;
8989

9090
#ifdef DRAWTHREAD
91-
_draw_thread_id = spawn_thread(BE_DrawThread, "drawing_thread",
91+
_draw_thread_id = spawn_thread(HAIKU_DrawThread, "drawing_thread",
9292
B_NORMAL_PRIORITY, (void*) this);
9393
resume_thread(_draw_thread_id);
9494
#endif

src/video/haiku/SDL_bclipboard.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
extern "C" {
3636
#endif
3737

38-
int BE_SetClipboardText(_THIS, const char *text) {
38+
int HAIKU_SetClipboardText(_THIS, const char *text) {
3939
BMessage *clip = NULL;
4040
if(be_clipboard->Lock()) {
4141
be_clipboard->Clear();
@@ -51,7 +51,7 @@ int BE_SetClipboardText(_THIS, const char *text) {
5151
return 0;
5252
}
5353

54-
char *BE_GetClipboardText(_THIS) {
54+
char *HAIKU_GetClipboardText(_THIS) {
5555
BMessage *clip = NULL;
5656
const char *text = NULL;
5757
ssize_t length;
@@ -76,9 +76,9 @@ char *BE_GetClipboardText(_THIS) {
7676
return result;
7777
}
7878

79-
SDL_bool BE_HasClipboardText(_THIS) {
79+
SDL_bool HAIKU_HasClipboardText(_THIS) {
8080
SDL_bool result = SDL_FALSE;
81-
char *text = BE_GetClipboardText(_this);
81+
char *text = HAIKU_GetClipboardText(_this);
8282
if (text) {
8383
result = text[0] != '\0' ? SDL_TRUE : SDL_FALSE;
8484
SDL_free(text);

src/video/haiku/SDL_bclipboard.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#ifndef SDL_BCLIPBOARD_H
2525
#define SDL_BCLIPBOARD_H
2626

27-
extern int BE_SetClipboardText(_THIS, const char *text);
28-
extern char *BE_GetClipboardText(_THIS);
29-
extern SDL_bool BE_HasClipboardText(_THIS);
27+
extern int HAIKU_SetClipboardText(_THIS, const char *text);
28+
extern char *HAIKU_GetClipboardText(_THIS);
29+
extern SDL_bool HAIKU_HasClipboardText(_THIS);
3030

3131
#endif
3232

src/video/haiku/SDL_bevents.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
extern "C" {
2929
#endif
3030

31-
void BE_PumpEvents(_THIS) {
31+
void HAIKU_PumpEvents(_THIS) {
3232
/* Since the event thread is its own thread, this isn't really necessary */
3333
}
3434

src/video/haiku/SDL_bevents.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
extern "C" {
2929
#endif
3030

31-
extern void BE_PumpEvents(_THIS);
31+
extern void HAIKU_PumpEvents(_THIS);
3232

3333
#ifdef __cplusplus
3434
}

src/video/haiku/SDL_bframebuffer.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extern "C" {
3636
#endif
3737

3838
#ifndef DRAWTHREAD
39-
static int32 BE_UpdateOnce(SDL_Window *window);
39+
static int32 HAIKU_UpdateOnce(SDL_Window *window);
4040
#endif
4141

4242
static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) {
@@ -47,7 +47,7 @@ static SDL_INLINE SDL_BApp *_GetBeApp() {
4747
return ((SDL_BApp*)be_app);
4848
}
4949

50-
int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
50+
int HAIKU_CreateWindowFramebuffer(_THIS, SDL_Window * window,
5151
Uint32 * format,
5252
void ** pixels, int *pitch) {
5353
SDL_BWin *bwin = _ToBeWin(window);
@@ -64,8 +64,8 @@ int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
6464
/* format */
6565
display_mode bmode;
6666
bscreen.GetMode(&bmode);
67-
int32 bpp = BE_ColorSpaceToBitsPerPixel(bmode.space);
68-
*format = BE_BPPToSDLPxFormat(bpp);
67+
int32 bpp = HAIKU_ColorSpaceToBitsPerPixel(bmode.space);
68+
*format = HAIKU_BPPToSDLPxFormat(bpp);
6969

7070
/* Create the new bitmap object */
7171
BBitmap *bitmap = bwin->GetBitmap();
@@ -99,7 +99,7 @@ int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
9999

100100

101101

102-
int BE_UpdateWindowFramebuffer(_THIS, SDL_Window * window,
102+
int HAIKU_UpdateWindowFramebuffer(_THIS, SDL_Window * window,
103103
const SDL_Rect * rects, int numrects) {
104104
if(!window)
105105
return 0;
@@ -112,13 +112,13 @@ int BE_UpdateWindowFramebuffer(_THIS, SDL_Window * window,
112112
bwin->UnlockBuffer();
113113
#else
114114
bwin->SetBufferDirty(true);
115-
BE_UpdateOnce(window);
115+
HAIKU_UpdateOnce(window);
116116
#endif
117117

118118
return 0;
119119
}
120120

121-
int32 BE_DrawThread(void *data) {
121+
int32 HAIKU_DrawThread(void *data) {
122122
SDL_BWin *bwin = (SDL_BWin*)data;
123123

124124
BScreen bscreen;
@@ -181,7 +181,7 @@ int32 BE_DrawThread(void *data) {
181181
return B_OK;
182182
}
183183

184-
void BE_DestroyWindowFramebuffer(_THIS, SDL_Window * window) {
184+
void HAIKU_DestroyWindowFramebuffer(_THIS, SDL_Window * window) {
185185
SDL_BWin *bwin = _ToBeWin(window);
186186

187187
bwin->LockBuffer();
@@ -202,7 +202,7 @@ void BE_DestroyWindowFramebuffer(_THIS, SDL_Window * window) {
202202
* solved, but I doubt it- they were pretty sporadic before now.
203203
*/
204204
#ifndef DRAWTHREAD
205-
static int32 BE_UpdateOnce(SDL_Window *window) {
205+
static int32 HAIKU_UpdateOnce(SDL_Window *window) {
206206
SDL_BWin *bwin = _ToBeWin(window);
207207
BScreen bscreen;
208208
if(!bscreen.IsValid()) {

src/video/haiku/SDL_bframebuffer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ extern "C" {
3030

3131
#include "../SDL_sysvideo.h"
3232

33-
extern int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
33+
extern int HAIKU_CreateWindowFramebuffer(_THIS, SDL_Window * window,
3434
Uint32 * format,
3535
void ** pixels, int *pitch);
36-
extern int BE_UpdateWindowFramebuffer(_THIS, SDL_Window * window,
36+
extern int HAIKU_UpdateWindowFramebuffer(_THIS, SDL_Window * window,
3737
const SDL_Rect * rects, int numrects);
38-
extern void BE_DestroyWindowFramebuffer(_THIS, SDL_Window * window);
39-
extern int32 BE_DrawThread(void *data);
38+
extern void HAIKU_DestroyWindowFramebuffer(_THIS, SDL_Window * window);
39+
extern int32 HAIKU_DrawThread(void *data);
4040

4141
#ifdef __cplusplus
4242
}

src/video/haiku/SDL_bkeyboard.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extern "C" {
4141
static SDL_Scancode keymap[KEYMAP_SIZE];
4242
static int8 keystate[KEYMAP_SIZE];
4343

44-
void BE_InitOSKeymap(void) {
44+
void HAIKU_InitOSKeymap(void) {
4545
for( uint i = 0; i < SDL_TABLESIZE(keymap); ++i ) {
4646
keymap[i] = SDL_SCANCODE_UNKNOWN;
4747
}
@@ -159,23 +159,23 @@ void BE_InitOSKeymap(void) {
159159
keymap[0x6b] = SDL_GetScancodeFromKey(SDLK_POWER);
160160
}
161161

162-
SDL_Scancode BE_GetScancodeFromBeKey(int32 bkey) {
162+
SDL_Scancode HAIKU_GetScancodeFromBeKey(int32 bkey) {
163163
if(bkey > 0 && bkey < (int32)SDL_TABLESIZE(keymap)) {
164164
return keymap[bkey];
165165
} else {
166166
return SDL_SCANCODE_UNKNOWN;
167167
}
168168
}
169169

170-
int8 BE_GetKeyState(int32 bkey) {
170+
int8 HAIKU_GetKeyState(int32 bkey) {
171171
if(bkey > 0 && bkey < KEYMAP_SIZE) {
172172
return keystate[bkey];
173173
} else {
174174
return SDL_RELEASED;
175175
}
176176
}
177177

178-
void BE_SetKeyState(int32 bkey, int8 state) {
178+
void HAIKU_SetKeyState(int32 bkey, int8 state) {
179179
if(bkey > 0 && bkey < KEYMAP_SIZE) {
180180
keystate[bkey] = state;
181181
}

src/video/haiku/SDL_bkeyboard.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ extern "C" {
3030

3131
#include "../../../include/SDL_keyboard.h"
3232

33-
extern void BE_InitOSKeymap(void);
34-
extern SDL_Scancode BE_GetScancodeFromBeKey(int32 bkey);
35-
extern int8 BE_GetKeyState(int32 bkey);
36-
extern void BE_SetKeyState(int32 bkey, int8 state);
33+
extern void HAIKU_InitOSKeymap(void);
34+
extern SDL_Scancode HAIKU_GetScancodeFromBeKey(int32 bkey);
35+
extern int8 HAIKU_GetKeyState(int32 bkey);
36+
extern void HAIKU_SetKeyState(int32 bkey, int8 state);
3737

3838
#ifdef __cplusplus
3939
}

0 commit comments

Comments
 (0)