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.
 
 
 
 
 
 

133 lines
4.7 KiB

  1. /* GDK - The GIMP Drawing Kit
  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. #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
  26. #error "Only <gdk/gdk.h> can be included directly."
  27. #endif
  28. #ifndef __GDK_PIXMAP_H__
  29. #define __GDK_PIXMAP_H__
  30. #include <gdk/gdktypes.h>
  31. #include <gdk/gdkdrawable.h>
  32. G_BEGIN_DECLS
  33. typedef struct _GdkPixmapObject GdkPixmapObject;
  34. typedef struct _GdkPixmapObjectClass GdkPixmapObjectClass;
  35. #define GDK_TYPE_PIXMAP (gdk_pixmap_get_type ())
  36. #define GDK_PIXMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXMAP, GdkPixmap))
  37. #define GDK_PIXMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXMAP, GdkPixmapObjectClass))
  38. #define GDK_IS_PIXMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXMAP))
  39. #define GDK_IS_PIXMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXMAP))
  40. #define GDK_PIXMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXMAP, GdkPixmapObjectClass))
  41. #define GDK_PIXMAP_OBJECT(object) ((GdkPixmapObject *) GDK_PIXMAP (object))
  42. struct _GdkPixmapObject
  43. {
  44. GdkDrawable parent_instance;
  45. GdkDrawable *GSEAL (impl); /* window-system-specific delegate object */
  46. gint GSEAL (depth);
  47. };
  48. struct _GdkPixmapObjectClass
  49. {
  50. GdkDrawableClass parent_class;
  51. };
  52. GType gdk_pixmap_get_type (void) G_GNUC_CONST;
  53. /* Pixmaps
  54. */
  55. GdkPixmap* gdk_pixmap_new (GdkDrawable *drawable,
  56. gint width,
  57. gint height,
  58. gint depth);
  59. #ifndef GDK_DISABLE_DEPRECATED
  60. GdkBitmap* gdk_bitmap_create_from_data (GdkDrawable *drawable,
  61. const gchar *data,
  62. gint width,
  63. gint height);
  64. GdkPixmap* gdk_pixmap_create_from_data (GdkDrawable *drawable,
  65. const gchar *data,
  66. gint width,
  67. gint height,
  68. gint depth,
  69. const GdkColor *fg,
  70. const GdkColor *bg);
  71. GdkPixmap* gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
  72. GdkBitmap **mask,
  73. const GdkColor *transparent_color,
  74. const gchar *filename);
  75. GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
  76. GdkColormap *colormap,
  77. GdkBitmap **mask,
  78. const GdkColor *transparent_color,
  79. const gchar *filename);
  80. GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
  81. GdkBitmap **mask,
  82. const GdkColor *transparent_color,
  83. gchar **data);
  84. GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
  85. GdkColormap *colormap,
  86. GdkBitmap **mask,
  87. const GdkColor *transparent_color,
  88. gchar **data);
  89. #endif
  90. /* Functions to create/lookup pixmaps from their native equivalents
  91. */
  92. #ifndef GDK_MULTIHEAD_SAFE
  93. GdkPixmap* gdk_pixmap_foreign_new (GdkNativeWindow anid);
  94. GdkPixmap* gdk_pixmap_lookup (GdkNativeWindow anid);
  95. #endif /* GDK_MULTIHEAD_SAFE */
  96. GdkPixmap* gdk_pixmap_foreign_new_for_display (GdkDisplay *display,
  97. GdkNativeWindow anid);
  98. GdkPixmap* gdk_pixmap_lookup_for_display (GdkDisplay *display,
  99. GdkNativeWindow anid);
  100. GdkPixmap* gdk_pixmap_foreign_new_for_screen (GdkScreen *screen,
  101. GdkNativeWindow anid,
  102. gint width,
  103. gint height,
  104. gint depth);
  105. #ifndef GDK_DISABLE_DEPRECATED
  106. #define gdk_bitmap_ref g_object_ref
  107. #define gdk_bitmap_unref g_object_unref
  108. #define gdk_pixmap_ref g_object_ref
  109. #define gdk_pixmap_unref g_object_unref
  110. #endif /* GDK_DISABLE_DEPRECATED */
  111. G_END_DECLS
  112. #endif /* __GDK_PIXMAP_H__ */