haiku: Rename internal functions from BE_* to HAIKU_*
authorRyan C. Gordon <icculus@icculus.org>
Tue, 07 Aug 2018 18:07:11 -0400
changeset 1208209999a0e8f9a
parent 12081 277e57c09ff4
child 12083 27e29baad4a3
haiku: Rename internal functions from BE_* to HAIKU_*

Fixes Bugzilla #2349.
src/main/haiku/SDL_BApp.h
src/video/haiku/SDL_BWin.h
src/video/haiku/SDL_bclipboard.cc
src/video/haiku/SDL_bclipboard.h
src/video/haiku/SDL_bevents.cc
src/video/haiku/SDL_bevents.h
src/video/haiku/SDL_bframebuffer.cc
src/video/haiku/SDL_bframebuffer.h
src/video/haiku/SDL_bkeyboard.cc
src/video/haiku/SDL_bkeyboard.h
src/video/haiku/SDL_bmodes.cc
src/video/haiku/SDL_bmodes.h
src/video/haiku/SDL_bopengl.cc
src/video/haiku/SDL_bopengl.h
src/video/haiku/SDL_bvideo.cc
src/video/haiku/SDL_bvideo.h
src/video/haiku/SDL_bwindow.cc
src/video/haiku/SDL_bwindow.h
     1.1 --- a/src/main/haiku/SDL_BApp.h	Tue Aug 07 17:28:07 2018 -0400
     1.2 +++ b/src/main/haiku/SDL_BApp.h	Tue Aug 07 18:07:11 2018 -0400
     1.3 @@ -231,7 +231,7 @@
     1.4          SDL_SendMouseMotion(win, 0, 0, x, y);
     1.5  
     1.6          /* Tell the application that the mouse passed over, redraw needed */
     1.7 -        BE_UpdateWindowFramebuffer(NULL,win,NULL,-1);
     1.8 +        HAIKU_UpdateWindowFramebuffer(NULL,win,NULL,-1);
     1.9      }
    1.10  
    1.11      void _HandleMouseButton(BMessage *msg) {
    1.12 @@ -274,11 +274,11 @@
    1.13          }
    1.14  
    1.15          /* Make sure this isn't a repeated event (key pressed and held) */
    1.16 -        if(state == SDL_PRESSED && BE_GetKeyState(scancode) == SDL_PRESSED) {
    1.17 +        if(state == SDL_PRESSED && HAIKU_GetKeyState(scancode) == SDL_PRESSED) {
    1.18              return;
    1.19          }
    1.20 -        BE_SetKeyState(scancode, state);
    1.21 -        SDL_SendKeyboardKey(state, BE_GetScancodeFromBeKey(scancode));
    1.22 +        HAIKU_SetKeyState(scancode, state);
    1.23 +        SDL_SendKeyboardKey(state, HAIKU_GetScancodeFromBeKey(scancode));
    1.24          
    1.25          if (state == SDL_PRESSED && SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
    1.26              const int8 *keyUtf8;
     2.1 --- a/src/video/haiku/SDL_BWin.h	Tue Aug 07 17:28:07 2018 -0400
     2.2 +++ b/src/video/haiku/SDL_BWin.h	Tue Aug 07 18:07:11 2018 -0400
     2.3 @@ -88,7 +88,7 @@
     2.4          _clips = NULL;
     2.5  
     2.6  #ifdef DRAWTHREAD
     2.7 -        _draw_thread_id = spawn_thread(BE_DrawThread, "drawing_thread",
     2.8 +        _draw_thread_id = spawn_thread(HAIKU_DrawThread, "drawing_thread",
     2.9                              B_NORMAL_PRIORITY, (void*) this);
    2.10          resume_thread(_draw_thread_id);
    2.11  #endif
     3.1 --- a/src/video/haiku/SDL_bclipboard.cc	Tue Aug 07 17:28:07 2018 -0400
     3.2 +++ b/src/video/haiku/SDL_bclipboard.cc	Tue Aug 07 18:07:11 2018 -0400
     3.3 @@ -35,7 +35,7 @@
     3.4  extern "C" {
     3.5  #endif
     3.6  
     3.7 -int BE_SetClipboardText(_THIS, const char *text) {
     3.8 +int HAIKU_SetClipboardText(_THIS, const char *text) {
     3.9  	BMessage *clip = NULL;
    3.10  	if(be_clipboard->Lock()) {
    3.11  		be_clipboard->Clear();
    3.12 @@ -51,7 +51,7 @@
    3.13  	return 0;
    3.14  }
    3.15  
    3.16 -char *BE_GetClipboardText(_THIS) {
    3.17 +char *HAIKU_GetClipboardText(_THIS) {
    3.18  	BMessage *clip = NULL;
    3.19  	const char *text = NULL;	
    3.20  	ssize_t length;
    3.21 @@ -76,9 +76,9 @@
    3.22  	return result;
    3.23  }
    3.24  
    3.25 -SDL_bool BE_HasClipboardText(_THIS) {
    3.26 +SDL_bool HAIKU_HasClipboardText(_THIS) {
    3.27  	SDL_bool result = SDL_FALSE;
    3.28 -	char *text = BE_GetClipboardText(_this);
    3.29 +	char *text = HAIKU_GetClipboardText(_this);
    3.30  	if (text) {
    3.31  		result = text[0] != '\0' ? SDL_TRUE : SDL_FALSE;
    3.32  		SDL_free(text);
     4.1 --- a/src/video/haiku/SDL_bclipboard.h	Tue Aug 07 17:28:07 2018 -0400
     4.2 +++ b/src/video/haiku/SDL_bclipboard.h	Tue Aug 07 18:07:11 2018 -0400
     4.3 @@ -24,9 +24,9 @@
     4.4  #ifndef SDL_BCLIPBOARD_H
     4.5  #define SDL_BCLIPBOARD_H
     4.6  
     4.7 -extern int BE_SetClipboardText(_THIS, const char *text);
     4.8 -extern char *BE_GetClipboardText(_THIS);
     4.9 -extern SDL_bool BE_HasClipboardText(_THIS);
    4.10 +extern int HAIKU_SetClipboardText(_THIS, const char *text);
    4.11 +extern char *HAIKU_GetClipboardText(_THIS);
    4.12 +extern SDL_bool HAIKU_HasClipboardText(_THIS);
    4.13  
    4.14  #endif
    4.15  
     5.1 --- a/src/video/haiku/SDL_bevents.cc	Tue Aug 07 17:28:07 2018 -0400
     5.2 +++ b/src/video/haiku/SDL_bevents.cc	Tue Aug 07 18:07:11 2018 -0400
     5.3 @@ -28,7 +28,7 @@
     5.4  extern "C" {
     5.5  #endif
     5.6  
     5.7 -void BE_PumpEvents(_THIS) {
     5.8 +void HAIKU_PumpEvents(_THIS) {
     5.9  	/* Since the event thread is its own thread, this isn't really necessary */
    5.10  }
    5.11  
     6.1 --- a/src/video/haiku/SDL_bevents.h	Tue Aug 07 17:28:07 2018 -0400
     6.2 +++ b/src/video/haiku/SDL_bevents.h	Tue Aug 07 18:07:11 2018 -0400
     6.3 @@ -28,7 +28,7 @@
     6.4  extern "C" {
     6.5  #endif
     6.6  
     6.7 -extern void BE_PumpEvents(_THIS);
     6.8 +extern void HAIKU_PumpEvents(_THIS);
     6.9  
    6.10  #ifdef __cplusplus
    6.11  }
     7.1 --- a/src/video/haiku/SDL_bframebuffer.cc	Tue Aug 07 17:28:07 2018 -0400
     7.2 +++ b/src/video/haiku/SDL_bframebuffer.cc	Tue Aug 07 18:07:11 2018 -0400
     7.3 @@ -36,7 +36,7 @@
     7.4  #endif
     7.5  
     7.6  #ifndef DRAWTHREAD
     7.7 -static int32 BE_UpdateOnce(SDL_Window *window);
     7.8 +static int32 HAIKU_UpdateOnce(SDL_Window *window);
     7.9  #endif
    7.10  
    7.11  static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) {
    7.12 @@ -47,7 +47,7 @@
    7.13  	return ((SDL_BApp*)be_app);
    7.14  }
    7.15  
    7.16 -int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
    7.17 +int HAIKU_CreateWindowFramebuffer(_THIS, SDL_Window * window,
    7.18                                         Uint32 * format,
    7.19                                         void ** pixels, int *pitch) {
    7.20  	SDL_BWin *bwin = _ToBeWin(window);
    7.21 @@ -64,8 +64,8 @@
    7.22  	/* format */
    7.23  	display_mode bmode;
    7.24  	bscreen.GetMode(&bmode);
    7.25 -	int32 bpp = BE_ColorSpaceToBitsPerPixel(bmode.space);
    7.26 -	*format = BE_BPPToSDLPxFormat(bpp);
    7.27 +	int32 bpp = HAIKU_ColorSpaceToBitsPerPixel(bmode.space);
    7.28 +	*format = HAIKU_BPPToSDLPxFormat(bpp);
    7.29  
    7.30  	/* Create the new bitmap object */
    7.31  	BBitmap *bitmap = bwin->GetBitmap();
    7.32 @@ -99,7 +99,7 @@
    7.33  
    7.34  
    7.35  
    7.36 -int BE_UpdateWindowFramebuffer(_THIS, SDL_Window * window,
    7.37 +int HAIKU_UpdateWindowFramebuffer(_THIS, SDL_Window * window,
    7.38                                        const SDL_Rect * rects, int numrects) {
    7.39  	if(!window)
    7.40  		return 0;
    7.41 @@ -112,13 +112,13 @@
    7.42  	bwin->UnlockBuffer();
    7.43  #else
    7.44  	bwin->SetBufferDirty(true);
    7.45 -	BE_UpdateOnce(window);
    7.46 +	HAIKU_UpdateOnce(window);
    7.47  #endif
    7.48  
    7.49  	return 0;
    7.50  }
    7.51  
    7.52 -int32 BE_DrawThread(void *data) {
    7.53 +int32 HAIKU_DrawThread(void *data) {
    7.54  	SDL_BWin *bwin = (SDL_BWin*)data;
    7.55  	
    7.56  	BScreen bscreen;
    7.57 @@ -181,7 +181,7 @@
    7.58  	return B_OK;
    7.59  }
    7.60  
    7.61 -void BE_DestroyWindowFramebuffer(_THIS, SDL_Window * window) {
    7.62 +void HAIKU_DestroyWindowFramebuffer(_THIS, SDL_Window * window) {
    7.63  	SDL_BWin *bwin = _ToBeWin(window);
    7.64  	
    7.65  	bwin->LockBuffer();
    7.66 @@ -202,7 +202,7 @@
    7.67   * solved, but I doubt it- they were pretty sporadic before now.
    7.68   */
    7.69  #ifndef DRAWTHREAD
    7.70 -static int32 BE_UpdateOnce(SDL_Window *window) {
    7.71 +static int32 HAIKU_UpdateOnce(SDL_Window *window) {
    7.72  	SDL_BWin *bwin = _ToBeWin(window);
    7.73  	BScreen bscreen;
    7.74  	if(!bscreen.IsValid()) {
     8.1 --- a/src/video/haiku/SDL_bframebuffer.h	Tue Aug 07 17:28:07 2018 -0400
     8.2 +++ b/src/video/haiku/SDL_bframebuffer.h	Tue Aug 07 18:07:11 2018 -0400
     8.3 @@ -30,13 +30,13 @@
     8.4  
     8.5  #include "../SDL_sysvideo.h"
     8.6  
     8.7 -extern int BE_CreateWindowFramebuffer(_THIS, SDL_Window * window,
     8.8 +extern int HAIKU_CreateWindowFramebuffer(_THIS, SDL_Window * window,
     8.9                                         Uint32 * format,
    8.10                                         void ** pixels, int *pitch);
    8.11 -extern int BE_UpdateWindowFramebuffer(_THIS, SDL_Window * window,
    8.12 +extern int HAIKU_UpdateWindowFramebuffer(_THIS, SDL_Window * window,
    8.13                                         const SDL_Rect * rects, int numrects);
    8.14 -extern void BE_DestroyWindowFramebuffer(_THIS, SDL_Window * window);
    8.15 -extern int32 BE_DrawThread(void *data);
    8.16 +extern void HAIKU_DestroyWindowFramebuffer(_THIS, SDL_Window * window);
    8.17 +extern int32 HAIKU_DrawThread(void *data);
    8.18  
    8.19  #ifdef __cplusplus
    8.20  }
     9.1 --- a/src/video/haiku/SDL_bkeyboard.cc	Tue Aug 07 17:28:07 2018 -0400
     9.2 +++ b/src/video/haiku/SDL_bkeyboard.cc	Tue Aug 07 18:07:11 2018 -0400
     9.3 @@ -41,7 +41,7 @@
     9.4  static SDL_Scancode keymap[KEYMAP_SIZE];
     9.5  static int8 keystate[KEYMAP_SIZE];
     9.6  
     9.7 -void BE_InitOSKeymap(void) {
     9.8 +void HAIKU_InitOSKeymap(void) {
     9.9  		for( uint i = 0; i < SDL_TABLESIZE(keymap); ++i ) {
    9.10  			keymap[i] = SDL_SCANCODE_UNKNOWN;
    9.11  		}
    9.12 @@ -159,7 +159,7 @@
    9.13  		keymap[0x6b]		= SDL_GetScancodeFromKey(SDLK_POWER);
    9.14  }
    9.15  
    9.16 -SDL_Scancode BE_GetScancodeFromBeKey(int32 bkey) {
    9.17 +SDL_Scancode HAIKU_GetScancodeFromBeKey(int32 bkey) {
    9.18  	if(bkey > 0 && bkey < (int32)SDL_TABLESIZE(keymap)) {
    9.19  		return keymap[bkey];
    9.20  	} else {
    9.21 @@ -167,7 +167,7 @@
    9.22  	}
    9.23  }
    9.24  
    9.25 -int8 BE_GetKeyState(int32 bkey) {
    9.26 +int8 HAIKU_GetKeyState(int32 bkey) {
    9.27  	if(bkey > 0 && bkey < KEYMAP_SIZE) {
    9.28  		return keystate[bkey];
    9.29  	} else {
    9.30 @@ -175,7 +175,7 @@
    9.31  	}
    9.32  }
    9.33  
    9.34 -void BE_SetKeyState(int32 bkey, int8 state) {
    9.35 +void HAIKU_SetKeyState(int32 bkey, int8 state) {
    9.36  	if(bkey > 0 && bkey < KEYMAP_SIZE) {
    9.37  		keystate[bkey] = state;
    9.38  	}
    10.1 --- a/src/video/haiku/SDL_bkeyboard.h	Tue Aug 07 17:28:07 2018 -0400
    10.2 +++ b/src/video/haiku/SDL_bkeyboard.h	Tue Aug 07 18:07:11 2018 -0400
    10.3 @@ -30,10 +30,10 @@
    10.4  
    10.5  #include "../../../include/SDL_keyboard.h"
    10.6  
    10.7 -extern void BE_InitOSKeymap(void);
    10.8 -extern SDL_Scancode BE_GetScancodeFromBeKey(int32 bkey);
    10.9 -extern int8 BE_GetKeyState(int32 bkey);
   10.10 -extern void BE_SetKeyState(int32 bkey, int8 state);
   10.11 +extern void HAIKU_InitOSKeymap(void);
   10.12 +extern SDL_Scancode HAIKU_GetScancodeFromBeKey(int32 bkey);
   10.13 +extern int8 HAIKU_GetKeyState(int32 bkey);
   10.14 +extern void HAIKU_SetKeyState(int32 bkey, int8 state);
   10.15  
   10.16  #ifdef __cplusplus
   10.17  }
    11.1 --- a/src/video/haiku/SDL_bmodes.cc	Tue Aug 07 17:28:07 2018 -0400
    11.2 +++ b/src/video/haiku/SDL_bmodes.cc	Tue Aug 07 18:07:11 2018 -0400
    11.3 @@ -132,7 +132,7 @@
    11.4  
    11.5  
    11.6  
    11.7 -int32 BE_ColorSpaceToBitsPerPixel(uint32 colorspace)
    11.8 +int32 HAIKU_ColorSpaceToBitsPerPixel(uint32 colorspace)
    11.9  {
   11.10  	int bitsperpixel;
   11.11  
   11.12 @@ -163,7 +163,7 @@
   11.13  	return(bitsperpixel);
   11.14  }
   11.15  
   11.16 -int32 BE_BPPToSDLPxFormat(int32 bpp) {
   11.17 +int32 HAIKU_BPPToSDLPxFormat(int32 bpp) {
   11.18  	/* Translation taken from SDL_windowsmodes.c */
   11.19  	switch (bpp) {
   11.20  	case 32:
   11.21 @@ -210,8 +210,8 @@
   11.22  #endif
   11.23  
   11.24  	/* Set the format */
   11.25 -	int32 bpp = BE_ColorSpaceToBitsPerPixel(bmode->space);
   11.26 -	mode->format = BE_BPPToSDLPxFormat(bpp);
   11.27 +	int32 bpp = HAIKU_ColorSpaceToBitsPerPixel(bmode->space);
   11.28 +	mode->format = HAIKU_BPPToSDLPxFormat(bpp);
   11.29  }
   11.30  
   11.31  /* Later, there may be more than one monitor available */
   11.32 @@ -235,7 +235,7 @@
   11.33   * Functions called by SDL
   11.34   */
   11.35  
   11.36 -int BE_InitModes(_THIS) {
   11.37 +int HAIKU_InitModes(_THIS) {
   11.38  	BScreen screen;
   11.39  
   11.40  	/* TODO: When Haiku supports multiple display screens, call
   11.41 @@ -244,13 +244,13 @@
   11.42  	return 0;
   11.43  }
   11.44  
   11.45 -int BE_QuitModes(_THIS) {
   11.46 +int HAIKU_QuitModes(_THIS) {
   11.47  	/* FIXME: Nothing really needs to be done here at the moment? */
   11.48  	return 0;
   11.49  }
   11.50  
   11.51  
   11.52 -int BE_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect) {
   11.53 +int HAIKU_GetDisplayBounds(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect) {
   11.54  	BScreen bscreen;
   11.55  	BRect rc = bscreen.Frame();
   11.56  	rect->x = (int)rc.left;
   11.57 @@ -260,7 +260,7 @@
   11.58  	return 0;
   11.59  }
   11.60  
   11.61 -void BE_GetDisplayModes(_THIS, SDL_VideoDisplay *display) {
   11.62 +void HAIKU_GetDisplayModes(_THIS, SDL_VideoDisplay *display) {
   11.63  	/* Get the current screen */
   11.64  	BScreen bscreen;
   11.65  
   11.66 @@ -285,7 +285,7 @@
   11.67  }
   11.68  
   11.69  
   11.70 -int BE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode){
   11.71 +int HAIKU_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode){
   11.72  	/* Get the current screen */
   11.73  	BScreen bscreen;
   11.74  	if(!bscreen.IsValid()) {
   11.75 @@ -318,7 +318,7 @@
   11.76  #if SDL_VIDEO_OPENGL
   11.77  	/* FIXME: Is there some way to reboot the OpenGL context?  This doesn't
   11.78  	   help */
   11.79 -//	BE_GL_RebootContexts(_this);
   11.80 +//	HAIKU_GL_RebootContexts(_this);
   11.81  #endif
   11.82  
   11.83  	return 0;
    12.1 --- a/src/video/haiku/SDL_bmodes.h	Tue Aug 07 17:28:07 2018 -0400
    12.2 +++ b/src/video/haiku/SDL_bmodes.h	Tue Aug 07 18:07:11 2018 -0400
    12.3 @@ -28,15 +28,15 @@
    12.4  
    12.5  #include "../SDL_sysvideo.h"
    12.6  
    12.7 -extern int32 BE_ColorSpaceToBitsPerPixel(uint32 colorspace);
    12.8 -extern int32 BE_BPPToSDLPxFormat(int32 bpp);
    12.9 +extern int32 HAIKU_ColorSpaceToBitsPerPixel(uint32 colorspace);
   12.10 +extern int32 HAIKU_BPPToSDLPxFormat(int32 bpp);
   12.11  
   12.12 -extern int BE_InitModes(_THIS);
   12.13 -extern int BE_QuitModes(_THIS);
   12.14 -extern int BE_GetDisplayBounds(_THIS, SDL_VideoDisplay *display,
   12.15 +extern int HAIKU_InitModes(_THIS);
   12.16 +extern int HAIKU_QuitModes(_THIS);
   12.17 +extern int HAIKU_GetDisplayBounds(_THIS, SDL_VideoDisplay *display,
   12.18      SDL_Rect *rect);
   12.19 -extern void BE_GetDisplayModes(_THIS, SDL_VideoDisplay *display);
   12.20 -extern int BE_SetDisplayMode(_THIS, SDL_VideoDisplay *display,
   12.21 +extern void HAIKU_GetDisplayModes(_THIS, SDL_VideoDisplay *display);
   12.22 +extern int HAIKU_SetDisplayMode(_THIS, SDL_VideoDisplay *display,
   12.23      SDL_DisplayMode *mode);
   12.24  
   12.25  #ifdef __cplusplus
    13.1 --- a/src/video/haiku/SDL_bopengl.cc	Tue Aug 07 17:28:07 2018 -0400
    13.2 +++ b/src/video/haiku/SDL_bopengl.cc	Tue Aug 07 18:07:11 2018 -0400
    13.3 @@ -44,7 +44,7 @@
    13.4  }
    13.5  
    13.6  /* Passing a NULL path means load pointers from the application */
    13.7 -int BE_GL_LoadLibrary(_THIS, const char *path)
    13.8 +int HAIKU_GL_LoadLibrary(_THIS, const char *path)
    13.9  {
   13.10  /* FIXME: Is this working correctly? */
   13.11      image_info info;
   13.12 @@ -63,7 +63,7 @@
   13.13      return 0;
   13.14  }
   13.15  
   13.16 -void *BE_GL_GetProcAddress(_THIS, const char *proc)
   13.17 +void *HAIKU_GL_GetProcAddress(_THIS, const char *proc)
   13.18  {
   13.19      if (_this->gl_config.dll_handle != NULL) {
   13.20          void *location = NULL;
   13.21 @@ -86,19 +86,19 @@
   13.22  
   13.23  
   13.24  
   13.25 -int BE_GL_SwapWindow(_THIS, SDL_Window * window) {
   13.26 +int HAIKU_GL_SwapWindow(_THIS, SDL_Window * window) {
   13.27      _ToBeWin(window)->SwapBuffers();
   13.28      return 0;
   13.29  }
   13.30  
   13.31 -int BE_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) {
   13.32 +int HAIKU_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) {
   13.33      SDL_BWin* win = (SDL_BWin*)context;
   13.34      _GetBeApp()->SetCurrentContext(win ? win->GetGLView() : NULL);
   13.35      return 0;
   13.36  }
   13.37  
   13.38  
   13.39 -SDL_GLContext BE_GL_CreateContext(_THIS, SDL_Window * window) {
   13.40 +SDL_GLContext HAIKU_GL_CreateContext(_THIS, SDL_Window * window) {
   13.41      /* FIXME: Not sure what flags should be included here; may want to have
   13.42         most of them */
   13.43      SDL_BWin *bwin = _ToBeWin(window);
   13.44 @@ -127,24 +127,24 @@
   13.45      return (SDL_GLContext)(bwin);
   13.46  }
   13.47  
   13.48 -void BE_GL_DeleteContext(_THIS, SDL_GLContext context) {
   13.49 +void HAIKU_GL_DeleteContext(_THIS, SDL_GLContext context) {
   13.50      /* Currently, automatically unlocks the view */
   13.51      ((SDL_BWin*)context)->RemoveGLView();
   13.52  }
   13.53  
   13.54  
   13.55 -int BE_GL_SetSwapInterval(_THIS, int interval) {
   13.56 +int HAIKU_GL_SetSwapInterval(_THIS, int interval) {
   13.57      /* TODO: Implement this, if necessary? */
   13.58      return SDL_Unsupported();
   13.59  }
   13.60  
   13.61 -int BE_GL_GetSwapInterval(_THIS) {
   13.62 +int HAIKU_GL_GetSwapInterval(_THIS) {
   13.63      /* TODO: Implement this, if necessary? */
   13.64      return 0;
   13.65  }
   13.66  
   13.67  
   13.68 -void BE_GL_UnloadLibrary(_THIS) {
   13.69 +void HAIKU_GL_UnloadLibrary(_THIS) {
   13.70      /* TODO: Implement this, if necessary? */
   13.71  }
   13.72  
   13.73 @@ -152,7 +152,7 @@
   13.74  /* FIXME: This function is meant to clear the OpenGL context when the video
   13.75     mode changes (see SDL_bmodes.cc), but it doesn't seem to help, and is not
   13.76     currently in use. */
   13.77 -void BE_GL_RebootContexts(_THIS) {
   13.78 +void HAIKU_GL_RebootContexts(_THIS) {
   13.79      SDL_Window *window = _this->windows;
   13.80      while(window) {
   13.81          SDL_BWin *bwin = _ToBeWin(window);
    14.1 --- a/src/video/haiku/SDL_bopengl.h	Tue Aug 07 17:28:07 2018 -0400
    14.2 +++ b/src/video/haiku/SDL_bopengl.h	Tue Aug 07 18:07:11 2018 -0400
    14.3 @@ -31,18 +31,18 @@
    14.4  #include "../SDL_sysvideo.h"
    14.5  
    14.6  
    14.7 -extern int BE_GL_LoadLibrary(_THIS, const char *path);                  /* FIXME */
    14.8 -extern void *BE_GL_GetProcAddress(_THIS, const char *proc);             /* FIXME */
    14.9 -extern void BE_GL_UnloadLibrary(_THIS);                                 /* TODO */
   14.10 -extern int BE_GL_MakeCurrent(_THIS, SDL_Window * window,
   14.11 +extern int HAIKU_GL_LoadLibrary(_THIS, const char *path);                  /* FIXME */
   14.12 +extern void *HAIKU_GL_GetProcAddress(_THIS, const char *proc);             /* FIXME */
   14.13 +extern void HAIKU_GL_UnloadLibrary(_THIS);                                 /* TODO */
   14.14 +extern int HAIKU_GL_MakeCurrent(_THIS, SDL_Window * window,
   14.15                                SDL_GLContext context);
   14.16 -extern int BE_GL_SetSwapInterval(_THIS, int interval);                  /* TODO */
   14.17 -extern int BE_GL_GetSwapInterval(_THIS);                                /* TODO */
   14.18 -extern int BE_GL_SwapWindow(_THIS, SDL_Window * window);
   14.19 -extern SDL_GLContext BE_GL_CreateContext(_THIS, SDL_Window * window);
   14.20 -extern void BE_GL_DeleteContext(_THIS, SDL_GLContext context);
   14.21 +extern int HAIKU_GL_SetSwapInterval(_THIS, int interval);                  /* TODO */
   14.22 +extern int HAIKU_GL_GetSwapInterval(_THIS);                                /* TODO */
   14.23 +extern int HAIKU_GL_SwapWindow(_THIS, SDL_Window * window);
   14.24 +extern SDL_GLContext HAIKU_GL_CreateContext(_THIS, SDL_Window * window);
   14.25 +extern void HAIKU_GL_DeleteContext(_THIS, SDL_GLContext context);
   14.26  
   14.27 -extern void BE_GL_RebootContexts(_THIS);
   14.28 +extern void HAIKU_GL_RebootContexts(_THIS);
   14.29  
   14.30  #ifdef __cplusplus
   14.31  }
    15.1 --- a/src/video/haiku/SDL_bvideo.cc	Tue Aug 07 17:28:07 2018 -0400
    15.2 +++ b/src/video/haiku/SDL_bvideo.cc	Tue Aug 07 18:07:11 2018 -0400
    15.3 @@ -37,17 +37,17 @@
    15.4  #include "SDL_bevents.h"
    15.5  
    15.6  /* FIXME: Undefined functions */
    15.7 -//    #define BE_PumpEvents NULL
    15.8 -    #define BE_StartTextInput NULL
    15.9 -    #define BE_StopTextInput NULL
   15.10 -    #define BE_SetTextInputRect NULL
   15.11 +//    #define HAIKU_PumpEvents NULL
   15.12 +    #define HAIKU_StartTextInput NULL
   15.13 +    #define HAIKU_StopTextInput NULL
   15.14 +    #define HAIKU_SetTextInputRect NULL
   15.15  
   15.16 -//    #define BE_DeleteDevice NULL
   15.17 +//    #define HAIKU_DeleteDevice NULL
   15.18  
   15.19  /* End undefined functions */
   15.20  
   15.21  static SDL_VideoDevice *
   15.22 -BE_CreateDevice(int devindex)
   15.23 +HAIKU_CreateDevice(int devindex)
   15.24  {
   15.25      SDL_VideoDevice *device;
   15.26      /*SDL_VideoData *data;*/
   15.27 @@ -61,78 +61,78 @@
   15.28  /* TODO: Figure out if any initialization needs to go here */
   15.29  
   15.30      /* Set the function pointers */
   15.31 -    device->VideoInit = BE_VideoInit;
   15.32 -    device->VideoQuit = BE_VideoQuit;
   15.33 -    device->GetDisplayBounds = BE_GetDisplayBounds;
   15.34 -    device->GetDisplayModes = BE_GetDisplayModes;
   15.35 -    device->SetDisplayMode = BE_SetDisplayMode;
   15.36 -    device->PumpEvents = BE_PumpEvents;
   15.37 +    device->VideoInit = HAIKU_VideoInit;
   15.38 +    device->VideoQuit = HAIKU_VideoQuit;
   15.39 +    device->GetDisplayBounds = HAIKU_GetDisplayBounds;
   15.40 +    device->GetDisplayModes = HAIKU_GetDisplayModes;
   15.41 +    device->SetDisplayMode = HAIKU_SetDisplayMode;
   15.42 +    device->PumpEvents = HAIKU_PumpEvents;
   15.43  
   15.44 -    device->CreateSDLWindow = BE_CreateWindow;
   15.45 -    device->CreateSDLWindowFrom = BE_CreateWindowFrom;
   15.46 -    device->SetWindowTitle = BE_SetWindowTitle;
   15.47 -    device->SetWindowIcon = BE_SetWindowIcon;
   15.48 -    device->SetWindowPosition = BE_SetWindowPosition;
   15.49 -    device->SetWindowSize = BE_SetWindowSize;
   15.50 -    device->ShowWindow = BE_ShowWindow;
   15.51 -    device->HideWindow = BE_HideWindow;
   15.52 -    device->RaiseWindow = BE_RaiseWindow;
   15.53 -    device->MaximizeWindow = BE_MaximizeWindow;
   15.54 -    device->MinimizeWindow = BE_MinimizeWindow;
   15.55 -    device->RestoreWindow = BE_RestoreWindow;
   15.56 -    device->SetWindowBordered = BE_SetWindowBordered;
   15.57 -    device->SetWindowResizable = BE_SetWindowResizable;
   15.58 -    device->SetWindowFullscreen = BE_SetWindowFullscreen;
   15.59 -    device->SetWindowGammaRamp = BE_SetWindowGammaRamp;
   15.60 -    device->GetWindowGammaRamp = BE_GetWindowGammaRamp;
   15.61 -    device->SetWindowGrab = BE_SetWindowGrab;
   15.62 -    device->DestroyWindow = BE_DestroyWindow;
   15.63 -    device->GetWindowWMInfo = BE_GetWindowWMInfo;
   15.64 -    device->CreateWindowFramebuffer = BE_CreateWindowFramebuffer;
   15.65 -    device->UpdateWindowFramebuffer = BE_UpdateWindowFramebuffer;
   15.66 -    device->DestroyWindowFramebuffer = BE_DestroyWindowFramebuffer;
   15.67 +    device->CreateSDLWindow = HAIKU_CreateWindow;
   15.68 +    device->CreateSDLWindowFrom = HAIKU_CreateWindowFrom;
   15.69 +    device->SetWindowTitle = HAIKU_SetWindowTitle;
   15.70 +    device->SetWindowIcon = HAIKU_SetWindowIcon;
   15.71 +    device->SetWindowPosition = HAIKU_SetWindowPosition;
   15.72 +    device->SetWindowSize = HAIKU_SetWindowSize;
   15.73 +    device->ShowWindow = HAIKU_ShowWindow;
   15.74 +    device->HideWindow = HAIKU_HideWindow;
   15.75 +    device->RaiseWindow = HAIKU_RaiseWindow;
   15.76 +    device->MaximizeWindow = HAIKU_MaximizeWindow;
   15.77 +    device->MinimizeWindow = HAIKU_MinimizeWindow;
   15.78 +    device->RestoreWindow = HAIKU_RestoreWindow;
   15.79 +    device->SetWindowBordered = HAIKU_SetWindowBordered;
   15.80 +    device->SetWindowResizable = HAIKU_SetWindowResizable;
   15.81 +    device->SetWindowFullscreen = HAIKU_SetWindowFullscreen;
   15.82 +    device->SetWindowGammaRamp = HAIKU_SetWindowGammaRamp;
   15.83 +    device->GetWindowGammaRamp = HAIKU_GetWindowGammaRamp;
   15.84 +    device->SetWindowGrab = HAIKU_SetWindowGrab;
   15.85 +    device->DestroyWindow = HAIKU_DestroyWindow;
   15.86 +    device->GetWindowWMInfo = HAIKU_GetWindowWMInfo;
   15.87 +    device->CreateWindowFramebuffer = HAIKU_CreateWindowFramebuffer;
   15.88 +    device->UpdateWindowFramebuffer = HAIKU_UpdateWindowFramebuffer;
   15.89 +    device->DestroyWindowFramebuffer = HAIKU_DestroyWindowFramebuffer;
   15.90      
   15.91      device->shape_driver.CreateShaper = NULL;
   15.92      device->shape_driver.SetWindowShape = NULL;
   15.93      device->shape_driver.ResizeWindowShape = NULL;
   15.94  
   15.95  #if SDL_VIDEO_OPENGL
   15.96 -    device->GL_LoadLibrary = BE_GL_LoadLibrary;
   15.97 -    device->GL_GetProcAddress = BE_GL_GetProcAddress;
   15.98 -    device->GL_UnloadLibrary = BE_GL_UnloadLibrary;
   15.99 -    device->GL_CreateContext = BE_GL_CreateContext;
  15.100 -    device->GL_MakeCurrent = BE_GL_MakeCurrent;
  15.101 -    device->GL_SetSwapInterval = BE_GL_SetSwapInterval;
  15.102 -    device->GL_GetSwapInterval = BE_GL_GetSwapInterval;
  15.103 -    device->GL_SwapWindow = BE_GL_SwapWindow;
  15.104 -    device->GL_DeleteContext = BE_GL_DeleteContext;
  15.105 +    device->GL_LoadLibrary = HAIKU_GL_LoadLibrary;
  15.106 +    device->GL_GetProcAddress = HAIKU_GL_GetProcAddress;
  15.107 +    device->GL_UnloadLibrary = HAIKU_GL_UnloadLibrary;
  15.108 +    device->GL_CreateContext = HAIKU_GL_CreateContext;
  15.109 +    device->GL_MakeCurrent = HAIKU_GL_MakeCurrent;
  15.110 +    device->GL_SetSwapInterval = HAIKU_GL_SetSwapInterval;
  15.111 +    device->GL_GetSwapInterval = HAIKU_GL_GetSwapInterval;
  15.112 +    device->GL_SwapWindow = HAIKU_GL_SwapWindow;
  15.113 +    device->GL_DeleteContext = HAIKU_GL_DeleteContext;
  15.114  #endif
  15.115  
  15.116 -    device->StartTextInput = BE_StartTextInput;
  15.117 -    device->StopTextInput = BE_StopTextInput;
  15.118 -    device->SetTextInputRect = BE_SetTextInputRect;
  15.119 +    device->StartTextInput = HAIKU_StartTextInput;
  15.120 +    device->StopTextInput = HAIKU_StopTextInput;
  15.121 +    device->SetTextInputRect = HAIKU_SetTextInputRect;
  15.122  
  15.123 -    device->SetClipboardText = BE_SetClipboardText;
  15.124 -    device->GetClipboardText = BE_GetClipboardText;
  15.125 -    device->HasClipboardText = BE_HasClipboardText;
  15.126 +    device->SetClipboardText = HAIKU_SetClipboardText;
  15.127 +    device->GetClipboardText = HAIKU_GetClipboardText;
  15.128 +    device->HasClipboardText = HAIKU_HasClipboardText;
  15.129  
  15.130 -    device->free = BE_DeleteDevice;
  15.131 +    device->free = HAIKU_DeleteDevice;
  15.132  
  15.133      return device;
  15.134  }
  15.135  
  15.136  VideoBootStrap HAIKU_bootstrap = {
  15.137  	"haiku", "Haiku graphics",
  15.138 -	BE_Available, BE_CreateDevice
  15.139 +	HAIKU_Available, HAIKU_CreateDevice
  15.140  };
  15.141  
  15.142 -void BE_DeleteDevice(SDL_VideoDevice * device)
  15.143 +void HAIKU_DeleteDevice(SDL_VideoDevice * device)
  15.144  {
  15.145  	SDL_free(device->driverdata);
  15.146  	SDL_free(device);
  15.147  }
  15.148  
  15.149 -int BE_VideoInit(_THIS)
  15.150 +int HAIKU_VideoInit(_THIS)
  15.151  {
  15.152  	/* Initialize the Be Application for appserver interaction */
  15.153  	if (SDL_InitBeApp() < 0) {
  15.154 @@ -140,31 +140,31 @@
  15.155  	}
  15.156  	
  15.157  	/* Initialize video modes */
  15.158 -	BE_InitModes(_this);
  15.159 +	HAIKU_InitModes(_this);
  15.160  
  15.161  	/* Init the keymap */
  15.162 -	BE_InitOSKeymap();
  15.163 +	HAIKU_InitOSKeymap();
  15.164  	
  15.165  	
  15.166  #if SDL_VIDEO_OPENGL
  15.167          /* testgl application doesn't load library, just tries to load symbols */
  15.168          /* is it correct? if so we have to load library here */
  15.169 -    BE_GL_LoadLibrary(_this, NULL);
  15.170 +    HAIKU_GL_LoadLibrary(_this, NULL);
  15.171  #endif
  15.172  
  15.173          /* We're done! */
  15.174      return (0);
  15.175  }
  15.176  
  15.177 -int BE_Available(void)
  15.178 +int HAIKU_Available(void)
  15.179  {
  15.180      return (1);
  15.181  }
  15.182  
  15.183 -void BE_VideoQuit(_THIS)
  15.184 +void HAIKU_VideoQuit(_THIS)
  15.185  {
  15.186  
  15.187 -    BE_QuitModes(_this);
  15.188 +    HAIKU_QuitModes(_this);
  15.189  
  15.190      SDL_QuitBeApp();
  15.191  }
    16.1 --- a/src/video/haiku/SDL_bvideo.h	Tue Aug 07 17:28:07 2018 -0400
    16.2 +++ b/src/video/haiku/SDL_bvideo.h	Tue Aug 07 18:07:11 2018 -0400
    16.3 @@ -30,10 +30,10 @@
    16.4  #include "../SDL_sysvideo.h"
    16.5  
    16.6  
    16.7 -extern void BE_VideoQuit(_THIS);
    16.8 -extern int BE_VideoInit(_THIS);
    16.9 -extern void BE_DeleteDevice(_THIS);
   16.10 -extern int BE_Available(void);
   16.11 +extern void HAIKU_VideoQuit(_THIS);
   16.12 +extern int HAIKU_VideoInit(_THIS);
   16.13 +extern void HAIKU_DeleteDevice(_THIS);
   16.14 +extern int HAIKU_Available(void);
   16.15  
   16.16  #ifdef __cplusplus
   16.17  }
    17.1 --- a/src/video/haiku/SDL_bwindow.cc	Tue Aug 07 17:28:07 2018 -0400
    17.2 +++ b/src/video/haiku/SDL_bwindow.cc	Tue Aug 07 18:07:11 2018 -0400
    17.3 @@ -75,7 +75,7 @@
    17.4      return 0;
    17.5  }
    17.6  
    17.7 -int BE_CreateWindow(_THIS, SDL_Window *window) {
    17.8 +int HAIKU_CreateWindow(_THIS, SDL_Window *window) {
    17.9      if (_InitWindow(_this, window) < 0) {
   17.10          return -1;
   17.11      }
   17.12 @@ -85,7 +85,7 @@
   17.13      return 0;
   17.14  }
   17.15  
   17.16 -int BE_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) {
   17.17 +int HAIKU_CreateWindowFrom(_THIS, SDL_Window * window, const void *data) {
   17.18  
   17.19  	SDL_BWin *otherBWin = (SDL_BWin*)data;
   17.20  	if(!otherBWin->LockLooper())
   17.21 @@ -117,73 +117,73 @@
   17.22      return 0;
   17.23  }
   17.24  
   17.25 -void BE_SetWindowTitle(_THIS, SDL_Window * window) {
   17.26 +void HAIKU_SetWindowTitle(_THIS, SDL_Window * window) {
   17.27  	BMessage msg(BWIN_SET_TITLE);
   17.28  	msg.AddString("window-title", window->title);
   17.29  	_ToBeWin(window)->PostMessage(&msg);
   17.30  }
   17.31  
   17.32 -void BE_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) {
   17.33 +void HAIKU_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon) {
   17.34  	/* FIXME: Icons not supported by Haiku */
   17.35  }
   17.36  
   17.37 -void BE_SetWindowPosition(_THIS, SDL_Window * window) {
   17.38 +void HAIKU_SetWindowPosition(_THIS, SDL_Window * window) {
   17.39  	BMessage msg(BWIN_MOVE_WINDOW);
   17.40  	msg.AddInt32("window-x", window->x);
   17.41  	msg.AddInt32("window-y", window->y);
   17.42  	_ToBeWin(window)->PostMessage(&msg);
   17.43  }
   17.44  
   17.45 -void BE_SetWindowSize(_THIS, SDL_Window * window) {
   17.46 +void HAIKU_SetWindowSize(_THIS, SDL_Window * window) {
   17.47  	BMessage msg(BWIN_RESIZE_WINDOW);
   17.48  	msg.AddInt32("window-w", window->w - 1);
   17.49  	msg.AddInt32("window-h", window->h - 1);
   17.50  	_ToBeWin(window)->PostMessage(&msg);
   17.51  }
   17.52  
   17.53 -void BE_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) {
   17.54 +void HAIKU_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered) {
   17.55  	BMessage msg(BWIN_SET_BORDERED);
   17.56  	msg.AddBool("window-border", bordered != SDL_FALSE);
   17.57  	_ToBeWin(window)->PostMessage(&msg);
   17.58  }
   17.59  
   17.60 -void BE_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable) {
   17.61 +void HAIKU_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable) {
   17.62  	BMessage msg(BWIN_SET_RESIZABLE);
   17.63  	msg.AddBool("window-resizable", resizable != SDL_FALSE);
   17.64  	_ToBeWin(window)->PostMessage(&msg);
   17.65  }
   17.66  
   17.67 -void BE_ShowWindow(_THIS, SDL_Window * window) {
   17.68 +void HAIKU_ShowWindow(_THIS, SDL_Window * window) {
   17.69  	BMessage msg(BWIN_SHOW_WINDOW);
   17.70  	_ToBeWin(window)->PostMessage(&msg);
   17.71  }
   17.72  
   17.73 -void BE_HideWindow(_THIS, SDL_Window * window) {
   17.74 +void HAIKU_HideWindow(_THIS, SDL_Window * window) {
   17.75  	BMessage msg(BWIN_HIDE_WINDOW);
   17.76  	_ToBeWin(window)->PostMessage(&msg);
   17.77  }
   17.78  
   17.79 -void BE_RaiseWindow(_THIS, SDL_Window * window) {
   17.80 +void HAIKU_RaiseWindow(_THIS, SDL_Window * window) {
   17.81  	BMessage msg(BWIN_SHOW_WINDOW);	/* Activate this window and move to front */
   17.82  	_ToBeWin(window)->PostMessage(&msg);
   17.83  }
   17.84  
   17.85 -void BE_MaximizeWindow(_THIS, SDL_Window * window) {
   17.86 +void HAIKU_MaximizeWindow(_THIS, SDL_Window * window) {
   17.87  	BMessage msg(BWIN_MAXIMIZE_WINDOW);
   17.88  	_ToBeWin(window)->PostMessage(&msg);
   17.89  }
   17.90  
   17.91 -void BE_MinimizeWindow(_THIS, SDL_Window * window) {
   17.92 +void HAIKU_MinimizeWindow(_THIS, SDL_Window * window) {
   17.93  	BMessage msg(BWIN_MINIMIZE_WINDOW);
   17.94  	_ToBeWin(window)->PostMessage(&msg);
   17.95  }
   17.96  
   17.97 -void BE_RestoreWindow(_THIS, SDL_Window * window) {
   17.98 +void HAIKU_RestoreWindow(_THIS, SDL_Window * window) {
   17.99  	BMessage msg(BWIN_RESTORE_WINDOW);
  17.100  	_ToBeWin(window)->PostMessage(&msg);
  17.101  }
  17.102  
  17.103 -void BE_SetWindowFullscreen(_THIS, SDL_Window * window,
  17.104 +void HAIKU_SetWindowFullscreen(_THIS, SDL_Window * window,
  17.105  		SDL_VideoDisplay * display, SDL_bool fullscreen) {
  17.106  	/* Haiku tracks all video display information */
  17.107  	BMessage msg(BWIN_FULLSCREEN);
  17.108 @@ -192,29 +192,29 @@
  17.109  	
  17.110  }
  17.111  
  17.112 -int BE_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) {
  17.113 +int HAIKU_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp) {
  17.114  	/* FIXME: Not Haiku supported */
  17.115  	return -1;
  17.116  }
  17.117  
  17.118 -int BE_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) {
  17.119 +int HAIKU_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp) {
  17.120  	/* FIXME: Not Haiku supported */
  17.121  	return -1;
  17.122  }
  17.123  
  17.124  
  17.125 -void BE_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed) {
  17.126 +void HAIKU_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed) {
  17.127  	/* TODO: Implement this! */
  17.128  }
  17.129  
  17.130 -void BE_DestroyWindow(_THIS, SDL_Window * window) {
  17.131 +void HAIKU_DestroyWindow(_THIS, SDL_Window * window) {
  17.132  	_ToBeWin(window)->LockLooper();	/* This MUST be locked */
  17.133  	_GetBeApp()->ClearID(_ToBeWin(window));
  17.134  	_ToBeWin(window)->Quit();
  17.135  	window->driverdata = NULL;
  17.136  }
  17.137  
  17.138 -SDL_bool BE_GetWindowWMInfo(_THIS, SDL_Window * window,
  17.139 +SDL_bool HAIKU_GetWindowWMInfo(_THIS, SDL_Window * window,
  17.140                                      struct SDL_SysWMinfo *info) {
  17.141  	/* FIXME: What is the point of this? What information should be included? */
  17.142  	return SDL_FALSE;
    18.1 --- a/src/video/haiku/SDL_bwindow.h	Tue Aug 07 17:28:07 2018 -0400
    18.2 +++ b/src/video/haiku/SDL_bwindow.h	Tue Aug 07 18:07:11 2018 -0400
    18.3 @@ -26,26 +26,26 @@
    18.4  #include "../SDL_sysvideo.h"
    18.5  
    18.6  
    18.7 -extern int BE_CreateWindow(_THIS, SDL_Window *window);
    18.8 -extern int BE_CreateWindowFrom(_THIS, SDL_Window * window, const void *data);
    18.9 -extern void BE_SetWindowTitle(_THIS, SDL_Window * window);
   18.10 -extern void BE_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon);
   18.11 -extern void BE_SetWindowPosition(_THIS, SDL_Window * window);
   18.12 -extern void BE_SetWindowSize(_THIS, SDL_Window * window);
   18.13 -extern void BE_ShowWindow(_THIS, SDL_Window * window);
   18.14 -extern void BE_HideWindow(_THIS, SDL_Window * window);
   18.15 -extern void BE_RaiseWindow(_THIS, SDL_Window * window);
   18.16 -extern void BE_MaximizeWindow(_THIS, SDL_Window * window);
   18.17 -extern void BE_MinimizeWindow(_THIS, SDL_Window * window);
   18.18 -extern void BE_RestoreWindow(_THIS, SDL_Window * window);
   18.19 -extern void BE_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered);
   18.20 -extern void BE_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable);
   18.21 -extern void BE_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
   18.22 -extern int BE_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp);
   18.23 -extern int BE_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp);
   18.24 -extern void BE_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
   18.25 -extern void BE_DestroyWindow(_THIS, SDL_Window * window);
   18.26 -extern SDL_bool BE_GetWindowWMInfo(_THIS, SDL_Window * window,
   18.27 +extern int HAIKU_CreateWindow(_THIS, SDL_Window *window);
   18.28 +extern int HAIKU_CreateWindowFrom(_THIS, SDL_Window * window, const void *data);
   18.29 +extern void HAIKU_SetWindowTitle(_THIS, SDL_Window * window);
   18.30 +extern void HAIKU_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon);
   18.31 +extern void HAIKU_SetWindowPosition(_THIS, SDL_Window * window);
   18.32 +extern void HAIKU_SetWindowSize(_THIS, SDL_Window * window);
   18.33 +extern void HAIKU_ShowWindow(_THIS, SDL_Window * window);
   18.34 +extern void HAIKU_HideWindow(_THIS, SDL_Window * window);
   18.35 +extern void HAIKU_RaiseWindow(_THIS, SDL_Window * window);
   18.36 +extern void HAIKU_MaximizeWindow(_THIS, SDL_Window * window);
   18.37 +extern void HAIKU_MinimizeWindow(_THIS, SDL_Window * window);
   18.38 +extern void HAIKU_RestoreWindow(_THIS, SDL_Window * window);
   18.39 +extern void HAIKU_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered);
   18.40 +extern void HAIKU_SetWindowResizable(_THIS, SDL_Window * window, SDL_bool resizable);
   18.41 +extern void HAIKU_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen);
   18.42 +extern int HAIKU_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp);
   18.43 +extern int HAIKU_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp);
   18.44 +extern void HAIKU_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
   18.45 +extern void HAIKU_DestroyWindow(_THIS, SDL_Window * window);
   18.46 +extern SDL_bool HAIKU_GetWindowWMInfo(_THIS, SDL_Window * window,
   18.47                                      struct SDL_SysWMinfo *info);
   18.48  
   18.49