]> Pileus Git - ~andy/gtk/blob - gdk/gdkproperty.h
Merge branch 'gtk-2-90'
[~andy/gtk] / gdk / gdkproperty.h
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 #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
28 #error "Only <gdk/gdk.h> can be included directly."
29 #endif
30
31 #ifndef __GDK_PROPERTY_H__
32 #define __GDK_PROPERTY_H__
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 gint gdk_text_property_to_text_list (GdkAtom        encoding,
71                                      gint           format,
72                                      const guchar  *text,
73                                      gint           length,
74                                      gchar       ***list);
75 gint gdk_text_property_to_utf8_list (GdkAtom        encoding,
76                                      gint           format,
77                                      const guchar  *text,
78                                      gint           length,
79                                      gchar       ***list);
80 gboolean gdk_utf8_to_compound_text (const gchar *str,
81                                     GdkAtom     *encoding,
82                                     gint        *format,
83                                     guchar     **ctext,
84                                     gint        *length);
85 gint gdk_string_to_compound_text    (const gchar   *str,
86                                      GdkAtom       *encoding,
87                                      gint          *format,
88                                      guchar       **ctext,
89                                      gint          *length);
90 #endif
91
92 gint gdk_text_property_to_text_list_for_display (GdkDisplay     *display,
93                                                  GdkAtom         encoding,
94                                                  gint            format,
95                                                  const guchar   *text,
96                                                  gint            length,
97                                                  gchar        ***list);
98 gint gdk_text_property_to_utf8_list_for_display (GdkDisplay     *display,
99                                                  GdkAtom         encoding,
100                                                  gint            format,
101                                                  const guchar   *text,
102                                                  gint            length,
103                                                  gchar        ***list);
104   
105 gchar   *gdk_utf8_to_string_target   (const gchar *str);
106 gint     gdk_string_to_compound_text_for_display (GdkDisplay   *display,
107                                                   const gchar  *str,
108                                                   GdkAtom      *encoding,
109                                                   gint         *format,
110                                                   guchar      **ctext,
111                                                   gint         *length);
112 gboolean gdk_utf8_to_compound_text_for_display   (GdkDisplay   *display,
113                                                   const gchar  *str,
114                                                   GdkAtom      *encoding,
115                                                   gint         *format,
116                                                   guchar      **ctext,
117                                                   gint         *length);
118
119 void gdk_free_text_list             (gchar        **list);
120 void gdk_free_compound_text         (guchar        *ctext);
121
122 G_END_DECLS
123
124 #endif /* __GDK_PROPERTY_H__ */