qulogic/talkatu

Add some additional tags for rendering more complex documents in pidgin
/*
* talkatu
* Copyright (C) 2017-2018 Gary Kramlich <grim@reaperworld.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#if !defined(TALKATU_GLOBAL_HEADER_INSIDE) && !defined(TALKATU_COMPILATION)
#error "only <talkatu.h> may be included directly"
#endif
#ifndef TALKATU_ACTION_GROUP_H
#define TALKATU_ACTION_GROUP_H
#include <gio/gio.h>
#include <gtk/gtk.h>
#define TALKATU_TYPE_ACTION_GROUP (talkatu_action_group_get_type())
#define TALKATU_ACTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TALKATU_TYPE_ACTION_GROUP, TalkatuActionGroup))
#define TALKATU_ACTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TALKATU_TYPE_ACTION_GROUP, TalkatuActionGroupClass))
#define TALKATU_IS_ACTION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TALKATU_TYPE_ACTION_GROUP))
#define TALKATU_IS_ACTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), TALKATU_TYPE_ACTION_GROUP))
#define TALKATU_ACTION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TALKATU_TYPE_ACTION_GROUP, TalkatuActionGroupClass))
typedef struct _TalkatuActionGroup TalkatuActionGroup;
typedef struct _TalkatuActionGroupClass TalkatuActionGroupClass;
struct _TalkatuActionGroup {
GSimpleActionGroup parent;
void (*_talkatu_reserved1)(void);
void (*_talkatu_reserved2)(void);
void (*_talkatu_reserved3)(void);
void (*_talkatu_reserved4)(void);
};
struct _TalkatuActionGroupClass {
GSimpleActionGroupClass parent;
void (*action_activated)(TalkatuActionGroup *ag, GAction *action, const gchar *name);
void (*_talkatu_reserved1)(void);
void (*_talkatu_reserved2)(void);
void (*_talkatu_reserved3)(void);
void (*_talkatu_reserved4)(void);
};
#define TALKATU_ACTION_FORMAT_BOLD ("format-bold")
#define TALKATU_ACTION_FORMAT_ITALIC ("format-italic")
#define TALKATU_ACTION_FORMAT_UNDERLINE ("format-underline")
#define TALKATU_ACTION_FORMAT_STRIKETHROUGH ("format-strikethrough")
#define TALKATU_ACTION_FORMAT_GROW ("format-grow")
#define TALKATU_ACTION_FORMAT_SHRINK ("format-shrink")
#define TALKATU_ACTION_FORMAT_RESET ("format-reset")
#define TALKATU_ACTION_INSERT_LINK ("insert-link")
G_BEGIN_DECLS
GType talkatu_action_group_get_type(void);
GSimpleActionGroup *talkatu_action_group_new(GtkTextBuffer *buffer);
GtkTextBuffer *talkatu_action_group_get_buffer(TalkatuActionGroup *ag);
void talkatu_action_group_enable_action(TalkatuActionGroup *ag, const gchar *name);
const gchar *talkatu_action_name_for_tag_name(const gchar *tag_name);
void talkatu_action_group_activate_format(TalkatuActionGroup *ag, const gchar *format_name);
gboolean talkatu_action_group_get_action_activated(TalkatuActionGroup *ag, const gchar *name);
gchar **talkatu_action_group_get_activated_formats(TalkatuActionGroup *ag);
G_END_DECLS
#endif /* TALKATU_ACTIONGROUP_H */