blob: 428c5395714f21a321f32671b387d6e0cd98e223 [file] [log] [blame]
Nicolas Jager998fbd72016-08-08 11:41:28 -04001#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 Jager8a85e1f2016-08-15 15:11:06 -040021using namespace Windows::UI::Xaml::Controls;
Nicolas Jager998fbd72016-08-08 11:41:28 -040022using namespace Windows::UI::Xaml::Input;
atraczyk1ddcb5a2016-09-07 16:18:30 -040023using namespace Windows::Foundation;
Nicolas Jager998fbd72016-08-08 11:41:28 -040024
25namespace RingClientUWP
26{
Nicolas Jagerc551c362016-10-01 19:24:50 -040027
Nicolas Jager998fbd72016-08-08 11:41:28 -040028namespace Views {
29}
30public ref class MainPage sealed
31{
32public:
33 MainPage();
atraczyk1ddcb5a2016-09-07 16:18:30 -040034 void showLoadingOverlay(bool load, bool modal);
35 void hideLoadingOverlay();
36
37 property bool isLoading;
Nicolas Jager998fbd72016-08-08 11:41:28 -040038
39protected:
atraczyk61b28422016-08-24 09:25:59 -040040 virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
Nicolas Jager998fbd72016-08-08 11:41:28 -040041 virtual void OnKeyDown(KeyRoutedEventArgs^ e) override;
atraczyk1ddcb5a2016-09-07 16:18:30 -040042
43 void PositionImage();
44 void PositionRing();
45 void OnResize(Platform::Object^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ e);
46
Nicolas Jager15861202016-08-12 11:13:05 -040047private:
atraczyk14ba30c2016-09-22 18:31:59 -040048 // event handlers
49 void Application_Suspending(Object^, Windows::ApplicationModel::SuspendingEventArgs^ e);
50 void Application_VisibilityChanged(Object^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ e);
51
atraczyk1ddcb5a2016-09-07 16:18:30 -040052 // Multi-monitor, DPI, scale factor change, and window resize detection
53 void DisplayProperties_DpiChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
54 Windows::Foundation::EventRegistrationToken dpiChangedtoken;
55 Rect bounds;
56
Nicolas Jager15861202016-08-12 11:13:05 -040057 void _toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
Nicolas Jager8a85e1f2016-08-15 15:11:06 -040058 void showFrame(Windows::UI::Xaml::Controls::Frame^ frame);
Nicolas Jagerc551c362016-10-01 19:24:50 -040059 void OnsummonMessageTextPage();
60 void OnsummonWelcomePage();
61 void OnsummonVideoPage();
62 void OnpressHangUpCall();
Nicolas Jager083b3ae2016-10-04 08:46:19 -040063 void OnstateChange(Platform::String ^callId, CallStatus state, int code);
Nicolas Jager998fbd72016-08-08 11:41:28 -040064};
atraczyk14ba30c2016-09-22 18:31:59 -040065}