haiku: Rename BE_* entities to HAIKU_* In favor Bugzilla #2349. Update copyright years to 2019. Partially fixes Bugzilla #4442.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index e34c6d4..7cabee3 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -3947,7 +3947,7 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
#if SDL_VIDEO_DRIVER_HAIKU
if (retval == -1 &&
SDL_MessageboxValidForDriver(messageboxdata, SDL_SYSWM_HAIKU) &&
- BE_ShowMessageBox(messageboxdata, buttonid) == 0) {
+ HAIKU_ShowMessageBox(messageboxdata, buttonid) == 0) {
retval = 0;
}
#endif
diff --git a/src/video/haiku/SDL_bmessagebox.cc b/src/video/haiku/SDL_bmessagebox.cc
index 9b9fe14..f3ea636 100644
--- a/src/video/haiku/SDL_bmessagebox.cc
+++ b/src/video/haiku/SDL_bmessagebox.cc
@@ -1,7 +1,7 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
- Copyright (C) 2018 EXL <exlmotodev@gmail.com>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 2018-2019 EXL <exlmotodev@gmail.com>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -54,7 +54,7 @@ enum
G_MAX_STRING_LENGTH_BYTES = 120
};
-class BE_SDL_MessageBox : public BAlert
+class HAIKU_SDL_MessageBox : public BAlert
{
float fComputedMessageBoxWidth;
@@ -68,9 +68,9 @@ class BE_SDL_MessageBox : public BAlert
rgb_color fTextColor;
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;
@@ -133,15 +133,15 @@ class BE_SDL_MessageBox : public BAlert
{
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;
}
if (aMessageBoxData->numbuttons <= 0)
{
- AddButton(BE_SDL_DefButton);
+ AddButton(HAIKU_SDL_DefButton);
}
else
{
@@ -155,9 +155,9 @@ class BE_SDL_MessageBox : public BAlert
}
(aMessageBoxData->title != NULL) ?
- SetTitle(aMessageBoxData->title) : SetTitle(BE_SDL_DefTitle);
+ SetTitle(aMessageBoxData->title) : SetTitle(HAIKU_SDL_DefTitle);
(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)));
}
@@ -274,7 +274,7 @@ class BE_SDL_MessageBox : public BAlert
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();
for (size_t i = 0; i < countButtons; ++i)
@@ -304,14 +304,14 @@ class BE_SDL_MessageBox : public BAlert
public:
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),
fComputedMessageBoxWidth(0.0f),
fCloseButton(G_CLOSE_BUTTON_ID), fDefaultButton(G_DEFAULT_BUTTON_ID),
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.
// We need a title to display it.
@@ -333,7 +333,7 @@ public:
}
virtual
- ~BE_SDL_MessageBox(void)
+ ~HAIKU_SDL_MessageBox(void)
{
fButtons.clear();
}
@@ -365,7 +365,7 @@ extern "C" {
#endif
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.
*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)
{
- 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();
int pushedButton = SDL_MessageBox->Go();
diff --git a/src/video/haiku/SDL_bmessagebox.h b/src/video/haiku/SDL_bmessagebox.h
index 4f35cda..e307fde 100644
--- a/src/video/haiku/SDL_bmessagebox.h
+++ b/src/video/haiku/SDL_bmessagebox.h
@@ -1,7 +1,7 @@
/*
Simple DirectMedia Layer
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
- Copyright (C) 2018 EXL <exlmotodev@gmail.com>
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
+ Copyright (C) 2018-2019 EXL <exlmotodev@gmail.com>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -32,7 +32,7 @@ extern "C" {
#endif
extern int
-BE_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
+HAIKU_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
#ifdef __cplusplus
}