保存图标像素数据指针以便退出时释放对应的内存
This commit is contained in:
@@ -166,20 +166,17 @@ typedef struct {
|
||||
char time[256];
|
||||
} status_t;
|
||||
|
||||
typedef struct icon_res_t {
|
||||
/* 图像像素数据(RGBA 顺序) */
|
||||
uint32_t *pixels;
|
||||
/* cairo_surface_t * 类型,为避免引入 cairo 头文件使用 void * 类型代替 */
|
||||
void *surface;
|
||||
} icon_res_t;
|
||||
typedef struct icons_t {
|
||||
/* 像素数据 */
|
||||
uint32_t *net_down_pixels;
|
||||
uint32_t *net_up_pixels;
|
||||
uint32_t *volume_pixels;
|
||||
uint32_t *memory_pixels;
|
||||
uint32_t *cpu_pixels;
|
||||
uint32_t *clock_pixels;
|
||||
|
||||
/* cairo_t * 类型,为避免引入 cairo 库使用 void * 类型代替 */
|
||||
void *net_down;
|
||||
void *net_up;
|
||||
void *volume;
|
||||
void *memory;
|
||||
void *cpu;
|
||||
void *clock;
|
||||
icon_res_t net_down;
|
||||
icon_res_t net_up;
|
||||
icon_res_t volume;
|
||||
icon_res_t memory;
|
||||
icon_res_t cpu;
|
||||
icon_res_t clock;
|
||||
} icons_t;
|
||||
|
||||
Reference in New Issue
Block a user