/*
 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 */
#ifndef _GLASS_VIEW_
#define _GLASS_VIEW_

#include <jni.h>

#include "FullScreenWindow.h"

class GlassView {
public:
    GlassView(jobject jrefThis);
    virtual ~GlassView();

    BOOL Close();

    BOOL EnterFullScreen(BOOL animate, BOOL keepRatio);
    void ExitFullScreen(BOOL animate);

    inline HWND GetHostHwnd() { return m_hostHwnd; }
    void SetHostHwnd(HWND m_hostHwnd);

    inline jobject GetView() { return m_grefThis; }

    inline BOOL IsInputMethodEventEnabled() { return m_InputMethodEventsEnabled; }
    void EnableInputMethodEvents(BOOL enable);

private:
    jobject m_grefThis;

    BaseWnd* m_fullScreenWindow;

    // The view is a lw object.
    // This HWND represents the embedder of the view
    // (a Glass window, or a FS window, or browser, whatever)
    HWND m_hostHwnd;

    // InputMethod
    BOOL m_InputMethodEventsEnabled;

    void NotifyFullscreen(bool entered);
};

#endif // _GLASS_VIEW_
