diff --git a/common/draw.c b/common/draw.c index 3c9e8378..2f73cf60 100644 --- a/common/draw.c +++ b/common/draw.c @@ -43,19 +43,6 @@ #include "common/markup.h" #include "common/xutil.h" -void -draw_parser_data_init(draw_parser_data_t *pdata) -{ - p_clear(pdata, 1); -} - -void -draw_parser_data_wipe(draw_parser_data_t *pdata) -{ - if(pdata) - draw_image_delete(&pdata->bg_image); -} - static iconv_t iso2utf8 = (iconv_t) -1; /** Convert text from any charset to UTF-8 using iconv. diff --git a/common/draw.h b/common/draw.h index a61f97b7..a50a6f17 100644 --- a/common/draw.h +++ b/common/draw.h @@ -198,9 +198,6 @@ typedef struct } border; } draw_parser_data_t; -void draw_parser_data_init(draw_parser_data_t *); -void draw_parser_data_wipe(draw_parser_data_t *); - bool draw_text_markup_expand(draw_parser_data_t *, const char *, ssize_t); void draw_text(draw_context_t *, font_t *, area_t, const char *, ssize_t len, draw_parser_data_t *); @@ -243,5 +240,19 @@ bool xcolor_init_reply(xcb_connection_t *, xcolor_init_request_t); void area_array_remove(area_array_t *, area_t); +static inline void +draw_parser_data_init(draw_parser_data_t *pdata) +{ + p_clear(pdata, 1); +} + +static inline void +draw_parser_data_wipe(draw_parser_data_t *pdata) +{ + p_delete(&pdata->text); + if(pdata) + draw_image_delete(&pdata->bg_image); +} + #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80