Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 1 | #pragma once
|
| 2 | /**************************************************************************
|
| 3 | * Copyright (C) 2016 by Savoir-faire Linux *
|
| 4 | * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
|
| 5 | * *
|
| 6 | * This program is free software; you can redistribute it and/or modify *
|
| 7 | * it under the terms of the GNU General Public License as published by *
|
| 8 | * the Free Software Foundation; either version 3 of the License, or *
|
| 9 | * (at your option) any later version. *
|
| 10 | * *
|
| 11 | * This program is distributed in the hope that it will be useful, *
|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
| 14 | * GNU General Public License for more details. *
|
| 15 | * *
|
| 16 | * You should have received a copy of the GNU General Public License *
|
| 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
| 18 | **************************************************************************/
|
| 19 | #include "MainPage.g.h"
|
| 20 |
|
Nicolas Jager | 8a85e1f | 2016-08-15 15:11:06 -0400 | [diff] [blame] | 21 | using namespace Windows::UI::Xaml::Controls;
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 22 | using namespace Windows::UI::Xaml::Input;
|
atraczyk | 1ddcb5a | 2016-09-07 16:18:30 -0400 | [diff] [blame] | 23 | using namespace Windows::Foundation;
|
atraczyk | 6290cc3 | 2016-10-07 08:47:15 -0400 | [diff] [blame] | 24 | using namespace Windows::ApplicationModel::ExtendedExecution;
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 25 |
|
| 26 | namespace RingClientUWP
|
| 27 | {
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 28 |
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 29 | namespace Views {
|
| 30 | }
|
| 31 | public ref class MainPage sealed
|
| 32 | {
|
| 33 | public:
|
| 34 | MainPage();
|
atraczyk | 1ddcb5a | 2016-09-07 16:18:30 -0400 | [diff] [blame] | 35 | void showLoadingOverlay(bool load, bool modal);
|
| 36 | void hideLoadingOverlay();
|
| 37 |
|
| 38 | property bool isLoading;
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 39 |
|
| 40 | protected:
|
atraczyk | 61b2842 | 2016-08-24 09:25:59 -0400 | [diff] [blame] | 41 | virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 42 | virtual void OnKeyDown(KeyRoutedEventArgs^ e) override;
|
atraczyk | 1ddcb5a | 2016-09-07 16:18:30 -0400 | [diff] [blame] | 43 |
|
| 44 | void PositionImage();
|
| 45 | void PositionRing();
|
| 46 | void OnResize(Platform::Object^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ e);
|
| 47 |
|
Nicolas Jager | 1586120 | 2016-08-12 11:13:05 -0400 | [diff] [blame] | 48 | private:
|
atraczyk | 6290cc3 | 2016-10-07 08:47:15 -0400 | [diff] [blame] | 49 | // Visibility and suspension
|
atraczyk | 14ba30c | 2016-09-22 18:31:59 -0400 | [diff] [blame] | 50 | void Application_Suspending(Object^, Windows::ApplicationModel::SuspendingEventArgs^ e);
|
atraczyk | 6290cc3 | 2016-10-07 08:47:15 -0400 | [diff] [blame] | 51 | EventRegistrationToken applicationSuspendingEventToken;
|
atraczyk | 14ba30c | 2016-09-22 18:31:59 -0400 | [diff] [blame] | 52 | void Application_VisibilityChanged(Object^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ e);
|
atraczyk | 6290cc3 | 2016-10-07 08:47:15 -0400 | [diff] [blame] | 53 | EventRegistrationToken visibilityChangedEventToken;
|
| 54 | void Application_Resuming(Object^ sender, Object^ args);
|
| 55 | EventRegistrationToken applicationResumingEventToken;
|
| 56 | //void Application_Closing(Object^ sender, Windows::UI::Core::^ e);
|
| 57 | //EventRegistrationToken applicationClosingEventToken;
|
| 58 |
|
| 59 | ExtendedExecutionSession^ session;
|
| 60 | void SessionRevoked(Object^ sender, ExtendedExecutionRevokedEventArgs^ args);
|
| 61 | EventRegistrationToken sessionRevokedToken;
|
| 62 | task<void> BeginExtendedExecution();
|
| 63 | void ClearExtendedExecution();
|
atraczyk | 14ba30c | 2016-09-22 18:31:59 -0400 | [diff] [blame] | 64 |
|
atraczyk | 1ddcb5a | 2016-09-07 16:18:30 -0400 | [diff] [blame] | 65 | // Multi-monitor, DPI, scale factor change, and window resize detection
|
| 66 | void DisplayProperties_DpiChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
|
atraczyk | 6290cc3 | 2016-10-07 08:47:15 -0400 | [diff] [blame] | 67 | EventRegistrationToken dpiChangedtoken;
|
atraczyk | 1ddcb5a | 2016-09-07 16:18:30 -0400 | [diff] [blame] | 68 | Rect bounds;
|
| 69 |
|
Nicolas Jager | 1586120 | 2016-08-12 11:13:05 -0400 | [diff] [blame] | 70 | void _toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
Nicolas Jager | 8a85e1f | 2016-08-15 15:11:06 -0400 | [diff] [blame] | 71 | void showFrame(Windows::UI::Xaml::Controls::Frame^ frame);
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 72 | void OnsummonMessageTextPage();
|
| 73 | void OnsummonWelcomePage();
|
| 74 | void OnsummonVideoPage();
|
| 75 | void OnpressHangUpCall();
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 76 | void OnstateChange(Platform::String ^callId, CallStatus state, int code);
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 77 | };
|
atraczyk | 14ba30c | 2016-09-22 18:31:59 -0400 | [diff] [blame] | 78 | }
|