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

/*
 *      define.h -- REALmagic calibration application for NS2k TV
 *
 *      Copyright (C) 2000 Sigma Designs
 *                    written by Emmanuel Michon <emmanuel_michon@sdesigns.com>
 *	                  modified by Pascal Cannenterre <pascal_cannenterre@sdesigns.com>  
 *
 *      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., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
/*******************************************************************************/
#ifndef __DEFINE_H__
#define __DEFINE_H__

// os stuff
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <math.h>

// fmp api
#define _DEFINE_FMP_TYPES_

#include "fmp.h"

#include "novaclient.h"
#include "rm84mpegcmn.h"


// X stuff (XOpenDisplay)
#include <X11/Xlib.h>

// gdk stuff
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>

// gtk+ stuff
#include <gtk/gtk.h>

#ifdef DEBUG
#define G_MESSAGE(args...) g_message(args)
#define G_PRINT(args...)   g_print(args)
#else
#define G_MESSAGE(args...)
#define G_PRINT(args...)
#endif

#define UNUSED_ARG 0

/*
 * Standard gettext macros.
 */
#ifdef ENABLE_NLS
#  include <libintl.h>
#  undef _
#  define _(String) dgettext (PACKAGE, String)
#  ifdef gettext_noop
#    define N_(String) gettext_noop (String)
#  else
#    define N_(String) (String)
#  endif
#else
#  define textdomain(String) (String)
#  define gettext(String) (String)
#  define dgettext(Domain,Message) (Message)
#  define dcgettext(Domain,Message,Type) (Message)
#  define bindtextdomain(Domain,Directory) (Domain)
#  define _(String) (String)
#  define N_(String) (String)
#endif

#ifdef DEBUG
#define G_MESSAGE(args...) g_message(args)
#else
#define G_MESSAGE(args...)
#endif

GtkWidget* create_pixmap (GtkWidget *widget, char *filename[]);
void set_window_icon(GtkWidget *widget, char *filename[]);
DWORD setOutputMode(DWORD newvgatv);

extern Display *dpy;
extern int scr;
/************************************************/
/* For the moment I don't treat the errors      */
/* from HWlib (and from deeper in the driver)   */
/* So, I've done some define,                   */
/* OK --> Q_OK                                  */
/* NOTGOOD --> means errors, see qerror.h       */
/************************************************/
#define OK 0
#define NOTGOOD -1

/* some constants not correctly defined in fs400 */
#define FLICKER_MIN 0
#define FLICKER_MAX 8
#define FLICKER_RANGE 9
#define FLICKER_RESET 8
#include "fs400.h"

#endif /* DEFINE.H */
