vlcwindowless_xcb.h 1.57 KB
Newer Older
Ludovic Fauvet's avatar
Ludovic Fauvet committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
/*****************************************************************************
 * vlcwindowless_XCB.h: a VLC plugin for Mozilla (XCB windowless)
 *****************************************************************************
 * Copyright © 2012 VideoLAN
 * $Id$
 *
 * Authors: Ludovic Fauvet <etix@videolan.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

#ifndef __VLCWINDOWLESS_XCB_H__
#define __VLCWINDOWLESS_XCB_H__

27
#include "vlcwindowless_base.h"
Ludovic Fauvet's avatar
Ludovic Fauvet committed
28

29
#include <xcb/xcb.h>
Ludovic Fauvet's avatar
Ludovic Fauvet committed
30 31 32 33 34 35 36 37 38 39

class VlcWindowlessXCB : public VlcWindowlessBase
{
public:
    VlcWindowlessXCB(NPP instance, NPuint16_t mode);
    virtual ~VlcWindowlessXCB();

    bool handle_event(void *event);

protected:
40
    bool initXCB();
Ludovic Fauvet's avatar
Ludovic Fauvet committed
41 42 43 44
    void drawBackground(xcb_drawable_t drawable);

private:
    xcb_connection_t *m_conn;
45
    xcb_colormap_t m_colormap;
Ludovic Fauvet's avatar
Ludovic Fauvet committed
46 47 48 49
};


#endif /* __VLCWINDOWLESS_XCB_H__ */