MainPage.xaml.h 2.88 KB
Newer Older
Nicolas Jager's avatar
Nicolas Jager committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#pragma once
/**************************************************************************
* Copyright (C) 2016 by Savoir-faire Linux                                *
* Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com>              *
*                                                                         *
* This program is free software; you can redistribute it and/or modify    *
* it under the terms of the GNU General Public License as published by    *
* the Free Software Foundation; either version 3 of the License, or       *
* (at your option) any later version.                                     *
*                                                                         *
* This program is distributed in the hope that it will be useful,         *
* but WITHOUT ANY WARRANTY; without even the implied warranty of          *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
* GNU General Public License for more details.                            *
*                                                                         *
* You should have received a copy of the GNU General Public License       *
* along with this program.  If not, see <http://www.gnu.org/licenses/>.   *
**************************************************************************/
#include "MainPage.g.h"

Nicolas Jager's avatar
Nicolas Jager committed
21
using namespace Windows::UI::Xaml::Controls;
Nicolas Jager's avatar
Nicolas Jager committed
22
using namespace Windows::UI::Xaml::Input;
23
using namespace Windows::Foundation;
Nicolas Jager's avatar
Nicolas Jager committed
24 25 26

namespace RingClientUWP
{
Nicolas Jager's avatar
Nicolas Jager committed
27

Nicolas Jager's avatar
Nicolas Jager committed
28 29 30 31 32 33
namespace Views {
}
public ref class MainPage sealed
{
public:
    MainPage();
34 35 36 37
    void showLoadingOverlay(bool load, bool modal);
    void hideLoadingOverlay();

    property bool isLoading;
Nicolas Jager's avatar
Nicolas Jager committed
38 39

protected:
40
    virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
Nicolas Jager's avatar
Nicolas Jager committed
41
    virtual void OnKeyDown(KeyRoutedEventArgs^ e) override;
42 43 44 45 46

    void PositionImage();
    void PositionRing();
    void OnResize(Platform::Object^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ e);

Nicolas Jager's avatar
Nicolas Jager committed
47
private:
atraczyk's avatar
atraczyk committed
48 49 50 51
    // event handlers
    void Application_Suspending(Object^, Windows::ApplicationModel::SuspendingEventArgs^ e);
    void Application_VisibilityChanged(Object^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ e);

52 53 54 55 56
    // Multi-monitor, DPI, scale factor change, and window resize detection
    void DisplayProperties_DpiChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
    Windows::Foundation::EventRegistrationToken dpiChangedtoken;
    Rect bounds;

Nicolas Jager's avatar
Nicolas Jager committed
57
    void _toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
Nicolas Jager's avatar
Nicolas Jager committed
58
    void showFrame(Windows::UI::Xaml::Controls::Frame^ frame);
Nicolas Jager's avatar
Nicolas Jager committed
59 60 61 62
    void OnsummonMessageTextPage();
    void OnsummonWelcomePage();
    void OnsummonVideoPage();
    void OnpressHangUpCall();
63
    void OnstateChange(Platform::String ^callId, CallStatus state, int code);
Nicolas Jager's avatar
Nicolas Jager committed
64
};
atraczyk's avatar
atraczyk committed
65
}