vlcplugin_xcb.h 1.98 KB
Newer Older
1
/*****************************************************************************
2
 * vlcplugin_xcb.h: a VLC plugin for Mozilla (X interface)
3
 *****************************************************************************
4
 * Copyright (C) 2011-2012 VLC authors and VideoLAN
5 6
 * $Id$
 *
7
 * Authors: Cheng Sun <chengsun9@gmail.com>
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
 *
 * 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.
 *****************************************************************************/

24 25
#ifndef __VLCPLUGIN_XCB_H__
#define __VLCPLUGIN_XCB_H__
26 27

#include "vlcplugin_base.h"
28
#include <xcb/xcb.h>
29

30
class VlcPluginXcb : public VlcPluginBase
31 32
{
public:
33
    VlcPluginXcb(NPP, NPuint16_t);
34 35 36 37 38

    int                 setSize(unsigned width, unsigned height);

    void toggle_fullscreen();
    void set_fullscreen( int );
39
    bool get_fullscreen();
40 41 42 43 44

    bool create_windows();
    bool resize_windows();
    bool destroy_windows();

45 46 47 48
    void set_toolbar_visible(bool)  { /* STUB */ }
    bool get_toolbar_visible()  { return false; }
    void update_controls()      {/* STUB */}
    void popup_menu()           {/* STUB */}
49 50 51 52

    void set_player_window();

    unsigned int     i_width, i_height;
53 54
    xcb_connection_t *conn;
    xcb_window_t parent, video;
55 56
    xcb_colormap_t colormap;
    uint32_t colorpixel;
57 58

    pthread_t thread;
59 60 61 62

    int i_last_position;
};

63
#endif /* __VLCPLUGIN_XCB_H__ */