src/video/haiku/SDL_bvideo.cc
changeset 12082 09999a0e8f9a
parent 11811 5d94cb6b24d3
child 12201 8bdc4d340419
     1.1 --- a/src/video/haiku/SDL_bvideo.cc	Tue Aug 07 17:28:07 2018 -0400
     1.2 +++ b/src/video/haiku/SDL_bvideo.cc	Tue Aug 07 18:07:11 2018 -0400
     1.3 @@ -37,17 +37,17 @@
     1.4  #include "SDL_bevents.h"
     1.5  
     1.6  /* FIXME: Undefined functions */
     1.7 -//    #define BE_PumpEvents NULL
     1.8 -    #define BE_StartTextInput NULL
     1.9 -    #define BE_StopTextInput NULL
    1.10 -    #define BE_SetTextInputRect NULL
    1.11 +//    #define HAIKU_PumpEvents NULL
    1.12 +    #define HAIKU_StartTextInput NULL
    1.13 +    #define HAIKU_StopTextInput NULL
    1.14 +    #define HAIKU_SetTextInputRect NULL
    1.15  
    1.16 -//    #define BE_DeleteDevice NULL
    1.17 +//    #define HAIKU_DeleteDevice NULL
    1.18  
    1.19  /* End undefined functions */
    1.20  
    1.21  static SDL_VideoDevice *
    1.22 -BE_CreateDevice(int devindex)
    1.23 +HAIKU_CreateDevice(int devindex)
    1.24  {
    1.25      SDL_VideoDevice *device;
    1.26      /*SDL_VideoData *data;*/
    1.27 @@ -61,78 +61,78 @@
    1.28  /* TODO: Figure out if any initialization needs to go here */
    1.29  
    1.30      /* Set the function pointers */
    1.31 -    device->VideoInit = BE_VideoInit;
    1.32 -    device->VideoQuit = BE_VideoQuit;
    1.33 -    device->GetDisplayBounds = BE_GetDisplayBounds;
    1.34 -    device->GetDisplayModes = BE_GetDisplayModes;
    1.35 -    device->SetDisplayMode = BE_SetDisplayMode;
    1.36 -    device->PumpEvents = BE_PumpEvents;
    1.37 +    device->VideoInit = HAIKU_VideoInit;
    1.38 +    device->VideoQuit = HAIKU_VideoQuit;
    1.39 +    device->GetDisplayBounds = HAIKU_GetDisplayBounds;
    1.40 +    device->GetDisplayModes = HAIKU_GetDisplayModes;
    1.41 +    device->SetDisplayMode = HAIKU_SetDisplayMode;
    1.42 +    device->PumpEvents = HAIKU_PumpEvents;
    1.43  
    1.44 -    device->CreateSDLWindow = BE_CreateWindow;
    1.45 -    device->CreateSDLWindowFrom = BE_CreateWindowFrom;
    1.46 -    device->SetWindowTitle = BE_SetWindowTitle;
    1.47 -    device->SetWindowIcon = BE_SetWindowIcon;
    1.48 -    device->SetWindowPosition = BE_SetWindowPosition;
    1.49 -    device->SetWindowSize = BE_SetWindowSize;
    1.50 -    device->ShowWindow = BE_ShowWindow;
    1.51 -    device->HideWindow = BE_HideWindow;
    1.52 -    device->RaiseWindow = BE_RaiseWindow;
    1.53 -    device->MaximizeWindow = BE_MaximizeWindow;
    1.54 -    device->MinimizeWindow = BE_MinimizeWindow;
    1.55 -    device->RestoreWindow = BE_RestoreWindow;
    1.56 -    device->SetWindowBordered = BE_SetWindowBordered;
    1.57 -    device->SetWindowResizable = BE_SetWindowResizable;
    1.58 -    device->SetWindowFullscreen = BE_SetWindowFullscreen;
    1.59 -    device->SetWindowGammaRamp = BE_SetWindowGammaRamp;
    1.60 -    device->GetWindowGammaRamp = BE_GetWindowGammaRamp;
    1.61 -    device->SetWindowGrab = BE_SetWindowGrab;
    1.62 -    device->DestroyWindow = BE_DestroyWindow;
    1.63 -    device->GetWindowWMInfo = BE_GetWindowWMInfo;
    1.64 -    device->CreateWindowFramebuffer = BE_CreateWindowFramebuffer;
    1.65 -    device->UpdateWindowFramebuffer = BE_UpdateWindowFramebuffer;
    1.66 -    device->DestroyWindowFramebuffer = BE_DestroyWindowFramebuffer;
    1.67 +    device->CreateSDLWindow = HAIKU_CreateWindow;
    1.68 +    device->CreateSDLWindowFrom = HAIKU_CreateWindowFrom;
    1.69 +    device->SetWindowTitle = HAIKU_SetWindowTitle;
    1.70 +    device->SetWindowIcon = HAIKU_SetWindowIcon;
    1.71 +    device->SetWindowPosition = HAIKU_SetWindowPosition;
    1.72 +    device->SetWindowSize = HAIKU_SetWindowSize;
    1.73 +    device->ShowWindow = HAIKU_ShowWindow;
    1.74 +    device->HideWindow = HAIKU_HideWindow;
    1.75 +    device->RaiseWindow = HAIKU_RaiseWindow;
    1.76 +    device->MaximizeWindow = HAIKU_MaximizeWindow;
    1.77 +    device->MinimizeWindow = HAIKU_MinimizeWindow;
    1.78 +    device->RestoreWindow = HAIKU_RestoreWindow;
    1.79 +    device->SetWindowBordered = HAIKU_SetWindowBordered;
    1.80 +    device->SetWindowResizable = HAIKU_SetWindowResizable;
    1.81 +    device->SetWindowFullscreen = HAIKU_SetWindowFullscreen;
    1.82 +    device->SetWindowGammaRamp = HAIKU_SetWindowGammaRamp;
    1.83 +    device->GetWindowGammaRamp = HAIKU_GetWindowGammaRamp;
    1.84 +    device->SetWindowGrab = HAIKU_SetWindowGrab;
    1.85 +    device->DestroyWindow = HAIKU_DestroyWindow;
    1.86 +    device->GetWindowWMInfo = HAIKU_GetWindowWMInfo;
    1.87 +    device->CreateWindowFramebuffer = HAIKU_CreateWindowFramebuffer;
    1.88 +    device->UpdateWindowFramebuffer = HAIKU_UpdateWindowFramebuffer;
    1.89 +    device->DestroyWindowFramebuffer = HAIKU_DestroyWindowFramebuffer;
    1.90      
    1.91      device->shape_driver.CreateShaper = NULL;
    1.92      device->shape_driver.SetWindowShape = NULL;
    1.93      device->shape_driver.ResizeWindowShape = NULL;
    1.94  
    1.95  #if SDL_VIDEO_OPENGL
    1.96 -    device->GL_LoadLibrary = BE_GL_LoadLibrary;
    1.97 -    device->GL_GetProcAddress = BE_GL_GetProcAddress;
    1.98 -    device->GL_UnloadLibrary = BE_GL_UnloadLibrary;
    1.99 -    device->GL_CreateContext = BE_GL_CreateContext;
   1.100 -    device->GL_MakeCurrent = BE_GL_MakeCurrent;
   1.101 -    device->GL_SetSwapInterval = BE_GL_SetSwapInterval;
   1.102 -    device->GL_GetSwapInterval = BE_GL_GetSwapInterval;
   1.103 -    device->GL_SwapWindow = BE_GL_SwapWindow;
   1.104 -    device->GL_DeleteContext = BE_GL_DeleteContext;
   1.105 +    device->GL_LoadLibrary = HAIKU_GL_LoadLibrary;
   1.106 +    device->GL_GetProcAddress = HAIKU_GL_GetProcAddress;
   1.107 +    device->GL_UnloadLibrary = HAIKU_GL_UnloadLibrary;
   1.108 +    device->GL_CreateContext = HAIKU_GL_CreateContext;
   1.109 +    device->GL_MakeCurrent = HAIKU_GL_MakeCurrent;
   1.110 +    device->GL_SetSwapInterval = HAIKU_GL_SetSwapInterval;
   1.111 +    device->GL_GetSwapInterval = HAIKU_GL_GetSwapInterval;
   1.112 +    device->GL_SwapWindow = HAIKU_GL_SwapWindow;
   1.113 +    device->GL_DeleteContext = HAIKU_GL_DeleteContext;
   1.114  #endif
   1.115  
   1.116 -    device->StartTextInput = BE_StartTextInput;
   1.117 -    device->StopTextInput = BE_StopTextInput;
   1.118 -    device->SetTextInputRect = BE_SetTextInputRect;
   1.119 +    device->StartTextInput = HAIKU_StartTextInput;
   1.120 +    device->StopTextInput = HAIKU_StopTextInput;
   1.121 +    device->SetTextInputRect = HAIKU_SetTextInputRect;
   1.122  
   1.123 -    device->SetClipboardText = BE_SetClipboardText;
   1.124 -    device->GetClipboardText = BE_GetClipboardText;
   1.125 -    device->HasClipboardText = BE_HasClipboardText;
   1.126 +    device->SetClipboardText = HAIKU_SetClipboardText;
   1.127 +    device->GetClipboardText = HAIKU_GetClipboardText;
   1.128 +    device->HasClipboardText = HAIKU_HasClipboardText;
   1.129  
   1.130 -    device->free = BE_DeleteDevice;
   1.131 +    device->free = HAIKU_DeleteDevice;
   1.132  
   1.133      return device;
   1.134  }
   1.135  
   1.136  VideoBootStrap HAIKU_bootstrap = {
   1.137  	"haiku", "Haiku graphics",
   1.138 -	BE_Available, BE_CreateDevice
   1.139 +	HAIKU_Available, HAIKU_CreateDevice
   1.140  };
   1.141  
   1.142 -void BE_DeleteDevice(SDL_VideoDevice * device)
   1.143 +void HAIKU_DeleteDevice(SDL_VideoDevice * device)
   1.144  {
   1.145  	SDL_free(device->driverdata);
   1.146  	SDL_free(device);
   1.147  }
   1.148  
   1.149 -int BE_VideoInit(_THIS)
   1.150 +int HAIKU_VideoInit(_THIS)
   1.151  {
   1.152  	/* Initialize the Be Application for appserver interaction */
   1.153  	if (SDL_InitBeApp() < 0) {
   1.154 @@ -140,31 +140,31 @@
   1.155  	}
   1.156  	
   1.157  	/* Initialize video modes */
   1.158 -	BE_InitModes(_this);
   1.159 +	HAIKU_InitModes(_this);
   1.160  
   1.161  	/* Init the keymap */
   1.162 -	BE_InitOSKeymap();
   1.163 +	HAIKU_InitOSKeymap();
   1.164  	
   1.165  	
   1.166  #if SDL_VIDEO_OPENGL
   1.167          /* testgl application doesn't load library, just tries to load symbols */
   1.168          /* is it correct? if so we have to load library here */
   1.169 -    BE_GL_LoadLibrary(_this, NULL);
   1.170 +    HAIKU_GL_LoadLibrary(_this, NULL);
   1.171  #endif
   1.172  
   1.173          /* We're done! */
   1.174      return (0);
   1.175  }
   1.176  
   1.177 -int BE_Available(void)
   1.178 +int HAIKU_Available(void)
   1.179  {
   1.180      return (1);
   1.181  }
   1.182  
   1.183 -void BE_VideoQuit(_THIS)
   1.184 +void HAIKU_VideoQuit(_THIS)
   1.185  {
   1.186  
   1.187 -    BE_QuitModes(_this);
   1.188 +    HAIKU_QuitModes(_this);
   1.189  
   1.190      SDL_QuitBeApp();
   1.191  }