1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
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.
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.
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.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team.
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>
33 #ifndef __GDK_DIRECTFB_H__
34 #define __GDK_DIRECTFB_H__
38 #include "gdk/gdkprivate.h"
40 /* macro for a safe call to DirectFB functions */
41 #define DFBCHECK(x...) \
44 if (err != DFB_OK) { \
45 fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
46 DirectFBErrorFatal( #x, err ); \
51 extern GdkWindow * _gdk_parent_root;
55 #define GDK_ROOT_WINDOW() _gdk_parent_root
57 #define GDK_WINDOW_DFB_ID(win) (GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (win)->impl)->dfb_id)
60 /* used for the --transparent-unfocused hack */
61 extern gboolean gdk_directfb_apply_focus_opacity;
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;
68 /* to disable antialiasing */
69 extern gboolean gdk_directfb_monochrome_fonts;
72 /* GTK+-DirectFB specific functions */
74 void gdk_directfb_window_set_opacity (GdkWindow *window,
77 GdkWindow * gdk_directfb_window_new (GdkWindow *parent,
78 GdkWindowAttr *attributes,
80 DFBWindowCapabilities window_caps,
81 DFBWindowOptions window_options,
82 DFBSurfaceCapabilities surface_caps);
84 GdkVisual * gdk_directfb_visual_by_format (DFBSurfacePixelFormat pixel_format);
86 IDirectFBWindow *gdk_directfb_window_lookup(GdkWindow *window);
87 IDirectFBSurface *gdk_directfb_surface_lookup(GdkWindow *window);
88 GdkWindow *gdk_directfb_create_child_window(GdkWindow *parent,
89 IDirectFBSurface *subsurface);
93 #endif /* __GDK_DIRECTFB_H__ */