#ifndef __style_h_ #define __style_h_ #include "stylesheet.h" #include "text.h" typedef enum AlignMode { ALIGN_NONE, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, ALIGN_JUSTIFY, ALIGN_TOP, ALIGN_MIDDLE, ALIGN_ABSMIDDLE, ALIGN_BOTTOM } AlignMode; typedef enum { FONTSTYLE_NORMAL, FONTSTYLE_ITALIC, FONTSTYLE_OBLIQUE } FontStyleType; typedef enum { FONTVARIANT_NORMAL, FONTVARIANT_SMALL_CAPS } FontVariantType; typedef enum { BG_REPEAT, BG_REPEAT_X, BG_REPEAT_Y, NO_REPEAT } BgRepeatType; typedef enum { BG_SCROLL, BG_FIXED } BgAttachment; typedef struct InlineStyleInfo { struct StyleInfo *next; /* font */ SSTerm font_family; FontStyleType font_style; FontVariantType font_variant; int font_weight; SSTerm font_size; /* color */ u_long color; /* background */ u_long bg_color; char *bg_image; BgRepeatType bg_repeat; BgAttachment bg_attachment; int bg_position_x; int bg_position_y; /* text */ int word_spacing; int letter_spacing; int text_decoration; int vertical_align; int text_indent; int size; /* current font size */ int fonttype; /* current font type */ OC *oc; u_long pixel; /* color pixel */ } InlineStyleInfo; typedef struct { int margin_top; int margin_right; int margin_bottom; int margin_left; int border_top_width; int border_right_width; int border_bottom_width; int border_left_width; int padding_top; int padding_right; int padding_bottom; int padding_left; int width; int height; int floar; int clear; AlignMode text_align; SSTerm line_height; } BlockStyleInfo; BlockStyleInfo *blockstyleinfo_new(void); void blockstyleinfo_delete(BlockStyleInfo *p); #endif