gdkproperty.h 3.63 KB
Newer Older
Cody Russell's avatar
Cody Russell committed
1
/* GDK - The GIMP Drawing Kit
2 3 4 5 6 7 8 9 10 11 12 13 14
 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
Javier Jardon's avatar
Javier Jardon committed
15
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 17 18 19 20 21
 */

/*
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
 * file for a list of people on the GTK+ Team.  See the ChangeLog
 * files for a list of changes.  These files are distributed with
22
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
23 24
 */

25 26 27
#ifndef __GDK_PROPERTY_H__
#define __GDK_PROPERTY_H__

28
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
29 30 31
#error "Only <gdk/gdk.h> can be included directly."
#endif

Owen Taylor's avatar
Owen Taylor committed
32
#include <gdk/gdktypes.h>
33
#include <gdk/gdkversionmacros.h>
Owen Taylor's avatar
Owen Taylor committed
34

35
G_BEGIN_DECLS
Owen Taylor's avatar
Owen Taylor committed
36

37 38 39 40 41 42 43 44 45 46

/**
 * GdkPropMode:
 * @GDK_PROP_MODE_REPLACE: the new data replaces the existing data.
 * @GDK_PROP_MODE_PREPEND: the new data is prepended to the existing data.
 * @GDK_PROP_MODE_APPEND: the new data is appended to the existing data.
 *
 * Describes how existing data is combined with new data when
 * using gdk_property_change().
 */
Owen Taylor's avatar
Owen Taylor committed
47 48 49 50 51 52 53
typedef enum
{
  GDK_PROP_MODE_REPLACE,
  GDK_PROP_MODE_PREPEND,
  GDK_PROP_MODE_APPEND
} GdkPropMode;

54

55
GDK_AVAILABLE_IN_ALL
Owen Taylor's avatar
Owen Taylor committed
56
GdkAtom gdk_atom_intern (const gchar *atom_name,
57
                         gboolean     only_if_exists);
58
GDK_AVAILABLE_IN_ALL
59
GdkAtom gdk_atom_intern_static_string (const gchar *atom_name);
60
GDK_AVAILABLE_IN_ALL
61
gchar*  gdk_atom_name   (GdkAtom      atom);
Owen Taylor's avatar
Owen Taylor committed
62

63

64
GDK_AVAILABLE_IN_ALL
Owen Taylor's avatar
Owen Taylor committed
65
gboolean gdk_property_get    (GdkWindow     *window,
66 67 68 69 70 71 72 73 74
                              GdkAtom        property,
                              GdkAtom        type,
                              gulong         offset,
                              gulong         length,
                              gint           pdelete,
                              GdkAtom       *actual_property_type,
                              gint          *actual_format,
                              gint          *actual_length,
                              guchar       **data);
75
GDK_AVAILABLE_IN_ALL
Owen Taylor's avatar
Owen Taylor committed
76
void     gdk_property_change (GdkWindow     *window,
77 78 79 80 81 82
                              GdkAtom        property,
                              GdkAtom        type,
                              gint           format,
                              GdkPropMode    mode,
                              const guchar  *data,
                              gint           nelements);
83
GDK_AVAILABLE_IN_ALL
Owen Taylor's avatar
Owen Taylor committed
84
void     gdk_property_delete (GdkWindow     *window,
85
                              GdkAtom        property);
86

87
GDK_AVAILABLE_IN_ALL
88 89 90 91 92 93
gint   gdk_text_property_to_utf8_list_for_display (GdkDisplay     *display,
                                                   GdkAtom         encoding,
                                                   gint            format,
                                                   const guchar   *text,
                                                   gint            length,
                                                   gchar        ***list);
94

95
GDK_AVAILABLE_IN_ALL
96
gchar *gdk_utf8_to_string_target                  (const gchar    *str);
Owen Taylor's avatar
Owen Taylor committed
97

98
G_END_DECLS
Owen Taylor's avatar
Owen Taylor committed
99 100

#endif /* __GDK_PROPERTY_H__ */