<commit_before>#ifndef SDLut_Display_hh
#define SDLut_Display_hh

/**
 * \class Display
 * \ingroup Video
 *
 * \brief This class handles the display part of the application
 *
 * This class hides the details of implementation of 2D display and contains a window and a Screenbuffer.
 *
 * \author Alex
 *
 * \date 2009\07\24
 *
 * contact : <EMAIL>
 */

#include "SDLManager.hh"
#include "Video/ScreenBuffer.hh"
#include "Video/SDLWindow.hh"
#include "System/SDLEventManager.hh"

#ifdef WK_OPENGL_FOUND
#include "Video/SDLGLManager.hh"
#endif //WK_OPENGL_FOUND
#include "Video/SDLEngine.hh"
#include "Functor.hh" //for callbacks storage...

//Default Setup
#define DEFAULT_DISPLAY_WIDTH 640 // TODO not needed , can default to 4/3 mode or advised mode or desktop if nothing given...
#define DEFAULT_DISPLAY_HEIGHT 480
#define DEFAULT_DISPLAY_BPP 0 //0 for current display pixel mode

namespace RAGE
{
namespace SDL
{

//further reference to break dependency cycles
//class EventManager;
//Not needed anymore ??

class Display
{
    friend class App; //to access the constructor

    //and be able to exit mainloop

    bool m_exitMainLoop;

protected:
    Manager* pvm_manager; // here because the manager contains also the SDL specific settings that we need...

    //here because Event are initialised along with video...
    EventManager pvm_eventmanager;

    Window pvm_window; //delegating charge of the window frame and decorations only
    ScreenBuffer pvm_screen;

public:
    //sets Display size and BPP
    bool setDisplay( unsigned int width = 0, unsigned int height = 0, unsigned int bpp = 0 );
    bool show();
    bool hide();

    //just resize the screen (without changing flags, or bpp)
    //returns NULL if no screen available
    // calls Engine->resize();
    bool resizeDisplay (int width, int height);


    //VideoSurface & getDisplay( void )
    //{
    ////if (!pvm_screen.get()) resetDisplay();
    //    return pvm_screen.getDisplay();
    //}

    ScreenBuffer & getScreenBuffer( )
    {
        return pvm_screen;
    }

    inline EventManager & getEventManager()
    {
        return pvm_eventmanager;<commit_msg>handy windw accessor<commit_after>#ifndef SDLut_Display_hh
#define SDLut_Display_hh

/**
 * \class Display
 * \ingroup Video
 *
 * \brief This class handles the display part of the application
 *
 * This class hides the details of implementation of 2D display and contains a window and a Screenbuffer.
 *
 * \author Alex
 *
 * \date 2009\07\24
 *
 * contact : <EMAIL>
 */

#include "SDLManager.hh"
#include "Video/ScreenBuffer.hh"
#include "Video/SDLWindow.hh"
#include "System/SDLEventManager.hh"

#ifdef WK_OPENGL_FOUND
#include "Video/SDLGLManager.hh"
#endif //WK_OPENGL_FOUND
#include "Video/SDLEngine.hh"
#include "Functor.hh" //for callbacks storage...

//Default Setup
#define DEFAULT_DISPLAY_WIDTH 640 // TODO not needed , can default to 4/3 mode or advised mode or desktop if nothing given...
#define DEFAULT_DISPLAY_HEIGHT 480
#define DEFAULT_DISPLAY_BPP 0 //0 for current display pixel mode

namespace RAGE
{
namespace SDL
{

//further reference to break dependency cycles
//class EventManager;
//Not needed anymore ??

class Display
{
    friend class App; //to access the constructor

    //and be able to exit mainloop

    bool m_exitMainLoop;

protected:
    Manager* pvm_manager; // here because the manager contains also the SDL specific settings that we need...

    //here because Event are initialised along with video...
    EventManager pvm_eventmanager;

    Window pvm_window; //delegating charge of the window frame and decorations only
    ScreenBuffer pvm_screen;

public:
    //sets Display size and BPP
    bool setDisplay( unsigned int width = 0, unsigned int height = 0, unsigned int bpp = 0 );
    bool show();
    bool hide();

    //just resize the screen (without changing flags, or bpp)
    //returns NULL if no screen available
    // calls Engine->resize();
    bool resizeDisplay (int width, int height);


    //VideoSurface & getDisplay( void )
    //{
    ////if (!pvm_screen.get()) resetDisplay();
    //    return pvm_screen.getDisplay();
    //}

    Window & getWindow()
    {
        return pvm_window;
    }

    ScreenBuffer & getScreenBuffer( )
    {
        return pvm_screen;
    }

    inline EventManager & getEventManager()
    {
        return pvm_eventmanager;
{'fraction_non_alphanumeric': 0.09349220898258478, 'fraction_numerical': 0.01008249312557287, 'mean_word_length': 3.1930835734870318, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4202615', 'n_tokens_mistral': 1340, 'n_tokens_neox': 1257, 'n_words': 465}