blob: d97fd59e7bcd4eb15669c02ee5a0cd55e311ecf2 [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:
atraczyk1ddcb5a2016-09-07 16:18:30 -040048 // Multi-monitor, DPI, scale factor change, and window resize detection
49 void DisplayProperties_DpiChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
50 Windows::Foundation::EventRegistrationToken dpiChangedtoken;
51 Rect bounds;
52
Nicolas Jager15861202016-08-12 11:13:05 -040053 void _toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
Nicolas Jager8a85e1f2016-08-15 15:11:06 -040054 void showFrame(Windows::UI::Xaml::Controls::Frame^ frame);
Nicolas Jagerc551c362016-10-01 19:24:50 -040055 void OnsummonMessageTextPage();
56 void OnsummonWelcomePage();
57 void OnsummonVideoPage();
58 void OnpressHangUpCall();
59 void OnstateChange(Platform::String ^callId, RingClientUWP::CallStatus state, int code);
Nicolas Jager998fbd72016-08-08 11:41:28 -040060};
61}