#ifndef __RYOSCONFIG_KEY_COMBO_BOX_H__
#define __RYOSCONFIG_KEY_COMBO_BOX_H__

/*
 * This file is part of roccat-tools.
 *
 * roccat-tools 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.
 *
 * roccat-tools 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 roccat-tools. If not, see <http://www.gnu.org/licenses/>.
 */

#include "roccat/ryos.h"
#include "roccat_key_combo_box.h"

G_BEGIN_DECLS

#define RYOSCONFIG_KEY_COMBO_BOX_TYPE (ryosconfig_key_combo_box_get_type())
#define RYOSCONFIG_KEY_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), RYOSCONFIG_KEY_COMBO_BOX_TYPE, RyosconfigKeyComboBox))
#define IS_RYOSCONFIG_KEY_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), RYOSCONFIG_KEY_COMBO_BOX_TYPE))

typedef struct _RyosconfigKeyComboBox RyosconfigKeyComboBox;
typedef struct _RyosconfigKeyComboBoxData RyosconfigKeyComboBoxData;

/* primary is extracted from key */
struct _RyosconfigKeyComboBoxData {
	RyosKey key;
	RyosMacro macro;
	RyosRkpTimer timer;
	RyosRkpQuicklaunch quicklaunch;
	RyosRkpTalk talk;
};

typedef enum {
	RYOSCONFIG_KEY_COMBO_BOX_GROUP_EXTENDED = ROCCAT_KEY_COMBO_BOX_GROUP_LAST << 0, // needs key and macro/timer/quicklaunch
	RYOSCONFIG_KEY_COMBO_BOX_GROUP_KEY = ROCCAT_KEY_COMBO_BOX_GROUP_LAST << 1, // needs key
	RYOSCONFIG_KEY_COMBO_BOX_GROUP_PRIMARY = ROCCAT_KEY_COMBO_BOX_GROUP_LAST << 2, // only primary key
	RYOSCONFIG_KEY_COMBO_BOX_GROUP_TALK = ROCCAT_KEY_COMBO_BOX_GROUP_LAST << 3, // needs key and talk
} RyosconfigKeyComboBoxGroup;

GType ryosconfig_key_combo_box_get_type(void);
GtkWidget *ryosconfig_key_combo_box_new(guint mask, guint standard);

void ryosconfig_key_combo_box_set_data_pointer(RyosconfigKeyComboBox *key_combo_box, RyosconfigKeyComboBoxData *data);
RyosconfigKeyComboBoxData *ryosconfig_key_combo_box_get_data_pointer(RyosconfigKeyComboBox *key_combo_box);
void ryosconfig_key_combo_box_update(RyosconfigKeyComboBox *key_combo_box);

void ryosconfig_key_combo_box_set_standard(RyosconfigKeyComboBox *key_combo_box, guint standard);
gchar *ryosconfig_key_combo_box_get_text_for_data(RyosconfigKeyComboBox *key_combo_box, RyosconfigKeyComboBoxData const *data);

G_END_DECLS

#endif
