update.
[chise/xemacs-chise.git.1] / src / elconcord.h
1 /* Definitions for the CONCORD interface for XEmacs.
2    Copyright (C) 2005,2006,2008,2010 MORIOKA Tomohiko
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 /* Synched up with: Not in FSF. */
22
23 /* Written by MORIOKA Tomohiko */
24
25 #ifndef INCLUDED_elconcord_h_
26 #define INCLUDED_elconcord_h_
27
28 #include <concord.h>
29
30 /*
31  * data source
32  */
33
34 typedef struct Lisp_CONCORD_DS Lisp_CONCORD_DS;
35 DECLARE_LRECORD (concord_ds, Lisp_CONCORD_DS);
36
37 struct Lisp_CONCORD_DS
38 {
39   struct lcrecord_header header;
40   CONCORD_DS ds;
41 };
42
43 #define XCONCORD_DS(x) XRECORD (x, concord_ds, Lisp_CONCORD_DS)
44 #define XSET_CONCORD_DS(x, p) XSETRECORD (x, p, concord_ds)
45 #define CONCORD_DS_P(x) RECORDP (x, concord_ds)
46 #define CHECK_CONCORD_DS(x) CHECK_RECORD (x, concord_ds)
47 #define CONCHECK_CONCORD_DS(x) CONCHECK_RECORD (x, concord_ds)
48
49
50 /*
51  * Concord-object
52  */
53
54 EXFUN (Fconcord_decode_object, 4);
55 EXFUN (Fconcord_object_put, 3);
56 EXFUN (Fconcord_object_get, 2);
57
58 typedef struct Lisp_CONCORD_Object Lisp_CONCORD_Object;
59 DECLARE_LRECORD (concord_object, Lisp_CONCORD_Object);
60
61 struct Lisp_CONCORD_Object
62 {
63   struct lcrecord_header header;
64   CONCORD_Genre genre;
65   Lisp_Object id;
66 };
67
68 #define XCONCORD_OBJECT(x) XRECORD (x, concord_object, Lisp_CONCORD_Object)
69 #define XSET_CONCORD_OBJECT(x, p) XSETRECORD (x, p, concord_object)
70 #define CONCORD_OBJECT_P(x) RECORDP (x, concord_object)
71 #define CHECK_CONCORD_OBJECT(x) CHECK_RECORD (x, concord_object)
72 #define CONCHECK_CONCORD_OBJECT(x) CONCHECK_RECORD (x, concord_object)
73 #define CONCORD_OBJECT_GENRE(x) ((x)->genre)
74 #define CONCORD_OBJECT_ID(x)    ((x)->id)
75 #define XCONCORD_OBJECT_ID(x)   CONCORD_OBJECT_ID (XCONCORD_OBJECT(x))
76 #define XCONCORD_OBJECT_GENRE(x) CONCORD_OBJECT_GENRE (XCONCORD_OBJECT(x))
77
78 #endif /* INCLUDED_elconcord_h_ */