michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * vim: sw=2 ts=8 et : michael@0: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_WidgetUtils_h michael@0: #define mozilla_WidgetUtils_h michael@0: michael@0: #include "nsRect.h" michael@0: #include "mozilla/gfx/Matrix.h" michael@0: michael@0: namespace mozilla { michael@0: michael@0: // NB: these must match up with pseudo-enum in nsIScreen.idl. michael@0: enum ScreenRotation { michael@0: ROTATION_0 = 0, michael@0: ROTATION_90, michael@0: ROTATION_180, michael@0: ROTATION_270, michael@0: michael@0: ROTATION_COUNT michael@0: }; michael@0: michael@0: gfx::Matrix ComputeTransformForRotation(const nsIntRect& aBounds, michael@0: ScreenRotation aRotation); michael@0: michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_WidgetUtils_h