Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

139 Zeilen
4.7 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. * GtkLayout: Widget for scrolling of arbitrary-sized areas.
  20. *
  21. * Copyright Owen Taylor, 1998
  22. */
  23. /*
  24. * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
  25. * file for a list of people on the GTK+ Team. See the ChangeLog
  26. * files for a list of changes. These files are distributed with
  27. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  28. */
  29. #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  30. #error "Only <gtk/gtk.h> can be included directly."
  31. #endif
  32. #ifndef __GTK_LAYOUT_H__
  33. #define __GTK_LAYOUT_H__
  34. #include <gtk/gtkcontainer.h>
  35. #include <gtk/gtkadjustment.h>
  36. G_BEGIN_DECLS
  37. #define GTK_TYPE_LAYOUT (gtk_layout_get_type ())
  38. #define GTK_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LAYOUT, GtkLayout))
  39. #define GTK_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LAYOUT, GtkLayoutClass))
  40. #define GTK_IS_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_LAYOUT))
  41. #define GTK_IS_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LAYOUT))
  42. #define GTK_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LAYOUT, GtkLayoutClass))
  43. typedef struct _GtkLayout GtkLayout;
  44. typedef struct _GtkLayoutClass GtkLayoutClass;
  45. struct _GtkLayout
  46. {
  47. GtkContainer GSEAL (container);
  48. GList *GSEAL (children);
  49. guint GSEAL (width);
  50. guint GSEAL (height);
  51. GtkAdjustment *GSEAL (hadjustment);
  52. GtkAdjustment *GSEAL (vadjustment);
  53. /*< public >*/
  54. GdkWindow *GSEAL (bin_window);
  55. /*< private >*/
  56. GdkVisibilityState GSEAL (visibility);
  57. gint GSEAL (scroll_x);
  58. gint GSEAL (scroll_y);
  59. guint GSEAL (freeze_count);
  60. };
  61. struct _GtkLayoutClass
  62. {
  63. GtkContainerClass parent_class;
  64. void (*set_scroll_adjustments) (GtkLayout *layout,
  65. GtkAdjustment *hadjustment,
  66. GtkAdjustment *vadjustment);
  67. /* Padding for future expansion */
  68. void (*_gtk_reserved1) (void);
  69. void (*_gtk_reserved2) (void);
  70. void (*_gtk_reserved3) (void);
  71. void (*_gtk_reserved4) (void);
  72. };
  73. GType gtk_layout_get_type (void) G_GNUC_CONST;
  74. GtkWidget* gtk_layout_new (GtkAdjustment *hadjustment,
  75. GtkAdjustment *vadjustment);
  76. GdkWindow* gtk_layout_get_bin_window (GtkLayout *layout);
  77. void gtk_layout_put (GtkLayout *layout,
  78. GtkWidget *child_widget,
  79. gint x,
  80. gint y);
  81. void gtk_layout_move (GtkLayout *layout,
  82. GtkWidget *child_widget,
  83. gint x,
  84. gint y);
  85. void gtk_layout_set_size (GtkLayout *layout,
  86. guint width,
  87. guint height);
  88. void gtk_layout_get_size (GtkLayout *layout,
  89. guint *width,
  90. guint *height);
  91. GtkAdjustment* gtk_layout_get_hadjustment (GtkLayout *layout);
  92. GtkAdjustment* gtk_layout_get_vadjustment (GtkLayout *layout);
  93. void gtk_layout_set_hadjustment (GtkLayout *layout,
  94. GtkAdjustment *adjustment);
  95. void gtk_layout_set_vadjustment (GtkLayout *layout,
  96. GtkAdjustment *adjustment);
  97. #ifndef GTK_DISABLE_DEPRECATED
  98. /* These disable and enable moving and repainting the scrolling window
  99. * of the GtkLayout, respectively. If you want to update the layout's
  100. * offsets but do not want it to repaint itself, you should use these
  101. * functions.
  102. *
  103. * - I don't understand these are supposed to work, so I suspect
  104. * - they don't now. OWT 1/20/98
  105. */
  106. void gtk_layout_freeze (GtkLayout *layout);
  107. void gtk_layout_thaw (GtkLayout *layout);
  108. #endif /* GTK_DISABLE_DEPRECATED */
  109. G_END_DECLS
  110. #endif /* __GTK_LAYOUT_H__ */