Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

121 строка
4.3 KiB

  1. /* GTK - The GIMP Toolkit
  2. * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the
  16. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17. * Boston, MA 02111-1307, USA.
  18. */
  19. /*
  20. * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
  21. * file for a list of people on the GTK+ Team. See the ChangeLog
  22. * files for a list of changes. These files are distributed with
  23. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  24. */
  25. #ifndef __GTK_PROGRESS_H__
  26. #define __GTK_PROGRESS_H__
  27. #include <gtk/gtkwidget.h>
  28. #include <gtk/gtkadjustment.h>
  29. G_BEGIN_DECLS
  30. #if !defined (GTK_DISABLE_DEPRECATED) || defined (__GTK_PROGRESS_C__) || defined (__GTK_PROGRESS_BAR_C__)
  31. #define GTK_TYPE_PROGRESS (gtk_progress_get_type ())
  32. #define GTK_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PROGRESS, GtkProgress))
  33. #define GTK_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_PROGRESS, GtkProgressClass))
  34. #define GTK_IS_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PROGRESS))
  35. #define GTK_IS_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PROGRESS))
  36. #define GTK_PROGRESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PROGRESS, GtkProgressClass))
  37. #endif /* !GTK_DISABLE_DEPRECATED */
  38. typedef struct _GtkProgress GtkProgress;
  39. typedef struct _GtkProgressClass GtkProgressClass;
  40. struct _GtkProgress
  41. {
  42. GtkWidget widget;
  43. GtkAdjustment *adjustment;
  44. GdkPixmap *offscreen_pixmap;
  45. gchar *format;
  46. gfloat x_align;
  47. gfloat y_align;
  48. guint show_text : 1;
  49. guint activity_mode : 1;
  50. guint use_text_format : 1;
  51. };
  52. struct _GtkProgressClass
  53. {
  54. GtkWidgetClass parent_class;
  55. void (* paint) (GtkProgress *progress);
  56. void (* update) (GtkProgress *progress);
  57. void (* act_mode_enter) (GtkProgress *progress);
  58. /* Padding for future expansion */
  59. void (*_gtk_reserved1) (void);
  60. void (*_gtk_reserved2) (void);
  61. void (*_gtk_reserved3) (void);
  62. void (*_gtk_reserved4) (void);
  63. };
  64. /* This entire interface is deprecated. Use GtkProgressBar
  65. * directly.
  66. */
  67. #if !defined (GTK_DISABLE_DEPRECATED) || defined (__GTK_PROGRESS_C__) || defined (__GTK_PROGRESS_BAR_C__)
  68. GType gtk_progress_get_type (void) G_GNUC_CONST;
  69. void gtk_progress_set_show_text (GtkProgress *progress,
  70. gboolean show_text);
  71. void gtk_progress_set_text_alignment (GtkProgress *progress,
  72. gfloat x_align,
  73. gfloat y_align);
  74. void gtk_progress_set_format_string (GtkProgress *progress,
  75. const gchar *format);
  76. void gtk_progress_set_adjustment (GtkProgress *progress,
  77. GtkAdjustment *adjustment);
  78. void gtk_progress_configure (GtkProgress *progress,
  79. gdouble value,
  80. gdouble min,
  81. gdouble max);
  82. void gtk_progress_set_percentage (GtkProgress *progress,
  83. gdouble percentage);
  84. void gtk_progress_set_value (GtkProgress *progress,
  85. gdouble value);
  86. gdouble gtk_progress_get_value (GtkProgress *progress);
  87. void gtk_progress_set_activity_mode (GtkProgress *progress,
  88. gboolean activity_mode);
  89. gchar* gtk_progress_get_current_text (GtkProgress *progress);
  90. gchar* gtk_progress_get_text_from_value (GtkProgress *progress,
  91. gdouble value);
  92. gdouble gtk_progress_get_current_percentage (GtkProgress *progress);
  93. gdouble gtk_progress_get_percentage_from_value (GtkProgress *progress,
  94. gdouble value);
  95. #endif /* !GTK_DISABLE_DEPRECATED */
  96. G_END_DECLS
  97. #endif /* __GTK_PROGRESS_H__ */