~ubuntu-branches/ubuntu/natty/vlc/natty

« back to all changes in this revision

Viewing changes to modules/gui/skins2/x11/x11_window.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2010-06-25 01:09:16 UTC
  • mfrom: (1.1.30 upstream)
  • Revision ID: james.westby@ubuntu.com-20100625010916-asxhep2mutg6g6pd
Tags: 1.1.0-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - build and install the libx264 plugin
  - add Xb-Npp header to vlc package
  - Add apport hook to include more vlc dependencies in bug reports
* Drop xulrunner patches.
* Drop 502_xulrunner_191.diff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * x11_window.hpp
3
3
 *****************************************************************************
4
4
 * Copyright (C) 2003 the VideoLAN team
5
 
 * $Id: f20b06daf14ccbae666d620035481cf3291710f9 $
 
5
 * $Id: 58be247891b144b20a7b5a55c7ba66db1cf8324e $
6
6
 *
7
7
 * Authors: Cyril Deguet     <asmax@via.ecp.fr>
8
8
 *          Olivier Teulière <ipkiss@via.ecp.fr>
17
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
18
 * GNU General Public License for more details.
19
19
 *
20
 
 * You should have received a copy of the GNU General Public License
21
 
 * along with this program; if not, write to the Free Software
22
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 
20
 * You should have received a copy of the GNU General Public License along
 
21
 * with this program; if not, write to the Free Software Foundation, Inc.,
 
22
 * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23
23
 *****************************************************************************/
24
24
 
25
25
#ifndef X11_WINDOW_HPP
26
26
#define X11_WINDOW_HPP
27
27
 
28
28
#include <X11/Xlib.h>
 
29
#include <X11/Xatom.h>
29
30
 
 
31
#include "../src/generic_window.hpp"
30
32
#include "../src/os_window.hpp"
31
33
 
32
34
class X11Display;
36
38
/// X11 implementation of OSWindow
37
39
class X11Window: public OSWindow
38
40
{
39
 
    public:
40
 
        X11Window( intf_thread_t *pIntf, GenericWindow &rWindow,
41
 
                   X11Display &rDisplay, bool dragDrop, bool playOnDrop,
42
 
                   X11Window *pParentWindow );
43
 
 
44
 
        virtual ~X11Window();
45
 
 
46
 
        // Show the window
47
 
        virtual void show( int left, int top ) const;
48
 
 
49
 
        // Hide the window
50
 
        virtual void hide() const;
51
 
 
52
 
        /// Move the window
53
 
        virtual void moveResize( int left, int top,
54
 
                                 int width, int height ) const;
55
 
 
56
 
        /// Bring the window on top
57
 
        virtual void raise() const;
58
 
 
59
 
        /// Set the opacity of the window (0 = transparent, 255 = opaque)
60
 
        virtual void setOpacity( uint8_t value ) const;
61
 
 
62
 
        /// Toggle the window on top
63
 
        virtual void toggleOnTop( bool onTop ) const;
64
 
 
65
 
        /// Get the window ID
66
 
        Window getDrawable() const { return m_wnd; }
67
 
 
68
 
        /// Getter for the handler
69
 
        void* getOSHandle() const { return (void*) m_wnd; }
70
 
 
71
 
        /// Getter for the handler
72
 
        void* getParentOSHandle() const { return (void*) m_wnd_parent; }
73
 
 
74
 
        /// reparent the window
75
 
        void reparent( void* OSHandle, int x, int y, int w, int h );
76
 
 
77
 
    private:
78
 
        /// X11 display
79
 
        X11Display &m_rDisplay;
80
 
        /// Window ID
81
 
        Window m_wnd;
82
 
        /// Window ID
83
 
        Window m_wnd_parent;
84
 
        /// Parent window
85
 
        X11Window *m_pParent;
86
 
        /// Indicates whether the window handles drag&drop events
87
 
        bool m_dragDrop;
88
 
        /// Drop target
89
 
        X11DragDrop *m_pDropTarget;
 
41
public:
 
42
    X11Window( intf_thread_t *pIntf, GenericWindow &rWindow,
 
43
               X11Display &rDisplay, bool dragDrop, bool playOnDrop,
 
44
               X11Window *pParentWindow, GenericWindow::WindowType_t );
 
45
 
 
46
    virtual ~X11Window();
 
47
 
 
48
    // Show the window
 
49
    virtual void show() const;
 
50
 
 
51
    // Hide the window
 
52
    virtual void hide() const;
 
53
 
 
54
    /// Move the window
 
55
    virtual void moveResize( int left, int top,
 
56
                             int width, int height ) const;
 
57
 
 
58
    /// Bring the window on top
 
59
    virtual void raise() const;
 
60
 
 
61
    /// Set the opacity of the window (0 = transparent, 255 = opaque)
 
62
    virtual void setOpacity( uint8_t value ) const;
 
63
 
 
64
    /// Toggle the window on top
 
65
    virtual void toggleOnTop( bool onTop ) const;
 
66
 
 
67
    /// Get the window ID
 
68
    Window getDrawable() const { return m_wnd; }
 
69
 
 
70
    /// Getter for the handler
 
71
    void* getOSHandle() const { return (void*) m_wnd; }
 
72
 
 
73
    /// Getter for the handler
 
74
    void* getParentOSHandle() const { return (void*) m_wnd_parent; }
 
75
 
 
76
    /// reparent the window
 
77
    void reparent( void* OSHandle, int x, int y, int w, int h );
 
78
 
 
79
    void setFullscreen() const;
 
80
 
 
81
private:
 
82
    /// X11 display
 
83
    X11Display &m_rDisplay;
 
84
    /// Window ID
 
85
    Window m_wnd;
 
86
    /// Window ID
 
87
    Window m_wnd_parent;
 
88
    /// Parent window
 
89
    X11Window *m_pParent;
 
90
    /// Indicates whether the window handles drag&drop events
 
91
    bool m_dragDrop;
 
92
    /// Drop target
 
93
    X11DragDrop *m_pDropTarget;
 
94
    /// window type
 
95
    GenericWindow::WindowType_t m_type;
90
96
};
91
97
 
92
98