2005-10-15 22:07:02 -07:00
|
|
|
/*
|
|
|
|
* mootermtag.h
|
|
|
|
*
|
2006-02-23 06:03:17 -08:00
|
|
|
* Copyright (C) 2004-2006 by Yevgen Muntyan <muntyan@math.tamu.edu>
|
2005-10-15 22:07:02 -07:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* See COPYING file that comes with this distribution.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MOO_TERM_TAG_H__
|
|
|
|
#define __MOO_TERM_TAG_H__
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
2006-03-10 13:19:53 -08:00
|
|
|
#define MOO_TYPE_TERM_TEXT_ATTR (moo_term_text_attr_get_type ())
|
2005-10-15 22:07:02 -07:00
|
|
|
#define MOO_TYPE_TERM_TEXT_ATTR_MASK (moo_term_text_attr_mask_get_type ())
|
2005-11-06 22:56:33 -08:00
|
|
|
#define MOO_TYPE_TERM_TEXT_COLOR (moo_term_text_color_get_type ())
|
2005-10-15 22:07:02 -07:00
|
|
|
|
|
|
|
#define MOO_TYPE_TERM_TAG (moo_term_tag_get_type ())
|
|
|
|
#define MOO_TERM_TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MOO_TYPE_TERM_TAG, MooTermTag))
|
|
|
|
#define MOO_TERM_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOO_TYPE_TERM_TAG, MooTermTagClass))
|
|
|
|
#define MOO_IS_TERM_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MOO_TYPE_TERM_TAG))
|
|
|
|
#define MOO_IS_TERM_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOO_TYPE_TERM_TAG))
|
|
|
|
#define MOO_TERM_TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOO_TYPE_TERM_TAG, MooTermTagClass))
|
|
|
|
|
|
|
|
typedef struct _MooTermTextAttr MooTermTextAttr;
|
|
|
|
typedef struct _MooTermTag MooTermTag;
|
|
|
|
typedef struct _MooTermTagClass MooTermTagClass;
|
|
|
|
typedef struct _MooTermTagTable MooTermTagTable;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
MOO_TERM_TEXT_REVERSE = 1 << 0,
|
|
|
|
MOO_TERM_TEXT_BLINK = 1 << 1,
|
2006-03-10 13:19:53 -08:00
|
|
|
MOO_TERM_TEXT_BOLD = 1 << 2,
|
|
|
|
MOO_TERM_TEXT_UNDERLINE = 1 << 3,
|
|
|
|
MOO_TERM_TEXT_FOREGROUND = 1 << 4,
|
|
|
|
MOO_TERM_TEXT_BACKGROUND = 1 << 5
|
2005-10-15 22:07:02 -07:00
|
|
|
} MooTermTextAttrMask;
|
|
|
|
|
|
|
|
typedef enum {
|
2006-08-13 02:00:15 -07:00
|
|
|
MOO_TERM_BLACK,
|
|
|
|
MOO_TERM_RED,
|
|
|
|
MOO_TERM_GREEN,
|
|
|
|
MOO_TERM_YELLOW,
|
|
|
|
MOO_TERM_BLUE,
|
|
|
|
MOO_TERM_MAGENTA,
|
|
|
|
MOO_TERM_CYAN,
|
|
|
|
MOO_TERM_WHITE
|
2005-10-15 22:07:02 -07:00
|
|
|
} MooTermTextColor;
|
|
|
|
|
2006-08-13 02:00:15 -07:00
|
|
|
#define MOO_TERM_NUM_COLORS 8
|
2005-10-15 22:07:02 -07:00
|
|
|
|
|
|
|
struct _MooTermTextAttr {
|
2006-10-20 00:02:13 -07:00
|
|
|
guint mask : 6; /* MooTermTextAttrMask */
|
|
|
|
guint foreground : 3; /* MooTermTextColor */
|
|
|
|
guint background : 3; /* MooTermTextColor */
|
2005-10-15 22:07:02 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-08-13 02:00:15 -07:00
|
|
|
GType moo_term_text_attr_mask_get_type (void) G_GNUC_CONST;
|
|
|
|
GType moo_term_text_attr_get_type (void) G_GNUC_CONST;
|
|
|
|
GType moo_term_text_color_get_type (void) G_GNUC_CONST;
|
|
|
|
GType moo_term_tag_get_type (void) G_GNUC_CONST;
|
2005-10-15 22:07:02 -07:00
|
|
|
|
2006-08-13 02:00:15 -07:00
|
|
|
MooTermTextAttr *moo_term_text_attr_new (MooTermTextAttrMask mask,
|
|
|
|
MooTermTextColor fg,
|
|
|
|
MooTermTextColor bg);
|
2006-03-10 13:19:53 -08:00
|
|
|
|
2006-08-13 02:00:15 -07:00
|
|
|
void moo_term_tag_set_attr (MooTermTag *tag,
|
|
|
|
MooTermTextAttr *attr);
|
|
|
|
void moo_term_tag_set_attributes (MooTermTag *tag,
|
|
|
|
MooTermTextAttrMask mask,
|
|
|
|
MooTermTextColor fg,
|
|
|
|
MooTermTextColor bg);
|
2005-10-15 22:07:02 -07:00
|
|
|
|
2006-08-13 02:00:15 -07:00
|
|
|
const char *moo_term_tag_get_name (MooTermTag *tag);
|
|
|
|
const MooTermTextAttr *moo_term_tag_get_attr (MooTermTag *tag);
|
2005-10-15 22:07:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __MOO_TERM_TAG_H__ */
|