/* ***********************IMPORTANT *********************************************
 *  Copyright (C) 2004-2007 Thierry Lagarde <tlagarde@users.sourceforge.net>
 *  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.
 *
 *
 *                      ********************
 *
 *
 *  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 Library General Public License for more details.
 *
 *
 *                      ********************
 *
 *
 * You are highly encouraged to send your changes to <tlagarde@users.sourceforge.net>
 * for possible incorporation into the main distribution.
 * By sending these changes to <tlagarde@users.sourceforge.net>,
 * it is assumed that you are offering <tlagarde@users.sourceforge.net>
 * the unlimited, non-exclusive right to reuse, modify, and relicense the code.
 *
 *
 *                      ********************
 *
 *  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.
 **************************************************************************************/
#include <gtk/gtk.h>
#include "Style.h"

void Modifie_BackGround_Fenetre (GtkWidget * Fenetre, guint16 red, guint16 green, guint16 blue)
{
/*
void Modifie_BackGround_Fenetre (GtkWidget * Fenetre, guint16 red, guint16 green, guint16 blue)
{
printf("Change\n\n\n");

	  GtkStyle *windowstyle;
GtkStyle *estilo_defecto, *estilo;
        gint i;

GdkColor color;

        estilo_defecto = gtk_widget_get_default_style();
        estilo = gtk_style_copy(estilo_defecto);

        for (i=0;i<5;i++)
        {
color.red = red;
	color.green = green;
	color.blue = blue;
                estilo->bg[i] = color;
        }

        gtk_widget_set_style(Fenetre, estilo);
        gtk_widget_show(Fenetre);


}
*/


	GtkStyle *windowstyle = NULL;
	GdkColor  color;

	windowstyle = gtk_style_copy (defStyle);
	color.red = red;
	color.green = green;
	color.blue = blue;
	windowstyle->bg[GTK_STATE_NORMAL] = color;
	defStyle = gtk_style_copy (windowstyle);
	gtk_widget_set_style (Fenetre, windowstyle);
}


void Modifie_Fonte_Defaut_Fenetre (GtkWidget * Fenetre)
{
/*    GtkStyle *style = gtk_style_new();
    style->font_desc = pango_font_description_from_string ("Serif 8");//gdk_font_load("-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1");
    gtk_widget_set_style(GTK_WIDGET(Fenetre), style);*/
}


void Initialisation_Style(void){
	defStyle = gtk_widget_get_default_style ();	
}
