mirror of
https://github.com/swaywm/sway.git
synced 2025-11-01 22:58:41 -04:00
Add text rendering support to wayland clients
This commit is contained in:
parent
5a369b3132
commit
82d464bb90
5 changed files with 87 additions and 2 deletions
12
include/client/pango.h
Normal file
12
include/client/pango.h
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef _SWAY_CLIENT_PANGO_H
|
||||
#define _SWAY_CLIENT_PANGO_H
|
||||
|
||||
#include "client/window.h"
|
||||
#include "client/buffer.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
PangoLayout *get_pango_layout(struct window *window, struct buffer *buffer, const char *text);
|
||||
void get_text_size(struct window *window, int *width, int *height, const char *fmt, ...);
|
||||
void pango_printf(struct window *window, const char *fmt, ...);
|
||||
|
||||
#endif
|
||||
|
|
@ -34,6 +34,7 @@ struct window {
|
|||
struct wl_callback *frame_cb;
|
||||
struct cursor cursor;
|
||||
uint32_t width, height;
|
||||
char *font;
|
||||
cairo_t *cairo;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue