32-bit clipboard support.
[wine/multimedia.git] / include / shm_main_blk.h
blob4076bcfb6ae0fdf28a90b1d9eee90d00ffeaea2f
1 /***************************************************************************
2 * Copyright 1995, Technion, Israel Institute of Technology
3 * Electrical Eng, Software Lab.
4 * Author: Michael Veksler.
5 ***************************************************************************
6 * File: shm_main_blk.h
7 * Purpose: Main Wine's shared memory block
8 ***************************************************************************
9 */
10 #ifndef __WINE_SHM_MAIN_BLK_H
11 #define __WINE_SHM_MAIN_BLK_H
13 #ifdef CONFIG_IPC
15 #include <sys/shm.h>
16 #include "shm_block.h"
17 #include "shm_semaph.h"
18 #include "dde_proc.h"
19 #include "dde_atom.h"
20 #include "dde_mem.h"
21 /*****************************************************************************
23 * main block object
25 *****************************************************************************
27 #ifndef __inline__
28 #ifndef __GNUC__
29 #define __inline__
30 #endif /* __GNUC__ */
31 #endif /* __inline__ */
33 #define DDE_HANDLES_BIT_ARRAY_SIZE (DDE_HANDLES/sizeof(int)/8)
35 #define SHM_MAXID SHMSEG /* maximum shm blocks (Wine's limit) */
36 struct shm_main_block {
37 /* NOTE: "block" declaration must be the first */
38 struct shm_block block;
39 char magic[64]; /* magic string to identify the block */
40 int build_lock; /* =1 when data structure not stable yet */
41 shm_sem sem; /* semaphores for main_block integrity */
42 struct _dde_proc proc[DDE_PROCS]; /* information about processes */
43 REL_PTR atoms[DDE_ATOMS]; /* relative reference to global atoms */
44 /* Translation from global window handles to local handles */
45 WND_DATA windows[DDE_WINDOWS];
46 DDE_HWND handles[DDE_HANDLES];
47 /* bit array stating if a handle is free (bit=0), LSB in */
48 /* free_handles[0] refers handle 0x8000, the MSB refers 0x801F */
49 unsigned free_handles[DDE_HANDLES_BIT_ARRAY_SIZE];
51 extern struct shm_main_block *main_block;
52 int shm_init(void);
53 void shm_delete_all(int shm_id);
54 void DDE_mem_init();
55 int DDE_no_of_attached();
56 #define DDE_IPC_init() ( (main_block==NULL) ? (DDE_mem_init()) : 0 )
58 #endif /* CONFIG_IPC */
60 #endif /* __WINE_SHM_MAIN_BLK_H */