home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / include / gdict-1.0 / gdict / gdict-database-chooser.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-08-30  |  3.4 KB  |  87 lines

  1. /* gdict-database-chooser.h - display widget for database names
  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_DATABASE_CHOOSER_H__
  21. #define __GDICT_DATABASE_CHOOSER_H__
  22.  
  23. #include <gtk/gtkvbox.h>
  24. #include "gdict-context.h"
  25.  
  26. G_BEGIN_DECLS
  27.  
  28. #define GDICT_TYPE_DATABASE_CHOOSER        (gdict_database_chooser_get_type ())
  29. #define GDICT_DATABASE_CHOOSER(obj) \
  30. (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDICT_TYPE_DATABASE_CHOOSER, GdictDatabaseChooser))
  31. #define GDICT_IS_DATABASE_CHOOSER(obj) \
  32. (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDICT_TYPE_DATABASE_CHOOSER))
  33. #define GDICT_DATABASE_CHOOSER_CLASS(klass) \
  34. (G_TYPE_CHECK_CLASS_CAST ((klass), GDICT_TYPE_DATABASE_CHOOSER, GdictDatabaseChooserClass))
  35. #define GDICT_IS_DATABASE_CHOOSER_CLASS(klass) \
  36. (G_TYPE_CHECK_CLASS_TYPE ((klass), GDICT_TYPE_DATABASE_CHOOSER))
  37. #define GDICT_DATABASE_CHOOSER_GET_CLASS(obj) \
  38. (G_TYPE_INSTANCE_GET_CLASS ((obj), GDICT_TYPE_DATABASE_CHOOSER, GdictDatabaseChooserClass))
  39.  
  40. typedef struct _GdictDatabaseChooser        GdictDatabaseChooser;
  41. typedef struct _GdictDatabaseChooserPrivate    GdictDatabaseChooserPrivate;
  42. typedef struct _GdictDatabaseChooserClass    GdictDatabaseChooserClass;
  43.  
  44. struct _GdictDatabaseChooser
  45. {
  46.   GtkVBox parent_instance;
  47.   
  48.   GdictDatabaseChooserPrivate *priv;
  49. };
  50.  
  51. struct _GdictDatabaseChooserClass
  52. {
  53.   GtkVBoxClass parent_class;
  54.  
  55.   void (*database_activated) (GdictDatabaseChooser *chooser,
  56.                     const gchar          *name,
  57.                   const gchar          *description);
  58.   
  59.   void (*_gdict_padding1) (void);
  60.   void (*_gdict_padding2) (void);
  61.   void (*_gdict_padding3) (void);
  62.   void (*_gdict_padding4) (void);
  63.   void (*_gdict_padding5) (void);
  64.   void (*_gdict_padding6) (void);
  65. };
  66.  
  67. GType         gdict_database_chooser_get_type         (void) G_GNUC_CONST;
  68.  
  69. GtkWidget *   gdict_database_chooser_new              (void);
  70. GtkWidget *   gdict_database_chooser_new_with_context (GdictContext         *context);
  71.  
  72. GdictContext *gdict_database_chooser_get_context      (GdictDatabaseChooser *chooser);
  73. void          gdict_database_chooser_set_context      (GdictDatabaseChooser *chooser,
  74.                                GdictContext         *context);
  75.  
  76. gchar **      gdict_database_chooser_get_databases    (GdictDatabaseChooser *chooser,
  77.                                gsize                 length) G_GNUC_MALLOC;
  78. gint          gdict_database_chooser_count_databases  (GdictDatabaseChooser *chooser);
  79. gboolean      gdict_database_chooser_has_database     (GdictDatabaseChooser *chooser,
  80.                                const gchar          *database);
  81. void          gdict_database_chooser_refresh          (GdictDatabaseChooser *chooser);
  82. void          gdict_database_chooser_clear            (GdictDatabaseChooser *chooser);
  83.  
  84. G_END_DECLS
  85.  
  86. #endif /* __GDICT_DATABASE_CHOOSER_H__ */
  87.