macosx_window.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * macosx_window.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2003 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef MACOSX_WINDOW_HPP
00025 #define MACOSX_WINDOW_HPP
00026 
00027 #include "../src/os_window.hpp"
00028 #include <Carbon/Carbon.h>
00029 
00030 class MacOSXDisplay;
00031 class MacOSXDragDrop;
00032 
00033 
00034 /// MacOSX implementation of OSWindow
00035 class MacOSXWindow: public OSWindow
00036 {
00037     public:
00038         MacOSXWindow( intf_thread_t *pIntf, GenericWindow &rWindow,
00039                       bool dragDrop, bool playOnDrop,
00040                       MacOSXWindow *pParentWindow );
00041 
00042         virtual ~MacOSXWindow();
00043 
00044         // Show the window
00045         virtual void show( int left, int top ) const;
00046 
00047         // Hide the window
00048         virtual void hide() const;
00049 
00050         /// Move the window
00051         virtual void moveResize( int left, int top,
00052                                  int width, int height ) const;
00053 
00054         /// Bring the window on top
00055         virtual void raise() const;
00056 
00057         /// Set the opacity of the window (0 = transparent, 255 = opaque)
00058         virtual void setOpacity( uint8_t value ) const;
00059 
00060         /// Toggle the window on top
00061         virtual void toggleOnTop( bool onTop ) const;
00062 
00063         /// Get the Carbon window handle
00064         WindowRef getWindowRef() const { return m_win; };
00065 
00066     private:
00067         /// Parent window
00068         MacOSXWindow *m_pParent;
00069         /// Indicates whether the window handles drag&drop events
00070         bool m_dragDrop;
00071         /// Carbon Window object
00072         WindowRef m_win;
00073 };
00074 
00075 
00076 #endif

Generated on Wed Aug 13 08:02:38 2008 for VLC by  doxygen 1.5.1