summaryrefslogtreecommitdiff
path: root/imlibrenderer/xrenderer/xrenderer.h
blob: 1add4d17e9adbd78cdcb32d35958b95af840ac08 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//***************************************************************************
// Group VDR/GraphTFT
// File xrenderer.h
// Date 09.11.14 - Jörg Wendel
// This code is distributed under the terms and conditions of the
// GNU GENERAL PUBLIC LICENSE. See the file COPYING for details.
//--------------------------------------------------------------------------
// Class XRenderer
//***************************************************************************

#ifndef __DXRENDERER_H__
#define __DXRENDERER_H__

#include <X11/Xlib.h>

#include <vdr/thread.h>
#include "imlibrenderer.h"

//***************************************************************************
// Class X Renderer
//***************************************************************************

class XRenderer : public ImlibRenderer
{
   public:	

      XRenderer(int x, int y, int width, int height, string cfgPath, int utf, string thmPath);
      ~XRenderer();

      void setDisplaySize(int width, int height);
		int init(int lazy);
		void deinit();
      int xPending();
		void refresh(int force = no);
      void refreshArea(int x, int y, int width, int height);
		void clear();

      virtual int attach(const char* disp = 0);
      virtual int detach();
      
   protected:

      void refreshPixmap();

      Window win;
      Display* disp;
      int screen;
      Pixmap pix;
      cMutex mutex;
      int initialized;
};

//***************************************************************************
#endif // __DXRENDERER_H__