]> Dogcows Code - chaz/tint2/blob - src/util/common.h
*fix* more systray modifications for nice looking icons in real transparency mode
[chaz/tint2] / src / util / common.h
1 /**************************************************************************
2 * Common declarations
3 *
4 **************************************************************************/
5
6 #ifndef COMMON_H
7 #define COMMON_H
8
9
10 #define WM_CLASS_TINT "panel"
11
12 #include <Imlib2.h>
13 #include "area.h"
14
15 /*
16 void fxfree(void** ptr){
17 if(*ptr){
18 free(*ptr);
19 *ptr=NULL;
20 }
21 }
22 FXint fxmalloc(void** ptr,unsigned long size){
23 *ptr=NULL;
24 if(size!=0){
25 if((*ptr=malloc(size))==NULL) return FALSE;
26 }
27 return TRUE;
28 }
29 */
30
31 // mouse actions
32 enum { NONE=0, CLOSE, TOGGLE, ICONIFY, SHADE, TOGGLE_ICONIFY, MAXIMIZE_RESTORE, MAXIMIZE, RESTORE, DESKTOP_LEFT, DESKTOP_RIGHT, NEXT_TASK, PREV_TASK };
33
34 #define ALLDESKTOP 0xFFFFFFFF
35
36
37 typedef struct config_border
38 {
39 double color[3];
40 double alpha;
41 int width;
42 int rounded;
43 } config_border;
44
45
46 typedef struct config_color
47 {
48 double color[3];
49 double alpha;
50 } config_color;
51
52
53 // copy file source to file dest
54 void copy_file(const char *pathSrc, const char *pathDest);
55
56 // extract key = value
57 int parse_line (const char *line, char **key, char **value);
58
59 // conversion
60 int hex_char_to_int (char c);
61 int hex_to_rgb (char *hex, int *r, int *g, int *b);
62 void get_color (char *hex, double *rgb);
63
64 // adjust Alpha/Saturation/Brightness on an ARGB icon
65 // alpha from 0 to 100, satur from 0 to 1, bright from 0 to 1.
66 void adjust_asb(DATA32 *data, int w, int h, int alpha, float satur, float bright);
67 void createHeuristicMask(DATA32* data, int w, int h);
68 #endif
69
This page took 0.039823 seconds and 4 git commands to generate.