win32_window.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * win32_window.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2003 the VideoLAN team
00005  * $Id: 6717cd7276e71d136540681284693121cc024708 $
00006  *
00007  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
00008  *          Olivier Teulière <ipkiss@via.ecp.fr>
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 along
00021  * with this program; if not, write to the Free Software Foundation, Inc.,
00022  * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef WIN32_WINDOW_HPP
00026 #define WIN32_WINDOW_HPP
00027 
00028 #include "../src/generic_window.hpp"
00029 #include "../src/os_window.hpp"
00030 #include <windows.h>
00031 #include <ole2.h>   // LPDROPTARGET
00032 
00033 
00034 /// Win32 implementation of OSWindow
00035 class Win32Window: public OSWindow
00036 {
00037 public:
00038     Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
00039                  HINSTANCE hInst, HWND hParentWindow,
00040                  bool dragDrop, bool playOnDrop,
00041                  Win32Window *pParentWindow, GenericWindow::WindowType_t );
00042     virtual ~Win32Window();
00043 
00044     // Show the window
00045     virtual void show() const;
00046 
00047     // Hide the window
00048     virtual void hide() const;
00049 
00050     /// Move and resize the window
00051     virtual void moveResize( int left, int top, int width, int height ) const;
00052 
00053     /// Bring the window on top
00054     virtual void raise() const;
00055 
00056     /// Set the opacity of the window (0 = transparent, 255 = opaque)
00057     virtual void setOpacity( uint8_t value ) const;
00058 
00059     /// Toggle the window on top
00060     virtual void toggleOnTop( bool onTop ) const;
00061 
00062     /// Getter for the window handle
00063     HWND getHandle() const { return m_hWnd; }
00064 
00065     /// Getter for the window handle
00066     void* getOSHandle() const { return (void*) m_hWnd; }
00067 
00068     /// reparent the window
00069     void reparent( void* OSHandle, int x, int y, int w, int h );
00070 
00071 private:
00072     /// Window handle
00073     HWND m_hWnd;
00074     /// Window parent's handle
00075     HWND m_hWnd_parent;
00076     /// Indicates whether the window handles drag&drop events
00077     bool m_dragDrop;
00078     /// Drop target
00079     LPDROPTARGET m_pDropTarget;
00080     /// Indicates whether the window is layered
00081     mutable bool m_isLayered;
00082     /// Parent window
00083     Win32Window *m_pParent;
00084     /// window type
00085     GenericWindow::WindowType_t m_type;
00086 
00087 };
00088 
00089 
00090 #endif

Generated on Tue May 25 08:04:58 2010 for VLC by  doxygen 1.5.6