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-defbox.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-04-09  |  4.3 KB  |  103 lines

  1. /* gdict-defbox.h - display widget for dictionary definitions
  2.  *
  3.  * Copyright (C) 2005-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_DEFBOX_H__
  21. #define __GDICT_DEFBOX_H__
  22.  
  23. #include <gtk/gtkvbox.h>
  24. #include "gdict-context.h"
  25.  
  26. G_BEGIN_DECLS
  27.  
  28. #define GDICT_TYPE_DEFBOX        (gdict_defbox_get_type ())
  29. #define GDICT_DEFBOX(obj)        (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDICT_TYPE_DEFBOX, GdictDefbox))
  30. #define GDICT_IS_DEFBOX(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDICT_TYPE_DEFBOX))
  31. #define GDICT_DEFBOX_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GDICT_TYPE_DEFBOX, GdictDefboxClass))
  32. #define GDICT_IS_DEFBOX_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), GDICT_TYPE_DEFBOX))
  33. #define GDICT_DEFBOX_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDICT_TYPE_DEFBOX, GdictDefboxClass))
  34.  
  35. typedef struct _GdictDefbox        GdictDefbox;
  36. typedef struct _GdictDefboxClass   GdictDefboxClass;
  37. typedef struct _GdictDefboxPrivate GdictDefboxPrivate;
  38.  
  39. struct _GdictDefbox
  40. {
  41.   /*< private >*/
  42.   GtkVBox parent_instance;
  43.   
  44.   GdictDefboxPrivate *priv;
  45. };
  46.  
  47. struct _GdictDefboxClass
  48. {
  49.   GtkVBoxClass parent_class;
  50.   
  51.   /* these are all RUN_ACTION signals for key bindings */
  52.   void (*show_find)     (GdictDefbox *defbox);
  53.   void (*hide_find)     (GdictDefbox *defbox);
  54.   void (*find_previous) (GdictDefbox *defbox);
  55.   void (*find_next)     (GdictDefbox *defbox);
  56.  
  57.   /* signals */
  58.   void (*link_clicked)  (GdictDefbox *defbox,
  59.                          const gchar *link);
  60.   
  61.   /* padding for future expansion */
  62.   void (*_gdict_defbox_1) (void);
  63.   void (*_gdict_defbox_2) (void);
  64.   void (*_gdict_defbox_3) (void);
  65.   void (*_gdict_defbox_4) (void);
  66. };
  67.  
  68. GType                 gdict_defbox_get_type           (void) G_GNUC_CONST;
  69.  
  70. GtkWidget *           gdict_defbox_new                (void);
  71. GtkWidget *           gdict_defbox_new_with_context   (GdictContext *context);
  72. void                  gdict_defbox_set_context        (GdictDefbox  *defbox,
  73.                                GdictContext *context);
  74. GdictContext *        gdict_defbox_get_context        (GdictDefbox  *defbox);
  75. void                  gdict_defbox_set_database       (GdictDefbox  *defbox,
  76.                                const gchar  *database);
  77. G_CONST_RETURN gchar *gdict_defbox_get_database       (GdictDefbox  *defbox);
  78.  
  79. gchar *               gdict_defbox_get_text           (GdictDefbox  *defbox,
  80.                                gsize        *length) G_GNUC_MALLOC;
  81. void                  gdict_defbox_select_all         (GdictDefbox  *defbox);
  82. void                  gdict_defbox_copy_to_clipboard  (GdictDefbox  *defbox,
  83.                                GtkClipboard *clipboard);
  84. void                  gdict_defbox_clear              (GdictDefbox  *defbox);
  85. void                  gdict_defbox_lookup             (GdictDefbox  *defbox,
  86.                                const gchar  *word);
  87. gint                  gdict_defbox_count_definitions  (GdictDefbox  *defbox);
  88. void                  gdict_defbox_jump_to_definition (GdictDefbox  *defbox,
  89.                                gint          number);
  90. void                  gdict_defbox_set_show_find      (GdictDefbox  *defbox,
  91.                                gboolean      show_find);
  92. gboolean              gdict_defbox_get_show_find      (GdictDefbox  *defbox);
  93. void                  gdict_defbox_find_next          (GdictDefbox  *defbox);
  94. void                  gdict_defbox_find_previous      (GdictDefbox  *defbox);
  95. void                  gdict_defbox_set_font_name      (GdictDefbox  *defbox,
  96.                                const gchar  *font_name);
  97. G_CONST_RETURN gchar *gdict_defbox_get_font_name      (GdictDefbox  *defbox);
  98. gchar *               gdict_defbox_get_selected_word  (GdictDefbox  *defbox) G_GNUC_MALLOC;
  99.  
  100. G_END_DECLS
  101.  
  102. #endif /* __GDICT_DEFBOX_H__ */
  103.