Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

phSDLImageWindow.h

Go to the documentation of this file.
00001 /* ---------------------------------------------------------------------------
00002     Phission : 
00003         Realtime Vision Processing System
00004     
00005     Copyright (C) 2003-2006 Philip D.S. Thoren (pthoren@cs.uml.edu)
00006     University of Massachusetts at Lowell,
00007     Laboratory for Artificial Intelligence and Robotics
00008     
00009     This file is part of Phission.
00010 
00011     Phission is free software; you can redistribute it and/or modify
00012     it under the terms of the GNU Lesser General Public License as published by
00013     the Free Software Foundation; either version 2 of the License, or
00014     (at your option) any later version.
00015 
00016     Phission is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019     GNU Lesser General Public License for more details.
00020 
00021     You should have received a copy of the GNU Lesser General Public License
00022     along with Phission; if not, write to the Free Software
00023     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 
00025  ---------------------------------------------------------------------------*/
00026 #ifndef _PHSDLIMAGEWINDOW_H
00027 #define _PHSDLIMAGEWINDOW_H
00028 
00029 #include <phImageWindow.h>
00030 
00031 /* ------------------------------------------------------------------------- */
00037 /* ---------------------------------------------------------------------- */
00038 #define phSDLImageWindow_ValidFormats (phImageRGB24 | \
00039                                        phImageBGR24 | \
00040                                        phImageABGR32 | \
00041                                        phImageRGBA32 | \
00042                                        phImageBGRA32 | \
00043                                        phImageGREY8)
00044  
00045 typedef struct phSDLWindowInfo_t        *phSDLWindowInfo;
00046 
00047 /* ---------------------------------------------------------------------- */
00052 PHAPI(class) phSDLImageWindow : public phImageWindow
00053 {
00054 private:
00055     phSDLWindowInfo m_info;
00056     
00057     uint32_t        m_currentDepth;
00058     uint32_t        m_currentFormat;
00059 
00060     int window_init(uint32_t x, uint32_t y,
00061                      uint32_t w, uint32_t h );
00062     int image_window_init();
00063 
00064     int calc_resize(uint32_t w,uint32_t h,
00065                     uint32_t *tw, uint32_t *th );
00066 
00067     int run();
00068     int wakeup();
00069     int cleanup();
00070     
00071     virtual int private_show(); /* unimplemented */
00072     virtual int private_hide(); /* unimplemented */
00073 
00074     virtual int private_redraw  ();
00075     virtual int private_update  ();
00076     virtual int private_resize  ( uint32_t w,       uint32_t h);
00077     virtual int private_move    ( int32_t  x,       int32_t  y); /* unimplementable */
00078     virtual int private_minsize ( uint32_t min_w,   uint32_t min_h);
00079 
00080 public:
00081     phSDLImageWindow( uint32_t x, uint32_t y,
00082                       uint32_t w, uint32_t h,
00083                       char *title,
00084                       uint32_t flags = phNOFLAG );
00085     ~phSDLImageWindow();
00086 
00087     int isOpen() { return this->isRunning(); };
00088 };
00089 
00090  /* end \addtogroup Display */
00092 
00093 #endif /* _PHSDLIMAGEWINDOW_H */
00094 




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:44:03 2007 for phission by  doxygen 1.4.4