]> Pileus Git - ~andy/gtk/blob - gdk/gdkproperty.h
Start of integration of Erwann Chenede's multihead work from the
[~andy/gtk] / gdk / gdkproperty.h
1 #ifndef __GDK_PROPERTY_H__
2 #define __GDK_PROPERTY_H__
3
4 #include <gdk/gdktypes.h>
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif /* __cplusplus */
9
10 typedef enum
11 {
12   GDK_PROP_MODE_REPLACE,
13   GDK_PROP_MODE_PREPEND,
14   GDK_PROP_MODE_APPEND
15 } GdkPropMode;
16
17 GdkAtom gdk_atom_intern (const gchar *atom_name,
18                          gboolean     only_if_exists);
19 gchar*  gdk_atom_name   (GdkAtom      atom);
20
21 gboolean gdk_property_get    (GdkWindow     *window,
22                               GdkAtom        property,
23                               GdkAtom        type,
24                               gulong         offset,
25                               gulong         length,
26                               gint           pdelete,
27                               GdkAtom       *actual_property_type,
28                               gint          *actual_format,
29                               gint          *actual_length,
30                               guchar       **data);
31 void     gdk_property_change (GdkWindow     *window,
32                               GdkAtom        property,
33                               GdkAtom        type,
34                               gint           format,
35                               GdkPropMode    mode,
36                               const guchar  *data,
37                               gint           nelements);
38 void     gdk_property_delete (GdkWindow     *window,
39                               GdkAtom        property);
40 #ifndef GDK_MULTIHEAD_SAFE
41 gint gdk_text_property_to_text_list (GdkAtom        encoding,
42                                      gint           format,
43                                      const guchar  *text,
44                                      gint           length,
45                                      gchar       ***list);
46 gint gdk_text_property_to_utf8_list (GdkAtom        encoding,
47                                      gint           format,
48                                      const guchar  *text,
49                                      gint           length,
50                                      gchar       ***list);
51 gboolean gdk_utf8_to_compound_text (const gchar *str,
52                                     GdkAtom     *encoding,
53                                     gint        *format,
54                                     guchar     **ctext,
55                                     gint        *length);
56 gint gdk_string_to_compound_text    (const gchar   *str,
57                                      GdkAtom       *encoding,
58                                      gint          *format,
59                                      guchar       **ctext,
60                                      gint          *length);
61 #endif
62
63 gint gdk_text_property_to_text_list_for_display (GdkDisplay     *display,
64                                                  GdkAtom         encoding,
65                                                  gint            format,
66                                                  const guchar   *text,
67                                                  gint            length,
68                                                  gchar        ***list);
69 gint gdk_text_property_to_utf8_list_for_display (GdkDisplay     *display,
70                                                  GdkAtom         encoding,
71                                                  gint            format,
72                                                  const guchar   *text,
73                                                  gint            length,
74                                                  gchar        ***list);
75   
76 gchar   *gdk_utf8_to_string_target   (const gchar *str);
77 gint     gdk_string_to_compound_text_for_display (GdkDisplay   *display,
78                                                   const gchar  *str,
79                                                   GdkAtom      *encoding,
80                                                   gint         *format,
81                                                   guchar      **ctext,
82                                                   gint         *length);
83 gboolean gdk_utf8_to_compound_text_for_display   (GdkDisplay   *display,
84                                                   const gchar  *str,
85                                                   GdkAtom      *encoding,
86                                                   gint         *format,
87                                                   guchar      **ctext,
88                                                   gint         *length);
89
90 void gdk_free_text_list             (gchar        **list);
91 void gdk_free_compound_text         (guchar        *ctext);
92
93 #ifdef __cplusplus
94 }
95 #endif /* __cplusplus */
96
97 #endif /* __GDK_PROPERTY_H__ */