/**
 *  GraphTFT plugin for the Video Disk Recorder 
 * 
 *  renderer.h - A plugin for the Video Disk Recorder
 *
 *  (c) 2004 Lars Tegeler, Sascha Volkenandt  
 *
 * This code is distributed under the terms and conditions of the
 * GNU GENERAL PUBLIC LICENSE. See the file COPYING for details.
 *
 * $Id: renderer.h,v 1.2 2004/05/08 18:55:45 tegeler Exp $
 *
 **/

#ifndef __GTFT_RENDERER_H
#define __GTFT_RENDERER_H

#include <vdr/device.h>

// used as superclass of the renderes
class Renderer
{
	public:

		virtual void init(int devnum) = 0;
		virtual void deinit() = 0;

		virtual void refresh() = 0; //shoud call it show or flip?
		virtual void clear() = 0;

		virtual void image(const char* fname, int x, int y, bool fullpath = false ) = 0;
		virtual int text(const char *text, const char *font_name, int size, int align, int x, int y, int r, int g, int b, int widht, int height,int lines) = 0;
		virtual void rectangle(int x, int y, int width, int height, int r, int g, int b, int a) = 0;

		virtual void dumpImage2File(const char* fname, int dumpWidth, int dumpHeight) = 0;

		virtual int playVideo(const uchar *Data, int Length) = 0;
		virtual bool devicePoll(cPoller &Poller, int TimeoutMs = 0) = 0;
		virtual void setPlayMode(bool Video) = 0;
		virtual void deviceClear(void) = 0;

		Renderer() {};
		virtual ~Renderer() {};
};

#endif // __GTFT_RENDERER_H
