summaryrefslogtreecommitdiff
path: root/src/lmctypes.h
blob: 45c6739eef99727fa93ee6bcad48f23a55ecc729 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef __LMC_TYPES_H__
#define __LMC_TYPES_H__

#include <glib.h>
#include <X11/Xlib.h>

G_BEGIN_DECLS

typedef struct _LmcBorderInfo   LmcBorderInfo;
typedef struct _LmcPropertyValue LmcPropertyValue;
typedef struct _LmcPixel LmcPixel;
typedef struct _LmcPoint LmcPoint;

struct _LmcBorderInfo
{
  short left, right, top, bottom;
  short left_unscaled, right_unscaled, top_unscaled, bottom_unscaled;
};

struct _LmcPropertyValue
{
  Atom type;			/* None means property does not exist */
  int format;			/* 8, 16, 32 */
  
  union {
    char *b;
    short *s;
    long *l;
  } data;
  
  unsigned long n_items;	/* Number of 8, 16, or 32 bit quantities */
};

struct _LmcPixel {
  guchar red;
  guchar green;
  guchar blue;
  guchar alpha;
};

struct _LmcPoint {
    double x;
    double y;
};

typedef void (*LmcDeformationFunc) (int u, int v,
				    int x, int y, int width, int height,
				    int *deformed_x, int *deformed_y,
				    void *data);

G_END_DECLS

#endif /* __LMC_TYPES_H__ */