Laurent Carlier 3821669aab [GB.SDL]
* BUG: Removed support for system font, as it'snt really stable and working well.
* NEW: Now Font class use a default TTF font, DejaVuSans.ttf



git-svn-id: svn://localhost/gambas/trunk@3340 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-11-30 20:02:42 +00:00

79 lines
1.9 KiB
C++

/***************************************************************************
Cwindow.h
(c) 2006 Laurent Carlier <lordheavy@users.sourceforge.net>
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 2, 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, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
***************************************************************************/
#ifndef __CWINDOW_H
#define __CWINDOW_H
#include "gambas.h"
#include "main.h"
#include "SDLwindow.h"
#include "Cfont.h"
#include "Cmouse.h"
class myWin : public SDLwindow
{
public:
myWin(void *win):SDLwindow() { hWindow = win; };
~myWin() {};
void Quit(void );
void Resize(void );
void GotFocus(void );
void LostFocus(void );
void MouseEnter(void );
void MouseLeave(void );
void Update(void );
void Open(void );
void KeyEvent(SDL_KeyboardEvent* , int);
void MouseButtonEvent(SDL_MouseButtonEvent* );
void MouseMotionEvent(SDL_MouseMotionEvent* );
private:
void *hWindow;
};
typedef
struct {
GB_BASE ob;
CCURSOR *cursor;
myWin *id;
bool openGL;
bool tracking;
// framerate control
Uint32 FPSLimit; // duration of a frame, if 0 -> no framerate limit
Uint32 lastTime;
// framerate count
Uint32 startTime;
Uint32 countFrames;
Uint32 currentFPS;
}
CWINDOW;
#ifndef __CWINDOW_CPP
extern GB_DESC CWindow[];
#endif /* __CWINDOW_CPP */
#endif /* __CWINDOW_H */