Initial original import from: fuse-2.4.2-2.fc4
[captive.git] / src / libcaptive / include / captive / calltype_reactos.h
1 /* $Id$
2  * Include file for function call types definitions for reactos files for libcaptive
3  * Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
4  * 
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; exactly version 2 of June 1991 is required
8  * 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  * 
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19
20 #ifndef _CAPTIVE_CALLTYPE_REACTOS_H
21 #define _CAPTIVE_CALLTYPE_REACTOS_H 1
22
23
24 #include <glib/gmacros.h>
25 #include <glib/gtypes.h>
26 /* captive/?*_reactos.h include files have forbidden any reactos/?* inclusions
27  * as they are being included by reactos/compat.h.
28  */
29
30
31 G_BEGIN_DECLS
32
33 /**
34  * CAPTIVE_CDECL:
35  *
36  * Function call type declaration for the real #CDECL call type.
37  * As the default #CDECL macro gets disabled (=NOP) during reactos sources
38  * compilation (and gets undefined to cause error during non-reactos sources
39  * compilation) you have the chance to do the real #CDECL declaration
40  * by using #CAPTIVE_CDECL. You must #ifdef it by %LIBCAPTIVE symbol as it
41  * is not available during standalone reactos compilation.
42  *
43  * This macro may be needed to pass control to W32 binary code.
44  */
45 #define CAPTIVE_CDECL    __attribute__((__cdecl__))
46
47
48 /**
49  * CAPTIVE_STDCALL:
50  *
51  * Function call type declaration for the real #STDCALL call type.
52  * As the default #STDCALL macro gets disabled (=NOP) during reactos sources
53  * compilation (and gets undefined to cause error during non-reactos sources
54  * compilation) you have the chance to do the real #STDCALL declaration
55  * by using #CAPTIVE_STDCALL. You must #ifdef it by %LIBCAPTIVE symbol as it
56  * is not available during standalone reactos compilation.
57  *
58  * This macro may be needed to pass control to W32 binary code.
59  */
60 #define CAPTIVE_STDCALL  __attribute__((__stdcall__))
61
62
63 /**
64  * CAPTIVE_FASTCALL:
65  *
66  * You cannot do simple declaration for the real #FASTCALL call type.
67  *
68  * You should not need it as the non-core W32 binary code does not use #FASTCALL
69  * functions.
70  */
71 #undef CAPTIVE_FASTCALL
72
73
74 typedef gpointer CAPTIVE_STDCALL (*CaptiveStdCallFunc4 )(gpointer arg0);
75 typedef gpointer CAPTIVE_STDCALL (*CaptiveStdCallFunc8 )(gpointer arg0,gpointer arg1);
76 typedef gpointer CAPTIVE_STDCALL (*CaptiveStdCallFunc12)(gpointer arg0,gpointer arg1,gpointer arg2);
77
78 gpointer captive_stdcall_call_4 (CaptiveStdCallFunc4  func,gpointer arg0);
79 gpointer captive_stdcall_call_8 (CaptiveStdCallFunc8  func,gpointer arg0,gpointer arg1);
80 gpointer captive_stdcall_call_12(CaptiveStdCallFunc12 func,gpointer arg0,gpointer arg1,gpointer arg2);
81
82 G_END_DECLS
83
84
85 #endif /* _CAPTIVE_CALLTYPE_REACTOS_H */