Browse Source

haiku: Rename BE_* entities to HAIKU_*
In favor Bugzilla #2349.
Update copyright years to 2019.

Partially fixes Bugzilla #4442.

EXL 5 years ago
parent
commit
b44fe0f838
3 changed files with 25 additions and 25 deletions
  1. 1 1
      src/video/SDL_video.c
  2. 21 21
      src/video/haiku/SDL_bmessagebox.cc
  3. 3 3
      src/video/haiku/SDL_bmessagebox.h

+ 1 - 1
src/video/SDL_video.c

@@ -3947,7 +3947,7 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
 #if SDL_VIDEO_DRIVER_HAIKU
 #if SDL_VIDEO_DRIVER_HAIKU
     if (retval == -1 &&
     if (retval == -1 &&
         SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_HAIKU) &&
         SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_HAIKU) &&
-        BE_ShowMessageBox(messageboxdata, buttonid) == 0) {
+        HAIKU_ShowMessageBox(messageboxdata, buttonid) == 0) {
         retval = 0;
         retval = 0;
     }
     }
 #endif
 #endif

+ 21 - 21
src/video/haiku/SDL_bmessagebox.cc

@@ -1,7 +1,7 @@
 /*
 /*
   Simple DirectMedia Layer
   Simple DirectMedia Layer
-  Copyright (C) 1997-2018 Sam Lantinga <[email protected]>
-  Copyright (C) 2018 EXL <[email protected]>
+  Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
+  Copyright (C) 2018-2019 EXL <[email protected]>
 
 
   This software is provided 'as-is', without any express or implied
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
   warranty.  In no event will the authors be held liable for any damages
@@ -54,7 +54,7 @@ enum
 	G_MAX_STRING_LENGTH_BYTES = 120
 	G_MAX_STRING_LENGTH_BYTES = 120
 };
 };
 
 
-class BE_SDL_MessageBox : public BAlert
+class HAIKU_SDL_MessageBox : public BAlert
 {
 {
 	float fComputedMessageBoxWidth;
 	float fComputedMessageBoxWidth;
 
 
@@ -68,9 +68,9 @@ class BE_SDL_MessageBox : public BAlert
 	rgb_color fTextColor;
 	rgb_color fTextColor;
 
 
 	const char *fTitle;
 	const char *fTitle;
-	const char *BE_SDL_DefTitle;
-	const char *BE_SDL_DefMessage;
-	const char *BE_SDL_DefButton;
+	const char *HAIKU_SDL_DefTitle;
+	const char *HAIKU_SDL_DefMessage;
+	const char *HAIKU_SDL_DefButton;
 
 
 	std::vector<const SDL_MessageBoxButtonData *> fButtons;
 	std::vector<const SDL_MessageBoxButtonData *> fButtons;
 
 
@@ -133,15 +133,15 @@ class BE_SDL_MessageBox : public BAlert
 	{
 	{
 		if (aMessageBoxData == NULL)
 		if (aMessageBoxData == NULL)
 		{
 		{
-			SetTitle(BE_SDL_DefTitle);
-			SetMessageText(BE_SDL_DefMessage);
-			AddButton(BE_SDL_DefButton);
+			SetTitle(HAIKU_SDL_DefTitle);
+			SetMessageText(HAIKU_SDL_DefMessage);
+			AddButton(HAIKU_SDL_DefButton);
 			return;
 			return;
 		}
 		}
 
 
 		if (aMessageBoxData->numbuttons <= 0)
 		if (aMessageBoxData->numbuttons <= 0)
 		{
 		{
-			AddButton(BE_SDL_DefButton);
+			AddButton(HAIKU_SDL_DefButton);
 		}
 		}
 		else
 		else
 		{
 		{
@@ -155,9 +155,9 @@ class BE_SDL_MessageBox : public BAlert
 		}
 		}
 
 
 		(aMessageBoxData->title != NULL) ?
 		(aMessageBoxData->title != NULL) ?
-			SetTitle(aMessageBoxData->title) : SetTitle(BE_SDL_DefTitle);
+			SetTitle(aMessageBoxData->title) : SetTitle(HAIKU_SDL_DefTitle);
 		(aMessageBoxData->message != NULL) ?
 		(aMessageBoxData->message != NULL) ?
-			SetMessageText(aMessageBoxData->message) : SetMessageText(BE_SDL_DefMessage);
+			SetMessageText(aMessageBoxData->message) : SetMessageText(HAIKU_SDL_DefMessage);
 
 
 		SetType(ConvertMessageBoxType(static_cast<SDL_MessageBoxFlags>(aMessageBoxData->flags)));
 		SetType(ConvertMessageBoxType(static_cast<SDL_MessageBoxFlags>(aMessageBoxData->flags)));
 	}
 	}
@@ -274,7 +274,7 @@ class BE_SDL_MessageBox : public BAlert
 			fButtons.push_back(&aButtons[i]);
 			fButtons.push_back(&aButtons[i]);
 		}
 		}
 
 
-		std::sort(fButtons.begin(), fButtons.end(), &BE_SDL_MessageBox::SortButtonsPredicate);
+		std::sort(fButtons.begin(), fButtons.end(), &HAIKU_SDL_MessageBox::SortButtonsPredicate);
 
 
 		size_t countButtons = fButtons.size();
 		size_t countButtons = fButtons.size();
 		for (size_t i = 0; i < countButtons; ++i)
 		for (size_t i = 0; i < countButtons; ++i)
@@ -304,14 +304,14 @@ class BE_SDL_MessageBox : public BAlert
 
 
 public:
 public:
 	explicit
 	explicit
-	BE_SDL_MessageBox(const SDL_MessageBoxData *aMessageBoxData)
+	HAIKU_SDL_MessageBox(const SDL_MessageBoxData *aMessageBoxData)
 		: BAlert(NULL, NULL, NULL, NULL, NULL, B_WIDTH_FROM_LABEL, B_WARNING_ALERT),
 		: BAlert(NULL, NULL, NULL, NULL, NULL, B_WIDTH_FROM_LABEL, B_WARNING_ALERT),
 		  fComputedMessageBoxWidth(0.0f),
 		  fComputedMessageBoxWidth(0.0f),
 		  fCloseButton(G_CLOSE_BUTTON_ID), fDefaultButton(G_DEFAULT_BUTTON_ID),
 		  fCloseButton(G_CLOSE_BUTTON_ID), fDefaultButton(G_DEFAULT_BUTTON_ID),
 		  fCustomColorScheme(false), fThereIsLongLine(false),
 		  fCustomColorScheme(false), fThereIsLongLine(false),
-		  BE_SDL_DefTitle("SDL2 MessageBox"),
-		  BE_SDL_DefMessage("Some information has been lost."),
-		  BE_SDL_DefButton("OK")
+		  HAIKU_SDL_DefTitle("SDL2 MessageBox"),
+		  HAIKU_SDL_DefMessage("Some information has been lost."),
+		  HAIKU_SDL_DefButton("OK")
 	{
 	{
 		// MessageBox settings.
 		// MessageBox settings.
 		// We need a title to display it.
 		// We need a title to display it.
@@ -333,7 +333,7 @@ public:
 	}
 	}
 
 
 	virtual
 	virtual
-	~BE_SDL_MessageBox(void)
+	~HAIKU_SDL_MessageBox(void)
 	{
 	{
 		fButtons.clear();
 		fButtons.clear();
 	}
 	}
@@ -365,7 +365,7 @@ extern "C" {
 #endif
 #endif
 
 
 int
 int
-BE_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
+HAIKU_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
 {
 {
 	// Initialize button by closed or error value first.
 	// Initialize button by closed or error value first.
 	*buttonid = G_CLOSE_BUTTON_ID;
 	*buttonid = G_CLOSE_BUTTON_ID;
@@ -384,10 +384,10 @@ BE_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
 		}
 		}
 	}
 	}
 
 
-	BE_SDL_MessageBox *SDL_MessageBox = new(std::nothrow) BE_SDL_MessageBox(messageboxdata);
+	HAIKU_SDL_MessageBox *SDL_MessageBox = new(std::nothrow) HAIKU_SDL_MessageBox(messageboxdata);
 	if (SDL_MessageBox == NULL)
 	if (SDL_MessageBox == NULL)
 	{
 	{
-		return SDL_SetError("Cannot create the BE_SDL_MessageBox (BAlert inheritor) object. Lack of memory?");
+		return SDL_SetError("Cannot create the HAIKU_SDL_MessageBox (BAlert inheritor) object. Lack of memory?");
 	}
 	}
 	const int closeButton = SDL_MessageBox->GetCloseButtonId();
 	const int closeButton = SDL_MessageBox->GetCloseButtonId();
 	int pushedButton = SDL_MessageBox->Go();
 	int pushedButton = SDL_MessageBox->Go();

+ 3 - 3
src/video/haiku/SDL_bmessagebox.h

@@ -1,7 +1,7 @@
 /*
 /*
   Simple DirectMedia Layer
   Simple DirectMedia Layer
-  Copyright (C) 1997-2018 Sam Lantinga <[email protected]>
-  Copyright (C) 2018 EXL <[email protected]>
+  Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
+  Copyright (C) 2018-2019 EXL <[email protected]>
 
 
   This software is provided 'as-is', without any express or implied
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
   warranty.  In no event will the authors be held liable for any damages
@@ -32,7 +32,7 @@ extern "C" {
 #endif
 #endif
 
 
 extern int
 extern int
-BE_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
+HAIKU_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }