Importing XEmacs to Java bridge.
[elisp/xemacs-java.git] / java.h
1 /* Definitions for Emacs Lisp binding to Java Native Interface.
2    Copyright (C) 2000 Daiki Ueno.
3
4 This file is part of XEmacs.
5
6 XEmacs is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
9 later version.
10
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with XEmacs; see the file COPYING.  If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.  */
20
21 #ifndef INCLUDED_java_h_
22 #define INCLUDED_java_h_ 1
23
24 #include <jni.h>
25
26 struct Lisp_JavaClass
27 {
28   struct lcrecord_header header;
29   jclass class;
30   Lisp_Object name;
31 };
32 typedef struct Lisp_JavaClass Lisp_JavaClass;
33
34 DECLARE_EXTERNAL_LRECORD (javaclass, Lisp_JavaClass);
35
36 #define XJAVACLASS(x) XRECORD (x, javaclass, Lisp_JavaClass)
37 #define XSETJAVACLASS(x, p) XSETRECORD (x, p, javaclass)
38 #define JAVACLASSP(x) RECORDP (x, javaclass)
39 #define CHECK_JAVACLASS(x) CHECK_RECORD (x, javaclass)
40 #define CONCHECK_JAVACLASS(x) CONCHECK_RECORD (x, javaclass)
41
42 struct Lisp_JavaObject
43 {
44   struct lcrecord_header header;
45   jobject object;
46   Lisp_Object signature;
47 };
48 typedef struct Lisp_JavaObject Lisp_JavaObject;
49
50 DECLARE_EXTERNAL_LRECORD (javaobject, Lisp_JavaObject);
51 #define XJAVAOBJECT(x) XRECORD (x, javaobject, Lisp_JavaObject)
52 #define XSETJAVAOBJECT(x, p) XSETRECORD (x, p, javaobject)
53 #define JAVAOBJECTP(x) RECORDP (x, javaobject)
54 #define CHECK_JAVAOBJECT(x) CHECK_RECORD (x, javaobject)
55 #define CONCHECK_JAVAOBJECT(x) CONCHECK_RECORD (x, javaobject)
56
57 #endif /* INCLUDED_java_h_ */