]> Dogcows Code - chaz/tint2/blob - src/util/common.h
e62051107c28aa29107dd3573678dd8530af6297
[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 // copy file source to file dest
38 void copy_file(const char *pathSrc, const char *pathDest);
39
40 // extract key = value
41 int parse_line (const char *line, char **key, char **value);
42
43 // conversion
44 int hex_char_to_int (char c);
45 int hex_to_rgb (char *hex, int *r, int *g, int *b);
46 void get_color (char *hex, double *rgb);
47
48 // adjust Alpha/Saturation/Brightness on an ARGB icon
49 // alpha from 0 to 100, satur from 0 to 1, bright from 0 to 1.
50 void adjust_asb(DATA32 *data, int w, int h, int alpha, float satur, float bright);
51 void createHeuristicMask(DATA32* data, int w, int h);
52
53 void render_image(Drawable d, int x, int y, int w, int h);
54 #endif
55
This page took 0.041081 seconds and 3 git commands to generate.