File: FShm.h

package info (click to toggle)
fvwm 1:2.6.8-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 15,804 kB
  • sloc: ansic: 145,770; xml: 17,093; perl: 7,302; sh: 4,921; makefile: 1,094; yacc: 688; lex: 187; sed: 11
file content (72 lines) | stat: -rw-r--r-- 1,519 bytes parent folder | download | duplicates (9)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* -*-c-*- */

#ifndef FSHM_H
#define FSHM_H

/* ---------------------------- included header files ---------------------- */

#include "config.h"

#ifdef HAVE_XSHM
#define XShmSupport 1
#else
#define XShmSupport 0
#endif

#if XShmSupport
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
#endif

/* ---------------------------- global definitions ------------------------- */

/* ---------------------------- global macros ------------------------------ */

/* ---------------------------- type definitions --------------------------- */

#if XShmSupport

/* XShm */
typedef ShmSeg FShmSeg;
typedef XShmSegmentInfo FShmSegmentInfo;

#define FShmAttach XShmAttach
#define FShmDetach XShmDetach
#define FShmPutImage XShmPutImage
#define FShmGetImage XShmGetImage
#define FShmCreateImage XShmCreateImage

/* shm */
#define Fshmget shmget
#define Fshmat shmat
#define Fshmdt shmdt
#define Fshmctl shmctl
#define Fshmget shmget

#else

/* XShm */
typedef unsigned long FhmSeg;
typedef struct {
	FhmSeg shmseg;
	int shmid;
	char *shmaddr;
	Bool readOnly;
} FShmSegmentInfo;

#define FShmAttach(a, b)                              0
#define FShmDetach(a, b)                              0
#define FShmPutImage(a, b, c, d, e, f, g, h, i, j, k) 0
#define FShmGetImage(a, b, c, d, e, f)                0
#define FShmCreateImage(a, b, c, d, e, f, g, h)       NULL

/* shm */
#define Fshmget(a, b, c) 0
#define Fshmat(a, b, c)  NULL;
#define Fshmdt(a)
#define Fshmctl(a, b, c)

#endif

#endif /* FSHM_H */