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

win32_factory.hpp

00001 /*****************************************************************************
00002  * win32_factory.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2003 the VideoLAN team
00005  * $Id: win32_factory.hpp 12207 2005-08-15 15:54:32Z asmax $
00006  *
00007  * Authors: Cyril Deguet     <[email protected]>
00008  *          Olivier Teulière <[email protected]>
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef WIN32_FACTORY_HPP
00026 #define WIN32_FACTORY_HPP
00027 
00028 #ifndef _WIN32_WINNT
00029 #   define _WIN32_WINNT 0x0500
00030 #endif
00031 
00032 #include <windows.h>
00033 #include "../src/os_factory.hpp"
00034 #include <map>
00035 
00036 
00038 class Win32Factory: public OSFactory
00039 {
00040     public:
00041         Win32Factory( intf_thread_t *pIntf );
00042         virtual ~Win32Factory();
00043 
00045         virtual bool init();
00046 
00048         virtual OSGraphics *createOSGraphics( int width, int height );
00049 
00051         virtual OSLoop *getOSLoop();
00052 
00054         virtual void destroyOSLoop();
00055 
00057         virtual void minimize();
00058 
00060         virtual OSTimer *createOSTimer( CmdGeneric &rCmd );
00061 
00063         virtual OSWindow *createOSWindow( GenericWindow &rWindow,
00064                                           bool dragDrop, bool playOnDrop,
00065                                           OSWindow *pParent );
00066 
00068         virtual OSTooltip *createOSTooltip();
00069 
00071         virtual const string &getDirSeparator() const { return m_dirSep; }
00072 
00074         virtual const list<string> &getResourcePath() const
00075             { return m_resourcePath; }
00076 
00078         virtual int getScreenWidth() const;
00079         virtual int getScreenHeight() const;
00080 
00082         virtual Rect getWorkArea() const;
00083 
00085         virtual void getMousePos( int &rXPos, int &rYPos ) const;
00086 
00088         virtual void changeCursor( CursorType_t type ) const;
00089 
00091         virtual void rmDir( const string &rPath );
00092 
00094         map<HWND, GenericWindow*> m_windowMap;
00095 
00098         // We dynamically load msimg32.dll to get a pointer to TransparentBlt()
00099         BOOL (WINAPI *TransparentBlt)( HDC, int, int, int, int,
00100                                        HDC, int, int, int, int, UINT );
00101         BOOL (WINAPI *AlphaBlend)( HDC, int, int, int, int,
00102                                    HDC, int, int, int, int, BLENDFUNCTION );
00103 
00104         // Idem for user32.dll and SetLayeredWindowAttributes()
00105         BOOL (WINAPI *SetLayeredWindowAttributes)( HWND, COLORREF,
00106                                                    BYTE, DWORD );
00107 
00108     private:
00110         HINSTANCE m_hInst;
00112         HWND m_hParentWindow;
00114         HINSTANCE m_hMsimg32;
00116         HINSTANCE m_hUser32;
00118         const string m_dirSep;
00120         list<string> m_resourcePath;
00121 };
00122 
00123 
00124 #endif

Generated on Tue Dec 20 10:14:44 2005 for vlc-0.8.4a by  doxygen 1.4.2