/*
*     ___                       ___
*    / _ \___ _    _____ ____  / _ \_______ __    __
*   / ___/ _ \ |/|/ / -_) __/ / // / __/ _ `/ |/|/ /
*  /_/   \___/__,__/\__/_/   /____/_/  \_,_/|__,__/
*
*
*   Original Code by John Garrison
*   Written June 3-11,18,25 August 5, 1999
*   To be released under the LGPL
*
*   PowerDraw initialization and misc. routines
*
*   See LICENSE.TXT for more LGPL info
*/

#ifndef _PD_H
#define _PD_H

#ifdef __cplusplus
extern "C" {
#endif

#include <freetype.h>
#include <SDL/SDL.h>


typedef Uint32 PD_Color;
typedef SDL_Surface PD_Surface;
typedef SDL_Color PD_RGB;
typedef PD_RGB *PD_Palette;
typedef SDL_Cursor PD_Pointer;
typedef struct{
   PD_Surface *icon;
   Uint8 *mask;
}PD_Icon;
/* the font structure from the SDL ttf example */
typedef struct {
	TT_Face face;
	TT_Instance inst;
	TT_Glyph glyph;
	TT_CharMap map;
	TT_Raster_Map scratch;
} PD_TTFont;

#include "primitives.h"
#include "gfx.h"
#include "sprites.h"
#include "truetype.h"

extern int BPP,
    SCREENWIDTH,
    SCREENHEIGHT;
extern TT_Engine truetype;
extern PD_Surface *Screen;

#define DoubleBuffer Screen

int PD_Init();
int PD_Quit();

int PD_SetCaption (const char *Caption);
const char *PD_GetCaption();
PD_Icon PD_LoadIcon(char *File, int Type);
int PD_SetIcon(PD_Icon *Icon);

int PD_Wait(int Delay);

#ifdef __cplusplus
};
#endif

#endif