#ifndef __ROCCAT_MACRO_H__
#define __ROCCAT_MACRO_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_macro_keystrokes.h"

G_BEGIN_DECLS

typedef struct _RoccatMacro RoccatMacro;

struct _RoccatMacro {
	gchar *macro_set, *macro;
	RoccatMacroKeystrokes keystrokes;
};

/*!
 * \brief sets macro set name
 */
void roccat_macro_set_macro_set_name(RoccatMacro *macro, gchar const *new_name);

/*!
 * \brief sets macro name
 */
void roccat_macro_set_macro_name(RoccatMacro *macro, gchar const *new_name);

/*!
 * \brief get complete name in format macroset/macro
 */
gchar *roccat_macro_get_name_joined(RoccatMacro const *macro);

RoccatMacroKeystrokes *roccat_macro_get_keystrokes(RoccatMacro *macro);

/*!
 * \brief add keystroke to macro
 * \retval If successful \c TRUE is returned.
 *         \c FALSE is returned if number of keystrokes is exceeded and keystroke was not added.
 */
gboolean roccat_macro_add_keystroke(RoccatMacro *macro, RoccatMacroKeystroke const *keystroke);

/*!
 * \brief creates new macro
 *
 * \e keystrokes can be \c NULL. In this case an empty macro is created.
 *
 * \retval macro
 */
RoccatMacro *roccat_macro_new(gchar const *macro_set_name, gchar const *macro_name, RoccatMacroKeystrokes const *keystrokes);

/*!
 * \brief duplicates a macro
 * \retval macro that has to be freed with \c roccat_macro_free()
 */
RoccatMacro *roccat_macro_dup(RoccatMacro const *roccat_macro);

/*!
 * \brief has macro mouse keystrokes
 * \retval \c TRUE if macro has mouse keystroke, \c FALSE else.
 */
gboolean roccat_macro_has_mouse_keystroke(RoccatMacro const *roccat_macro);

/*!
 * \brief TODO doc
 */
void roccat_macro_free(RoccatMacro *macro);

G_END_DECLS

#endif
