#ifndef __ROCCAT_MACRO_EDITOR_BASIC_LIST_STORE_H__
#define __ROCCAT_MACRO_EDITOR_BASIC_LIST_STORE_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/roccat.h"
#include <gtk/gtk.h>

G_BEGIN_DECLS

#define ROCCAT_MACRO_EDITOR_BASIC_LIST_STORE_TYPE (roccat_macro_editor_basic_list_store_get_type())
#define ROCCAT_MACRO_EDITOR_BASIC_LIST_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ROCCAT_MACRO_EDITOR_BASIC_LIST_STORE_TYPE, RoccatMacroEditorBasicListStore))
#define IS_ROCCAT_MACRO_EDITOR_BASIC_LIST_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ROCCAT_MACRO_EDITOR_BASIC_LIST_STORE_TYPE))

typedef struct _RoccatMacroEditorBasicListStore RoccatMacroEditorBasicListStore;
typedef struct _RoccatMacroEditorBasicListStorePrivate RoccatMacroEditorBasicListStorePrivate;

struct _RoccatMacroEditorBasicListStore {
	GtkListStore parent;
	RoccatMacroEditorBasicListStorePrivate *priv;
};

GType roccat_macro_editor_basic_list_store_get_type(void);

RoccatMacroEditorBasicListStore *roccat_macro_editor_basic_list_store_new(void);

void roccat_macro_editor_basic_list_store_insert_single_action_key_before(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store, GtkTreeIter *sibling, guint key, guint action);
void roccat_macro_editor_basic_list_store_insert_dual_action_key_before(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store, GtkTreeIter *sibling, guint key);

/* Only inserts period if previous entry is key.
 * Returns FALSE if nothing was inserted.
 */
gboolean roccat_macro_editor_basic_list_store_insert_period_before(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store, GtkTreeIter *sibling, glong rel_time);

void roccat_macro_editor_basic_list_store_insert_keystroke_before(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store, GtkTreeIter *sibling, guint key, guint action, glong rel_time);
void roccat_macro_editor_basic_list_store_insert_roccat_macro_keystroke_before(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store, GtkTreeIter *sibling, RoccatMacroKeystroke const *keystroke);

gboolean roccat_macro_editor_basic_list_store_remove(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store, GtkTreeIter *iter);

RoccatMacroKeystrokes *roccat_macro_editor_basic_list_store_get_keystrokes(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store);
void roccat_macro_editor_basic_list_store_set_keystrokes(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store, RoccatMacroKeystrokes const *keystrokes);

void roccat_macro_editor_basic_list_store_set_value(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store, GtkTreeIter *iter, gchar const *text);

guint roccat_macro_editor_basic_list_store_icon_column(void);
guint roccat_macro_editor_basic_list_store_text_column(void);
guint roccat_macro_editor_basic_list_store_is_key_column(void);
guint roccat_macro_editor_basic_list_store_is_not_key_column(void);

void roccat_macro_editor_basic_list_store_set_modified(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store, gboolean state);
gboolean roccat_macro_editor_basic_list_store_get_modified(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store);
void roccat_macro_editor_basic_list_store_clear(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store);
gboolean roccat_macro_editor_basic_list_store_empty(RoccatMacroEditorBasicListStore *macro_editor_basic_list_store);

G_END_DECLS

#endif
