1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  *  Copyright (C) 2005 Takuro Ashie <ashie@homa.ne.jp>
4  *  Copyright (C) 2006 Juernjakob Harder <juernjakob.harder@gmail.com>
5  *
6  *  This library is free software; you can redistribute it and/or
7  *  modify it under the terms of the GNU Lesser General Public
8  *  License as published by the Free Software Foundation; either
9  *  version 2 of the License, or (at your option) any later version.
10  *
11  *  This library is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU Lesser General Public License for more details.
15  *
16  *  You should have received a copy of the GNU Lesser General Public
17  *  License along with this program; if not, write to the
18  *  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19  *  Boston, MA  02111-1307  USA
20  *
21  *  $Id: tomoe-candidate.h 850 2006-11-28 06:40:31Z ikezoe $
22  */
23 
24 #ifndef __TOMOE_CANDIDATE_H__
25 #define __TOMOE_CANDIDATE_H__
26 
27 #include <glib-object.h>
28 #include "tomoe-char.h"
29 
30 G_BEGIN_DECLS
31 
32 #define TOMOE_TYPE_CANDIDATE            (tomoe_candidate_get_type ())
33 #define TOMOE_CANDIDATE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOMOE_TYPE_CANDIDATE, TomoeCandidate))
34 #define TOMOE_CANDIDATE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TOMOE_TYPE_CANDIDATE, TomoeCandidateClass))
35 #define TOMOE_IS_CANDIDATE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOMOE_TYPE_CANDIDATE))
36 #define TOMOE_IS_CANDIDATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOMOE_TYPE_CANDIDATE))
37 #define TOMOE_CANDIDATE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), TOMOE_TYPE_CANDIDATE, TomoeCandidateClass))
38 
39 typedef struct _TomoeCandidate TomoeCandidate;
40 typedef struct _TomoeCandidateClass TomoeCandidateClass;
41 
42 struct _TomoeCandidate
43 {
44     GObject       object;
45 };
46 
47 struct _TomoeCandidateClass
48 {
49     GObjectClass parent_class;
50 };
51 
52 GType           tomoe_candidate_get_type        (void) G_GNUC_CONST;
53 
54 TomoeCandidate *tomoe_candidate_new             (TomoeChar      *chr);
55 
56 TomoeChar      *tomoe_candidate_get_char        (TomoeCandidate *cand);
57 
58 void            tomoe_candidate_set_score       (TomoeCandidate *cand,
59                                                  gint            score);
60 
61 gint            tomoe_candidate_get_score       (TomoeCandidate *cand);
62 
63 gint            tomoe_candidate_compare         (const TomoeCandidate *a,
64                                                  const TomoeCandidate *b);
65 
66 G_END_DECLS
67 
68 #endif /* __TOMOE_CANDIDATE_H__ */
69 
70 /*
71 vi:ts=4:nowrap:ai:expandtab
72 */
73