labwc/include/img/img-xpm.h
tokyo4j 16dbdc64e5 ssd: rework titlebar button rendering
- fix that icons for normal/hovered/rounded buttons are not placed
  exactly the same position
- fix blurry window button icons in scaled outputs

This commit introduces lab_img and scaled_img_buffer and uses them for
rendering icons in the window titlebar. Now the process of rendering
button icons are split into 2 phases: loading with lab_img_load() and
creating scene-nodes for them with scaled_img_buffer_create(). This
might incur some additional overhead since we no longer preload icon
textures, but the rendering of icon only happens for the first window
as backing buffers are shared and the overhead won't be noticeable.
This commit also simplifies the process of centering icon buffer in the
button, by creating icon buffers in a fixed geometry via
lab_img_render().
2024-12-23 18:11:32 +09:00

9 lines
208 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef LABWC_IMG_XPM_H
#define LABWC_IMG_XPM_H
struct lab_data_buffer;
struct lab_data_buffer *img_xpm_load(const char *filename);
#endif /* LABWC_IMG_XPM_H */