summaryrefslogtreecommitdiff
path: root/src/DockItem.h
blob: cb5721239d97b9481d3a8bf90dea1a255adf6263 (plain)
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
27
28
29
30
31
32
33
34
/* $Id: DockItem.h,v 1.3 2007/01/07 05:00:56 whot Exp $ */

#ifndef __DOCKITEM_H__
#define __DOCKITEM_H__

#include <X11/Xlib.h>
#include <X11/extensions/XInput.h>
#include "XConn.h"

class PointerDevice;
class DockItem 
{
    protected:
        XConn* x11;
        Window button;
        GC button_gc;
        Pixmap backbuff;
        int width, height;

    public:
        void initGUI(Window parent, int x, int y, int width, int height);
        bool hasWindow(Window win);
        void handleExpose(XExposeEvent *ev);
        virtual void handleButtonEvent(PointerDevice* ptr, XDeviceButtonEvent* ev) = 0;
        virtual void setup() = 0;
        virtual ~DockItem();
        Window getButton() { return button; }

        void move(int x, int y);

};

#endif