home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / include / gdict-1.0 / gdict / gdict-speller.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-04-09  |  3.3 KB  |  88 lines

  1. /* gdict-speller.h - display widget for dictionary matches
  2.  *
  3.  * Copyright (C) 2006  Emmanuele Bassi <ebassi@gmail.com>
  4.  *
  5.  * This library is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU Library General Public
  7.  * License as published by the Free Software Foundation; either
  8.  * version 2 of the License, or (at your option) any later version.
  9.  *
  10.  * This library is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  * Library General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU Library General Public
  16.  * License along with this library; if not, write to the
  17.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18.  */
  19.  
  20. #ifndef __GDICT_SPELLER_H__
  21. #define __GDICT_SPELLER_H__
  22.  
  23. #include <gtk/gtkhbox.h>
  24. #include "gdict-context.h"
  25.  
  26. G_BEGIN_DECLS
  27.  
  28. #define GDICT_TYPE_SPELLER         (gdict_speller_get_type ())
  29. #define GDICT_SPELLER(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDICT_TYPE_SPELLER, GdictSpeller))
  30. #define GDICT_SPELLER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GDICT_TYPE_SPELLER, GdictSpellerClass))
  31. #define GDICT_IS_SPELLER(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDICT_TYPE_SPELLER))
  32. #define GDICT_IS_SPELLER_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), GDICT_TYPE_SPELLER))
  33. #define GDICT_SPELLER_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDICT_TYPE_SPELLER, GdictSpellerClass))
  34.  
  35. typedef struct _GdictSpeller        GdictSpeller;
  36. typedef struct _GdictSpellerPrivate    GdictSpellerPrivate;
  37. typedef struct _GdictSpellerClass    GdictSpellerClass;
  38.  
  39. struct _GdictSpeller
  40. {
  41.   GtkVBox parent_instance;
  42.   
  43.   /*< private >*/
  44.   GdictSpellerPrivate *priv;
  45. };
  46.  
  47. struct _GdictSpellerClass
  48. {
  49.   GtkVBoxClass parent_class;
  50.  
  51.   void (*word_activated) (GdictSpeller *speller,
  52.                   const gchar  *word,
  53.               const gchar  *database);
  54.  
  55.   /* padding for future expansion */
  56.   void (*_gdict_speller_1) (void);
  57.   void (*_gdict_speller_2) (void);
  58.   void (*_gdict_speller_3) (void);
  59.   void (*_gdict_speller_4) (void);  
  60. };
  61.  
  62. GType                 gdict_speller_get_type         (void) G_GNUC_CONST;
  63.  
  64. GtkWidget *           gdict_speller_new              (void);
  65. GtkWidget *           gdict_speller_new_with_context (GdictContext *context);
  66.  
  67. void                  gdict_speller_set_context      (GdictSpeller *speller,
  68.                               GdictContext *context);
  69. GdictContext *        gdict_speller_get_context      (GdictSpeller *speller);
  70. void                  gdict_speller_set_database     (GdictSpeller *speller,
  71.                               const gchar *database);
  72. G_CONST_RETURN gchar *gdict_speller_get_database     (GdictSpeller *speller);
  73. void                  gdict_speller_set_strategy     (GdictSpeller *speller,
  74.                               const gchar  *strategy);
  75. G_CONST_RETURN gchar *gdict_speller_get_strategy     (GdictSpeller *speller);
  76.  
  77. void                  gdict_speller_clear            (GdictSpeller *speller);
  78. void                  gdict_speller_match            (GdictSpeller *speller,
  79.                               const gchar  *word);
  80.  
  81. gint                  gdict_speller_count_matches    (GdictSpeller *speller);
  82. gchar **              gdict_speller_get_matches      (GdictSpeller *speller,
  83.                               gsize         length);
  84.  
  85. G_END_DECLS
  86.  
  87. #endif /* __GDICT_SPELLER_H__ */
  88.