diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
commit | cde1174345224d33d6b45b1e3243fa39043223e5 (patch) | |
tree | 6c8db6e0499622d8c7206a11c997eb173ebd478f /indra/newview/llmediactrl.cpp | |
parent | 6f454ad8366ed33bbe199c3fc3ed69e6d3448cec (diff) | |
parent | 35efadf78315f9b351415930dca4fae251ef4dd0 (diff) |
Merge branch 'main' into release/luau-scripting.
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r-- | indra/newview/llmediactrl.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 3c09ad162a..c635ab91c2 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()) { @@ -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; |