/*
 * $RCSfile: keypad_cfg.h,v $  $Revision: 1.3 $  $Name:  $
 * $Id: keypad_cfg.h,v 1.3 2006/10/04 05:21:45 bpaauwe Exp $
 * $Author: bpaauwe $
 * $Date: 2006/10/04 05:21:45 $
 * ----------------------------------------------------------------------------
 *
 *  Copyright (c) Bob Paauwe (2006)
 *
 *  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
 *
 * ----------------------------------------------------------------------------
 *
 *  Description:
 *    Header file for KeypadLinc configuration dialog box.
 * ----------------------------------------------------------------------------
 */
#ifndef _KEYPAD_CONFIG_H
#define _KEYPAD_CONFIG_H

#include <gtk/gtk.h>
#include "scenes.h"

extern ilib_t *iplc; /* device handle */
extern unsigned char need_to_save;

extern scene_t *scene_list;
extern device_t device_array[2000];
extern int last_device;

typedef struct _kpl_info_t {
	unsigned char last_on_level;
	unsigned char resume_dim_enable;
	unsigned char x10_house_code;
	unsigned char x10_unit_code;
	unsigned char current_level;
	unsigned char on_mask[8];
	unsigned char off_mask[8];
	unsigned char toggle_mask;
	unsigned char led_state;
	unsigned char x10_house_codes[8];
	unsigned char x10_unit_codes[8];
} kpl_info_t;

GtkWidget *kpl_dialog;
GtkWidget *kpl_image;
GtkWidget *kpl_selector;
GtkWidget *kpl_six_button;
GtkWidget *kpl_eight_button;
GtkWidget *kpl_resume_dim;
GtkWidget *kpl_resume_level;
GtkWidget *kpl_toggle[8];
GtkWidget *kpl_on[8][8];
GtkWidget *kpl_off[8][8];
GtkWidget *kpl_progress;

void on_kpl_configure_activate(GtkWidget *widget, gpointer user_data);
void on_kpl_selector_changed(GtkWidget *widget, gpointer user_data);
void on_kpl_cancel_clicked(GtkWidget *widget, gpointer user_data);
void on_kpl_apply_clicked(GtkWidget *widget, gpointer user_data);
void on_kpl_ok_clicked(GtkWidget *widget, gpointer user_data);


#endif
