/*******************************************************************************

  Copyright(c) 2003-2004 Aurelien Reynaud.

  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the Free
  Software Foundation; either version 2 of the License, or (at your option)
  any later version.

  This program is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  more details.

  You should have received a copy of the GNU General Public License along with
  this program; if not, write to the Free Software Foundation, Inc., 59
  Temple Place - Suite 330, Boston, MA  02111-1307, USA.

  The full GNU General Public License is included in this distribution in the
  file called COPYING.

*******************************************************************************/


#ifndef HAVE_LIBGGIWMH
# define DISABLE_RESIZE
#endif
#define DISABLE_RESIZE /* resizing disabled anyway for now */
#define JUMP_SCROLL
/*#define FORCE_RENDER_COPYBOX*/
#ifdef JUMP_SCROLL
# define FORCE_RENDER_COPYBOX
#endif

/*#define FORCE_MONOSPACE*/
#define FORCE_MONOCHROME 0

/* Default font size for freetype rendering */
#define DEFAULT_FONTSIZE 12

/* Default shell when none is specified and $SHELL is empty */
#define DEFAULT_SHELL "/bin/sh"

/* Number of bytes we read in one go from the app's output:
   - must be greater than the largest escape sequence possible (see terminal.h)
   - input is frozen while output is rendered, so it must not be too big either
     for the sake of responsiveness
   - increasing this value can speed up scrolling somewhat, as a (costly) flush
     occurs after processing this amount of data
*/
#define APP_OUTPUT_SIZE 1024

#define CACHE_MAX_GLYPHS 256
#define CACHE_MAX_SIZE 204800

#define BACKEND_ERROR    0
#define BACKEND_NATIVE   1
#define BACKEND_FREETYPE 2

#define RENDER_ERROR     0
#define RENDER_COPYBOX   1
#define RENDER_SETORIGIN 2

/* wchar_t definition */
#ifdef MULTIBYTE
# include <stdlib.h>
#else
# define wchar_t unsigned int
#endif

typedef struct {
	wchar_t	charcode;
	int	mode;
	int	bgcolor;
	int	fgcolor;
} cell_t;

typedef struct cached_glyph_s {
	wchar_t	charcode;
	int	underline;
	int	bgcolor;
	int	fgcolor;
	struct cached_glyph_s *next;
	void	*boxptr;
} cached_glyph_t;
