
#include <windows.h>

#define ID_SEC    1

class window_class 
{
  public:
    friend class opengl_class;
    
    window_class::window_class( void );
    
    
    int start( HINSTANCE hinst,opengl_class *link_source );

    void setup_buffer( void );
    void destroy_buffer( void );

    static LRESULT CALLBACK wnd_wrapper (HWND, UINT, WPARAM, LPARAM);
    virtual LRESULT CALLBACK wnd_proc (HWND, UINT, WPARAM, LPARAM);


    void resize( void );
    void paint( void );


    void stop( void );
    int loop( void );

    HWND get_hwnd( void ) { return hwnd; };
    
    void draw( void );
    
    void set_opengl(opengl_class *link_source) { opengl_link = link_source; };

    void left_mouse_down( LPARAM l);

      void left_mouse_up(  LPARAM l)     ;
void  mouse_move(  LPARAM l);

void mouse_wheel (WPARAM wParam );



  private:

    HWND hwnd;   
    HDC hdc;

    unsigned int fps;
    unsigned int frames;

  //  HDC hdc;

    unsigned int display_x, display_y;
    opengl_class *opengl_link;


    bool mouse_down;
    int mouse_start_x;
    int mouse_start_y;
    

};











