haiku: Rename BE_* entities to HAIKU_*
authorEXL <exlmotodev@gmail.com>
Tue, 12 Nov 2019 17:24:37 -0500
changeset 13238007002587d5d
parent 13237 f5298e605071
child 13241 1fb1880d5edf
haiku: Rename BE_* entities to HAIKU_*
In favor Bugzilla #2349.
Update copyright years to 2019.

Partially fixes Bugzilla #4442.
src/video/SDL_video.c
src/video/haiku/SDL_bmessagebox.cc
src/video/haiku/SDL_bmessagebox.h
     1.1 --- a/src/video/SDL_video.c	Mon Nov 11 22:23:33 2019 -0500
     1.2 +++ b/src/video/SDL_video.c	Tue Nov 12 17:24:37 2019 -0500
     1.3 @@ -3947,7 +3947,7 @@
     1.4  #if SDL_VIDEO_DRIVER_HAIKU
     1.5      if (retval == -1 &&
     1.6          SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_HAIKU) &&
     1.7 -        BE_ShowMessageBox(messageboxdata, buttonid) == 0) {
     1.8 +        HAIKU_ShowMessageBox(messageboxdata, buttonid) == 0) {
     1.9          retval = 0;
    1.10      }
    1.11  #endif
     2.1 --- a/src/video/haiku/SDL_bmessagebox.cc	Mon Nov 11 22:23:33 2019 -0500
     2.2 +++ b/src/video/haiku/SDL_bmessagebox.cc	Tue Nov 12 17:24:37 2019 -0500
     2.3 @@ -1,7 +1,7 @@
     2.4  /*
     2.5    Simple DirectMedia Layer
     2.6 -  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
     2.7 -  Copyright (C) 2018 EXL <exlmotodev@gmail.com>
     2.8 +  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
     2.9 +  Copyright (C) 2018-2019 EXL <exlmotodev@gmail.com>
    2.10  
    2.11    This software is provided 'as-is', without any express or implied
    2.12    warranty.  In no event will the authors be held liable for any damages
    2.13 @@ -54,7 +54,7 @@
    2.14  	G_MAX_STRING_LENGTH_BYTES = 120
    2.15  };
    2.16  
    2.17 -class BE_SDL_MessageBox : public BAlert
    2.18 +class HAIKU_SDL_MessageBox : public BAlert
    2.19  {
    2.20  	float fComputedMessageBoxWidth;
    2.21  
    2.22 @@ -68,9 +68,9 @@
    2.23  	rgb_color fTextColor;
    2.24  
    2.25  	const char *fTitle;
    2.26 -	const char *BE_SDL_DefTitle;
    2.27 -	const char *BE_SDL_DefMessage;
    2.28 -	const char *BE_SDL_DefButton;
    2.29 +	const char *HAIKU_SDL_DefTitle;
    2.30 +	const char *HAIKU_SDL_DefMessage;
    2.31 +	const char *HAIKU_SDL_DefButton;
    2.32  
    2.33  	std::vector<const SDL_MessageBoxButtonData *> fButtons;
    2.34  
    2.35 @@ -133,15 +133,15 @@
    2.36  	{
    2.37  		if (aMessageBoxData == NULL)
    2.38  		{
    2.39 -			SetTitle(BE_SDL_DefTitle);
    2.40 -			SetMessageText(BE_SDL_DefMessage);
    2.41 -			AddButton(BE_SDL_DefButton);
    2.42 +			SetTitle(HAIKU_SDL_DefTitle);
    2.43 +			SetMessageText(HAIKU_SDL_DefMessage);
    2.44 +			AddButton(HAIKU_SDL_DefButton);
    2.45  			return;
    2.46  		}
    2.47  
    2.48  		if (aMessageBoxData->numbuttons <= 0)
    2.49  		{
    2.50 -			AddButton(BE_SDL_DefButton);
    2.51 +			AddButton(HAIKU_SDL_DefButton);
    2.52  		}
    2.53  		else
    2.54  		{
    2.55 @@ -155,9 +155,9 @@
    2.56  		}
    2.57  
    2.58  		(aMessageBoxData->title != NULL) ?
    2.59 -			SetTitle(aMessageBoxData->title) : SetTitle(BE_SDL_DefTitle);
    2.60 +			SetTitle(aMessageBoxData->title) : SetTitle(HAIKU_SDL_DefTitle);
    2.61  		(aMessageBoxData->message != NULL) ?
    2.62 -			SetMessageText(aMessageBoxData->message) : SetMessageText(BE_SDL_DefMessage);
    2.63 +			SetMessageText(aMessageBoxData->message) : SetMessageText(HAIKU_SDL_DefMessage);
    2.64  
    2.65  		SetType(ConvertMessageBoxType(static_cast<SDL_MessageBoxFlags>(aMessageBoxData->flags)));
    2.66  	}
    2.67 @@ -274,7 +274,7 @@
    2.68  			fButtons.push_back(&aButtons[i]);
    2.69  		}
    2.70  
    2.71 -		std::sort(fButtons.begin(), fButtons.end(), &BE_SDL_MessageBox::SortButtonsPredicate);
    2.72 +		std::sort(fButtons.begin(), fButtons.end(), &HAIKU_SDL_MessageBox::SortButtonsPredicate);
    2.73  
    2.74  		size_t countButtons = fButtons.size();
    2.75  		for (size_t i = 0; i < countButtons; ++i)
    2.76 @@ -304,14 +304,14 @@
    2.77  
    2.78  public:
    2.79  	explicit
    2.80 -	BE_SDL_MessageBox(const SDL_MessageBoxData *aMessageBoxData)
    2.81 +	HAIKU_SDL_MessageBox(const SDL_MessageBoxData *aMessageBoxData)
    2.82  		: BAlert(NULL, NULL, NULL, NULL, NULL, B_WIDTH_FROM_LABEL, B_WARNING_ALERT),
    2.83  		  fComputedMessageBoxWidth(0.0f),
    2.84  		  fCloseButton(G_CLOSE_BUTTON_ID), fDefaultButton(G_DEFAULT_BUTTON_ID),
    2.85  		  fCustomColorScheme(false), fThereIsLongLine(false),
    2.86 -		  BE_SDL_DefTitle("SDL2 MessageBox"),
    2.87 -		  BE_SDL_DefMessage("Some information has been lost."),
    2.88 -		  BE_SDL_DefButton("OK")
    2.89 +		  HAIKU_SDL_DefTitle("SDL2 MessageBox"),
    2.90 +		  HAIKU_SDL_DefMessage("Some information has been lost."),
    2.91 +		  HAIKU_SDL_DefButton("OK")
    2.92  	{
    2.93  		// MessageBox settings.
    2.94  		// We need a title to display it.
    2.95 @@ -333,7 +333,7 @@
    2.96  	}
    2.97  
    2.98  	virtual
    2.99 -	~BE_SDL_MessageBox(void)
   2.100 +	~HAIKU_SDL_MessageBox(void)
   2.101  	{
   2.102  		fButtons.clear();
   2.103  	}
   2.104 @@ -365,7 +365,7 @@
   2.105  #endif
   2.106  
   2.107  int
   2.108 -BE_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
   2.109 +HAIKU_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
   2.110  {
   2.111  	// Initialize button by closed or error value first.
   2.112  	*buttonid = G_CLOSE_BUTTON_ID;
   2.113 @@ -384,10 +384,10 @@
   2.114  		}
   2.115  	}
   2.116  
   2.117 -	BE_SDL_MessageBox *SDL_MessageBox = new(std::nothrow) BE_SDL_MessageBox(messageboxdata);
   2.118 +	HAIKU_SDL_MessageBox *SDL_MessageBox = new(std::nothrow) HAIKU_SDL_MessageBox(messageboxdata);
   2.119  	if (SDL_MessageBox == NULL)
   2.120  	{
   2.121 -		return SDL_SetError("Cannot create the BE_SDL_MessageBox (BAlert inheritor) object. Lack of memory?");
   2.122 +		return SDL_SetError("Cannot create the HAIKU_SDL_MessageBox (BAlert inheritor) object. Lack of memory?");
   2.123  	}
   2.124  	const int closeButton = SDL_MessageBox->GetCloseButtonId();
   2.125  	int pushedButton = SDL_MessageBox->Go();
     3.1 --- a/src/video/haiku/SDL_bmessagebox.h	Mon Nov 11 22:23:33 2019 -0500
     3.2 +++ b/src/video/haiku/SDL_bmessagebox.h	Tue Nov 12 17:24:37 2019 -0500
     3.3 @@ -1,7 +1,7 @@
     3.4  /*
     3.5    Simple DirectMedia Layer
     3.6 -  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
     3.7 -  Copyright (C) 2018 EXL <exlmotodev@gmail.com>
     3.8 +  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
     3.9 +  Copyright (C) 2018-2019 EXL <exlmotodev@gmail.com>
    3.10  
    3.11    This software is provided 'as-is', without any express or implied
    3.12    warranty.  In no event will the authors be held liable for any damages
    3.13 @@ -32,7 +32,7 @@
    3.14  #endif
    3.15  
    3.16  extern int
    3.17 -BE_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
    3.18 +HAIKU_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
    3.19  
    3.20  #ifdef __cplusplus
    3.21  }