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-level-bar.h 3.0 KiB

4 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
  2. *
  3. * Copyright (C) 2008 William Jon McCann <william.jon.mccann@gmail.com>
  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_LEVEL_BAR_H
  22. #define __GVC_LEVEL_BAR_H
  23. #include <glib.h>
  24. #include <glib-object.h>
  25. #include <gtk/gtk.h>
  26. G_BEGIN_DECLS
  27. #define GVC_TYPE_LEVEL_BAR (gvc_level_bar_get_type ())
  28. #define GVC_LEVEL_BAR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GVC_TYPE_LEVEL_BAR, GvcLevelBar))
  29. #define GVC_LEVEL_BAR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GVC_TYPE_LEVEL_BAR, GvcLevelBarClass))
  30. #define GVC_IS_LEVEL_BAR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GVC_TYPE_LEVEL_BAR))
  31. #define GVC_IS_LEVEL_BAR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GVC_TYPE_LEVEL_BAR))
  32. #define GVC_LEVEL_BAR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GVC_TYPE_LEVEL_BAR, GvcLevelBarClass))
  33. typedef struct _GvcLevelBar GvcLevelBar;
  34. typedef struct _GvcLevelBarClass GvcLevelBarClass;
  35. typedef struct _GvcLevelBarPrivate GvcLevelBarPrivate;
  36. struct _GvcLevelBar
  37. {
  38. GtkWidget parent;
  39. GvcLevelBarPrivate *priv;
  40. };
  41. struct _GvcLevelBarClass
  42. {
  43. GtkWidgetClass parent_class;
  44. };
  45. typedef enum
  46. {
  47. GVC_LEVEL_SCALE_LINEAR,
  48. GVC_LEVEL_SCALE_LOG
  49. } GvcLevelScale;
  50. GType gvc_level_bar_get_type (void) G_GNUC_CONST;
  51. GtkWidget * gvc_level_bar_new (void);
  52. void gvc_level_bar_set_orientation (GvcLevelBar *bar,
  53. GtkOrientation orientation);
  54. GtkOrientation gvc_level_bar_get_orientation (GvcLevelBar *bar);
  55. void gvc_level_bar_set_peak_adjustment (GvcLevelBar *bar,
  56. GtkAdjustment *adjustment);
  57. GtkAdjustment * gvc_level_bar_get_peak_adjustment (GvcLevelBar *bar);
  58. void gvc_level_bar_set_rms_adjustment (GvcLevelBar *bar,
  59. GtkAdjustment *adjustment);
  60. GtkAdjustment * gvc_level_bar_get_rms_adjustment (GvcLevelBar *bar);
  61. void gvc_level_bar_set_scale (GvcLevelBar *bar,
  62. GvcLevelScale scale);
  63. G_END_DECLS
  64. #endif /* __GVC_LEVEL_BAR_H */