/** Filz gg_gtkdrv.h : driver for Grace-GTK 
 * Protos pour gg_gtkdrv.c
 */

#ifndef __GG_GTKDRV_H_
#define __GG_GTKDRV_H_


#include "defines.h"


#define CMAP_INSTALL_NEVER      0
#define CMAP_INSTALL_ALWAYS     1
#define CMAP_INSTALL_AUTO       2

/* gg_gtkdrv.c */
int gg_xconvglib (double x);
int gg_yconvglib (double y);
void gg_VPoint2dev(VPoint vp ,int *x ,int *y);
GdkPoint gg_VPoint2GdkPoint (VPoint vp);


int  gg_init		 (void);
void gg_sync_canvas_size (gint *w ,gint *h ,int inv);
int  gg_initgraphics	 (void);
void gg_updatecmap	 (void);
void gg_initcmap	 (void);
void gg_drawpixel	 (VPoint vp);
void gg_drawpolyline	 (VPoint *vps ,int n ,int mode);
void gg_fillpolygon	 (VPoint *vps ,int npoints);
void gg_drawarc		 (VPoint vp1 ,VPoint vp2 ,int angle1 ,int angle2);
void gg_fillarc		 (VPoint vp1 ,VPoint vp2 ,int angle1 ,int angle2 ,int mode);
void gg_redraw		 (GtkWidget *window ,gint x ,gint y ,gint width ,gint height);
void gg_putpixmap	 (VPoint vp ,int width ,int height ,
			  char *databits ,int pixmap_bpp ,int bitmap_pad ,int pixmap_type);
void gg_setfrgbcolor     (double fred ,double fgreen ,double fblue);

void gg_writestring (VPoint vp ,int rot ,int just ,char *theString);

void gg_leavegraphics(void);
     
VPoint gg_gtk2VPoint(int x ,int y);

void gg_page_zoom_increase_CB (GtkWidget *w ,gpointer p);
void gg_page_zoom_decrease_CB (GtkWidget *w ,gpointer p);
void gg_page_zoom_reset_CB    (GtkWidget *w ,gpointer p);
void gg_page_zoom_store_ori   (void);

/* gg_gutil.c */
extern void gg_draw_focus(int gno);
//27 extern GdkPixmap *gg_resize_bufpixmap ( int w , int h);


#endif /* __GG_GTKDRV_H_ */
