]> Dogcows Code - chaz/tint2/blob - src/util/common.h
*fix* use -pthread also for tint2 because we're using processes which starts new...
[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 // execute a command by calling fork
44 void tint_exec(const char* command);
45
46
47 // conversion
48 int hex_char_to_int (char c);
49 int hex_to_rgb (char *hex, int *r, int *g, int *b);
50 void get_color (char *hex, double *rgb);
51
52 // adjust Alpha/Saturation/Brightness on an ARGB icon
53 // alpha from 0 to 100, satur from 0 to 1, bright from 0 to 1.
54 void adjust_asb(DATA32 *data, int w, int h, int alpha, float satur, float bright);
55 void createHeuristicMask(DATA32* data, int w, int h);
56
57 void render_image(Drawable d, int x, int y, int w, int h);
58 #endif
59
This page took 0.034742 seconds and 4 git commands to generate.