]> Pileus Git - ~andy/gtk/blob - gdk/directfb/gdkdirectfb.h
Added ifdef to compile with 0.9.24 removes creating a child GdkWindow
[~andy/gtk] / gdk / directfb / gdkdirectfb.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.
23  */
24
25 /*
26  * GTK+ DirectFB backend
27  * Copyright (C) 2001-2002  convergence integrated media GmbH
28  * Copyright (C) 2002       convergence GmbH
29  * Written by Denis Oliver Kropp <dok@convergence.de> and
30  *            Sven Neumann <sven@convergence.de>
31  */
32
33 #ifndef __GDK_DIRECTFB_H__
34 #define __GDK_DIRECTFB_H__
35
36 #include <cairo.h>
37 #include <directfb.h>
38 #include "gdk/gdkprivate.h"
39
40 /* macro for a safe call to DirectFB functions */
41 #define DFBCHECK(x...) \
42      {                                                                \
43           int err = x;                                                    \
44           if (err != DFB_OK) {                                        \
45                fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
46                DirectFBErrorFatal( #x, err );                         \
47           }                                                           \
48      }
49
50
51 extern GdkWindow * _gdk_parent_root;
52
53 G_BEGIN_DECLS
54
55 #define GDK_ROOT_WINDOW()      _gdk_parent_root 
56
57 #define GDK_WINDOW_DFB_ID(win) (GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (win)->impl)->dfb_id)
58
59
60 /* used for the --transparent-unfocused hack */
61 extern gboolean            gdk_directfb_apply_focus_opacity;
62
63 /* used for the --enable-color-keying hack */
64 extern gboolean            gdk_directfb_enable_color_keying;
65 extern DFBColor            gdk_directfb_bg_color;
66 extern DFBColor            gdk_directfb_bg_color_key;
67
68 /* to disable antialiasing */
69 extern gboolean            gdk_directfb_monochrome_fonts;
70
71
72 /* GTK+-DirectFB specific functions */
73
74 void        gdk_directfb_window_set_opacity (GdkWindow             *window,
75                                              guchar                 opacity);
76
77 GdkWindow * gdk_directfb_window_new         (GdkWindow             *parent,
78                                              GdkWindowAttr         *attributes,
79                                              gint                   attributes_mask,
80                                              DFBWindowCapabilities  window_caps,
81                                              DFBWindowOptions       window_options,
82                                              DFBSurfaceCapabilities surface_caps);
83
84 GdkVisual * gdk_directfb_visual_by_format   (DFBSurfacePixelFormat  pixel_format);
85
86 IDirectFBWindow *gdk_directfb_window_lookup(GdkWindow *window);
87 IDirectFBSurface *gdk_directfb_surface_lookup(GdkWindow *window);
88
89 #if (DIRECTFB_MICRO_VERSION > 24)
90 GdkWindow *gdk_directfb_create_child_window(GdkWindow *parent,
91                 IDirectFBSurface *subsurface);
92 #endif
93
94
95 G_END_DECLS
96
97 #endif /* __GDK_DIRECTFB_H__ */