summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r--indra/newview/llmediactrl.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 36ac1bdf97..72fbab406b 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -63,7 +63,7 @@
#include "llfloaterwebcontent.h"
#include "llwindowshade.h"
-extern BOOL gRestoreGL;
+extern bool gRestoreGL;
static LLDefaultChildRegistry::Register<LLMediaCtrl> r("web_browser");
@@ -166,7 +166,7 @@ LLMediaCtrl::~LLMediaCtrl()
////////////////////////////////////////////////////////////////////////////////
//
-void LLMediaCtrl::setBorderVisible( BOOL border_visible )
+void LLMediaCtrl::setBorderVisible( bool border_visible )
{
if ( mBorder )
{
@@ -183,9 +183,9 @@ void LLMediaCtrl::setTakeFocusOnClick( bool take_focus )
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
+bool LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
{
- if (LLPanel::handleHover(x, y, mask)) return TRUE;
+ if (LLPanel::handleHover(x, y, mask)) return true;
convertInputCoords(x, y);
if (mMediaSource)
@@ -201,40 +201,40 @@ BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
handleToolTip(x, y, mask);
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleScrollWheel( S32 x, S32 y, S32 clicks )
+bool LLMediaCtrl::handleScrollWheel( S32 x, S32 y, S32 clicks )
{
- if (LLPanel::handleScrollWheel(x, y, clicks)) return TRUE;
+ if (LLPanel::handleScrollWheel(x, y, clicks)) return true;
if (mMediaSource && mMediaSource->hasMedia())
{
convertInputCoords(x, y);
- mMediaSource->scrollWheel(x, y, 0, clicks, gKeyboard->currentMask(TRUE));
+ mMediaSource->scrollWheel(x, y, 0, clicks, gKeyboard->currentMask(true));
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleScrollHWheel(S32 x, S32 y, S32 clicks)
+bool LLMediaCtrl::handleScrollHWheel(S32 x, S32 y, S32 clicks)
{
- if (LLPanel::handleScrollHWheel(x, y, clicks)) return TRUE;
+ if (LLPanel::handleScrollHWheel(x, y, clicks)) return true;
if (mMediaSource && mMediaSource->hasMedia())
{
convertInputCoords(x, y);
- mMediaSource->scrollWheel(x, y, clicks, 0, gKeyboard->currentMask(TRUE));
+ mMediaSource->scrollWheel(x, y, clicks, 0, gKeyboard->currentMask(true));
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
// virtual
-BOOL LLMediaCtrl::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLMediaCtrl::handleToolTip(S32 x, S32 y, MASK mask)
{
std::string hover_text;
@@ -243,7 +243,7 @@ BOOL LLMediaCtrl::handleToolTip(S32 x, S32 y, MASK mask)
if(hover_text.empty())
{
- return FALSE;
+ return false;
}
else
{
@@ -258,14 +258,14 @@ BOOL LLMediaCtrl::handleToolTip(S32 x, S32 y, MASK mask)
.sticky_rect(sticky_rect_screen));
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask )
+bool LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask )
{
- if (LLPanel::handleMouseUp(x, y, mask)) return TRUE;
+ if (LLPanel::handleMouseUp(x, y, mask)) return true;
convertInputCoords(x, y);
if (mMediaSource)
@@ -275,14 +275,14 @@ BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask )
gFocusMgr.setMouseCapture( NULL );
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleMouseDown( S32 x, S32 y, MASK mask )
+bool LLMediaCtrl::handleMouseDown( S32 x, S32 y, MASK mask )
{
- if (LLPanel::handleMouseDown(x, y, mask)) return TRUE;
+ if (LLPanel::handleMouseDown(x, y, mask)) return true;
convertInputCoords(x, y);
if (mMediaSource)
@@ -292,17 +292,17 @@ BOOL LLMediaCtrl::handleMouseDown( S32 x, S32 y, MASK mask )
if (mTakeFocusOnClick)
{
- setFocus( TRUE );
+ setFocus( true );
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleRightMouseUp( S32 x, S32 y, MASK mask )
+bool LLMediaCtrl::handleRightMouseUp( S32 x, S32 y, MASK mask )
{
- if (LLPanel::handleRightMouseUp(x, y, mask)) return TRUE;
+ if (LLPanel::handleRightMouseUp(x, y, mask)) return true;
convertInputCoords(x, y);
if (mMediaSource)
@@ -320,14 +320,14 @@ BOOL LLMediaCtrl::handleRightMouseUp( S32 x, S32 y, MASK mask )
gFocusMgr.setMouseCapture( NULL );
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
+bool LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
- if (LLPanel::handleRightMouseDown(x, y, mask)) return TRUE;
+ if (LLPanel::handleRightMouseDown(x, y, mask)) return true;
S32 media_x = x, media_y = y;
convertInputCoords(media_x, media_y);
@@ -339,7 +339,7 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
if (mTakeFocusOnClick)
{
- setFocus( TRUE );
+ setFocus( true );
}
auto menu = mContextMenuHandle.get();
@@ -371,14 +371,14 @@ BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
LLMenuGL::showPopup(this, menu, x, y);
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleDoubleClick( S32 x, S32 y, MASK mask )
+bool LLMediaCtrl::handleDoubleClick( S32 x, S32 y, MASK mask )
{
- if (LLPanel::handleDoubleClick(x, y, mask)) return TRUE;
+ if (LLPanel::handleDoubleClick(x, y, mask)) return true;
convertInputCoords(x, y);
if (mMediaSource)
@@ -388,10 +388,10 @@ BOOL LLMediaCtrl::handleDoubleClick( S32 x, S32 y, MASK mask )
if (mTakeFocusOnClick)
{
- setFocus( TRUE );
+ setFocus( true );
}
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////////
@@ -431,11 +431,11 @@ void LLMediaCtrl::onFocusLost()
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::postBuild ()
+bool LLMediaCtrl::postBuild ()
{
setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChanged, this, _2));
- return TRUE;
+ return true;
}
void LLMediaCtrl::onOpenWebInspector()
@@ -446,9 +446,9 @@ void LLMediaCtrl::onOpenWebInspector()
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask )
+bool LLMediaCtrl::handleKeyHere( KEY key, MASK mask )
{
- BOOL result = FALSE;
+ bool result = false;
if (mMediaSource)
{
@@ -463,9 +463,9 @@ BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask )
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask)
+bool LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask)
{
- BOOL result = FALSE;
+ bool result = false;
if (mMediaSource)
{
@@ -480,7 +480,7 @@ BOOL LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask)
////////////////////////////////////////////////////////////////////////////////
//
-void LLMediaCtrl::onVisibilityChange ( BOOL new_visibility )
+void LLMediaCtrl::onVisibilityChange ( bool new_visibility )
{
LL_INFOS() << "visibility changed to " << (new_visibility?"true":"false") << LL_ENDL;
if(mMediaSource)
@@ -491,9 +491,9 @@ void LLMediaCtrl::onVisibilityChange ( BOOL new_visibility )
////////////////////////////////////////////////////////////////////////////////
//
-BOOL LLMediaCtrl::handleUnicodeCharHere(llwchar uni_char)
+bool LLMediaCtrl::handleUnicodeCharHere(llwchar uni_char)
{
- BOOL result = FALSE;
+ bool result = false;
if (mMediaSource)
{
@@ -523,7 +523,7 @@ void LLMediaCtrl::onVisibilityChanged ( const LLSD& new_visibility )
////////////////////////////////////////////////////////////////////////////////
//
-void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )
+void LLMediaCtrl::reshape( S32 width, S32 height, bool called_from_parent )
{
if(!getDecoupleTextureSize())
{
@@ -633,7 +633,7 @@ void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type, bool cl
void LLMediaCtrl::navigateToLocalPage( const std::string& subdir, const std::string& filename_in )
{
std::string filename(gDirUtilp->add(subdir, filename_in));
- std::string expanded_filename = gDirUtilp->findSkinnedFilename("html", filename);
+ std::string expanded_filename = gDirUtilp->findSkinnedFilename(LLDir::HTML, filename);
if (expanded_filename.empty())
{
@@ -782,7 +782,7 @@ void LLMediaCtrl::draw()
if ( gRestoreGL == 1 || mUpdateScrolls)
{
LLRect r = getRect();
- reshape( r.getWidth(), r.getHeight(), FALSE );
+ reshape( r.getWidth(), r.getHeight(), false );
mUpdateScrolls = false;
return;
}
@@ -990,7 +990,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
{
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_SIZE_CHANGED " << LL_ENDL;
LLRect r = getRect();
- reshape( r.getWidth(), r.getHeight(), FALSE );
+ reshape( r.getWidth(), r.getHeight(), false );
};
break;