mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 891056 - Remove unused code from widget/windows/winrt [r=bbondy]
This commit is contained in:
parent
f4252ed92e
commit
d94a3003c2
@ -12,27 +12,13 @@
|
||||
* implementation of this interface for non-Windows systems, for testing and
|
||||
* development purposes only.
|
||||
*/
|
||||
[scriptable, uuid(c5a654c8-2443-47ce-9322-d150af3ca526)]
|
||||
[scriptable, uuid(fa6750a2-f0fe-411c-af23-1cd6d2fdeceb)]
|
||||
interface nsIWinMetroUtils : nsISupports
|
||||
{
|
||||
/* Fullscreen landscape orientation */
|
||||
const long fullScreenLandscape = 0;
|
||||
/* Larger snapped state */
|
||||
const long filled = 1;
|
||||
/* Smaller snapped state */
|
||||
const long snapped = 2;
|
||||
/* Fullscreen portrait orientation */
|
||||
const long fullScreenPortrait = 3;
|
||||
|
||||
/* return constants for the handPreference property */
|
||||
const long handPreferenceLeft = 0;
|
||||
const long handPreferenceRight = 1;
|
||||
|
||||
/**
|
||||
* Determines the current snapped state.
|
||||
*/
|
||||
readonly attribute long snappedState;
|
||||
|
||||
/**
|
||||
* Determine if the current browser is running in the metro immersive
|
||||
* environment.
|
||||
@ -49,12 +35,6 @@ interface nsIWinMetroUtils : nsISupports
|
||||
*/
|
||||
readonly attribute AString activationURI;
|
||||
|
||||
/**
|
||||
* Attempts to unsnap the application from snapped state to filled state
|
||||
*/
|
||||
void unsnap();
|
||||
|
||||
|
||||
/**
|
||||
* Show the settings flyout
|
||||
*/
|
||||
|
@ -109,7 +109,6 @@ FrameworkView::ActivateView()
|
||||
LogFunction();
|
||||
|
||||
UpdateWidgetSizeAndPosition();
|
||||
MetroUtils::GetViewState(mViewState);
|
||||
|
||||
nsIntRegion region(nsIntRect(0, 0, mWindowBounds.width, mWindowBounds.height));
|
||||
mWidget->Paint(region);
|
||||
@ -386,36 +385,6 @@ FrameworkView::OnWindowClosed(ICoreWindow* aSender, ICoreWindowEventArgs* aArgs)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void
|
||||
FrameworkView::FireViewStateObservers()
|
||||
{
|
||||
ApplicationViewState state;
|
||||
MetroUtils::GetViewState(state);
|
||||
if (state == mViewState) {
|
||||
return;
|
||||
}
|
||||
mViewState = state;
|
||||
nsAutoString name;
|
||||
switch (mViewState) {
|
||||
case ApplicationViewState_FullScreenLandscape:
|
||||
name.AssignLiteral("landscape");
|
||||
break;
|
||||
case ApplicationViewState_Filled:
|
||||
name.AssignLiteral("filled");
|
||||
break;
|
||||
case ApplicationViewState_Snapped:
|
||||
name.AssignLiteral("snapped");
|
||||
break;
|
||||
case ApplicationViewState_FullScreenPortrait:
|
||||
name.AssignLiteral("portrait");
|
||||
break;
|
||||
default:
|
||||
NS_WARNING("Unknown view state");
|
||||
return;
|
||||
};
|
||||
MetroUtils::FireObserver("metro_viewstate_changed", name.get());
|
||||
}
|
||||
|
||||
HRESULT
|
||||
FrameworkView::OnWindowSizeChanged(ICoreWindow* aSender, IWindowSizeChangedEventArgs* aArgs)
|
||||
{
|
||||
@ -431,7 +400,6 @@ FrameworkView::OnWindowSizeChanged(ICoreWindow* aSender, IWindowSizeChangedEvent
|
||||
mWindowBounds = MetroUtils::LogToPhys(logicalBounds);
|
||||
|
||||
UpdateWidgetSizeAndPosition();
|
||||
FireViewStateObservers();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,6 @@ private:
|
||||
static Rect sKeyboardRect;
|
||||
bool mWinVisible;
|
||||
bool mWinActiveState;
|
||||
ApplicationViewState mViewState;
|
||||
};
|
||||
|
||||
} } }
|
||||
|
@ -363,32 +363,6 @@ nsWinMetroUtils::ShowNativeToast(const nsAString &aTitle,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWinMetroUtils::GetSnappedState(int32_t *aSnappedState)
|
||||
{
|
||||
if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop) {
|
||||
NS_WARNING("GetSnappedState can't be called on the desktop.");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
NS_ENSURE_ARG_POINTER(aSnappedState);
|
||||
ApplicationViewState viewState;
|
||||
AssertRetHRESULT(MetroUtils::GetViewState(viewState), NS_ERROR_UNEXPECTED);
|
||||
*aSnappedState = (int32_t) viewState;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWinMetroUtils::Unsnap()
|
||||
{
|
||||
if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop) {
|
||||
NS_WARNING("Unsnap can't be called on the desktop.");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
HRESULT hr = MetroUtils::TryUnsnap();
|
||||
return SUCCEEDED(hr) ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWinMetroUtils::ShowSettingsFlyout()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user