/* -----------------------------------------------------------------;
 * $source   : c:/ $
 * $revision : 1.0 $
 * $author   : root@null.co.za $
 * $date     : 2004/12/18 15:03:00 $
 * $desc     : $
 * $log      : $
 *
 * -----------------------------------------------------------------;
 */

#if !defined(__E_APP__)
#define	     __E_APP__

//------------------------------------------------------------------;
//
//------------------------------------------------------------------;

struct c_app {

   public :

      h_i                 l_hinst;
      h_c                 l_hdc;
      h_w                 l_hwnd;
      h_r                 l_hrc;
      w_r                 l_rect;

      h_w                 l_window;        // window handle.
      int                 l_pause;         // paused?
      int                 l_showfps;       // fps?
      int                 l_wire;          // wireframe?
      int                 l_light;         // lighting?
      int                 l_texture;       // textures?
      int                 l_cull;          // back face culling?

      char*               l_name;
      int                 l_width;
      int                 l_height;
      int                 l_bpp;
      int                 l_full;
      char               *l_images [l_max_data];

                          c_app         ();
      virtual            ~c_app         ();

      int                 m_execute     ( int argc, char** argv );
      int                 m_init        ( void );
      int                 m_gui         ( int l_x, int l_y, d_w l_style, int l_full, h_i l_hinst );
      int                 m_fullscreen  ( int l_x, int l_y );
      int                 m_pixelformat ( h_c l_hdc, int l_depth );
      void                m_rect        ( void );
      void                m_resize      ( int l_x, int l_y );
      int                 m_loop        ( void );
      int                 m_exit        ( void );

      static l_r CALLBACK m_proc        ( h_w l_hwnd, u_i l_msg, p_w l_wparam, p_l l_lparam );

   private :

};

void idle();

#endif	/* !defined(__E_APP__) */
