gtk/gdk/directfb
Sven Neumann a292a2c70f Bug 533456 – Memory leak when window is destroyed
2009-02-18  Sven Neumann  <sven@gimp.org>

	Bug 533456 – Memory leak when window is destroyed

	* gdk/directfb/gdkdirectfb.h
	* gdk/directfb/gdkprivate-directfb.h
	* gdk/directfb/gdkcursor-directfb.c
	* gdk/directfb/gdkevents-directfb.c
	* gdk/directfb/gdkwindow-directfb.c: removed all #ifdef checks 
for
	DIRECTFB_MAJOR_VERSION >= 1. We depend on DirectFB >= 1.0.0 now.
	Fixes a potential build issue that would lead to a memory leak 
as
	described in bug #533456.


svn path=/trunk/; revision=22367
2009-02-18 20:43:31 +00:00
..
AUTHORS updated mine and Dok's email address. 2006-02-07 11:58:49 +00:00
gdkapplaunchcontext-directfb.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkcolor-directfb.c gdk/gdk.h gdk/gdkcairo.h gdk/gdkcolor.h gdk/gdkgc.h gdk/gdkinternals.h 2008-01-14 14:02:12 +00:00
gdkcursor-directfb.c Bug 533456 – Memory leak when window is destroyed 2009-02-18 20:43:31 +00:00
gdkdirectfb.h Bug 533456 – Memory leak when window is destroyed 2009-02-18 20:43:31 +00:00
gdkdisplay-directfb.c Bug 513422 – Unknown meaning of translatable messages 2009-02-18 18:14:17 +00:00
gdkdisplay-directfb.h Added new directfb backend 2006-02-05 04:04:29 +00:00
gdkdnd-directfb.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkdrawable-directfb.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkevents-directfb.c Bug 533456 – Memory leak when window is destroyed 2009-02-18 20:43:31 +00:00
gdkfont-directfb.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkgc-directfb.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkgeometry-directfb.c Bug 554407 – directfb backend does not implement GdkWindowImpl 2009-02-18 17:17:33 +00:00
gdkglobals-directfb.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkim-directfb.c gdk/directfb/gdkdirectfb.h gdk/directfb/gdkdisplay-directfb.c 2008-01-30 19:43:16 +00:00
gdkimage-directfb.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkinput-directfb.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkinput-directfb.h Added new directfb backend 2006-02-05 04:04:29 +00:00
gdkkeys-directfb.c Bug 543710 – Dead keys do not work anymore with DirectFB 2009-02-18 17:43:13 +00:00
gdkmain-directfb.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkpixmap-directfb.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkprivate-directfb.h Bug 533456 – Memory leak when window is destroyed 2009-02-18 20:43:31 +00:00
gdkproperty-directfb.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdkscreen-directfb.c add these functions to make it build again. 2008-01-10 17:04:45 +00:00
gdkselection-directfb.c Added new directfb backend 2006-02-05 04:04:29 +00:00
gdkspawn-directfb.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
gdktestutils-directfb.c gdk/directfb/gdkdirectfb.h gdk/directfb/gdkdisplay-directfb.c 2008-01-30 19:43:16 +00:00
gdkvisual-directfb.c Avoid a crash 2008-07-18 19:03:54 +00:00
gdkwindow-directfb.c Bug 533456 – Memory leak when window is destroyed 2009-02-18 20:43:31 +00:00
gdkwindowid.c Added new directfb backend 2006-02-05 04:04:29 +00:00
Makefile.am Implement GAppLaunchContext in gdk, providing startup notification. 2007-12-13 05:16:33 +00:00
README Removed old build instructions 2006-02-26 18:24:53 +00:00
TODO *gdk/directfb/gdkdisplay-directfb.c *gdk/directfb/gdkwindow-directfb.c 2006-02-25 18:37:53 +00:00
x-cursors.xbm Added new directfb backend 2006-02-05 04:04:29 +00:00

README for GDK-DirectFB
------------------------

This is the GDK backend that allows GTK to work on top of DirectFB.

Important:
The current code does not pass through directfb passed on the gtk
apps command line on to directfb you need to set the environment variable
DFBARGS.
Example:
export DFBARGS=system=sdl

DirectFB is a hardware abstraction layer on top of the Linux
frame buffer that provides drawing functions, a window stack and
support for input devices. The code you find here is a backend for
GDK, the drawing kit used by GTK+.


As DirectFB provides drawing functions, a windowing stack and manages
input devices, this is a lightweight GDK port. Some parts of GDK
require higher level drawing functions that are supported by 
cairo on DirectFB. 
GDK also uses some feature like bitmaps that do not map well to 
modern graphics hardware and are for that reason not yet supported in 
this snapshot. See the file TODO for a list of missing features.


If you want GTK+ to draw window decorations for you, edit the file
gtk/gtkwindow-decorate.c and uncomment the line that says
#define DECORATE_WINDOWS.


GTK+ application compiled with this version of GTK+ understand some
additional command-line options special to the DirectFB GDK backend:

  --transparent-unfocused  Makes unfocused windows translucent.

  --argb-font              Use ARGB surfaces for fonts, needed for some
                           broken hardware.

  --glyph-surface-cache    Lets you tune the size of the glyph cache, 
                           the default is to cache glyphs from 8 faces.

  --enable-color-keying    This option turns on a hack that does the
                           following:

    (1) It overrides the color used to draw the window background to
        gdk_directfb_bg_color as defined in gdkprivate-directfb.h.
        Note that the alpha value only takes effect if the window has
        an alpha channel.
    (2) It also draws all rectangles that are drawn in
        gdk_directfb_bg_color_key in this color (gdk_directfb_bg_color).

    This feature can be used to create windows with translucent background.

Additionally all DirectFB command-line options as described in the
directfbrc man-page are supported.


This version of GTK+ also introduces two new functions that are special
to the DirectFB version. You need to include gdk/gdkdirectfb.h to be
able to use them.

  gdk_directfb_window_set_opacity (GdkWindow *window, guchar opacity));

      This function sets the overall opacity for toplevel GDK windows.

  gdk_directfb_visual_by_format (DFBSurfacePixelFormat pixel_format);

      This function returns a GdkVisual for a DirectFB pixelformat and
      thus gives you control over the window surface. If for example
      you want to create a window with alpha channel you can use some
      code like the following:

        visual = gdk_directfb_visual_by_format (DSPF_ARGB);
        cmap = gdk_colormap_new (visual, FALSE);
        gtk_widget_push_colormap (cmap);
        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
        gtk_widget_pop_colormap ();
        g_object_unref (cmap);

Don't use these functions if you want to be able to compile your
application against GTK+-X11 or other GTK+ versions.


If you are developing a GTK+ application for GTK+-DirectFB make sure
you use the gtk+-directfb-2.0.pc file when calling pkg-config to get
the  correct compiler and linker flags for GTK+-DirectFB:

  pkg-config --cflags gtk+-directfb-2.0
  pkg-config --libs gtk+-directfb-2.0


See the file TODO for a list of unimplemented features.


Detailed and up-to-date instructions on how to build a complete
set of GTK-DFB libraries is avalable in the WIKI of the DirectFB project
at the address
http://www.directfb.org/wiki/index.php/Projects:GTK_on_DirectFB


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.