| 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 | /* |
| 21 | * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS |
| 22 | * file for a list of people on the GTK+ Team. See the ChangeLog |
| 23 | * files for a list of changes. These files are distributed with |
| 24 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. |
| 25 | */ |
| 26 | |
| 27 | #ifndef __GDK_PROPERTY_H__ |
| 28 | #define __GDK_PROPERTY_H__ |
| 29 | |
| 30 | #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION) |
| 31 | #error "Only <gdk/gdk.h> can be included directly." |
| 32 | #endif |
| 33 | |
| 34 | #include <gdk/gdktypes.h> |
| 35 | |
| 36 | G_BEGIN_DECLS |
| 37 | |
| 38 | typedef enum |
| 39 | { |
| 40 | GDK_PROP_MODE_REPLACE, |
| 41 | GDK_PROP_MODE_PREPEND, |
| 42 | GDK_PROP_MODE_APPEND |
| 43 | } GdkPropMode; |
| 44 | |
| 45 | GdkAtom gdk_atom_intern (const gchar *atom_name, |
| 46 | gboolean only_if_exists); |
| 47 | GdkAtom gdk_atom_intern_static_string (const gchar *atom_name); |
| 48 | gchar* gdk_atom_name (GdkAtom atom); |
| 49 | |
| 50 | gboolean gdk_property_get (GdkWindow *window, |
| 51 | GdkAtom property, |
| 52 | GdkAtom type, |
| 53 | gulong offset, |
| 54 | gulong length, |
| 55 | gint pdelete, |
| 56 | GdkAtom *actual_property_type, |
| 57 | gint *actual_format, |
| 58 | gint *actual_length, |
| 59 | guchar **data); |
| 60 | void gdk_property_change (GdkWindow *window, |
| 61 | GdkAtom property, |
| 62 | GdkAtom type, |
| 63 | gint format, |
| 64 | GdkPropMode mode, |
| 65 | const guchar *data, |
| 66 | gint nelements); |
| 67 | void gdk_property_delete (GdkWindow *window, |
| 68 | GdkAtom property); |
| 69 | #ifndef GDK_MULTIHEAD_SAFE |
| 70 | #ifndef GDK_DISABLE_DEPRECATED |
| 71 | gint gdk_text_property_to_text_list (GdkAtom encoding, |
| 72 | gint format, |
| 73 | const guchar *text, |
| 74 | gint length, |
| 75 | gchar ***list); |
| 76 | gboolean gdk_utf8_to_compound_text (const gchar *str, |
| 77 | GdkAtom *encoding, |
| 78 | gint *format, |
| 79 | guchar **ctext, |
| 80 | gint *length); |
| 81 | gint gdk_string_to_compound_text (const gchar *str, |
| 82 | GdkAtom *encoding, |
| 83 | gint *format, |
| 84 | guchar **ctext, |
| 85 | gint *length); |
| 86 | gint gdk_text_property_to_utf8_list (GdkAtom encoding, |
| 87 | gint format, |
| 88 | const guchar *text, |
| 89 | gint length, |
| 90 | gchar ***list); |
| 91 | #endif |
| 92 | #endif |
| 93 | |
| 94 | gint gdk_text_property_to_utf8_list_for_display (GdkDisplay *display, |
| 95 | GdkAtom encoding, |
| 96 | gint format, |
| 97 | const guchar *text, |
| 98 | gint length, |
| 99 | gchar ***list); |
| 100 | |
| 101 | gchar *gdk_utf8_to_string_target (const gchar *str); |
| 102 | #ifndef GDK_DISABLE_DEPRECATED |
| 103 | gint gdk_text_property_to_text_list_for_display (GdkDisplay *display, |
| 104 | GdkAtom encoding, |
| 105 | gint format, |
| 106 | const guchar *text, |
| 107 | gint length, |
| 108 | gchar ***list); |
| 109 | gint gdk_string_to_compound_text_for_display (GdkDisplay *display, |
| 110 | const gchar *str, |
| 111 | GdkAtom *encoding, |
| 112 | gint *format, |
| 113 | guchar **ctext, |
| 114 | gint *length); |
| 115 | gboolean gdk_utf8_to_compound_text_for_display (GdkDisplay *display, |
| 116 | const gchar *str, |
| 117 | GdkAtom *encoding, |
| 118 | gint *format, |
| 119 | guchar **ctext, |
| 120 | gint *length); |
| 121 | |
| 122 | void gdk_free_text_list (gchar **list); |
| 123 | void gdk_free_compound_text (guchar *ctext); |
| 124 | #endif |
| 125 | |
| 126 | G_END_DECLS |
| 127 | |
| 128 | #endif /* __GDK_PROPERTY_H__ */ |
| 129 | |