aosd-text.h | aosd-text.h | |||
---|---|---|---|---|
/* aosd -- OSD with transparency, cairo, and pango. | /* aosd -- OSD with transparency, cairo, and pango. | |||
* | * | |||
* Copyright (C) 2007 Eugene Paskevich <eugene@raptor.kiev.ua> | * Copyright (C) 2007,2010 Eugene Paskevich <eugene@raptor.kiev.ua> | |||
*/ | */ | |||
#ifndef __AOSD_TEXT_H__ | #ifndef __AOSD_TEXT_H__ | |||
#define __AOSD_TEXT_H__ | #define __AOSD_TEXT_H__ | |||
#include <aosd.h> | #include <aosd.h> | |||
#include "pango/pangocairo.h" | #include "pango/pangocairo.h" | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
skipping to change at line 27 | skipping to change at line 27 | |||
// Tiny Pango API augmentation | // Tiny Pango API augmentation | |||
// Way more convenient for aosd. | // Way more convenient for aosd. | |||
PangoLayout* pango_layout_new_aosd(void); | PangoLayout* pango_layout_new_aosd(void); | |||
void pango_layout_unref_aosd(PangoLayout* lay); | void pango_layout_unref_aosd(PangoLayout* lay); | |||
void pango_layout_get_size_aosd(PangoLayout* lay, | void pango_layout_get_size_aosd(PangoLayout* lay, | |||
unsigned* width, unsigned* height, int* lbearing); | unsigned* width, unsigned* height, int* lbearing); | |||
// Converts all \n occurrences into U+2028 symbol | // Converts all \n occurrences into U+2028 symbol | |||
void pango_layout_set_text_aosd(PangoLayout* lay, char* text); | void pango_layout_set_text_aosd(PangoLayout* lay, const char* text); | |||
void pango_layout_set_attr_aosd(PangoLayout* lay, PangoAttribute* attr); | void pango_layout_set_attr_aosd(PangoLayout* lay, PangoAttribute* attr); | |||
void pango_layout_set_font_aosd(PangoLayout* lay, char* font_desc); | void pango_layout_set_font_aosd(PangoLayout* lay, const char* font_desc); | |||
typedef struct | typedef struct | |||
{ | { | |||
PangoLayout* lay; | PangoLayout* lay; | |||
int lbearing; | int lbearing; | |||
struct | struct | |||
{ | { | |||
guint8 x_offset; | guint8 x_offset; | |||
guint8 y_offset; | guint8 y_offset; | |||
} geom; | } geom; | |||
struct | struct | |||
{ | { | |||
char* color; | const char* color; | |||
guint8 opacity; | guint8 opacity; | |||
} back; | } back; | |||
struct | struct | |||
{ | { | |||
char* color; | const char* color; | |||
guint8 opacity; | guint8 opacity; | |||
gint8 x_offset; | gint8 x_offset; | |||
gint8 y_offset; | gint8 y_offset; | |||
} shadow; | } shadow; | |||
struct | struct | |||
{ | { | |||
char* color; | const char* color; | |||
guint8 opacity; | guint8 opacity; | |||
} fore; | } fore; | |||
} TextRenderData; | } TextRenderData; | |||
void aosd_text_renderer(cairo_t* cr, void* TextRenderData_ptr); | void aosd_text_renderer(cairo_t* cr, void* TextRenderData_ptr); | |||
void aosd_text_get_size(TextRenderData* trd, unsigned* width, unsigned* hei ght); | void aosd_text_get_size(TextRenderData* trd, unsigned* width, unsigned* hei ght); | |||
int aosd_text_get_screen_wrap_width(Aosd* aosd, TextRenderData* trd); | int aosd_text_get_screen_wrap_width(Aosd* aosd, TextRenderData* trd); | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
End of changes. 6 change blocks. | ||||
6 lines changed or deleted | 6 lines changed or added | |||