agp.h   agp.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 arena.h   arena.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 build.h   build.h 
skipping to change at line 39 skipping to change at line 39
#define __DIRECT__BUILD_H__ #define __DIRECT__BUILD_H__
#define DIRECT_BUILD_DEBUG (0) #define DIRECT_BUILD_DEBUG (0)
#define DIRECT_BUILD_DEBUGS (1) #define DIRECT_BUILD_DEBUGS (1)
#define DIRECT_BUILD_TRACE (0) #define DIRECT_BUILD_TRACE (0)
#define DIRECT_BUILD_TEXT (1) #define DIRECT_BUILD_TEXT (1)
#define DIRECT_BUILD_GETTID (1) #define DIRECT_BUILD_GETTID (1)
#define DIRECT_BUILD_NETWORK (1) #define DIRECT_BUILD_NETWORK (1)
#define DIRECT_BUILD_STDBOOL (1) #define DIRECT_BUILD_STDBOOL (1)
#if !DIRECT_BUILD_DEBUGS
#if defined(DIRECT_ENABLE_DEBUG) || defined(DIRECT_FORCE_DEBUG)
#define DIRECT_MINI_DEBUG
#endif
#undef DIRECT_ENABLE_DEBUG
#ifdef DIRECT_FORCE_DEBUG
#warning DIRECT_FORCE_DEBUG used with 'pure release' library headers.
#undef DIRECT_FORCE_DEBUG
#endif
#endif
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 11 lines changed or added


 call.h   call.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 34 skipping to change at line 34
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __FUSION__CALL_H__ #ifndef __FUSION__CALL_H__
#define __FUSION__CALL_H__ #define __FUSION__CALL_H__
#include <fusion/types.h> #include <fusion/types.h>
typedef int (*FusionCallHandler) (int caller, /* fusion id of the calle typedef enum {
r */ FCHR_RETURN,
int call_arg, /* optional call paramete FCHR_RETAIN
r */ } FusionCallHandlerResult;
void *call_ptr, /* optional call paramete
r */ typedef FusionCallHandlerResult (*FusionCallHandler) (int caller,
void *ctx /* optional handler conte /* fusion id of the caller */
xt */ int call_ar
); g, /* optional call parameter */
void *call_pt
r, /* optional call parameter */
void *ctx,
/* optional handler context */
unsigned int serial,
int *ret_val
);
typedef struct { typedef struct {
FusionWorldShared *shared; FusionWorldShared *shared;
int call_id; int call_id;
int fusion_id; FusionID fusion_id;
FusionCallHandler handler; FusionCallHandler handler;
void *ctx; void *ctx;
} FusionCall; } FusionCall;
DirectResult fusion_call_init (FusionCall *call, DirectResult fusion_call_init ( FusionCall *call,
FusionCallHandler handler, FusionCallHandler handler,
void *ctx, void *ctx,
const FusionWorld *world); const FusionWorld *world );
DirectResult fusion_call_execute (FusionCall *call, DirectResult fusion_call_execute( FusionCall *call,
FusionCallExecFlags flags, FusionCallExecFlags flags,
int call_arg, int call_arg,
void *call_ptr, void *call_ptr,
int *ret_val); int *ret_val );
DirectResult fusion_call_destroy (FusionCall *call); DirectResult fusion_call_return ( FusionCall *call,
unsigned int serial,
int val );
DirectResult fusion_call_destroy( FusionCall *call );
#endif #endif
 End of changes. 8 change blocks. 
16 lines changed or deleted 27 lines changed or added


 clip.h   clip.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 80 skipping to change at line 80
} }
/* /*
* Simple check if triangle lies outside the clipping region. * Simple check if triangle lies outside the clipping region.
* Returns true if the triangle may be visible within the region. * Returns true if the triangle may be visible within the region.
*/ */
DFBBoolean dfb_clip_triangle_precheck( const DFBRegion *clip, DFBBoolean dfb_clip_triangle_precheck( const DFBRegion *clip,
const DFBTriangle *tri ); const DFBTriangle *tri );
/* /*
* Clips the triangle to the clipping region.
* Returns true if the triangle if visible within the region.
* The vertices of the polygon resulting from intersection are returned in
buf.
* The number of vertices is at least 3.
*/
DFBBoolean dfb_clip_triangle( const DFBRegion *clip,
const DFBTriangle *tri,
DFBPoint buf[6],
int *num );
/*
* Simple check if requested blitting lies outside of the clipping region. * Simple check if requested blitting lies outside of the clipping region.
* Returns true if blitting may need to be performed. * Returns true if blitting may need to be performed.
*/ */
static inline DFBBoolean static inline DFBBoolean
dfb_clip_blit_precheck( const DFBRegion *clip, dfb_clip_blit_precheck( const DFBRegion *clip,
int w, int h, int dx, int dy ) int w, int h, int dx, int dy )
{ {
if (w < 1 || h < 1 || if (w < 1 || h < 1 ||
(clip->x1 >= dx + w) || (clip->x1 >= dx + w) ||
(clip->x2 < dx) || (clip->x2 < dx) ||
 End of changes. 2 change blocks. 
1 lines changed or deleted 13 lines changed or added


 clipboard.h   clipboard.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 34 skipping to change at line 34
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __CORE__CLIPBOARD_H__ #ifndef __CORE__CLIPBOARD_H__
#define __CORE__CLIPBOARD_H__ #define __CORE__CLIPBOARD_H__
#include <directfb.h> #include <directfb.h>
DFBResult dfb_clipboard_set( const char *mime_type, #include <core/coretypes.h>
const void *data,
unsigned int size,
struct timeval *timestamp );
DFBResult dfb_clipboard_get( char **mime_type, DFBResult dfb_clipboard_set( DFBClipboardCore *core,
void **data, const char *mime_type,
unsigned int *size ); const void *data,
unsigned int size,
struct timeval *timestamp );
DFBResult dfb_clipboard_get_timestamp( struct timeval *timestamp ); DFBResult dfb_clipboard_get( DFBClipboardCore *core,
char **mime_type,
void **data,
unsigned int *size );
DFBResult dfb_clipboard_get_timestamp( DFBClipboardCore *core,
struct timeval *timestamp );
#endif #endif
 End of changes. 4 change blocks. 
9 lines changed or deleted 14 lines changed or added


 clock.h   clock.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 colorhash.h   colorhash.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 36 skipping to change at line 36
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __CORE__COLORHASH_H__ #ifndef __CORE__COLORHASH_H__
#define __CORE__COLORHASH_H__ #define __CORE__COLORHASH_H__
#include <directfb.h> #include <directfb.h>
#include <core/coretypes.h> #include <core/coretypes.h>
void dfb_colorhash_attach (CorePalette *palette); void dfb_colorhash_attach ( DFBColorHashCore *core,
void dfb_colorhash_detach (CorePalette *palette); CorePalette *palette );
unsigned int dfb_colorhash_lookup (CorePalette *palette,
u8 r, void dfb_colorhash_detach ( DFBColorHashCore *core,
u8 g, CorePalette *palette );
u8 b,
u8 a); unsigned int dfb_colorhash_lookup ( DFBColorHashCore *core,
void dfb_colorhash_invalidate (CorePalette *palette); CorePalette *palette,
u8 r,
u8 g,
u8 b,
u8 a);
void dfb_colorhash_invalidate( DFBColorHashCore *core,
CorePalette *palette );
#endif #endif
 End of changes. 2 change blocks. 
9 lines changed or deleted 16 lines changed or added


 conf.h   conf.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 36 skipping to change at line 36
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __CONF_H__ #ifndef __CONF_H__
#define __CONF_H__ #define __CONF_H__
#include <signal.h> #include <signal.h>
#include <directfb.h> #include <directfb.h>
#include <fusion/types.h> #include <fusion/types.h>
#include <fusion/vector.h>
#include <core/coredefs.h>
typedef struct {
bool init;
DFBDisplayLayerConfig config;
DFBColor src_key;
int src_key_index;
struct {
DFBDisplayLayerBackgroundMode mode;
DFBColor color;
int color_index;
char *filename;
} background;
DFBWindowStackingClass stacking;
DFBColor palette[256];
bool palette_set;
int rotate;
} DFBConfigLayer;
typedef struct typedef struct
{ {
DFBDisplayLayerBackgroundMode layer_bg_mode; /* background mode for
primary layer */
DFBColor layer_bg_color; /* background color for
primary layer */
char *layer_bg_filename; /* background image for
primary layer */
bool mouse_motion_compression; /* use motion compression ? */ bool mouse_motion_compression; /* use motion compression ? */
char *mouse_protocol; /* mouse protocol */ char *mouse_protocol; /* mouse protocol */
char *mouse_source; /* mouse source device na me */ char *mouse_source; /* mouse source device na me */
bool mouse_gpm_source; /* mouse source is gpm? * / bool mouse_gpm_source; /* mouse source is gpm? * /
int window_policy; /* swapping policy for th e int window_policy; /* swapping policy for th e
surface of a window */ surface of a window */
int buffer_mode; /* default buffer mode fo r int buffer_mode; /* default buffer mode fo r
primary layer */ primary layer */
skipping to change at line 165 skipping to change at line 183
bool dma; /* Enable DMA */ bool dma; /* Enable DMA */
int agp; /* AGP mode */ int agp; /* AGP mode */
int agpmem_limit; /* Limit of AGP memory int agpmem_limit; /* Limit of AGP memory
used by DirectFB */ used by DirectFB */
bool i8xx_overlay_pipe_b; /* video overlay output v ia pixel pipe B */ bool i8xx_overlay_pipe_b; /* video overlay output v ia pixel pipe B */
bool primary_only; /* tell application only about primary layer */ bool primary_only; /* tell application only about primary layer */
bool thrifty_surface_buffers; /* don't keep system inst ance while video instance is alive */ bool thrifty_surface_buffers; /* don't keep system inst ance while video instance is alive */
bool surface_sentinel;
DFBConfigLayer layers[MAX_LAYERS];
DFBConfigLayer *config_layer;
DFBSurfaceRenderOptions render_options; /* default render options
*/
bool startstop; /* Issue StartDrawing/Sto
pDrawing to driver */
unsigned long video_phys; /* Physical base address of video memory */ unsigned long video_phys; /* Physical base address of video memory */
unsigned int video_length; /* Size of video memory * / unsigned int video_length; /* Size of video memory * /
unsigned long mmio_phys; /* Physical base address of MMIO area */ unsigned long mmio_phys; /* Physical base address of MMIO area */
unsigned int mmio_length; /* Size of MMIO area */ unsigned int mmio_length; /* Size of MMIO area */
int accelerator; /* Accelerator ID */ int accelerator; /* Accelerator ID */
bool font_premult; /* Use premultiplied data
in case of ARGB glyph images */
FusionVector linux_input_devices;
FusionVector tslib_devices;
bool thread_block_signals; /* Call direct_signals_bl
ock_all() in direct_thread_main() startup. */
bool linux_input_grab; /* Grab input devices. */
bool autoflip_window; /* If primary surface is
non-flipping, but windowed, flip automatically. */
bool software_warn; /* Show warnings when doi
ng/dropping software operations. */
int surface_shmpool_size; /* Set the size of the sh
ared memory pool used for
shared system memory s
urfaces. */
bool no_cursor_updates; /* Never show the cursor
etc. */
} DFBConfig; } DFBConfig;
extern DFBConfig *dfb_config; extern DFBConfig *dfb_config;
/* /*
* Allocate Config struct, fill with defaults and parse command line option s * Allocate Config struct, fill with defaults and parse command line option s
* for overrides. Options identified as DirectFB options are stripped out * for overrides. Options identified as DirectFB options are stripped out
* of the array. * of the array.
*/ */
DFBResult dfb_config_init( int *argc, char *(*argv[]) ); DFBResult dfb_config_init( int *argc, char *(*argv[]) );
 End of changes. 5 change blocks. 
8 lines changed or deleted 60 lines changed or added


 convert.h   convert.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 52 skipping to change at line 52
#define PIXEL_ARGB1555(a,r,g,b)( (((a)&0x80) << 8) | \ #define PIXEL_ARGB1555(a,r,g,b)( (((a)&0x80) << 8) | \
(((r)&0xF8) << 7) | \ (((r)&0xF8) << 7) | \
(((g)&0xF8) << 2) | \ (((g)&0xF8) << 2) | \
(((b)&0xF8) >> 3) ) (((b)&0xF8) >> 3) )
#define PIXEL_RGB555(r,g,b) ( (((r)&0xF8) << 7) | \ #define PIXEL_RGB555(r,g,b) ( (((r)&0xF8) << 7) | \
(((g)&0xF8) << 2) | \ (((g)&0xF8) << 2) | \
(((b)&0xF8) >> 3) ) (((b)&0xF8) >> 3) )
#define PIXEL_BGR555(r,g,b) ( (((b)&0xF8) << 7) | \
(((g)&0xF8) << 2) | \
(((r)&0xF8) >> 3) )
#define PIXEL_ARGB2554(a,r,g,b)( (((a)&0xC0) << 8) | \ #define PIXEL_ARGB2554(a,r,g,b)( (((a)&0xC0) << 8) | \
(((r)&0xF8) << 6) | \ (((r)&0xF8) << 6) | \
(((g)&0xF8) << 1) | \ (((g)&0xF8) << 1) | \
(((b)&0xF0) >> 4) ) (((b)&0xF0) >> 4) )
#define PIXEL_ARGB4444(a,r,g,b)( (((a)&0xF0) << 8) | \ #define PIXEL_ARGB4444(a,r,g,b)( (((a)&0xF0) << 8) | \
(((r)&0xF0) << 4) | \ (((r)&0xF0) << 4) | \
(((g)&0xF0) ) | \ (((g)&0xF0) ) | \
(((b)&0xF0) >> 4) ) (((b)&0xF0) >> 4) )
skipping to change at line 163 skipping to change at line 167
(((pixel) & 0x001F) << 3) ) (((pixel) & 0x001F) << 3) )
#define ARGB1555_TO_RGB555(pixel) ( (((pixel) & 0x7C00) << 9) | \ #define ARGB1555_TO_RGB555(pixel) ( (((pixel) & 0x7C00) << 9) | \
(((pixel) & 0x03E0) << 6) | \ (((pixel) & 0x03E0) << 6) | \
(((pixel) & 0x001F) << 3) ) (((pixel) & 0x001F) << 3) )
#define ARGB1555_TO_RGB444(pixel) ( (((pixel) & 0x7800) >> 3) | \ #define ARGB1555_TO_RGB444(pixel) ( (((pixel) & 0x7800) >> 3) | \
(((pixel) & 0x03C0) >> 2) | \ (((pixel) & 0x03C0) >> 2) | \
(((pixel) & 0x001E) >> 1) ) (((pixel) & 0x001E) >> 1) )
#define ARGB4444_TO_RGB32(pixel) ( (((pixel) & 0x0F00) << 12) | \
(((pixel) & 0x00F0) << 8) | \
(((pixel) & 0x000F) << 4) )
#define RGB16_TO_RGB332(pixel) ( (((pixel) & 0xE000) >> 8) | \ #define RGB16_TO_RGB332(pixel) ( (((pixel) & 0xE000) >> 8) | \
(((pixel) & 0x0700) >> 6) | \ (((pixel) & 0x0700) >> 6) | \
(((pixel) & 0x0018) >> 3) ) (((pixel) & 0x0018) >> 3) )
#define RGB16_TO_ARGB1555(pixel) ( 0x8000 | \ #define RGB16_TO_ARGB1555(pixel) ( 0x8000 | \
(((pixel) & 0xF800) >> 1) | \ (((pixel) & 0xF800) >> 1) | \
(((pixel) & 0x07C0) >> 1) | \ (((pixel) & 0x07C0) >> 1) | \
(((pixel) & 0x001F)) ) (((pixel) & 0x001F)) )
#define RGB16_TO_ARGB2554(pixel) ( 0xC000 | \ #define RGB16_TO_ARGB2554(pixel) ( 0xC000 | \
skipping to change at line 195 skipping to change at line 203
#define RGB16_TO_ARGB(pixel) ( 0xFF000000 | \ #define RGB16_TO_ARGB(pixel) ( 0xFF000000 | \
(((pixel) & 0xF800) << 8) | \ (((pixel) & 0xF800) << 8) | \
(((pixel) & 0x07E0) << 5) | \ (((pixel) & 0x07E0) << 5) | \
(((pixel) & 0x001F) << 3) ) (((pixel) & 0x001F) << 3) )
#define RGB16_TO_RGB555(pixel) ( (((pixel) & 0xF800) >> 1) | \ #define RGB16_TO_RGB555(pixel) ( (((pixel) & 0xF800) >> 1) | \
(((pixel) & 0x07C0) >> 1) | \ (((pixel) & 0x07C0) >> 1) | \
(((pixel) & 0x001F)) ) (((pixel) & 0x001F)) )
#define RGB16_TO_BGR555(pixel) ( (((pixel) & 0xF800) >> 12) | \
(((pixel) & 0x07C0) >> 1) | \
(((pixel) & 0x001F) << 10 ) )
#define RGB16_TO_RGB444(pixel) ( (((pixel) & 0xF000) >> 4) | \ #define RGB16_TO_RGB444(pixel) ( (((pixel) & 0xF000) >> 4) | \
(((pixel) & 0x0780) >> 3) | \ (((pixel) & 0x0780) >> 3) | \
(((pixel) & 0x001F) >> 1) ) (((pixel) & 0x001F) >> 1) )
#define RGB18_TO_ARGB(pixel) ( 0xFF000000 | \ #define RGB18_TO_ARGB(pixel) ( 0xFF000000 | \
(((pixel) & 0xFC00) << 10) | \ (((pixel) & 0xFC00) << 10) | \
(((pixel) & 0x3F00) << 4) | \ (((pixel) & 0x3F00) << 4) | \
(((pixel) & 0x00FC) << 2) ) (((pixel) & 0x00FC) << 2) )
#define RGB32_TO_RGB332(pixel) ( (((pixel) & 0xE00000) >> 16) | \ #define RGB32_TO_RGB332(pixel) ( (((pixel) & 0xE00000) >> 16) | \
skipping to change at line 238 skipping to change at line 250
(((pixel) & 0xF80000) >> 9) | \ (((pixel) & 0xF80000) >> 9) | \
(((pixel) & 0x00F800) >> 6) | \ (((pixel) & 0x00F800) >> 6) | \
(((pixel) & 0x0000F8) >> 3) ) (((pixel) & 0x0000F8) >> 3) )
#define RGB32_TO_ARGB(pixel) ( 0xFF000000 | (pixel) ) #define RGB32_TO_ARGB(pixel) ( 0xFF000000 | (pixel) )
#define RGB32_TO_RGB555(pixel) ( (((pixel) & 0xF80000) >> 9) | \ #define RGB32_TO_RGB555(pixel) ( (((pixel) & 0xF80000) >> 9) | \
(((pixel) & 0x00F800) >> 6) | \ (((pixel) & 0x00F800) >> 6) | \
(((pixel) & 0x0000F8) >> 3) ) (((pixel) & 0x0000F8) >> 3) )
#define RGB32_TO_BGR555(pixel) ( (((pixel) & 0xF80000) >> 19) | \
(((pixel) & 0x00F800) >> 6) | \
(((pixel) & 0x0000F8) << 7) )
#define RGB32_TO_RGB444(pixel) ( (((pixel) & 0xF00000) >> 12) | \ #define RGB32_TO_RGB444(pixel) ( (((pixel) & 0xF00000) >> 12) | \
(((pixel) & 0x00F000) >> 8) | \ (((pixel) & 0x00F000) >> 8) | \
(((pixel) & 0x0000F0) >> 4) ) (((pixel) & 0x0000F0) >> 4) )
#define ARGB_TO_ARGB1555(pixel) ( (((pixel) & 0x80000000) >> 16) | \ #define ARGB_TO_ARGB1555(pixel) ( (((pixel) & 0x80000000) >> 16) | \
(((pixel) & 0x00F80000) >> 9) | \ (((pixel) & 0x00F80000) >> 9) | \
(((pixel) & 0x0000F800) >> 6) | \ (((pixel) & 0x0000F800) >> 6) | \
(((pixel) & 0x000000F8) >> 3) ) (((pixel) & 0x000000F8) >> 3) )
#define ARGB_TO_ARGB2554(pixel) ( (((pixel) & 0xC0000000) >> 16) | \ #define ARGB_TO_ARGB2554(pixel) ( (((pixel) & 0xC0000000) >> 16) | \
skipping to change at line 264 skipping to change at line 280
(((pixel) & 0x0000F000) >> 8) | \ (((pixel) & 0x0000F000) >> 8) | \
(((pixel) & 0x000000F0) >> 4) ) (((pixel) & 0x000000F0) >> 4) )
#define ARGB_TO_RGB444(pixel) ( (((pixel) & 0x00F00000) >> 12) | \ #define ARGB_TO_RGB444(pixel) ( (((pixel) & 0x00F00000) >> 12) | \
(((pixel) & 0x0000F000) >> 8) | \ (((pixel) & 0x0000F000) >> 8) | \
(((pixel) & 0x000000F0) >> 4) ) (((pixel) & 0x000000F0) >> 4) )
#define ARGB_TO_RGB555(pixel) ( (((pixel) & 0x00F80000) >> 9) | \ #define ARGB_TO_RGB555(pixel) ( (((pixel) & 0x00F80000) >> 9) | \
(((pixel) & 0x0000F800) >> 6) | \ (((pixel) & 0x0000F800) >> 6) | \
(((pixel) & 0x000000F8) >> 3) ) (((pixel) & 0x000000F8) >> 3) )
#define ARGB_TO_BGR555(pixel) ( (((pixel) & 0x00F80000) >> 19) | \
(((pixel) & 0x0000F800) >> 6) | \
(((pixel) & 0x000000F8) << 7) )
/* RGB <-> YCbCr conversion */ /* RGB <-> YCbCr conversion */
extern const u16 y_for_rgb[256]; extern const u16 y_for_rgb[256];
extern const s16 cr_for_r[256]; extern const s16 cr_for_r[256];
extern const s16 cr_for_g[256]; extern const s16 cr_for_g[256];
extern const s16 cb_for_g[256]; extern const s16 cb_for_g[256];
extern const s16 cb_for_b[256]; extern const s16 cb_for_b[256];
#define YCBCR_TO_RGB( y, cb, cr, r, g, b ) do { \ #define YCBCR_TO_RGB( y, cb, cr, r, g, b ) do { \
u16 _y, _cb, _cr;\ u16 _y, _cb, _cr;\
skipping to change at line 299 skipping to change at line 319
u32 _ey, _r, _g, _b;\ u32 _ey, _r, _g, _b;\
_r = (r); _g = (g); _b = (b);\ _r = (r); _g = (g); _b = (b);\
_ey = (19595 * _r + 38469 * _g + 7471 * _b) >> 16;\ _ey = (19595 * _r + 38469 * _g + 7471 * _b) >> 16;\
(y) = y_from_ey[_ey]; \ (y) = y_from_ey[_ey]; \
(cb) = cb_from_bey[_b-_ey+255]; \ (cb) = cb_from_bey[_b-_ey+255]; \
(cr) = cr_from_rey[_r-_ey+255]; \ (cr) = cr_from_rey[_r-_ey+255]; \
} while (0) } while (0)
DFBSurfacePixelFormat dfb_pixelformat_for_depth( int depth ); DFBSurfacePixelFormat dfb_pixelformat_for_depth( int depth );
u32 dfb_color_to_pixel( DFBSurfacePixelFormat format, void dfb_pixel_to_color ( DFBSurfacePixelFormat format,
u8 r, u8 g, u8 b ); unsigned long pixel,
DFBColor *ret_colo
r );
void dfb_pixel_to_color( DFBSurfacePixelFormat format, unsigned long dfb_pixel_from_color( DFBSurfacePixelFormat format,
unsigned long pixel, const DFBColor *color );
DFBColor *ret_color );
const char *dfb_pixelformat_name( DFBSurfacePixelFormat format ); static inline u32
dfb_color_to_pixel( DFBSurfacePixelFormat format,
u8 r, u8 g, u8 b )
{
const DFBColor color = { 0, r, g, b };
return dfb_pixel_from_color( format, &color );
}
static inline u32 static inline u32
dfb_color_to_argb( const DFBColor *color ) dfb_color_to_argb( const DFBColor *color )
{ {
return (color->a << 24) | (color->r << 16) | (color->g << 8) | color-> b; return (color->a << 24) | (color->r << 16) | (color->g << 8) | color-> b;
} }
static inline u32 static inline u32
dfb_color_to_aycbcr( const DFBColor *color ) dfb_color_to_aycbcr( const DFBColor *color )
{ {
skipping to change at line 398 skipping to change at line 425
static inline void static inline void
dfb_argb_to_a8( u32 *src, u8 *dst, int len ) dfb_argb_to_a8( u32 *src, u8 *dst, int len )
{ {
int i; int i;
for (i=0; i<len; i++) for (i=0; i<len; i++)
dst[i] = src[i] >> 24; dst[i] = src[i] >> 24;
} }
static inline void void dfb_convert_to_rgb16( DFBSurfacePixelFormat format,
dfb_convert_to_rgb16( DFBSurfacePixelFormat format, void *src,
void *src, int spitch,
int spitch, int surface_height,
int surface_height, u16 *dst,
u16 *dst, int dpitch,
int dpitch, int width,
int width, int height );
int height )
{
int x;
int dp2 = dpitch / 2;
u8 *src8;
u16 *src16;
u32 *src32;
switch (format) {
case DSPF_RGB16:
while (height--) {
direct_memcpy( dst, src, width * 2 );
src += spitch;
dst += dp2;
}
break;
case DSPF_NV16:
while (height--) {
src8 = src;
src16 = src + surface_height * spitch;
for (x=0; x<width; x++) {
int r, g, b;
YCBCR_TO_RGB( src8[x], src16[x>>1] & 0xff, src16[x
>>1] >> 8, r, g, b );
dst[x] = PIXEL_RGB16( r, g, b );
}
src += spitch;
dst += dp2;
}
break;
case DSPF_RGB444:
case DSPF_ARGB4444:
while (height--) {
src16 = src;
for (x=0; x<width; x++)
dst[x] = PIXEL_RGB16( ((src16[x] & 0x0f00) >> 4) |
((src16[x] & 0x0f00) >> 8),
((src16[x] & 0x00f0) ) |
((src16[x] & 0x00f0) >> 4),
((src16[x] & 0x000f) << 4) |
((src16[x] & 0x000f) ) );
src += spitch;
dst += dp2;
}
break;
case DSPF_RGB555:
case DSPF_ARGB1555:
while (height--) {
src16 = src;
for (x=0; x<width; x++)
dst[x] = ((src16[x] & 0x7fe0) << 1) | (src16[x] &
0x003f);
src += spitch;
dst += dp2;
}
break;
case DSPF_RGB32:
case DSPF_ARGB:
while (height--) {
src32 = src;
for (x=0; x<width; x++)
dst[x] = PIXEL_RGB16( ((src32[x] & 0xff0000) >> 16
),
((src32[x] & 0x00ff00) >> 8
),
((src32[x] & 0x0000ff)
) );
src += spitch;
dst += dp2;
}
break;
default:
D_ONCE( "unsupported format" );
}
}
static inline void
dfb_convert_to_rgb32( DFBSurfacePixelFormat format,
void *src,
int spitch,
int surface_height,
u32 *dst,
int dpitch,
int width,
int height )
{
int x;
int dp4 = dpitch / 4;
u8 *src8;
u16 *src16;
switch (format) {
case DSPF_RGB32:
case DSPF_ARGB:
while (height--) {
direct_memcpy( dst, src, width * 4 );
src += spitch;
dst += dp4;
}
break;
case DSPF_NV16:
while (height--) {
src8 = src;
src16 = src + surface_height * spitch;
for (x=0; x<width; x++) {
int r, g, b;
YCBCR_TO_RGB( src8[x], src16[x>>1] & 0xff, src16[x
>>1] >> 8, r, g, b );
dst[x] = PIXEL_RGB32( r, g, b );
}
src += spitch;
dst += dp4;
}
break;
case DSPF_RGB444:
case DSPF_ARGB4444:
while (height--) {
src16 = src;
for (x=0; x<width; x++)
dst[x] = PIXEL_RGB32( ((src16[x] & 0x0f00) >> 4) |
((src16[x] & 0x0f00) >> 8),
((src16[x] & 0x00f0) ) |
((src16[x] & 0x00f0) >> 4),
((src16[x] & 0x000f) << 4) |
((src16[x] & 0x000f) ) );
src += spitch;
dst += dp4;
}
break;
case DSPF_RGB555:
case DSPF_ARGB1555:
while (height--) {
src16 = src;
for (x=0; x<width; x++)
dst[x] = PIXEL_RGB32( ((src16[x] & 0x7c00) >> 7) |
((src16[x] & 0x7000) >> 12),
((src16[x] & 0x03e0) >> 2) |
((src16[x] & 0x0380) >> 7),
((src16[x] & 0x001f) << 3) |
((src16[x] & 0x001c) >> 2) );
src += spitch;
dst += dp4;
}
break;
case DSPF_RGB16: void dfb_convert_to_rgb32( DFBSurfacePixelFormat format,
while (height--) { void *src,
src16 = src; int spitch,
int surface_height,
u32 *dst,
int dpitch,
int width,
int height );
for (x=0; x<width; x++) void dfb_convert_to_a4( DFBSurfacePixelFormat format,
dst[x] = PIXEL_RGB32( ((src16[x] & 0xf800) >> 8) | void *src,
((src16[x] & 0xe000) >> 13), int spitch,
((src16[x] & 0x07e0) >> 3) | int surface_height,
((src16[x] & 0x0300) >> 8), u8 *dst,
((src16[x] & 0x001f) << 3) | int dpitch,
((src16[x] & 0x001c) >> 2) ); int width,
int height );
src += spitch; void dfb_convert_to_yuy2( DFBSurfacePixelFormat format,
dst += dp4; void *src,
} int spitch,
break; int surface_height,
u32 *dst,
int dpitch,
int width,
int height );
default: void dfb_convert_to_uyvy( DFBSurfacePixelFormat format,
D_ONCE( "unsupported format" ); void *src,
} int spitch,
} int surface_height,
u32 *dst,
int dpitch,
int width,
int height );
#endif #endif
 End of changes. 14 change blocks. 
205 lines changed or deleted 75 lines changed or added


 core.h   core.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 41 skipping to change at line 41
#include <fusion/types.h> #include <fusion/types.h>
#include <fusion/lock.h> #include <fusion/lock.h>
#include <fusion/object.h> #include <fusion/object.h>
#include <directfb.h> #include <directfb.h>
#include "coretypes.h" #include "coretypes.h"
#include "coredefs.h" #include "coredefs.h"
#define DIRECTFB_CORE_ABI 35 #define DIRECTFB_CORE_ABI 44
typedef enum {
DFCP_CLIPBOARD,
DFCP_COLORHASH,
DFCP_GRAPHICS,
DFCP_INPUT,
DFCP_LAYER,
DFCP_SCREEN,
DFCP_SURFACE,
DFCP_SYSTEM,
DFCP_WM,
_DFCP_NUM
} DFBCorePartID;
/* /*
* Cleanup function, callback of a cleanup stack entry. * Cleanup function, callback of a cleanup stack entry.
*/ */
typedef void (*CoreCleanupFunc)(void *data, int emergency); typedef void (*CoreCleanupFunc)(void *data, int emergency);
/* /*
* Core initialization and deinitialization * Core initialization and deinitialization
*/ */
DFBResult dfb_core_create ( CoreDFB **ret_core ); DFBResult dfb_core_create ( CoreDFB **ret_core );
DFBResult dfb_core_destroy( CoreDFB *core, DFBResult dfb_core_destroy ( CoreDFB *core,
bool emergency ); bool emergency );
void *dfb_core_get_part( CoreDFB *core,
DFBCorePartID part_id );
#define DFB_CORE(core,PART) dfb_core_get_part( core, DFCP_##PART )
/* /*
* Object creation * Object creation
*/ */
CoreLayerContext *dfb_core_create_layer_context( CoreDFB *core ); CoreLayerContext *dfb_core_create_layer_context( CoreDFB *core );
CoreLayerRegion *dfb_core_create_layer_region ( CoreDFB *core ); CoreLayerRegion *dfb_core_create_layer_region ( CoreDFB *core );
CorePalette *dfb_core_create_palette ( CoreDFB *core ); CorePalette *dfb_core_create_palette ( CoreDFB *core );
CoreSurface *dfb_core_create_surface ( CoreDFB *core ); CoreSurface *dfb_core_create_surface ( CoreDFB *core );
CoreWindow *dfb_core_create_window ( CoreDFB *core ); CoreWindow *dfb_core_create_window ( CoreDFB *core );
 End of changes. 4 change blocks. 
5 lines changed or deleted 24 lines changed or added


 core_parts.h   core_parts.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 64 skipping to change at line 64
typedef DFBResult (*CoreSuspend) ( CoreDFB *core ); typedef DFBResult (*CoreSuspend) ( CoreDFB *core );
typedef DFBResult (*CoreResume) ( CoreDFB *core ); typedef DFBResult (*CoreResume) ( CoreDFB *core );
typedef struct { typedef struct {
const char *name; const char *name;
int size_local; int size_local;
int size_shared; int size_shared;
void *data_local;
void *data_shared;
bool initialized;
CoreInitialize Initialize; CoreInitialize Initialize;
CoreJoin Join; CoreJoin Join;
CoreShutdown Shutdown; CoreShutdown Shutdown;
CoreLeave Leave; CoreLeave Leave;
CoreSuspend Suspend; CoreSuspend Suspend;
CoreResume Resume; CoreResume Resume;
void *data_local;
void *data_shared;
bool initialized;
} CorePart; } CorePart;
DFBResult dfb_core_part_initialize( CoreDFB *core, DFBResult dfb_core_part_initialize( CoreDFB *core,
CorePart *core_part ); CorePart *core_part );
DFBResult dfb_core_part_join ( CoreDFB *core, DFBResult dfb_core_part_join ( CoreDFB *core,
CorePart *core_part ); CorePart *core_part );
DFBResult dfb_core_part_shutdown ( CoreDFB *core, DFBResult dfb_core_part_shutdown ( CoreDFB *core,
CorePart *core_part, CorePart *core_part,
bool emergency ); bool emergency );
DFBResult dfb_core_part_leave ( CoreDFB *core, DFBResult dfb_core_part_leave ( CoreDFB *core,
CorePart *core_part, CorePart *core_part,
bool emergency ); bool emergency );
#define DFB_CORE_PART(part,sl,ss) \ #define DFB_CORE_PART(part,Type) \
\ \
static DFBResult dfb_##part##_initialize( CoreDFB *core, static DFBResult dfb_##part##_initialize( CoreDFB *core,
\ \
void *data_local, DFB##Type *data,
\ \
void *data_shared ); DFB##Type##Shared *shared );
\ \
\ \
static DFBResult dfb_##part##_join ( CoreDFB *core, static DFBResult dfb_##part##_join ( CoreDFB *core,
\ \
void *data_local, DFB##Type *data,
\ \
void *data_shared ); DFB##Type##Shared *shared );
\ \
\ \
static DFBResult dfb_##part##_shutdown ( CoreDFB *core, static DFBResult dfb_##part##_shutdown ( DFB##Type *data,
\ \
bool emergency ); bool emergency );
\ \
\ \
static DFBResult dfb_##part##_leave ( CoreDFB *core, static DFBResult dfb_##part##_leave ( DFB##Type *local,
\ \
bool emergency ); bool emergency );
\ \
\ \
static DFBResult dfb_##part##_suspend ( CoreDFB *core ); \ static DFBResult dfb_##part##_suspend ( DFB##Type *local ); \
\ \
static DFBResult dfb_##part##_resume ( CoreDFB *core ); \ static DFBResult dfb_##part##_resume ( DFB##Type *local ); \
\ \
CorePart dfb_core_##part = { \ CorePart dfb_##part = { \
#part, \ #part, \
sl, ss, NULL, NULL, false, \
\ \
dfb_##part##_initialize, sizeof(DFB##Type),
\ \
dfb_##part##_join, sizeof(DFB##Type##Shared),
\ \
dfb_##part##_shutdown,
\ \
dfb_##part##_leave, (void*)dfb_##part##_initialize,
\ \
dfb_##part##_suspend, (void*)dfb_##part##_join,
\ \
dfb_##part##_resume (void*)dfb_##part##_shutdown,
\ \
}; (void*)dfb_##part##_leave,
\
(void*)dfb_##part##_suspend,
\
(void*)dfb_##part##_resume
\
}
#endif #endif
 End of changes. 13 change blocks. 
44 lines changed or deleted 49 lines changed or added


 core_system.h   core_system.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 104 skipping to change at line 104
static unsigned int static unsigned int
system_auxram_length(); system_auxram_length();
static void static void
system_get_busid(); system_get_busid();
static void static void
system_get_deviceid(); system_get_deviceid();
static CoreSystemFuncs system_funcs = { static CoreSystemFuncs system_funcs = {
GetSystemInfo: system_get_info, .GetSystemInfo = system_get_info,
Initialize: system_initialize, .Initialize = system_initialize,
Join: system_join, .Join = system_join,
Shutdown: system_shutdown, .Shutdown = system_shutdown,
Leave: system_leave, .Leave = system_leave,
Suspend: system_suspend, .Suspend = system_suspend,
Resume: system_resume, .Resume = system_resume,
GetModes: system_get_modes, .GetModes = system_get_modes,
GetCurrentMode: system_get_current_mode, .GetCurrentMode = system_get_current_mode,
ThreadInit: system_thread_init, .ThreadInit = system_thread_init,
InputFilter: system_input_filter, .InputFilter = system_input_filter,
MapMMIO: system_map_mmio, .MapMMIO = system_map_mmio,
UnmapMMIO: system_unmap_mmio, .UnmapMMIO = system_unmap_mmio,
GetAccelerator: system_get_accelerator, .GetAccelerator = system_get_accelerator,
VideoMemoryPhysical: system_video_memory_physical, .VideoMemoryPhysical = system_video_memory_physical,
VideoMemoryVirtual: system_video_memory_virtual, .VideoMemoryVirtual = system_video_memory_virtual,
VideoRamLength: system_videoram_length, .VideoRamLength = system_videoram_length,
AuxMemoryPhysical: system_aux_memory_physical, .AuxMemoryPhysical = system_aux_memory_physical,
AuxMemoryVirtual: system_aux_memory_virtual, .AuxMemoryVirtual = system_aux_memory_virtual,
AuxRamLength: system_auxram_length, .AuxRamLength = system_auxram_length,
GetBusID: system_get_busid, .GetBusID = system_get_busid,
GetDeviceID: system_get_deviceid .GetDeviceID = system_get_deviceid
}; };
#define DFB_CORE_SYSTEM(shortname) \ #define DFB_CORE_SYSTEM(shortname) \
__attribute__((constructor)) void directfb_##shortname(); \ __attribute__((constructor)) void directfb_##shortname(); \
\ \
void \ void \
directfb_##shortname() \ directfb_##shortname() \
{ \ { \
direct_modules_register( &dfb_core_systems, \ direct_modules_register( &dfb_core_systems, \
DFB_CORE_SYSTEM_ABI_VERSION, \ DFB_CORE_SYSTEM_ABI_VERSION, \
 End of changes. 2 change blocks. 
23 lines changed or deleted 23 lines changed or added


 coredefs.h   coredefs.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 29 skipping to change at line 29
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __COREDEFS_H__ #ifndef __CORE__COREDEFS_H__
#define __COREDEFS_H__ #define __CORE__COREDEFS_H__
#ifdef PIC #ifdef PIC
#define DFB_DYNAMIC_LINKING #define DFB_DYNAMIC_LINKING
#endif #endif
#define MAX_INPUTDEVICES 32 #define MAX_INPUTDEVICES 16
#define MAX_LAYERS 24 #define MAX_LAYERS 16
#define MAX_SCREENS 16 #define MAX_SCREENS 4
#define MAX_INPUT_GLOBALS 8 #define MAX_INPUT_GLOBALS 8
#define MAX_SURFACE_BUFFERS 6
#define MAX_SURFACE_POOLS 6
#endif #endif
 End of changes. 4 change blocks. 
7 lines changed or deleted 10 lines changed or added


 coretypes.h   coretypes.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 34 skipping to change at line 34
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __CORETYPES_H__ #ifndef __CORETYPES_H__
#define __CORETYPES_H__ #define __CORETYPES_H__
#include <dfb_types.h> #include <dfb_types.h>
typedef struct __DFB_CoreDFB CoreDFB; typedef struct __DFB_CoreDFB CoreDFB;
typedef struct __DFB_CoreDFBShared CoreDFBShared; typedef struct __DFB_CoreDFBShared CoreDFBShared;
typedef struct _CoreCleanup CoreCleanup; typedef struct __DFB_DFBClipboardCore DFBClipboardCore;
typedef struct __DFB_DFBColorHashCore DFBColorHashCore;
typedef struct __DFB_DFBGraphicsCore DFBGraphicsCore;
typedef struct __DFB_DFBInputCore DFBInputCore;
typedef struct __DFB_DFBLayerCore DFBLayerCore;
typedef struct __DFB_DFBScreenCore DFBScreenCore;
typedef struct __DFB_DFBSystemCore DFBSystemCore;
typedef struct __DFB_DFBWMCore DFBWMCore;
typedef struct _CoreFont CoreFont; typedef struct __DFB_DFBGraphicsCore CoreGraphicsDevice; /* FIXME *
typedef struct _CorePalette CorePalette; /
typedef struct _CoreSurface CoreSurface;
typedef struct _SurfaceBuffer SurfaceBuffer; typedef struct _CoreCleanup CoreCleanup;
typedef struct _SurfaceManager SurfaceManager;
typedef struct _CardState CardState; typedef struct _CoreFont CoreFont;
typedef struct _CorePalette CorePalette;
typedef struct _Chunk Chunk; typedef struct _CardState CardState;
typedef struct _GraphicsDevice GraphicsDevice; typedef struct __DFB_CoreGraphicsSerial CoreGraphicsSerial;
typedef struct _GraphicsDevice CoreGraphicsDevice;
typedef struct __DFB_CoreGraphicsSerial CoreGraphicsSerial; typedef struct __DFB_CoreScreen CoreScreen;
typedef struct __DFB_CoreScreen CoreScreen; typedef struct __DFB_CoreInputDevice CoreInputDevice;
typedef struct __DFB_CoreInputDevice CoreInputDevice; typedef struct __DFB_CoreLayer CoreLayer;
typedef struct __DFB_CoreLayerContext CoreLayerContext;
typedef struct __DFB_CoreLayerRegion CoreLayerRegion;
typedef struct __DFB_CoreLayerRegionConfig CoreLayerRegionConfig;
typedef struct __DFB_CoreLayer CoreLayer; typedef struct __DFB_CoreSurface CoreSurface;
typedef struct __DFB_CoreLayerContext CoreLayerContext; typedef struct __DFB_CoreSurfaceAllocation CoreSurfaceAllocation;
typedef struct __DFB_CoreLayerRegion CoreLayerRegion; typedef struct __DFB_CoreSurfaceBuffer CoreSurfaceBuffer;
typedef struct __DFB_CoreLayerRegionConfig CoreLayerRegionConfig; typedef struct __DFB_CoreSurfaceBufferLock CoreSurfaceBufferLock;
typedef struct __DFB_CoreSurfacePool CoreSurfacePool;
typedef struct __DFB_CoreWindow CoreWindow; typedef struct __DFB_CoreWindow CoreWindow;
typedef struct __DFB_CoreWindowConfig CoreWindowConfig; typedef struct __DFB_CoreWindowConfig CoreWindowConfig;
typedef struct __DFB_CoreWindowStack CoreWindowStack; typedef struct __DFB_CoreWindowStack CoreWindowStack;
typedef unsigned int CoreSurfacePoolID;
#endif #endif
 End of changes. 13 change blocks. 
23 lines changed or deleted 34 lines changed or added


 debug.h   debug.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 37 skipping to change at line 37
*/ */
#ifndef __DIRECT__DEBUG_H__ #ifndef __DIRECT__DEBUG_H__
#define __DIRECT__DEBUG_H__ #define __DIRECT__DEBUG_H__
#include <direct/build.h> #include <direct/build.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <direct/clock.h>
#include <direct/conf.h> #include <direct/conf.h>
#include <direct/log.h> #include <direct/log.h>
#include <direct/messages.h> #include <direct/messages.h>
#include <direct/system.h> #include <direct/system.h>
#include <direct/thread.h>
#include <direct/trace.h>
#include <direct/types.h> #include <direct/types.h>
typedef struct { typedef struct {
unsigned int age; unsigned int age;
bool enabled; bool enabled;
bool registered; bool registered;
const char *name; const char *name;
const char *description; const char *description;
int name_len;
} DirectDebugDomain; } DirectDebugDomain;
void direct_debug_config_domain( const char *name, bool enable ); void direct_debug_config_domain( const char *name, bool enable );
#if DIRECT_BUILD_TEXT #if DIRECT_BUILD_TEXT
#define D_DEBUG_DOMAIN(identifier,name,description)
\
static DirectDebugDomain identifier __attribute__((unused))
\
= { 0, false, false, name, description, sizeof(name) - 1 }
void direct_debug_at_always( DirectDebugDomain *domain,
const char *format, ... ) D_FORMAT_PRI
NTF(2);
#define d_debug_at( domain, x... ) direct_debug_at_always( &domain, x
)
#if DIRECT_BUILD_DEBUGS
void direct_debug( const char *format, ... ) D_FORMAT_PRINTF(1); void direct_debug( const char *format, ... ) D_FORMAT_PRINTF(1);
void direct_debug_at( DirectDebugDomain *domain, void direct_debug_at( DirectDebugDomain *domain,
const char *format, ... ) D_FORMAT_PRINTF(2); const char *format, ... ) D_FORMAT_PRINTF(2);
void direct_debug_enter( DirectDebugDomain *domain, void direct_debug_enter( DirectDebugDomain *domain,
const char *func, const char *func,
const char *file, const char *file,
int line, int line,
const char *format, ... ) D_FORMAT_PRINTF(5); const char *format, ... ) D_FORMAT_PRINTF(5);
skipping to change at line 87 skipping to change at line 103
void direct_assertion( const char *exp, void direct_assertion( const char *exp,
const char *func, const char *func,
const char *file, const char *file,
int line ); int line );
void direct_assumption( const char *exp, void direct_assumption( const char *exp,
const char *func, const char *func,
const char *file, const char *file,
int line ); int line );
#endif /* DIRECT_BUILD_TEXT */
#if DIRECT_BUILD_TEXT && (DIRECT_BUILD_DEBUG || defined(DIRECT_ENABLE_DEBUG
) || defined(DIRECT_FORCE_DEBUG))
#if !DIRECT_BUILD_DEBUGS
#warning Building with debug, but library headers suggest that debug is not
supported.
#endif #endif
#define D_DEBUG_ENABLED (1) #if DIRECT_BUILD_DEBUG || defined(DIRECT_ENABLE_DEBUG) || defined(DIRECT_FO
RCE_DEBUG)
#ifdef HEAVYDEBUG
#define D_HEAVYDEBUG(x...) if (!direct_config || direct_config->deb
ug) { \
direct_log_printf( NULL, "(=) "x );
\
}
#else
#define D_HEAVYDEBUG(x...)
#endif
#define D_DEBUG_DOMAIN(identifier,name,description) #define D_DEBUG_ENABLED (1)
\
static DirectDebugDomain identifier __attribute__((unused))
\
= { 0, false, false, name, description }
#define D_DEBUG(x...) \ #define D_DEBUG(x...) \
do { \ do { \
if (!direct_config || direct_config->debug) \ if (!direct_config || direct_config->debug) \
direct_debug( x ); \ direct_debug( x ); \
} while (0) } while (0)
#define D_DEBUG_AT(d,x...) \ #define D_DEBUG_AT(d,x...) \
do { \ do { \
direct_debug_at( &d, x ); \ direct_debug_at( &d, x ); \
skipping to change at line 148 skipping to change at line 147
do { \ do { \
if (!(exp)) \ if (!(exp)) \
direct_assumption( #exp, __FUNCTION__, __FILE__, __LINE__ ); \ direct_assumption( #exp, __FUNCTION__, __FILE__, __LINE__ ); \
} while (0) } while (0)
#define D_BREAK(x...) \ #define D_BREAK(x...) \
do { \ do { \
direct_break( __FUNCTION__, __FILE__, __LINE__, x ); \ direct_break( __FUNCTION__, __FILE__, __LINE__, x ); \
} while (0) } while (0)
#else #elif defined(DIRECT_MINI_DEBUG)
/*
* Mini debug mode, only D_DEBUG_AT, no domain filters, simple assertion
*/
#define D_DEBUG_ENABLED (2)
#define D_DEBUG_AT(d,x...)
\
do {
\
if (direct_config->debug) direct_debug_at_always( &d, x );
\
} while (0)
#define D_CHECK(exp, aa)
\
do {
\
if (!(exp)) {
\
long long millis = direct_clock_get_millis();
\
const char *name = direct_thread_self_name();
\
\
direct_log_printf( NULL,
\
"(!) [%-15s %3lld.%03lld] (%5d) *** " #aa
" [%s] failed *** [%s:%d in %s()]\n", \
name ? name : " NO NAME ", millis / 100
0LL, millis % 1000LL, \
direct_gettid(), #exp, __FILE__, __LINE__
, __FUNCTION__ ); \
\
direct_trace_print_stack( NULL );
\
}
\
} while (0)
#define D_ASSERT(exp) D_CHECK(exp, Assertion)
#define D_ASSUME(exp) D_CHECK(exp, Assumption)
#endif /* MINI_DEBUG / DIRECT_BUILD_DEBUG || DIRECT_ENABLE_DEBUG || DIR
ECT_FORCE_DEBUG */
#endif /* DIRECT_BUILD_TEXT */
/*
* Fallback definitions, e.g. without DIRECT_BUILD_TEXT or DIRECT_ENABLE_DE
BUG
*/
#ifndef D_DEBUG_ENABLED
#define D_DEBUG_ENABLED (0) #define D_DEBUG_ENABLED (0)
#endif
#define D_HEAVYDEBUG(x...) do {} while (0) #ifndef D_DEBUG
#define D_DEBUG_DOMAIN(i,n,d)
#define D_DEBUG(x...) do {} while (0) #define D_DEBUG(x...) do {} while (0)
#endif
#ifndef D_DEBUG_AT
#define D_DEBUG_AT(d,x...) do {} while (0) #define D_DEBUG_AT(d,x...) do {} while (0)
#endif
#ifndef D_DEBUG_ENTER
#define D_DEBUG_ENTER(d,x...) do {} while (0) #define D_DEBUG_ENTER(d,x...) do {} while (0)
#endif
#ifndef D_DEBUG_EXIT
#define D_DEBUG_EXIT(d,x...) do {} while (0) #define D_DEBUG_EXIT(d,x...) do {} while (0)
#endif
#ifndef D_ASSERT
#define D_ASSERT(exp) do {} while (0) #define D_ASSERT(exp) do {} while (0)
#endif
#ifndef D_ASSUME
#define D_ASSUME(exp) do {} while (0) #define D_ASSUME(exp) do {} while (0)
#endif
#ifndef D_BREAK
#define D_BREAK(x...) do {} while (0) #define D_BREAK(x...) do {} while (0)
#endif
#endif /* DIRECT_BUILD_TEXT && (DIRECT_BUILD_DEBUG || DIRECT_ENABLE_DEBU #ifndef d_debug_at
G || DIRECT_FORCE_DEBUG) || ) */ #define d_debug_at( domain, x... ) do {} while (0)
#endif
#ifndef D_DEBUG_DOMAIN
#define D_DEBUG_DOMAIN(i,n,d)
#endif
/*
* Magic Assertions & Utilities
*/
#define D_MAGIC(spell) ( (((spell)[sizeof(spell)*8/9] << 24) | \ #define D_MAGIC(spell) ( (((spell)[sizeof(spell)*8/9] << 24) | \
((spell)[sizeof(spell)*7/9] << 16) | \ ((spell)[sizeof(spell)*7/9] << 16) | \
((spell)[sizeof(spell)*6/9] << 8) | \ ((spell)[sizeof(spell)*6/9] << 8) | \
((spell)[sizeof(spell)*5/9] )) ^ \ ((spell)[sizeof(spell)*5/9] )) ^ \
(((spell)[sizeof(spell)*4/9] << 24) | \ (((spell)[sizeof(spell)*4/9] << 24) | \
((spell)[sizeof(spell)*3/9] << 16) | \ ((spell)[sizeof(spell)*3/9] << 16) | \
((spell)[sizeof(spell)*2/9] << 8) | \ ((spell)[sizeof(spell)*2/9] << 8) | \
((spell)[sizeof(spell)*1/9] )) ) ((spell)[sizeof(spell)*1/9] )) )
 End of changes. 20 change blocks. 
31 lines changed or deleted 113 lines changed or added


 dfb_types.h   dfb_types.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 32 skipping to change at line 32
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __DFB_TYPES_H__ #ifndef __DFB_TYPES_H__
#define __DFB_TYPES_H__ #define __DFB_TYPES_H__
#ifdef USE_KOS #include <direct/types.h>
#include <sys/types.h>
typedef uint8 u8;
typedef uint16 u16;
typedef uint32 u32;
typedef uint64 u64;
typedef sint8 s8;
typedef sint16 s16;
typedef sint32 s32;
typedef sint64 s64;
#else
#include <stdint.h>
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;
#endif
#ifndef DIRECTFB_NO_CRUFT #ifdef DIRECTFB_ENABLE_DEPRECATED
#define __u8 u8 #define __u8 u8
#define __u16 u16 #define __u16 u16
#define __u32 u32 #define __u32 u32
#define __u64 u64 #define __u64 u64
#define __s8 s8 #define __s8 s8
#define __s16 s16 #define __s16 s16
#define __s32 s32 #define __s32 s32
#define __s64 s64 #define __s64 s64
#endif #endif
 End of changes. 3 change blocks. 
31 lines changed or deleted 3 lines changed or added


 dfiff.h   dfiff.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 dgiff.h   dgiff.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 direct.h   direct.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 37 skipping to change at line 37
*/ */
#ifndef __DIRECT__DIRECT_H__ #ifndef __DIRECT__DIRECT_H__
#define __DIRECT__DIRECT_H__ #define __DIRECT__DIRECT_H__
#include <direct/types.h> #include <direct/types.h>
DirectResult direct_initialize( void ); DirectResult direct_initialize( void );
DirectResult direct_shutdown( void ); DirectResult direct_shutdown( void );
typedef void (*DirectCleanupHandlerFunc)( void *ctx );
DirectResult direct_cleanup_handler_add( DirectCleanupHandlerFunc func,
void *ctx,
DirectCleanupHandler **ret_han
dler );
DirectResult direct_cleanup_handler_remove( DirectCleanupHandler *handler
);
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 11 lines changed or added


 directfb.h   directfb.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 32 skipping to change at line 32
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __DIRECTFB_H__ #ifndef __DIRECTFB_H__
#define __DIRECTFB_H__ #define __DIRECTFB_H__
#include <dfb_types.h>
#include <sys/time.h> /* struct timeval */
#include <directfb_keyboard.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
/* #include <dfb_types.h>
* @internal #include <sys/time.h> /* struct timeval */
*
* Forward declaration macro for interfaces.
*/
#define DECLARE_INTERFACE( IFACE ) \
typedef struct _##IFACE IFACE;
/* #include <directfb_keyboard.h>
* @internal
* #include <direct/interface.h>
* Macro for an interface definition.
*/
#define DEFINE_INTERFACE( IFACE, IDATA... ) \
struct _##IFACE { \
void *priv; \
int magic; \
DFBResult (*AddRef)( IFACE *thiz ); \
DFBResult (*Release)( IFACE *thiz ); \
\
IDATA \
};
/* /*
* Version handling. * Version handling.
*/ */
extern const unsigned int directfb_major_version; extern const unsigned int directfb_major_version;
extern const unsigned int directfb_minor_version; extern const unsigned int directfb_minor_version;
extern const unsigned int directfb_micro_version; extern const unsigned int directfb_micro_version;
extern const unsigned int directfb_binary_age; extern const unsigned int directfb_binary_age;
extern const unsigned int directfb_interface_age; extern const unsigned int directfb_interface_age;
skipping to change at line 88 skipping to change at line 67
const char * DirectFBCheckVersion( unsigned int required_major, const char * DirectFBCheckVersion( unsigned int required_major,
unsigned int required_minor, unsigned int required_minor,
unsigned int required_micro ); unsigned int required_micro );
/* /*
* Main interface of DirectFB, created by DirectFBCreate(). * Main interface of DirectFB, created by DirectFBCreate().
*/ */
DECLARE_INTERFACE( IDirectFB ) DECLARE_INTERFACE( IDirectFB )
/* /*
* Interface to different display outputs, encoders, connector settings, po * Interface to a surface object, being a graphics context for rendering an
wer management and synchronization. d state control,
* buffer operations, palette access and sub area translate'n'clip logic.
*/ */
DECLARE_INTERFACE( IDirectFBScreen ) DECLARE_INTERFACE( IDirectFBSurface )
/* /*
* Layer interface for configuration, window stack usage or direct surface access, with shared/exclusive context. * Interface for read/write access to the colors of a palette object and fo r cloning it.
*/ */
DECLARE_INTERFACE( IDirectFBDisplayLayer ) DECLARE_INTERFACE( IDirectFBPalette )
/* /*
* Interface to a surface object, being a graphics context for rendering an * Input device interface for keymap access, event buffers and state querie
d state control, s.
* buffer operations, palette access and sub area translate'n'clip logic.
*/ */
DECLARE_INTERFACE( IDirectFBSurface ) DECLARE_INTERFACE( IDirectFBInputDevice )
/* /*
* Interface for read/write access to the colors of a palette object and fo r cloning it. * Layer interface for configuration, window stack usage or direct surface access, with shared/exclusive context.
*/ */
DECLARE_INTERFACE( IDirectFBPalette ) DECLARE_INTERFACE( IDirectFBDisplayLayer )
/* /*
* Interface to a window object, controlling appearance and focus, position ing and stacking, * Interface to a window object, controlling appearance and focus, position ing and stacking,
* event buffers and surface access. * event buffers and surface access.
*/ */
DECLARE_INTERFACE( IDirectFBWindow ) DECLARE_INTERFACE( IDirectFBWindow )
/* /*
* Input device interface for keymap access, event buffers and state querie
s.
*/
DECLARE_INTERFACE( IDirectFBInputDevice )
/*
* Interface to a local event buffer to send/receive events, wait for event s, abort waiting or reset buffer. * Interface to a local event buffer to send/receive events, wait for event s, abort waiting or reset buffer.
*/ */
DECLARE_INTERFACE( IDirectFBEventBuffer ) DECLARE_INTERFACE( IDirectFBEventBuffer )
/* /*
* Font interface for getting metrics, measuring strings or single characte rs, query/choose encodings. * Font interface for getting metrics, measuring strings or single characte rs, query/choose encodings.
*/ */
DECLARE_INTERFACE( IDirectFBFont ) DECLARE_INTERFACE( IDirectFBFont )
/* /*
skipping to change at line 145 skipping to change at line 119
* Interface to a video provider for playback with advanced control and bas ic stream information. * Interface to a video provider for playback with advanced control and bas ic stream information.
*/ */
DECLARE_INTERFACE( IDirectFBVideoProvider ) DECLARE_INTERFACE( IDirectFBVideoProvider )
/* /*
* Data buffer interface, providing unified access to different kinds of da ta storage and live feed. * Data buffer interface, providing unified access to different kinds of da ta storage and live feed.
*/ */
DECLARE_INTERFACE( IDirectFBDataBuffer ) DECLARE_INTERFACE( IDirectFBDataBuffer )
/* /*
* Interface to different display outputs, encoders, connector settings, po
wer management and synchronization.
*/
DECLARE_INTERFACE( IDirectFBScreen )
/*
* OpenGL context of a surface. * OpenGL context of a surface.
*/ */
DECLARE_INTERFACE( IDirectFBGL ) DECLARE_INTERFACE( IDirectFBGL )
/* /*
* Every interface method returns this result code.<br> * Return code of all interface methods and most functions
* Any other value to be returned adds an argument pointing *
* to a location the value should be written to. * Whenever a method has to return any information, it is done via output p
arameters. These are pointers to
* primitive types such as <i>int *ret_num</i>, enumerated types like <i>DF
BBoolean *ret_enabled</i>, structures
* as in <i>DFBDisplayLayerConfig *ret_config</i>, just <i>void **ret_data<
/i> or other types...
*/ */
typedef enum { typedef enum {
DFB_OK, /* No error occured. */ /*
DFB_FAILURE, /* A general or unknown error occured. */ * Aliases for backward compatibility and uniform look in DirectFB cod
DFB_INIT, /* A general initialization error occured. */ e
DFB_BUG, /* Internal bug or inconsistency has been detected */
. */ DFB_OK = DR_OK, /* No error occured. */
DFB_DEAD, /* Interface has a zero reference counter (availab DFB_FAILURE = DR_FAILURE, /* A general or unknown e
le in debug mode). */ rror occured. */
DFB_UNSUPPORTED, /* The requested operation or an argument is (curr DFB_INIT = DR_INIT, /* A general initializati
ently) not supported. */ on error occured. */
DFB_UNIMPLEMENTED, /* The requested operation is not implemented, yet DFB_BUG = DR_BUG, /* Internal bug or incons
. */ istency has been detected. */
DFB_ACCESSDENIED, /* Access to the resource is denied. */ DFB_DEAD = DR_DEAD, /* Interface has a zero r
DFB_INVARG, /* An invalid argument has been specified. */ eference counter (available in debug mode). */
DFB_NOSYSTEMMEMORY, /* There's not enough system memory. */ DFB_UNSUPPORTED = DR_UNSUPPORTED, /* The requested operatio
n or an argument is (currently) not supported. */
DFB_UNIMPLEMENTED = DR_UNIMPLEMENTED, /* The requested operatio
n is not implemented, yet. */
DFB_ACCESSDENIED = DR_ACCESSDENIED, /* Access to the resource
is denied. */
DFB_INVAREA = DR_INVAREA, /* An invalid area has be
en specified or detected. */
DFB_INVARG = DR_INVARG, /* An invalid argument ha
s been specified. */
DFB_NOSYSTEMMEMORY = DR_NOLOCALMEMORY, /* There's not enough sys
tem memory. */
DFB_NOSHAREDMEMORY = DR_NOSHAREDMEMORY, /* There's not enough sha
red memory. */
DFB_LOCKED = DR_LOCKED, /* The resource is (alrea
dy) locked. */
DFB_BUFFEREMPTY = DR_BUFFEREMPTY, /* The buffer is empty. *
/
DFB_FILENOTFOUND = DR_FILENOTFOUND, /* The specified file has
not been found. */
DFB_IO = DR_IO, /* A general I/O error oc
cured. */
DFB_BUSY = DR_BUSY, /* The resource or device
is busy. */
DFB_NOIMPL = DR_NOIMPL, /* No implementation for
this interface or content type has been found. */
DFB_TIMEOUT = DR_TIMEOUT, /* The operation timed ou
t. */
DFB_THIZNULL = DR_THIZNULL, /* 'thiz' pointer is NULL
. */
DFB_IDNOTFOUND = DR_IDNOTFOUND, /* No resource has been f
ound by the specified id. */
DFB_DESTROYED = DR_DESTROYED, /* The underlying object
(e.g. a window or surface) has been destroyed. */
DFB_FUSION = DR_FUSION, /* Internal fusion error
detected, most likely related to IPC resources. */
DFB_BUFFERTOOLARGE = DR_BUFFERTOOLARGE, /* Buffer is too large. *
/
DFB_INTERRUPTED = DR_INTERRUPTED, /* The operation has been
interrupted. */
DFB_NOCONTEXT = DR_NOCONTEXT, /* No context available.
*/
DFB_TEMPUNAVAIL = DR_TEMPUNAVAIL, /* Temporarily unavailabl
e. */
DFB_LIMITEXCEEDED = DR_LIMITEXCEEDED, /* Attempted to exceed li
mit, i.e. any kind of maximum size, count etc. */
DFB_NOSUCHMETHOD = DR_NOSUCHMETHOD, /* Requested method is no
t known, e.g. to remote site. */
DFB_NOSUCHINSTANCE = DR_NOSUCHINSTANCE, /* Requested instance is
not known, e.g. to remote site. */
DFB_ITEMNOTFOUND = DR_ITEMNOTFOUND, /* No such item found. */
DFB_VERSIONMISMATCH = DR_VERSIONMISMATCH, /* Some versions didn't m
atch. */
DFB_EOF = DR_EOF, /* Reached end of file. *
/
DFB_SUSPENDED = DR_SUSPENDED, /* The requested object i
s suspended. */
DFB_INCOMPLETE = DR_INCOMPLETE, /* The operation has been
executed, but not completely. */
DFB_NOCORE = DR_NOCORE, /* Core part not availabl
e. */
/*
* DirectFB specific result codes starting at (after) this offset
*/
DFB__RESULT_OFFSET = D_RESULT_TYPE_BASE( 'D','F','B' ),
DFB_NOVIDEOMEMORY, /* There's not enough video memory. */ DFB_NOVIDEOMEMORY, /* There's not enough video memory. */
DFB_LOCKED, /* The resource is (already) locked. */
DFB_BUFFEREMPTY, /* The buffer is empty. */
DFB_FILENOTFOUND, /* The specified file has not been found. */
DFB_IO, /* A general I/O error occured. */
DFB_BUSY, /* The resource or device is busy. */
DFB_NOIMPL, /* No implementation for this interface or content
type has been found. */
DFB_MISSINGFONT, /* No font has been set. */ DFB_MISSINGFONT, /* No font has been set. */
DFB_TIMEOUT, /* The operation timed out. */
DFB_MISSINGIMAGE, /* No image has been set. */ DFB_MISSINGIMAGE, /* No image has been set. */
DFB_THIZNULL, /* 'thiz' pointer is NULL. */
DFB_IDNOTFOUND, /* No resource has been found by the specified id.
*/
DFB_INVAREA, /* An invalid area has been specified or detected.
*/
DFB_DESTROYED, /* The underlying object (e.g. a window or surface
) has been destroyed. */
DFB_FUSION, /* Internal fusion error detected, most likely rel
ated to IPC resources. */
DFB_BUFFERTOOLARGE, /* Buffer is too large. */
DFB_INTERRUPTED, /* The operation has been interrupted. */
DFB_NOCONTEXT, /* No context available. */
DFB_TEMPUNAVAIL, /* Temporarily unavailable. */
DFB_LIMITEXCEEDED, /* Attempted to exceed limit, i.e. any kind of max
imum size, count etc. */
DFB_NOSUCHMETHOD, /* Requested method is not known to remote site. *
/
DFB_NOSUCHINSTANCE, /* Requested instance is not known to remote site.
*/
DFB_ITEMNOTFOUND, /* No such item found. */
DFB_VERSIONMISMATCH,/* Some versions didn't match. */
DFB_NOSHAREDMEMORY, /* There's not enough shared memory. */
DFB_EOF, /* Reached end of file. */
DFB_SUSPENDED, /* The requested object is suspended. */
DFB_INCOMPLETE /* The operation has been executed, but not comple
tely. */
} DFBResult; } DFBResult;
/* /*
* A boolean. * A boolean.
*/ */
typedef enum { typedef enum {
DFB_FALSE = 0, DFB_FALSE = 0,
DFB_TRUE = !DFB_FALSE DFB_TRUE = !DFB_FALSE
} DFBBoolean; } DFBBoolean;
skipping to change at line 296 skipping to change at line 287
* A color defined by channels with 8bit each. * A color defined by channels with 8bit each.
*/ */
typedef struct { typedef struct {
u8 a; /* alpha channel */ u8 a; /* alpha channel */
u8 r; /* red channel */ u8 r; /* red channel */
u8 g; /* green channel */ u8 g; /* green channel */
u8 b; /* blue channel */ u8 b; /* blue channel */
} DFBColor; } DFBColor;
/* /*
* A color key defined by R,G,B and eventually a color index.
*/
typedef struct {
u8 index; /* color index */
u8 r; /* red channel */
u8 g; /* green channel */
u8 b; /* blue channel */
} DFBColorKey;
/*
* A color defined by channels with 8bit each.
*/
typedef struct {
u8 a; /* alpha channel */
u8 y; /* luma channel */
u8 u; /* chroma channel */
u8 v; /* chroma channel */
} DFBColorYUV;
/*
* Macro to compare two points.
*/
#define DFB_POINT_EQUAL(a,b) ((a).x == (b).x && \
(a).y == (b).y)
/*
* Macro to compare two rectangles. * Macro to compare two rectangles.
*/ */
#define DFB_RECTANGLE_EQUAL(a,b) ((a).x == (b).x && \ #define DFB_RECTANGLE_EQUAL(a,b) ((a).x == (b).x && \
(a).y == (b).y && \ (a).y == (b).y && \
(a).w == (b).w && \ (a).w == (b).w && \
(a).h == (b).h) (a).h == (b).h)
/* /*
* Macro to compare two locations. * Macro to compare two locations.
*/ */
skipping to change at line 328 skipping to change at line 345
/* /*
* Macro to compare two colors. * Macro to compare two colors.
*/ */
#define DFB_COLOR_EQUAL(x,y) ((x).a == (y).a && \ #define DFB_COLOR_EQUAL(x,y) ((x).a == (y).a && \
(x).r == (y).r && \ (x).r == (y).r && \
(x).g == (y).g && \ (x).g == (y).g && \
(x).b == (y).b) (x).b == (y).b)
/* /*
* Macro to compare two color keys.
*/
#define DFB_COLORKEY_EQUAL(x,y) ((x).index == (y).index && \
(x).r == (y).r && \
(x).g == (y).g && \
(x).b == (y).b)
/*
* Print a description of the result code along with an * Print a description of the result code along with an
* optional message that is put in front with a colon. * optional message that is put in front with a colon.
*/ */
DFBResult DirectFBError( DFBResult DirectFBError(
const char *msg, /* optional message */ const char *msg, /* optional message */
DFBResult result /* result code to interpr et */ DFBResult result /* result code to interpr et */
); );
/* /*
* Behaves like DirectFBError, but shuts down the calling application. * Behaves like DirectFBError, but shuts down the calling application.
skipping to change at line 570 skipping to change at line 595
preallocated by the application. preallocated by the application.
The field array 'preallocated' The field array 'preallocated'
has to be set using the first has to be set using the first
element for the front buffer element for the front buffer
and eventually the second one and eventually the second one
for the back buffer. */ for the back buffer. */
DSDESC_PALETTE = 0x00000020, /* Initialize the surfaces palette DSDESC_PALETTE = 0x00000020, /* Initialize the surfaces palette
with the entries specified in th e with the entries specified in th e
description. */ description. */
DSDESC_ALL = 0x0000003F /* all of these */ DSDESC_RESOURCE_ID = 0x00000100, /* user defined resource id for gen
eral purpose
surfaces is specified, or resour
ce id of window,
layer, user is returned */
DSDESC_ALL = 0x0000013F /* all of these */
} DFBSurfaceDescriptionFlags; } DFBSurfaceDescriptionFlags;
/* /*
* Flags defining which fields of a DFBPaletteDescription are valid. * Flags defining which fields of a DFBPaletteDescription are valid.
*/ */
typedef enum { typedef enum {
DPDESC_CAPS = 0x00000001, /* Specify palette capabilities. */ DPDESC_CAPS = 0x00000001, /* Specify palette capabilities. */
DPDESC_SIZE = 0x00000002, /* Specify number of entries. */ DPDESC_SIZE = 0x00000002, /* Specify number of entries. */
DPDESC_ENTRIES = 0x00000004 /* Initialize the palette with the DPDESC_ENTRIES = 0x00000004 /* Initialize the palette with the
entries specified in the entries specified in the
skipping to change at line 618 skipping to change at line 647
a surface can be resized (small er and bigger up to the a surface can be resized (small er and bigger up to the
initial size) without reallocat ion of the buffers. It's initial size) without reallocat ion of the buffers. It's
useful for surfaces that need a guaranteed space in useful for surfaces that need a guaranteed space in
video memory after resizing. */ video memory after resizing. */
DSCAPS_TRIPLE = 0x00000200, /* Surface is triple buffered. */ DSCAPS_TRIPLE = 0x00000200, /* Surface is triple buffered. */
DSCAPS_PREMULTIPLIED = 0x00001000, /* Surface stores data with premul tiplied alpha. */ DSCAPS_PREMULTIPLIED = 0x00001000, /* Surface stores data with premul tiplied alpha. */
DSCAPS_DEPTH = 0x00010000, /* A depth buffer is allocated. */ DSCAPS_DEPTH = 0x00010000, /* A depth buffer is allocated. */
DSCAPS_ALL = 0x000113F7, /* All of these. */ DSCAPS_SHARED = 0x00100000, /* The surface will be accessible
among processes. */
DSCAPS_ALL = 0x001113F7, /* All of these. */
DSCAPS_FLIPPING = DSCAPS_DOUBLE | DSCAPS_TRIPLE /* Surface needs Flip() calls to make DSCAPS_FLIPPING = DSCAPS_DOUBLE | DSCAPS_TRIPLE /* Surface needs Flip() calls to make
updates/change s visible/usable. */ updates/change s visible/usable. */
} DFBSurfaceCapabilities; } DFBSurfaceCapabilities;
/* /*
* The palette capabilities. * The palette capabilities.
*/ */
typedef enum { typedef enum {
DPCAPS_NONE = 0x00000000 /* None of these. */ DPCAPS_NONE = 0x00000000 /* None of these. */
skipping to change at line 675 skipping to change at line 706
DSBLIT_DEMULTIPLY = 0x00000080, /* divides the color by the al pha before writing the DSBLIT_DEMULTIPLY = 0x00000080, /* divides the color by the al pha before writing the
data to the destination */ data to the destination */
DSBLIT_DEINTERLACE = 0x00000100, /* deinterlaces the source dur ing blitting by reading DSBLIT_DEINTERLACE = 0x00000100, /* deinterlaces the source dur ing blitting by reading
only one field (every secon d line of full only one field (every secon d line of full
image) scaling it verticall y by factor two */ image) scaling it verticall y by factor two */
DSBLIT_SRC_PREMULTCOLOR = 0x00000200, /* modulates the source color with the color alpha */ DSBLIT_SRC_PREMULTCOLOR = 0x00000200, /* modulates the source color with the color alpha */
DSBLIT_XOR = 0x00000400, /* bitwise xor the destination pixels with the DSBLIT_XOR = 0x00000400, /* bitwise xor the destination pixels with the
source pixels after premult iplication */ source pixels after premult iplication */
DSBLIT_INDEX_TRANSLATION = 0x00000800, /* do fast indexed to indexed translation, DSBLIT_INDEX_TRANSLATION = 0x00000800, /* do fast indexed to indexed translation,
this flag is mutual exclusi ve with all others */ this flag is mutual exclusi ve with all others */
DSBLIT_ROTATE180 = 0x00001000, /* rotate the image by 180 deg
ree */
DSBLIT_COLORKEY_PROTECT = 0x00010000, /* make sure written pixels do
n't match color key (internal only ATM) */
DSBLIT_SRC_MASK_ALPHA = 0x00100000, /* modulate source alpha chann
el with alpha channel from source mask,
see also IDirectFBSurface::
SetSourceMask() */
DSBLIT_SRC_MASK_COLOR = 0x00200000, /* modulate source color chann
els with color channels from source mask,
see also IDirectFBSurface::
SetSourceMask() */
} DFBSurfaceBlittingFlags; } DFBSurfaceBlittingFlags;
/* /*
* Options for drawing and blitting operations. Not mandatory for accelerat
ion.
*/
typedef enum {
DSRO_NONE = 0x00000000, /* None of these. */
DSRO_SMOOTH_UPSCALE = 0x00000001, /* Use interpolation for upsca
le StretchBlit(). */
DSRO_SMOOTH_DOWNSCALE = 0x00000002, /* Use interpolation for downs
cale StretchBlit(). */
DSRO_MATRIX = 0x00000004, /* Use the transformation matr
ix set via IDirectFBSurface::SetMatrix(). */
DSRO_ANTIALIAS = 0x00000008, /* Enable anti-aliasing for ed
ges (alphablend must be enabled). */
DSRO_ALL = 0x0000000F /* All of these. */
} DFBSurfaceRenderOptions;
/*
* Mask of accelerated functions. * Mask of accelerated functions.
*/ */
typedef enum { typedef enum {
DFXL_NONE = 0x00000000, /* None of these. */ DFXL_NONE = 0x00000000, /* None of these. */
DFXL_FILLRECTANGLE = 0x00000001, /* FillRectangle() is accelerated. */ DFXL_FILLRECTANGLE = 0x00000001, /* FillRectangle() is accelerated. */
DFXL_DRAWRECTANGLE = 0x00000002, /* DrawRectangle() is accelerated. */ DFXL_DRAWRECTANGLE = 0x00000002, /* DrawRectangle() is accelerated. */
DFXL_DRAWLINE = 0x00000004, /* DrawLine() is accelerated. */ DFXL_DRAWLINE = 0x00000004, /* DrawLine() is accelerated. */
DFXL_FILLTRIANGLE = 0x00000008, /* FillTriangle() is accelerated. * / DFXL_FILLTRIANGLE = 0x00000008, /* FillTriangle() is accelerated. * /
DFXL_BLIT = 0x00010000, /* Blit() and TileBlit() are accele rated. */ DFXL_BLIT = 0x00010000, /* Blit() and TileBlit() are accele rated. */
DFXL_STRETCHBLIT = 0x00020000, /* StretchBlit() is accelerated. */ DFXL_STRETCHBLIT = 0x00020000, /* StretchBlit() is accelerated. */
DFXL_TEXTRIANGLES = 0x00040000, /* TextureTriangles() is accelerate d. */ DFXL_TEXTRIANGLES = 0x00040000, /* TextureTriangles() is accelerate d. */
DFXL_DRAWSTRING = 0x01000000, /* DrawString() and DrawGlyph() are accelerated. */ DFXL_DRAWSTRING = 0x01000000, /* DrawString() and DrawGlyph() are accelerated. */
DFXL_ALL = 0x0107000F /* All drawing/blitting functions. DFXL_ALL = 0x0107000F, /* All drawing/blitting functions.
*/ */
DFXL_ALL_DRAW = 0x0000000F, /* All drawing functions. */
DFXL_ALL_BLIT = 0x01070000, /* All blitting functions. */
} DFBAccelerationMask; } DFBAccelerationMask;
/* /*
* @internal * @internal
*/ */
#define DFB_DRAWING_FUNCTION(a) ((a) & 0x0000FFFF) #define DFB_DRAWING_FUNCTION(a) ((a) & 0x0000FFFF)
/* /*
* @internal * @internal
*/ */
skipping to change at line 789 skipping to change at line 842
/* /*
* Flags defining which fields of a DFBWindowDescription are valid. * Flags defining which fields of a DFBWindowDescription are valid.
*/ */
typedef enum { typedef enum {
DWDESC_CAPS = 0x00000001, /* caps field is valid */ DWDESC_CAPS = 0x00000001, /* caps field is valid */
DWDESC_WIDTH = 0x00000002, /* width field is valid */ DWDESC_WIDTH = 0x00000002, /* width field is valid */
DWDESC_HEIGHT = 0x00000004, /* height field is valid */ DWDESC_HEIGHT = 0x00000004, /* height field is valid */
DWDESC_PIXELFORMAT = 0x00000008, /* pixelformat field is valid */ DWDESC_PIXELFORMAT = 0x00000008, /* pixelformat field is valid */
DWDESC_POSX = 0x00000010, /* posx field is valid */ DWDESC_POSX = 0x00000010, /* posx field is valid */
DWDESC_POSY = 0x00000020, /* posy field is valid */ DWDESC_POSY = 0x00000020, /* posy field is valid */
DWDESC_SURFACE_CAPS = 0x00000040 /* Create the window surface with DWDESC_SURFACE_CAPS = 0x00000040, /* Create the window surface with
special capabilities. */ special capabilities. */
DWDESC_PARENT = 0x00000080, /* This window has a parent accordi
ng to parent_id field. */
DWDESC_OPTIONS = 0x00000100, /* Initial window options have been
set. */
DWDESC_STACKING = 0x00000200, /* Initial stacking class has been
set. */
DWDESC_RESOURCE_ID = 0x00001000, /* Resource id for window surface c
reation has been set. */
} DFBWindowDescriptionFlags; } DFBWindowDescriptionFlags;
/* /*
* Flags defining which fields of a DFBDataBufferDescription are valid. * Flags defining which fields of a DFBDataBufferDescription are valid.
*/ */
typedef enum { typedef enum {
DBDESC_FILE = 0x00000001, /* Create a static buffer for the DBDESC_FILE = 0x00000001, /* Create a static buffer for the
specified filename. */ specified filename. */
DBDESC_MEMORY = 0x00000002 /* Create a static buffer for the DBDESC_MEMORY = 0x00000002 /* Create a static buffer for the
specified memory area. */ specified memory area. */
skipping to change at line 826 skipping to change at line 884
there is another reason causing there is another reason causing
a window stack repaint. */ a window stack repaint. */
DWCAPS_INPUTONLY = 0x00000004, /* The window has no surface. DWCAPS_INPUTONLY = 0x00000004, /* The window has no surface.
You can not draw to it but it You can not draw to it but it
receives events */ receives events */
DWCAPS_NODECORATION = 0x00000008, /* The window won't be decorated. * / DWCAPS_NODECORATION = 0x00000008, /* The window won't be decorated. * /
DWCAPS_ALL = 0x0000000F /* All valid flags. */ DWCAPS_ALL = 0x0000000F /* All valid flags. */
} DFBWindowCapabilities; } DFBWindowCapabilities;
/* /*
* Flags controlling the appearance and behaviour of the window.
*/
typedef enum {
DWOP_NONE = 0x00000000, /* none of these */
DWOP_COLORKEYING = 0x00000001, /* enable color key */
DWOP_ALPHACHANNEL = 0x00000002, /* enable alpha blending using the
window's alpha channel */
DWOP_OPAQUE_REGION = 0x00000004, /* overrides DWOP_ALPHACHANNEL for
the
region set by SetOpaqueRegion()
*/
DWOP_SHAPED = 0x00000008, /* window doesn't receive mouse eve
nts for
invisible regions, must be used
with
DWOP_ALPHACHANNEL or DWOP_COLORK
EYING */
DWOP_KEEP_POSITION = 0x00000010, /* window can't be moved
with the mouse */
DWOP_KEEP_SIZE = 0x00000020, /* window can't be resized
with the mouse */
DWOP_KEEP_STACKING = 0x00000040, /* window can't be raised
or lowered with the mouse */
DWOP_GHOST = 0x00001000, /* never get focus or input,
clicks will go through,
implies DWOP_KEEP... */
DWOP_INDESTRUCTIBLE = 0x00002000, /* window can't be destroyed
by internal shortcut */
DWOP_SCALE = 0x00010000, /* Surface won't be changed if wind
ow size on screen changes. The surface
can be resized separately using
IDirectFBWindow::ResizeSurface(). */
DWOP_KEEP_ABOVE = 0x00100000, /* Keep window above parent window.
*/
DWOP_KEEP_UNDER = 0x00200000, /* Keep window under parent window.
*/
DWOP_ALL = 0x0031307F /* all possible options */
} DFBWindowOptions;
/*
* The stacking class restricts the stacking order of windows.
*/
typedef enum {
DWSC_MIDDLE = 0x00000000, /* This is the default stacking
class of new windows. */
DWSC_UPPER = 0x00000001, /* Window is always above windows
in the middle stacking class.
Only windows that are also in
the upper stacking class can
get above them. */
DWSC_LOWER = 0x00000002 /* Window is always below windows
in the middle stacking class.
Only windows that are also in
the lower stacking class can
get below them. */
} DFBWindowStackingClass;
/*
* Flags describing how to load a font. * Flags describing how to load a font.
* *
* These flags describe how a font is loaded and affect how the * These flags describe how a font is loaded and affect how the
* glyphs are drawn. There is no way to change this after the font * glyphs are drawn. There is no way to change this after the font
* has been loaded. If you need to render a font with different * has been loaded. If you need to render a font with different
* attributes, you have to create multiple FontProviders of the * attributes, you have to create multiple FontProviders of the
* same font file. * same font file.
*/ */
typedef enum { typedef enum {
DFFA_NONE = 0x00000000, /* none of these flags */ DFFA_NONE = 0x00000000, /* none of these flags */
skipping to change at line 1010 skipping to change at line 1119
/* 6 bit RGB (3 byte/ red 6@16, green 6@6, blue 6@0) */ /* 6 bit RGB (3 byte/ red 6@16, green 6@6, blue 6@0) */
DSPF_RGB18 = DFB_SURFACE_PIXELFORMAT( 24, 18, 0, 0, 0, 3, 0, 0, 0, 0, 0 ), DSPF_RGB18 = DFB_SURFACE_PIXELFORMAT( 24, 18, 0, 0, 0, 3, 0, 0, 0, 0, 0 ),
/* 2 bit LUT (1 byte/ 4 pixel, 2 bit color and alpha lookup from pa lette) */ /* 2 bit LUT (1 byte/ 4 pixel, 2 bit color and alpha lookup from pa lette) */
DSPF_LUT2 = DFB_SURFACE_PIXELFORMAT( 25, 2, 0, 1, 2, 0, 3, 0, 0, 1, 0 ), DSPF_LUT2 = DFB_SURFACE_PIXELFORMAT( 25, 2, 0, 1, 2, 0, 3, 0, 0, 1, 0 ),
/* 16 bit RGB (2 byte, nothing @12, red 4@8, green 4@4, blue 4@0) */ /* 16 bit RGB (2 byte, nothing @12, red 4@8, green 4@4, blue 4@0) */
DSPF_RGB444 = DFB_SURFACE_PIXELFORMAT( 26, 12, 0, 0, 0, 2, 0, 0, 0, 0, 0 ), DSPF_RGB444 = DFB_SURFACE_PIXELFORMAT( 26, 12, 0, 0, 0, 2, 0, 0, 0, 0, 0 ),
/* 16 bit RGB (2 byte, nothing @15, red 5@10, green 5@5, blue 5@0) * / /* 16 bit RGB (2 byte, nothing @15, red 5@10, green 5@5, blue 5@0) * /
DSPF_RGB555 = DFB_SURFACE_PIXELFORMAT( 27, 15, 0, 0, 0, 2, 0, 0, 0, DSPF_RGB555 = DFB_SURFACE_PIXELFORMAT( 27, 15, 0, 0, 0, 2, 0, 0, 0,
0, 0 ) 0, 0 ),
/* 16 bit BGR (2 byte, nothing @15, blue 5@10, green 5@5, red 5@0) *
/
DSPF_BGR555 = DFB_SURFACE_PIXELFORMAT( 28, 15, 0, 0, 0, 2, 0, 0, 0,
0, 0 )
} DFBSurfacePixelFormat; } DFBSurfacePixelFormat;
/* Number of pixelformats defined */ /* Number of pixelformats defined */
#define DFB_NUM_PIXELFORMATS 28 #define DFB_NUM_PIXELFORMATS 29
/* These macros extract information about the pixel format. */ /* These macros extract information about the pixel format. */
#define DFB_PIXELFORMAT_INDEX(fmt) (((fmt) & 0x0000007F) ) #define DFB_PIXELFORMAT_INDEX(fmt) (((fmt) & 0x0000007F) )
#define DFB_COLOR_BITS_PER_PIXEL(fmt) (((fmt) & 0x00000F80) >> 7) #define DFB_COLOR_BITS_PER_PIXEL(fmt) (((fmt) & 0x00000F80) >> 7)
#define DFB_ALPHA_BITS_PER_PIXEL(fmt) (((fmt) & 0x0000F000) >> 12) #define DFB_ALPHA_BITS_PER_PIXEL(fmt) (((fmt) & 0x0000F000) >> 12)
#define DFB_PIXELFORMAT_HAS_ALPHA(fmt) (((fmt) & 0x00010000) != 0) #define DFB_PIXELFORMAT_HAS_ALPHA(fmt) (((fmt) & 0x00010000) != 0)
skipping to change at line 1062 skipping to change at line 1174
struct { struct {
void *data; /* data pointer of exi sting buffer */ void *data; /* data pointer of exi sting buffer */
int pitch; /* pitch of buffer */ int pitch; /* pitch of buffer */
} preallocated[2]; } preallocated[2];
struct { struct {
const DFBColor *entries; const DFBColor *entries;
unsigned int size; unsigned int size;
} palette; /* initial palette */ } palette; /* initial palette */
unsigned long resource_id; /* universal resourc
e id, either user specified for general
purpose surfaces
or id of layer or window */
} DFBSurfaceDescription; } DFBSurfaceDescription;
/* /*
* Description of the palette that is to be created. * Description of the palette that is to be created.
*/ */
typedef struct { typedef struct {
DFBPaletteDescriptionFlags flags; /* Validation of field s. */ DFBPaletteDescriptionFlags flags; /* Validation of field s. */
DFBPaletteCapabilities caps; /* Palette capabilitie s. */ DFBPaletteCapabilities caps; /* Palette capabilitie s. */
unsigned int size; /* Number of entries. */ unsigned int size; /* Number of entries. */
skipping to change at line 1096 skipping to change at line 1211
int level; /* Default level. */ int level; /* Default level. */
int regions; /* Number of concurr ent regions supported.<br> int regions; /* Number of concurr ent regions supported.<br>
-1 = unlimited, -1 = unlimited,
0 = unknown/one , 0 = unknown/one ,
>0 = actual numb er */ >0 = actual numb er */
int sources; /* Number of selecta ble sources. */ int sources; /* Number of selecta ble sources. */
int clip_regions; /* Number of clippin g regions. */ int clip_regions; /* Number of clippin g regions. */
} DFBDisplayLayerDescription; } DFBDisplayLayerDescription;
/*
* Capabilities of a display layer source.
*/
typedef enum {
DDLSCAPS_NONE = 0x00000000, /* none of these */
DDLSCAPS_SURFACE = 0x00000001, /* source has an accessable surface
*/
DDLSCAPS_ALL = 0x00000001 /* all of these */
} DFBDisplayLayerSourceCaps;
#define DFB_DISPLAY_LAYER_SOURCE_DESC_NAME_LENGTH 24 #define DFB_DISPLAY_LAYER_SOURCE_DESC_NAME_LENGTH 24
/* /*
* Description of a display layer source. * Description of a display layer source.
*/ */
typedef struct { typedef struct {
DFBDisplayLayerSourceID source_id; /* ID of the so urce. */ DFBDisplayLayerSourceID source_id; /* ID of the so urce. */
char name[DFB_DISPLAY_LAYER_SOURCE_DESC_NAME_LENGTH]; /* Name of the source. */ char name[DFB_DISPLAY_LAYER_SOURCE_DESC_NAME_LENGTH]; /* Name of the source. */
DFBDisplayLayerSourceCaps caps; /* Capabilites
of the source. */
} DFBDisplayLayerSourceDescription; } DFBDisplayLayerSourceDescription;
#define DFB_SCREEN_DESC_NAME_LENGTH 32 #define DFB_SCREEN_DESC_NAME_LENGTH 32
/* /*
* Description of the display encoder capabilities. * Description of the display encoder capabilities.
*/ */
typedef struct { typedef struct {
DFBScreenCapabilities caps; /* Capability flags of DFBScreenCapabilities caps; /* Capability flags of
the screen. */ the screen. */
skipping to change at line 1203 skipping to change at line 1331
typedef struct { typedef struct {
DFBWindowDescriptionFlags flags; /* field validation * / DFBWindowDescriptionFlags flags; /* field validation * /
DFBWindowCapabilities caps; /* capabilities */ DFBWindowCapabilities caps; /* capabilities */
int width; /* pixel width */ int width; /* pixel width */
int height; /* pixel height */ int height; /* pixel height */
DFBSurfacePixelFormat pixelformat; /* pixel format */ DFBSurfacePixelFormat pixelformat; /* pixel format */
int posx; /* distance from left layer border */ int posx; /* distance from left layer border */
int posy; /* distance from uppe r layer border */ int posy; /* distance from uppe r layer border */
DFBSurfaceCapabilities surface_caps; /* pixel format */ DFBSurfaceCapabilities surface_caps; /* pixel format */
DFBWindowID parent_id; /* window id of paren
t window */
DFBWindowOptions options; /* initial window opt
ions */
DFBWindowStackingClass stacking; /* initial stacking c
lass */
unsigned long resource_id; /* resource id used t
o create the window surface */
} DFBWindowDescription; } DFBWindowDescription;
/* /*
* Description of a data buffer that is to be created. * Description of a data buffer that is to be created.
*/ */
typedef struct { typedef struct {
DFBDataBufferDescriptionFlags flags; /* field validation */ DFBDataBufferDescriptionFlags flags; /* field validation */
const char *file; /* for file based data buffers */ const char *file; /* for file based data buffers */
skipping to change at line 1294 skipping to change at line 1427
DVCAPS_SEEK = 0x00000001, /* supports SeekTo */ DVCAPS_SEEK = 0x00000001, /* supports SeekTo */
DVCAPS_SCALE = 0x00000002, /* can scale the video */ DVCAPS_SCALE = 0x00000002, /* can scale the video */
DVCAPS_INTERLACED = 0x00000004, /* supports interlaced surfaces */ DVCAPS_INTERLACED = 0x00000004, /* supports interlaced surfaces */
DVCAPS_SPEED = 0x00000008, /* supports changing playback speed */ DVCAPS_SPEED = 0x00000008, /* supports changing playback speed */
DVCAPS_BRIGHTNESS = 0x00000010, /* supports Brightness adjustment */ DVCAPS_BRIGHTNESS = 0x00000010, /* supports Brightness adjustment */
DVCAPS_CONTRAST = 0x00000020, /* supports Contrast adjustment */ DVCAPS_CONTRAST = 0x00000020, /* supports Contrast adjustment */
DVCAPS_HUE = 0x00000040, /* supports Hue adjustment */ DVCAPS_HUE = 0x00000040, /* supports Hue adjustment */
DVCAPS_SATURATION = 0x00000080, /* supports Saturation adjustment */ DVCAPS_SATURATION = 0x00000080, /* supports Saturation adjustment */
DVCAPS_INTERACTIVE = 0x00000100, /* supports SendEvent */ DVCAPS_INTERACTIVE = 0x00000100, /* supports SendEvent */
DVCAPS_VOLUME = 0x00000200, /* supports Volume adjustment */ DVCAPS_VOLUME = 0x00000200, /* supports Volume adjustment */
DVCAPS_EVENT = 0x00000400, /* supports the sending of events as
video/audio data changes.*/
DVCAPS_ATTRIBUTES = 0x00000800, /* supports dynamic changing of atrr
ibutes.*/
DVCAPS_AUDIO_SEL = 0x00001000, /* Supportes chosing audio outputs.*
/
} DFBVideoProviderCapabilities; } DFBVideoProviderCapabilities;
/* /*
* Information about the status of an IDirectFBVideoProvider. * Information about the status of an IDirectFBVideoProvider.
*/ */
typedef enum { typedef enum {
DVSTATE_UNKNOWN = 0x00000000, /* unknown status */ DVSTATE_UNKNOWN = 0x00000000, /* unknown status */
DVSTATE_PLAY = 0x00000001, /* video provider is playing */ DVSTATE_PLAY = 0x00000001, /* video provider is playing */
DVSTATE_STOP = 0x00000002, /* playback was stopped */ DVSTATE_STOP = 0x00000002, /* playback was stopped */
DVSTATE_FINISHED = 0x00000003, /* playback is finished */ DVSTATE_FINISHED = 0x00000003, /* playback is finished */
skipping to change at line 1320 skipping to change at line 1456
*/ */
typedef enum { typedef enum {
DVPLAY_NOFX = 0x00000000, /* normal playback */ DVPLAY_NOFX = 0x00000000, /* normal playback */
DVPLAY_REWIND = 0x00000001, /* reverse playback */ DVPLAY_REWIND = 0x00000001, /* reverse playback */
DVPLAY_LOOPING = 0x00000002 /* automatically restart DVPLAY_LOOPING = 0x00000002 /* automatically restart
playback when end-of-stream playback when end-of-stream
is reached (gapless). */ is reached (gapless). */
} DFBVideoProviderPlaybackFlags; } DFBVideoProviderPlaybackFlags;
/* /*
* Flags to allow Audio Unit selection.
*/
typedef enum {
DVAUDIOUNIT_NONE = 0x00000000, /* No Audio Unit */
DVAUDIOUNIT_ONE = 0x00000001, /* Audio Unit One */
DVAUDIOUNIT_TWO = 0x00000002, /* Audio Unit Two */
DVAUDIOUNIT_THREE = 0x00000004, /* Audio Unit Three */
DVAUDIOUNIT_FOUR = 0x00000008, /* Audio Unit Four */
DVAUDIOUNIT_ALL = 0x0000000F, /* Audio Unit One */
} DFBVideoProviderAudioUnits;
/*
* Flags defining which fields of a DFBColorAdjustment are valid. * Flags defining which fields of a DFBColorAdjustment are valid.
*/ */
typedef enum { typedef enum {
DCAF_NONE = 0x00000000, /* none of these */ DCAF_NONE = 0x00000000, /* none of these */
DCAF_BRIGHTNESS = 0x00000001, /* brightness field is valid */ DCAF_BRIGHTNESS = 0x00000001, /* brightness field is valid */
DCAF_CONTRAST = 0x00000002, /* contrast field is valid */ DCAF_CONTRAST = 0x00000002, /* contrast field is valid */
DCAF_HUE = 0x00000004, /* hue field is valid */ DCAF_HUE = 0x00000004, /* hue field is valid */
DCAF_SATURATION = 0x00000008, /* saturation field is valid */ DCAF_SATURATION = 0x00000008, /* saturation field is valid */
DCAF_ALL = 0x0000000F /* all of these */ DCAF_ALL = 0x0000000F /* all of these */
} DFBColorAdjustmentFlags; } DFBColorAdjustmentFlags;
skipping to change at line 1904 skipping to change at line 2052
*/ */
typedef enum { typedef enum {
DSOCAPS_NONE = 0x00000000, /* None of these. */ DSOCAPS_NONE = 0x00000000, /* None of these. */
DSOCAPS_CONNECTORS = 0x00000001, /* Output connectors are available . */ DSOCAPS_CONNECTORS = 0x00000001, /* Output connectors are available . */
DSOCAPS_ENCODER_SEL = 0x00000010, /* Encoder can be selected. */ DSOCAPS_ENCODER_SEL = 0x00000010, /* Encoder can be selected. */
DSOCAPS_SIGNAL_SEL = 0x00000020, /* Signal(s) can be selected. */ DSOCAPS_SIGNAL_SEL = 0x00000020, /* Signal(s) can be selected. */
DSOCAPS_CONNECTOR_SEL = 0x00000040, /* Connector(s) can be selected. * / DSOCAPS_CONNECTOR_SEL = 0x00000040, /* Connector(s) can be selected. * /
DSOCAPS_SLOW_BLANKING = 0x00000080, /* Slow Blanking on outputs is sup ported. */ DSOCAPS_SLOW_BLANKING = 0x00000080, /* Slow Blanking on outputs is sup ported. */
DSOCAPS_ALL = 0x000000F1 DSOCAPS_RESOLUTION = 0x00000100, /* Output Resolution can be change
d. (global screen size)*/
DSOCAPS_ALL = 0x000001F1
} DFBScreenOutputCapabilities; } DFBScreenOutputCapabilities;
/* /*
* Type of output connector. * Type of output connector.
*/ */
typedef enum { typedef enum {
DSOC_UNKNOWN = 0x00000000, /* Unknown type */ DSOC_UNKNOWN = 0x00000000, /* Unknown type */
DSOC_VGA = 0x00000001, /* VGA connector */ DSOC_VGA = 0x00000001, /* VGA connector */
DSOC_SCART = 0x00000002, /* SCART connector */ DSOC_SCART = 0x00000002, /* SCART connector */
skipping to change at line 1948 skipping to change at line 2097
* Type of slow blanking signalling. * Type of slow blanking signalling.
*/ */
typedef enum { typedef enum {
DSOSB_OFF = 0x00000000, /* No signal */ DSOSB_OFF = 0x00000000, /* No signal */
DSOSB_16x9 = 0x00000001, /* 16*9 Widescreen signalling */ DSOSB_16x9 = 0x00000001, /* 16*9 Widescreen signalling */
DSOSB_4x3 = 0x00000002, /* 4*3 widescreen signalling */ DSOSB_4x3 = 0x00000002, /* 4*3 widescreen signalling */
DSOSB_FOLLOW = 0x00000004, /* Follow signalling */ DSOSB_FOLLOW = 0x00000004, /* Follow signalling */
DSOSB_MONITOR = 0x00000008 /* Monitor */ DSOSB_MONITOR = 0x00000008 /* Monitor */
} DFBScreenOutputSlowBlankingSignals; } DFBScreenOutputSlowBlankingSignals;
/**
* Resolutions. TV Standards implies too many things:
* resolution / encoding / frequency.
*/
typedef enum {
DSOR_UNKNOWN = 0x00000000, /* Unknown Resolution */
DSOR_640_480 = 0x00000001, /* 640x480 Resolution */
DSOR_720_480 = 0x00000002, /* 720x480 Resolution */
DSOR_720_576 = 0x00000004, /* 720x576 Resolution */
DSOR_800_600 = 0x00000008, /* 800x600 Resolution */
DSOR_1024_768 = 0x00000010, /* 1024x768 Resolution */
DSOR_1152_864 = 0x00000020, /* 1152x864 Resolution */
DSOR_1280_720 = 0x00000040, /* 1280x720 Resolution */
DSOR_1280_768 = 0x00000080, /* 1280x768 Resolution */
DSOR_1280_960 = 0x00000100, /* 1280x960 Resolution */
DSOR_1280_1024 = 0x00000200, /* 1280x1024 Resolution */
DSOR_1400_1050 = 0x00000400, /* 1400x1050 Resolution */
DSOR_1600_1200 = 0x00000800, /* 1600x1200 Resolution */
DSOR_1920_1080 = 0x00001000, /* 1920x1080 Resolution */
DSOR_ALL = 0x00001FFF /* All Resolution */
} DFBScreenOutputResolution;
#define DFB_SCREEN_OUTPUT_DESC_NAME_LENGTH 24 #define DFB_SCREEN_OUTPUT_DESC_NAME_LENGTH 24
/* /*
* Description of a screen output. * Description of a screen output.
*/ */
typedef struct { typedef struct {
DFBScreenOutputCapabilities caps; /* Screen capabilities . */ DFBScreenOutputCapabilities caps; /* Screen capabilities . */
DFBScreenOutputConnectors all_connectors; /* Output connectors. */ DFBScreenOutputConnectors all_connectors; /* Output connectors. */
DFBScreenOutputSignals all_signals; /* Output signals. */ DFBScreenOutputSignals all_signals; /* Output signals. */
DFBScreenOutputResolution all_resolutions; /* Output Resolutions */
char name[DFB_SCREEN_OUTPUT_DESC_NAME_LENGTH]; /* Output name */ char name[DFB_SCREEN_OUTPUT_DESC_NAME_LENGTH]; /* Output name */
} DFBScreenOutputDescription; } DFBScreenOutputDescription;
/* /*
* Flags for screen output configuration. * Flags for screen output configuration.
*/ */
typedef enum { typedef enum {
DSOCONF_NONE = 0x00000000, /* None of these. */ DSOCONF_NONE = 0x00000000, /* None of these. */
DSOCONF_ENCODER = 0x00000001, /* Set encoder the signal(s) comes from. */ DSOCONF_ENCODER = 0x00000001, /* Set encoder the signal(s) comes from. */
DSOCONF_SIGNALS = 0x00000002, /* Select signal(s) from encoder. * / DSOCONF_SIGNALS = 0x00000002, /* Select signal(s) from encoder. * /
DSOCONF_CONNECTORS = 0x00000004, /* Select output connector(s). */ DSOCONF_CONNECTORS = 0x00000004, /* Select output connector(s). */
DSOCONF_SLOW_BLANKING= 0x00000008, /* Can select slow blanking support . */ DSOCONF_SLOW_BLANKING= 0x00000008, /* Can select slow blanking support . */
DSOCONF_RESOLUTION = 0x00000010, /* Can change output resolution */
DSOCONF_ALL = 0x0000000F DSOCONF_ALL = 0x0000001F
} DFBScreenOutputConfigFlags; } DFBScreenOutputConfigFlags;
/* /*
* Configuration of an output. * Configuration of an output.
*/ */
typedef struct { typedef struct {
DFBScreenOutputConfigFlags flags; /* Validates struct member s. */ DFBScreenOutputConfigFlags flags; /* Validates struct member s. */
int encoder; /* Chosen encoder. */ int encoder; /* Chosen encoder. */
DFBScreenOutputSignals out_signals; /* Selected encoder signal (s). */ DFBScreenOutputSignals out_signals; /* Selected encoder signal (s). */
DFBScreenOutputConnectors out_connectors; /* Selected output connect or(s). */ DFBScreenOutputConnectors out_connectors; /* Selected output connect or(s). */
DFBScreenOutputSlowBlankingSignals slow_blanking;/* Slow Blanking signals. */ DFBScreenOutputSlowBlankingSignals slow_blanking;/* Slow Blanking signals. */
DFBScreenOutputResolution resolution; /* Output Resolution */
} DFBScreenOutputConfig; } DFBScreenOutputConfig;
/* /*
* Capabilities of a display encoder. * Capabilities of a display encoder.
*/ */
typedef enum { typedef enum {
DSECAPS_NONE = 0x00000000, /* None of these. */ DSECAPS_NONE = 0x00000000, /* None of these. */
DSECAPS_TV_STANDARDS = 0x00000001, /* TV standards can be selected. */ DSECAPS_TV_STANDARDS = 0x00000001, /* TV standards can be selected. */
DSECAPS_TEST_PICTURE = 0x00000002, /* Test picture generation supporte d. */ DSECAPS_TEST_PICTURE = 0x00000002, /* Test picture generation supporte d. */
DSECAPS_MIXER_SEL = 0x00000004, /* Mixer can be selected. */ DSECAPS_MIXER_SEL = 0x00000004, /* Mixer can be selected. */
DSECAPS_OUT_SIGNALS = 0x00000008, /* Different output signals are sup ported. */ DSECAPS_OUT_SIGNALS = 0x00000008, /* Different output signals are sup ported. */
DSECAPS_SCANMODE = 0x00000010, /* Can switch between interlaced an d progressive output. */ DSECAPS_SCANMODE = 0x00000010, /* Can switch between interlaced an d progressive output. */
DSECAPS_FREQUENCY = 0x00000020, /* Can switch between different fre quencies. */
DSECAPS_BRIGHTNESS = 0x00000100, /* Adjustment of brightness is supp orted. */ DSECAPS_BRIGHTNESS = 0x00000100, /* Adjustment of brightness is supp orted. */
DSECAPS_CONTRAST = 0x00000200, /* Adjustment of contrast is suppor ted. */ DSECAPS_CONTRAST = 0x00000200, /* Adjustment of contrast is suppor ted. */
DSECAPS_HUE = 0x00000400, /* Adjustment of hue is supported. */ DSECAPS_HUE = 0x00000400, /* Adjustment of hue is supported. */
DSECAPS_SATURATION = 0x00000800, /* Adjustment of saturation is supp orted. */ DSECAPS_SATURATION = 0x00000800, /* Adjustment of saturation is supp orted. */
DSECAPS_CONNECTORS = 0x00001000, /* Select output connector(s). */ DSECAPS_CONNECTORS = 0x00001000, /* Select output connector(s). */
DSECAPS_SLOW_BLANKING = 0x00002000, /* Slow Blanking on outputs is sup ported. */ DSECAPS_SLOW_BLANKING = 0x00002000, /* Slow Blanking on outputs is sup ported. */
DSECAPS_RESOLUTION = 0x00004000, /* Different encoder resolutions su pported */
DSECAPS_ALL = 0x00003f3f DSECAPS_ALL = 0x00007f3f
} DFBScreenEncoderCapabilities; } DFBScreenEncoderCapabilities;
/* /*
* Type of display encoder. * Type of display encoder.
*/ */
typedef enum { typedef enum {
DSET_UNKNOWN = 0x00000000, /* Unknown type */ DSET_UNKNOWN = 0x00000000, /* Unknown type */
DSET_CRTC = 0x00000001, /* Encoder is a CRTC. */ DSET_CRTC = 0x00000001, /* Encoder is a CRTC. */
DSET_TV = 0x00000002 /* TV output encoder. */ DSET_TV = 0x00000002, /* TV output encoder. */
DSET_DIGITAL = 0x00000004 /* Support signals other than SD TV
standards. */
} DFBScreenEncoderType; } DFBScreenEncoderType;
/* /*
* TV standards. * TV standards.
*/ */
typedef enum { typedef enum {
DSETV_UNKNOWN = 0x00000000, /* Unknown standard */ DSETV_UNKNOWN = 0x00000000, /* Unknown standard */
DSETV_PAL = 0x00000001, /* PAL */ DSETV_PAL = 0x00000001, /* PAL */
DSETV_NTSC = 0x00000002, /* NTSC */ DSETV_NTSC = 0x00000002, /* NTSC */
DSETV_SECAM = 0x00000004, /* SECAM */ DSETV_SECAM = 0x00000004, /* SECAM */
DSETV_PAL_60 = 0x00000008 /* PAL-60 */ DSETV_PAL_60 = 0x00000008, /* PAL-60 */
DSETV_PAL_BG = 0x00000010, /* PAL BG support (specific) */
DSETV_PAL_I = 0x00000020, /* PAL I support (specific) */
DSETV_PAL_M = 0x00000040, /* PAL M support (specific) */
DSETV_PAL_N = 0x00000080, /* PAL N support (specific) */
DSETV_PAL_NC = 0x00000100, /* PAL NC support (specific) */
DSETV_NTSC_M_JPN = 0x00000200, /* NTSC_JPN support */
DSETV_DIGITAL = 0x00000400, /* TV standards from the digital do
main. specify resolution, scantype, frequency.*/
DSETV_ALL = 0x000007FF /* All TV Standards*/
} DFBScreenEncoderTVStandards; } DFBScreenEncoderTVStandards;
/* /*
* Scan modes. * Scan modes.
*/ */
typedef enum { typedef enum {
DSESM_UNKNOWN = 0x00000000, /* Unknown mode */ DSESM_UNKNOWN = 0x00000000, /* Unknown mode */
DSESM_INTERLACED = 0x00000001, /* Interlaced scan mode */ DSESM_INTERLACED = 0x00000001, /* Interlaced scan mode */
DSESM_PROGRESSIVE = 0x00000002 /* Progressive scan mode */ DSESM_PROGRESSIVE = 0x00000002 /* Progressive scan mode */
} DFBScreenEncoderScanMode; } DFBScreenEncoderScanMode;
/*
* Frequency of output signal.
*/
typedef enum {
DSEF_UNKNOWN = 0x00000000, /* Unknown Frequency */
DSEF_25HZ = 0x00000001, /* 25 Hz Output. */
DSEF_29_97HZ = 0x00000002, /* 29.97 Hz Output. */
DSEF_50HZ = 0x00000004, /* 50 Hz Output. */
DSEF_59_94HZ = 0x00000008, /* 59.94 Hz Output. */
DSEF_60HZ = 0x00000010, /* 60 Hz Output. */
DSEF_75HZ = 0x00000020, /* 75 Hz Output. */
} DFBScreenEncoderFrequency;
#define DFB_SCREEN_ENCODER_DESC_NAME_LENGTH 24 #define DFB_SCREEN_ENCODER_DESC_NAME_LENGTH 24
/* /*
* Description of a display encoder. * Description of a display encoder.
*/ */
typedef struct { typedef struct {
DFBScreenEncoderCapabilities caps; /* Encoder capabilit ies. */ DFBScreenEncoderCapabilities caps; /* Encoder capabilit ies. */
DFBScreenEncoderType type; /* Type of encoder. */ DFBScreenEncoderType type; /* Type of encoder. */
DFBScreenEncoderTVStandards tv_standards; /* Supported TV stan dards. */ DFBScreenEncoderTVStandards tv_standards; /* Supported TV stan dards. */
DFBScreenOutputSignals out_signals; /* Supported output signals. */ DFBScreenOutputSignals out_signals; /* Supported output signals. */
DFBScreenOutputConnectors all_connectors; /* Supported output connectors */ DFBScreenOutputConnectors all_connectors; /* Supported output connectors */
DFBScreenOutputResolution all_resolutions; /* Supported Resolut ions*/
char name[DFB_SCREEN_ENCODER_DESC_NAME_LENGTH]; /* Encoder name */ char name[DFB_SCREEN_ENCODER_DESC_NAME_LENGTH]; /* Encoder name */
} DFBScreenEncoderDescription; } DFBScreenEncoderDescription;
/* /*
* Flags for display encoder configuration. * Flags for display encoder configuration.
*/ */
typedef enum { typedef enum {
DSECONF_NONE = 0x00000000, /* None of these. */ DSECONF_NONE = 0x00000000, /* None of these. */
DSECONF_TV_STANDARD = 0x00000001, /* Set TV standard. */ DSECONF_TV_STANDARD = 0x00000001, /* Set TV standard. */
DSECONF_TEST_PICTURE = 0x00000002, /* Set test picture mode. */ DSECONF_TEST_PICTURE = 0x00000002, /* Set test picture mode. */
DSECONF_MIXER = 0x00000004, /* Select mixer. */ DSECONF_MIXER = 0x00000004, /* Select mixer. */
DSECONF_OUT_SIGNALS = 0x00000008, /* Select generated output signal(s ). */ DSECONF_OUT_SIGNALS = 0x00000008, /* Select generated output signal(s ). */
DSECONF_SCANMODE = 0x00000010, /* Select interlaced or progressive output. */ DSECONF_SCANMODE = 0x00000010, /* Select interlaced or progressive output. */
DSECONF_TEST_COLOR = 0x00000020, /* Set color for DSETP_SINGLE. */ DSECONF_TEST_COLOR = 0x00000020, /* Set color for DSETP_SINGLE. */
DSECONF_ADJUSTMENT = 0x00000040, /* Set color adjustment. */ DSECONF_ADJUSTMENT = 0x00000040, /* Set color adjustment. */
DSECONF_FREQUENCY = 0x00000080, /* Set Output Frequency*/
DSECONF_CONNECTORS = 0x00000100, /* Select output connector(s). */ DSECONF_CONNECTORS = 0x00000100, /* Select output connector(s). */
DSECONF_SLOW_BLANKING = 0x00000200, /* Can select slow blanking suppor t. */ DSECONF_SLOW_BLANKING = 0x00000200, /* Can select slow blanking suppor t. */
DSECONF_RESOLUTION = 0x00000400, /* Can change resolution of the en coder.*/
DSECONF_ALL = 0x000003FF DSECONF_ALL = 0x000007FF
} DFBScreenEncoderConfigFlags; } DFBScreenEncoderConfigFlags;
/* /*
* Test picture mode. * Test picture mode.
*/ */
typedef enum { typedef enum {
DSETP_OFF = 0x00000000, /* Disable test picture. */ DSETP_OFF = 0x00000000, /* Disable test picture. */
DSETP_MULTI = 0x00000001, /* Show color bars. */ DSETP_MULTI = 0x00000001, /* Show color bars. */
DSETP_SINGLE = 0x00000002, /* Whole screen as defined in configurat ion. */ DSETP_SINGLE = 0x00000002, /* Whole screen as defined in configurat ion. */
skipping to change at line 2116 skipping to change at line 2318
int mixer; /* Selected mixer. */ int mixer; /* Selected mixer. */
DFBScreenOutputSignals out_signals; /* Generated output signa ls. */ DFBScreenOutputSignals out_signals; /* Generated output signa ls. */
DFBScreenOutputConnectors out_connectors; /* Selected output conne ctor(s). */ DFBScreenOutputConnectors out_connectors; /* Selected output conne ctor(s). */
DFBScreenOutputSlowBlankingSignals slow_blanking;/* Slow Blanking signals. */ DFBScreenOutputSlowBlankingSignals slow_blanking;/* Slow Blanking signals. */
DFBScreenEncoderScanMode scanmode; /* Interlaced or progress ive output. */ DFBScreenEncoderScanMode scanmode; /* Interlaced or progress ive output. */
DFBColor test_color; /* Color for DSETP_SINGLE . */ DFBColor test_color; /* Color for DSETP_SINGLE . */
DFBColorAdjustment adjustment; /* Color adjustment. */ DFBColorAdjustment adjustment; /* Color adjustment. */
DFBScreenEncoderFrequency frequency; /* Selected Output Freque
ncy*/
DFBScreenOutputResolution resolution; /* Selected Output resolu
tion*/
} DFBScreenEncoderConfig; } DFBScreenEncoderConfig;
/******************* /*******************
* IDirectFBScreen * * IDirectFBScreen *
*******************/ *******************/
/* /*
* <i>No summary yet...</i> * <i>No summary yet...</i>
*/ */
DEFINE_INTERFACE( IDirectFBScreen, DEFINE_INTERFACE( IDirectFBScreen,
skipping to change at line 2763 skipping to change at line 2968
/* /*
* Switch the layer context. * Switch the layer context.
* *
* Switches to the shared context unless <b>exclusive</b> is DFB_TRUE * Switches to the shared context unless <b>exclusive</b> is DFB_TRUE
* and the cooperative level of this interface is DLSCL_EXCLUSIVE. * and the cooperative level of this interface is DLSCL_EXCLUSIVE.
*/ */
DFBResult (*SwitchContext) ( DFBResult (*SwitchContext) (
IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *thiz,
DFBBoolean exclusive DFBBoolean exclusive
); );
/** Rotation **/
/*
* Set the rotation of data within the layer.
*
* Only available in exclusive or administrative mode.
*
* Any <b>rotation</b> other than 0 or 180 is not supported yet.
*
* No layer hardware feature usage, only rotated blitting yet.
*/
DFBResult (*SetRotation) (
IDirectFBDisplayLayer *thiz,
int rotation
);
) )
/* /*
* Flipping flags controlling the behaviour of IDirectFBSurface::Flip(). * Flipping flags controlling the behaviour of IDirectFBSurface::Flip().
*/ */
typedef enum { typedef enum {
DSFLIP_NONE = 0x00000000, /* None of these. */ DSFLIP_NONE = 0x00000000, /* None of these. */
DSFLIP_WAIT = 0x00000001, /* Flip() returns upon vertical syn c. Flipping is still done DSFLIP_WAIT = 0x00000001, /* Flip() returns upon vertical syn c. Flipping is still done
immediately unless DSFLIP_ONSYNC is specified, too. */ immediately unless DSFLIP_ONSYNC is specified, too. */
skipping to change at line 2844 skipping to change at line 3065
DSPD_SRC_ATOP = 9, /* fs: da fd: 1.0-sa */ DSPD_SRC_ATOP = 9, /* fs: da fd: 1.0-sa */
DSPD_DST_ATOP = 10, /* fs: 1.0-da fd: sa */ DSPD_DST_ATOP = 10, /* fs: 1.0-da fd: sa */
DSPD_ADD = 11, /* fs: 1.0 fd: 1.0 */ DSPD_ADD = 11, /* fs: 1.0 fd: 1.0 */
DSPD_XOR = 12, /* fs: 1.0-da fd: 1.0-sa */ DSPD_XOR = 12, /* fs: 1.0-da fd: 1.0-sa */
} DFBSurfacePorterDuffRule; } DFBSurfacePorterDuffRule;
/* /*
* Blend functions to use for source and destination blending * Blend functions to use for source and destination blending
*/ */
typedef enum { typedef enum {
DSBF_UNKNOWN = 0, /* */
DSBF_ZERO = 1, /* */ DSBF_ZERO = 1, /* */
DSBF_ONE = 2, /* */ DSBF_ONE = 2, /* */
DSBF_SRCCOLOR = 3, /* */ DSBF_SRCCOLOR = 3, /* */
DSBF_INVSRCCOLOR = 4, /* */ DSBF_INVSRCCOLOR = 4, /* */
DSBF_SRCALPHA = 5, /* */ DSBF_SRCALPHA = 5, /* */
DSBF_INVSRCALPHA = 6, /* */ DSBF_INVSRCALPHA = 6, /* */
DSBF_DESTALPHA = 7, /* */ DSBF_DESTALPHA = 7, /* */
DSBF_INVDESTALPHA = 8, /* */ DSBF_INVDESTALPHA = 8, /* */
DSBF_DESTCOLOR = 9, /* */ DSBF_DESTCOLOR = 9, /* */
DSBF_INVDESTCOLOR = 10, /* */ DSBF_INVDESTCOLOR = 10, /* */
skipping to change at line 2879 skipping to change at line 3101
/* /*
* Way of building triangles from the list of vertices. * Way of building triangles from the list of vertices.
*/ */
typedef enum { typedef enum {
DTTF_LIST, /* 0/1/2 3/4/5 6/7/8 ... */ DTTF_LIST, /* 0/1/2 3/4/5 6/7/8 ... */
DTTF_STRIP, /* 0/1/2 1/2/3 2/3/4 ... */ DTTF_STRIP, /* 0/1/2 1/2/3 2/3/4 ... */
DTTF_FAN /* 0/1/2 0/2/3 0/3/4 ... */ DTTF_FAN /* 0/1/2 0/2/3 0/3/4 ... */
} DFBTriangleFormation; } DFBTriangleFormation;
/*
* Flags controlling surface masks set via IDirectFBSurface::SetSourceMask(
).
*/
typedef enum {
DSMF_NONE = 0x00000000, /* None of these. */
DSMF_STENCIL = 0x00000001, /* Take <b>x</b> and <b>y</b> as fixed s
tart coordinates in the mask. */
DSMF_ALL = 0x00000001, /* All of these. */
} DFBSurfaceMaskFlags;
/******************** /********************
* IDirectFBSurface * * IDirectFBSurface *
********************/ ********************/
/* /*
* <i>No summary yet...</i> * <i>No summary yet...</i>
*/ */
DEFINE_INTERFACE( IDirectFBSurface, DEFINE_INTERFACE( IDirectFBSurface,
/** Retrieving information **/ /** Retrieving information **/
skipping to change at line 3377 skipping to change at line 3610
* Fill <b>num</b> spans with the given color following the * Fill <b>num</b> spans with the given color following the
* drawing flags. Each span is specified by a DFBSpan. * drawing flags. Each span is specified by a DFBSpan.
*/ */
DFBResult (*FillSpans) ( DFBResult (*FillSpans) (
IDirectFBSurface *thiz, IDirectFBSurface *thiz,
int y, int y,
const DFBSpan *spans, const DFBSpan *spans,
unsigned int num unsigned int num
); );
/*
* Fill a bunch of triangles with a single call.
*
* Fill <b>num</b> triangles with the current color following the
* drawing flags. Each triangle specified by a DFBTriangle.
*/
DFBResult (*FillTriangles) (
IDirectFBSurface *thiz,
const DFBTriangle *tris,
unsigned int num
);
/** Text functions **/ /** Text functions **/
/* /*
* Set the font used by DrawString() and DrawGlyph(). * Set the font used by DrawString() and DrawGlyph().
* You can pass NULL here to unset the font. * You can pass NULL here to unset the font.
*/ */
DFBResult (*SetFont) ( DFBResult (*SetFont) (
IDirectFBSurface *thiz, IDirectFBSurface *thiz,
IDirectFBFont *font IDirectFBFont *font
); );
skipping to change at line 3541 skipping to change at line 3786
* *
* A negative index means that the pixel will not be written. * A negative index means that the pixel will not be written.
* *
* Undefined indices will be treated like negative ones. * Undefined indices will be treated like negative ones.
*/ */
DFBResult (*SetIndexTranslation) ( DFBResult (*SetIndexTranslation) (
IDirectFBSurface *thiz, IDirectFBSurface *thiz,
const int *indices, const int *indices,
int num_indices int num_indices
); );
/** Rendering **/
/*
* Set options affecting the output of drawing and blitting operations
.
*
* None of these is mandatory and therefore unsupported flags will not
* cause a software fallback.
*/
DFBResult (*SetRenderOptions) (
IDirectFBSurface *thiz,
DFBSurfaceRenderOptions options
);
/** Drawing/blitting control **/
/*
* Set the transformation matrix.
*
* Enable usage of this matrix by setting DSRO_MATRIX via IDirectFBSur
face::SetRenderOptions().
*
* The matrix consists of 3x3 fixed point 16.16 values.
* The order in the array is from left to right and from top to bottom
.
*
* All drawing and blitting will be transformed:
*
* <pre>
* X' = (X * v0 + Y * v1 + v2) / (X * v6 + Y * v7 + v8)
* Y' = (X * v3 + Y * v4 + v5) / (X * v6 + Y * v7 + v8)
* </pre>
*/
DFBResult (*SetMatrix) (
IDirectFBSurface *thiz,
const s32 *matrix
);
/*
* Set the surface to be used as a mask for blitting.
*
* The <b>mask</b> applies when DSBLIT_SRC_MASK_ALPHA or DSBLIT_SRC_MA
SK_COLOR is used.
*
* Depending on the <b>flags</b> reading either starts at a fixed loca
tion in the mask with
* absolute <b>x</b> and <b>y</b>, or at the same location as in the s
ource, with <b>x</b>
* and <b>y</b> used as an offset.
*
* <i>Example with DSMF_STENCIL:</i>
* <pre>
* Blit from <b>19, 6</b> in the source
* and <b> 0, 0</b> in the mask (<b>x = 0, y = 0</b>)
* or <b>-5, 17</b> (<b>x = -5, y = 17</b>)
* or <b>23, 42</b> (<b>x = 23, y = 42</b>)
* </pre>
*
* <i>Example without:</i>
* <pre>
* Blit from <b>19, 6</b> in the source
* and <b>19, 6</b> in the mask (<b>x = 0, y = 0</b>)
* or <b>14, 23</b> (<b>x = -5, y = 17</b>)
* or <b>42, 48</b> (<b>x = 23, y = 42</b>)
* </pre>
*
* See also IDirectFBSurface::SetBlittingFlags().
*/
DFBResult (*SetSourceMask) (
IDirectFBSurface *thiz,
IDirectFBSurface *mask,
int x,
int y,
DFBSurfaceMaskFlags flags
);
) )
/******************** /********************
* IDirectFBPalette * * IDirectFBPalette *
********************/ ********************/
/* /*
* <i>No summary yet...</i> * <i>No summary yet...</i>
*/ */
DEFINE_INTERFACE( IDirectFBPalette, DEFINE_INTERFACE( IDirectFBPalette,
skipping to change at line 3621 skipping to change at line 3936
/** Clone **/ /** Clone **/
/* /*
* Create a copy of the palette. * Create a copy of the palette.
*/ */
DFBResult (*CreateCopy) ( DFBResult (*CreateCopy) (
IDirectFBPalette *thiz, IDirectFBPalette *thiz,
IDirectFBPalette **ret_interface IDirectFBPalette **ret_interface
); );
/** YUV Palette **/
/*
* Write entries to the palette.
*
* Writes the specified number of entries to the palette at the
* specified offset.
*/
DFBResult (*SetEntriesYUV) (
IDirectFBPalette *thiz,
const DFBColorYUV *entries,
unsigned int num_entries,
unsigned int offset
);
/*
* Read entries from the palette.
*
* Reads the specified number of entries from the palette at the
* specified offset.
*/
DFBResult (*GetEntriesYUV) (
IDirectFBPalette *thiz,
DFBColorYUV *ret_entries,
unsigned int num_entries,
unsigned int offset
);
/*
* Find the best matching entry.
*
* Searches the map for an entry which best matches the specified colo
r.
*/
DFBResult (*FindBestMatchYUV) (
IDirectFBPalette *thiz,
u8 y,
u8 u,
u8 v,
u8 a,
unsigned int *ret_index
);
) )
/* /*
* Specifies whether a key is currently down. * Specifies whether a key is currently down.
*/ */
typedef enum { typedef enum {
DIKS_UP = 0x00000000, /* key is not pressed */ DIKS_UP = 0x00000000, /* key is not pressed */
DIKS_DOWN = 0x00000001 /* key is pressed */ DIKS_DOWN = 0x00000001 /* key is pressed */
} DFBInputDeviceKeyState; } DFBInputDeviceKeyState;
skipping to change at line 3805 skipping to change at line 4162
) )
/* /*
* Event class. * Event class.
*/ */
typedef enum { typedef enum {
DFEC_NONE = 0x00, /* none of these */ DFEC_NONE = 0x00, /* none of these */
DFEC_INPUT = 0x01, /* raw input event */ DFEC_INPUT = 0x01, /* raw input event */
DFEC_WINDOW = 0x02, /* windowing event */ DFEC_WINDOW = 0x02, /* windowing event */
DFEC_USER = 0x03, /* custom event for the user of this lib rary */ DFEC_USER = 0x03, /* custom event for the user of this lib rary */
DFEC_UNIVERSAL = 0x04 /* universal event for custom usage with DFEC_UNIVERSAL = 0x04, /* universal event for custom usage with
variable size */ variable size */
DFEC_VIDEOPROVIDER = 0x05 /* video provider event */
} DFBEventClass; } DFBEventClass;
/* /*
* The type of an input event. * The type of an input event.
*/ */
typedef enum { typedef enum {
DIET_UNKNOWN = 0, /* unknown event */ DIET_UNKNOWN = 0, /* unknown event */
DIET_KEYPRESS, /* a key is been pressed */ DIET_KEYPRESS, /* a key is been pressed */
DIET_KEYRELEASE, /* a key is been released */ DIET_KEYRELEASE, /* a key is been released */
DIET_BUTTONPRESS, /* a (mouse) button is been pressed */ DIET_BUTTONPRESS, /* a (mouse) button is been pressed */
skipping to change at line 3943 skipping to change at line 4301
window has focus */ window has focus */
DWET_POSITION_SIZE = DWET_POSITION | DWET_SIZE,/* initially sent to DWET_POSITION_SIZE = DWET_POSITION | DWET_SIZE,/* initially sent to
window when it's window when it's
created */ created */
DWET_ALL = 0x003F033F /* all event types */ DWET_ALL = 0x003F033F /* all event types */
} DFBWindowEventType; } DFBWindowEventType;
/* /*
* Flags for a window event.
*/
typedef enum {
DWEF_NONE = 0x00000000, /* none of these */
DWEF_RETURNED = 0x00000001, /* This is a returned event, e.g. u
nconsumed key. */
DWEF_ALL = 0x00000001 /* all of these */
} DFBWindowEventFlags;
/*
* Video Provider Event Types - can also be used as flags for event filters
.
*/
typedef enum {
DVPET_NONE = 0x00000000,
DVPET_STARTED = 0x00000001, /* The video provider has started
the playback */
DVPET_STOPPED = 0x00000002, /* The video provider has stopped
the playback */
DVPET_SPEEDCHANGE = 0x00000004, /* A speed change has occured
*/
DVPET_STREAMCHANGE = 0x00000008, /* A stream description change has
occured */
DVPET_FATALERROR = 0x00000010, /* A fatal error has occured: rest
art must be done */
DVPET_FINISHED = 0x00000020, /* The video provider has finished
the playback */
DVPET_SURFACECHANGE = 0x00000040, /* A surface description change ha
s occured */
DVPET_FRAMEDECODED = 0x00000080, /* A frame has been decoded by the
decoder */
DVPET_FRAMEDISPLAYED = 0x00000100, /* A frame has been rendered to th
e output */
DVPET_DATAEXHAUSTED = 0x00000200, /* There is no more data available
for consumption */
DVPET_VIDEOACTION = 0x00000400, /* An action is required on the vi
deo provider */
DVPET_DATALOW = 0x00000800, /* The stream buffer is running lo
w in data (threshold defined by implementation). */
DVPET_DATAHIGH = 0x00001000, /* The stream buffer is high. */
DVPET_BUFFERTIMELOW = 0x00002000, /* The stream buffer has less than
requested playout time buffered. */
DVPET_BUFFERTIMEHIGH = 0x00004000, /* The stream buffer has more than
requested playout time buffered. */
DVPET_ALL = 0x00007FFF /* All event types */
} DFBVideoProviderEventType;
/*
* Event from the windowing system. * Event from the windowing system.
*/ */
typedef struct { typedef struct {
DFBEventClass clazz; /* clazz of event */ DFBEventClass clazz; /* clazz of event */
DFBWindowEventType type; /* type of event */ DFBWindowEventType type; /* type of event */
DFBWindowEventFlags flags; /* event flags */
DFBWindowID window_id; /* source of event */ DFBWindowID window_id; /* source of event */
/* used by DWET_MOVE, DWET_MOTION, DWET_BUTTONDOWN, DWET_BUTTONUP, /* used by DWET_MOVE, DWET_MOTION, DWET_BUTTONDOWN, DWET_BUTTONUP,
DWET_ENTER, DWET_LEAVE */ DWET_ENTER, DWET_LEAVE */
int x; /* x position of window int x; /* x position of window
or coordinate within or coordinate within
window */ window */
int y; /* y position of window int y; /* y position of window
or coordinate within or coordinate within
window */ window */
skipping to change at line 3996 skipping to change at line 4390
DFBInputDeviceButtonIdentifier button; /* button being DFBInputDeviceButtonIdentifier button; /* button being
pressed or released */ pressed or released */
/* used by DWET_MOTION, DWET_BUTTONDOWN, DWET_BUTTONUP */ /* used by DWET_MOTION, DWET_BUTTONDOWN, DWET_BUTTONUP */
DFBInputDeviceButtonMask buttons; /* mask of currently DFBInputDeviceButtonMask buttons; /* mask of currently
pressed buttons */ pressed buttons */
struct timeval timestamp; /* always set */ struct timeval timestamp; /* always set */
} DFBWindowEvent; } DFBWindowEvent;
/* /*
* Video Provider Event Types - can also be used as flags for event filters
.
*/
typedef enum {
DVPEDST_UNKNOWN = 0x00000000, /* Event is valid for unknown Data
*/
DVPEDST_AUDIO = 0x00000001, /* Event is valid for Audio Data
*/
DVPEDST_VIDEO = 0x00000002, /* Event is valid for Video Data
*/
DVPEDST_DATA = 0x00000004, /* Event is valid for Data types
*/
DVPEDST_ALL = 0x00000007, /* Event is valid for all Data type
s */
} DFBVideoProviderEventDataSubType;
/*
* Event from the video provider
*/
typedef struct {
DFBEventClass clazz; /* clazz of event */
DFBVideoProviderEventType type; /* type of event */
DFBVideoProviderEventDataSubType data_type; /* data type that this ev
ent is applicable for. */
int data[4]; /* custom data - large en
ough for 4 ints so that in most cases
memory allocation will
not be needed */
} DFBVideoProviderEvent;
/*
* Event for usage by the user of this library. * Event for usage by the user of this library.
*/ */
typedef struct { typedef struct {
DFBEventClass clazz; /* clazz of event */ DFBEventClass clazz; /* clazz of event */
unsigned int type; /* custom type */ unsigned int type; /* custom type */
void *data; /* custom data */ void *data; /* custom data */
} DFBUserEvent; } DFBUserEvent;
/* /*
skipping to change at line 4020 skipping to change at line 4439
unsigned int size; /* size of this event, min imum is sizeof(DFBUniversalEvent), unsigned int size; /* size of this event, min imum is sizeof(DFBUniversalEvent),
e.g. 8 bytes (on 32bit architectures) */ e.g. 8 bytes (on 32bit architectures) */
/* custom data follows, size of this data is 'size' - sizeof(DFBUniver salEvent) */ /* custom data follows, size of this data is 'size' - sizeof(DFBUniver salEvent) */
} DFBUniversalEvent; } DFBUniversalEvent;
/* /*
* General container for a DirectFB Event. * General container for a DirectFB Event.
*/ */
typedef union { typedef union {
DFBEventClass clazz; /* clazz of event */ DFBEventClass clazz; /* clazz of event */
DFBInputEvent input; /* field for input events DFBInputEvent input; /* field for input even
*/ ts */
DFBWindowEvent window; /* field for window event DFBWindowEvent window; /* field for window eve
s */ nts */
DFBUserEvent user; /* field for user-defined DFBUserEvent user; /* field for user-defin
events */ ed events */
DFBUniversalEvent universal; /* field for universal ev DFBUniversalEvent universal; /* field for universal
ents */ events */
DFBVideoProviderEvent videoprovider; /* field for video prov
ider */
} DFBEvent; } DFBEvent;
#define DFB_EVENT(e) ((DFBEvent *) (e)) #define DFB_EVENT(e) ((DFBEvent *) (e))
/* /*
* Statistics about event buffer queue. * Statistics about event buffer queue.
*/ */
typedef struct { typedef struct {
unsigned int num_events; /* Total number of events in t he queue. */ unsigned int num_events; /* Total number of events in t he queue. */
unsigned int DFEC_INPUT; /* Number of input events. */ unsigned int DFEC_INPUT; /* Number of input events. */
unsigned int DFEC_WINDOW; /* Number of window events. */ unsigned int DFEC_WINDOW; /* Number of window events. */
unsigned int DFEC_USER; /* Number of user events. */ unsigned int DFEC_USER; /* Number of user events. */
unsigned int DFEC_UNIVERSAL; /* Number of universal events. */ unsigned int DFEC_UNIVERSAL; /* Number of universal events. */
unsigned int DFEC_VIDEOPROVIDER; /* Number of universal events. */
unsigned int DIET_KEYPRESS; unsigned int DIET_KEYPRESS;
unsigned int DIET_KEYRELEASE; unsigned int DIET_KEYRELEASE;
unsigned int DIET_BUTTONPRESS; unsigned int DIET_BUTTONPRESS;
unsigned int DIET_BUTTONRELEASE; unsigned int DIET_BUTTONRELEASE;
unsigned int DIET_AXISMOTION; unsigned int DIET_AXISMOTION;
unsigned int DWET_POSITION; unsigned int DWET_POSITION;
unsigned int DWET_SIZE; unsigned int DWET_SIZE;
unsigned int DWET_CLOSE; unsigned int DWET_CLOSE;
skipping to change at line 4061 skipping to change at line 4482
unsigned int DWET_LOSTFOCUS; unsigned int DWET_LOSTFOCUS;
unsigned int DWET_KEYDOWN; unsigned int DWET_KEYDOWN;
unsigned int DWET_KEYUP; unsigned int DWET_KEYUP;
unsigned int DWET_BUTTONDOWN; unsigned int DWET_BUTTONDOWN;
unsigned int DWET_BUTTONUP; unsigned int DWET_BUTTONUP;
unsigned int DWET_MOTION; unsigned int DWET_MOTION;
unsigned int DWET_ENTER; unsigned int DWET_ENTER;
unsigned int DWET_LEAVE; unsigned int DWET_LEAVE;
unsigned int DWET_WHEEL; unsigned int DWET_WHEEL;
unsigned int DWET_POSITION_SIZE; unsigned int DWET_POSITION_SIZE;
unsigned int DVPET_STARTED;
unsigned int DVPET_STOPPED;
unsigned int DVPET_SPEEDCHANGE;
unsigned int DVPET_STREAMCHANGE;
unsigned int DVPET_FATALERROR;
unsigned int DVPET_FINISHED;
unsigned int DVPET_SURFACECHANGE;
unsigned int DVPET_FRAMEDECODED;
unsigned int DVPET_FRAMEDISPLAYED;
unsigned int DVPET_DATAEXHAUSTED;
unsigned int DVPET_DATALOW;
unsigned int DVPET_VIDEOACTION;
unsigned int DVPET_DATAHIGH;
unsigned int DVPET_BUFFERTIMELOW;
unsigned int DVPET_BUFFERTIMEHIGH;
} DFBEventBufferStats; } DFBEventBufferStats;
/************************ /************************
* IDirectFBEventBuffer * * IDirectFBEventBuffer *
************************/ ************************/
/* /*
* <i>No summary yet...</i> * <i>No summary yet...</i>
*/ */
DEFINE_INTERFACE( IDirectFBEventBuffer, DEFINE_INTERFACE( IDirectFBEventBuffer,
skipping to change at line 4193 skipping to change at line 4630
/* /*
* Query collected event buffer statistics. * Query collected event buffer statistics.
*/ */
DFBResult (*GetStatistics) ( DFBResult (*GetStatistics) (
IDirectFBEventBuffer *thiz, IDirectFBEventBuffer *thiz,
DFBEventBufferStats *ret_stats DFBEventBufferStats *ret_stats
); );
) )
/* /*
* Flags controlling the appearance and behaviour of the window. * The key selection defines a mode for filtering keys while the window is having the focus.
*/ */
typedef enum { typedef enum {
DWOP_NONE = 0x00000000, /* none of these */ DWKS_ALL = 0x00000000, /* Select all keys (default). */
DWOP_COLORKEYING = 0x00000001, /* enable color key */ DWKS_NONE = 0x00000001, /* Don't select any key. */
DWOP_ALPHACHANNEL = 0x00000002, /* enable alpha blending using the DWKS_LIST = 0x00000002 /* Select a list of keys. */
window's alpha channel */ } DFBWindowKeySelection;
DWOP_OPAQUE_REGION = 0x00000004, /* overrides DWOP_ALPHACHANNEL for
the
region set by SetOpaqueRegion()
*/
DWOP_SHAPED = 0x00000008, /* window doesn't receive mouse eve
nts for
invisible regions, must be used
with
DWOP_ALPHACHANNEL or DWOP_COLORK
EYING */
DWOP_KEEP_POSITION = 0x00000010, /* window can't be moved
with the mouse */
DWOP_KEEP_SIZE = 0x00000020, /* window can't be resized
with the mouse */
DWOP_KEEP_STACKING = 0x00000040, /* window can't be raised
or lowered with the mouse */
DWOP_GHOST = 0x00001000, /* never get focus or input,
clicks will go through,
implies DWOP_KEEP... */
DWOP_INDESTRUCTIBLE = 0x00002000, /* window can't be destroyed
by internal shortcut */
DWOP_SCALE = 0x00010000, /* Surface won't be changed if wind
ow size on screen changes. The surface
can be resized separately using
IDirectFBWindow::ResizeSurface(). */
DWOP_ALL = 0x0001307F /* all possible options */
} DFBWindowOptions;
/*
* The stacking class restricts the stacking order of windows.
*/
typedef enum { typedef enum {
DWSC_MIDDLE = 0x00000000, /* This is the default stacking DWGM_DEFAULT = 0x00000000, /* Use default values. */
class of new windows. */ DWGM_FOLLOW = 0x00000001, /* Use values of parent window. */
DWSC_UPPER = 0x00000001, /* Window is always above windows DWGM_RECTANGLE = 0x00000002, /* Use pixel values as defined. */
in the middle stacking class. DWGM_LOCATION = 0x00000003 /* Use relative values as defined.
Only windows that are also in */
the upper stacking class can } DFBWindowGeometryMode;
get above them. */
DWSC_LOWER = 0x00000002 /* Window is always below windows typedef struct {
in the middle stacking class. DFBWindowGeometryMode mode;
Only windows that are also in
the lower stacking class can DFBRectangle rectangle;
get below them. */ DFBLocation location;
} DFBWindowStackingClass; } DFBWindowGeometry;
/******************* /*******************
* IDirectFBWindow * * IDirectFBWindow *
*******************/ *******************/
/* /*
* <i>No summary yet...</i> * <i>No summary yet...</i>
*/ */
DEFINE_INTERFACE( IDirectFBWindow, DEFINE_INTERFACE( IDirectFBWindow,
skipping to change at line 4660 skipping to change at line 5073
* Resize the surface of a scalable window. * Resize the surface of a scalable window.
* *
* This requires the option DWOP_SCALE. * This requires the option DWOP_SCALE.
* See IDirectFBWindow::SetOptions(). * See IDirectFBWindow::SetOptions().
*/ */
DFBResult (*ResizeSurface) ( DFBResult (*ResizeSurface) (
IDirectFBWindow *thiz, IDirectFBWindow *thiz,
int width, int width,
int height int height
); );
/** Binding **/
/*
* Bind a window at the specified position of this window.
*
* After binding, bound window will be automatically moved
* when this window moves to a new position.<br>
* Binding the same window to multiple windows is not supported.
* Subsequent call to Bind() automatically unbounds the bound window
* before binding it again.<br>
* To move the bound window to a new position call Bind() again
* with the new coordinates.
*/
DFBResult (*Bind) (
IDirectFBWindow *thiz,
IDirectFBWindow *window,
int x,
int y
);
/*
* Unbind a window from this window.
*/
DFBResult (*Unbind) (
IDirectFBWindow *thiz,
IDirectFBWindow *window
);
/** Key selection **/
/*
* Selects a mode for filtering keys while being focused.
*
* The <b>selection</b> defines whether all, none or a specific set (l
ist) of keys is selected.
* In case of a specific set, the <b>keys</b> array with <b>num_keys</
b> has to be provided.
*
* Multiple calls to this method are possible. Each overrides all sett
ings from the previous call.
*/
DFBResult (*SetKeySelection) (
IDirectFBWindow *thiz,
DFBWindowKeySelection selection,
const DFBInputDeviceKeySymbol *keys,
unsigned int num_keys
);
/*
* Grab all unselected (filtered out) keys.
*
* Unselected keys are those not selected by the focused window. These
keys won't be sent
* to that window. Instead one window in the stack can collect them.
*
* See also IDirectFBWindow::UngrabUnselectedKeys() and IDirectFBWindo
w::SetKeySelection().
*/
DFBResult (*GrabUnselectedKeys) (
IDirectFBWindow *thiz
);
/*
* Release the grab of unselected (filtered out) keys.
*
* See also IDirectFBWindow::GrabUnselectedKeys() and IDirectFBWindow:
:SetKeySelection().
*/
DFBResult (*UngrabUnselectedKeys) (
IDirectFBWindow *thiz
);
/** Advanced Geometry **/
/*
* Set area of surface to be shown in window.
*
* Default and maximum is to show whole surface.
*/
DFBResult (*SetSrcGeometry) (
IDirectFBWindow *thiz,
const DFBWindowGeometry *geometry
);
/*
* Set destination location of window within its bounds.
*
* Default and maximum is to fill whole bounds.
*/
DFBResult (*SetDstGeometry) (
IDirectFBWindow *thiz,
const DFBWindowGeometry *geometry
);
) )
/* /*
* Called for each provided text encoding. * Called for each provided text encoding.
*/ */
typedef DFBEnumerationResult (*DFBTextEncodingCallback) ( typedef DFBEnumerationResult (*DFBTextEncodingCallback) (
DFBTextEncodingID encoding_id, DFBTextEncodingID encoding_id,
const char *name, const char *name,
void *context void *context
); );
skipping to change at line 4986 skipping to change at line 5487
* Capabilities of an audio/video stream. * Capabilities of an audio/video stream.
*/ */
typedef enum { typedef enum {
DVSCAPS_NONE = 0x00000000, /* None of these. */ DVSCAPS_NONE = 0x00000000, /* None of these. */
DVSCAPS_VIDEO = 0x00000001, /* Stream contains video. */ DVSCAPS_VIDEO = 0x00000001, /* Stream contains video. */
DVSCAPS_AUDIO = 0x00000002 /* Stream contains audio. */ DVSCAPS_AUDIO = 0x00000002 /* Stream contains audio. */
/* DVSCAPS_SUBPICTURE ?! */ /* DVSCAPS_SUBPICTURE ?! */
} DFBStreamCapabilities; } DFBStreamCapabilities;
#define DFB_STREAM_DESC_ENCODING_LENGTH 30 #define DFB_STREAM_DESC_ENCODING_LENGTH 30
#define DFB_STREAM_DESC_TITLE_LENGTH 255 #define DFB_STREAM_DESC_TITLE_LENGTH 255
#define DFB_STREAM_DESC_AUTHOR_LENGTH 255 #define DFB_STREAM_DESC_AUTHOR_LENGTH 255
#define DFB_STREAM_DESC_ALBUM_LENGTH 255 #define DFB_STREAM_DESC_ALBUM_LENGTH 255
#define DFB_STREAM_DESC_GENRE_LENGTH 32 #define DFB_STREAM_DESC_GENRE_LENGTH 32
#define DFB_STREAM_DESC_COMMENT_LENGTH 255 #define DFB_STREAM_DESC_COMMENT_LENGTH 255
/* /*
* Informations about an audio/video stream. * Informations about an audio/video stream.
*/ */
typedef struct { typedef struct {
DFBStreamCapabilities caps; /* capabilities */ DFBStreamCapabilities caps; /* capabilities */
struct { struct {
char encoding[DFB_STREAM_DESC_ENCODING_LENGTH]; /* char encoding[DFB_STREAM_DESC_ENCODING_LENGTH]; /* e
encoding (e.g. "MPEG4") ncoding (e.g. "MPEG4") */
*/ double framerate; /* number of frames per second */
double framerate; /* number of frames per second double aspect; /* frame aspect ratio */
*/ int bitrate; /* amount of bits per second */
double aspect; /* frame aspect ratio int afd; /* Active Format Descriptor */
*/ int width; /* Width as reported by Sequence H
int bitrate; /* amount of bits per second eader */
*/ int height; /* Height as reported by Sequence
} Header */
video; } video; /* struct containing the above en
coding properties for video */
struct { struct {
char encoding[DFB_STREAM_DESC_ENCODING_LENGTH]; /* char encoding[DFB_STREAM_DESC_ENCODING_LENGTH]; /* e
encoding (e.g. "AAC") ncoding (e.g. "AAC") */
*/ int samplerate; /* number of samples per second *
int samplerate; /* number of samples per second /
*/ int channels; /* number of channels per sample
int channels; /* number of channels per sample */
*/ int bitrate; /* amount of bits per second */
int bitrate; /* amount of bits per second } audio; /* struct containing the above fo
*/ ur encoding properties for audio */
}
audio;
char title[DFB_STREAM_DESC_TITLE_LENGTH]; /* tit le */ char title[DFB_STREAM_DESC_TITLE_LENGTH]; /* tit le */
char author[DFB_STREAM_DESC_AUTHOR_LENGTH]; /* aut hor */ char author[DFB_STREAM_DESC_AUTHOR_LENGTH]; /* aut hor */
char album[DFB_STREAM_DESC_ALBUM_LENGTH]; /* alb um */ char album[DFB_STREAM_DESC_ALBUM_LENGTH]; /* alb um */
short year; /* yea r */ short year; /* yea r */
char genre[DFB_STREAM_DESC_GENRE_LENGTH]; /* gen re */ char genre[DFB_STREAM_DESC_GENRE_LENGTH]; /* gen re */
char comment[DFB_STREAM_DESC_COMMENT_LENGTH]; /* com ment */ char comment[DFB_STREAM_DESC_COMMENT_LENGTH]; /* com ment */
} DFBStreamDescription; } DFBStreamDescription;
/* /*
* Type of an audio stream.
*/
typedef enum {
DSF_ES = 0x00000000, /* ES. */
DSF_PES = 0x00000001, /* PES. */
} DFBStreamFormat;
/*
* Stream attributes for an audio/video stream.
*/
typedef struct {
struct {
char encoding[DFB_STREAM_DESC_ENCODING_LENGTH]; /* enc
oding (e.g. "MPEG4") */
DFBStreamFormat format; /* for
mat of the video stream */
} video; /* struct containing the above two
encoding properties for video */
struct {
char encoding[DFB_STREAM_DESC_ENCODING_LENGTH]; /* enc
oding (e.g. "AAC") */
DFBStreamFormat format; /* for
mat of the audio stream */
} audio; /* struct containing the above two
encoding properties for audio */
} DFBStreamAttributes;
/*
* Buffer levels and occupancy for Audio/Video input buffers.
*/
typedef struct {
DFBStreamCapabilities valid; /* Which of the Audio / Video sect
ions are valid. */
struct {
unsigned int buffer_size; /* Size in bytes of the input buff
er to video decoder */
unsigned int minimum_level; /* The level at which a DVPET_DATA
LOW event will be generated. */
unsigned int maximum_level; /* The level at which a DVPET_DATA
HIGH event will be generated. */
unsigned int current_level; /* Current fill level of video inp
ut buffer.*/
} video;
struct {
unsigned int buffer_size; /* Size in bytes of the input buff
er to audio decoder */
unsigned int minimum_level; /* The level at which a DVPET_DATA
LOW event will be generated. */
unsigned int maximum_level; /* The level at which a DVPET_DATA
HIGH event will be generated. */
unsigned int current_level; /* Current fill level of audio inp
ut buffer.*/
} audio;
} DFBBufferOccupancy;
/*
* Buffer thresholds for Audio and Video.
*/
typedef struct {
DFBStreamCapabilities selection; /* Which of the Audio / Video are
we setting? */
struct {
unsigned int minimum_level; /* The level at which a DVPET_DATA
LOW event will be generated. */
unsigned int maximum_level; /* The level at which a DVPET_DATA
HIGH event will be generated. */
unsigned int minimum_time; /* The level at which a DVPET_BUFF
ERTIMELOW event will be generated. */
unsigned int maximum_time; /* The level at which a DVPET_BUFF
ERTIMEHIGH event will be generated. */
} video;
struct {
unsigned int minimum_level; /* The level at which a DVPET_DATA
LOW event will be generated. */
unsigned int maximum_level; /* The level at which a DVPET_DATA
HIGH event will be generated. */
unsigned int minimum_time; /* The level at which a DVPET_BUFF
ERTIMELOW event will be generated. */
unsigned int maximum_time; /* The level at which a DVPET_BUFF
ERTIMEHIGH event will be generated. */
} audio;
} DFBBufferThresholds;
/*
* Called for each written frame. * Called for each written frame.
*/ */
typedef void (*DVFrameCallback)(void *ctx); typedef void (*DVFrameCallback)(void *ctx);
/************************** /**************************
* IDirectFBVideoProvider * * IDirectFBVideoProvider *
**************************/ **************************/
/* /*
* <i>No summary yet...</i> * <i>No summary yet...</i>
skipping to change at line 5212 skipping to change at line 5782
float level float level
); );
/* /*
* Get volume level. * Get volume level.
*/ */
DFBResult (*GetVolume) ( DFBResult (*GetVolume) (
IDirectFBVideoProvider *thiz, IDirectFBVideoProvider *thiz,
float *ret_level float *ret_level
); );
/*
* Set the stream attributes.
* May have a wrapper with different media types types encapsulated.
* Can use this method to indicate the content type.
*/
DFBResult (*SetStreamAttributes) (
IDirectFBVideoProvider *thiz,
DFBStreamAttributes attr
);
/*
* Set the audio units that are being used for output.
* May have multiple audio outputs and need to configure them on/off
* dynamically.
*/
DFBResult (*SetAudioOutputs) (
IDirectFBVideoProvider *thiz,
DFBVideoProviderAudioUnits *audioUnits
);
/*
* Get the audio units that are being used for output.
*/
DFBResult (*GetAudioOutputs) (
IDirectFBVideoProvider *thiz,
DFBVideoProviderAudioUnits *audioUnits
);
/*
* Set the audio delay
*
* The parameter is in microseconds. Values < 0 make audio earlier, >
0 make audio later.
*/
DFBResult (*SetAudioDelay) (
IDirectFBVideoProvider *thiz,
long delay
);
/** Event buffers **/
/*
* Create an event buffer for this video provider and attach it.
*/
DFBResult (*CreateEventBuffer) (
IDirectFBVideoProvider *thiz,
IDirectFBEventBuffer **ret_buffer
);
/*
* Attach an existing event buffer to this video provider.
*
* NOTE: Attaching multiple times generates multiple events.
*/
DFBResult (*AttachEventBuffer) (
IDirectFBVideoProvider *thiz,
IDirectFBEventBuffer *buffer
);
/*
* Enable specific events to be sent from the video provider.
*
* The argument is a mask of events that will be set in the
* videoproviders's event mask. The default event mask is DVPET_ALL.
*/
DFBResult (*EnableEvents) (
IDirectFBVideoProvider *thiz,
DFBVideoProviderEventType mask
);
/*
* Disable specific events from being sent from the video provider
*
* The argument is a mask of events that will be cleared in
* the video providers's event mask. The default event mask is DWET_AL
L.
*/
DFBResult (*DisableEvents) (
IDirectFBVideoProvider *thiz,
DFBVideoProviderEventType mask
);
/*
* Detach an event buffer from this video provider.
*/
DFBResult (*DetachEventBuffer) (
IDirectFBVideoProvider *thiz,
IDirectFBEventBuffer *buffer
);
/** Buffer control **/
/*
* Get buffer occupancy (A/V) when playing this stream.
*/
DFBResult (*GetBufferOccupancy) (
IDirectFBVideoProvider *thiz,
DFBBufferOccupancy *ret_occ
);
/*
* Set buffer thresholds for the Audio / Video playback.
*/
DFBResult (*SetBufferThresholds) (
IDirectFBVideoProvider *thiz,
DFBBufferThresholds thresh
);
/*
* Get buffer thresholds for the Audio / Video playback.
*/
DFBResult (*GetBufferThresholds) (
IDirectFBVideoProvider *thiz,
DFBBufferThresholds *ret_thresh
);
) )
/*********************** /***********************
* IDirectFBDataBuffer * * IDirectFBDataBuffer *
***********************/ ***********************/
/* /*
* <i>No summary yet...</i> * <i>No summary yet...</i>
*/ */
DEFINE_INTERFACE( IDirectFBDataBuffer, DEFINE_INTERFACE( IDirectFBDataBuffer,
 End of changes. 82 change blocks. 
191 lines changed or deleted 1006 lines changed or added


 directfb_keyboard.h   directfb_keyboard.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 directfb_strings.h   directfb_strings.h 
skipping to change at line 36 skipping to change at line 36
{ DSPF_ARGB4444, "ARGB4444" }, \ { DSPF_ARGB4444, "ARGB4444" }, \
{ DSPF_NV21, "NV21" }, \ { DSPF_NV21, "NV21" }, \
{ DSPF_AYUV, "AYUV" }, \ { DSPF_AYUV, "AYUV" }, \
{ DSPF_A4, "A4" }, \ { DSPF_A4, "A4" }, \
{ DSPF_ARGB1666, "ARGB1666" }, \ { DSPF_ARGB1666, "ARGB1666" }, \
{ DSPF_ARGB6666, "ARGB6666" }, \ { DSPF_ARGB6666, "ARGB6666" }, \
{ DSPF_RGB18, "RGB18" }, \ { DSPF_RGB18, "RGB18" }, \
{ DSPF_LUT2, "LUT2" }, \ { DSPF_LUT2, "LUT2" }, \
{ DSPF_RGB444, "RGB444" }, \ { DSPF_RGB444, "RGB444" }, \
{ DSPF_RGB555, "RGB555" }, \ { DSPF_RGB555, "RGB555" }, \
{ DSPF_BGR555, "BGR555" }, \
{ DSPF_UNKNOWN, "UNKNOWN" } \ { DSPF_UNKNOWN, "UNKNOWN" } \
}; };
#define DirectFBInputDeviceTypeFlagsNames(Identifier) struct DFBInputDevice TypeFlagsName { \ #define DirectFBInputDeviceTypeFlagsNames(Identifier) struct DFBInputDevice TypeFlagsName { \
DFBInputDeviceTypeFlags type; \ DFBInputDeviceTypeFlags type; \
const char *name; \ const char *name; \
} Identifier[] = { \ } Identifier[] = { \
{ DIDTF_KEYBOARD, "KEYBOARD" }, \ { DIDTF_KEYBOARD, "KEYBOARD" }, \
{ DIDTF_MOUSE, "MOUSE" }, \ { DIDTF_MOUSE, "MOUSE" }, \
{ DIDTF_JOYSTICK, "JOYSTICK" }, \ { DIDTF_JOYSTICK, "JOYSTICK" }, \
skipping to change at line 80 skipping to change at line 81
{ DSBLIT_COLORIZE, "COLORIZE" }, \ { DSBLIT_COLORIZE, "COLORIZE" }, \
{ DSBLIT_SRC_COLORKEY, "SRC_COLORKEY" }, \ { DSBLIT_SRC_COLORKEY, "SRC_COLORKEY" }, \
{ DSBLIT_DST_COLORKEY, "DST_COLORKEY" }, \ { DSBLIT_DST_COLORKEY, "DST_COLORKEY" }, \
{ DSBLIT_SRC_PREMULTIPLY, "SRC_PREMULTIPLY" }, \ { DSBLIT_SRC_PREMULTIPLY, "SRC_PREMULTIPLY" }, \
{ DSBLIT_DST_PREMULTIPLY, "DST_PREMULTIPLY" }, \ { DSBLIT_DST_PREMULTIPLY, "DST_PREMULTIPLY" }, \
{ DSBLIT_DEMULTIPLY, "DEMULTIPLY" }, \ { DSBLIT_DEMULTIPLY, "DEMULTIPLY" }, \
{ DSBLIT_DEINTERLACE, "DEINTERLACE" }, \ { DSBLIT_DEINTERLACE, "DEINTERLACE" }, \
{ DSBLIT_SRC_PREMULTCOLOR, "SRC_PREMULTCOLOR" }, \ { DSBLIT_SRC_PREMULTCOLOR, "SRC_PREMULTCOLOR" }, \
{ DSBLIT_XOR, "XOR" }, \ { DSBLIT_XOR, "XOR" }, \
{ DSBLIT_INDEX_TRANSLATION, "INDEX_TRANSLATION" }, \ { DSBLIT_INDEX_TRANSLATION, "INDEX_TRANSLATION" }, \
{ DSBLIT_ROTATE180, "ROTATE180" }, \
{ DSBLIT_COLORKEY_PROTECT, "COLORKEY_PROTECT" }, \
{ DSBLIT_SRC_MASK_ALPHA, "SRC_MASK_ALPHA" }, \
{ DSBLIT_SRC_MASK_COLOR, "SRC_MASK_COLOR" }, \
{ DSBLIT_NOFX, "NOFX" } \ { DSBLIT_NOFX, "NOFX" } \
}; };
#define DirectFBSurfaceBlendFunctionNames(Identifier) struct DFBSurfaceBlen
dFunctionName { \
DFBSurfaceBlendFunction function; \
const char *name; \
} Identifier[] = { \
{ DSBF_ZERO, "ZERO" }, \
{ DSBF_ONE, "ONE" }, \
{ DSBF_SRCCOLOR, "SRCCOLOR" }, \
{ DSBF_INVSRCCOLOR, "INVSRCCOLOR" }, \
{ DSBF_SRCALPHA, "SRCALPHA" }, \
{ DSBF_INVSRCALPHA, "INVSRCALPHA" }, \
{ DSBF_DESTALPHA, "DESTALPHA" }, \
{ DSBF_INVDESTALPHA, "INVDESTALPHA" }, \
{ DSBF_DESTCOLOR, "DESTCOLOR" }, \
{ DSBF_INVDESTCOLOR, "INVDESTCOLOR" }, \
{ DSBF_SRCALPHASAT, "SRCALPHASAT" }, \
{ DSBF_UNKNOWN, "UNKNOWN" } \
};
#define DirectFBInputDeviceCapabilitiesNames(Identifier) struct DFBInputDev iceCapabilitiesName { \ #define DirectFBInputDeviceCapabilitiesNames(Identifier) struct DFBInputDev iceCapabilitiesName { \
DFBInputDeviceCapabilities capability; \ DFBInputDeviceCapabilities capability; \
const char *name; \ const char *name; \
} Identifier[] = { \ } Identifier[] = { \
{ DICAPS_KEYS, "KEYS" }, \ { DICAPS_KEYS, "KEYS" }, \
{ DICAPS_AXES, "AXES" }, \ { DICAPS_AXES, "AXES" }, \
{ DICAPS_BUTTONS, "BUTTONS" }, \ { DICAPS_BUTTONS, "BUTTONS" }, \
{ DICAPS_NONE, "NONE" } \ { DICAPS_NONE, "NONE" } \
}; };
skipping to change at line 165 skipping to change at line 188
#define DirectFBScreenEncoderCapabilitiesNames(Identifier) struct DFBScreen EncoderCapabilitiesName { \ #define DirectFBScreenEncoderCapabilitiesNames(Identifier) struct DFBScreen EncoderCapabilitiesName { \
DFBScreenEncoderCapabilities capability; \ DFBScreenEncoderCapabilities capability; \
const char *name; \ const char *name; \
} Identifier[] = { \ } Identifier[] = { \
{ DSECAPS_TV_STANDARDS, "TV_STANDARDS" }, \ { DSECAPS_TV_STANDARDS, "TV_STANDARDS" }, \
{ DSECAPS_TEST_PICTURE, "TEST_PICTURE" }, \ { DSECAPS_TEST_PICTURE, "TEST_PICTURE" }, \
{ DSECAPS_MIXER_SEL, "MIXER_SEL" }, \ { DSECAPS_MIXER_SEL, "MIXER_SEL" }, \
{ DSECAPS_OUT_SIGNALS, "OUT_SIGNALS" }, \ { DSECAPS_OUT_SIGNALS, "OUT_SIGNALS" }, \
{ DSECAPS_SCANMODE, "SCANMODE" }, \ { DSECAPS_SCANMODE, "SCANMODE" }, \
{ DSECAPS_FREQUENCY, "FREQUENCY" }, \
{ DSECAPS_BRIGHTNESS, "BRIGHTNESS" }, \ { DSECAPS_BRIGHTNESS, "BRIGHTNESS" }, \
{ DSECAPS_CONTRAST, "CONTRAST" }, \ { DSECAPS_CONTRAST, "CONTRAST" }, \
{ DSECAPS_HUE, "HUE" }, \ { DSECAPS_HUE, "HUE" }, \
{ DSECAPS_SATURATION, "SATURATION" }, \ { DSECAPS_SATURATION, "SATURATION" }, \
{ DSECAPS_CONNECTORS, "CONNECTORS" }, \ { DSECAPS_CONNECTORS, "CONNECTORS" }, \
{ DSECAPS_SLOW_BLANKING, "SLOW_BLANKING" }, \ { DSECAPS_SLOW_BLANKING, "SLOW_BLANKING" }, \
{ DSECAPS_RESOLUTION, "RESOLUTION" }, \
{ DSECAPS_NONE, "NONE" } \ { DSECAPS_NONE, "NONE" } \
}; };
#define DirectFBScreenEncoderTypeNames(Identifier) struct DFBScreenEncoderT ypeName { \ #define DirectFBScreenEncoderTypeNames(Identifier) struct DFBScreenEncoderT ypeName { \
DFBScreenEncoderType type; \ DFBScreenEncoderType type; \
const char *name; \ const char *name; \
} Identifier[] = { \ } Identifier[] = { \
{ DSET_CRTC, "CRTC" }, \ { DSET_CRTC, "CRTC" }, \
{ DSET_TV, "TV" }, \ { DSET_TV, "TV" }, \
{ DSET_DIGITAL, "DIGITAL" }, \
{ DSET_UNKNOWN, "UNKNOWN" } \ { DSET_UNKNOWN, "UNKNOWN" } \
}; };
#define DirectFBScreenEncoderTVStandardsNames(Identifier) struct DFBScreenE ncoderTVStandardsName { \ #define DirectFBScreenEncoderTVStandardsNames(Identifier) struct DFBScreenE ncoderTVStandardsName { \
DFBScreenEncoderTVStandards standard; \ DFBScreenEncoderTVStandards standard; \
const char *name; \ const char *name; \
} Identifier[] = { \ } Identifier[] = { \
{ DSETV_PAL, "PAL" }, \ { DSETV_PAL, "PAL" }, \
{ DSETV_NTSC, "NTSC" }, \ { DSETV_NTSC, "NTSC" }, \
{ DSETV_SECAM, "SECAM" }, \ { DSETV_SECAM, "SECAM" }, \
{ DSETV_PAL_60, "PAL_60" }, \ { DSETV_PAL_60, "PAL_60" }, \
{ DSETV_PAL_BG, "PAL_BG" }, \
{ DSETV_PAL_I, "PAL_I" }, \
{ DSETV_PAL_M, "PAL_M" }, \
{ DSETV_PAL_N, "PAL_N" }, \
{ DSETV_PAL_NC, "PAL_NC" }, \
{ DSETV_NTSC_M_JPN, "NTSC_M_JPN" }, \
{ DSETV_DIGITAL, "DIGITAL" }, \
{ DSETV_UNKNOWN, "UNKNOWN" } \ { DSETV_UNKNOWN, "UNKNOWN" } \
}; };
#define DirectFBScreenOutputCapabilitiesNames(Identifier) struct DFBScreenO utputCapabilitiesName { \ #define DirectFBScreenOutputCapabilitiesNames(Identifier) struct DFBScreenO utputCapabilitiesName { \
DFBScreenOutputCapabilities capability; \ DFBScreenOutputCapabilities capability; \
const char *name; \ const char *name; \
} Identifier[] = { \ } Identifier[] = { \
{ DSOCAPS_CONNECTORS, "CONNECTORS" }, \ { DSOCAPS_CONNECTORS, "CONNECTORS" }, \
{ DSOCAPS_ENCODER_SEL, "ENCODER_SEL" }, \ { DSOCAPS_ENCODER_SEL, "ENCODER_SEL" }, \
{ DSOCAPS_SIGNAL_SEL, "SIGNAL_SEL" }, \ { DSOCAPS_SIGNAL_SEL, "SIGNAL_SEL" }, \
{ DSOCAPS_CONNECTOR_SEL, "CONNECTOR_SEL" }, \ { DSOCAPS_CONNECTOR_SEL, "CONNECTOR_SEL" }, \
{ DSOCAPS_SLOW_BLANKING, "SLOW_BLANKING" }, \ { DSOCAPS_SLOW_BLANKING, "SLOW_BLANKING" }, \
{ DSOCAPS_RESOLUTION, "RESOLUTION" }, \
{ DSOCAPS_NONE, "NONE" } \ { DSOCAPS_NONE, "NONE" } \
}; };
#define DirectFBScreenOutputConnectorsNames(Identifier) struct DFBScreenOut putConnectorsName { \ #define DirectFBScreenOutputConnectorsNames(Identifier) struct DFBScreenOut putConnectorsName { \
DFBScreenOutputConnectors connector; \ DFBScreenOutputConnectors connector; \
const char *name; \ const char *name; \
} Identifier[] = { \ } Identifier[] = { \
{ DSOC_VGA, "VGA" }, \ { DSOC_VGA, "VGA" }, \
{ DSOC_SCART, "SCART" }, \ { DSOC_SCART, "SCART" }, \
{ DSOC_YC, "YC" }, \ { DSOC_YC, "YC" }, \
skipping to change at line 245 skipping to change at line 279
DFBScreenOutputSlowBlankingSignals slow_signal; \ DFBScreenOutputSlowBlankingSignals slow_signal; \
const char *name; \ const char *name; \
} Identifier[] = { \ } Identifier[] = { \
{ DSOSB_16x9, "16x9" }, \ { DSOSB_16x9, "16x9" }, \
{ DSOSB_4x3, "4x3" }, \ { DSOSB_4x3, "4x3" }, \
{ DSOSB_FOLLOW, "FOLLOW" }, \ { DSOSB_FOLLOW, "FOLLOW" }, \
{ DSOSB_MONITOR, "MONITOR" }, \ { DSOSB_MONITOR, "MONITOR" }, \
{ DSOSB_OFF, "OFF" } \ { DSOSB_OFF, "OFF" } \
}; };
#define DirectFBScreenOutputResolutionNames(Identifier) struct DFBScreenOut
putResolutionName { \
DFBScreenOutputResolution resolution; \
const char *name; \
} Identifier[] = { \
{ DSOR_640_480, "640_480" }, \
{ DSOR_720_480, "720_480" }, \
{ DSOR_720_576, "720_576" }, \
{ DSOR_800_600, "800_600" }, \
{ DSOR_1024_768, "1024_768" }, \
{ DSOR_1152_864, "1152_864" }, \
{ DSOR_1280_720, "1280_720" }, \
{ DSOR_1280_768, "1280_768" }, \
{ DSOR_1280_960, "1280_960" }, \
{ DSOR_1280_1024, "1280_1024" }, \
{ DSOR_1400_1050, "1400_1050" }, \
{ DSOR_1600_1200, "1600_1200" }, \
{ DSOR_1920_1080, "1920_1080" }, \
{ DSOR_UNKNOWN, "UNKNOWN" } \
};
#define DirectFBScreenMixerCapabilitiesNames(Identifier) struct DFBScreenMi xerCapabilitiesName { \ #define DirectFBScreenMixerCapabilitiesNames(Identifier) struct DFBScreenMi xerCapabilitiesName { \
DFBScreenMixerCapabilities capability; \ DFBScreenMixerCapabilities capability; \
const char *name; \ const char *name; \
} Identifier[] = { \ } Identifier[] = { \
{ DSMCAPS_FULL, "FULL" }, \ { DSMCAPS_FULL, "FULL" }, \
{ DSMCAPS_SUB_LEVEL, "SUB_LEVEL" }, \ { DSMCAPS_SUB_LEVEL, "SUB_LEVEL" }, \
{ DSMCAPS_SUB_LAYERS, "SUB_LAYERS" }, \ { DSMCAPS_SUB_LAYERS, "SUB_LAYERS" }, \
{ DSMCAPS_BACKGROUND, "BACKGROUND" }, \ { DSMCAPS_BACKGROUND, "BACKGROUND" }, \
{ DSMCAPS_NONE, "NONE" } \ { DSMCAPS_NONE, "NONE" } \
}; };
 End of changes. 9 change blocks. 
0 lines changed or deleted 56 lines changed or added


 directfb_util.h   directfb_util.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 32 skipping to change at line 32
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __DIRECTFB_UTIL_H__ #ifndef __DIRECTFB_UTIL_H__
#define __DIRECTFB_UTIL_H__ #define __DIRECTFB_UTIL_H__
#include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <directfb.h> #include <directfb.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
#include <direct/types.h> #include <direct/types.h>
skipping to change at line 93 skipping to change at line 94
D_ASSERT( (r)->h >= 0 ); \ D_ASSERT( (r)->h >= 0 ); \
} \ } \
} while (0) } while (0)
#define DFB_RECTANGLE_VALS(r) (r)->x, (r)->y, (r)->w, (r)->h #define DFB_RECTANGLE_VALS(r) (r)->x, (r)->y, (r)->w, (r)->h
#define DFB_RECTANGLE_VALS_FROM_REGION(r) (r)->x1, (r)->y1, (r)->x2-(r)- >x1+1, (r)->y2-(r)->y1+1 #define DFB_RECTANGLE_VALS_FROM_REGION(r) (r)->x1, (r)->y1, (r)->x2-(r)- >x1+1, (r)->y2-(r)->y1+1
#define DFB_RECTANGLE_INIT_FROM_REGION(r) (DFBRectangle){ DFB_RECTANGLE_ VALS_FROM_REGION(r) } #define DFB_RECTANGLE_INIT_FROM_REGION(r) (DFBRectangle){ DFB_RECTANGLE_ VALS_FROM_REGION(r) }
#define DFB_RECTANGLE_CONTAINS_POINT(r,X,Y) (((X) >= (r)->x) && ((X) < (r) ->x + (r)->w) && \ #define DFB_RECTANGLE_CONTAINS_POINT(r,X,Y) (((X) >= (r)->x) && ((X) < (r) ->x + (r)->w) && \
((Y) >= (r)->y) && ((Y) < (r) ->y + (r)->h)) ((Y) >= (r)->y) && ((Y) < (r) ->y + (r)->h))
#define DFB_RECTANGLES_DEBUG_AT( Domain, rects, num )
\
do {
\
unsigned int i;
\
\
for (i=0; i<(num); i++)
\
D_DEBUG_AT( Domain, " -> [%2d] %4d,%4d-%4dx%4d\n", i, DFB_R
ECTANGLE_VALS(&(rects)[i]) ); \
} while (0)
#define DFB_TRIANGLE_VALS(t) (t)->x1, (t)->y1, (t)->x2, (t)
->y2, (t)->x3, (t)->y3
#define DFB_COLORKEY_VALS(c) (c)->r, (c)->g, (c)->b, (c)->i
ndex
#define DFB_REGION_CHECK(r) \ #define DFB_REGION_CHECK(r) \
((r) != NULL && \ ((r) != NULL && \
(r)->x1 <= (r)->x2 && \ (r)->x1 <= (r)->x2 && \
(r)->y1 <= (r)->y2) (r)->y1 <= (r)->y2)
#define DFB_REGION_CHECK_IF(r) \ #define DFB_REGION_CHECK_IF(r) \
((r) == NULL || \ ((r) == NULL || \
((r)->x1 <= (r)->x2 && \ ((r)->x1 <= (r)->x2 && \
(r)->y1 <= (r)->y2)) (r)->y1 <= (r)->y2))
skipping to change at line 262 skipping to change at line 275
{ {
DFB_REGION_ASSERT( region ); DFB_REGION_ASSERT( region );
DFB_REGION_ASSERT( other ); DFB_REGION_ASSERT( other );
return (region->x1 <= other->x2 && return (region->x1 <= other->x2 &&
region->y1 <= other->y2 && region->y1 <= other->y2 &&
region->x2 >= other->x1 && region->x2 >= other->x1 &&
region->y2 >= other->y1); region->y2 >= other->y1);
} }
static inline bool dfb_region_region_extends( const DFBRegion *a,
const DFBRegion *b )
{
if (a->x1 == b->x1 && a->x2 == b->x2)
return (a->y1 == b->y2 - 1) || (a->y2 == b->y1 - 1);
if (a->y1 == b->y1 && a->y2 == b->y2)
return (a->x1 == b->x2 - 1) || (a->x2 == b->x1 - 1);
return false;
}
static inline void dfb_region_region_union( DFBRegion *region, static inline void dfb_region_region_union( DFBRegion *region,
const DFBRegion *other ) const DFBRegion *other )
{ {
DFB_REGION_ASSERT( region ); DFB_REGION_ASSERT( region );
DFB_REGION_ASSERT( other ); DFB_REGION_ASSERT( other );
if (region->x1 > other->x1) if (region->x1 > other->x1)
region->x1 = other->x1; region->x1 = other->x1;
if (region->y1 > other->y1) if (region->y1 > other->y1)
skipping to change at line 332 skipping to change at line 357
rect->x += insets->l; rect->x += insets->l;
rect->y += insets->t; rect->y += insets->t;
rect->w -= insets->l + insets->r; rect->w -= insets->l + insets->r;
rect->h -= insets->t + insets->b; rect->h -= insets->t + insets->b;
if (rect->w <= 0 || rect->h <= 0) if (rect->w <= 0 || rect->h <= 0)
rect->w = rect->h = 0; rect->w = rect->h = 0;
} }
/*
* Compute line segment intersection.
* Return true if intersection point exists within the given segment.
*/
static inline bool dfb_line_segment_intersect( const DFBRegion *line,
const DFBRegion *seg,
int *x,
int *y )
{
int x1, x2, x3, x4;
int y1, y2, y3, y4;
int num, den;
D_ASSERT( line != NULL );
D_ASSERT( seg != NULL );
x1 = seg->x1; y1 = seg->y1; x2 = seg->y2; y2 = seg->y2;
x3 = line->x1; y3 = line->y1; x4 = line->x2; y4 = line->y2;
num = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3);
den = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
if (!den) /* parallel */
return false;
if (num && ((num < 0) != (den < 0) || abs(num) > abs(den))) /* not wit
hin segment */
return false;
if (x)
*x = (s64)(x2 - x1) * num / den + x1;
if (y)
*y = (s64)(y2 - y1) * num / den + y1;
return true;
}
const char *dfb_input_event_type_name ( DFBInputEventType type );
const char *dfb_pixelformat_name ( DFBSurfacePixelFormat format );
const char *dfb_window_event_type_name( DFBWindowEventType type );
typedef struct { typedef struct {
int magic; int magic;
DFBRegion *regions; DFBRegion *regions;
int max_regions; int max_regions;
int num_regions; int num_regions;
DFBRegion bounding; DFBRegion bounding;
} DFBUpdates; } DFBUpdates;
 End of changes. 5 change blocks. 
1 lines changed or deleted 75 lines changed or added


 directfb_version.h   directfb_version.h 
skipping to change at line 33 skipping to change at line 33
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __DIRECTFB_VERSION_H__ #ifndef __DIRECTFB_VERSION_H__
#define __DIRECTFB_VERSION_H__ #define __DIRECTFB_VERSION_H__
#define DIRECTFB_MAJOR_VERSION (1) #define DIRECTFB_MAJOR_VERSION (1)
#define DIRECTFB_MINOR_VERSION (0) #define DIRECTFB_MINOR_VERSION (2)
#define DIRECTFB_MICRO_VERSION (1) #define DIRECTFB_MICRO_VERSION (0)
#define DIRECTFB_BINARY_AGE (1) #define DIRECTFB_BINARY_AGE (0)
#define DIRECTFB_INTERFACE_AGE (0) #define DIRECTFB_INTERFACE_AGE (0)
#endif /* __DIRECTFB_VERSION_H__ */ #endif /* __DIRECTFB_VERSION_H__ */
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added


 directfbgl.h   directfbgl.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 fb.h   fb.h 
skipping to change at line 116 skipping to change at line 116
#define FB_ACCEL_XGI_VOLARI_Z 48 /* XGI Volari Z7 */ #define FB_ACCEL_XGI_VOLARI_Z 48 /* XGI Volari Z7 */
#define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */
#define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */
#define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */
#define FB_ACCEL_NEOMAGIC_NM2097 93 /* NeoMagic NM2097 */ #define FB_ACCEL_NEOMAGIC_NM2097 93 /* NeoMagic NM2097 */
#define FB_ACCEL_NEOMAGIC_NM2160 94 /* NeoMagic NM2160 */ #define FB_ACCEL_NEOMAGIC_NM2160 94 /* NeoMagic NM2160 */
#define FB_ACCEL_NEOMAGIC_NM2200 95 /* NeoMagic NM2200 */ #define FB_ACCEL_NEOMAGIC_NM2200 95 /* NeoMagic NM2200 */
#define FB_ACCEL_NEOMAGIC_NM2230 96 /* NeoMagic NM2230 */ #define FB_ACCEL_NEOMAGIC_NM2230 96 /* NeoMagic NM2230 */
#define FB_ACCEL_NEOMAGIC_NM2360 97 /* NeoMagic NM2360 */ #define FB_ACCEL_NEOMAGIC_NM2360 97 /* NeoMagic NM2360 */
#define FB_ACCEL_NEOMAGIC_NM2380 98 /* NeoMagic NM2380 */ #define FB_ACCEL_NEOMAGIC_NM2380 98 /* NeoMagic NM2380 */
#define FB_ACCEL_EP9X 99 /* CirrusLogic EP9X family */
#define FB_ACCEL_SAVAGE4 0x80 /* S3 Savage4 */ #define FB_ACCEL_SAVAGE4 0x80 /* S3 Savage4 */
#define FB_ACCEL_SAVAGE3D 0x81 /* S3 Savage3D */ #define FB_ACCEL_SAVAGE3D 0x81 /* S3 Savage3D */
#define FB_ACCEL_SAVAGE3D_MV 0x82 /* S3 Savage3D-MV */ #define FB_ACCEL_SAVAGE3D_MV 0x82 /* S3 Savage3D-MV */
#define FB_ACCEL_SAVAGE2000 0x83 /* S3 Savage2000 */ #define FB_ACCEL_SAVAGE2000 0x83 /* S3 Savage2000 */
#define FB_ACCEL_SAVAGE_MX_MV 0x84 /* S3 Savage/MX-MV */ #define FB_ACCEL_SAVAGE_MX_MV 0x84 /* S3 Savage/MX-MV */
#define FB_ACCEL_SAVAGE_MX 0x85 /* S3 Savage/MX */ #define FB_ACCEL_SAVAGE_MX 0x85 /* S3 Savage/MX */
#define FB_ACCEL_SAVAGE_IX_MV 0x86 /* S3 Savage/IX-MV */ #define FB_ACCEL_SAVAGE_IX_MV 0x86 /* S3 Savage/IX-MV */
#define FB_ACCEL_SAVAGE_IX 0x87 /* S3 Savage/IX */ #define FB_ACCEL_SAVAGE_IX 0x87 /* S3 Savage/IX */
#define FB_ACCEL_PROSAVAGE_PM 0x88 /* S3 ProSavage PM133 */ #define FB_ACCEL_PROSAVAGE_PM 0x88 /* S3 ProSavage PM133 */
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 fbdev.h   fbdev.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 43 skipping to change at line 43
#include <core/coretypes.h> #include <core/coretypes.h>
#include <core/layers_internal.h> #include <core/layers_internal.h>
#include <core/system.h> #include <core/system.h>
#include <fusion/call.h> #include <fusion/call.h>
#include <fusion/reactor.h> #include <fusion/reactor.h>
#include "agp.h"
#include "fb.h" #include "fb.h"
#include "surfacemanager.h"
#include "vt.h" #include "vt.h"
#include "agp.h"
#ifndef FBIO_WAITFORVSYNC #ifndef FBIO_WAITFORVSYNC
#define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t) #define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t)
#endif #endif
typedef struct { typedef struct {
/* fbdev fixed screeninfo, contains infos about memory and type of car d */ /* fbdev fixed screeninfo, contains infos about memory and type of car d */
struct fb_fix_screeninfo fix; struct fb_fix_screeninfo fix;
VideoMode *modes; /* linked list of valid VideoMode *modes; /* linked list of valid
skipping to change at line 78 skipping to change at line 79
struct fb_cmap orig_cmap; /* original palette */ struct fb_cmap orig_cmap; /* original palette */
struct fb_cmap current_cmap; /* our copy of the cmap */ struct fb_cmap current_cmap; /* our copy of the cmap */
struct fb_cmap temp_cmap; /* scratch */ struct fb_cmap temp_cmap; /* scratch */
FusionCall fbdev_ioctl; /* ioctl rpc */ FusionCall fbdev_ioctl; /* ioctl rpc */
unsigned long page_mask; /* PAGE_SIZE - 1 */ unsigned long page_mask; /* PAGE_SIZE - 1 */
CoreSurfacePool *pool;
struct { struct {
int bus; int bus;
int dev; int dev;
int func; int func;
} pci; /* PCI Bus ID of graphics devi ce */ } pci; /* PCI Bus ID of graphics devi ce */
struct { struct {
unsigned short vendor; /* Graphics device vendor id * / unsigned short vendor; /* Graphics device vendor id * /
unsigned short model; /* Graphics device model id */ unsigned short model; /* Graphics device model id */
} device; } device;
AGPShared *agp; AGPShared *agp;
FusionSHMPoolShared *shmpool; FusionSHMPoolShared *shmpool;
FusionSHMPoolShared *shmpool_data; FusionSHMPoolShared *shmpool_data;
CoreLayerRegionConfig config; CoreLayerRegionConfig config;
SurfaceManager *manager;
} FBDevShared; } FBDevShared;
typedef struct { typedef struct {
FBDevShared *shared; FBDevShared *shared;
CoreDFB *core; CoreDFB *core;
/* virtual framebuffer address */ /* virtual framebuffer address */
void *framebuffer_base; void *framebuffer_base;
skipping to change at line 123 skipping to change at line 128
* core init function, opens /dev/fb, get fbdev screeninfo * core init function, opens /dev/fb, get fbdev screeninfo
* disables font acceleration, reads mode list * disables font acceleration, reads mode list
*/ */
DFBResult dfb_fbdev_initialize(); DFBResult dfb_fbdev_initialize();
DFBResult dfb_fbdev_join(); DFBResult dfb_fbdev_join();
/* /*
* deinitializes DirectFB fbdev stuff and restores fbdev settings * deinitializes DirectFB fbdev stuff and restores fbdev settings
*/ */
DFBResult dfb_fbdev_shutdown( bool emergency ); DFBResult dfb_fbdev_shutdown( bool emergency );
DFBResult dfb_fbdev_leave( bool emergency ); DFBResult dfb_fbdev_leave ( bool emergency );
DFBResult dfb_fbdev_test_mode ( const VideoMode *mode,
const CoreLayerRegionConfig *config )
;
DFBResult dfb_fbdev_test_mode_simple( const VideoMode *mode );
DFBResult dfb_fbdev_set_mode ( const VideoMode *mode,
const CoreSurfaceConfig *config )
;
#endif #endif
 End of changes. 7 change blocks. 
3 lines changed or deleted 17 lines changed or added


 fonts.h   fonts.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 102 skipping to change at line 102
int magic; int magic;
} CoreFontCacheRow; } CoreFontCacheRow;
/* /*
* font struct * font struct
*/ */
struct _CoreFont { struct _CoreFont {
CoreDFB *core; CoreDFB *core;
DFBSurfaceBlittingFlags blittingflags;
CardState state; /* the state used to blit glyphs */ CardState state; /* the state used to blit glyphs */
DFBSurfacePixelFormat pixel_format; DFBSurfacePixelFormat pixel_format;
DFBSurfaceCapabilities surface_caps; DFBSurfaceCapabilities surface_caps;
int row_width; int row_width;
int max_rows; int max_rows;
CoreFontCacheRow **rows; /* contain bitmaps of loa ded glyphs */ CoreFontCacheRow **rows; /* contain bitmaps of loa ded glyphs */
int num_rows; int num_rows;
int active_row; int active_row;
unsigned int row_stamp; unsigned int row_stamp;
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 fusion.h   fusion.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 47 skipping to change at line 47
FER_ANY, FER_ANY,
FER_MASTER, FER_MASTER,
FER_SLAVE FER_SLAVE
} FusionEnterRole; } FusionEnterRole;
typedef enum { typedef enum {
FFA_CLOSE, FFA_CLOSE,
FFA_FORK FFA_FORK
} FusionForkAction; } FusionForkAction;
typedef enum {
FFS_PREPARE,
FFS_PARENT,
FFS_CHILD
} FusionForkState;
typedef void (*FusionForkCallback) ( FusionForkAction action, FusionForkSta
te state );
/* /*
* Enters a fusion world by joining or creating it. * Enters a fusion world by joining or creating it.
* *
* If <b>world_index</b> is negative, the next free index is used to create a new world. * If <b>world_index</b> is negative, the next free index is used to create a new world.
* Otherwise the world with the specified index is joined or created. * Otherwise the world with the specified index is joined or created.
*/ */
DirectResult fusion_enter( int world_index, DirectResult fusion_enter( int world_index,
int abi_version, int abi_version,
FusionEnterRole role, FusionEnterRole role,
FusionWorld **ret_world ); FusionWorld **ret_world );
skipping to change at line 73 skipping to change at line 81
DirectResult fusion_exit( FusionWorld *world, DirectResult fusion_exit( FusionWorld *world,
bool emergency ); bool emergency );
/* /*
* Sets the fork() action of the calling Fusionee within the world. * Sets the fork() action of the calling Fusionee within the world.
*/ */
void fusion_world_set_fork_action( FusionWorld *world, void fusion_world_set_fork_action( FusionWorld *world,
FusionForkAction action ); FusionForkAction action );
/* /*
* Gets the current fork() action.
*/
FusionForkAction fusion_world_get_fork_action( FusionWorld *world );
/*
* Registers a callback called upon fork().
*/
void fusion_world_set_fork_callback( FusionWorld *world,
FusionForkCallback callback );
/*
* Return the index of the specified world. * Return the index of the specified world.
*/ */
int fusion_world_index( const FusionWorld *world ); int fusion_world_index( const FusionWorld *world );
/* /*
* Return the own Fusion ID within the specified world. * Return the own Fusion ID within the specified world.
*/ */
FusionID fusion_id( const FusionWorld *world ); FusionID fusion_id( const FusionWorld *world );
/* /*
* Return if the world is a multi application world.
*/
bool fusion_is_multi( const FusionWorld *world );
/*
* Return the thread ID of the Fusion Dispatcher within the specified world . * Return the thread ID of the Fusion Dispatcher within the specified world .
*/ */
pid_t fusion_dispatcher_tid( const FusionWorld *world ); pid_t fusion_dispatcher_tid( const FusionWorld *world );
/* /*
* Return true if this process is the master. * Return true if this process is the master.
*/ */
bool fusion_master( const FusionWorld *world ); bool fusion_master( const FusionWorld *world );
/* /*
 End of changes. 4 change blocks. 
1 lines changed or deleted 26 lines changed or added


 fusion_internal.h   fusion_internal.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 42 skipping to change at line 42
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>
#include <string.h> #include <string.h>
#include <direct/list.h> #include <direct/list.h>
#include <fusion/build.h> #include <fusion/build.h>
#include <fusion/fusion.h> #include <fusion/fusion.h>
#include <fusion/lock.h> #include <fusion/lock.h>
#include <fusion/ref.h>
#include <fusion/shm/shm_internal.h> #include <fusion/shm/shm_internal.h>
#if FUSION_BUILD_MULTI #if FUSION_BUILD_MULTI
#include <sys/ioctl.h> # if FUSION_BUILD_KERNEL
#include <linux/fusion.h> # include <sys/ioctl.h>
# include <linux/fusion.h>
# else
# include <fusion/protocol.h>
# endif
#endif #endif
#define FUSION_MAX_WORLDS 8 #define FUSION_MAX_WORLDS 8
/*************************************** /***************************************
* Fusion internal type declarations * * Fusion internal type declarations *
***************************************/ ***************************************/
struct __Fusion_FusionWorldShared { struct __Fusion_FusionWorldShared {
int magic; int magic;
int refs; /* Increased by the master on fork(). *
/
int world_index; int world_index;
int world_abi; int world_abi;
struct timeval start_time; struct timeval start_time;
DirectLink *arenas; DirectLink *arenas;
FusionSkirmish arenas_lock; FusionSkirmish arenas_lock;
FusionSkirmish reactor_globals; FusionSkirmish reactor_globals;
FusionSHMShared shm; FusionSHMShared shm;
FusionSHMPoolShared *main_pool; FusionSHMPoolShared *main_pool;
DirectLink *fusionees; /* Connected fusionees. */
FusionSkirmish fusionees_lock;
unsigned int call_ids; /* Generates call ids. */
unsigned int lock_ids; /* Generates locks ids. */
unsigned int ref_ids; /* Generates refs ids. */
unsigned int reactor_ids; /* Generates reactors ids. */
unsigned int pool_ids; /* Generates pools ids. */
void *pool_base; /* SHM pool allocation base. */
void *pool_max; /* SHM pool max address. */
}; };
struct __Fusion_FusionWorld { struct __Fusion_FusionWorld {
int magic; int magic;
int refs; int refs;
FusionWorldShared *shared; FusionWorldShared *shared;
int fusion_fd; int fusion_fd;
skipping to change at line 95 skipping to change at line 114
/* /*
* List of reactors with at least one local reaction attached. * List of reactors with at least one local reaction attached.
*/ */
DirectLink *reactor_nodes; DirectLink *reactor_nodes;
pthread_mutex_t reactor_nodes_lock; pthread_mutex_t reactor_nodes_lock;
FusionSHM shm; FusionSHM shm;
FusionForkAction fork_action; FusionForkAction fork_action;
FusionForkCallback fork_callback;
void *fusionee;
}; };
/******************************************* /*******************************************
* Fusion internal function declarations * * Fusion internal function declarations *
*******************************************/ *******************************************/
int _fusion_fd( const FusionWorldShared *shared ); int _fusion_fd( const FusionWorldShared *shared );
FusionID _fusion_id( const FusionWorldShared *shared ); FusionID _fusion_id( const FusionWorldShared *shared );
FusionWorld *_fusion_world( const FusionWorldShared *shared ); FusionWorld *_fusion_world( const FusionWorldShared *shared );
/* /*
* from reactor.c * from reactor.c
*/ */
void _fusion_reactor_free_all ( FusionWorld *world ); void _fusion_reactor_free_all ( FusionWorld *world );
void _fusion_reactor_process_message( FusionWorld *world, void _fusion_reactor_process_message( FusionWorld *world,
int reactor_id, int reactor_id,
int channel,
const void *msg_data ); const void *msg_data );
#if FUSION_BUILD_MULTI
/* /*
* from call.c * from call.c
*/ */
#if FUSION_BUILD_MULTI
void _fusion_call_process( FusionWorld *world, void _fusion_call_process( FusionWorld *world,
int call_id, int call_id,
FusionCallMessage *call ); FusionCallMessage *call );
#endif
#if FUSION_BUILD_KERNEL
/* /*
* from shm.c * from shm.c
*/ */
#if FUSION_BUILD_MULTI
void _fusion_shmpool_process( FusionWorld *world, void _fusion_shmpool_process( FusionWorld *world,
int pool_id, int pool_id,
FusionSHMPoolMessage *msg ); FusionSHMPoolMessage *msg );
#endif #else
/*
* form fusion.c
*/
void _fusion_add_local( FusionWorld *world,
FusionRef *ref,
int add );
void _fusion_check_locals( FusionWorld *world,
FusionRef *ref );
void _fusion_remove_all_locals( FusionWorld *world,
const FusionRef *ref );
DirectResult _fusion_send_message( int fd,
const void *msg,
size_t msg_size,
struct sockaddr_un *addr );
DirectResult _fusion_recv_message( int fd,
void *msg,
size_t msg_size,
struct sockaddr_un *addr );
/*
* from ref.c
*/
DirectResult _fusion_ref_change( FusionRef *ref, int add, bool global );
#endif /* FUSION_BUILD_KERNEL */
#endif /* FUSION_BUILD_MULTI */
#endif #endif
 End of changes. 13 change blocks. 
7 lines changed or deleted 59 lines changed or added


 generic.h   generic.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 gfx_util.h   gfx_util.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 gfxcard.h   gfxcard.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 46 skipping to change at line 46
#include <fusion/lock.h> #include <fusion/lock.h>
#include <directfb.h> #include <directfb.h>
#include <core/coretypes.h> #include <core/coretypes.h>
typedef enum { typedef enum {
CCF_CLIPPING = 0x00000001, CCF_CLIPPING = 0x00000001,
CCF_NOTRIEMU = 0x00000002, CCF_NOTRIEMU = 0x00000002,
CCF_READSYSMEM = 0x00000004, CCF_READSYSMEM = 0x00000004,
/* CCF_WRITESYSMEM ?! */ /* CCF_WRITESYSMEM ?! */
CCF_AUXMEMORY = 0x00000010 CCF_AUXMEMORY = 0x00000010,
CCF_RENDEROPTS = 0x00000020
} CardCapabilitiesFlags; } CardCapabilitiesFlags;
struct __DFB_CoreGraphicsSerial { struct __DFB_CoreGraphicsSerial {
unsigned int serial; unsigned int serial;
unsigned int generation; unsigned int generation;
}; };
typedef struct { typedef struct {
CardCapabilitiesFlags flags; CardCapabilitiesFlags flags;
DFBAccelerationMask accel; DFBAccelerationMask accel;
DFBSurfaceBlittingFlags blitting; DFBSurfaceBlittingFlags blitting;
DFBSurfaceDrawingFlags drawing; DFBSurfaceDrawingFlags drawing;
DFBAccelerationMask clip;
} CardCapabilities; } CardCapabilities;
typedef struct { typedef struct {
unsigned int surface_byteoffset_alignment; unsigned int surface_byteoffset_alignment;
unsigned int surface_pixelpitch_alignment; unsigned int surface_pixelpitch_alignment;
unsigned int surface_bytepitch_alignment; unsigned int surface_bytepitch_alignment;
unsigned int surface_max_power_of_two_pixelpitch; unsigned int surface_max_power_of_two_pixelpitch;
unsigned int surface_max_power_of_two_bytepitch; unsigned int surface_max_power_of_two_bytepitch;
unsigned int surface_max_power_of_two_height; unsigned int surface_max_power_of_two_height;
skipping to change at line 184 skipping to change at line 186
/* /*
* After the video memory has been written to by the accelerator * After the video memory has been written to by the accelerator
* make sure the CPU won't read back cached data. * make sure the CPU won't read back cached data.
*/ */
void (*FlushReadCache)( void *driver_data, void *device_data ); void (*FlushReadCache)( void *driver_data, void *device_data );
/* /*
* Called before a software access to a video surface buffer. * Called before a software access to a video surface buffer.
*/ */
void (*SurfaceEnter)( void *driver_data, void *device_data, void (*SurfaceEnter)( void *driver_data, void *device_data,
SurfaceBuffer *buffer, DFBSurfaceLockFlags flags ); CoreSurfaceBuffer *buffer, DFBSurfaceLockFlags f lags );
/* /*
* Called after a software access to a video surface buffer. * Called after a software access to a video surface buffer.
*/ */
void (*SurfaceLeave)( void *driver_data, void *device_data, SurfaceBuf fer *buffer ); void (*SurfaceLeave)( void *driver_data, void *device_data, CoreSurfac eBuffer *buffer );
/* /*
* Return the serial of the last (queued) operation. * Return the serial of the last (queued) operation.
* *
* The serial is used to wait for finishing a specific graphics * The serial is used to wait for finishing a specific graphics
* operation instead of the whole engine being idle. * operation instead of the whole engine being idle.
*/ */
void (*GetSerial)( void *driver_data, void *device_data, CoreGraphicsS erial *serial ); void (*GetSerial)( void *driver_data, void *device_data, CoreGraphicsS erial *serial );
/* /*
skipping to change at line 255 skipping to change at line 257
*/ */
bool (*Blit) ( void *driver_data, void *device_data, bool (*Blit) ( void *driver_data, void *device_data,
DFBRectangle *rect, int dx, int dy ); DFBRectangle *rect, int dx, int dy );
bool (*StretchBlit) ( void *driver_data, void *device_data, bool (*StretchBlit) ( void *driver_data, void *device_data,
DFBRectangle *srect, DFBRectangle *drect ); DFBRectangle *srect, DFBRectangle *drect );
bool (*TextureTriangles)( void *driver_data, void *device_data, bool (*TextureTriangles)( void *driver_data, void *device_data,
DFBVertex *vertices, int num, DFBVertex *vertices, int num,
DFBTriangleFormation formation ); DFBTriangleFormation formation );
/*
* Signal beginning of a sequence of operations using this state.
* Any number of states can be 'drawing'.
*/
void (*StartDrawing)( void *driver_data, void *device_data, CardState
*state );
/*
* Signal end of sequence, i.e. destination surface is consistent agai
n.
*/
void (*StopDrawing)( void *driver_data, void *device_data, CardState *
state );
} GraphicsDeviceFuncs; } GraphicsDeviceFuncs;
typedef struct { typedef struct {
int (*Probe) (GraphicsDevice *device); int (*Probe) (CoreGraphicsDevice *device);
void (*GetDriverInfo) (GraphicsDevice *device, void (*GetDriverInfo) (CoreGraphicsDevice *device,
GraphicsDriverInfo *driver_info); GraphicsDriverInfo *driver_info);
DFBResult (*InitDriver) (GraphicsDevice *device, DFBResult (*InitDriver) (CoreGraphicsDevice *device,
GraphicsDeviceFuncs *funcs, GraphicsDeviceFuncs *funcs,
void *driver_data, void *driver_data,
void *device_data, void *device_data,
CoreDFB *core); CoreDFB *core);
DFBResult (*InitDevice) (GraphicsDevice *device, DFBResult (*InitDevice) (CoreGraphicsDevice *device,
GraphicsDeviceInfo *device_info, GraphicsDeviceInfo *device_info,
void *driver_data, void *driver_data,
void *device_data); void *device_data);
void (*CloseDevice) (GraphicsDevice *device, void (*CloseDevice) (CoreGraphicsDevice *device,
void *driver_data, void *driver_data,
void *device_data); void *device_data);
void (*CloseDriver) (GraphicsDevice *device, void (*CloseDriver) (CoreGraphicsDevice *device,
void *driver_data); void *driver_data);
} GraphicsDriverFuncs; } GraphicsDriverFuncs;
typedef enum { typedef enum {
GDLF_NONE = 0x00000000, GDLF_NONE = 0x00000000,
GDLF_WAIT = 0x00000001, GDLF_WAIT = 0x00000001,
GDLF_SYNC = 0x00000002, GDLF_SYNC = 0x00000002,
GDLF_INVALIDATE = 0x00000004, GDLF_INVALIDATE = 0x00000004,
GDLF_RESET = 0x00000008 GDLF_RESET = 0x00000008
} GraphicsDeviceLockFlags; } GraphicsDeviceLockFlags;
DFBResult dfb_gfxcard_lock( GraphicsDeviceLockFlags flags ); DFBResult dfb_gfxcard_lock( GraphicsDeviceLockFlags flags );
void dfb_gfxcard_unlock( void ); void dfb_gfxcard_unlock( void );
void dfb_gfxcard_holdup( void ); void dfb_gfxcard_holdup( void );
bool dfb_gfxcard_state_check( CardState *state, DFBAccelerationMask accel ) ; bool dfb_gfxcard_state_check( CardState *state, DFBAccelerationMask accel ) ;
//bool dfb_gfxcard_state_acquire( CardState *state, DFBAccelerationMask acc
el ); /*
//void dfb_gfxcard_state_release( CardState *state ); * Signal beginning of a sequence of operations using this state.
* Any number of states can be 'drawing'.
*/
void dfb_gfxcard_start_drawing( CoreGraphicsDevice *device,
CardState *state );
/*
* Signal end of sequence, i.e. destination surface is consistent again.
*/
void dfb_gfxcard_stop_drawing ( CoreGraphicsDevice *device,
CardState *state );
/* /*
* drawing functions, lock source and destination surfaces, * drawing functions, lock source and destination surfaces,
* handle clipping and drawing method (hardware/software) * handle clipping and drawing method (hardware/software)
*/ */
void dfb_gfxcard_fillrectangles( const DFBRectangle *rects, int num, CardSt void dfb_gfxcard_fillrectangles ( const DFBRectangle *rects,
ate *state ); int num,
CardState *state );
void dfb_gfxcard_drawrectangle( DFBRectangle *rect, CardState *state ); void dfb_gfxcard_drawrectangle ( DFBRectangle *rect,
CardState *state );
void dfb_gfxcard_drawlines( DFBRegion *lines, int num_lines, CardState *sta void dfb_gfxcard_drawlines ( DFBRegion *lines,
te ); int num_lines,
CardState *state );
void dfb_gfxcard_fillspans( int y, DFBSpan *spans, int num_spans, CardState void dfb_gfxcard_fillspans ( int y,
*state ); DFBSpan *spans,
int num_spans,
CardState *state );
void dfb_gfxcard_filltriangle( DFBTriangle *tri, CardState *state ); void dfb_gfxcard_filltriangles ( const DFBTriangle *tris,
int num,
CardState *state );
void dfb_gfxcard_blit( DFBRectangle *rect, int dx, int dy, CardState *state void dfb_gfxcard_blit ( DFBRectangle *rect,
); int dx,
int dy,
CardState *state );
void dfb_gfxcard_batchblit( DFBRectangle *rects, DFBPoint *points, void dfb_gfxcard_batchblit ( DFBRectangle *rects,
int num, CardState *state ); DFBPoint *points,
int num,
CardState *state );
void dfb_gfxcard_tileblit( DFBRectangle *rect, int dx1, int dy1, int dx2, i void dfb_gfxcard_tileblit ( DFBRectangle *rect,
nt dy2, int dx1,
CardState *state ); int dy1,
int dx2,
int dy2,
CardState *state );
void dfb_gfxcard_stretchblit( DFBRectangle *srect, DFBRectangle *drect, void dfb_gfxcard_stretchblit ( DFBRectangle *srect,
CardState *state ); DFBRectangle *drect,
CardState *state );
void dfb_gfxcard_texture_triangles( DFBVertex *vertices, int num, void dfb_gfxcard_texture_triangles ( DFBVertex *vertices,
DFBTriangleFormation formation, int num,
CardState *state ); DFBTriangleFormation formation,
CardState *state );
void dfb_gfxcard_drawstring( const u8 *text, int bytes, void dfb_gfxcard_drawstring ( const u8 *text,
DFBTextEncodingID encoding, int x, int y, int bytes,
CoreFont *font, CardState *state ); DFBTextEncodingID encoding,
void dfb_gfxcard_drawstring_check_state( CoreFont *font, CardState *state ) int x,
; int y,
void dfb_gfxcard_drawglyph( unsigned int index, int x, int y, CoreFont *font,
CoreFont *font, CardState *state ); CardState *state );
void dfb_gfxcard_drawglyph ( unsigned int index,
int x,
int y,
CoreFont *font,
CardState *state );
void dfb_gfxcard_drawstring_check_state ( CoreFont *font,
CardState *state );
DFBResult dfb_gfxcard_sync( void ); DFBResult dfb_gfxcard_sync( void );
void dfb_gfxcard_invalidate_state( void ); void dfb_gfxcard_invalidate_state( void );
DFBResult dfb_gfxcard_wait_serial( const CoreGraphicsSerial *serial ); DFBResult dfb_gfxcard_wait_serial( const CoreGraphicsSerial *serial );
void dfb_gfxcard_flush_texture_cache( void ); void dfb_gfxcard_flush_texture_cache( void );
void dfb_gfxcard_flush_read_cache( void ); void dfb_gfxcard_flush_read_cache( void );
void dfb_gfxcard_after_set_var( void ); void dfb_gfxcard_after_set_var( void );
void dfb_gfxcard_surface_enter( SurfaceBuffer *buffer, DFBSurfaceLockFlags void dfb_gfxcard_surface_enter( CoreSurfaceBuffer *buffer, DFBSurfaceLockFl
flags ); ags flags );
void dfb_gfxcard_surface_leave( SurfaceBuffer *buffer ); void dfb_gfxcard_surface_leave( CoreSurfaceBuffer *buffer );
DFBResult dfb_gfxcard_adjust_heap_offset( int offset ); DFBResult dfb_gfxcard_adjust_heap_offset( int offset );
SurfaceManager *dfb_gfxcard_surface_manager ( void );
void dfb_gfxcard_get_capabilities ( CardCapabilities *ret_cap s ); void dfb_gfxcard_get_capabilities ( CardCapabilities *ret_cap s );
void dfb_gfxcard_get_device_info ( GraphicsDeviceInfo *ret_inf o ); void dfb_gfxcard_get_device_info ( GraphicsDeviceInfo *ret_inf o );
void dfb_gfxcard_get_driver_info ( GraphicsDriverInfo *ret_inf o ); void dfb_gfxcard_get_driver_info ( GraphicsDriverInfo *ret_inf o );
int dfb_gfxcard_reserve_memory ( GraphicsDevice *device , int dfb_gfxcard_reserve_memory ( CoreGraphicsDevice *device ,
unsigned int size ) ; unsigned int size ) ;
int dfb_gfxcard_reserve_auxmemory ( GraphicsDevice *device , int dfb_gfxcard_reserve_auxmemory ( CoreGraphicsDevice *device ,
unsigned int size ) ; unsigned int size ) ;
unsigned int dfb_gfxcard_memory_length ( void ); unsigned int dfb_gfxcard_memory_length ( void );
unsigned int dfb_gfxcard_auxmemory_length ( void ); unsigned int dfb_gfxcard_auxmemory_length ( void );
void *dfb_gfxcard_get_device_data ( void ); void *dfb_gfxcard_get_device_data ( void );
void *dfb_gfxcard_get_driver_data ( void );
CoreGraphicsDevice *dfb_gfxcard_get_primary ( void );
/* /*
* Graphics drivers call this function to get access to MMIO regions. * Graphics drivers call this function to get access to MMIO regions.
* *
* device: Graphics device to map * device: Graphics device to map
* offset: Offset from MMIO base (default offset is 0) * offset: Offset from MMIO base (default offset is 0)
* length: Length of mapped region (-1 uses default length) * length: Length of mapped region (-1 uses default length)
* *
* Returns the virtual address or NULL if mapping failed. * Returns the virtual address or NULL if mapping failed.
*/ */
volatile void *dfb_gfxcard_map_mmio( GraphicsDevice *device, volatile void *dfb_gfxcard_map_mmio( CoreGraphicsDevice *device,
unsigned int offset, unsigned int offset,
int length ); int length );
/* /*
* Graphics drivers call this function to unmap MMIO regions. * Graphics drivers call this function to unmap MMIO regions.
* *
* addr: Virtual address returned by gfxcard_map_mmio * addr: Virtual address returned by gfxcard_map_mmio
* length: Length of mapped region (-1 uses default length) * length: Length of mapped region (-1 uses default length)
*/ */
void dfb_gfxcard_unmap_mmio( GraphicsDevice *device, void dfb_gfxcard_unmap_mmio( CoreGraphicsDevice *device,
volatile void *addr, volatile void *addr,
int length ); int length );
int dfb_gfxcard_get_accelerator( GraphicsDevice *device ); int dfb_gfxcard_get_accelerator( CoreGraphicsDevice *device );
unsigned long dfb_gfxcard_memory_physical( GraphicsDevice *device, void dfb_gfxcard_get_limits( CoreGraphicsDevice *device,
unsigned int offset ); CardLimitations *ret_limits );
void *dfb_gfxcard_memory_virtual ( GraphicsDevice *device,
unsigned int offset );
unsigned long dfb_gfxcard_auxmemory_physical( GraphicsDevice *device, void dfb_gfxcard_calc_buffer_size( CoreGraphicsDevice *device,
unsigned int offset ); CoreSurfaceBuffer *buffer,
void *dfb_gfxcard_auxmemory_virtual ( GraphicsDevice *device, int *ret_pitch,
unsigned int offset ); int *ret_length );
unsigned long dfb_gfxcard_memory_physical ( CoreGraphicsDevice *device,
unsigned int offset )
;
void *dfb_gfxcard_memory_virtual ( CoreGraphicsDevice *device,
unsigned int offset )
;
unsigned long dfb_gfxcard_auxmemory_physical( CoreGraphicsDevice *device,
unsigned int offset )
;
void *dfb_gfxcard_auxmemory_virtual ( CoreGraphicsDevice *device,
unsigned int offset )
;
/* Hook for registering additional screen(s) and layer(s) in app or lib ini tializing DirectFB. */ /* Hook for registering additional screen(s) and layer(s) in app or lib ini tializing DirectFB. */
extern void (*__DFB_CoreRegisterHook)( CoreDFB *core, CoreGraphicsDevice *d evice, void *ctx ); extern void (*__DFB_CoreRegisterHook)( CoreDFB *core, CoreGraphicsDevice *d evice, void *ctx );
extern void *__DFB_CoreRegisterHookCtx; extern void *__DFB_CoreRegisterHookCtx;
#endif #endif
 End of changes. 33 change blocks. 
61 lines changed or deleted 126 lines changed or added


 graphics_driver.h   graphics_driver.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 37 skipping to change at line 37
*/ */
#ifndef __GRAPHICS_DRIVER_H__ #ifndef __GRAPHICS_DRIVER_H__
#define __GRAPHICS_DRIVER_H__ #define __GRAPHICS_DRIVER_H__
#include <direct/modules.h> #include <direct/modules.h>
#include <core/gfxcard.h> #include <core/gfxcard.h>
static int static int
driver_probe( GraphicsDevice *device ); driver_probe( CoreGraphicsDevice *device );
static void static void
driver_get_info( GraphicsDevice *device, driver_get_info( CoreGraphicsDevice *device,
GraphicsDriverInfo *info ); GraphicsDriverInfo *info );
static DFBResult static DFBResult
driver_init_driver( GraphicsDevice *device, driver_init_driver( CoreGraphicsDevice *device,
GraphicsDeviceFuncs *funcs, GraphicsDeviceFuncs *funcs,
void *driver_data, void *driver_data,
void *device_data, void *device_data,
CoreDFB *core ); CoreDFB *core );
static DFBResult static DFBResult
driver_init_device( GraphicsDevice *device, driver_init_device( CoreGraphicsDevice *device,
GraphicsDeviceInfo *device_info, GraphicsDeviceInfo *device_info,
void *driver_data, void *driver_data,
void *device_data ); void *device_data );
static void static void
driver_close_device( GraphicsDevice *device, driver_close_device( CoreGraphicsDevice *device,
void *driver_data, void *driver_data,
void *device_data ); void *device_data );
static void static void
driver_close_driver( GraphicsDevice *device, driver_close_driver( CoreGraphicsDevice *device,
void *driver_data ); void *driver_data );
static GraphicsDriverFuncs driver_funcs = { static GraphicsDriverFuncs driver_funcs = {
Probe: driver_probe, .Probe = driver_probe,
GetDriverInfo: driver_get_info, .GetDriverInfo = driver_get_info,
InitDriver: driver_init_driver, .InitDriver = driver_init_driver,
InitDevice: driver_init_device, .InitDevice = driver_init_device,
CloseDevice: driver_close_device, .CloseDevice = driver_close_device,
CloseDriver: driver_close_driver .CloseDriver = driver_close_driver
}; };
#define DFB_GRAPHICS_DRIVER(shortname) \ #define DFB_GRAPHICS_DRIVER(shortname) \
__attribute__((constructor)) void directfb_##shortname(); \ __attribute__((constructor)) void directfb_##shortname(); \
\ \
void \ void \
directfb_##shortname() \ directfb_##shortname() \
{ \ { \
direct_modules_register( &dfb_graphics_drivers, \ direct_modules_register( &dfb_graphics_drivers, \
DFB_GRAPHICS_DRIVER_ABI_VERSION, \ DFB_GRAPHICS_DRIVER_ABI_VERSION, \
 End of changes. 8 change blocks. 
16 lines changed or deleted 16 lines changed or added


 hash.h   hash.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 34 skipping to change at line 34
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __DIRECT__HASH_H__ #ifndef __DIRECT__HASH_H__
#define __DIRECT__HASH_H__ #define __DIRECT__HASH_H__
#include <direct/types.h> #include <direct/types.h>
typedef bool (*DirectHashIteratorFunc)( DirectHash *hash, typedef bool (*DirectHashIteratorFunc)( DirectHash *hash,
u32 key, unsigned long key,
void *value, void *value,
void *ctx ); void *ctx );
DirectResult direct_hash_create ( int size, DirectResult direct_hash_create ( int size,
DirectHash **ret_hash ); DirectHash **ret_hash );
void direct_hash_destroy( DirectHash *hash ); void direct_hash_destroy( DirectHash *hash );
DirectResult direct_hash_insert ( DirectHash *hash, DirectResult direct_hash_insert ( DirectHash *hash,
u32 key, unsigned long key,
void *value ); void *value );
void direct_hash_remove ( DirectHash *hash, void direct_hash_remove ( DirectHash *hash,
u32 key ); unsigned long key );
void *direct_hash_lookup ( DirectHash *hash, void *direct_hash_lookup ( DirectHash *hash,
u32 key ); unsigned long key );
void direct_hash_iterate( DirectHash *hash, void direct_hash_iterate( DirectHash *hash,
DirectHashIteratorFunc func, DirectHashIteratorFunc func,
void *ctx ); void *ctx );
#endif #endif
 End of changes. 7 change blocks. 
15 lines changed or deleted 15 lines changed or added


 idirectfb.h   idirectfb.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 36 skipping to change at line 36
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __IDIRECTFB_H__ #ifndef __IDIRECTFB_H__
#define __IDIRECTFB_H__ #define __IDIRECTFB_H__
#include <directfb.h> #include <directfb.h>
#include <fusion/reactor.h> #include <fusion/reactor.h>
#include <core/coredefs.h>
#include <core/coretypes.h> #include <core/coretypes.h>
/* /*
* private data struct of IDirectFB * private data struct of IDirectFB
*/ */
typedef struct { typedef struct {
int ref; /* reference counter */ int ref; /* reference counter */
CoreDFB *core; CoreDFB *core;
DFBCooperativeLevel level; /* current cooperative level */ DFBCooperativeLevel level; /* current cooperative level */
skipping to change at line 64 skipping to change at line 65
DFBSurfacePixelFormat format; /* from SetVideoMode() parameter s. */ DFBSurfacePixelFormat format; /* from SetVideoMode() parameter s. */
CoreWindow *window; /* implicitly created window */ CoreWindow *window; /* implicitly created window */
Reaction reaction; /* for the focus listener */ Reaction reaction; /* for the focus listener */
bool focused; /* primary's window has the focu s */ bool focused; /* primary's window has the focu s */
CoreLayerContext *context; /* context for fullscreen primar y */ CoreLayerContext *context; /* context for fullscreen primar y */
} primary; /* Used for DFSCL_NORMAL's prima ry. */ } primary; /* Used for DFSCL_NORMAL's prima ry. */
bool app_focus; bool app_focus;
struct {
CoreLayer *layer;
CoreLayerContext *context;
CoreLayerRegion *region;
CoreSurface *surface;
CorePalette *palette;
} layers[MAX_LAYERS];
} IDirectFB_data; } IDirectFB_data;
/* /*
* IDirectFB constructor/destructor * IDirectFB constructor/destructor
*/ */
DFBResult IDirectFB_Construct ( IDirectFB *thiz, DFBResult IDirectFB_Construct ( IDirectFB *thiz,
CoreDFB *core ); CoreDFB *core );
void IDirectFB_Destruct ( IDirectFB *thiz ); void IDirectFB_Destruct ( IDirectFB *thiz );
 End of changes. 3 change blocks. 
1 lines changed or deleted 10 lines changed or added


 idirectfbdatabuffer.h   idirectfbdatabuffer.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 42 skipping to change at line 42
#include <core/core.h> #include <core/core.h>
/* /*
* private data struct of IDirectFBDataBuffer * private data struct of IDirectFBDataBuffer
*/ */
typedef struct { typedef struct {
int ref; /* reference counter */ int ref; /* reference counter */
char *filename; /* Only set if databuffer is created from fil e. */ char *filename; /* Only set if databuffer is created from fil e. */
CoreDFB *core; CoreDFB *core;
bool is_memory;
} IDirectFBDataBuffer_data; } IDirectFBDataBuffer_data;
/* /*
* private data struct of IDirectFBDataBuffer_File
*/
typedef struct {
IDirectFBDataBuffer_data base;
DirectStream *stream;
pthread_mutex_t mutex;
} IDirectFBDataBuffer_File_data;
/*
* private data struct of IDirectFBDataBuffer_Memory
*/
typedef struct {
IDirectFBDataBuffer_data base;
const void *buffer;
unsigned int length;
unsigned int pos;
} IDirectFBDataBuffer_Memory_data;
/*
* base constructor * base constructor
* *
* If the databuffer is created for a file, the filename can be provided * If the databuffer is created for a file, the filename can be provided
* for fallbacks. * for fallbacks.
*/ */
DFBResult IDirectFBDataBuffer_Construct( IDirectFBDataBuffer *thiz, DFBResult IDirectFBDataBuffer_Construct( IDirectFBDataBuffer *thiz,
const char *filename, const char *filename,
CoreDFB *core ); CoreDFB *core );
/* /*
 End of changes. 3 change blocks. 
1 lines changed or deleted 25 lines changed or added


 idirectfbdisplaylayer.h   idirectfbdisplaylayer.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 idirectfbfont.h   idirectfbfont.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 idirectfbimageprovider.h   idirectfbimageprovider.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 idirectfbinputbuffer.h   idirectfbinputbuffer.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 idirectfbinputdevice.h   idirectfbinputdevice.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 idirectfbpalette.h   idirectfbpalette.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 idirectfbscreen.h   idirectfbscreen.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 idirectfbsurface.h   idirectfbsurface.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 45 skipping to change at line 45
#include <fusion/reactor.h> #include <fusion/reactor.h>
#include <core/coretypes.h> #include <core/coretypes.h>
#include <core/state.h> #include <core/state.h>
/* /*
* private data struct of IDirectFBSurface * private data struct of IDirectFBSurface
*/ */
typedef struct { typedef struct {
DirectLink link;
int ref; /* reference counter */ int ref; /* reference counter */
DFBSurfaceCapabilities caps; /* capabilities */ DFBSurfaceCapabilities caps; /* capabilities */
struct { struct {
DFBRectangle wanted; /* passed to GetSubSurface */ DFBRectangle wanted; /* passed to GetSubSurface */
DFBRectangle granted; /* clipped by parent on creati on */ DFBRectangle granted; /* clipped by parent on creati on */
DFBRectangle current; /* currently available area */ DFBRectangle current; /* currently available area */
DFBInsets insets; /* actually set by the window manager */ DFBInsets insets; /* actually set by the window manager */
} area; } area;
bool limit_set; /* greanted rectangle set? bool limit_set; /* greanted rectangle set?
(GetSubSurface called with rect != NULL) */ (GetSubSurface called with rect != NULL) */
bool clip_set; /* fixed clip set? (SetClip ca lled bool clip_set; /* fixed clip set? (SetClip ca lled
with clip != NULL) */ with clip != NULL) */
DFBRegion clip_wanted; /* last region passed to SetCl ip DFBRegion clip_wanted; /* last region passed to SetCl ip
intersected by wanted area, intersected by wanted area,
only valid if clip_set != 0 */ only valid if clip_set != 0 */
int locked; /* which buffer is locked? */ CoreSurface *surface; /* buffer to show */
CoreSurface *surface; /* buffer to show */ bool locked; /* which buffer is locked? */
IDirectFBFont *font; /* font to use */ CoreSurfaceBufferLock lock;
IDirectFBFont *font; /* font to use */
CardState state; /* render state to use */ CardState state; /* render state to use */
DFBTextEncodingID encoding; /* text encoding */ DFBTextEncodingID encoding; /* text encoding */
struct { struct {
u8 r; /* red component */ u8 r; /* red component */
u8 g; /* green component */ u8 g; /* green component */
u8 b; /* blue component */ u8 b; /* blue component */
u32 value; /* r/g/b in surface's format * / u32 value; /* r/g/b in surface's format * /
} src_key; /* src key for blitting from } src_key; /* src key for blitting from
this surface */ this surface */
skipping to change at line 90 skipping to change at line 94
u8 r; /* red component */ u8 r; /* red component */
u8 g; /* green component */ u8 g; /* green component */
u8 b; /* blue component */ u8 b; /* blue component */
u32 value; /* r/g/b in surface's format * / u32 value; /* r/g/b in surface's format * /
} dst_key; /* dst key for blitting to } dst_key; /* dst key for blitting to
this surface */ this surface */
Reaction reaction; Reaction reaction;
CoreDFB *core; CoreDFB *core;
IDirectFBSurface *parent;
DirectLink *children_data;
pthread_mutex_t children_lock;
} IDirectFBSurface_data; } IDirectFBSurface_data;
/* /*
* initializes interface struct and private data * initializes interface struct and private data
*/ */
DFBResult IDirectFBSurface_Construct( IDirectFBSurface *thiz, DFBResult IDirectFBSurface_Construct( IDirectFBSurface *thiz,
IDirectFBSurface *parent,
DFBRectangle *req_rect, DFBRectangle *req_rect,
DFBRectangle *clip_rect, DFBRectangle *clip_rect,
DFBInsets *insets, DFBInsets *insets,
CoreSurface *surface, CoreSurface *surface,
DFBSurfaceCapabilities caps, DFBSurfaceCapabilities caps,
CoreDFB *core ); CoreDFB *core );
/* /*
* destroys surface(s) and frees private data * destroys surface(s) and frees private data
*/ */
void IDirectFBSurface_Destruct( IDirectFBSurface *thiz ); void IDirectFBSurface_Destruct( IDirectFBSurface *thiz );
/*
* internal
*/
void IDirectFBSurface_StopAll( IDirectFBSurface_data *data );
#endif #endif
 End of changes. 6 change blocks. 
4 lines changed or deleted 18 lines changed or added


 idirectfbsurface_layer.h   idirectfbsurface_layer.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 36 skipping to change at line 36
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __DIRECTFBSURFACE_LAYER_H__ #ifndef __DIRECTFBSURFACE_LAYER_H__
#define __DIRECTFBSURFACE_LAYER_H__ #define __DIRECTFBSURFACE_LAYER_H__
#include <directfb.h> #include <directfb.h>
#include <core/coretypes.h> #include <core/coretypes.h>
/* /*
* private data struct of IDirectFBSurface_Layer
*/
typedef struct {
IDirectFBSurface_data base; /* base Surface implementation */
CoreLayerRegion *region; /* the region this surface belongs to *
/
} IDirectFBSurface_Layer_data;
/*
* sets buffer mode according to capabilities, calls base classes * sets buffer mode according to capabilities, calls base classes
* IDirectFBSurface_Construct, reallocates private data and * IDirectFBSurface_Construct, reallocates private data and
* overloads functions of the interface * overloads functions of the interface
*/ */
DFBResult IDirectFBSurface_Layer_Construct( IDirectFBSurface *thiz, DFBResult IDirectFBSurface_Layer_Construct( IDirectFBSurface *thiz,
IDirectFBSurface *parent,
DFBRectangle *req_rec t, DFBRectangle *req_rec t,
DFBRectangle *clip_re ct, DFBRectangle *clip_re ct,
CoreLayerRegion *region, CoreLayerRegion *region,
DFBSurfaceCapabilities caps, DFBSurfaceCapabilities caps,
CoreDFB *core ); CoreDFB *core );
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 12 lines changed or added


 idirectfbsurface_window.h   idirectfbsurface_window.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 41 skipping to change at line 41
#include <directfb.h> #include <directfb.h>
#include <core/coretypes.h> #include <core/coretypes.h>
/* /*
* calls base classes IDirectFBSurface_Construct, * calls base classes IDirectFBSurface_Construct,
* reallocates private data and overloads functions of the interface * reallocates private data and overloads functions of the interface
*/ */
DFBResult IDirectFBSurface_Window_Construct( IDirectFBSurface *thiz, DFBResult IDirectFBSurface_Window_Construct( IDirectFBSurface *thiz,
IDirectFBSurface *parent ,
DFBRectangle *req_re ct, DFBRectangle *req_re ct,
DFBRectangle *clip_r ect, DFBRectangle *clip_r ect,
CoreWindow *window , CoreWindow *window ,
DFBSurfaceCapabilities caps, DFBSurfaceCapabilities caps,
CoreDFB *core ) ; CoreDFB *core ) ;
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 idirectfbvideoprovider.h   idirectfbvideoprovider.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 idirectfbwindow.h   idirectfbwindow.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 input.h   input.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 input_driver.h   input_driver.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 55 skipping to change at line 55
static DFBResult static DFBResult
driver_get_keymap_entry( CoreInputDevice *device, driver_get_keymap_entry( CoreInputDevice *device,
void *driver_data, void *driver_data,
DFBInputDeviceKeymapEntry *entry ); DFBInputDeviceKeymapEntry *entry );
static void static void
driver_close_device( void *driver_data ); driver_close_device( void *driver_data );
static const InputDriverFuncs driver_funcs = { static const InputDriverFuncs driver_funcs = {
GetAvailable: driver_get_available, .GetAvailable = driver_get_available,
GetDriverInfo: driver_get_info, .GetDriverInfo = driver_get_info,
OpenDevice: driver_open_device, .OpenDevice = driver_open_device,
GetKeymapEntry: driver_get_keymap_entry, .GetKeymapEntry = driver_get_keymap_entry,
CloseDevice: driver_close_device .CloseDevice = driver_close_device
}; };
#define DFB_INPUT_DRIVER(shortname) \ #define DFB_INPUT_DRIVER(shortname) \
__attribute__((constructor)) void directfb_##shortname(); \ __attribute__((constructor)) void directfb_##shortname(); \
\ \
void \ void \
directfb_##shortname() \ directfb_##shortname() \
{ \ { \
direct_modules_register( &dfb_input_modules, DFB_INPUT_DRIVER_ABI_VERS ION, \ direct_modules_register( &dfb_input_modules, DFB_INPUT_DRIVER_ABI_VERS ION, \
#shortname, &driver_funcs ); \ #shortname, &driver_funcs ); \
 End of changes. 2 change blocks. 
6 lines changed or deleted 6 lines changed or added


 interface.h   interface.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 32 skipping to change at line 32
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __DIRECT__INTERFACE_H__ #ifndef __DIRECT__INTERFACE_H__
#define __DIRECT__INTERFACE_H__ #define __DIRECT__INTERFACE_H__
#include <direct/build.h>
#include <direct/types.h>
#include <direct/debug.h> #include <direct/debug.h>
#include <direct/mem.h> #include <direct/mem.h>
#include <directfb.h> /* FIXME: needed for DECLARE_INTERFACE and DEFINE_ /*
INTERFACE */ * Forward declaration macro for interfaces.
/* the following hack can be removed if the above FIXME has been resolved * */
/ #define DECLARE_INTERFACE( IFACE ) \
#ifdef __APPLE__ typedef struct _##IFACE IFACE;
#undef main
#endif /*
* Macro for an interface definition.
*/
#define DEFINE_INTERFACE( IFACE, IDATA... ) \
struct _##IFACE { \
void *priv; \
int magic; \
\
DirectResult (*AddRef)( IFACE *thiz ); \
DirectResult (*Release)( IFACE *thiz ); \
\
IDATA \
};
/*
* Declare base interface
*/
DECLARE_INTERFACE( IAny ) DECLARE_INTERFACE( IAny )
DEFINE_INTERFACE( IAny )
/*
* Define base interface
*/
DEFINE_INTERFACE( IAny, )
/*
* Function type for probing of interface implementations
*/
typedef DirectResult (*DirectInterfaceGenericProbeFunc)( void *ctx, ... ); typedef DirectResult (*DirectInterfaceGenericProbeFunc)( void *ctx, ... );
/*
* Function type for initialization of interface instances
*/
typedef DirectResult (*DirectInterfaceGenericConstructFunc)( void *interfac e, ... ); typedef DirectResult (*DirectInterfaceGenericConstructFunc)( void *interfac e, ... );
/*
* Function table for interface implementations
*/
typedef struct { typedef struct {
const char * (*GetType)(void); const char * (*GetType)(void);
const char * (*GetImplementation)(void); const char * (*GetImplementation)(void);
DirectResult (*Allocate)( void **interface ); DirectResult (*Allocate)( void **interface );
DirectInterfaceGenericProbeFunc Probe; DirectInterfaceGenericProbeFunc Probe;
DirectInterfaceGenericConstructFunc Construct; DirectInterfaceGenericConstructFunc Construct;
} DirectInterfaceFuncs; } DirectInterfaceFuncs;
/*
* Callback type for user probing interface implementations
*/
typedef DirectResult (*DirectInterfaceProbeFunc)( DirectInterfaceFuncs *imp l, void *ctx ); typedef DirectResult (*DirectInterfaceProbeFunc)( DirectInterfaceFuncs *imp l, void *ctx );
/* /*
* Loads an interface of a specific 'type'. * Loads an interface of a specific 'type'.
* Optionally an 'implementation' can be chosen. * Optionally an 'implementation' can be chosen.
* A 'probe' function can be used to check available implementations. * A 'probe' function can be used to check available implementations.
* *
* After success 'funcs' is set. * After success 'funcs' is set.
*/ */
DirectResult DirectGetInterface( DirectInterfaceFuncs **funcs, DirectResult DirectGetInterface( DirectInterfaceFuncs **funcs,
skipping to change at line 89 skipping to change at line 120
DirectResult DirectProbeInterface( DirectInterfaceFuncs *funcs, void *ctx ) ; DirectResult DirectProbeInterface( DirectInterfaceFuncs *funcs, void *ctx ) ;
/* /*
* Called by implementation modules during 'dlopen'ing or at startup if lin ked * Called by implementation modules during 'dlopen'ing or at startup if lin ked
* into the executable. * into the executable.
*/ */
void DirectRegisterInterface( DirectInterfaceFuncs *funcs ); void DirectRegisterInterface( DirectInterfaceFuncs *funcs );
void direct_print_interface_leaks(void); void direct_print_interface_leaks(void);
#if DIRECT_BUILD_DEBUG || defined(DIRECT_ENABLE_DEBUG) || defined(DIRECT_FO
RCE_DEBUG)
#if !DIRECT_BUILD_DEBUGS
#error Building with debug, but library headers suggest that debug is not s
upported.
#endif
void direct_dbg_interface_add ( const char *func, void direct_dbg_interface_add ( const char *func,
const char *file, const char *file,
int line, int line,
const char *what, const char *what,
const void *interface, const void *interface,
const char *name ); const char *name );
void direct_dbg_interface_remove( const char *func, void direct_dbg_interface_remove( const char *func,
const char *file, const char *file,
int line, int line,
const char *what, const char *what,
const void *interface ); const void *interface );
#if DIRECT_BUILD_DEBUG || defined(DIRECT_ENABLE_DEBUG) || defined(DIRECT_FO
RCE_DEBUG)
#if !DIRECT_BUILD_DEBUGS
#warning Building with debug, but library headers suggest that debug is not
supported.
#endif
#define DIRECT_DBG_INTERFACE_ADD direct_dbg_interface_add #define DIRECT_DBG_INTERFACE_ADD direct_dbg_interface_add
#define DIRECT_DBG_INTERFACE_REMOVE direct_dbg_interface_remove #define DIRECT_DBG_INTERFACE_REMOVE direct_dbg_interface_remove
#else #else
#define DIRECT_DBG_INTERFACE_ADD(func,file,line,what,interface,name) do {} while (0) #define DIRECT_DBG_INTERFACE_ADD(func,file,line,what,interface,name) do {} while (0)
#define DIRECT_DBG_INTERFACE_REMOVE(func,file,line,what,interface) do {} while (0) #define DIRECT_DBG_INTERFACE_REMOVE(func,file,line,what,interface) do {} while (0)
#endif #endif
#define DIRECT_ALLOCATE_INTERFACE(p,i) \ #define DIRECT_ALLOCATE_INTERFACE(p,i) \
do { \ do { \
(p) = (__typeof__(p))D_CALLOC( 1, sizeof(i) ); \ (p) = (__typeof__(p))D_CALLOC( 1, sizeof(i) ); \
\ \
D_MAGIC_SET( (IAny*)(p), DirectInterface ); \ D_MAGIC_SET( (IAny*)(p), DirectInterface ); \
\ \
DIRECT_DBG_INTERFACE_ADD( __FUNCTION__, __FILE__, __LINE__, #p, p , #i ); \ DIRECT_DBG_INTERFACE_ADD( __FUNCTION__, __FILE__, __LINE__, #p, p , #i ); \
} while (0) } while (0)
#define DIRECT_ALLOCATE_INTERFACE_DATA(p,i) \ #define DIRECT_ALLOCATE_INTERFACE_DATA(p,i) \
i##_data *data; \ i##_data *data; \
\ \
D_MAGIC_ASSERT( (IAny*)(p), DirectInterface ); \ D_MAGIC_ASSERT( (IAny*)(p), DirectInterface ); \
skipping to change at line 153 skipping to change at line 184
} \ } \
\ \
D_MAGIC_CLEAR( (IAny*)(p) ); \ D_MAGIC_CLEAR( (IAny*)(p) ); \
\ \
D_FREE( (p) ); D_FREE( (p) );
#define DIRECT_INTERFACE_GET_DATA(i) \ #define DIRECT_INTERFACE_GET_DATA(i) \
i##_data *data; \ i##_data *data; \
\ \
if (!thiz) \ if (!thiz) \
return DFB_THIZNULL; \ return DR_THIZNULL; \
\ \
D_MAGIC_ASSERT( (IAny*)thiz, DirectInterface ); \ D_MAGIC_ASSERT( (IAny*)thiz, DirectInterface ); \
\ \
data = (i##_data*) thiz->priv; \ data = (i##_data*) thiz->priv; \
\ \
if (!data) \ if (!data) \
return DFB_DEAD; return DR_DEAD;
#define DIRECT_INTERFACE_GET_DATA_FROM(interface,data,prefix) \ #define DIRECT_INTERFACE_GET_DATA_FROM(interface,data,prefix) \
do { \ do { \
D_MAGIC_ASSERT( (IAny*)(interface), DirectInterface ); \ D_MAGIC_ASSERT( (IAny*)(interface), DirectInterface ); \
\ \
(data) = (prefix##_data*) (interface)->priv; \ (data) = (prefix##_data*) (interface)->priv; \
\ \
if (!(data)) \ if (!(data)) \
return DFB_DEAD; \ return DR_DEAD; \
} while (0) } while (0)
#endif #endif
 End of changes. 15 change blocks. 
24 lines changed or deleted 53 lines changed or added


 interface_implementation.h   interface_implementation.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 39 skipping to change at line 39
#ifndef __DIRECT__INTERFACE_IMPLEMENTATION_H__ #ifndef __DIRECT__INTERFACE_IMPLEMENTATION_H__
#define __DIRECT__INTERFACE_IMPLEMENTATION_H__ #define __DIRECT__INTERFACE_IMPLEMENTATION_H__
#include <direct/interface.h> #include <direct/interface.h>
static const char *GetType( void ); static const char *GetType( void );
static const char *GetImplementation( void ); static const char *GetImplementation( void );
static DirectResult Allocate( void **interface ); static DirectResult Allocate( void **interface );
static DirectInterfaceFuncs interface_funcs = { static DirectInterfaceFuncs interface_funcs = {
GetType: GetType, .GetType = GetType,
GetImplementation: GetImplementation, .GetImplementation = GetImplementation,
Allocate: Allocate, .Allocate = Allocate,
Probe: (DirectInterfaceGenericProbeFunc) Probe, .Probe = (DirectInterfaceGenericProbeFunc) Probe,
Construct: (DirectInterfaceGenericConstructFunc) Construct .Construct = (DirectInterfaceGenericConstructFunc) Construct
}; };
#define DIRECT_INTERFACE_IMPLEMENTATION(type, impl) \ #define DIRECT_INTERFACE_IMPLEMENTATION(type, impl) \
\ \
static const char * \ static const char * \
GetType( void ) \ GetType( void ) \
{ \ { \
return #type; \ return #type; \
} \ } \
\ \
static const char * \ static const char * \
GetImplementation( void ) \ GetImplementation( void ) \
{ \ { \
return #impl; \ return #impl; \
} \ } \
\ \
static DirectResult \ static DirectResult \
Allocate( void **interface ) \ Allocate( void **interface ) \
{ \ { \
DIRECT_ALLOCATE_INTERFACE( *interface, type ); \ DIRECT_ALLOCATE_INTERFACE( *interface, type ); \
return DFB_OK; \ return DR_OK; \
} \ } \
\ \
__attribute__((constructor)) void type##_##impl(void); \ __attribute__((constructor)) void type##_##impl(void); \
\ \
void \ void \
type##_##impl(void) \ type##_##impl(void) \
{ \ { \
DirectRegisterInterface( &interface_funcs ); \ DirectRegisterInterface( &interface_funcs ); \
} }
 End of changes. 3 change blocks. 
7 lines changed or deleted 7 lines changed or added


 layer_context.h   layer_context.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 83 skipping to change at line 83
DFBResult dfb_layer_context_get_configuration ( CoreLayerContext *context, DFBResult dfb_layer_context_get_configuration ( CoreLayerContext *context,
DFBDisplayLayerConfig *ret_config ); DFBDisplayLayerConfig *ret_config );
/* /*
* configuration details * configuration details
*/ */
DFBResult dfb_layer_context_set_src_colorkey ( CoreLayerContext *context, DFBResult dfb_layer_context_set_src_colorkey ( CoreLayerContext *context,
u8 r, u8 r,
u8 g, u8 g,
u8 u8
b ); b,
int
index );
DFBResult dfb_layer_context_set_dst_colorkey ( CoreLayerContext *context, DFBResult dfb_layer_context_set_dst_colorkey ( CoreLayerContext *context,
u8 r, u8 r,
u8 g, u8 g,
u8 u8
b ); b,
int
index );
DFBResult dfb_layer_context_set_sourcerectangle( CoreLayerContext *context, DFBResult dfb_layer_context_set_sourcerectangle( CoreLayerContext *context,
const DFBRectangle *source ); const DFBRectangle *source );
DFBResult dfb_layer_context_set_screenlocation ( CoreLayerContext *context, DFBResult dfb_layer_context_set_screenlocation ( CoreLayerContext *context,
const DFBLocation *location ); const DFBLocation *location );
DFBResult dfb_layer_context_set_screenrectangle( CoreLayerContext *context, DFBResult dfb_layer_context_set_screenrectangle( CoreLayerContext *context,
const DFBRectangle *rectangle ); const DFBRectangle *rectangle );
DFBResult dfb_layer_context_set_screenposition ( CoreLayerContext *context, DFBResult dfb_layer_context_set_screenposition ( CoreLayerContext *context,
int x, int x,
int y ); int y );
DFBResult dfb_layer_context_set_opacity ( CoreLayerContext *context, DFBResult dfb_layer_context_set_opacity ( CoreLayerContext *context,
u8 u8
opacity); opacity );
DFBResult dfb_layer_context_set_rotation ( CoreLayerContext
*context,
int
rotation );
DFBResult dfb_layer_context_set_coloradjustment( CoreLayerContext *context, DFBResult dfb_layer_context_set_coloradjustment( CoreLayerContext *context,
const DFBColorAdjustment *adjustment ); const DFBColorAdjustment *adjustment );
DFBResult dfb_layer_context_get_coloradjustment( CoreLayerContext *context, DFBResult dfb_layer_context_get_coloradjustment( CoreLayerContext *context,
DFBColorAdjustment *ret_adjustment ); DFBColorAdjustment *ret_adjustment );
DFBResult dfb_layer_context_set_field_parity ( CoreLayerContext *context, DFBResult dfb_layer_context_set_field_parity ( CoreLayerContext *context,
int field ); int field );
DFBResult dfb_layer_context_set_clip_regions ( CoreLayerContext *context, DFBResult dfb_layer_context_set_clip_regions ( CoreLayerContext *context,
const DFBRegion *regions, const DFBRegion *regions,
int num_regions, int num_regions,
DFBBoolean positive ); DFBBoolean positive );
/* /*
* window control * window control
*/ */
DFBResult dfb_layer_context_create_window( CoreDFB *core, DFBResult dfb_layer_context_create_window( CoreDFB *cor
CoreLayerContext *context, e,
int x, CoreLayerContext *con
int y, text,
int width, const DFBWindowDescription *des
int height, c,
DFBWindowCapabilities caps, CoreWindow **ret
DFBSurfaceCapabilities surface_ _window );
caps,
DFBSurfacePixelFormat pixelfor
mat,
CoreWindow **window )
;
CoreWindow *dfb_layer_context_find_window( CoreLayerContext *con text, CoreWindow *dfb_layer_context_find_window( CoreLayerContext *con text,
DFBWindowID id ); DFBWindowID id );
CoreWindowStack *dfb_layer_context_windowstack( const CoreLayerContext *con text ); CoreWindowStack *dfb_layer_context_windowstack( const CoreLayerContext *con text );
bool dfb_layer_context_active ( const CoreLayerContext *con text ); bool dfb_layer_context_active ( const CoreLayerContext *con text );
/* /*
* Locking * Locking
 End of changes. 5 change blocks. 
20 lines changed or deleted 24 lines changed or added


 layer_control.h   layer_control.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 layer_region.h   layer_region.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 layers.h   layers.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 36 skipping to change at line 36
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __CORE__LAYERS_H__ #ifndef __CORE__LAYERS_H__
#define __CORE__LAYERS_H__ #define __CORE__LAYERS_H__
#include <directfb.h> #include <directfb.h>
#include <core/coretypes.h> #include <core/coretypes.h>
#include <core/gfxcard.h>
#include <core/surface_buffer.h>
struct __DFB_CoreLayerRegionConfig { struct __DFB_CoreLayerRegionConfig {
int width; /* width of the source in pixels */ int width; /* width of the source in pixels */
int height; /* height of the source i n pixels */ int height; /* height of the source i n pixels */
DFBSurfacePixelFormat format; /* pixel format of the so urce surface */ DFBSurfacePixelFormat format; /* pixel format of the so urce surface */
DFBSurfaceCapabilities surface_caps; /* capabilities of the so urce surface */ DFBSurfaceCapabilities surface_caps; /* capabilities of the so urce surface */
DFBDisplayLayerBufferMode buffermode; /* surface buffer configu ration */ DFBDisplayLayerBufferMode buffermode; /* surface buffer configu ration */
DFBDisplayLayerOptions options; /* various configuration options */ DFBDisplayLayerOptions options; /* various configuration options */
DFBDisplayLayerSourceID source_id; /* selected source */ DFBDisplayLayerSourceID source_id; /* selected source */
DFBRectangle source; /* viewport within source (input) */ DFBRectangle source; /* viewport within source (input) */
DFBRectangle dest; /* viewport on screen (ou tput) */ DFBRectangle dest; /* viewport on screen (ou tput) */
u8 opacity; /* global region alpha */ u8 opacity; /* global region alpha */
DFBColor src_key; /* source color key */ DFBColorKey src_key; /* source color key */
DFBColor dst_key; /* destination color key DFBColorKey dst_key; /* destination color key
*/ */
int parity; /* field parity (for inte rlaced) */ int parity; /* field parity (for inte rlaced) */
u8 alpha_ramp[4]; /* alpha values for 1 or 2 bit lookup */ u8 alpha_ramp[4]; /* alpha values for 1 or 2 bit lookup */
DFBRegion *clips; /* clip regions */ DFBRegion *clips; /* clip regions */
int num_clips; /* number of clip regions */ int num_clips; /* number of clip regions */
DFBBoolean positive; /* show or cut out region s */ DFBBoolean positive; /* show or cut out region s */
}; };
#if D_DEBUG_ENABLED
#define DFB_CORE_LAYER_REGION_CONFIG_DEBUG_AT( domain, config )
\
do {
\
const CoreLayerRegionConfig *_config = config;
\
\
D_DEBUG_AT( domain, " -> size %dx%d\n", _config->width, _c
onfig->height ); \
D_DEBUG_AT( domain, " -> format %s\n", dfb_pixelformat_name(
_config->format ) ); \
D_DEBUG_AT( domain, " -> surf caps 0x%08x\n", _config->surface_
caps ); \
D_DEBUG_AT( domain, " -> buffermode %d\n", _config->buffermode )
; \
D_DEBUG_AT( domain, " -> options 0x%08x\n", _config->options
); \
D_DEBUG_AT( domain, " -> source %d,%d-%dx%d\n", DFB_RECTANGL
E_VALS(&_config->source) ); \
D_DEBUG_AT( domain, " -> dest %d,%d-%dx%d\n", DFB_RECTANGL
E_VALS(&_config->dest) ); \
D_DEBUG_AT( domain, " -> opacity %d\n", _config->opacity );
\
D_DEBUG_AT( domain, " -> src_key %02x%02x%02x (index %d)\n",
DFB_COLORKEY_VALS(&_config->src_key) ); \
D_DEBUG_AT( domain, " -> dst_key %02x%02x%02x (index %d)\n",
DFB_COLORKEY_VALS(&_config->dst_key) ); \
} while (0)
#else
#define DFB_CORE_LAYER_REGION_CONFIG_DEBUG_AT( domain, config )
\
do {
\
} while (0)
#endif
typedef enum { typedef enum {
CLRCF_NONE = 0x00000000, CLRCF_NONE = 0x00000000,
CLRCF_WIDTH = 0x00000001, CLRCF_WIDTH = 0x00000001,
CLRCF_HEIGHT = 0x00000002, CLRCF_HEIGHT = 0x00000002,
CLRCF_FORMAT = 0x00000004, CLRCF_FORMAT = 0x00000004,
CLRCF_SURFACE_CAPS = 0x00000008, CLRCF_SURFACE_CAPS = 0x00000008,
CLRCF_BUFFERMODE = 0x00000010, CLRCF_BUFFERMODE = 0x00000010,
CLRCF_OPTIONS = 0x00000020, CLRCF_OPTIONS = 0x00000020,
skipping to change at line 91 skipping to change at line 116
CLRCF_ALPHA_RAMP = 0x00002000, CLRCF_ALPHA_RAMP = 0x00002000,
CLRCF_SRCKEY = 0x00010000, CLRCF_SRCKEY = 0x00010000,
CLRCF_DSTKEY = 0x00020000, CLRCF_DSTKEY = 0x00020000,
CLRCF_PARITY = 0x00100000, CLRCF_PARITY = 0x00100000,
CLRCF_SURFACE = 0x10000000, CLRCF_SURFACE = 0x10000000,
CLRCF_PALETTE = 0x20000000, CLRCF_PALETTE = 0x20000000,
CLRCF_ALL = 0x3013377F CLRCF_FREEZE = 0x80000000,
CLRCF_ALL = 0xB013377F
} CoreLayerRegionConfigFlags; } CoreLayerRegionConfigFlags;
typedef struct { typedef struct {
/** Driver Control **/ /** Driver Control **/
/* /*
* Return size of layer data (shared memory). * Return size of layer data (shared memory).
*/ */
int (*LayerDataSize) (); int (*LayerDataSize) ();
skipping to change at line 195 skipping to change at line 222
* Setup hardware, called once after AddRegion() or when parameters * Setup hardware, called once after AddRegion() or when parameters
* have changed. Surface and palette are only set if updated or new. * have changed. Surface and palette are only set if updated or new.
*/ */
DFBResult (*SetRegion) ( CoreLayer *layer, DFBResult (*SetRegion) ( CoreLayer *layer,
void *driver_data, void *driver_data,
void *layer_data, void *layer_data,
void *region_data, void *region_data,
CoreLayerRegionConfig *config, CoreLayerRegionConfig *config,
CoreLayerRegionConfigFlags updated, CoreLayerRegionConfigFlags updated,
CoreSurface *surface, CoreSurface *surface,
CorePalette *palette ); CorePalette *palette,
CoreSurfaceBufferLock *lock );
/* /*
* Remove a region from the layer. * Remove a region from the layer.
*/ */
DFBResult (*RemoveRegion) ( CoreLayer *layer, DFBResult (*RemoveRegion) ( CoreLayer *layer,
void *driver_data, void *driver_data,
void *layer_data, void *layer_data,
void *region_data ); void *region_data );
/* /*
* Flip the surface of the region. * Flip the surface of the region.
*/ */
DFBResult (*FlipRegion) ( CoreLayer *layer, DFBResult (*FlipRegion) ( CoreLayer *layer,
void *driver_data, void *driver_data,
void *layer_data, void *layer_data,
void *region_data, void *region_data,
CoreSurface *surface, CoreSurface *surface,
DFBSurfaceFlipFlags flags ); DFBSurfaceFlipFlags flags,
CoreSurfaceBufferLock *lock );
/* /*
* Indicate updates to the front buffer content. * Indicate updates to the front buffer content.
*/ */
DFBResult (*UpdateRegion) ( CoreLayer *layer, DFBResult (*UpdateRegion) ( CoreLayer *layer,
void *driver_data, void *driver_data,
void *layer_data, void *layer_data,
void *region_data, void *region_data,
CoreSurface *surface, CoreSurface *surface,
const DFBRegion *update ); const DFBRegion *update,
CoreSurfaceBufferLock *lock );
/* /*
* Control hardware deinterlacing. * Control hardware deinterlacing.
*/ */
DFBResult (*SetInputField)( CoreLayer *layer, DFBResult (*SetInputField)( CoreLayer *layer,
void *driver_data, void *driver_data,
void *layer_data, void *layer_data,
void *region_data, void *region_data,
int field ); int field );
skipping to change at line 271 skipping to change at line 301
void *layer_data, void *layer_data,
void *region_data, void *region_data,
CoreSurface *surface ); CoreSurface *surface );
} DisplayLayerFuncs; } DisplayLayerFuncs;
/* /*
* Add a layer to a graphics device by pointing to a table * Add a layer to a graphics device by pointing to a table
* containing driver functions. The supplied driver data * containing driver functions. The supplied driver data
* will be passed to these functions. * will be passed to these functions.
*/ */
CoreLayer *dfb_layers_register( CoreScreen *screen, CoreLayer *dfb_layers_register( CoreScreen *screen,
void *driver_data, void *driver_data,
DisplayLayerFuncs *funcs ); const DisplayLayerFuncs *funcs );
/* /*
* Replace functions of the primary layer implementation by passing * Replace functions of the primary layer implementation by passing
* an alternative driver function table. All non-NULL functions in the new * an alternative driver function table. All non-NULL functions in the new
* table replace the functions in the original function table. * table replace the functions in the original function table.
* The original function table is written to 'primary_funcs' before to allo w * The original function table is written to 'primary_funcs' before to allo w
* drivers to use existing functionality from the original implementation. * drivers to use existing functionality from the original implementation.
*/ */
CoreLayer *dfb_layers_hook_primary( GraphicsDevice *device, CoreLayer *dfb_layers_hook_primary( CoreGraphicsDevice *device,
void *driver_data, void *driver_data,
DisplayLayerFuncs *funcs, DisplayLayerFuncs *funcs,
DisplayLayerFuncs *primary_funcs, DisplayLayerFuncs *primary_funcs,
void **primary_driver_data ); void **primary_driver_data );
/* /*
* Replace functions of the primary layer implementation completely by pass ing * Replace functions of the primary layer implementation completely by pass ing
* an alternative driver function table. * an alternative driver function table.
*/ */
CoreLayer *dfb_layers_replace_primary( GraphicsDevice *device, CoreLayer *dfb_layers_replace_primary( CoreGraphicsDevice *device,
void *driver_data, void *driver_data,
DisplayLayerFuncs *funcs ); DisplayLayerFuncs *funcs );
typedef DFBEnumerationResult (*DisplayLayerCallback) (CoreLayer *layer, typedef DFBEnumerationResult (*DisplayLayerCallback) (CoreLayer *layer,
void *ctx); void *ctx);
void dfb_layers_enumerate( DisplayLayerCallback callback, void dfb_layers_enumerate( DisplayLayerCallback callback,
void *ctx ); void *ctx );
int dfb_layer_num(); int dfb_layer_num();
 End of changes. 11 change blocks. 
13 lines changed or deleted 59 lines changed or added


 layers_internal.h   layers_internal.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 80 skipping to change at line 80
CoreLayerContexts contexts; CoreLayerContexts contexts;
bool suspended; bool suspended;
FusionVector added_regions; FusionVector added_regions;
FusionSHMPoolShared *shmpool; FusionSHMPoolShared *shmpool;
} CoreLayerShared; } CoreLayerShared;
struct __DFB_CoreLayer { struct __DFB_CoreLayer {
CoreLayerShared *shared; CoreLayerShared *shared;
CoreDFB *core; CoreDFB *core;
GraphicsDevice *device; CoreGraphicsDevice *device;
CoreScreen *screen; CoreScreen *screen;
void *driver_data; void *driver_data;
void *layer_data; /* copy of shared->layer_data */ void *layer_data; /* copy of shared->layer_data *
/
DisplayLayerFuncs *funcs; const DisplayLayerFuncs *funcs;
CardState state; CardState state;
}; };
typedef enum { typedef enum {
CLLM_LOCATION, /* Keep normalized area. */ CLLM_LOCATION, /* Keep normalized area. */
CLLM_CENTER, /* Center layer after resizing destination area. * / CLLM_CENTER, /* Center layer after resizing destination area. * /
CLLM_POSITION, /* Keep pixel position, but resize area. */ CLLM_POSITION, /* Keep pixel position, but resize area. */
CLLM_RECTANGLE /* Keep pixel based area. */ CLLM_RECTANGLE /* Keep pixel based area. */
} CoreLayerLayoutMode; } CoreLayerLayoutMode;
struct __DFB_CoreLayerContext { struct __DFB_CoreLayerContext {
FusionObject object; FusionObject object;
DFBDisplayLayerID layer_id; DFBDisplayLayerID layer_id;
FusionSkirmish lock; FusionSkirmish lock;
bool active; /* Is this the active context? */ bool active; /* Is this the active context? */
DFBDisplayLayerConfig config; /* Current layer configuration . */ DFBDisplayLayerConfig config; /* Current layer configuration . */
int rotation;
FusionVector regions; /* All regions created within FusionVector regions; /* All regions created within
this context. */ this context. */
struct { struct {
CoreLayerRegion *region; /* Region of layer config if b uffer CoreLayerRegion *region; /* Region of layer config if b uffer
mode is not DLBM_WINDOWS. * / mode is not DLBM_WINDOWS. * /
CoreLayerRegionConfig config; /* Region config used to imple ment CoreLayerRegionConfig config; /* Region config used to imple ment
layer config and settings. */ layer config and settings. */
} primary; } primary;
skipping to change at line 148 skipping to change at line 149
}; };
typedef enum { typedef enum {
CLRSF_NONE = 0x00000000, CLRSF_NONE = 0x00000000,
CLRSF_CONFIGURED = 0x00000001, CLRSF_CONFIGURED = 0x00000001,
CLRSF_ENABLED = 0x00000002, CLRSF_ENABLED = 0x00000002,
CLRSF_ACTIVE = 0x00000004, CLRSF_ACTIVE = 0x00000004,
CLRSF_REALIZED = 0x00000008, CLRSF_REALIZED = 0x00000008,
CLRSF_ALL = 0x0000000F CLRSF_FROZEN = 0x00000010,
CLRSF_ALL = 0x0000001F
} CoreLayerRegionStateFlags; } CoreLayerRegionStateFlags;
struct __DFB_CoreLayerRegion { struct __DFB_CoreLayerRegion {
FusionObject object; FusionObject object;
CoreLayerContext *context; CoreLayerContext *context;
FusionSkirmish lock; FusionSkirmish lock;
CoreLayerRegionStateFlags state; CoreLayerRegionStateFlags state;
CoreLayerRegionConfig config; CoreLayerRegionConfig config;
CoreSurface *surface; CoreSurface *surface;
CoreSurfaceBufferLock surface_lock;
GlobalReaction surface_reaction; GlobalReaction surface_reaction;
void *region_data; void *region_data;
}; };
/* Called at the end of dfb_layer_region_create(). */ /* Called at the end of dfb_layer_region_create(). */
DFBResult dfb_layer_context_add_region( CoreLayerContext *context, DFBResult dfb_layer_context_add_region( CoreLayerContext *context,
CoreLayerRegion *region ); CoreLayerRegion *region );
/* Called early in the region_destructor(). */ /* Called early in the region_destructor(). */
 End of changes. 11 change blocks. 
10 lines changed or deleted 15 lines changed or added


 list.h   list.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 93 skipping to change at line 93
*list = link->prev = link; *list = link->prev = link;
D_MAGIC_SET( link, DirectLink ); D_MAGIC_SET( link, DirectLink );
} }
static __inline__ bool static __inline__ bool
direct_list_contains_element_EXPENSIVE( DirectLink *list, DirectLink *link ) direct_list_contains_element_EXPENSIVE( DirectLink *list, DirectLink *link )
{ {
D_MAGIC_ASSERT_IF( list, DirectLink ); D_MAGIC_ASSERT_IF( list, DirectLink );
if (!link->prev && !link->next)
return false;
// D_MAGIC_ASSERT( link, DirectLink );
while (list) { while (list) {
if (list == link) if (list == link)
return true; return true;
list = list->next; list = list->next;
} }
return false; return false;
} }
 End of changes. 2 change blocks. 
6 lines changed or deleted 1 lines changed or added


 lock.h   lock.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 37 skipping to change at line 37
*/ */
#ifndef __FUSION__LOCK_H__ #ifndef __FUSION__LOCK_H__
#define __FUSION__LOCK_H__ #define __FUSION__LOCK_H__
#include <pthread.h> #include <pthread.h>
#include <fusion/types.h> #include <fusion/types.h>
#include <direct/messages.h> #include <direct/messages.h>
#include <direct/util.h>
typedef union { typedef union {
/* multi app */ /* multi app */
struct { struct {
int id; int id;
const FusionWorldShared *shared; const FusionWorldShared *shared;
/* builtin impl */
struct {
unsigned int locked;
pid_t owner;
DirectLink *waiting;
bool requested;
bool destroyed;
} builtin;
} multi; } multi;
/* single app */ /* single app */
struct { struct {
pthread_mutex_t lock; pthread_mutex_t lock;
pthread_cond_t cond;
int count;
} single; } single;
} FusionSkirmish; } FusionSkirmish;
/* /*
* Initialize. * Initialize.
*/ */
DirectResult fusion_skirmish_init ( FusionSkirmish *skirmish, DirectResult fusion_skirmish_init ( FusionSkirmish *skirmish,
const char *name, const char *name,
const FusionWorld *world ); const FusionWorld *world );
skipping to change at line 83 skipping to change at line 94
/* /*
* Unlock. * Unlock.
*/ */
DirectResult fusion_skirmish_dismiss( FusionSkirmish *skirmish ); DirectResult fusion_skirmish_dismiss( FusionSkirmish *skirmish );
/* /*
* Deinitialize. * Deinitialize.
*/ */
DirectResult fusion_skirmish_destroy( FusionSkirmish *skirmish ); DirectResult fusion_skirmish_destroy( FusionSkirmish *skirmish );
/*
* Wait & Notify.
*
* Must be locked!
*/
DirectResult fusion_skirmish_wait ( FusionSkirmish *skirmish,
unsigned int timeout );
DirectResult fusion_skirmish_notify ( FusionSkirmish *skirmish );
#if D_DEBUG_ENABLED #if D_DEBUG_ENABLED
#define FUSION_SKIRMISH_ASSERT(skirmish) \ #define FUSION_SKIRMISH_ASSERT(skirmish) \
do { \ do { \
int lock_count; \ int lock_count; \
\ \
D_ASSERT( skirmish != NULL ); \ D_ASSERT( skirmish != NULL ); \
\ \
D_ASSERT( fusion_skirmish_lock_count( skirmish, &lock_count ) == DFB_OK ); \ D_ASSERT( fusion_skirmish_lock_count( skirmish, &lock_count ) == DR_OK ); \
D_ASSERT( lock_count > 0 ); \ D_ASSERT( lock_count > 0 ); \
} while (0) } while (0)
#else #else
#define FUSION_SKIRMISH_ASSERT(skirmish) \ #define FUSION_SKIRMISH_ASSERT(skirmish) \
do { \ do { \
} while (0) } while (0)
#endif #endif
#endif #endif
 End of changes. 6 change blocks. 
2 lines changed or deleted 22 lines changed or added


 log.h   log.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 72 skipping to change at line 72
* otherwise stderr is used a fallback until now. * otherwise stderr is used a fallback until now.
*/ */
DirectResult direct_log_printf ( DirectLog *log, DirectResult direct_log_printf ( DirectLog *log,
const char *format, ... ) D_FOR MAT_PRINTF(2); const char *format, ... ) D_FOR MAT_PRINTF(2);
/* /*
* Set the default log that's used when no valid log is passed. * Set the default log that's used when no valid log is passed.
*/ */
DirectResult direct_log_set_default( DirectLog *log ); DirectResult direct_log_set_default( DirectLog *log );
/*
* Locks a logging facility for non-intermixed output of multiple calls in
multiple threads. Not mandatory.
*/
void direct_log_lock ( DirectLog *log );
/*
* Unlocks a logging facility.
*/
void direct_log_unlock ( DirectLog *log );
/*
* Returns the default log.
*/
DirectLog *direct_log_default( void );
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 17 lines changed or added


 mem.h   mem.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 memcpy.h   memcpy.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 messages.h   messages.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 33 skipping to change at line 33
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __DIRECT__MESSAGES_H__ #ifndef __DIRECT__MESSAGES_H__
#define __DIRECT__MESSAGES_H__ #define __DIRECT__MESSAGES_H__
#include <direct/build.h> #include <direct/build.h>
#include <direct/types.h>
#if __GNUC__ >= 3 #if __GNUC__ >= 3
#define D_FORMAT_PRINTF(n) __attribute__((__format__ (__printf__, n , n+1))) #define D_FORMAT_PRINTF(n) __attribute__((__format__ (__printf__, n , n+1)))
#else #else
#define D_FORMAT_PRINTF(n) #define D_FORMAT_PRINTF(n)
#endif #endif
typedef enum {
DMT_NONE = 0x00000000, /* No message type. */
DMT_BANNER = 0x00000001, /* Startup banner. */
DMT_INFO = 0x00000002, /* Info messages. */
DMT_WARNING = 0x00000004, /* Warnings. */
DMT_ERROR = 0x00000008, /* Error messages: regular, with DFBR
esult, bugs,
system call errors, dlopen errors
*/
DMT_UNIMPLEMENTED = 0x00000010, /* Messages notifying unimplemented f
unctionality. */
DMT_ONCE = 0x00000020, /* One-shot messages .*/
DMT_ALL = 0x0000003f /* All types. */
} DirectMessageType;
#if DIRECT_BUILD_TEXT #if DIRECT_BUILD_TEXT
#include <errno.h> #include <errno.h>
#include <direct/conf.h> #include <direct/conf.h>
void direct_messages_info ( const char *format, ... ) D_FORMAT_PRI NTF(1); void direct_messages_info ( const char *format, ... ) D_FORMAT_PRI NTF(1);
void direct_messages_error ( const char *format, ... ) D_FORMAT_PRI NTF(1); void direct_messages_error ( const char *format, ... ) D_FORMAT_PRI NTF(1);
skipping to change at line 79 skipping to change at line 94
const char *file, const char *file,
int line, int line,
const char *format, ... ) D_FORMAT_PRI NTF(4); const char *format, ... ) D_FORMAT_PRI NTF(4);
void direct_messages_warn ( const char *func, void direct_messages_warn ( const char *func,
const char *file, const char *file,
int line, int line,
const char *format, ... ) D_FORMAT_PRI NTF(4); const char *format, ... ) D_FORMAT_PRI NTF(4);
#define D_INFO(x...) do { \ #define D_INFO(x...) do { \
if (!direct_config->quiet) \ if (!(direct_config->quiet & DMT_INFO)) \
direct_messages_info( x ); \ direct_messages_info( x ); \
} while (0) } while (0)
#define D_ERROR(x...) do { \ #define D_ERROR(x...) do { \
if (!direct_config->quiet) \ if (!(direct_config->quiet & DMT_ERROR)) \
direct_messages_error( x ); \ direct_messages_error( x ); \
} while (0) } while (0)
#define D_DERROR(r,x...) do { \ #define D_DERROR(r,x...) do { \
if (!direct_config->quiet) \ if (!(direct_config->quiet & DMT_ERROR)) \
direct_messages_derror( r, x ); \ direct_messages_derror( r, x ); \
} while (0) } while (0)
#define D_PERROR(x...) do { \ #define D_PERROR(x...) do { \
if (!direct_config->quiet) \ if (!(direct_config->quiet & DMT_ERROR)) \
direct_messages_perror( errno, x ); \ direct_messages_perror( errno, x ); \
} while (0) } while (0)
#define D_DLERROR(x...) do { \ #define D_DLERROR(x...) do { \
if (!direct_config->quiet) \ if (!(direct_config->quiet & DMT_ERROR)) \
direct_messages_dlerror( dlerror(), x ); \ direct_messages_dlerror( dlerror(), x ); \
} while (0) } while (0)
#define D_ONCE(x...) do { \ #define D_ONCE(x...) do { \
if (!direct_config->quiet) { \ if (!(direct_config->quiet & DMT_ONCE)) { \
static bool first = true; \ static bool first = true; \
if (first) { \ if (first) { \
direct_messages_once( __FUNCTION__, \ direct_messages_once( __FUNCTION__, \
__FILE__, __L INE__, x ); \ __FILE__, __L INE__, x ); \
first = false; \ first = false; \
} \ } \
} \ } \
} while (0) } while (0)
#define D_UNIMPLEMENTED() do { \ #define D_UNIMPLEMENTED() do { \
if (!direct_config->quiet) { \ if (!(direct_config->quiet & DMT_UNIMPLEMENTE D)) { \
static bool first = true; \ static bool first = true; \
if (first) { \ if (first) { \
direct_messages_unimplemented( __FU NCTION__, \ direct_messages_unimplemented( __FU NCTION__, \
__FI LE__, __LINE__ ); \ __FI LE__, __LINE__ ); \
first = false; \ first = false; \
} \ } \
} \ } \
} while (0) } while (0)
#define D_BUG(x...) do { \ #define D_BUG(x...) do { \
if (!direct_config->quiet) \ if (!(direct_config->quiet & DMT_ERROR)) \
direct_messages_bug( __FUNCTION__, __FIL E__, __LINE__, x ); \ direct_messages_bug( __FUNCTION__, __FIL E__, __LINE__, x ); \
} while (0) } while (0)
#define D_WARN(x...) do { \ #define D_WARN(x...) do { \
if (!direct_config->quiet) \ if (!(direct_config->quiet & DMT_WARNING)) \
direct_messages_warn( __FUNCTION__, __FI LE__, __LINE__, x );\ direct_messages_warn( __FUNCTION__, __FI LE__, __LINE__, x );\
} while (0) } while (0)
#define D_OOM() (direct_messages_warn( __FUNCTION__, __FILE__, __L INE__, \ #define D_OOM() (direct_messages_warn( __FUNCTION__, __FILE__, __L INE__, \
"out of memory" ), DFB_NOSY STEMMEMORY) "out of memory" ), DR_NOLOC ALMEMORY)
#else #else
#define D_INFO(x...) do { } while (0) #define D_INFO(x...) do { } while (0)
#define D_ERROR(x...) do { } while (0) #define D_ERROR(x...) do { } while (0)
#define D_DERROR(x...) do { } while (0) #define D_DERROR(x...) do { } while (0)
#define D_PERROR(x...) do { } while (0) #define D_PERROR(x...) do { } while (0)
#define D_DLERROR(x...) do { } while (0) #define D_DLERROR(x...) do { } while (0)
#define D_ONCE(x...) do { } while (0) #define D_ONCE(x...) do { } while (0)
#define D_UNIMPLEMENTED() do { } while (0) #define D_UNIMPLEMENTED() do { } while (0)
#define D_BUG(x...) do { } while (0) #define D_BUG(x...) do { } while (0)
#define D_WARN(x...) do { } while (0) #define D_WARN(x...) do { } while (0)
#define D_OOM() (DFB_NOSYSTEMMEMORY) #define D_OOM() (printf("out of memory\n"), DR_NOLOCALME MORY)
#endif #endif
#endif #endif
 End of changes. 14 change blocks. 
12 lines changed or deleted 30 lines changed or added


 modules.h   modules.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 object.h   object.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 40 skipping to change at line 40
#define __FUSION__OBJECT_H__ #define __FUSION__OBJECT_H__
#include <fusion/types.h> #include <fusion/types.h>
#include <fusion/lock.h> #include <fusion/lock.h>
#include <direct/list.h> #include <direct/list.h>
#include <fusion/ref.h> #include <fusion/ref.h>
#include <fusion/reactor.h> #include <fusion/reactor.h>
#include <direct/debug.h> #include <direct/debug.h>
typedef void (*FusionObjectDestructor)( FusionObject *object, bool zombie ) ; typedef void (*FusionObjectDestructor)( FusionObject *object, bool zombie, void *ctx );
typedef bool (*FusionPropIterator)( char *key, void *value, void *ctx); typedef bool (*FusionPropIterator)( char *key, void *value, void *ctx);
typedef unsigned long FusionObjectID; typedef unsigned long FusionObjectID;
typedef enum { typedef enum {
FOS_INIT, FOS_INIT,
FOS_ACTIVE, FOS_ACTIVE,
FOS_DEINIT FOS_DEINIT
} FusionObjectState; } FusionObjectState;
skipping to change at line 77 skipping to change at line 77
}; };
typedef bool (*FusionObjectCallback)( FusionObjectPool *pool, typedef bool (*FusionObjectCallback)( FusionObjectPool *pool,
FusionObject *object, FusionObject *object,
void *ctx ); void *ctx );
FusionObjectPool *fusion_object_pool_create ( const char *name, FusionObjectPool *fusion_object_pool_create ( const char *name,
int objec t_size, int objec t_size,
int messa ge_size, int messa ge_size,
FusionObjectDestructor destr uctor, FusionObjectDestructor destr uctor,
void *ctx,
const FusionWorld *world ); const FusionWorld *world );
DirectResult fusion_object_pool_destroy( FusionObjectPool *pool, DirectResult fusion_object_pool_destroy( FusionObjectPool *pool,
const FusionWorld *world ); const FusionWorld *world );
DirectResult fusion_object_pool_enum ( FusionObjectPool *pool, DirectResult fusion_object_pool_enum ( FusionObjectPool *pool,
FusionObjectCallback callb ack, FusionObjectCallback callb ack,
void *ctx ) ; void *ctx ) ;
FusionObject *fusion_object_create ( FusionObjectPool *pool, FusionObject *fusion_object_create ( FusionObjectPool *pool,
skipping to change at line 126 skipping to change at line 127
ReactionFunc func, \ ReactionFunc func, \
void *ctx, \ void *ctx, \
Reaction *ret_reaction ) \ Reaction *ret_reaction ) \
{ \ { \
D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \ D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \
return fusion_reactor_attach( ((FusionObject*)object)->reactor, \ return fusion_reactor_attach( ((FusionObject*)object)->reactor, \
func, ctx, ret_reaction ); \ func, ctx, ret_reaction ); \
} \ } \
\ \
static inline DirectResult \ static inline DirectResult \
prefix##_attach_channel( type *object,
\
int channel,
\
ReactionFunc func,
\
void *ctx,
\
Reaction *ret_reaction )
\
{
\
D_MAGIC_ASSERT( (FusionObject*) object, FusionObject );
\
return fusion_reactor_attach_channel( ((FusionObject*)object)->reactor
, \
channel, func, ctx, ret_reaction
); \
}
\
\
static inline DirectResult
\
prefix##_detach( type *object, \ prefix##_detach( type *object, \
Reaction *reaction ) \ Reaction *reaction ) \
{ \ { \
D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \ D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \
return fusion_reactor_detach( ((FusionObject*)object)->reactor, \ return fusion_reactor_detach( ((FusionObject*)object)->reactor, \
reaction ); \ reaction ); \
} \ } \
\ \
static inline DirectResult \ static inline DirectResult \
prefix##_attach_global( type *object, \ prefix##_attach_global( type *object, \
skipping to change at line 165 skipping to change at line 178
prefix##_dispatch( type *object, \ prefix##_dispatch( type *object, \
void *message, \ void *message, \
const ReactionFunc *globals ) \ const ReactionFunc *globals ) \
{ \ { \
D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \ D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \
return fusion_reactor_dispatch( ((FusionObject*)object)->reactor, \ return fusion_reactor_dispatch( ((FusionObject*)object)->reactor, \
message, true, globals ); \ message, true, globals ); \
} \ } \
\ \
static inline DirectResult \ static inline DirectResult \
prefix##_dispatch_channel( type *object,
\
int channel,
\
void *message,
\
int size,
\
const ReactionFunc *globals )
\
{
\
D_MAGIC_ASSERT( (FusionObject*) object, FusionObject );
\
return fusion_reactor_dispatch_channel( ((FusionObject*)object)->react
or, \
channel, message, size, true, globals
); \
}
\
\
static inline DirectResult
\
prefix##_ref( type *object ) \ prefix##_ref( type *object ) \
{ \ { \
D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \ D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \
return fusion_ref_up( &((FusionObject*)object)->ref, false ); \ return fusion_ref_up( &((FusionObject*)object)->ref, false ); \
} \ } \
\ \
static inline DirectResult \ static inline DirectResult \
prefix##_unref( type *object ) \ prefix##_unref( type *object ) \
{ \ { \
D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \ D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \
skipping to change at line 199 skipping to change at line 224
DirectResult ret; \ DirectResult ret; \
\ \
D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \ D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \
\ \
ret = fusion_ref_up( &((FusionObject*)object)->ref, true ); \ ret = fusion_ref_up( &((FusionObject*)object)->ref, true ); \
if (ret) \ if (ret) \
return ret; \ return ret; \
\ \
*link = object; \ *link = object; \
\ \
return DFB_OK; \ return DR_OK; \
} \ } \
\ \
static inline DirectResult \ static inline DirectResult \
prefix##_unlink( type **link ) \ prefix##_unlink( type **link ) \
{ \ { \
type *object = *link; \ type *object = *link; \
\ \
D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \ D_MAGIC_ASSERT( (FusionObject*) object, FusionObject ); \
\ \
*link = NULL; \ *link = NULL; \
 End of changes. 6 change blocks. 
3 lines changed or deleted 52 lines changed or added


 palette.h   palette.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 38 skipping to change at line 38
#ifndef __PALETTE_H__ #ifndef __PALETTE_H__
#define __PALETTE_H__ #define __PALETTE_H__
#include <directfb.h> #include <directfb.h>
#include <core/coretypes.h> #include <core/coretypes.h>
#include <fusion/object.h> #include <fusion/object.h>
struct _CorePalette { struct _CorePalette {
FusionObject object; FusionObject object;
int magic;
unsigned int num_entries; unsigned int num_entries;
DFBColor *entries; DFBColor *entries;
DFBColorYUV *entries_yuv;
struct { struct {
int index; int index;
DFBColor color; DFBColor color;
} search_cache; } search_cache;
bool hash_attached; bool hash_attached;
FusionSHMPoolShared *shmpool; FusionSHMPoolShared *shmpool;
}; };
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 pool.h   pool.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 property.h   property.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 47 skipping to change at line 47
FUSION_PROPERTY_AVAILABLE, FUSION_PROPERTY_AVAILABLE,
FUSION_PROPERTY_LEASED, FUSION_PROPERTY_LEASED,
FUSION_PROPERTY_PURCHASED FUSION_PROPERTY_PURCHASED
} FusionPropertyState; } FusionPropertyState;
typedef union { typedef union {
/* multi app */ /* multi app */
struct { struct {
int id; int id;
const FusionWorldShared *shared; const FusionWorldShared *shared;
/* builtin impl */
struct {
FusionPropertyState state;
pid_t owner;
bool requested;
bool destroyed;
} builtin;
} multi; } multi;
/* single app */ /* single app */
struct { struct {
pthread_mutex_t lock; pthread_mutex_t lock;
pthread_cond_t cond; pthread_cond_t cond;
FusionPropertyState state; FusionPropertyState state;
} single; } single;
} FusionProperty; } FusionProperty;
/* /*
* Initializes the property * Initializes the property
*/ */
DirectResult fusion_property_init (FusionProperty *property, DirectResult fusion_property_init (FusionProperty *property,
const FusionWorld *world); const FusionWorld *world);
/* /*
* Lease the property causing others to wait before leasing or purchasing. * Lease the property causing others to wait before leasing or purchasing.
* *
* Waits as long as property is leased by another party. * Waits as long as property is leased by another party.
* Returns DFB_BUSY if property is/gets purchased by another party. * Returns DR_BUSY if property is/gets purchased by another party.
* *
* Succeeds if property is available, * Succeeds if property is available,
* puts the property into 'leased' state. * puts the property into 'leased' state.
*/ */
DirectResult fusion_property_lease (FusionProperty *property); DirectResult fusion_property_lease (FusionProperty *property);
/* /*
* Purchase the property disallowing others to lease or purchase it. * Purchase the property disallowing others to lease or purchase it.
* *
* Waits as long as property is leased by another party. * Waits as long as property is leased by another party.
* Returns DFB_BUSY if property is/gets purchased by another party. * Returns DR_BUSY if property is/gets purchased by another party.
* *
* Succeeds if property is available, * Succeeds if property is available,
* puts the property into 'purchased' state and wakes up any waiting party. * puts the property into 'purchased' state and wakes up any waiting party.
*/ */
DirectResult fusion_property_purchase (FusionProperty *property); DirectResult fusion_property_purchase (FusionProperty *property);
/* /*
* Cede the property allowing others to lease or purchase it. * Cede the property allowing others to lease or purchase it.
* *
* Puts the property into 'available' state and wakes up one waiting party. * Puts the property into 'available' state and wakes up one waiting party.
 End of changes. 4 change blocks. 
3 lines changed or deleted 10 lines changed or added


 reactor.h   reactor.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 35 skipping to change at line 35
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __FUSION__REACTOR_H__ #ifndef __FUSION__REACTOR_H__
#define __FUSION__REACTOR_H__ #define __FUSION__REACTOR_H__
#include <direct/list.h> #include <direct/list.h>
#include <fusion/types.h> #include <fusion/types.h>
#include <fusion/call.h>
#include <fusion/lock.h> #include <fusion/lock.h>
typedef enum { typedef enum {
RS_OK, RS_OK,
RS_REMOVE, RS_REMOVE,
RS_DROP RS_DROP
} ReactionResult; } ReactionResult;
typedef ReactionResult (*ReactionFunc)( const void *msg_data, typedef ReactionResult (*ReactionFunc)( const void *msg_data,
void *ctx ); void *ctx );
skipping to change at line 93 skipping to change at line 94
* To avoid dead locks caused by alternating lock orders of the global reac tion * To avoid dead locks caused by alternating lock orders of the global reac tion
* lock and another lock, the default lock is replaced by the other lock. * lock and another lock, the default lock is replaced by the other lock.
*/ */
DirectResult fusion_reactor_set_lock ( FusionReactor *reactor, DirectResult fusion_reactor_set_lock ( FusionReactor *reactor,
FusionSkirmish *skirmish ) ; FusionSkirmish *skirmish ) ;
DirectResult fusion_reactor_set_lock_only( FusionReactor *reactor, DirectResult fusion_reactor_set_lock_only( FusionReactor *reactor,
FusionSkirmish *lock ); FusionSkirmish *lock );
/* /*
* Attach a local reaction to the reactor. * Attach a local reaction to the reactor (channel 0).
*/ */
DirectResult fusion_reactor_attach ( FusionReactor *reactor, DirectResult fusion_reactor_attach ( FusionReactor *reactor,
ReactionFunc func, ReactionFunc func,
void *ctx, void *ctx,
Reaction *reaction ) ; Reaction *reaction ) ;
/* /*
* Attach a local reaction to a specific reactor channel (0-1023).
*/
DirectResult fusion_reactor_attach_channel( FusionReactor *reactor,
int channel,
ReactionFunc func,
void *ctx,
Reaction *reaction
);
/*
* Detach an attached local reaction from the reactor. * Detach an attached local reaction from the reactor.
*/ */
DirectResult fusion_reactor_detach ( FusionReactor *reactor, DirectResult fusion_reactor_detach ( FusionReactor *reactor,
Reaction *reaction ) ; Reaction *reaction ) ;
/* /*
* Attach a global reaction to the reactor. * Attach a global reaction to the reactor.
* *
* It's always called directly, no matter which Fusionee calls fusion_react or_dispatch(). * It's always called directly, no matter which Fusionee calls fusion_react or_dispatch().
* Any data referenced by the reaction function has to be in shared memory, unless it uses a * Any data referenced by the reaction function has to be in shared memory, unless it uses a
skipping to change at line 129 skipping to change at line 139
void *ctx, void *ctx,
GlobalReaction *reaction ) ; GlobalReaction *reaction ) ;
/* /*
* Detach an attached global reaction from the reactor. * Detach an attached global reaction from the reactor.
*/ */
DirectResult fusion_reactor_detach_global( FusionReactor *reactor, DirectResult fusion_reactor_detach_global( FusionReactor *reactor,
GlobalReaction *reaction ) ; GlobalReaction *reaction ) ;
/* /*
* Dispatch a message to any attached reaction. * Dispatch a message to any attached reaction (channel 0).
* *
* Setting 'self' to false excludes the caller's local reactions. * Setting 'self' to false excludes the caller's local reactions.
*/ */
DirectResult fusion_reactor_dispatch ( FusionReactor *reactor, DirectResult fusion_reactor_dispatch ( FusionReactor *reactor,
const void *msg_data, const void *msg_data,
bool self, bool self,
const ReactionFunc *globals ); const ReactionFunc *globals );
/* /*
* Dispatch a message to any attached reaction with a given size. Instead o f * Dispatch a message to any attached reaction with a given size. Instead o f
skipping to change at line 152 skipping to change at line 162
* *
* Setting 'self' to false excludes the caller's local reactions. * Setting 'self' to false excludes the caller's local reactions.
*/ */
DirectResult fusion_reactor_sized_dispatch( FusionReactor *reactor, DirectResult fusion_reactor_sized_dispatch( FusionReactor *reactor,
const void *msg_data, const void *msg_data,
int msg_size, int msg_size,
bool self, bool self,
const ReactionFunc *globals ) ; const ReactionFunc *globals ) ;
/* /*
* Dispatch a message via a specific channel (0-1023).
*
* Setting 'self' to false excludes the caller's local reactions.
*/
DirectResult fusion_reactor_dispatch_channel( FusionReactor *reactor
,
int channel
,
const void *msg_dat
a,
int msg_siz
e,
bool self,
const ReactionFunc *globals
);
/*
* Have the call executed when a dispatched message has been processed by a
ll recipients.
*/
DirectResult fusion_reactor_set_dispatch_callback( FusionReactor *reacto
r,
FusionCall *call,
void *call_p
tr );
/*
* Change the name of the reactor (debug).
*/
DirectResult fusion_reactor_set_name ( FusionReactor *reacto
r,
const char *name )
;
/*
* Specify whether local message handlers (reactions) should be called dire ctly. * Specify whether local message handlers (reactions) should be called dire ctly.
*/ */
DirectResult fusion_reactor_direct ( FusionReactor *reactor, DirectResult fusion_reactor_direct ( FusionReactor *reactor,
bool direct ); bool direct );
#endif #endif
 End of changes. 6 change blocks. 
3 lines changed or deleted 49 lines changed or added


 ref.h   ref.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 36 skipping to change at line 36
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __FUSION__REF_H__ #ifndef __FUSION__REF_H__
#define __FUSION__REF_H__ #define __FUSION__REF_H__
#include <pthread.h> #include <pthread.h>
#include <fusion/types.h> #include <fusion/types.h>
#include <fusion/call.h> #include <fusion/call.h>
#include <fusion/lock.h>
typedef union { typedef union {
/* multi app */ /* multi app */
struct { struct {
int id; int id;
const FusionWorldShared *shared; const FusionWorldShared *shared;
FusionID creator; FusionID creator;
/* builtin impl */
struct {
int local;
int global;
FusionSkirmish lock;
FusionCall *call;
int call_arg;
} builtin;
} multi; } multi;
/* single app */ /* single app */
struct { struct {
int refs; int refs;
pthread_cond_t cond; pthread_cond_t cond;
pthread_mutex_t lock; pthread_mutex_t lock;
bool destroyed; bool destroyed;
int waiting; int waiting;
skipping to change at line 116 skipping to change at line 126
* Inherit local reference count from another reference. * Inherit local reference count from another reference.
* *
* The local count of the other reference (and its inherited references) is added to this reference. * The local count of the other reference (and its inherited references) is added to this reference.
*/ */
DirectResult fusion_ref_inherit (FusionRef *ref, DirectResult fusion_ref_inherit (FusionRef *ref,
FusionRef *from); FusionRef *from);
/* /*
* Deinitialize. * Deinitialize.
* Can be called after successful zero_lock or zero_trylock * Can be called after successful zero_lock or zero_trylock
* so that waiting fusion_ref_up calls return with DFB_DESTROYED. * so that waiting fusion_ref_up calls return with DR_DESTROYED.
*/ */
DirectResult fusion_ref_destroy (FusionRef *ref); DirectResult fusion_ref_destroy (FusionRef *ref);
#endif #endif
 End of changes. 4 change blocks. 
2 lines changed or deleted 12 lines changed or added


 screen.h   screen.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 107 skipping to change at line 107
int outpu t, int outpu t,
const DFBScreenOutputConfig *confi g, const DFBScreenOutputConfig *confi g,
DFBScreenOutputConfigFlags *ret_f ailed ); DFBScreenOutputConfigFlags *ret_f ailed );
DFBResult dfb_screen_set_output_config ( CoreScreen *scree n, DFBResult dfb_screen_set_output_config ( CoreScreen *scree n,
int outpu t, int outpu t,
const DFBScreenOutputConfig *confi g ); const DFBScreenOutputConfig *confi g );
/* Screen configuration */ /* Screen configuration */
DFBResult dfb_screen_get_screen_size ( CoreScreen *scree DFBResult dfb_screen_get_screen_size ( CoreScreen *scree
n, n,
int *ret_w int *ret_w
idth, idth,
int *ret_h int *ret_h
eight ); eight );
DFBResult dfb_screen_get_layer_dimension( CoreScreen *scree
n,
CoreLayer *layer
,
int *ret_w
idth,
int *ret_h
eight );
#endif #endif
 End of changes. 2 change blocks. 
7 lines changed or deleted 16 lines changed or added


 screens.h   screens.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 39 skipping to change at line 39
#ifndef __DFB__CORE__SCREENS_H__ #ifndef __DFB__CORE__SCREENS_H__
#define __DFB__CORE__SCREENS_H__ #define __DFB__CORE__SCREENS_H__
#include <directfb.h> #include <directfb.h>
#include <core/coretypes.h> #include <core/coretypes.h>
typedef DFBEnumerationResult (*CoreScreenCallback) (CoreScreen *screen, typedef DFBEnumerationResult (*CoreScreenCallback) (CoreScreen *screen,
void *ctx); void *ctx);
typedef enum {
CMSF_NONE = 0x00000000, /* none of these */
CMSF_DIMENSION = 0x00000001, /* dimension is set */
CMSF_ALL = 0x00000001, /* all of these */
} CoreMixerStateFlags;
typedef struct {
CoreMixerStateFlags flags;
DFBDimension dimension;
} CoreMixerState;
typedef struct { typedef struct {
/** Driver Control **/ /** Driver Control **/
/* /*
* Return size of screen data (shared memory). * Return size of screen data (shared memory).
*/ */
int (*ScreenDataSize)(void); int (*ScreenDataSize)(void);
/* /*
* Called once by the master to initialize screen data and reset hardw are. * Called once by the master to initialize screen data and reset hardw are.
* Driver has to fill the screen description. * Driver has to fill the screen description.
*/ */
DFBResult (*InitScreen) ( CoreScreen *screen, DFBResult (*InitScreen) ( CoreScreen *screen,
GraphicsDevice *device, CoreGraphicsDevice *device,
void *driver_data , void *driver_data ,
void *screen_data , void *screen_data ,
DFBScreenDescription *description ); DFBScreenDescription *description );
/* /*
* Called once by the master for each mixer. * Called once by the master for each mixer.
* Driver fills description and default config. * Driver fills description and default config.
*/ */
DFBResult (*InitMixer) ( CoreScreen *screen, DFBResult (*InitMixer) ( CoreScreen *screen,
void *driver_data , void *driver_data ,
skipping to change at line 184 skipping to change at line 198
/* /*
* Return the screen size, e.g. as a basis for positioning a layer. * Return the screen size, e.g. as a basis for positioning a layer.
* *
* This function might be replaced soon. * This function might be replaced soon.
*/ */
DFBResult (*GetScreenSize) ( CoreScreen *screen, DFBResult (*GetScreenSize) ( CoreScreen *screen,
void *driver_dat a, void *driver_dat a,
void *screen_dat a, void *screen_dat a,
int *ret_width, int *ret_width,
int *ret_height ); int *ret_height );
/** States **/
DFBResult (*GetMixerState) ( CoreScreen *screen,
void *driver_dat
a,
void *screen_dat
a,
int mixer,
CoreMixerState *ret_state
);
} ScreenFuncs; } ScreenFuncs;
/* /*
* Add a screen to a graphics device by pointing to a table containing * Add a screen to a graphics device by pointing to a table containing
* driver functions. The driver data will be passed to these functions. * driver functions. The driver data will be passed to these functions.
*/ */
CoreScreen *dfb_screens_register( GraphicsDevice *device, CoreScreen *dfb_screens_register( CoreGraphicsDevice *device,
void *driver_data, void *driver_data,
ScreenFuncs *funcs ); ScreenFuncs *funcs );
/* /*
* Replace functions of the primary screen implementation by passing * Replace functions of the primary screen implementation by passing
* an alternative driver function table. All non-NULL functions in the new * an alternative driver function table. All non-NULL functions in the new
* table replace the functions in the original function table. * table replace the functions in the original function table.
* The original function table is written to 'primary_funcs' before to allo w * The original function table is written to 'primary_funcs' before to allo w
* drivers to use existing functionality from the original implementation. * drivers to use existing functionality from the original implementation.
*/ */
CoreScreen *dfb_screens_hook_primary( GraphicsDevice *device, CoreScreen *dfb_screens_hook_primary( CoreGraphicsDevice *device,
void *driver_data, void *driver_data,
ScreenFuncs *funcs, ScreenFuncs *funcs,
ScreenFuncs *primary_funcs, ScreenFuncs *primary_funcs,
void **primary_driver_data void **primary_driver_d
); ata );
/* /*
* Replace the default implementation for the primary screen. * Replace the default implementation for the primary screen.
*/ */
CoreScreen *dfb_screens_register_primary( GraphicsDevice *device, CoreScreen *dfb_screens_register_primary( CoreGraphicsDevice *device,
void *driver_data, void *driver_data,
ScreenFuncs *funcs ); ScreenFuncs *funcs );
/* /*
* Enumerate all registered screens by invoking the callback for each scree n. * Enumerate all registered screens by invoking the callback for each scree n.
*/ */
void dfb_screens_enumerate( CoreScreenCallback callback, void dfb_screens_enumerate( CoreScreenCallback callback,
void *ctx ); void *ctx );
/* /*
* Returns the screen with the specified ID. * Returns the screen with the specified ID.
*/ */
 End of changes. 7 change blocks. 
12 lines changed or deleted 37 lines changed or added


 screens_internal.h   screens_internal.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 72 skipping to change at line 72
CoreScreenEncoder *encoders; CoreScreenEncoder *encoders;
CoreScreenOutput *outputs; CoreScreenOutput *outputs;
void *screen_data; void *screen_data;
} CoreScreenShared; } CoreScreenShared;
struct __DFB_CoreScreen { struct __DFB_CoreScreen {
CoreScreenShared *shared; CoreScreenShared *shared;
CoreDFB *core; CoreDFB *core;
GraphicsDevice *device; CoreGraphicsDevice *device;
ScreenFuncs *funcs; ScreenFuncs *funcs;
void *driver_data; void *driver_data;
void *screen_data; /* copy of shared->screen_data */ void *screen_data; /* copy of shared->screen_data */
}; };
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 serial.h   serial.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 shm.h   shm.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 34 skipping to change at line 34
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __FUSION__SHM__SHM_H__ #ifndef __FUSION__SHM__SHM_H__
#define __FUSION__SHM__SHM_H__ #define __FUSION__SHM__SHM_H__
#include <fusion/types.h> #include <fusion/types.h>
typedef DirectEnumerationResult (*FusionSHMPoolCallback)( FusionSHMPool *po
ol,
void *ct
x );
DirectResult fusion_shm_init ( FusionWorld *world ); DirectResult fusion_shm_init ( FusionWorld *world );
DirectResult fusion_shm_deinit( FusionWorld *world ); DirectResult fusion_shm_deinit( FusionWorld *world );
DirectResult fusion_shm_attach_unattached( FusionWorld *world ); DirectResult fusion_shm_attach_unattached( FusionWorld *world );
DirectResult fusion_shm_enum_pools( FusionWorld *world,
FusionSHMPoolCallback callback,
void *ctx );
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 10 lines changed or added


 shm_internal.h   shm_internal.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 39 skipping to change at line 39
#ifndef __FUSION__SHM__SHM_INTERNAL_H__ #ifndef __FUSION__SHM__SHM_INTERNAL_H__
#define __FUSION__SHM__SHM_INTERNAL_H__ #define __FUSION__SHM__SHM_INTERNAL_H__
#include <limits.h> #include <limits.h>
#include <direct/list.h> #include <direct/list.h>
#include <fusion/build.h> #include <fusion/build.h>
#include <fusion/lock.h> #include <fusion/lock.h>
#define FUSION_SHM_MAX_POOLS 4 #define FUSION_SHM_MAX_POOLS 16
#define FUSION_SHM_TMPFS_PATH_NAME_LEN 64 #define FUSION_SHM_TMPFS_PATH_NAME_LEN 64
typedef struct __shmalloc_heap shmalloc_heap; typedef struct __shmalloc_heap shmalloc_heap;
/* /*
* Local pool data. * Local pool data.
*/ */
struct __Fusion_FusionSHMPool { struct __Fusion_FusionSHMPool {
int magic; int magic;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 shmalloc.h   shmalloc.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 44 skipping to change at line 44
#include <stddef.h> #include <stddef.h>
#include <direct/build.h> #include <direct/build.h>
#include <fusion/build.h> #include <fusion/build.h>
#include <fusion/types.h> #include <fusion/types.h>
#include <fusion/shm/pool.h> #include <fusion/shm/pool.h>
#if FUSION_BUILD_MULTI && DIRECT_BUILD_TEXT #if FUSION_BUILD_MULTI && DIRECT_BUILD_TEXT
#define D_OOSHM() (direct_messages_warn( __FUNCTION__, __FILE__, __L INE__, \ #define D_OOSHM() (direct_messages_warn( __FUNCTION__, __FILE__, __L INE__, \
"out of shared memory" ), D FB_NOSHAREDMEMORY) "out of shared memory" ), D R_NOSHAREDMEMORY)
#else #else
#define D_OOSHM() D_OOM() #define D_OOSHM() D_OOM()
#endif #endif
void fusion_dbg_print_memleaks( FusionSHMPoolShared *pool ); void fusion_dbg_print_memleaks( FusionSHMPoolShared *pool );
void *fusion_dbg_shmalloc ( FusionSHMPoolShared *pool, void *fusion_dbg_shmalloc ( FusionSHMPoolShared *pool,
const char *file, int line, const char *file, int line,
const char *func, size_t __size ); const char *func, size_t __size );
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 signals.h   signals.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 state.h   state.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 43 skipping to change at line 43
#include <directfb.h> #include <directfb.h>
#include <direct/serial.h> #include <direct/serial.h>
#include <fusion/reactor.h> #include <fusion/reactor.h>
#include <core/coredefs.h> #include <core/coredefs.h>
#include <core/coretypes.h> #include <core/coretypes.h>
#include <core/gfxcard.h> #include <core/gfxcard.h>
#include <core/surface_buffer.h>
#include <gfx/generic/generic.h> #include <gfx/generic/generic.h>
#include <misc/conf.h>
#include <misc/util.h> #include <misc/util.h>
typedef enum { typedef enum {
SMF_DRAWING_FLAGS = 0x00000001, SMF_DRAWING_FLAGS = 0x00000001,
SMF_BLITTING_FLAGS = 0x00000002, SMF_BLITTING_FLAGS = 0x00000002,
SMF_CLIP = 0x00000004, SMF_CLIP = 0x00000004,
SMF_COLOR = 0x00000008, SMF_COLOR = 0x00000008,
SMF_SRC_BLEND = 0x00000010, SMF_SRC_BLEND = 0x00000010,
SMF_DST_BLEND = 0x00000020, SMF_DST_BLEND = 0x00000020,
SMF_SRC_COLORKEY = 0x00000040, SMF_SRC_COLORKEY = 0x00000040,
SMF_DST_COLORKEY = 0x00000080, SMF_DST_COLORKEY = 0x00000080,
SMF_DESTINATION = 0x00000100, SMF_DESTINATION = 0x00000100,
SMF_SOURCE = 0x00000200, SMF_SOURCE = 0x00000200,
SMF_SOURCE_MASK = 0x00000400,
SMF_SOURCE_MASK_VALS = 0x00000800,
SMF_INDEX_TRANSLATION = 0x00001000, SMF_INDEX_TRANSLATION = 0x00001000,
SMF_COLORKEY = 0x00002000,
SMF_ALL = 0x000013FF SMF_RENDER_OPTIONS = 0x00010000,
SMF_MATRIX = 0x00020000,
SMF_ALL = 0x00033FFF
} StateModificationFlags; } StateModificationFlags;
typedef enum { typedef enum {
CSF_NONE = 0x00000000, CSF_NONE = 0x00000000,
CSF_DESTINATION = 0x00000001, /* destination is set using dfb_sta CSF_DESTINATION = 0x00000001, /* destination is set using df
te_set_destination() */ b_state_set_destination() */
CSF_SOURCE = 0x00000002, /* source is set using dfb_state_se CSF_SOURCE = 0x00000002, /* source is set using dfb_sta
t_source() */ te_set_source() */
CSF_SOURCE_MASK = 0x00000008, /* source mask is set using df
b_state_set_source_mask() */
CSF_SOURCE_LOCKED = 0x00000010, /* source surface is locked */ CSF_SOURCE_LOCKED = 0x00000010, /* source surface is locked */
CSF_SOURCE_MASK_LOCKED = 0x00000020, /* source mask surface is lock
ed */
CSF_ALL = 0x00000013 CSF_DRAWING = 0x00010000, /* something has been rendered
with this state,
this is cleared by flushing
the state, e.g. upon flip */
CSF_ALL = 0x0001003B
} CardStateFlags; } CardStateFlags;
struct _CardState { struct _CardState {
int magic; int magic;
CoreDFB *core; CoreDFB *core;
CoreGraphicsDevice *device;
FusionID fusion_id; FusionID fusion_id;
pthread_mutex_t lock; /* lock for state handling */ pthread_mutex_t lock; /* lock for state handling */
CardStateFlags flags; CardStateFlags flags;
StateModificationFlags modified; /* indicate which fields have been StateModificationFlags modified; /* indicate which fields have been
modified, these flags will be modified, these flags will be
cleared by the gfx drivers */ cleared by the gfx drivers */
StateModificationFlags mod_hw;
/* values forming the state for graphics operations */ /* values forming the state for graphics operations */
DFBSurfaceDrawingFlags drawingflags; /* drawing flags */ DFBSurfaceDrawingFlags drawingflags; /* drawing flags */
DFBSurfaceBlittingFlags blittingflags; /* blitting flags */ DFBSurfaceBlittingFlags blittingflags; /* blitting flags */
DFBRegion clip; /* clipping rectangle */ DFBRegion clip; /* clipping rectangle */
DFBColor color; /* color for drawing or modula tion */ DFBColor color; /* color for drawing or modula tion */
unsigned int color_index; /* index to color in palette * / unsigned int color_index; /* index to color in palette * /
DFBSurfaceBlendFunction src_blend; /* blend function for source * / DFBSurfaceBlendFunction src_blend; /* blend function for source * /
skipping to change at line 122 skipping to change at line 137
/* hardware abstraction and state handling helpers */ /* hardware abstraction and state handling helpers */
DFBAccelerationMask accel; /* remember checked commands i f they are accelerated */ DFBAccelerationMask accel; /* remember checked commands i f they are accelerated */
DFBAccelerationMask checked; /* commands for which a state has been checked */ DFBAccelerationMask checked; /* commands for which a state has been checked */
DFBAccelerationMask set; /* commands for which a state is valid */ DFBAccelerationMask set; /* commands for which a state is valid */
DFBAccelerationMask disabled; /* commands which are disabled temporarily */ DFBAccelerationMask disabled; /* commands which are disabled temporarily */
CoreGraphicsSerial serial; /* hardware serial of the last operation */ CoreGraphicsSerial serial; /* hardware serial of the last operation */
/* from/to buffers */
CoreSurfaceBufferRole from; /* usually CSBR_FRONT */
CoreSurfaceBufferRole to; /* usually CSBR_BACK */
/* read/write locks during operation */
CoreSurfaceBufferLock dst;
CoreSurfaceBufferLock src;
/* software driver */ /* software driver */
GenefxState *gfxs; GenefxState *gfxs;
/* extended state */
DFBSurfaceRenderOptions render_options;
DFBColorKey colorkey; /* key for color key prot
ection */
s32 matrix[9]; /* transformation matrix
for DSRO_MATRIX (fixed 16.16) */
DFBBoolean affine_matrix;
CoreSurface *source_mask; /* source mask surface */
CoreSurfaceBufferLock src_mask; /* source mask surface lo
ck */
DirectSerial src_mask_serial; /* last source mask surfa
ce serial */
DFBPoint src_mask_offset; /* relative or absolute c
oordinates */
DFBSurfaceMaskFlags src_mask_flags; /* controls coordinate mo
de and more */
}; };
int dfb_state_init( CardState *state, CoreDFB *core ); int dfb_state_init( CardState *state, CoreDFB *core );
void dfb_state_destroy( CardState *state ); void dfb_state_destroy( CardState *state );
void dfb_state_set_destination( CardState *state, CoreSurface *destination DFBResult dfb_state_set_destination( CardState *state, CoreSurface *destina
); tion );
void dfb_state_set_source( CardState *state, CoreSurface *source ); DFBResult dfb_state_set_source( CardState *state, CoreSurface *source );
DFBResult dfb_state_set_source_mask( CardState *state, CoreSurface *source_
mask );
void dfb_state_update( CardState *state, bool update_source ); void dfb_state_update( CardState *state, bool update_source );
DFBResult dfb_state_set_index_translation( CardState *state, DFBResult dfb_state_set_index_translation( CardState *state,
const int *indices, const int *indices,
int num_indices ); int num_indices );
void dfb_state_set_matrix( CardState *state,
const s32 *matrix );
static inline void static inline void
dfb_state_get_serial( const CardState *state, CoreGraphicsSerial *ret_seria l ) dfb_state_get_serial( const CardState *state, CoreGraphicsSerial *ret_seria l )
{ {
D_ASSERT( state != NULL ); D_ASSERT( state != NULL );
D_ASSERT( ret_serial != NULL ); D_ASSERT( ret_serial != NULL );
*ret_serial = state->serial; *ret_serial = state->serial;
} }
static inline void static inline void
dfb_state_lock( CardState *state ) dfb_state_lock( CardState *state )
{ {
D_MAGIC_ASSERT( state, CardState ); D_MAGIC_ASSERT( state, CardState );
DFB_REGION_ASSERT( &state->clip ); DFB_REGION_ASSERT( &state->clip );
pthread_mutex_lock( &state->lock ); pthread_mutex_lock( &state->lock );
} }
static inline void static inline void
dfb_state_start_drawing( CardState *state, CoreGraphicsDevice *device )
{
D_MAGIC_ASSERT( state, CardState );
D_ASSERT( device != NULL );
D_ASSERT( state->destination != NULL );
if (dfb_config->startstop) {
if (state->flags & CSF_DRAWING)
D_ASSERT( state->device == device );
else {
dfb_gfxcard_start_drawing( device, state );
state->flags = (CardStateFlags)(state->flags | CSF_DRAWING)
;
state->device = device;
}
}
}
static inline void
dfb_state_stop_drawing( CardState *state )
{
D_MAGIC_ASSERT( state, CardState );
D_ASSERT( state->destination != NULL );
if (dfb_config->startstop) {
if (state->flags & CSF_DRAWING) {
D_ASSERT( state->device != NULL );
dfb_gfxcard_stop_drawing( state->device, state );
state->flags = (CardStateFlags)(state->flags & ~CSF_DRAWING
);
state->device = NULL;
}
else
D_ASSERT( state->device == NULL );
}
}
static inline void
dfb_state_unlock( CardState *state ) dfb_state_unlock( CardState *state )
{ {
D_MAGIC_ASSERT( state, CardState ); D_MAGIC_ASSERT( state, CardState );
DFB_REGION_ASSERT( &state->clip ); DFB_REGION_ASSERT( &state->clip );
pthread_mutex_unlock( &state->lock ); pthread_mutex_unlock( &state->lock );
} }
#define _dfb_state_set_checked(member,flag,state,value) \ #define _dfb_state_set_checked(member,flag,state,value) \
skipping to change at line 206 skipping to change at line 289
s tate, blend ) s tate, blend )
#define dfb_state_set_src_colorkey(state,key) _dfb_state_set_checked( s rc_colorkey, \ #define dfb_state_set_src_colorkey(state,key) _dfb_state_set_checked( s rc_colorkey, \
S RC_COLORKEY, \ S RC_COLORKEY, \
s tate, key ) s tate, key )
#define dfb_state_set_dst_colorkey(state,key) _dfb_state_set_checked( d st_colorkey, \ #define dfb_state_set_dst_colorkey(state,key) _dfb_state_set_checked( d st_colorkey, \
D ST_COLORKEY, \ D ST_COLORKEY, \
s tate, key ) s tate, key )
#define dfb_state_set_render_options(state,opts) _dfb_state_set_checked( r
ender_options, \
R
ENDER_OPTIONS, \
s
tate, opts )
static inline void dfb_state_set_clip( CardState *state, const DFBRegion *c lip ) static inline void dfb_state_set_clip( CardState *state, const DFBRegion *c lip )
{ {
D_MAGIC_ASSERT( state, CardState ); D_MAGIC_ASSERT( state, CardState );
DFB_REGION_ASSERT( clip ); DFB_REGION_ASSERT( clip );
if (! DFB_REGION_EQUAL( state->clip, *clip )) { if (! DFB_REGION_EQUAL( state->clip, *clip )) {
state->clip = *clip; state->clip = *clip;
state->modified = (StateModificationFlags)( state->modified | SMF _CLIP ); state->modified = (StateModificationFlags)( state->modified | SMF _CLIP );
} }
} }
skipping to change at line 228 skipping to change at line 315
{ {
D_MAGIC_ASSERT( state, CardState ); D_MAGIC_ASSERT( state, CardState );
D_ASSERT( color != NULL ); D_ASSERT( color != NULL );
if (! DFB_COLOR_EQUAL( state->color, *color )) { if (! DFB_COLOR_EQUAL( state->color, *color )) {
state->color = *color; state->color = *color;
state->modified = (StateModificationFlags)( state->modified | SMF _COLOR ); state->modified = (StateModificationFlags)( state->modified | SMF _COLOR );
} }
} }
static inline void dfb_state_set_colorkey( CardState *state, const DFBColor
Key *key )
{
D_MAGIC_ASSERT( state, CardState );
D_ASSERT( key != NULL );
if (! DFB_COLORKEY_EQUAL( state->colorkey, *key )) {
state->colorkey = *key;
state->modified = (StateModificationFlags)( state->modified | SMF
_COLOR );
}
}
static inline void dfb_state_set_source_mask_vals( CardState *sta
te,
const DFBPoint *off
set,
DFBSurfaceMaskFlags fla
gs )
{
D_MAGIC_ASSERT( state, CardState );
D_ASSERT( offset != NULL );
D_FLAGS_ASSERT( flags, DSMF_ALL );
if (! DFB_POINT_EQUAL( state->src_mask_offset, *offset ) || state->src
_mask_flags != flags) {
state->src_mask_offset = *offset;
state->src_mask_flags = flags;
state->modified = (StateModificationFlags)( state->modified | SMF
_SOURCE_MASK_VALS );
}
}
/*
* Multifunctional color configuration function.
*
* Always tries to set both color and index.
*
* If color index is -1, color is used and searched in palette of destinati
on surface if present.
* If color index is valid the color is looked up in palette if present.
*/
void dfb_state_set_color_or_index( CardState *state,
const DFBColor *color,
int index );
#endif #endif
 End of changes. 19 change blocks. 
12 lines changed or deleted 162 lines changed or added


 stream.h   stream.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 48 skipping to change at line 48
* Create a stream wrapper. * Create a stream wrapper.
* *
* 'filename' can be a plain file name or one of the following: * 'filename' can be a plain file name or one of the following:
* http://<host>[:<port>]/<path> * http://<host>[:<port>]/<path>
* unsv://<host>[:<port>]/<path> * unsv://<host>[:<port>]/<path>
* ftp://<host>[:<port>]/<path> * ftp://<host>[:<port>]/<path>
* rtsp://<host>[:<port>]/<path> * rtsp://<host>[:<port>]/<path>
* tcp://<host>:<port> * tcp://<host>:<port>
* udp://<host>:<port> * udp://<host>:<port>
* file:/<path> * file:/<path>
* fd:/<fileno>
* stdin:/ * stdin:/
*/ */
DirectResult direct_stream_create ( const char *filename, DirectResult direct_stream_create ( const char *filename,
DirectStream **ret_stream ); DirectStream **ret_stream );
/* /*
* Duplicate the stream (never fails). * Duplicate the stream (never fails).
*/ */
DirectStream *direct_stream_dup ( DirectStream *stream ); DirectStream *direct_stream_dup ( DirectStream *stream );
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 surfacemanager.h   surfacemanager.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 32 skipping to change at line 32
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __SURFACEMANAGER_H__ #ifndef __SURFACEMANAGER_H__
#define __SURFACEMANAGER_H__ #define __SURFACEMANAGER_H__
#include <fusion/lock.h>
#include <directfb.h> #include <directfb.h>
#include <core/core.h>
#include <core/gfxcard.h>
#include <core/surfaces.h>
#define CSLF_FORCE 0x80000000
SurfaceManager *dfb_surfacemanager_create( CoreDFB *core, #include <core/coretypes.h>
CardLimitations *limits );
void dfb_surfacemanager_destroy( SurfaceManager *manager );
DFBResult dfb_surfacemanager_suspend( SurfaceManager *manager ); typedef struct _SurfaceManager SurfaceManager;
DFBResult dfb_surfacemanager_resume( SurfaceManager *manager ); typedef struct _Chunk Chunk;
/* /*
* Create a new heap with the specified storage, offset, length * initially there is one big free chunk,
* chunks are splitted into a free and an occupied chunk if memory is alloc
ated,
* two chunks are merged to one free chunk if memory is deallocated
*/ */
DFBResult dfb_surfacemanager_add_heap( SurfaceManager *manager, struct _Chunk {
CoreSurfaceStorage storage, int magic;
unsigned int offset,
unsigned int length );
/* int offset; /* offset in memory,
* adjust the offset within the framebuffer for surface storage, is greater or equal to the heap o
* needs to be called after a resolution switch ffset */
*/ int length; /* length of this chunk in bytes */
DFBResult dfb_surfacemanager_adjust_heap_offset( SurfaceManager *manager,
int offset );
typedef DFBEnumerationResult (*SMChunkCallback)( SurfaceBuffer *buffer, int pitch;
int offset,
int length,
int tolerations
,
void *ctx );
void dfb_surfacemanager_enumerate_chunks( SurfaceManager *manager, CoreSurfaceBuffer *buffer; /* pointer to surface buffer occupyi
SMChunkCallback callback, ng
void *ctx ); this chunk, or NULL if chunk is f
ree */
/* int tolerations; /* number of times this chunk was sc
* Lock/unlock the surfacemanager for usage of the functions below. anned
*/ occupied, resetted in assure_vide
void dfb_surfacemanager_lock( SurfaceManager *manager ); o */
void dfb_surfacemanager_unlock( SurfaceManager *manager );
/* Chunk *prev;
* lock a surface for access by software, returns a pointer to the Chunk *next;
* surface data and the line pitch a.k.a. rowstride };
*/
DFBResult dfb_surface_software_lock( CoreDFB *core,
CoreSurface *surface,
DFBSurfaceLockFlags flags,
void **data,
int *pitch,
bool front );
/* DFBResult dfb_surfacemanager_create ( CoreDFB *core,
* lock a surface for access by hardware that enforces a video instance unsigned int length,
* an therefore the data and pitch can be looked up in the surface struct's SurfaceManager **ret_manager );
* video struct, however this function will fail if the surfacemanager coul
d void dfb_surfacemanager_destroy( SurfaceManager *manager );
* not assure a video memory instance
*/
DFBResult dfb_surface_hardware_lock( CoreDFB *core,
CoreSurface *surface,
DFBSurfaceLockFlags flags,
bool front );
/* /*
* finds and allocates one for the surface or fails, * finds and allocates one for the surface or fails,
* after success the video health is CSH_RESTORE. * after success the video health is CSH_RESTORE.
* NOTE: this does not notify the listeners * NOTE: this does not notify the listeners
*/ */
DFBResult dfb_surfacemanager_allocate( SurfaceManager *manager, DFBResult dfb_surfacemanager_allocate( CoreDFB *core,
SurfaceBuffer *buffer ); SurfaceManager *manager,
CoreSurfaceBuffer *buffer,
Chunk **ret_chunk );
/* /*
* sets the video health to CSH_INVALID frees the chunk and * sets the video health to CSH_INVALID frees the chunk and
* notifies the listeners * notifies the listeners
*/ */
DFBResult dfb_surfacemanager_deallocate( SurfaceManager *manager, DFBResult dfb_surfacemanager_deallocate( SurfaceManager *manager,
SurfaceBuffer *buffer ); Chunk *chunk );
/*
* puts the surface into the video memory,
* i.e. it initializees the video instance or fails
*/
DFBResult dfb_surfacemanager_assure_video( SurfaceManager *manager,
SurfaceBuffer *buffer );
/*
* makes sure the system instance is not outdated,
* it fails if the policy is CSP_VIDEOONLY
*/
DFBResult dfb_surfacemanager_assure_system( SurfaceManager *manager,
SurfaceBuffer *buffer );
#endif #endif
 End of changes. 15 change blocks. 
78 lines changed or deleted 36 lines changed or added


 system.h   system.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 47 skipping to change at line 47
#include <fusion/types.h> #include <fusion/types.h>
typedef enum { typedef enum {
CORE_ANY, CORE_ANY,
CORE_FBDEV, CORE_FBDEV,
CORE_X11, CORE_X11,
CORE_OSX, CORE_OSX,
CORE_SDL, CORE_SDL,
CORE_VNC, CORE_VNC,
CORE_DEVMEM CORE_DEVMEM,
CORE_TI_CMEM
} CoreSystemType; } CoreSystemType;
typedef enum { typedef enum {
CSCAPS_NONE = 0x00000000, /* None of these. */ CSCAPS_NONE = 0x00000000, /* None of these. */
CSCAPS_ACCELERATION = 0x00000001, /* HW acceleration supported, so pr obe graphics drivers. */ CSCAPS_ACCELERATION = 0x00000001, /* HW acceleration supported, so pr obe graphics drivers. */
CSCAPS_ALL = 0x00000001 /* All of these. */ CSCAPS_ALL = 0x00000001 /* All of these. */
} CoreSystemCapabilities; } CoreSystemCapabilities;
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added


 thread.h   thread.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 35 skipping to change at line 35
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __DIRECT__THREAD_H__ #ifndef __DIRECT__THREAD_H__
#define __DIRECT__THREAD_H__ #define __DIRECT__THREAD_H__
#include <sys/types.h> #include <sys/types.h>
#include <direct/types.h> #include <direct/types.h>
#include <direct/conf.h>
typedef enum { typedef enum {
DTT_DEFAULT = 0, DTT_DEFAULT = 0,
DTT_CLEANUP = -5, DTT_CLEANUP = -5,
DTT_INPUT = -10, DTT_INPUT = -10,
DTT_OUTPUT = -12, DTT_OUTPUT = -12,
DTT_MESSAGING = -15, DTT_MESSAGING = -15,
DTT_CRITICAL = -20 DTT_CRITICAL = -20
} DirectThreadType; } DirectThreadType;
skipping to change at line 137 skipping to change at line 138
* Returns true if the specified thread has been join. * Returns true if the specified thread has been join.
*/ */
bool direct_thread_is_joined ( DirectThread *thread ); bool direct_thread_is_joined ( DirectThread *thread );
/* /*
* Free resources allocated by direct_thread_create. * Free resources allocated by direct_thread_create.
* If the thread is still running it will be killed. * If the thread is still running it will be killed.
*/ */
void direct_thread_destroy ( DirectThread *thread ); void direct_thread_destroy ( DirectThread *thread );
/*
* Utilities for stringification.
*/
#if DIRECT_BUILD_TEXT
const char *direct_thread_type_name ( DirectThreadType type );
const char *direct_thread_scheduler_name( DirectConfigThreadScheduler sched
uler );
const char *direct_thread_policy_name ( int policy );
#endif
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 12 lines changed or added


 trace.h   trace.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 tree.h   tree.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 types.h   types.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 32 skipping to change at line 32
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __DIRECT__TYPES_H__ #ifndef __DIRECT__TYPES_H__
#define __DIRECT__TYPES_H__ #define __DIRECT__TYPES_H__
#include <dfb_types.h>
#include <directfb.h>
#include <direct/build.h> #include <direct/build.h>
typedef DFBResult DirectResult; /* FIXME */ /*
* Define the bool type by including stdbool.h (preferably)...
*/
#if DIRECT_BUILD_STDBOOL
# include <stdbool.h>
/*
* ...or defining it ourself, if not using C++ or another definition
*/
#elif !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
# warning Fallback definition of bool using u8! Checking for 'flags & 0x10
0' or higher bits will be false :(
typedef u8 bool;
# ifndef false
# define false (0)
# endif
# ifndef true
# define true (!false)
# endif
#endif /* DIRECT_BUILD_STDBOOL */
/* can be removed if directfb.h is no longer included */ #ifdef USE_KOS
#ifdef __APPLE__
#undef main
#endif
#if DIRECT_BUILD_STDBOOL #include <sys/types.h>
#include <stdbool.h> typedef uint8 u8;
typedef uint16 u16;
typedef uint32 u32;
typedef uint64 u64;
typedef sint8 s8;
typedef sint16 s16;
typedef sint32 s32;
typedef sint64 s64;
#else #else
#if !defined(__cplusplus) && !defined(__bool_true_false_are_defined) #include <stdint.h>
#ifndef false
#define false (0) typedef uint8_t u8;
#endif typedef uint16_t u16;
#ifndef true typedef uint32_t u32;
#define true (!false) typedef uint64_t u64;
#endif
typedef u8 bool; typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;
#endif #endif
#endif /* DIRECT_BUILD_STDBOOL */ typedef enum {
DR_OK = 0x00000000, /* No error occured. */
DR_FAILURE, /* A general or unknown error occured. */
DR_INIT, /* A general initialization error occured. */
DR_BUG, /* Internal bug or inconsistency has been detected
. */
DR_DEAD, /* Interface has a zero reference counter (availab
le in debug mode). */
DR_UNSUPPORTED, /* The requested operation or an argument is (curr
ently) not supported. */
DR_UNIMPLEMENTED, /* The requested operation is not implemented, yet
. */
DR_ACCESSDENIED, /* Access to the resource is denied. */
DR_INVAREA, /* An invalid area has been specified or detected.
*/
DR_INVARG, /* An invalid argument has been specified. */
DR_NOLOCALMEMORY, /* There's not enough local system memory. */
DR_NOSHAREDMEMORY, /* There's not enough shared system memory. */
DR_LOCKED, /* The resource is (already) locked. */
DR_BUFFEREMPTY, /* The buffer is empty. */
DR_FILENOTFOUND, /* The specified file has not been found. */
DR_IO, /* A general I/O error occured. */
DR_BUSY, /* The resource or device is busy. */
DR_NOIMPL, /* No implementation for this interface or content
type has been found. */
DR_TIMEOUT, /* The operation timed out. */
DR_THIZNULL, /* 'thiz' pointer is NULL. */
DR_IDNOTFOUND, /* No resource has been found by the specified id.
*/
DR_DESTROYED, /* The requested object has been destroyed. */
DR_FUSION, /* Internal fusion error detected, most likely rel
ated to IPC resources. */
DR_BUFFERTOOLARGE, /* Buffer is too large. */
DR_INTERRUPTED, /* The operation has been interrupted. */
DR_NOCONTEXT, /* No context available. */
DR_TEMPUNAVAIL, /* Temporarily unavailable. */
DR_LIMITEXCEEDED, /* Attempted to exceed limit, i.e. any kind of max
imum size, count etc. */
DR_NOSUCHMETHOD, /* Requested method is not known. */
DR_NOSUCHINSTANCE, /* Requested instance is not known. */
DR_ITEMNOTFOUND, /* No such item found. */
DR_VERSIONMISMATCH, /* Some versions didn't match. */
DR_EOF, /* Reached end of file. */
DR_SUSPENDED, /* The requested object is suspended. */
DR_INCOMPLETE, /* The operation has been executed, but not comple
tely. */
DR_NOCORE /* Core part not available. */
} DirectResult;
/*
* Generate result code base for API 'A','B','C', e.g. 'D','F','B'.
*/
#define D_RESULT_TYPE_BASE( a,b,c ) ((((unsigned)(a)&0x7f) * 0x02000000
) + \
(((unsigned)(b)&0x7f) * 0x00040000
) + \
(((unsigned)(c)&0x7f) * 0x00000800
))
/*
* Generate result code maximum for API 'A','B','C', e.g. 'D','F','B'.
*/
#define D_RESULT_TYPE_MAX( a,b,c ) (D_RESULT_TYPE_BASE(a,b,c) + 0x7ff)
/*
* Check if given result code belongs to API 'A','B','C', e.g. 'D','F','B'.
*/
#define D_RESULT_TYPE_IS( code,a,b,c ) ((code) >= D_RESULT_TYPE_BASE(a,b,c
) && (code) <= D_RESULT_TYPE_MAX(a,b,c))
/*
* Return value of enumeration callbacks
*/
typedef enum {
DENUM_OK = 0x00000000, /* Proceed with enumeration */
DENUM_CANCEL = 0x00000001 /* Cancel enumeration */
} DirectEnumerationResult;
typedef u32 unichar; typedef u32 unichar;
typedef struct __D_DirectCleanupHandler DirectCleanupHandler;
typedef struct __D_DirectConfig DirectConfig; typedef struct __D_DirectConfig DirectConfig;
typedef struct __D_DirectHash DirectHash; typedef struct __D_DirectHash DirectHash;
typedef struct __D_DirectLink DirectLink; typedef struct __D_DirectLink DirectLink;
typedef struct __D_DirectLog DirectLog; typedef struct __D_DirectLog DirectLog;
typedef struct __D_DirectModuleDir DirectModuleDir; typedef struct __D_DirectModuleDir DirectModuleDir;
typedef struct __D_DirectModuleEntry DirectModuleEntry; typedef struct __D_DirectModuleEntry DirectModuleEntry;
typedef struct __D_DirectSerial DirectSerial; typedef struct __D_DirectSerial DirectSerial;
typedef struct __D_DirectSignalHandler DirectSignalHandler; typedef struct __D_DirectSignalHandler DirectSignalHandler;
typedef struct __D_DirectStream DirectStream; typedef struct __D_DirectStream DirectStream;
typedef struct __D_DirectTraceBuffer DirectTraceBuffer; typedef struct __D_DirectTraceBuffer DirectTraceBuffer;
 End of changes. 9 change blocks. 
21 lines changed or deleted 121 lines changed or added


 utf8.h   utf8.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 util.h   util.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 32 skipping to change at line 32
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. Boston, MA 02111-1307, USA.
*/ */
#ifndef __GFX__UTIL_H__ #ifndef __GFX__UTIL_H__
#define __GFX__UTIL_H__ #define __GFX__UTIL_H__
#include <core/surfaces.h> #include <core/surface.h>
void dfb_gfx_copy( CoreSurface *source, CoreSurface *destination, DFBRectan void dfb_gfx_copy( CoreSurface *source, CoreSurface *destination, const DFB
gle *rect ); Rectangle *rect );
void dfb_gfx_copy_to( CoreSurface *source, CoreSurface *destination, DFBRec void dfb_gfx_copy_to( CoreSurface *source, CoreSurface *destination, const
tangle *rect, int x, int y, bool from_back ); DFBRectangle *rect, int x, int y, bool from_back );
void dfb_back_to_front_copy( CoreSurface *surface, const DFBRegion *region ); void dfb_back_to_front_copy( CoreSurface *surface, const DFBRegion *region );
void dfb_back_to_front_copy_180( CoreSurface *surface, const DFBRegion *reg ion );
void dfb_clear_depth( CoreSurface *surface, const DFBRegion *region ); void dfb_clear_depth( CoreSurface *surface, const DFBRegion *region );
void dfb_sort_triangle( DFBTriangle *tri ); void dfb_sort_triangle( DFBTriangle *tri );
#endif #endif
 End of changes. 4 change blocks. 
6 lines changed or deleted 7 lines changed or added


 vector.h   vector.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 vt.h   vt.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 windows.h   windows.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 40 skipping to change at line 40
#define __WINDOWS_H__ #define __WINDOWS_H__
#include <directfb.h> #include <directfb.h>
#include <core/coredefs.h> #include <core/coredefs.h>
#include <core/coretypes.h> #include <core/coretypes.h>
#include <fusion/object.h> #include <fusion/object.h>
typedef enum { typedef enum {
CWCF_NONE = 0x00000000, CWMGT_KEYBOARD,
CWMGT_POINTER,
CWMGT_KEY,
CWMGT_UNSELECTED_KEYS,
} CoreWMGrabTarget;
CWCF_POSITION = 0x00000001, typedef enum {
CWCF_SIZE = 0x00000002, CWCF_NONE = 0x00000000,
CWCF_OPACITY = 0x00000004,
CWCF_STACKING = 0x00000008,
CWCF_OPTIONS = 0x00000010, CWCF_POSITION = 0x00000001,
CWCF_EVENTS = 0x00000020, CWCF_SIZE = 0x00000002,
CWCF_OPACITY = 0x00000004,
CWCF_STACKING = 0x00000008,
CWCF_COLOR_KEY = 0x00000100, CWCF_OPTIONS = 0x00000010,
CWCF_OPAQUE = 0x00000200, CWCF_EVENTS = 0x00000020,
CWCF_ALL = 0x0000033F CWCF_COLOR_KEY = 0x00000100,
CWCF_OPAQUE = 0x00000200,
CWCF_KEY_SELECTION = 0x00001000,
CWCF_SRC_GEOMETRY = 0x00010000,
CWCF_DST_GEOMETRY = 0x00020000,
CWCF_ALL = 0x0003133F
} CoreWindowConfigFlags; } CoreWindowConfigFlags;
struct __DFB_CoreWindowConfig { struct __DFB_CoreWindowConfig {
DFBRectangle bounds; /* position and size */ DFBRectangle bounds; /* position and size */
int opacity; /* global alpha factor */ int opacity; /* global alpha factor */
DFBWindowStackingClass stacking; /* level boundaries */ DFBWindowStackingClass stacking; /* level boundaries */
DFBWindowOptions options; /* flags for appearance/behavi DFBWindowOptions options; /* flags for appearance/behav
our */ iour */
DFBWindowEventType events; /* mask of enabled events */ DFBWindowEventType events; /* mask of enabled events */
u32 color_key; /* transparent pixel */ u32 color_key; /* transparent pixel */
DFBRegion opaque; /* region of the window forced DFBRegion opaque; /* region of the window force
to be opaque */ d to be opaque */
DFBWindowKeySelection key_selection; /* how to filter keys in focu
s */
DFBInputDeviceKeySymbol *keys; /* list of keys for DWKS_LIST
*/
unsigned int num_keys; /* number of entries in key a
rray */
DFBWindowGeometry src_geometry; /* advanced source geometry *
/
DFBWindowGeometry dst_geometry; /* advanced destination geome
try */
}; };
#define TRANSLUCENT_WINDOW(w) ((w)->config.opacity < 0xff || \ #define TRANSLUCENT_WINDOW(w) ((w)->config.opacity < 0xff || \
(w)->config.options & (DWOP_ALPHACHANNEL | D WOP_COLORKEYING)) (w)->config.options & (DWOP_ALPHACHANNEL | D WOP_COLORKEYING))
#define VISIBLE_WINDOW(w) (!((w)->caps & DWCAPS_INPUTONLY) && \ #define VISIBLE_WINDOW(w) (!((w)->caps & DWCAPS_INPUTONLY) && \
(w)->config.opacity > 0 && !DFB_WINDOW_DESTR OYED((w))) (w)->config.opacity > 0 && !DFB_WINDOW_DESTR OYED((w)))
/* /*
* Creates a pool of window objects. * Creates a pool of window objects.
skipping to change at line 86 skipping to change at line 105
/* /*
* Generates dfb_window_ref(), dfb_window_attach() etc. * Generates dfb_window_ref(), dfb_window_attach() etc.
*/ */
FUSION_OBJECT_METHODS( CoreWindow, dfb_window ) FUSION_OBJECT_METHODS( CoreWindow, dfb_window )
/* /*
* creates a window on a given stack * creates a window on a given stack
*/ */
DFBResult DFBResult
dfb_window_create( CoreWindowStack *stack, dfb_window_create( CoreWindowStack *stack,
int x, const DFBWindowDescription *desc,
int y, CoreWindow **ret_window );
int width,
int height,
DFBWindowCapabilities caps,
DFBSurfaceCapabilities surface_caps,
DFBSurfacePixelFormat pixelformat,
CoreWindow **window );
/* /*
* deinitializes a window and removes it from the window stack * deinitializes a window and removes it from the window stack
*/ */
void void
dfb_window_destroy( CoreWindow *window ); dfb_window_destroy( CoreWindow *window );
/* /*
* moves a window relative to its current position * moves a window relative to its current position
*/ */
skipping to change at line 130 skipping to change at line 143
/* /*
* resizes a window * resizes a window
*/ */
DFBResult DFBResult
dfb_window_resize( CoreWindow *window, dfb_window_resize( CoreWindow *window,
int width, int width,
int height ); int height );
/* /*
* binds a window to this window
*/
DFBResult
dfb_window_bind( CoreWindow *window,
CoreWindow *source,
int x,
int y );
/*
* unbinds a window from this window
*/
DFBResult
dfb_window_unbind( CoreWindow *window,
CoreWindow *source );
/*
* changes stacking class * changes stacking class
*/ */
DFBResult DFBResult
dfb_window_change_stacking( CoreWindow *window, dfb_window_change_stacking( CoreWindow *window,
DFBWindowStackingClass stacking ); DFBWindowStackingClass stacking );
/* /*
* move a window up one step in window stack * move a window up one step in window stack
*/ */
DFBResult DFBResult
skipping to change at line 182 skipping to change at line 211
CoreWindow *upper ); CoreWindow *upper );
/* /*
* sets the source color key * sets the source color key
*/ */
DFBResult DFBResult
dfb_window_set_colorkey( CoreWindow *window, dfb_window_set_colorkey( CoreWindow *window,
u32 color_key ); u32 color_key );
/* /*
* change window configuration
*/
DFBResult
dfb_window_set_config( CoreWindow *window,
const CoreWindowConfig *config,
CoreWindowConfigFlags flags );
/*
* sets the global alpha factor * sets the global alpha factor
*/ */
DFBResult DFBResult
dfb_window_set_opacity( CoreWindow *window, dfb_window_set_opacity( CoreWindow *window,
u8 opacity ); u8 opacity );
/* /*
* sets the window options * sets the window options
*/ */
DFBResult DFBResult
skipping to change at line 225 skipping to change at line 262
dfb_window_repaint( CoreWindow *window, dfb_window_repaint( CoreWindow *window,
const DFBRegion *region, const DFBRegion *region,
DFBSurfaceFlipFlags flags ); DFBSurfaceFlipFlags flags );
/* /*
* request a window to gain focus * request a window to gain focus
*/ */
DFBResult DFBResult
dfb_window_request_focus( CoreWindow *window ); dfb_window_request_focus( CoreWindow *window );
DFBResult dfb_window_grab_keyboard ( CoreWindow *window ); DFBResult dfb_window_set_key_selection( CoreWindow *wind
DFBResult dfb_window_ungrab_keyboard( CoreWindow *window ); ow,
DFBResult dfb_window_grab_pointer ( CoreWindow *window ); DFBWindowKeySelection sele
DFBResult dfb_window_ungrab_pointer ( CoreWindow *window ); ction,
const DFBInputDeviceKeySymbol *keys
,
unsigned int num_
keys );
DFBResult dfb_window_change_grab ( CoreWindow *window,
CoreWMGrabTarget target,
bool grab );
DFBResult dfb_window_grab_key ( CoreWindow *window, DFBResult dfb_window_grab_key ( CoreWindow *window,
DFBInputDeviceKeySymbol symbol, DFBInputDeviceKeySymbol symbol,
DFBInputDeviceModifierMask modifiers ); DFBInputDeviceModifierMask modifiers );
DFBResult dfb_window_ungrab_key ( CoreWindow *window, DFBResult dfb_window_ungrab_key ( CoreWindow *window,
DFBInputDeviceKeySymbol symbol, DFBInputDeviceKeySymbol symbol,
DFBInputDeviceModifierMask modifiers ); DFBInputDeviceModifierMask modifiers );
void dfb_window_post_event( CoreWindow *window, DFBWindowEvent *event ); void dfb_window_post_event( CoreWindow *window, DFBWindowEvent *event );
DFBResult dfb_window_send_configuration( CoreWindow *window ); DFBResult dfb_window_send_configuration( CoreWindow *window );
 End of changes. 11 change blocks. 
33 lines changed or deleted 83 lines changed or added


 windows_internal.h   windows_internal.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 38 skipping to change at line 38
#ifndef __CORE__WINDOWS_INTERNAL_H__ #ifndef __CORE__WINDOWS_INTERNAL_H__
#define __CORE__WINDOWS_INTERNAL_H__ #define __CORE__WINDOWS_INTERNAL_H__
#include <directfb.h> #include <directfb.h>
#include <core/coredefs.h> #include <core/coredefs.h>
#include <core/coretypes.h> #include <core/coretypes.h>
#include <core/gfxcard.h> #include <core/gfxcard.h>
#include <core/surfaces.h> #include <core/surface.h>
#include <core/surface_buffer.h>
#include <core/windows.h> #include <core/windows.h>
#include <direct/list.h> #include <direct/list.h>
#include <fusion/lock.h> #include <fusion/lock.h>
#include <fusion/object.h> #include <fusion/object.h>
typedef enum { typedef enum {
CWF_NONE = 0x00000000, CWF_NONE = 0x00000000,
CWF_INITIALIZED = 0x00000001, CWF_INITIALIZED = 0x00000001,
skipping to change at line 61 skipping to change at line 62
CWF_DESTROYED = 0x00000008, CWF_DESTROYED = 0x00000008,
CWF_ALL = 0x0000000F CWF_ALL = 0x0000000F
} CoreWindowFlags; } CoreWindowFlags;
#define DFB_WINDOW_INITIALIZED(w) ((w)->flags & CWF_INITIALIZED) #define DFB_WINDOW_INITIALIZED(w) ((w)->flags & CWF_INITIALIZED)
#define DFB_WINDOW_FOCUSED(w) ((w)->flags & CWF_FOCUSED) #define DFB_WINDOW_FOCUSED(w) ((w)->flags & CWF_FOCUSED)
#define DFB_WINDOW_ENTERED(w) ((w)->flags & CWF_ENTERED) #define DFB_WINDOW_ENTERED(w) ((w)->flags & CWF_ENTERED)
#define DFB_WINDOW_DESTROYED(w) ((w)->flags & CWF_DESTROYED) #define DFB_WINDOW_DESTROYED(w) ((w)->flags & CWF_DESTROYED)
typedef struct {
DirectLink link;
CoreWindow *window;
int x;
int y;
} BoundWindow;
/* /*
* Core data of a window. * Core data of a window.
*/ */
struct __DFB_CoreWindow { struct __DFB_CoreWindow {
FusionObject object; FusionObject object;
DFBWindowID id; DFBWindowID id;
CoreWindowFlags flags; CoreWindowFlags flags;
skipping to change at line 88 skipping to change at line 97
CoreWindowStack *stack; /* window stack the window bel ongs */ CoreWindowStack *stack; /* window stack the window bel ongs */
CoreLayerRegion *primary_region; /* default region of context * / CoreLayerRegion *primary_region; /* default region of context * /
CoreLayerRegion *region; /* hardware allocated window * / CoreLayerRegion *region; /* hardware allocated window * /
void *window_data; /* private data of window mana ger */ void *window_data; /* private data of window mana ger */
CoreGraphicsSerial serial1; CoreGraphicsSerial serial1;
CoreGraphicsSerial serial2; CoreGraphicsSerial serial2;
DirectLink *bound_windows; /* list of bound windows */
CoreWindow *boundto; /* window to which this window
is bound */
DFBWindowID parent_id; /* window id of parent window
*/
}; };
/* /*
* Core data of a window stack. * Core data of a window stack.
*/ */
struct __DFB_CoreWindowStack { struct __DFB_CoreWindowStack {
DirectLink link;
int magic;
CoreLayerContext *context; CoreLayerContext *context;
int width; int width;
int height; int height;
DFBWindowID id_pool; DFBWindowID id_pool;
int num; int num;
struct { struct {
skipping to change at line 129 skipping to change at line 148
CoreSurfacePolicy policy; CoreSurfacePolicy policy;
} cursor; } cursor;
/* stores information on handling the background on exposure */ /* stores information on handling the background on exposure */
struct { struct {
DFBDisplayLayerBackgroundMode mode; DFBDisplayLayerBackgroundMode mode;
/* background handling mode: /* background handling mode:
don't care, solid color or image */ don't care, solid color or image */
DFBColor color; /* color for solid background mode */ DFBColor color; /* color for solid background mode */
int color_index;
CoreSurface *image; /* surface for background image mod e */ CoreSurface *image; /* surface for background image mod e */
GlobalReaction image_reaction; GlobalReaction image_reaction;
} bg; } bg;
DirectLink *devices; /* input devices attached to the st ack */ DirectLink *devices; /* input devices attached to the st ack */
bool hw_mode; /* recompositing is done by hardwar e */ bool hw_mode; /* recompositing is done by hardwar e */
void *stack_data; /* private data of window manager * / void *stack_data; /* private data of window manager * /
FusionSHMPoolShared *shmpool; FusionSHMPoolShared *shmpool;
}; };
DFBResult dfb_wm_close_all_stacks( void *data );
/* global reactions */ /* global reactions */
ReactionResult _dfb_windowstack_inputdevice_listener ( const void *msg_ data, ReactionResult _dfb_windowstack_inputdevice_listener ( const void *msg_ data,
void *ctx ); void *ctx );
ReactionResult _dfb_windowstack_background_image_listener( const void *msg_ data, ReactionResult _dfb_windowstack_background_image_listener( const void *msg_ data,
void *ctx ); void *ctx );
#endif #endif
 End of changes. 7 change blocks. 
2 lines changed or deleted 26 lines changed or added


 windowstack.h   windowstack.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 64 skipping to change at line 64
*/ */
DFBResult dfb_windowstack_repaint_all( CoreWindowStack *stack ); DFBResult dfb_windowstack_repaint_all( CoreWindowStack *stack );
/* /*
* background handling * background handling
*/ */
DFBResult dfb_windowstack_set_background_mode ( CoreWindowStack *stack, DFBResult dfb_windowstack_set_background_mode ( CoreWindowStack *stack,
DFBDisplayLayerBackgroundMo de mode ); DFBDisplayLayerBackgroundMo de mode );
DFBResult dfb_windowstack_set_background_image( CoreWindowStack *stack, DFBResult dfb_windowstack_set_background_image( CoreWindowStack *stack,
CoreSurface *image); CoreSurface *image );
DFBResult dfb_windowstack_set_background_color( CoreWindowStack *stack, DFBResult dfb_windowstack_set_background_color( CoreWindowStack *stack,
DFBColor const DFBColor
*color); *color );
DFBResult dfb_windowstack_set_background_color_index( CoreWindowStack
*stack,
int
index );
/* /*
* cursor control * cursor control
*/ */
DFBResult dfb_windowstack_cursor_enable( CoreDFB *core, DFBResult dfb_windowstack_cursor_enable( CoreDFB *core,
CoreWindowStack *stack, CoreWindowStack *stack,
bool enable ); bool enable );
DFBResult dfb_windowstack_cursor_set_shape( CoreWindowStack *stack, DFBResult dfb_windowstack_cursor_set_shape( CoreWindowStack *stack,
CoreSurface *shape, CoreSurface *shape,
 End of changes. 3 change blocks. 
4 lines changed or deleted 9 lines changed or added


 wm.h   wm.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 44 skipping to change at line 44
#include <direct/modules.h> #include <direct/modules.h>
#include <core/coretypes.h> #include <core/coretypes.h>
#include <core/windows.h> #include <core/windows.h>
DECLARE_MODULE_DIRECTORY( dfb_core_wm_modules ); DECLARE_MODULE_DIRECTORY( dfb_core_wm_modules );
/* /*
* Increase this number when changes result in binary incompatibility! * Increase this number when changes result in binary incompatibility!
*/ */
#define DFB_CORE_WM_ABI_VERSION 8 #define DFB_CORE_WM_ABI_VERSION 9
#define DFB_CORE_WM_INFO_NAME_LENGTH 60 #define DFB_CORE_WM_INFO_NAME_LENGTH 60
#define DFB_CORE_WM_INFO_VENDOR_LENGTH 80 #define DFB_CORE_WM_INFO_VENDOR_LENGTH 80
#define DFB_CORE_WM_INFO_URL_LENGTH 120 #define DFB_CORE_WM_INFO_URL_LENGTH 120
#define DFB_CORE_WM_INFO_LICENSE_LENGTH 40 #define DFB_CORE_WM_INFO_LICENSE_LENGTH 40
typedef struct { typedef struct {
int major; int major;
int minor; int minor;
skipping to change at line 72 skipping to change at line 72
char vendor [DFB_CORE_WM_INFO_VENDOR_LENGTH]; char vendor [DFB_CORE_WM_INFO_VENDOR_LENGTH];
char url [DFB_CORE_WM_INFO_URL_LENGTH]; char url [DFB_CORE_WM_INFO_URL_LENGTH];
char license[DFB_CORE_WM_INFO_LICENSE_LENGTH]; char license[DFB_CORE_WM_INFO_LICENSE_LENGTH];
unsigned int wm_data_size; unsigned int wm_data_size;
unsigned int wm_shared_size; unsigned int wm_shared_size;
unsigned int stack_data_size; unsigned int stack_data_size;
unsigned int window_data_size; unsigned int window_data_size;
} CoreWMInfo; } CoreWMInfo;
typedef enum {
CWMGT_KEYBOARD,
CWMGT_POINTER,
CWMGT_KEY
} CoreWMGrabTarget;
typedef struct { typedef struct {
CoreWMGrabTarget target; CoreWMGrabTarget target;
/* Both for CWMGT_KEY only. */ /* Both for CWMGT_KEY only. */
DFBInputDeviceKeySymbol symbol; DFBInputDeviceKeySymbol symbol;
DFBInputDeviceModifierMask modifiers; DFBInputDeviceModifierMask modifiers;
} CoreWMGrab; } CoreWMGrab;
/* FIXME: move to cursor.h when it's there */ /* FIXME: move to cursor.h when it's there */
typedef enum { typedef enum {
skipping to change at line 132 skipping to change at line 126
DFBResult (*Leave) ( bool emergency, DFBResult (*Leave) ( bool emergency,
void *wm_data, void *wm_data,
void *shared_data ) ; void *shared_data ) ;
DFBResult (*Suspend) ( void *wm_data, DFBResult (*Suspend) ( void *wm_data,
void *shared_data ) ; void *shared_data ) ;
DFBResult (*Resume) ( void *wm_data, DFBResult (*Resume) ( void *wm_data,
void *shared_data ) ; void *shared_data ) ;
DFBResult (*PostInit) ( void *wm_data,
void *shared_data )
;
/** Stack **/ /** Stack **/
DFBResult (*InitStack) ( CoreWindowStack *stack, DFBResult (*InitStack) ( CoreWindowStack *stack,
void *wm_data, void *wm_data,
void *stack_data ); void *stack_data );
DFBResult (*CloseStack) ( CoreWindowStack *stack, DFBResult (*CloseStack) ( CoreWindowStack *stack,
void *wm_data, void *wm_data,
void *stack_data ); void *stack_data );
skipping to change at line 181 skipping to change at line 178
void *stack_data, void *stack_data,
DFBWindowID window_id, DFBWindowID window_id,
CoreWindow **ret_window ); CoreWindow **ret_window );
DFBResult (*EnumWindows) ( CoreWindowStack *stack, DFBResult (*EnumWindows) ( CoreWindowStack *stack,
void *wm_data, void *wm_data,
void *stack_data, void *stack_data,
CoreWMWindowCallback callback, CoreWMWindowCallback callback,
void *callback_ctx ); void *callback_ctx );
DFBResult (*StartDesktop) ( CoreWindowStack *stack );
/** Window **/ /** Window **/
DFBResult (*SetWindowProperty)( CoreWindowStack *stack, DFBResult (*SetWindowProperty)( CoreWindowStack *stack,
void *wm_data, void *wm_data,
void *stack_data, void *stack_data,
CoreWindow *window, CoreWindow *window,
void *window_data, void *window_data,
const char *key, const char *key,
void *value, void *value,
void **old_value ); void **old_value );
skipping to change at line 280 skipping to change at line 275
DFBSurfaceFlipFlags flags ); DFBSurfaceFlipFlags flags );
DFBResult (*UpdateCursor) ( CoreWindowStack *stack, DFBResult (*UpdateCursor) ( CoreWindowStack *stack,
void *wm_data, void *wm_data,
void *stack_data, void *stack_data,
CoreCursorUpdateFlags flags ); CoreCursorUpdateFlags flags );
} CoreWMFuncs; } CoreWMFuncs;
void dfb_wm_get_info( CoreWMInfo *info ); void dfb_wm_get_info( CoreWMInfo *info );
DFBResult dfb_wm_post_init ( CoreDFB *core );
DFBResult dfb_wm_init_stack ( CoreWindowStack *stack ); DFBResult dfb_wm_init_stack ( CoreWindowStack *stack );
DFBResult dfb_wm_close_stack ( CoreWindowStack *stack, DFBResult dfb_wm_close_stack ( CoreWindowStack *stack,
bool final ); bool final );
DFBResult dfb_wm_set_active ( CoreWindowStack *stack, DFBResult dfb_wm_set_active ( CoreWindowStack *stack,
bool active ); bool active );
DFBResult dfb_wm_resize_stack ( CoreWindowStack *stack, DFBResult dfb_wm_resize_stack ( CoreWindowStack *stack,
int width, int width,
skipping to change at line 310 skipping to change at line 307
CoreWindow **ret_window ); CoreWindow **ret_window );
DFBResult dfb_wm_window_lookup ( CoreWindowStack *stack, DFBResult dfb_wm_window_lookup ( CoreWindowStack *stack,
DFBWindowID window_id, DFBWindowID window_id,
CoreWindow **ret_window ); CoreWindow **ret_window );
DFBResult dfb_wm_enum_windows ( CoreWindowStack *stack, DFBResult dfb_wm_enum_windows ( CoreWindowStack *stack,
CoreWMWindowCallback callback, CoreWMWindowCallback callback,
void *callback_ctx ); void *callback_ctx );
DFBResult dfb_wm_start_desktop ( CoreWindowStack *stack);
DFBResult dfb_wm_get_insets ( CoreWindowStack *stack, DFBResult dfb_wm_get_insets ( CoreWindowStack *stack,
CoreWindow *window, CoreWindow *window,
DFBInsets *insets ); DFBInsets *insets );
DFBResult dfb_wm_set_window_property ( CoreWindowStack *stack, DFBResult dfb_wm_set_window_property ( CoreWindowStack *stack,
CoreWindow *window, CoreWindow *window,
const char *key, const char *key,
void *value, void *value,
void **ret_old_value ); void **ret_old_value );
 End of changes. 7 change blocks. 
12 lines changed or deleted 8 lines changed or added


 wm_module.h   wm_module.h 
/* /*
(c) Copyright 2001-2007 The DirectFB Organization (directfb.org) (c) Copyright 2001-2008 The world wide DirectFB Open Source Community ( directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH (c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved. All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>, Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>, Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>, Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>. Claudio Ciccani <klan@users.sf.net>.
skipping to change at line 60 skipping to change at line 60
static DFBResult wm_leave ( bool emergency, static DFBResult wm_leave ( bool emergency,
void *wm_data, void *wm_data,
void *shared_data ); void *shared_data );
static DFBResult wm_suspend ( void *wm_data, static DFBResult wm_suspend ( void *wm_data,
void *shared_data ); void *shared_data );
static DFBResult wm_resume ( void *wm_data, static DFBResult wm_resume ( void *wm_data,
void *shared_data ); void *shared_data );
static DFBResult wm_post_init ( void *wm_data,
void *shared_data );
/** Stack **/ /** Stack **/
static DFBResult wm_init_stack ( CoreWindowStack *stack, static DFBResult wm_init_stack ( CoreWindowStack *stack,
void *wm_data, void *wm_data,
void *stack_data ); void *stack_data );
static DFBResult wm_close_stack ( CoreWindowStack *stack, static DFBResult wm_close_stack ( CoreWindowStack *stack,
void *wm_data, void *wm_data,
void *stack_data ); void *stack_data );
skipping to change at line 110 skipping to change at line 113
DFBWindowID window_id, DFBWindowID window_id,
CoreWindow **ret_window ); CoreWindow **ret_window );
static DFBResult wm_enum_windows ( CoreWindowStack *stack, static DFBResult wm_enum_windows ( CoreWindowStack *stack,
void *wm_data, void *wm_data,
void *stack_data, void *stack_data,
CoreWMWindowCallback callback, CoreWMWindowCallback callback,
void *callback_ctx ) ; void *callback_ctx ) ;
/** Window **/ /** Window **/
static DFBResult wm_start_desktop ( CoreWindowStack *stack );
static DFBResult wm_get_insets ( CoreWindowStack *stack, static DFBResult wm_get_insets ( CoreWindowStack *stack,
CoreWindow *window, CoreWindow *window,
DFBInsets *insets ); DFBInsets *insets );
static DFBResult wm_preconfigure_window ( CoreWindowStack *stack , static DFBResult wm_preconfigure_window ( CoreWindowStack *stack ,
void *wm_data, void *wm_data,
void *stack_data, void *stack_data,
CoreWindow *window, CoreWindow *window,
void *window_data ); void *window_data );
skipping to change at line 206 skipping to change at line 207
void *window_data, void *window_data,
const DFBRegion *region, const DFBRegion *region,
DFBSurfaceFlipFlags flags ); DFBSurfaceFlipFlags flags );
static DFBResult wm_update_cursor ( CoreWindowStack *stack, static DFBResult wm_update_cursor ( CoreWindowStack *stack,
void *wm_data, void *wm_data,
void *stack_data, void *stack_data,
CoreCursorUpdateFlags flags ); CoreCursorUpdateFlags flags );
static CoreWMFuncs wm_funcs = { static CoreWMFuncs wm_funcs = {
GetWMInfo: wm_get_info, .GetWMInfo = wm_get_info,
Initialize: wm_initialize, .Initialize = wm_initialize,
Join: wm_join, .Join = wm_join,
Shutdown: wm_shutdown, .Shutdown = wm_shutdown,
Leave: wm_leave, .Leave = wm_leave,
Suspend: wm_suspend, .Suspend = wm_suspend,
Resume: wm_resume, .Resume = wm_resume,
.PostInit = wm_post_init,
InitStack: wm_init_stack, .InitStack = wm_init_stack,
CloseStack: wm_close_stack, .CloseStack = wm_close_stack,
SetActive: wm_set_active, .SetActive = wm_set_active,
ResizeStack: wm_resize_stack, .ResizeStack = wm_resize_stack,
ProcessInput: wm_process_input, .ProcessInput = wm_process_input,
FlushKeys: wm_flush_keys, .FlushKeys = wm_flush_keys,
WindowAt: wm_window_at, .WindowAt = wm_window_at,
WindowLookup: wm_window_lookup, .WindowLookup = wm_window_lookup,
EnumWindows: wm_enum_windows, .EnumWindows = wm_enum_windows,
StartDesktop: wm_start_desktop, .GetInsets = wm_get_insets,
GetInsets: wm_get_insets, .PreConfigureWindow = wm_preconfigure_window,
PreConfigureWindow: wm_preconfigure_window, .SetWindowProperty = wm_set_window_property,
SetWindowProperty: wm_set_window_property, .GetWindowProperty = wm_get_window_property,
GetWindowProperty: wm_get_window_property, .RemoveWindowProperty = wm_remove_window_property,
RemoveWindowProperty:wm_remove_window_property, .AddWindow = wm_add_window,
AddWindow: wm_add_window, .RemoveWindow = wm_remove_window,
RemoveWindow: wm_remove_window, .SetWindowConfig = wm_set_window_config,
SetWindowConfig: wm_set_window_config, .RestackWindow = wm_restack_window,
RestackWindow: wm_restack_window, .Grab = wm_grab,
Grab: wm_grab, .Ungrab = wm_ungrab,
Ungrab: wm_ungrab, .RequestFocus = wm_request_focus,
RequestFocus: wm_request_focus,
UpdateStack: wm_update_stack, .UpdateStack = wm_update_stack,
UpdateWindow: wm_update_window, .UpdateWindow = wm_update_window,
UpdateCursor: wm_update_cursor .UpdateCursor = wm_update_cursor
}; };
#define DFB_WINDOW_MANAGER(shortname) \ #define DFB_WINDOW_MANAGER(shortname) \
__attribute__((constructor)) void directfbwm_##shortname(); \ __attribute__((constructor)) void directfbwm_##shortname(); \
\ \
void \ void \
directfbwm_##shortname() \ directfbwm_##shortname() \
{ \ { \
direct_modules_register( &dfb_core_wm_modules, \ direct_modules_register( &dfb_core_wm_modules, \
DFB_CORE_WM_ABI_VERSION, \ DFB_CORE_WM_ABI_VERSION, \
 End of changes. 8 change blocks. 
35 lines changed or deleted 36 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/