atraczyk | 6cae7a6 | 2016-11-30 14:56:31 -0500 | [diff] [blame] | 1 | /**************************************************************************
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 2 | * Copyright (C) 2016 by Savoir-faire Linux *
|
| 3 | * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
|
atraczyk | 6cae7a6 | 2016-11-30 14:56:31 -0500 | [diff] [blame] | 4 | * Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.com> *
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 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 | **************************************************************************/
|
atraczyk | 6cae7a6 | 2016-11-30 14:56:31 -0500 | [diff] [blame] | 19 | #pragma once
|
| 20 |
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 21 | #include "MainPage.g.h"
|
| 22 |
|
Nicolas Jager | 8a85e1f | 2016-08-15 15:11:06 -0400 | [diff] [blame] | 23 | using namespace Windows::UI::Xaml::Controls;
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 24 | using namespace Windows::UI::Xaml::Input;
|
atraczyk | 1ddcb5a | 2016-09-07 16:18:30 -0400 | [diff] [blame] | 25 | using namespace Windows::Foundation;
|
atraczyk | 6290cc3 | 2016-10-07 08:47:15 -0400 | [diff] [blame] | 26 | using namespace Windows::ApplicationModel::ExtendedExecution;
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 27 |
|
| 28 | namespace RingClientUWP
|
| 29 | {
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 30 |
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 31 | namespace Views {
|
| 32 | }
|
| 33 | public ref class MainPage sealed
|
| 34 | {
|
| 35 | public:
|
| 36 | MainPage();
|
atraczyk | 1ddcb5a | 2016-09-07 16:18:30 -0400 | [diff] [blame] | 37 | void showLoadingOverlay(bool load, bool modal);
|
| 38 | void hideLoadingOverlay();
|
| 39 |
|
| 40 | property bool isLoading;
|
atraczyk | 6cae7a6 | 2016-11-30 14:56:31 -0500 | [diff] [blame] | 41 | property bool isModal;
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 42 |
|
| 43 | protected:
|
atraczyk | 61b2842 | 2016-08-24 09:25:59 -0400 | [diff] [blame] | 44 | virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 45 | virtual void OnKeyDown(KeyRoutedEventArgs^ e) override;
|
atraczyk | 1ddcb5a | 2016-09-07 16:18:30 -0400 | [diff] [blame] | 46 |
|
atraczyk | 1ddcb5a | 2016-09-07 16:18:30 -0400 | [diff] [blame] | 47 | void OnResize(Platform::Object^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ e);
|
| 48 |
|
Nicolas Jager | 1586120 | 2016-08-12 11:13:05 -0400 | [diff] [blame] | 49 | private:
|
atraczyk | 6290cc3 | 2016-10-07 08:47:15 -0400 | [diff] [blame] | 50 | // Visibility and suspension
|
atraczyk | 14ba30c | 2016-09-22 18:31:59 -0400 | [diff] [blame] | 51 | void Application_Suspending(Object^, Windows::ApplicationModel::SuspendingEventArgs^ e);
|
atraczyk | 6290cc3 | 2016-10-07 08:47:15 -0400 | [diff] [blame] | 52 | EventRegistrationToken applicationSuspendingEventToken;
|
atraczyk | 14ba30c | 2016-09-22 18:31:59 -0400 | [diff] [blame] | 53 | void Application_VisibilityChanged(Object^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ e);
|
atraczyk | 6290cc3 | 2016-10-07 08:47:15 -0400 | [diff] [blame] | 54 | EventRegistrationToken visibilityChangedEventToken;
|
| 55 | void Application_Resuming(Object^ sender, Object^ args);
|
| 56 | EventRegistrationToken applicationResumingEventToken;
|
atraczyk | 6290cc3 | 2016-10-07 08:47:15 -0400 | [diff] [blame] | 57 |
|
atraczyk | 1ddcb5a | 2016-09-07 16:18:30 -0400 | [diff] [blame] | 58 | // Multi-monitor, DPI, scale factor change, and window resize detection
|
| 59 | void DisplayProperties_DpiChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
|
atraczyk | 6290cc3 | 2016-10-07 08:47:15 -0400 | [diff] [blame] | 60 | EventRegistrationToken dpiChangedtoken;
|
atraczyk | 1ddcb5a | 2016-09-07 16:18:30 -0400 | [diff] [blame] | 61 | Rect bounds;
|
Nicolas Jager | c680e4f | 2016-12-06 16:02:23 -0500 | [diff] [blame^] | 62 | bool editionMode = false;
|
atraczyk | 1ddcb5a | 2016-09-07 16:18:30 -0400 | [diff] [blame] | 63 |
|
Nicolas Jager | 1586120 | 2016-08-12 11:13:05 -0400 | [diff] [blame] | 64 | void _toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
Nicolas Jager | 8a85e1f | 2016-08-15 15:11:06 -0400 | [diff] [blame] | 65 | void showFrame(Windows::UI::Xaml::Controls::Frame^ frame);
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 66 | void OnsummonMessageTextPage();
|
| 67 | void OnsummonWelcomePage();
|
atraczyk | acc4c41 | 2016-11-10 22:56:52 -0500 | [diff] [blame] | 68 | void OnsummonPreviewPage();
|
| 69 | void OnhidePreviewPage();
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 70 | void OnsummonVideoPage();
|
| 71 | void OnpressHangUpCall();
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 72 | void OnstateChange(Platform::String ^callId, CallStatus state, int code);
|
Nicolas Jager | e72856b | 2016-10-30 15:06:17 -0400 | [diff] [blame] | 73 | void OncloseMessageTextPage();
|
Nicolas Jager | 026a84b | 2016-11-28 10:58:22 -0500 | [diff] [blame] | 74 | void OnregistrationStateErrorGeneric(const std::string& accountId);
|
| 75 | void OnregistrationStateRegistered();
|
Nicolas Jager | cba46f7 | 2016-12-02 16:04:50 -0500 | [diff] [blame] | 76 | void OncallPlaced(Platform::String ^callId);
|
Nicolas Jager | c680e4f | 2016-12-06 16:02:23 -0500 | [diff] [blame^] | 77 | void OnnameRegistred(bool status);
|
| 78 | void OnvolatileDetailsChanged(const std::string &accountId, const std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<const std::string, std::string>>> &details);
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 79 | };
|
atraczyk | 14ba30c | 2016-09-22 18:31:59 -0400 | [diff] [blame] | 80 | }
|