keramik.c

来自「超强的嵌入式GUI系统」· C语言 代码 · 共 831 行 · 第 1/5 页

C
831
字号
/* * Theme keramik Plugin */#include <stdio.h>#include <stdlib.h>#include <string.h>#include "xynth_.h"#include "server.h"static void theme_set (s_image_t *img, unsigned int *data, int a, int b){	img->w = a;	img->h = b;	img->rgba = (unsigned int *) s_malloc(a * b * sizeof(unsigned int) + 1);	memcpy(img->rgba, data, a * b * sizeof(unsigned int));}/* * top-left-inactive.xpm */static void top_left_inactive_xpm (s_image_t *img){	unsigned int rgba[377] = {	0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 	0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 	0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 	0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xfefefe00, 0xfefefe00, 0xfefefe00, 0xfefefe00, 0xfefefe00, 	0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xfefefe00, 0xfefefe00, 0xfefefe00, 0xfefefe00, 0xfefefe00, 0xfefefe00, 0xfefefe00, 	0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xfefefe00, 0xfefefe00, 0xfefefe00, 0xfefefe00, 0xfbfcfc00, 0xf7f9fa00, 0xf6f8fa00, 0xf4f6f800, 0xf3f6f800, 	0x000000ff, 0x000000ff, 0x000000ff, 0xfefefe00, 0xfefefe00, 0xfefefe00, 0xfdfdfd00, 0xf6f8fa00, 0xf3f6f800, 0xf3f6f800, 0xf3f6f800, 0xf3f6f800, 0xf3f6f800, 	0x000000ff, 0x000000ff, 0xfefefe00, 0xfefefe00, 0xfefefe00, 0xf9fafc00, 0xf3f6f800, 0xf3f6f800, 0xf3f6f800, 0xf3f6f800, 0xf3f6f800, 0xf3f6f800, 0xf3f6f800, 	0x000000ff, 0x000000ff, 0xfefefe00, 0xfefefe00, 0xf8f9fb00, 0xf3f5f800, 0xf3f5f800, 0xf3f5f800, 0xf3f5f800, 0xf3f5f800, 0xf3f5f800, 0xf3f5f800, 0xf3f5f800, 	0x000000ff, 0xfefefe00, 0xfefefe00, 0xfbfbfc00, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 	0x000000ff, 0xfefefe00, 0xfefefe00, 0xf4f6f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 0xf2f5f800, 	0xfefefe00, 0xfefefe00, 0xfafbfc00, 0xf2f5f700, 0xf2f5f700, 0xf2f5f700, 0xf2f5f700, 0xf2f5f700, 0xf2f5f700, 0xf2f5f700, 0xf2f5f700, 0xf2f5f700, 0xf2f5f700, 	0xfefefe00, 0xfefefe00, 0xf6f8fa00, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 	0xfefefe00, 0xfefefe00, 0xf3f5f800, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 0xf1f4f700, 	0xfefefe00, 0xfefefe00, 0xf0f4f700, 0xf0f4f700, 0xf0f4f700, 0xf0f4f700, 0xf0f4f700, 0xf0f4f700, 0xf0f4f700, 0xf0f4f700, 0xf0f4f700, 0xf0f4f700, 0xf0f4f700, 	0xfefefe00, 0xfefefe00, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 	0xfefefe00, 0xfefefe00, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 0xf0f3f600, 	0xfefefe00, 0xfefefe00, 0xeff3f600, 0xeff3f600, 0xeff3f600, 0xeff3f600, 0xeff3f600, 0xeff3f600, 0xeff3f600, 0xeff3f600, 0xeff3f600, 0xeff3f600, 0xeff3f600, 	0xfefefe00, 0xfefefe00, 0xeff2f600, 0xeff2f600, 0xeff2f600, 0xeff2f600, 0xeff2f600, 0xeff2f600, 0xeff2f600, 0xeff2f600, 0xeff2f600, 0xeff2f600, 0xeff2f600, 	0xfefefe00, 0xfefefe00, 0xeef2f600, 0xeef2f600, 0xeef2f600, 0xeef2f600, 0xeef2f600, 0xeef2f600, 0xeef2f600, 0xeef2f600, 0xeef2f600, 0xeef2f600, 0xeef2f600, 	0xfefefe00, 0xfefefe00, 0xeef2f500, 0xeef2f500, 0xeef2f500, 0xeef2f500, 0xeef2f500, 0xeef2f500, 0xeef2f500, 0xeef2f500, 0xeef2f500, 0xeef2f500, 0xeef2f500, 	0xfefefe00, 0xfefefe00, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 	0xfefefe00, 0xfefefe00, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 	0xfefefe00, 0xfefefe00, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 0xedf1f500, 	0xfefefe00, 0xfefefe00, 0xecf0f400, 0xecf0f400, 0xecf0f400, 0xecf0f400, 0xecf0f400, 0xecf0f400, 0xecf0f400, 0xecf0f400, 0xecf0f400, 0xecf0f400, 0xecf0f400, 	0xfefefe00, 0xfefefe00, 0xe8ecf000, 0xe8ecf000, 0xe8ecf000, 0xe8ecf000, 0xe8ecf000, 0xe8ecf000, 0xe8ecf000, 0xe8ecf000, 0xe8ecf000, 0xe8ecf000, 0xe8ecf000, 	0xfefefe00, 0xfefefe00, 0xe4e8ec00, 0xe4e8ec00, 0xe4e8ec00, 0xe4e8ec00, 0xe4e8ec00, 0xe4e8ec00, 0xe4e8ec00, 0xe4e8ec00, 0xe4e8ec00, 0xe4e8ec00, 0xe4e8ec00, 	0xfefefe00, 0xfefefe00, 0xe2e6ea00, 0xe2e6ea00, 0xe2e6ea00, 0xe2e6ea00, 0xe2e6ea00, 0xe2e6ea00, 0xe2e6ea00, 0xe2e6ea00, 0xe2e6ea00, 0xe2e6ea00, 0xe2e6ea00, 	0xfefefe00, 0xfefefe00, 0xc8cccf00, 0xc8cccf00, 0xc8cccf00, 0xc8cccf00, 0xc8cccf00, 0xc8cccf00, 0xc8cccf00, 0xc8cccf00, 0xc8cccf00, 0xc8cccf00, 0xc8cccf00, 	};	theme_set(img, rgba, 13, 29);}/* * top-left-active.xpm */static void top_left_active_xpm (s_image_t *img){	unsigned int rgba[377] = {	0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 	0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 	0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 	0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xfdfdfe00, 0xfdfdfe00, 0xfdfdfe00, 0xfdfdfe00, 0xfdfdfe00, 	0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xfdfdfe00, 0xfdfdfe00, 0xfdfdfe00, 0xfdfdfe00, 0xfdfdfe00, 0xfdfdfe00, 0xfdfdfe00, 	0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xfdfdfe00, 0xfdfdfe00, 0xfdfdfe00, 0xf9fbfc00, 0xcddee600, 0x9bbdce00, 0x85afc400, 0x6b9eb700, 0x679bb500, 	0x000000ff, 0x000000ff, 0x000000ff, 0xfdfdfe00, 0xfdfdfe00, 0xfdfdfe00, 0xe4edf100, 0x85afc400, 0x659ab400, 0x659ab400, 0x659ab400, 0x659ab400, 0x659ab400, 	0x000000ff, 0x000000ff, 0xfdfdfe00, 0xfdfdfe00, 0xfdfdfe00, 0xb5cfdb00, 0x679bb500, 0x6197b200, 0x6197b200, 0x6197b200, 0x6197b200, 0x6197b200, 0x6197b200, 	0x000000ff, 0x000000ff, 0xfdfdfe00, 0xfdfdfe00, 0xa6c5d400, 0x5d95b000, 0x5d95b000, 0x5d95b000, 0x5d95b000, 0x5d95b000, 0x5d95b000, 0x5d95b000, 0x5d95b000, 	0x000000ff, 0xfdfdfe00, 0xfdfdfe00, 0xc9dbe400, 0x5992af00, 0x5992af00, 0x5992af00, 0x5992af00, 0x5992af00, 0x5992af00, 0x5992af00, 0x5992af00, 0x5992af00, 	0x000000ff, 0xfdfdfe00, 0xf9fbfc00, 0x6b9eb700, 0x5590ad00, 0x5590ad00, 0x5590ad00, 0x5590ad00, 0x5590ad00, 0x5590ad00, 0x5590ad00, 0x5590ad00, 0x5590ad00, 	0xfdfdfe00, 0xfdfdfe00, 0xc3d8e200, 0x508caa00, 0x508caa00, 0x508caa00, 0x508caa00, 0x508caa00, 0x508caa00, 0x508caa00, 0x508caa00, 0x508caa00, 0x508caa00, 	0xfdfdfe00, 0xfdfdfe00, 0x8bb3c700, 0x4a88a700, 0x4a88a700, 0x4a88a700, 0x4a88a700, 0x4a88a700, 0x4a88a700, 0x4a88a700, 0x4a88a700, 0x4a88a700, 0x4a88a700, 	0xfdfdfe00, 0xfdfdfe00, 0x5b94af00, 0x4484a400, 0x4484a400, 0x4484a400, 0x4484a400, 0x4484a400, 0x4484a400, 0x4484a400, 0x4484a400, 0x4484a400, 0x4484a400, 	0xfdfdfe00, 0xfdfdfe00, 0x3e81a200, 0x3e81a200, 0x3e81a200, 0x3e81a200, 0x3e81a200, 0x3e81a200, 0x3e81a200, 0x3e81a200, 0x3e81a200, 0x3e81a200, 0x3e81a200, 	0xfdfdfe00, 0xfdfdfe00, 0x397d9f00, 0x397d9f00, 0x397d9f00, 0x397d9f00, 0x397d9f00, 0x397d9f00, 0x397d9f00, 0x397d9f00, 0x397d9f00, 0x397d9f00, 0x397d9f00, 	0xfdfdfe00, 0xfdfdfe00, 0x33799c00, 0x33799c00, 0x33799c00, 0x33799c00, 0x33799c00, 0x33799c00, 0x33799c00, 0x33799c00, 0x33799c00, 0x33799c00, 0x33799c00, 	0xfdfdfe00, 0xfdfdfe00, 0x2d759900, 0x2d759900, 0x2d759900, 0x2d759900, 0x2d759900, 0x2d759900, 0x2d759900, 0x2d759900, 0x2d759900, 0x2d759900, 0x2d759900, 	0xfdfdfe00, 0xfdfdfe00, 0x27729600, 0x27729600, 0x27729600, 0x27729600, 0x27729600, 0x27729600, 0x27729600, 0x27729600, 0x27729600, 0x27729600, 0x27729600, 	0xfdfdfe00, 0xfdfdfe00, 0x216e9400, 0x216e9400, 0x216e9400, 0x216e9400, 0x216e9400, 0x216e9400, 0x216e9400, 0x216e9400, 0x216e9400, 0x216e9400, 0x216e9400, 	0xfdfdfe00, 0xfdfdfe00, 0x1c6a9100, 0x1c6a9100, 0x1c6a9100, 0x1c6a9100, 0x1c6a9100, 0x1c6a9100, 0x1c6a9100, 0x1c6a9100, 0x1c6a9100, 0x1c6a9100, 0x1c6a9100, 	0xfdfdfe00, 0xfdfdfe00, 0x16668e00, 0x16668e00, 0x16668e00, 0x16668e00, 0x16668e00, 0x16668e00, 0x16668e00, 0x16668e00, 0x16668e00, 0x16668e00, 0x16668e00, 	0xfdfdfe00, 0xfdfdfe00, 0x10638b00, 0x10638b00, 0x10638b00, 0x10638b00, 0x10638b00, 0x10638b00, 0x10638b00, 0x10638b00, 0x10638b00, 0x10638b00, 0x10638b00, 	0xfdfdfe00, 0xfdfdfe00, 0x0c608900, 0x0c608900, 0x0c608900, 0x0c608900, 0x0c608900, 0x0c608900, 0x0c608900, 0x0c608900, 0x0c608900, 0x0c608900, 0x0c608900, 	0xfdfdfe00, 0xfdfdfe00, 0x095e8700, 0x095e8700, 0x095e8700, 0x095e8700, 0x095e8700, 0x095e8700, 0x095e8700, 0x095e8700, 0x095e8700, 0x095e8700, 0x095e8700, 	0xfdfdfe00, 0xfdfdfe00, 0x095c8500, 0x095c8500, 0x095c8500, 0x095c8500, 0x095c8500, 0x095c8500, 0x095c8500, 0x095c8500, 0x095c8500, 0x095c8500, 0x095c8500, 	0xfdfdfe00, 0xfdfdfe00, 0x095b8300, 0x095b8300, 0x095b8300, 0x095b8300, 0x095b8300, 0x095b8300, 0x095b8300, 0x095b8300, 0x095b8300, 0x095b8300, 0x095b8300, 	0xfdfdfe00, 0xfdfdfe00, 0x095a8200, 0x095a8200, 0x095a8200, 0x095a8200, 0x095a8200, 0x095a8200, 0x095a8200, 0x095a8200, 0x095a8200, 0x095a8200, 0x095a8200, 	0xfdfdfe00, 0xfdfdfe00, 0x08507300, 0x08507300, 0x08507300, 0x08507300, 0x08507300, 0x08507300, 0x08507300, 0x08507300, 0x08507300, 0x08507300, 0x08507300, 	};	theme_set(img, rgba, 13, 29);}/* * title-1-inactive.xpm */static void title_1_inactive_xpm (s_image_t *img){	unsigned int rgba[29] = {	0x000000ff, 	0x000000ff, 	0x000000ff, 	0xfefefe00, 	0xfefefe00, 	0xf3f6f800, 	0xf3f6f800, 	0xf3f6f800, 	0xf3f5f800, 	0xf2f5f800, 	0xf2f5f800, 	0xf2f5f700, 	0xf1f4f700, 	0xf1f4f700, 	0xf0f4f700, 	0xf0f3f600, 	0xf0f3f600, 	0xeff3f600, 	0xeff2f600, 	0xeef2f600, 	0xeef2f500, 	0xedf1f500, 	0xedf1f500, 	0xedf1f500, 	0xecf0f400, 	0xe8ecf000, 	0xe4e8ec00, 	0xe2e6ea00, 	0xc8cccf00, 	};	theme_set(img, rgba, 1, 29);}/* * title-1-active.xpm */static void title_1_active_xpm (s_image_t *img){	unsigned int rgba[29] = {	0x000000ff, 	0x000000ff, 	0x000000ff, 	0xfdfdfe00, 	0xfdfdfe00, 	0x679bb500, 	0x659ab400, 	0x6197b200, 	0x5d95b000, 	0x5992af00, 	0x5590ad00, 	0x508caa00, 	0x4a88a700, 	0x4484a400, 	0x3e81a200, 	0x397d9f00, 	0x33799c00, 	0x2d759900, 	0x27729600, 	0x216e9400, 	0x1c6a9100, 	0x16668e00, 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?