gucharmap-codepoint-list.h 3.07 KB
Newer Older
Noah Levitt's avatar
Noah Levitt committed
1
/*
Christian Persch's avatar
Christian Persch committed
2
 * Copyright © 2004 Noah Levitt
Noah Levitt's avatar
Noah Levitt committed
3 4 5
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
Christian Persch's avatar
Christian Persch committed
6
 * Free Software Foundation; either version 3 of the License, or (at your
Noah Levitt's avatar
Noah Levitt committed
7 8 9 10 11 12 13 14 15
 * option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
16
 * 59 Temple Place, Suite 330, Boston, MA 02110-1301  USA
Noah Levitt's avatar
Noah Levitt committed
17 18
 */

19 20 21 22
#if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION)
#error "Only <gucharmap/gucharmap.h> can be included directly."
#endif

Noah Levitt's avatar
Noah Levitt committed
23 24 25 26 27 28 29
#ifndef GUCHARMAP_CODEPOINT_LIST_H
#define GUCHARMAP_CODEPOINT_LIST_H

#include <glib-object.h>

G_BEGIN_DECLS

30 31
#define GUCHARMAP_TYPE_CODEPOINT_LIST             (gucharmap_codepoint_list_get_type ())
#define GUCHARMAP_CODEPOINT_LIST(o)               (G_TYPE_CHECK_INSTANCE_CAST ((o), GUCHARMAP_TYPE_CODEPOINT_LIST, GucharmapCodepointList))
32
#define GUCHARMAP_CODEPOINT_LIST_CLASS(k)         (G_TYPE_CHECK_CLASS_CAST((k), GUCHARMAP_TYPE_CODEPOINT_LIST, GucharmapCodepointListClass))
33 34 35
#define GUCHARMAP_IS_CODEPOINT_LIST(o)            (G_TYPE_CHECK_INSTANCE_TYPE ((o), GUCHARMAP_TYPE_CODEPOINT_LIST))
#define GUCHARMAP_IS_CODEPOINT_LIST_CLASS(k)      (G_TYPE_CHECK_CLASS_TYPE ((k), GUCHARMAP_TYPE_CODEPOINT_LIST))
#define GUCHARMAP_CODEPOINT_LIST_GET_CLASS(o)     (G_TYPE_INSTANCE_GET_CLASS ((o), GUCHARMAP_TYPE_CODEPOINT_LIST, GucharmapCodepointListClass))
Noah Levitt's avatar
Noah Levitt committed
36

37 38 39
typedef struct _GucharmapCodepointList        GucharmapCodepointList;
typedef struct _GucharmapCodepointListPrivate GucharmapCodepointListPrivate;
typedef struct _GucharmapCodepointListClass   GucharmapCodepointListClass;
40 41 42 43

struct _GucharmapCodepointList
{
  GObject parent_instance;
44 45 46

  /*< private >*/
  GucharmapCodepointListPrivate *priv;
47 48 49 50 51 52 53 54 55 56 57 58 59 60
};

struct _GucharmapCodepointListClass
{
  GObjectClass parent_class;

  /* zero is the first index */
  gint     (*get_last_index) (GucharmapCodepointList *list);
  gunichar (*get_char)       (GucharmapCodepointList *list, 
                              gint                    index);
  gint     (*get_index)      (GucharmapCodepointList *list, 
                              gunichar                wc);
};

61
GType                    gucharmap_codepoint_list_get_type       (void);
62 63

gunichar                 gucharmap_codepoint_list_get_char       (GucharmapCodepointList *list,
Noah Levitt's avatar
Noah Levitt committed
64
                                                                  gint                    index);
65

Noah Levitt's avatar
Noah Levitt committed
66
gint                     gucharmap_codepoint_list_get_index      (GucharmapCodepointList *list, 
Noah Levitt's avatar
Noah Levitt committed
67
                                                                  gunichar                wc);
68

Noah Levitt's avatar
Noah Levitt committed
69
gint                     gucharmap_codepoint_list_get_last_index (GucharmapCodepointList *list);
Noah Levitt's avatar
Noah Levitt committed
70 71 72 73

G_END_DECLS

#endif /* #ifndef GUCHARMAP_CODEPOINT_LIST_H */