/***************************************************************************
 *
 *   fb_plugin.h
 *
 *   Global data definitions for framebuffer KVME plugin.
 *
 *   $Id$
 *
 *   Copyright 1996-2014 Citrix Systems, Inc.  All Rights Reserved.
 *
 ***************************************************************************/

#ifndef _FB_PLUGIN_H_
#define _FB_PLUGIN_H_

/***************************************************************************
 *    Global data declarations for framebuffer plugin.
 ***************************************************************************/
 
struct fbprog_screeninfo {
	int            visual;
        int            fd;
        unsigned char *fbmem;
        unsigned char *frame;
        unsigned int   line_length;
        unsigned int   xoffset;
        unsigned int   yoffset;
        unsigned int   xres;
        unsigned int   yres;
        unsigned int   bits_per_pixel;
        unsigned int   bytes_per_pixel;
        unsigned int   size;
};

struct pos {
        int x;
        int y;
};
                                                                                
void ttyinit(void);
void ttyfini(void);
int fb_init(void);
void fb_fini(void);
void keybd_init(void);
void keybd_fini(void);
int mouse_init(void);

void terminateRoutine(void);
void CloseGraphics(void);

#define BOXSIZE 20
                                                                               
/* Frame buffer data */

extern struct  fbprog_screeninfo framebuffer;
extern char   *fbp;

/* Terminal data */

extern int new_tty_file_descriptor;

/* Saved pointer to the plugin interface struct. */

extern struct mainloop_plugin *plug_ptr;

#endif /*  _FB_PLUGIN_H_ */
