add CCXEGLView::getFrame() function.

This commit is contained in:
yangws 2010-08-18 07:24:19 +00:00
parent 1fd2128806
commit 876c0dabb8
2 changed files with 11 additions and 3 deletions

View File

@ -343,9 +343,16 @@ Boolean CCXEGLView::EventHandler(TApplication * pApp, EventType * pEvent)
CGSize CCXEGLView::getSize()
{
TRectangle rc;
GetBounds(&rc);
return CGSize((float)rc.Width(), (float)rc.Height());
Coord w, h;
TWindow::GetWindowExtent(&w, &h);
return CGSize((float)w, (float)h);
}
CGRect CCXEGLView::getFrame()
{
TRectangle rc;
GetClientBounds(&rc);
return (CGRect((float)rc.X(), (float)rc.Y(), (float)rc.Width(), (float)rc.Height()));
}
bool CCXEGLView::isOpenGLReady()

View File

@ -49,6 +49,7 @@ public:
virtual Boolean AfterCreate(void);
virtual Boolean EventHandler(TApplication * pApp, EventType * pEvent);
CGRect getFrame();
CGSize getSize();
bool isOpenGLReady();
void release();