You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

gvc-combo-box.h 2.7 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
  2. *
  3. * Copyright (C) 2009 Red Hat, Inc.
  4. * Copyright (C) 2014 Michal Ratajsky <michal.ratajsky@gmail.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  19. *
  20. */
  21. #ifndef __GVC_COMBO_BOX_H
  22. #define __GVC_COMBO_BOX_H
  23. #include <glib.h>
  24. #include <glib-object.h>
  25. #include <gtk/gtk.h>
  26. #include <libmatemixer/matemixer.h>
  27. G_BEGIN_DECLS
  28. #define GVC_TYPE_COMBO_BOX (gvc_combo_box_get_type ())
  29. #define GVC_COMBO_BOX(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GVC_TYPE_COMBO_BOX, GvcComboBox))
  30. #define GVC_COMBO_BOX_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GVC_TYPE_COMBO_BOX, GvcComboBoxClass))
  31. #define GVC_IS_COMBO_BOX(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GVC_TYPE_COMBO_BOX))
  32. #define GVC_IS_COMBO_BOX_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GVC_TYPE_COMBO_BOX))
  33. #define GVC_COMBO_BOX_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GVC_TYPE_COMBO_BOX, GvcComboBoxClass))
  34. typedef struct _GvcComboBox GvcComboBox;
  35. typedef struct _GvcComboBoxClass GvcComboBoxClass;
  36. typedef struct _GvcComboBoxPrivate GvcComboBoxPrivate;
  37. struct _GvcComboBox
  38. {
  39. GtkBox parent;
  40. GvcComboBoxPrivate *priv;
  41. };
  42. struct _GvcComboBoxClass
  43. {
  44. GtkBoxClass parent_class;
  45. void (* changing) (GvcComboBox *combobox,
  46. MateMixerSwitchOption *option);
  47. void (* button_clicked) (GvcComboBox *combobox);
  48. };
  49. GType gvc_combo_box_get_type (void) G_GNUC_CONST;
  50. GtkWidget * gvc_combo_box_new (MateMixerSwitch *swtch,
  51. const gchar *label);
  52. MateMixerSwitch * gvc_combo_box_get_switch (GvcComboBox *combobox);
  53. void gvc_combo_box_set_size_group (GvcComboBox *combobox,
  54. GtkSizeGroup *group,
  55. gboolean symmetric);
  56. G_END_DECLS
  57. #endif /* __GVC_COMBO_BOX_H */