Mercurial > vba-clojure
view src/gtk/screenarea.h @ 8:08a8e09ca414
add files required by automake
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:54:39 -0600 |
parents | f9f4f1b99eed |
children |
line wrap: on
line source
1 // -*- C++ -*-2 // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.3 // Copyright (C) 1999-2003 Forgotten4 // Copyright (C) 2004 Forgotten and the VBA development team6 // This program is free software; you can redistribute it and/or modify7 // it under the terms of the GNU General Public License as published by8 // the Free Software Foundation; either version 2, or(at your option)9 // any later version.10 //11 // This program is distributed in the hope that it will be useful,12 // but WITHOUT ANY WARRANTY; without even the implied warranty of13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14 // GNU General Public License for more details.15 //16 // You should have received a copy of the GNU General Public License17 // along with this program; if not, write to the Free Software Foundation,18 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.20 #ifndef __VBA_SCREENAREA_H__21 #define __VBA_SCREENAREA_H__23 #include <gtkmm/drawingarea.h>24 #include <gdkmm/cursor.h>26 #ifndef GTKMM2027 # include "sigccompat.h"28 #endif // ! GTKMM2030 #include "filters.h"32 namespace VBA33 {35 class ScreenArea : public Gtk::DrawingArea36 {37 public:38 ScreenArea(int _iWidth, int _iHeight, int _iScale = 1);39 virtual ~ScreenArea();41 void vSetSize(int _iWidth, int _iHeight);42 void vSetScale(int _iScale);43 void vSetFilter2x(EFilter2x _eFilter2x);44 void vSetFilterIB(EFilterIB _eFilterIB);45 void vDrawPixels(u8 * _puiData);46 void vDrawColor(u32 _uiColor); // 0xRRGGBB48 protected:49 virtual bool on_expose_event(GdkEventExpose * _pstEvent);50 virtual bool on_motion_notify_event(GdkEventMotion * _pstEvent);51 virtual bool on_enter_notify_event(GdkEventCrossing * _pstEvent);52 virtual bool on_leave_notify_event(GdkEventCrossing * _pstEvent);53 virtual bool bOnCursorTimeout();55 private:56 int m_iWidth;57 int m_iHeight;58 int m_iScale;59 int m_iAreaWidth;60 int m_iAreaHeight;61 int m_iRowStride;62 u32 * m_puiPixels;63 u8 * m_puiDelta;64 Filter2x m_vFilter2x;65 FilterIB m_vFilterIB;67 bool m_bShowCursor;68 Gdk::Cursor * m_poEmptyCursor;69 SigC::connection m_oCursorSig;71 void vUpdateSize();72 void vStartCursorTimeout();73 void vStopCursorTimeout();74 void vHideCursor();75 void vShowCursor();76 };78 } // namespace VBA81 #endif // __VBA_SCREENAREA_H__