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 / gnt / gntcombobox.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-04  |  1.8 KB  |  62 lines

  1. #ifndef GNT_COMBO_BOX_H
  2. #define GNT_COMBO_BOX_H
  3.  
  4. #include "gnt.h"
  5. #include "gntcolors.h"
  6. #include "gntkeys.h"
  7. #include "gntwidget.h"
  8.  
  9. #define GNT_TYPE_COMBO_BOX                (gnt_combo_box_get_gtype())
  10. #define GNT_COMBO_BOX(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_COMBO_BOX, GntComboBox))
  11. #define GNT_COMBO_BOX_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_COMBO_BOX, GntComboBoxClass))
  12. #define GNT_IS_COMBO_BOX(obj)            (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_COMBO_BOX))
  13. #define GNT_IS_COMBO_BOX_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_COMBO_BOX))
  14. #define GNT_COMBO_BOX_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_COMBO_BOX, GntComboBoxClass))
  15.  
  16. #define GNT_COMBO_BOX_FLAGS(obj)                (GNT_COMBO_BOX(obj)->priv.flags)
  17. #define GNT_COMBO_BOX_SET_FLAGS(obj, flags)        (GNT_COMBO_BOX_FLAGS(obj) |= flags)
  18. #define GNT_COMBO_BOX_UNSET_FLAGS(obj, flags)    (GNT_COMBO_BOX_FLAGS(obj) &= ~(flags))
  19.  
  20. typedef struct _GntComboBox            GntComboBox;
  21. typedef struct _GntComboBoxPriv        GntComboBoxPriv;
  22. typedef struct _GntComboBoxClass        GntComboBoxClass;
  23.  
  24. struct _GntComboBox
  25. {
  26.     GntWidget parent;
  27.  
  28.     GntWidget *dropdown;   /* This is a GntTree */
  29.  
  30.     void *selected;        /* Currently selected key */
  31. };
  32.  
  33. struct _GntComboBoxClass
  34. {
  35.     GntWidgetClass parent;
  36.  
  37.     void (*gnt_reserved1)(void);
  38.     void (*gnt_reserved2)(void);
  39.     void (*gnt_reserved3)(void);
  40.     void (*gnt_reserved4)(void);
  41. };
  42.  
  43. G_BEGIN_DECLS
  44.  
  45. GType gnt_combo_box_get_gtype(void);
  46.  
  47. GntWidget *gnt_combo_box_new(void);
  48.  
  49. void gnt_combo_box_add_data(GntComboBox *box, gpointer key, const char *text);
  50.  
  51. void gnt_combo_box_remove(GntComboBox *box, gpointer key);
  52.  
  53. void gnt_combo_box_remove_all(GntComboBox *box);
  54.  
  55. gpointer gnt_combo_box_get_selected_data(GntComboBox *box);
  56.  
  57. void gnt_combo_box_set_selected(GntComboBox *box, gpointer key);
  58.  
  59. G_END_DECLS
  60.  
  61. #endif /* GNT_COMBO_BOX_H */
  62.