CoreDFB.h   CoreDFB.h 
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 ___CoreDFB__H___ #ifndef ___CoreDFB__H___
#define ___CoreDFB__H___ #define ___CoreDFB__H___
#include "CoreDFB_includes.h" #include <core/CoreDFB_includes.h>
/************************************************************************** ******************************************** /************************************************************************** ********************************************
* CoreDFB * CoreDFB
*/ */
#ifdef __cplusplus #ifdef __cplusplus
#include <core/Interface.h> #include <core/Interface.h>
extern "C" { extern "C" {
#endif #endif
DFBResult CoreDFB_Initialize(
CoreDFB *obj
);
DFBResult CoreDFB_Register(
CoreDFB *obj,
u32 slave_call);
DFBResult CoreDFB_CreateSurface( DFBResult CoreDFB_CreateSurface(
CoreDFB *obj, CoreDFB *obj,
const CoreSurfaceConfig *config, const CoreSurfaceConfig *config,
CoreSurfaceTypeFlags type, CoreSurfaceTypeFlags type,
u64 resource_id, u64 resource_id,
CorePalette *palette, CorePalette *palette,
CoreSurface **ret_surface) ; CoreSurface **ret_surface) ;
DFBResult CoreDFB_CreatePalette( DFBResult CoreDFB_CreatePalette(
CoreDFB *obj, CoreDFB *obj,
skipping to change at line 65 skipping to change at line 73
CorePalette **ret_palette) ; CorePalette **ret_palette) ;
DFBResult CoreDFB_CreateState( DFBResult CoreDFB_CreateState(
CoreDFB *obj, CoreDFB *obj,
CoreGraphicsState **ret_state); CoreGraphicsState **ret_state);
DFBResult CoreDFB_WaitIdle( DFBResult CoreDFB_WaitIdle(
CoreDFB *obj CoreDFB *obj
); );
void *CoreDFB_Init_Dispatch( DFBResult CoreDFB_CreateImageProvider(
CoreDFB *obj,
u32 buffer_call,
u32 *ret_call);
DFBResult CoreDFB_AllowSurface(
CoreDFB *obj,
CoreSurface *surface,
const char *executable,
u32 executable_l
ength);
DFBResult CoreDFB_GetSurface(
CoreDFB *obj,
u32 surface_id,
CoreSurface **ret_surface)
;
DFBResult CoreDFB_ClipboardSet(
CoreDFB *obj,
const char *mime_type,
u32 mime_type_si
ze,
const char *data,
u32 data_size,
u64 timestamp_us
);
DFBResult CoreDFB_ClipboardGet(
CoreDFB *obj,
char *ret_mime_typ
e,
u32 *ret_mime_typ
e_size,
char *ret_data,
u32 *ret_data_siz
e);
DFBResult CoreDFB_ClipboardGetTimestamp(
CoreDFB *obj,
u64 *ret_timestam
p_us);
void CoreDFB_Init_Dispatch(
CoreDFB *core, CoreDFB *core,
CoreDFB *obj, CoreDFB *obj,
FusionCall *call FusionCall *call
); );
void CoreDFB_Deinit_Dispatch( void CoreDFB_Deinit_Dispatch(
void *dispatch FusionCall *call
); );
#ifdef __cplusplus #ifdef __cplusplus
} }
namespace DirectFB { namespace DirectFB {
/* /*
* CoreDFB Calls * CoreDFB Calls
*/ */
typedef enum { typedef enum {
CoreDFB_CreateSurface = 1, CoreDFB_Initialize = 1,
CoreDFB_CreatePalette = 2, CoreDFB_Register = 2,
CoreDFB_CreateState = 3, CoreDFB_CreateSurface = 3,
CoreDFB_WaitIdle = 4, CoreDFB_CreatePalette = 4,
CoreDFB_CreateState = 5,
CoreDFB_WaitIdle = 6,
CoreDFB_CreateImageProvider = 7,
CoreDFB_AllowSurface = 8,
CoreDFB_GetSurface = 9,
CoreDFB_ClipboardSet = 10,
CoreDFB_ClipboardGet = 11,
CoreDFB_ClipboardGetTimestamp = 12,
} CoreDFBCall; } CoreDFBCall;
/* /*
* CoreDFB_Initialize
*/
typedef struct {
} CoreDFBInitialize;
typedef struct {
DFBResult result;
} CoreDFBInitializeReturn;
/*
* CoreDFB_Register
*/
typedef struct {
u32 slave_call;
} CoreDFBRegister;
typedef struct {
DFBResult result;
} CoreDFBRegisterReturn;
/*
* CoreDFB_CreateSurface * CoreDFB_CreateSurface
*/ */
typedef struct { typedef struct {
CoreSurfaceConfig config; CoreSurfaceConfig config;
CoreSurfaceTypeFlags type; CoreSurfaceTypeFlags type;
u64 resource_id; u64 resource_id;
bool palette_set; bool palette_set;
u32 palette_id; u32 palette_id;
} CoreDFBCreateSurface; } CoreDFBCreateSurface;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 surface_id; u32 surface_id;
void* surface_ptr;
} CoreDFBCreateSurfaceReturn; } CoreDFBCreateSurfaceReturn;
/* /*
* CoreDFB_CreatePalette * CoreDFB_CreatePalette
*/ */
typedef struct { typedef struct {
u32 size; u32 size;
} CoreDFBCreatePalette; } CoreDFBCreatePalette;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 palette_id; u32 palette_id;
void* palette_ptr;
} CoreDFBCreatePaletteReturn; } CoreDFBCreatePaletteReturn;
/* /*
* CoreDFB_CreateState * CoreDFB_CreateState
*/ */
typedef struct { typedef struct {
} CoreDFBCreateState; } CoreDFBCreateState;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 state_id; u32 state_id;
void* state_ptr;
} CoreDFBCreateStateReturn; } CoreDFBCreateStateReturn;
/* /*
* CoreDFB_WaitIdle * CoreDFB_WaitIdle
*/ */
typedef struct { typedef struct {
} CoreDFBWaitIdle; } CoreDFBWaitIdle;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreDFBWaitIdleReturn; } CoreDFBWaitIdleReturn;
/*
* CoreDFB_CreateImageProvider
*/
typedef struct {
u32 buffer_call;
} CoreDFBCreateImageProvider;
typedef struct {
DFBResult result;
u32 call;
} CoreDFBCreateImageProviderReturn;
/*
* CoreDFB_AllowSurface
*/
typedef struct {
u32 surface_id;
u32 executable_length;
/* 'executable_length' char follow (executable) */
} CoreDFBAllowSurface;
typedef struct {
DFBResult result;
} CoreDFBAllowSurfaceReturn;
/*
* CoreDFB_GetSurface
*/
typedef struct {
u32 surface_id;
} CoreDFBGetSurface;
typedef struct {
DFBResult result;
u32 surface_id;
void* surface_ptr;
} CoreDFBGetSurfaceReturn;
/*
* CoreDFB_ClipboardSet
*/
typedef struct {
u32 mime_type_size;
u32 data_size;
u64 timestamp_us;
/* 'mime_type_size' char follow (mime_type) */
/* 'data_size' char follow (data) */
} CoreDFBClipboardSet;
typedef struct {
DFBResult result;
} CoreDFBClipboardSetReturn;
/*
* CoreDFB_ClipboardGet
*/
typedef struct {
} CoreDFBClipboardGet;
typedef struct {
DFBResult result;
u32 mime_type_size;
u32 data_size;
/* 'mime_type_size' char follow (mime_type) */
/* 'data_size' char follow (data) */
} CoreDFBClipboardGetReturn;
/*
* CoreDFB_ClipboardGetTimestamp
*/
typedef struct {
} CoreDFBClipboardGetTimestamp;
typedef struct {
DFBResult result;
u64 timestamp_us;
} CoreDFBClipboardGetTimestampReturn;
class ICore : public Interface class ICore : public Interface
{ {
public: public:
ICore( CoreDFB *core ) ICore( CoreDFB *core )
: :
Interface( core ) Interface( core )
{ {
} }
public: public:
virtual DFBResult Initialize(
) = 0;
virtual DFBResult Register(
u32 slave_call
) = 0;
virtual DFBResult CreateSurface( virtual DFBResult CreateSurface(
const CoreSurfaceConfig *config, const CoreSurfaceConfig *config,
CoreSurfaceTypeFlags type, CoreSurfaceTypeFlags type,
u64 resource_id, u64 resource_id,
CorePalette *palette, CorePalette *palette,
CoreSurface **ret_surface CoreSurface **ret_surface
) = 0; ) = 0;
virtual DFBResult CreatePalette( virtual DFBResult CreatePalette(
u32 size, u32 size,
skipping to change at line 170 skipping to change at line 331
) = 0; ) = 0;
virtual DFBResult CreateState( virtual DFBResult CreateState(
CoreGraphicsState **ret_state CoreGraphicsState **ret_state
) = 0; ) = 0;
virtual DFBResult WaitIdle( virtual DFBResult WaitIdle(
) = 0; ) = 0;
virtual DFBResult CreateImageProvider(
u32 buffer_call,
u32 *ret_call
) = 0;
virtual DFBResult AllowSurface(
CoreSurface *surface,
const char *executable,
u32 executable_l
ength
) = 0;
virtual DFBResult GetSurface(
u32 surface_id,
CoreSurface **ret_surface
) = 0;
virtual DFBResult ClipboardSet(
const char *mime_type,
u32 mime_type_si
ze,
const char *data,
u32 data_size,
u64 timestamp_us
) = 0;
virtual DFBResult ClipboardGet(
char *ret_mime_typ
e,
u32 *ret_mime_typ
e_size,
char *ret_data,
u32 *ret_data_siz
e
) = 0;
virtual DFBResult ClipboardGetTimestamp(
u64 *ret_timestam
p_us
) = 0;
}; };
class ICore_Real : public ICore class ICore_Real : public ICore
{ {
private: private:
CoreDFB *obj; CoreDFB *obj;
public: public:
ICore_Real( CoreDFB *core, CoreDFB *obj ) ICore_Real( CoreDFB *core, CoreDFB *obj )
: :
ICore( core ), ICore( core ),
obj( obj ) obj( obj )
{ {
} }
public: public:
virtual DFBResult Initialize(
);
virtual DFBResult Register(
u32 slave_call
);
virtual DFBResult CreateSurface( virtual DFBResult CreateSurface(
const CoreSurfaceConfig *config, const CoreSurfaceConfig *config,
CoreSurfaceTypeFlags type, CoreSurfaceTypeFlags type,
u64 resource_id, u64 resource_id,
CorePalette *palette, CorePalette *palette,
CoreSurface **ret_surface CoreSurface **ret_surface
); );
virtual DFBResult CreatePalette( virtual DFBResult CreatePalette(
u32 size, u32 size,
skipping to change at line 207 skipping to change at line 411
); );
virtual DFBResult CreateState( virtual DFBResult CreateState(
CoreGraphicsState **ret_state CoreGraphicsState **ret_state
); );
virtual DFBResult WaitIdle( virtual DFBResult WaitIdle(
); );
virtual DFBResult CreateImageProvider(
u32 buffer_call,
u32 *ret_call
);
virtual DFBResult AllowSurface(
CoreSurface *surface,
const char *executable,
u32 executable_l
ength
);
virtual DFBResult GetSurface(
u32 surface_id,
CoreSurface **ret_surface
);
virtual DFBResult ClipboardSet(
const char *mime_type,
u32 mime_type_si
ze,
const char *data,
u32 data_size,
u64 timestamp_us
);
virtual DFBResult ClipboardGet(
char *ret_mime_typ
e,
u32 *ret_mime_typ
e_size,
char *ret_data,
u32 *ret_data_siz
e
);
virtual DFBResult ClipboardGetTimestamp(
u64 *ret_timestam
p_us
);
}; };
class ICore_Requestor : public ICore class ICore_Requestor : public ICore
{ {
private: private:
CoreDFB *obj; CoreDFB *obj;
public: public:
ICore_Requestor( CoreDFB *core, CoreDFB *obj ) ICore_Requestor( CoreDFB *core, CoreDFB *obj )
: :
ICore( core ), ICore( core ),
obj( obj ) obj( obj )
{ {
} }
public: public:
virtual DFBResult Initialize(
);
virtual DFBResult Register(
u32 slave_call
);
virtual DFBResult CreateSurface( virtual DFBResult CreateSurface(
const CoreSurfaceConfig *config, const CoreSurfaceConfig *config,
CoreSurfaceTypeFlags type, CoreSurfaceTypeFlags type,
u64 resource_id, u64 resource_id,
CorePalette *palette, CorePalette *palette,
CoreSurface **ret_surface CoreSurface **ret_surface
); );
virtual DFBResult CreatePalette( virtual DFBResult CreatePalette(
u32 size, u32 size,
skipping to change at line 244 skipping to change at line 491
); );
virtual DFBResult CreateState( virtual DFBResult CreateState(
CoreGraphicsState **ret_state CoreGraphicsState **ret_state
); );
virtual DFBResult WaitIdle( virtual DFBResult WaitIdle(
); );
}; virtual DFBResult CreateImageProvider(
u32 buffer_call,
u32 *ret_call
);
class CoreDFBDispatch virtual DFBResult AllowSurface(
{ CoreSurface *surface,
const char *executable,
u32 executable_l
ength
);
public: virtual DFBResult GetSurface(
CoreDFBDispatch( CoreDFB *core, ICore *real ) u32 surface_id,
: CoreSurface **ret_surface
core( core ), );
real( real )
{
}
virtual DFBResult Dispatch( FusionID caller, virtual DFBResult ClipboardSet(
int method, const char *mime_type,
void *ptr, u32 mime_type_si
unsigned int length, ze,
void *ret_ptr, const char *data,
unsigned int ret_size, u32 data_size,
unsigned int *ret_length ); u64 timestamp_us
);
virtual DFBResult ClipboardGet(
char *ret_mime_typ
e,
u32 *ret_mime_typ
e_size,
char *ret_data,
u32 *ret_data_siz
e
);
virtual DFBResult ClipboardGetTimestamp(
u64 *ret_timestam
p_us
);
private:
CoreDFB *core;
ICore *real;
}; };
DFBResult CoreDFBDispatch__Dispatch( CoreDFB *obj,
FusionID caller,
int method,
void *ptr,
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
} }
#endif #endif
#endif #endif
 End of changes. 21 change blocks. 
27 lines changed or deleted 320 lines changed or added


 CoreDFB_includes.h   CoreDFB_includes.h 
/*
(c) Copyright 2001-2012 The world wide DirectFB Open Source Community (
directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org>,
Ville Syrjälä <syrjala@sci.fi> and
Claudio Ciccani <klan@users.sf.net>.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef __CoreDFB_includes_h__ #ifndef __CoreDFB_includes_h__
#define __CoreDFB_includes_h__ #define __CoreDFB_includes_h__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#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 <core/core.h> #include <core/core.h>
#include <core/graphics_state.h> #include <core/graphics_state.h>
#include <core/layer_context.h> #include <core/layer_context.h>
#include <core/layer_control.h> #include <core/layer_control.h>
#include <core/layers_internal.h> #include <core/layers_internal.h>
#include <core/palette.h> #include <core/palette.h>
#include <core/screens.h>
#include <core/state.h> #include <core/state.h>
#include <core/surface.h> #include <core/surface.h>
#include <core/surface_client.h>
#include <core/windows.h> #include <core/windows.h>
#include <core/windows_internal.h> #include <core/windows_internal.h>
static __inline__ DirectResult static __inline__ DirectResult
CoreDFB_Call( CoreDFB *core, CoreDFB_Call( CoreDFB *core,
FusionCallExecFlags flags, FusionCallExecFlags flags,
int call_arg, int call_arg,
void *ptr, void *ptr,
unsigned int length, unsigned int length,
void *ret_ptr, void *ret_ptr,
unsigned int ret_size, unsigned int ret_size,
unsigned int *ret_length ) unsigned int *ret_length )
{ {
return fusion_call_execute3( &core->shared->call, flags, call_arg, ptr return fusion_call_execute3( &core->shared->call,
, length, ret_ptr, ret_size, ret_length ); (FusionCallExecFlags)(dfb_config->call_no
direct | flags),
call_arg, ptr, length, ret_ptr, ret_size,
ret_length );
} }
static __inline__ u32 static __inline__ u32
CoreGraphicsState_GetID( const CoreGraphicsState *state ) CoreGraphicsState_GetID( const CoreGraphicsState *state )
{ {
return state->object.id; return state->object.id;
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreGraphicsState_Lookup( CoreDFB *core, CoreGraphicsState_Lookup( CoreDFB *core,
skipping to change at line 75 skipping to change at line 107
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreGraphicsState_Unref( CoreGraphicsState *state ) CoreGraphicsState_Unref( CoreGraphicsState *state )
{ {
return (DirectResult) dfb_graphics_state_unref( state ); return (DirectResult) dfb_graphics_state_unref( state );
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreGraphicsState_Catch( CoreDFB *core, CoreGraphicsState_Catch( CoreDFB *core,
u32 object_id, void *object_ptr,
CoreGraphicsState **ret_state ) CoreGraphicsState **ret_state )
{ {
DirectResult ret; *ret_state = (CoreGraphicsState*) object_ptr;
return fusion_object_catch( (FusionObject*) object_ptr );
ret = (DirectResult) dfb_core_get_graphics_state( core, object_id, ret
_state );
if (ret)
return ret;
fusion_ref_catch( &(*ret_state)->object.ref );
return DR_OK;
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreGraphicsState_Throw( CoreGraphicsState *state, CoreGraphicsState_Throw( CoreGraphicsState *state,
FusionID catcher, FusionID catcher,
u32 *ret_object_id ) u32 *ret_object_id )
{ {
*ret_object_id = state->object.id; *ret_object_id = state->object.id;
fusion_reactor_add_permissions( state->object.reactor, catcher, fusion_reactor_add_permissions( state->object.reactor, catcher,
skipping to change at line 120 skipping to change at line 145
{ {
return dfb_layer_id( layer ); return dfb_layer_id( layer );
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreLayer_Lookup( CoreDFB *core, CoreLayer_Lookup( CoreDFB *core,
u32 object_id, u32 object_id,
FusionID caller, FusionID caller,
CoreLayer **ret_layer ) CoreLayer **ret_layer )
{ {
D_UNUSED_P( core );
D_UNUSED_P( caller );
if (object_id >= (u32) dfb_layer_num()) if (object_id >= (u32) dfb_layer_num())
return DR_IDNOTFOUND; return DR_IDNOTFOUND;
*ret_layer = dfb_layer_at( object_id ); *ret_layer = dfb_layer_at( object_id );
return DR_OK; return DR_OK;
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreLayer_Unref( CoreLayer *layer ) CoreLayer_Unref( CoreLayer *layer )
{ {
D_UNUSED_P( layer );
return DR_OK; return DR_OK;
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreLayer_Catch( CoreDFB *core, CoreLayer_Catch__( CoreDFB *core,
u32 object_id, u32 object_id,
CoreLayer **ret_layer ) CoreLayer **ret_layer )
{ {
D_UNUSED_P( core );
if (object_id >= (u32) dfb_layer_num()) if (object_id >= (u32) dfb_layer_num())
return DR_IDNOTFOUND; return DR_IDNOTFOUND;
*ret_layer = dfb_layer_at( object_id ); *ret_layer = dfb_layer_at( object_id );
return DR_OK; return DR_OK;
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreLayer_Throw( CoreLayer *layer, CoreLayer_Throw( CoreLayer *layer,
FusionID catcher, FusionID catcher,
u32 *ret_object_id ) u32 *ret_object_id )
{ {
D_UNUSED_P( catcher );
*ret_object_id = layer->shared->layer_id; *ret_object_id = layer->shared->layer_id;
return DR_OK; return DR_OK;
} }
static __inline__ u32 static __inline__ u32
CoreLayerContext_GetID( const CoreLayerContext *context ) CoreLayerContext_GetID( const CoreLayerContext *context )
{ {
return context->object.id; return context->object.id;
} }
skipping to change at line 194 skipping to change at line 229
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreLayerContext_Unref( CoreLayerContext *context ) CoreLayerContext_Unref( CoreLayerContext *context )
{ {
return (DirectResult) dfb_layer_context_unref( context ); return (DirectResult) dfb_layer_context_unref( context );
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreLayerContext_Catch( CoreDFB *core, CoreLayerContext_Catch( CoreDFB *core,
u32 object_id, void *object_ptr,
CoreLayerContext **ret_context ) CoreLayerContext **ret_context )
{ {
DirectResult ret; *ret_context = (CoreLayerContext*) object_ptr;
return fusion_object_catch( (FusionObject*) object_ptr );
ret = (DirectResult) dfb_core_get_layer_context( core, object_id, ret_
context );
if (ret)
return ret;
fusion_ref_catch( &(*ret_context)->object.ref );
return DR_OK;
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreLayerContext_Throw( CoreLayerContext *context, CoreLayerContext_Throw( CoreLayerContext *context,
FusionID catcher, FusionID catcher,
u32 *ret_object_id ) u32 *ret_object_id )
{ {
*ret_object_id = context->object.id; *ret_object_id = context->object.id;
fusion_reactor_add_permissions( context->object.reactor, catcher, fusion_reactor_add_permissions( context->object.reactor, catcher,
skipping to change at line 264 skipping to change at line 292
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreLayerRegion_Unref( CoreLayerRegion *region ) CoreLayerRegion_Unref( CoreLayerRegion *region )
{ {
return (DirectResult) dfb_layer_region_unref( region ); return (DirectResult) dfb_layer_region_unref( region );
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreLayerRegion_Catch( CoreDFB *core, CoreLayerRegion_Catch( CoreDFB *core,
u32 object_id, void *object_ptr,
CoreLayerRegion **ret_region ) CoreLayerRegion **ret_region )
{ {
DirectResult ret; *ret_region = (CoreLayerRegion*) object_ptr;
return fusion_object_catch( (FusionObject*) object_ptr );
ret = (DirectResult) dfb_core_get_layer_region( core, object_id, ret_r
egion );
if (ret)
return ret;
fusion_ref_catch( &(*ret_region)->object.ref );
return DR_OK;
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreLayerRegion_Throw( CoreLayerRegion *region, CoreLayerRegion_Throw( CoreLayerRegion *region,
FusionID catcher, FusionID catcher,
u32 *ret_object_id ) u32 *ret_object_id )
{ {
*ret_object_id = region->object.id; *ret_object_id = region->object.id;
fusion_reactor_add_permissions( region->object.reactor, catcher, fusion_reactor_add_permissions( region->object.reactor, catcher,
skipping to change at line 331 skipping to change at line 352
} }
static __inline__ DirectResult static __inline__ DirectResult
CorePalette_Unref( CorePalette *palette ) CorePalette_Unref( CorePalette *palette )
{ {
return (DirectResult) dfb_palette_unref( palette ); return (DirectResult) dfb_palette_unref( palette );
} }
static __inline__ DirectResult static __inline__ DirectResult
CorePalette_Catch( CoreDFB *core, CorePalette_Catch( CoreDFB *core,
u32 object_id, void *object_ptr,
CorePalette **ret_palette ) CorePalette **ret_palette )
{ {
DirectResult ret; *ret_palette = (CorePalette*) object_ptr;
return fusion_object_catch( (FusionObject*) object_ptr );
ret = (DirectResult) dfb_core_get_palette( core, object_id, ret_palett
e );
if (ret)
return ret;
fusion_ref_catch( &(*ret_palette)->object.ref );
return DR_OK;
} }
static __inline__ DirectResult static __inline__ DirectResult
CorePalette_Throw( CorePalette *palette, CorePalette_Throw( CorePalette *palette,
FusionID catcher, FusionID catcher,
u32 *ret_object_id ) u32 *ret_object_id )
{ {
*ret_object_id = palette->object.id; *ret_object_id = palette->object.id;
fusion_reactor_add_permissions( palette->object.reactor, catcher, fusion_reactor_add_permissions( palette->object.reactor, catcher,
skipping to change at line 365 skipping to change at line 379
(FusionRefPermissions)(FUSION_REF_PERMIT_R EF_UNREF_LOCAL | FUSION_REF_PERMIT_CATCH) ); (FusionRefPermissions)(FUSION_REF_PERMIT_R EF_UNREF_LOCAL | FUSION_REF_PERMIT_CATCH) );
fusion_call_add_permissions( &palette->call, catcher, FUSION_CALL_PERM IT_EXECUTE ); fusion_call_add_permissions( &palette->call, catcher, FUSION_CALL_PERM IT_EXECUTE );
if (!palette->object.owner) if (!palette->object.owner)
palette->object.owner = catcher; palette->object.owner = catcher;
return fusion_ref_throw( &palette->object.ref, catcher ); return fusion_ref_throw( &palette->object.ref, catcher );
} }
static __inline__ u32 static __inline__ u32
CoreScreen_GetID( const CoreScreen *screen )
{
return dfb_screen_id( screen );
}
static __inline__ DirectResult
CoreScreen_Lookup( CoreDFB *core,
u32 object_id,
FusionID caller,
CoreScreen **ret_screen )
{
D_UNUSED_P( core );
D_UNUSED_P( caller );
if (object_id >= (u32) dfb_screens_num())
return DR_IDNOTFOUND;
*ret_screen = dfb_screens_at( object_id );
return DR_OK;
}
static __inline__ DirectResult
CoreScreen_Unref( CoreScreen *screen )
{
D_UNUSED_P( screen );
return DR_OK;
}
static __inline__ DirectResult
CoreScreen_Catch__( CoreDFB *core,
u32 object_id,
CoreScreen **ret_screen )
{
D_UNUSED_P( core );
if (object_id >= (u32) dfb_screens_num())
return DR_IDNOTFOUND;
*ret_screen = dfb_screens_at( object_id );
return DR_OK;
}
static __inline__ DirectResult
CoreScreen_Throw( CoreScreen *screen,
FusionID catcher,
u32 *ret_object_id )
{
D_UNUSED_P( catcher );
*ret_object_id = dfb_screen_id( screen );
return DR_OK;
}
static __inline__ u32
CoreSurface_GetID( const CoreSurface *surface ) CoreSurface_GetID( const CoreSurface *surface )
{ {
return surface->object.id; return surface->object.id;
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreSurface_Lookup( CoreDFB *core, CoreSurface_Lookup( CoreDFB *core,
u32 object_id, u32 object_id,
FusionID caller, FusionID caller,
CoreSurface **ret_surface ) CoreSurface **ret_surface )
{ {
DFBResult ret; DFBResult ret;
CoreSurface *surface; CoreSurface *surface;
ret = dfb_core_get_surface( core, object_id, &surface ); ret = dfb_core_get_surface( core, object_id, &surface );
if (ret) if (ret)
return (DirectResult) ret; return (DirectResult) ret;
if (surface->object.owner && surface->object.owner != caller) { if (caller != FUSION_ID_MASTER && surface->object.identity && surface- >object.identity != caller) {
dfb_surface_unref( surface ); dfb_surface_unref( surface );
return DR_ACCESSDENIED; return DR_ACCESSDENIED;
} }
*ret_surface = surface; *ret_surface = surface;
return DR_OK; return DR_OK;
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreSurface_Unref( CoreSurface *surface ) CoreSurface_Unref( CoreSurface *surface )
{ {
return (DirectResult) dfb_surface_unref( surface ); return (DirectResult) dfb_surface_unref( surface );
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreSurface_Catch( CoreDFB *core, CoreSurface_Catch( CoreDFB *core,
u32 object_id, void *object_ptr,
CoreSurface **ret_surface ) CoreSurface **ret_surface )
{ {
DirectResult ret; *ret_surface = (CoreSurface*) object_ptr;
return fusion_object_catch( (FusionObject*) object_ptr );
ret = (DirectResult) dfb_core_get_surface( core, object_id, ret_surfac
e );
if (ret)
return ret;
fusion_ref_catch( &(*ret_surface)->object.ref );
return DR_OK;
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreSurface_Throw( CoreSurface *surface, CoreSurface_Throw( CoreSurface *surface,
FusionID catcher, FusionID catcher,
u32 *ret_object_id ) u32 *ret_object_id )
{ {
*ret_object_id = surface->object.id; *ret_object_id = surface->object.id;
fusion_reactor_add_permissions( surface->object.reactor, catcher, fusion_reactor_add_permissions( surface->object.reactor, catcher,
(FusionReactorPermissions)(FUSION_REAC (FusionReactorPermissions)(FUSION_REAC
TOR_PERMIT_ATTACH_DETACH) ); TOR_PERMIT_ATTACH_DETACH |
FUSION_REAC
TOR_PERMIT_DISPATCH) );
fusion_ref_add_permissions( &surface->object.ref, catcher, fusion_ref_add_permissions( &surface->object.ref, catcher,
(FusionRefPermissions)(FUSION_REF_PERMIT_R EF_UNREF_LOCAL | FUSION_REF_PERMIT_CATCH) ); (FusionRefPermissions)(FUSION_REF_PERMIT_R EF_UNREF_LOCAL | FUSION_REF_PERMIT_CATCH) );
fusion_call_add_permissions( &surface->call, catcher, FUSION_CALL_PERM IT_EXECUTE ); fusion_call_add_permissions( &surface->call, catcher, FUSION_CALL_PERM IT_EXECUTE );
if (!surface->object.owner) if (!surface->object.owner && !(surface->type & CSTF_LAYER) && !(surfa ce->config.caps & DSCAPS_SHARED))
surface->object.owner = catcher; surface->object.owner = catcher;
return fusion_ref_throw( &surface->object.ref, catcher ); return fusion_ref_throw( &surface->object.ref, catcher );
} }
static __inline__ u32 static __inline__ u32
CoreSurfaceAllocation_GetID( const CoreSurfaceAllocation *allocation )
{
return allocation->object.id;
}
static __inline__ DirectResult
CoreSurfaceAllocation_Lookup( CoreDFB *core,
u32 object_id,
FusionID caller,
CoreSurfaceAllocation **ret_allocation )
{
DFBResult ret;
CoreSurfaceAllocation *allocation;
ret = dfb_core_get_surface_allocation( core, object_id, &allocation );
if (ret)
return (DirectResult) ret;
if (allocation->object.owner && allocation->object.owner != caller) {
dfb_surface_allocation_unref( allocation );
return DR_ACCESSDENIED;
}
*ret_allocation = allocation;
return DR_OK;
}
static __inline__ DirectResult
CoreSurfaceAllocation_Unref( CoreSurfaceAllocation *allocation )
{
return (DirectResult) dfb_surface_allocation_unref( allocation );
}
static __inline__ DirectResult
CoreSurfaceAllocation_Catch( CoreDFB *core,
void *object_ptr,
CoreSurfaceAllocation **ret_allocation )
{
*ret_allocation = (CoreSurfaceAllocation*) object_ptr;
return fusion_object_catch( (FusionObject*) object_ptr );
}
static __inline__ DirectResult
CoreSurfaceAllocation_Throw( CoreSurfaceAllocation *allocation,
FusionID catcher,
u32 *ret_object_id )
{
*ret_object_id = allocation->object.id;
fusion_reactor_add_permissions( allocation->object.reactor, catcher,
(FusionReactorPermissions)(FUSION_REAC
TOR_PERMIT_ATTACH_DETACH) );
fusion_ref_add_permissions( &allocation->object.ref, catcher,
(FusionRefPermissions)(FUSION_REF_PERMIT_R
EF_UNREF_LOCAL | FUSION_REF_PERMIT_CATCH) );
//fusion_call_add_permissions( &allocation->call, catcher, FUSION_CALL
_PERMIT_EXECUTE );
if (!allocation->object.owner)
allocation->object.owner = catcher;
return fusion_ref_throw( &allocation->object.ref, catcher );
}
static __inline__ u32
CoreSurfaceBuffer_GetID( const CoreSurfaceBuffer *buffer )
{
return buffer->object.id;
}
static __inline__ DirectResult
CoreSurfaceBuffer_Lookup( CoreDFB *core,
u32 object_id,
FusionID caller,
CoreSurfaceBuffer **ret_buffer )
{
DFBResult ret;
CoreSurfaceBuffer *buffer;
ret = dfb_core_get_surface_buffer( core, object_id, &buffer );
if (ret)
return (DirectResult) ret;
if (buffer->object.owner && buffer->object.owner != caller) {
dfb_surface_buffer_unref( buffer );
return DR_ACCESSDENIED;
}
*ret_buffer = buffer;
return DR_OK;
}
static __inline__ DirectResult
CoreSurfaceBuffer_Unref( CoreSurfaceBuffer *buffer )
{
return (DirectResult) dfb_surface_buffer_unref( buffer );
}
static __inline__ DirectResult
CoreSurfaceBuffer_Catch( CoreDFB *core,
void *object_ptr,
CoreSurfaceBuffer **ret_buffer )
{
*ret_buffer = (CoreSurfaceBuffer*) object_ptr;
return fusion_object_catch( (FusionObject*) object_ptr );
}
static __inline__ DirectResult
CoreSurfaceBuffer_Throw( CoreSurfaceBuffer *buffer,
FusionID catcher,
u32 *ret_object_id )
{
*ret_object_id = buffer->object.id;
fusion_reactor_add_permissions( buffer->object.reactor, catcher,
(FusionReactorPermissions)(FUSION_REAC
TOR_PERMIT_ATTACH_DETACH) );
fusion_ref_add_permissions( &buffer->object.ref, catcher,
(FusionRefPermissions)(FUSION_REF_PERMIT_R
EF_UNREF_LOCAL | FUSION_REF_PERMIT_CATCH) );
//fusion_call_add_permissions( &buffer->call, catcher, FUSION_CALL_PER
MIT_EXECUTE );
if (!buffer->object.owner)
buffer->object.owner = catcher;
return fusion_ref_throw( &buffer->object.ref, catcher );
}
static __inline__ u32
CoreSurfaceClient_GetID( const CoreSurfaceClient *client )
{
return client->object.id;
}
static __inline__ DirectResult
CoreSurfaceClient_Lookup( CoreDFB *core,
u32 object_id,
FusionID caller,
CoreSurfaceClient **ret_client )
{
DFBResult ret;
CoreSurfaceClient *client;
ret = dfb_core_get_surface_client( core, object_id, &client );
if (ret)
return (DirectResult) ret;
if (client->object.owner && client->object.owner != caller) {
dfb_surface_client_unref( client );
return DR_ACCESSDENIED;
}
*ret_client = client;
return DR_OK;
}
static __inline__ DirectResult
CoreSurfaceClient_Unref( CoreSurfaceClient *client )
{
return (DirectResult) dfb_surface_client_unref( client );
}
static __inline__ DirectResult
CoreSurfaceClient_Catch( CoreDFB *core,
void *object_ptr,
CoreSurfaceClient **ret_client )
{
*ret_client = (CoreSurfaceClient*) object_ptr;
return fusion_object_catch( (FusionObject*) object_ptr );
}
static __inline__ DirectResult
CoreSurfaceClient_Throw( CoreSurfaceClient *client,
FusionID catcher,
u32 *ret_object_id )
{
*ret_object_id = client->object.id;
fusion_reactor_add_permissions( client->object.reactor, catcher,
(FusionReactorPermissions)(FUSION_REAC
TOR_PERMIT_ATTACH_DETACH) );
fusion_ref_add_permissions( &client->object.ref, catcher,
(FusionRefPermissions)(FUSION_REF_PERMIT_R
EF_UNREF_LOCAL | FUSION_REF_PERMIT_CATCH) );
fusion_call_add_permissions( &client->call, catcher, FUSION_CALL_PERMI
T_EXECUTE );
if (!client->object.owner)
client->object.owner = catcher;
return fusion_ref_throw( &client->object.ref, catcher );
}
static __inline__ u32
CoreWindow_GetID( const CoreWindow *window ) CoreWindow_GetID( const CoreWindow *window )
{ {
return window->object.id; return window->object.id;
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreWindow_Lookup( CoreDFB *core, CoreWindow_Lookup( CoreDFB *core,
u32 object_id, u32 object_id,
FusionID caller, FusionID caller,
CoreWindow **ret_window ) CoreWindow **ret_window )
skipping to change at line 471 skipping to change at line 728
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreWindow_Unref( CoreWindow *window ) CoreWindow_Unref( CoreWindow *window )
{ {
return (DirectResult) dfb_window_unref( window ); return (DirectResult) dfb_window_unref( window );
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreWindow_Catch( CoreDFB *core, CoreWindow_Catch( CoreDFB *core,
u32 object_id, void *object_ptr,
CoreWindow **ret_window ) CoreWindow **ret_window )
{ {
DirectResult ret; *ret_window = (CoreWindow*) object_ptr;
return fusion_object_catch( (FusionObject*) object_ptr );
ret = (DirectResult) dfb_core_get_window( core, object_id, ret_window
);
if (ret)
return ret;
fusion_ref_catch( &(*ret_window)->object.ref );
return DR_OK;
} }
static __inline__ DirectResult static __inline__ DirectResult
CoreWindow_Throw( CoreWindow *window, CoreWindow_Throw( CoreWindow *window,
FusionID catcher, FusionID catcher,
u32 *ret_object_id ) u32 *ret_object_id )
{ {
*ret_object_id = window->object.id; *ret_object_id = window->object.id;
fusion_reactor_add_permissions( window->object.reactor, catcher, fusion_reactor_add_permissions( window->object.reactor, catcher,
 End of changes. 26 change blocks. 
73 lines changed or deleted 329 lines changed or added


 CoreGraphicsState.h   CoreGraphicsState.h 
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 ___CoreGraphicsState__H___ #ifndef ___CoreGraphicsState__H___
#define ___CoreGraphicsState__H___ #define ___CoreGraphicsState__H___
#include "CoreGraphicsState_includes.h" #include <core/CoreGraphicsState_includes.h>
/************************************************************************** ******************************************** /************************************************************************** ********************************************
* CoreGraphicsState * CoreGraphicsState
*/ */
#ifdef __cplusplus #ifdef __cplusplus
#include <core/Interface.h> #include <core/Interface.h>
extern "C" { extern "C" {
#endif #endif
skipping to change at line 60 skipping to change at line 60
DFBSurfaceBlittingFlags flags); DFBSurfaceBlittingFlags flags);
DFBResult CoreGraphicsState_SetClip( DFBResult CoreGraphicsState_SetClip(
CoreGraphicsState *obj, CoreGraphicsState *obj,
const DFBRegion *region); const DFBRegion *region);
DFBResult CoreGraphicsState_SetColor( DFBResult CoreGraphicsState_SetColor(
CoreGraphicsState *obj, CoreGraphicsState *obj,
const DFBColor *color); const DFBColor *color);
DFBResult CoreGraphicsState_SetColorAndIndex(
CoreGraphicsState *obj,
const DFBColor *color,
u32 index);
DFBResult CoreGraphicsState_SetSrcBlend( DFBResult CoreGraphicsState_SetSrcBlend(
CoreGraphicsState *obj, CoreGraphicsState *obj,
DFBSurfaceBlendFunction function); DFBSurfaceBlendFunction function);
DFBResult CoreGraphicsState_SetDstBlend( DFBResult CoreGraphicsState_SetDstBlend(
CoreGraphicsState *obj, CoreGraphicsState *obj,
DFBSurfaceBlendFunction function); DFBSurfaceBlendFunction function);
DFBResult CoreGraphicsState_SetSrcColorKey( DFBResult CoreGraphicsState_SetSrcColorKey(
CoreGraphicsState *obj, CoreGraphicsState *obj,
skipping to change at line 114 skipping to change at line 119
DFBSurfaceRenderOptions options); DFBSurfaceRenderOptions options);
DFBResult CoreGraphicsState_SetMatrix( DFBResult CoreGraphicsState_SetMatrix(
CoreGraphicsState *obj, CoreGraphicsState *obj,
const s32 *values); const s32 *values);
DFBResult CoreGraphicsState_SetSource2( DFBResult CoreGraphicsState_SetSource2(
CoreGraphicsState *obj, CoreGraphicsState *obj,
CoreSurface *surface); CoreSurface *surface);
DFBResult CoreGraphicsState_SetFrom(
CoreGraphicsState *obj,
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye);
DFBResult CoreGraphicsState_SetTo(
CoreGraphicsState *obj,
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye);
DFBResult CoreGraphicsState_DrawRectangles( DFBResult CoreGraphicsState_DrawRectangles(
CoreGraphicsState *obj, CoreGraphicsState *obj,
const DFBRectangle *rects, const DFBRectangle *rects,
u32 num); u32 num);
DFBResult CoreGraphicsState_DrawLines( DFBResult CoreGraphicsState_DrawLines(
CoreGraphicsState *obj, CoreGraphicsState *obj,
const DFBRegion *lines, const DFBRegion *lines,
u32 num); u32 num);
skipping to change at line 177 skipping to change at line 192
const DFBPoint *points1, const DFBPoint *points1,
const DFBPoint *points2, const DFBPoint *points2,
u32 num); u32 num);
DFBResult CoreGraphicsState_TextureTriangles( DFBResult CoreGraphicsState_TextureTriangles(
CoreGraphicsState *obj, CoreGraphicsState *obj,
const DFBVertex *vertices, const DFBVertex *vertices,
u32 num, u32 num,
DFBTriangleFormation formation); DFBTriangleFormation formation);
void *CoreGraphicsState_Init_Dispatch( DFBResult CoreGraphicsState_Flush(
CoreGraphicsState *obj
);
DFBResult CoreGraphicsState_ReleaseSource(
CoreGraphicsState *obj
);
void CoreGraphicsState_Init_Dispatch(
CoreDFB *core, CoreDFB *core,
CoreGraphicsState *obj, CoreGraphicsState *obj,
FusionCall *call FusionCall *call
); );
void CoreGraphicsState_Deinit_Dispatch( void CoreGraphicsState_Deinit_Dispatch(
void *dispatch FusionCall *call
); );
#ifdef __cplusplus #ifdef __cplusplus
} }
namespace DirectFB { namespace DirectFB {
/* /*
* CoreGraphicsState Calls * CoreGraphicsState Calls
*/ */
typedef enum { typedef enum {
CoreGraphicsState_SetDrawingFlags = 1, CoreGraphicsState_SetDrawingFlags = 1,
CoreGraphicsState_SetBlittingFlags = 2, CoreGraphicsState_SetBlittingFlags = 2,
CoreGraphicsState_SetClip = 3, CoreGraphicsState_SetClip = 3,
CoreGraphicsState_SetColor = 4, CoreGraphicsState_SetColor = 4,
CoreGraphicsState_SetSrcBlend = 5, CoreGraphicsState_SetColorAndIndex = 5,
CoreGraphicsState_SetDstBlend = 6, CoreGraphicsState_SetSrcBlend = 6,
CoreGraphicsState_SetSrcColorKey = 7, CoreGraphicsState_SetDstBlend = 7,
CoreGraphicsState_SetDstColorKey = 8, CoreGraphicsState_SetSrcColorKey = 8,
CoreGraphicsState_SetDestination = 9, CoreGraphicsState_SetDstColorKey = 9,
CoreGraphicsState_SetSource = 10, CoreGraphicsState_SetDestination = 10,
CoreGraphicsState_SetSourceMask = 11, CoreGraphicsState_SetSource = 11,
CoreGraphicsState_SetSourceMaskVals = 12, CoreGraphicsState_SetSourceMask = 12,
CoreGraphicsState_SetIndexTranslation = 13, CoreGraphicsState_SetSourceMaskVals = 13,
CoreGraphicsState_SetColorKey = 14, CoreGraphicsState_SetIndexTranslation = 14,
CoreGraphicsState_SetRenderOptions = 15, CoreGraphicsState_SetColorKey = 15,
CoreGraphicsState_SetMatrix = 16, CoreGraphicsState_SetRenderOptions = 16,
CoreGraphicsState_SetSource2 = 17, CoreGraphicsState_SetMatrix = 17,
CoreGraphicsState_DrawRectangles = 18, CoreGraphicsState_SetSource2 = 18,
CoreGraphicsState_DrawLines = 19, CoreGraphicsState_SetFrom = 19,
CoreGraphicsState_FillRectangles = 20, CoreGraphicsState_SetTo = 20,
CoreGraphicsState_FillTriangles = 21, CoreGraphicsState_DrawRectangles = 21,
CoreGraphicsState_FillTrapezoids = 22, CoreGraphicsState_DrawLines = 22,
CoreGraphicsState_FillSpans = 23, CoreGraphicsState_FillRectangles = 23,
CoreGraphicsState_Blit = 24, CoreGraphicsState_FillTriangles = 24,
CoreGraphicsState_Blit2 = 25, CoreGraphicsState_FillTrapezoids = 25,
CoreGraphicsState_StretchBlit = 26, CoreGraphicsState_FillSpans = 26,
CoreGraphicsState_TileBlit = 27, CoreGraphicsState_Blit = 27,
CoreGraphicsState_TextureTriangles = 28, CoreGraphicsState_Blit2 = 28,
CoreGraphicsState_StretchBlit = 29,
CoreGraphicsState_TileBlit = 30,
CoreGraphicsState_TextureTriangles = 31,
CoreGraphicsState_Flush = 32,
CoreGraphicsState_ReleaseSource = 33,
} CoreGraphicsStateCall; } CoreGraphicsStateCall;
/* /*
* CoreGraphicsState_SetDrawingFlags * CoreGraphicsState_SetDrawingFlags
*/ */
typedef struct { typedef struct {
DFBSurfaceDrawingFlags flags; DFBSurfaceDrawingFlags flags;
} CoreGraphicsStateSetDrawingFlags; } CoreGraphicsStateSetDrawingFlags;
typedef struct { typedef struct {
skipping to change at line 271 skipping to change at line 299
*/ */
typedef struct { typedef struct {
DFBColor color; DFBColor color;
} CoreGraphicsStateSetColor; } CoreGraphicsStateSetColor;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreGraphicsStateSetColorReturn; } CoreGraphicsStateSetColorReturn;
/* /*
* CoreGraphicsState_SetColorAndIndex
*/
typedef struct {
DFBColor color;
u32 index;
} CoreGraphicsStateSetColorAndIndex;
typedef struct {
DFBResult result;
} CoreGraphicsStateSetColorAndIndexReturn;
/*
* CoreGraphicsState_SetSrcBlend * CoreGraphicsState_SetSrcBlend
*/ */
typedef struct { typedef struct {
DFBSurfaceBlendFunction function; DFBSurfaceBlendFunction function;
} CoreGraphicsStateSetSrcBlend; } CoreGraphicsStateSetSrcBlend;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreGraphicsStateSetSrcBlendReturn; } CoreGraphicsStateSetSrcBlendReturn;
skipping to change at line 416 skipping to change at line 456
*/ */
typedef struct { typedef struct {
u32 surface_id; u32 surface_id;
} CoreGraphicsStateSetSource2; } CoreGraphicsStateSetSource2;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreGraphicsStateSetSource2Return; } CoreGraphicsStateSetSource2Return;
/* /*
* CoreGraphicsState_SetFrom
*/
typedef struct {
CoreSurfaceBufferRole role;
DFBSurfaceStereoEye eye;
} CoreGraphicsStateSetFrom;
typedef struct {
DFBResult result;
} CoreGraphicsStateSetFromReturn;
/*
* CoreGraphicsState_SetTo
*/
typedef struct {
CoreSurfaceBufferRole role;
DFBSurfaceStereoEye eye;
} CoreGraphicsStateSetTo;
typedef struct {
DFBResult result;
} CoreGraphicsStateSetToReturn;
/*
* CoreGraphicsState_DrawRectangles * CoreGraphicsState_DrawRectangles
*/ */
typedef struct { typedef struct {
u32 num; u32 num;
/* 'num' DFBRectangle follow (rects) */ /* 'num' DFBRectangle follow (rects) */
} CoreGraphicsStateDrawRectangles; } CoreGraphicsStateDrawRectangles;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreGraphicsStateDrawRectanglesReturn; } CoreGraphicsStateDrawRectanglesReturn;
skipping to change at line 555 skipping to change at line 619
typedef struct { typedef struct {
u32 num; u32 num;
DFBTriangleFormation formation; DFBTriangleFormation formation;
/* 'num' DFBVertex follow (vertices) */ /* 'num' DFBVertex follow (vertices) */
} CoreGraphicsStateTextureTriangles; } CoreGraphicsStateTextureTriangles;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreGraphicsStateTextureTrianglesReturn; } CoreGraphicsStateTextureTrianglesReturn;
/*
* CoreGraphicsState_Flush
*/
typedef struct {
} CoreGraphicsStateFlush;
typedef struct {
DFBResult result;
} CoreGraphicsStateFlushReturn;
/*
* CoreGraphicsState_ReleaseSource
*/
typedef struct {
} CoreGraphicsStateReleaseSource;
typedef struct {
DFBResult result;
} CoreGraphicsStateReleaseSourceReturn;
class IGraphicsState : public Interface class IGraphicsState : public Interface
{ {
public: public:
IGraphicsState( CoreDFB *core ) IGraphicsState( CoreDFB *core )
: :
Interface( core ) Interface( core )
{ {
} }
public: public:
skipping to change at line 581 skipping to change at line 665
) = 0; ) = 0;
virtual DFBResult SetClip( virtual DFBResult SetClip(
const DFBRegion *region const DFBRegion *region
) = 0; ) = 0;
virtual DFBResult SetColor( virtual DFBResult SetColor(
const DFBColor *color const DFBColor *color
) = 0; ) = 0;
virtual DFBResult SetColorAndIndex(
const DFBColor *color,
u32 index
) = 0;
virtual DFBResult SetSrcBlend( virtual DFBResult SetSrcBlend(
DFBSurfaceBlendFunction function DFBSurfaceBlendFunction function
) = 0; ) = 0;
virtual DFBResult SetDstBlend( virtual DFBResult SetDstBlend(
DFBSurfaceBlendFunction function DFBSurfaceBlendFunction function
) = 0; ) = 0;
virtual DFBResult SetSrcColorKey( virtual DFBResult SetSrcColorKey(
u32 key u32 key
skipping to change at line 635 skipping to change at line 724
) = 0; ) = 0;
virtual DFBResult SetMatrix( virtual DFBResult SetMatrix(
const s32 *values const s32 *values
) = 0; ) = 0;
virtual DFBResult SetSource2( virtual DFBResult SetSource2(
CoreSurface *surface CoreSurface *surface
) = 0; ) = 0;
virtual DFBResult SetFrom(
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye
) = 0;
virtual DFBResult SetTo(
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye
) = 0;
virtual DFBResult DrawRectangles( virtual DFBResult DrawRectangles(
const DFBRectangle *rects, const DFBRectangle *rects,
u32 num u32 num
) = 0; ) = 0;
virtual DFBResult DrawLines( virtual DFBResult DrawLines(
const DFBRegion *lines, const DFBRegion *lines,
u32 num u32 num
) = 0; ) = 0;
skipping to change at line 698 skipping to change at line 797
const DFBPoint *points2, const DFBPoint *points2,
u32 num u32 num
) = 0; ) = 0;
virtual DFBResult TextureTriangles( virtual DFBResult TextureTriangles(
const DFBVertex *vertices, const DFBVertex *vertices,
u32 num, u32 num,
DFBTriangleFormation formation DFBTriangleFormation formation
) = 0; ) = 0;
virtual DFBResult Flush(
) = 0;
virtual DFBResult ReleaseSource(
) = 0;
}; };
class IGraphicsState_Real : public IGraphicsState class IGraphicsState_Real : public IGraphicsState
{ {
private: private:
CoreGraphicsState *obj; CoreGraphicsState *obj;
public: public:
IGraphicsState_Real( CoreDFB *core, CoreGraphicsState *obj ) IGraphicsState_Real( CoreDFB *core, CoreGraphicsState *obj )
: :
skipping to change at line 730 skipping to change at line 837
); );
virtual DFBResult SetClip( virtual DFBResult SetClip(
const DFBRegion *region const DFBRegion *region
); );
virtual DFBResult SetColor( virtual DFBResult SetColor(
const DFBColor *color const DFBColor *color
); );
virtual DFBResult SetColorAndIndex(
const DFBColor *color,
u32 index
);
virtual DFBResult SetSrcBlend( virtual DFBResult SetSrcBlend(
DFBSurfaceBlendFunction function DFBSurfaceBlendFunction function
); );
virtual DFBResult SetDstBlend( virtual DFBResult SetDstBlend(
DFBSurfaceBlendFunction function DFBSurfaceBlendFunction function
); );
virtual DFBResult SetSrcColorKey( virtual DFBResult SetSrcColorKey(
u32 key u32 key
skipping to change at line 784 skipping to change at line 896
); );
virtual DFBResult SetMatrix( virtual DFBResult SetMatrix(
const s32 *values const s32 *values
); );
virtual DFBResult SetSource2( virtual DFBResult SetSource2(
CoreSurface *surface CoreSurface *surface
); );
virtual DFBResult SetFrom(
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye
);
virtual DFBResult SetTo(
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye
);
virtual DFBResult DrawRectangles( virtual DFBResult DrawRectangles(
const DFBRectangle *rects, const DFBRectangle *rects,
u32 num u32 num
); );
virtual DFBResult DrawLines( virtual DFBResult DrawLines(
const DFBRegion *lines, const DFBRegion *lines,
u32 num u32 num
); );
skipping to change at line 847 skipping to change at line 969
const DFBPoint *points2, const DFBPoint *points2,
u32 num u32 num
); );
virtual DFBResult TextureTriangles( virtual DFBResult TextureTriangles(
const DFBVertex *vertices, const DFBVertex *vertices,
u32 num, u32 num,
DFBTriangleFormation formation DFBTriangleFormation formation
); );
virtual DFBResult Flush(
);
virtual DFBResult ReleaseSource(
);
}; };
class IGraphicsState_Requestor : public IGraphicsState class IGraphicsState_Requestor : public IGraphicsState
{ {
private: private:
CoreGraphicsState *obj; CoreGraphicsState *obj;
public: public:
IGraphicsState_Requestor( CoreDFB *core, CoreGraphicsState *obj ) IGraphicsState_Requestor( CoreDFB *core, CoreGraphicsState *obj )
: :
skipping to change at line 879 skipping to change at line 1009
); );
virtual DFBResult SetClip( virtual DFBResult SetClip(
const DFBRegion *region const DFBRegion *region
); );
virtual DFBResult SetColor( virtual DFBResult SetColor(
const DFBColor *color const DFBColor *color
); );
virtual DFBResult SetColorAndIndex(
const DFBColor *color,
u32 index
);
virtual DFBResult SetSrcBlend( virtual DFBResult SetSrcBlend(
DFBSurfaceBlendFunction function DFBSurfaceBlendFunction function
); );
virtual DFBResult SetDstBlend( virtual DFBResult SetDstBlend(
DFBSurfaceBlendFunction function DFBSurfaceBlendFunction function
); );
virtual DFBResult SetSrcColorKey( virtual DFBResult SetSrcColorKey(
u32 key u32 key
skipping to change at line 933 skipping to change at line 1068
); );
virtual DFBResult SetMatrix( virtual DFBResult SetMatrix(
const s32 *values const s32 *values
); );
virtual DFBResult SetSource2( virtual DFBResult SetSource2(
CoreSurface *surface CoreSurface *surface
); );
virtual DFBResult SetFrom(
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye
);
virtual DFBResult SetTo(
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye
);
virtual DFBResult DrawRectangles( virtual DFBResult DrawRectangles(
const DFBRectangle *rects, const DFBRectangle *rects,
u32 num u32 num
); );
virtual DFBResult DrawLines( virtual DFBResult DrawLines(
const DFBRegion *lines, const DFBRegion *lines,
u32 num u32 num
); );
skipping to change at line 996 skipping to change at line 1141
const DFBPoint *points2, const DFBPoint *points2,
u32 num u32 num
); );
virtual DFBResult TextureTriangles( virtual DFBResult TextureTriangles(
const DFBVertex *vertices, const DFBVertex *vertices,
u32 num, u32 num,
DFBTriangleFormation formation DFBTriangleFormation formation
); );
}; virtual DFBResult Flush(
class CoreGraphicsStateDispatch );
{
public: virtual DFBResult ReleaseSource(
CoreGraphicsStateDispatch( CoreDFB *core, IGraphicsState *real )
:
core( core ),
real( real )
{
}
virtual DFBResult Dispatch( FusionID caller, );
int method,
void *ptr,
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
private:
CoreDFB *core;
IGraphicsState *real;
}; };
DFBResult CoreGraphicsStateDispatch__Dispatch( CoreGraphicsState *obj,
FusionID caller,
int method,
void *ptr,
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
} }
#endif #endif
#endif #endif
 End of changes. 23 change blocks. 
47 lines changed or deleted 185 lines changed or added


 CoreGraphicsState_includes.h   CoreGraphicsState_includes.h 
skipping to change at line 19 skipping to change at line 19
static __inline__ DirectResult static __inline__ DirectResult
CoreGraphicsState_Call( CoreGraphicsState *state, CoreGraphicsState_Call( CoreGraphicsState *state,
FusionCallExecFlags flags, FusionCallExecFlags flags,
int call_arg, int call_arg,
void *ptr, void *ptr,
unsigned int length, unsigned int length,
void *ret_ptr, void *ret_ptr,
unsigned int ret_size, unsigned int ret_size,
unsigned int *ret_length ) unsigned int *ret_length )
{ {
return fusion_call_execute3( &state->call, flags, call_arg, ptr, lengt return fusion_call_execute3( &state->call,
h, ret_ptr, ret_size, ret_length ); (FusionCallExecFlags)(dfb_config->call_no
direct | flags),
call_arg, ptr, length, ret_ptr, ret_size,
ret_length );
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
2 lines changed or deleted 5 lines changed or added


 CoreLayer.h   CoreLayer.h 
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 ___CoreLayer__H___ #ifndef ___CoreLayer__H___
#define ___CoreLayer__H___ #define ___CoreLayer__H___
#include "CoreLayer_includes.h" #include <core/CoreLayer_includes.h>
/************************************************************************** ******************************************** /************************************************************************** ********************************************
* CoreLayer * CoreLayer
*/ */
#ifdef __cplusplus #ifdef __cplusplus
#include <core/Interface.h> #include <core/Interface.h>
extern "C" { extern "C" {
#endif #endif
DFBResult CoreLayer_CreateContext( DFBResult CoreLayer_CreateContext(
CoreLayer *obj, CoreLayer *obj,
CoreLayerContext **ret_context) ; CoreLayerContext **ret_context) ;
DFBResult CoreLayer_GetPrimaryContext(
CoreLayer *obj,
bool activate,
CoreLayerContext **ret_context)
;
DFBResult CoreLayer_ActivateContext( DFBResult CoreLayer_ActivateContext(
CoreLayer *obj, CoreLayer *obj,
CoreLayerContext *context); CoreLayerContext *context);
DFBResult CoreLayer_GetPrimaryContext( DFBResult CoreLayer_GetCurrentOutputField(
CoreLayer *obj, CoreLayer *obj,
bool activate, s32 *ret_field);
CoreLayerContext **ret_context)
; DFBResult CoreLayer_SetLevel(
CoreLayer *obj,
s32 level);
DFBResult CoreLayer_WaitVSync(
CoreLayer *obj
);
void *CoreLayer_Init_Dispatch( void CoreLayer_Init_Dispatch(
CoreDFB *core, CoreDFB *core,
CoreLayer *obj, CoreLayer *obj,
FusionCall *call FusionCall *call
); );
void CoreLayer_Deinit_Dispatch( void CoreLayer_Deinit_Dispatch(
void *dispatch FusionCall *call
); );
#ifdef __cplusplus #ifdef __cplusplus
} }
namespace DirectFB { namespace DirectFB {
/* /*
* CoreLayer Calls * CoreLayer Calls
*/ */
typedef enum { typedef enum {
CoreLayer_CreateContext = 1, CoreLayer_CreateContext = 1,
CoreLayer_ActivateContext = 2, CoreLayer_GetPrimaryContext = 2,
CoreLayer_GetPrimaryContext = 3, CoreLayer_ActivateContext = 3,
CoreLayer_GetCurrentOutputField = 4,
CoreLayer_SetLevel = 5,
CoreLayer_WaitVSync = 6,
} CoreLayerCall; } CoreLayerCall;
/* /*
* CoreLayer_CreateContext * CoreLayer_CreateContext
*/ */
typedef struct { typedef struct {
} CoreLayerCreateContext; } CoreLayerCreateContext;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 context_id; u32 context_id;
void* context_ptr;
} CoreLayerCreateContextReturn; } CoreLayerCreateContextReturn;
/* /*
* CoreLayer_GetPrimaryContext
*/
typedef struct {
bool activate;
} CoreLayerGetPrimaryContext;
typedef struct {
DFBResult result;
u32 context_id;
void* context_ptr;
} CoreLayerGetPrimaryContextReturn;
/*
* CoreLayer_ActivateContext * CoreLayer_ActivateContext
*/ */
typedef struct { typedef struct {
u32 context_id; u32 context_id;
} CoreLayerActivateContext; } CoreLayerActivateContext;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreLayerActivateContextReturn; } CoreLayerActivateContextReturn;
/* /*
* CoreLayer_GetPrimaryContext * CoreLayer_GetCurrentOutputField
*/ */
typedef struct { typedef struct {
bool activate; } CoreLayerGetCurrentOutputField;
} CoreLayerGetPrimaryContext;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 context_id; s32 field;
} CoreLayerGetPrimaryContextReturn; } CoreLayerGetCurrentOutputFieldReturn;
/*
* CoreLayer_SetLevel
*/
typedef struct {
s32 level;
} CoreLayerSetLevel;
typedef struct {
DFBResult result;
} CoreLayerSetLevelReturn;
/*
* CoreLayer_WaitVSync
*/
typedef struct {
} CoreLayerWaitVSync;
typedef struct {
DFBResult result;
} CoreLayerWaitVSyncReturn;
class ILayer : public Interface class ILayer : public Interface
{ {
public: public:
ILayer( CoreDFB *core ) ILayer( CoreDFB *core )
: :
Interface( core ) Interface( core )
{ {
} }
public: public:
virtual DFBResult CreateContext( virtual DFBResult CreateContext(
CoreLayerContext **ret_context CoreLayerContext **ret_context
) = 0; ) = 0;
virtual DFBResult GetPrimaryContext(
bool activate,
CoreLayerContext **ret_context
) = 0;
virtual DFBResult ActivateContext( virtual DFBResult ActivateContext(
CoreLayerContext *context CoreLayerContext *context
) = 0; ) = 0;
virtual DFBResult GetPrimaryContext( virtual DFBResult GetCurrentOutputField(
bool activate, s32 *ret_field
CoreLayerContext **ret_context ) = 0;
virtual DFBResult SetLevel(
s32 level
) = 0;
virtual DFBResult WaitVSync(
) = 0; ) = 0;
}; };
class ILayer_Real : public ILayer class ILayer_Real : public ILayer
{ {
private: private:
CoreLayer *obj; CoreLayer *obj;
public: public:
skipping to change at line 158 skipping to change at line 219
ILayer( core ), ILayer( core ),
obj( obj ) obj( obj )
{ {
} }
public: public:
virtual DFBResult CreateContext( virtual DFBResult CreateContext(
CoreLayerContext **ret_context CoreLayerContext **ret_context
); );
virtual DFBResult GetPrimaryContext(
bool activate,
CoreLayerContext **ret_context
);
virtual DFBResult ActivateContext( virtual DFBResult ActivateContext(
CoreLayerContext *context CoreLayerContext *context
); );
virtual DFBResult GetPrimaryContext( virtual DFBResult GetCurrentOutputField(
bool activate, s32 *ret_field
CoreLayerContext **ret_context );
virtual DFBResult SetLevel(
s32 level
);
virtual DFBResult WaitVSync(
); );
}; };
class ILayer_Requestor : public ILayer class ILayer_Requestor : public ILayer
{ {
private: private:
CoreLayer *obj; CoreLayer *obj;
public: public:
skipping to change at line 187 skipping to change at line 260
ILayer( core ), ILayer( core ),
obj( obj ) obj( obj )
{ {
} }
public: public:
virtual DFBResult CreateContext( virtual DFBResult CreateContext(
CoreLayerContext **ret_context CoreLayerContext **ret_context
); );
virtual DFBResult ActivateContext(
CoreLayerContext *context
);
virtual DFBResult GetPrimaryContext( virtual DFBResult GetPrimaryContext(
bool activate, bool activate,
CoreLayerContext **ret_context CoreLayerContext **ret_context
); );
}; virtual DFBResult ActivateContext(
CoreLayerContext *context
);
class CoreLayerDispatch virtual DFBResult GetCurrentOutputField(
{ s32 *ret_field
);
public: virtual DFBResult SetLevel(
CoreLayerDispatch( CoreDFB *core, ILayer *real ) s32 level
: );
core( core ),
real( real )
{
}
virtual DFBResult Dispatch( FusionID caller, virtual DFBResult WaitVSync(
int method,
void *ptr, );
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
private:
CoreDFB *core;
ILayer *real;
}; };
DFBResult CoreLayerDispatch__Dispatch( CoreLayer *obj,
FusionID caller,
int method,
void *ptr,
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
} }
#endif #endif
#endif #endif
 End of changes. 23 change blocks. 
44 lines changed or deleted 114 lines changed or added


 CoreLayerContext.h   CoreLayerContext.h 
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 ___CoreLayerContext__H___ #ifndef ___CoreLayerContext__H___
#define ___CoreLayerContext__H___ #define ___CoreLayerContext__H___
#include "CoreLayerContext_includes.h" #include <core/CoreLayerContext_includes.h>
/************************************************************************** ******************************************** /************************************************************************** ********************************************
* CoreLayerContext * CoreLayerContext
*/ */
#ifdef __cplusplus #ifdef __cplusplus
#include <core/Interface.h> #include <core/Interface.h>
extern "C" { extern "C" {
#endif #endif
DFBResult CoreLayerContext_GetPrimaryRegion(
CoreLayerContext *obj,
bool create,
CoreLayerRegion **ret_region);
DFBResult CoreLayerContext_TestConfiguration(
CoreLayerContext *obj,
const DFBDisplayLayerConfig *config,
DFBDisplayLayerConfigFlags *ret_failed);
DFBResult CoreLayerContext_SetConfiguration(
CoreLayerContext *obj,
const DFBDisplayLayerConfig *config);
DFBResult CoreLayerContext_SetSrcColorKey(
CoreLayerContext *obj,
const DFBColorKey *key);
DFBResult CoreLayerContext_SetDstColorKey(
CoreLayerContext *obj,
const DFBColorKey *key);
DFBResult CoreLayerContext_SetSourceRectangle(
CoreLayerContext *obj,
const DFBRectangle *rectangle);
DFBResult CoreLayerContext_SetScreenLocation(
CoreLayerContext *obj,
const DFBLocation *location);
DFBResult CoreLayerContext_SetScreenRectangle(
CoreLayerContext *obj,
const DFBRectangle *rectangle);
DFBResult CoreLayerContext_SetScreenPosition(
CoreLayerContext *obj,
const DFBPoint *position);
DFBResult CoreLayerContext_SetOpacity(
CoreLayerContext *obj,
u8 opacity);
DFBResult CoreLayerContext_SetRotation(
CoreLayerContext *obj,
s32 rotation);
DFBResult CoreLayerContext_SetColorAdjustment(
CoreLayerContext *obj,
const DFBColorAdjustment *adjustment);
DFBResult CoreLayerContext_SetStereoDepth(
CoreLayerContext *obj,
bool follow_video
,
s32 z);
DFBResult CoreLayerContext_SetFieldParity(
CoreLayerContext *obj,
u32 field);
DFBResult CoreLayerContext_SetClipRegions(
CoreLayerContext *obj,
const DFBRegion *regions,
u32 num,
bool positive);
DFBResult CoreLayerContext_CreateWindow( DFBResult CoreLayerContext_CreateWindow(
CoreLayerContext *obj, CoreLayerContext *obj,
const DFBWindowDescription *description, const DFBWindowDescription *description,
CoreWindow *parent,
CoreWindow *toplevel,
CoreWindow **ret_window); CoreWindow **ret_window);
DFBResult CoreLayerContext_SetConfiguration( DFBResult CoreLayerContext_FindWindow(
CoreLayerContext *obj, CoreLayerContext *obj,
const DFBDisplayLayerConfig *config); DFBWindowID window_id,
CoreWindow **ret_window);
DFBResult CoreLayerContext_GetPrimaryRegion( DFBResult CoreLayerContext_FindWindowByResourceID(
CoreLayerContext *obj, CoreLayerContext *obj,
bool create, u64 resource_id,
CoreLayerRegion **ret_region); CoreWindow **ret_window);
void *CoreLayerContext_Init_Dispatch( void CoreLayerContext_Init_Dispatch(
CoreDFB *core, CoreDFB *core,
CoreLayerContext *obj, CoreLayerContext *obj,
FusionCall *call FusionCall *call
); );
void CoreLayerContext_Deinit_Dispatch( void CoreLayerContext_Deinit_Dispatch(
void *dispatch FusionCall *call
); );
#ifdef __cplusplus #ifdef __cplusplus
} }
namespace DirectFB { namespace DirectFB {
/* /*
* CoreLayerContext Calls * CoreLayerContext Calls
*/ */
typedef enum { typedef enum {
CoreLayerContext_CreateWindow = 1, CoreLayerContext_GetPrimaryRegion = 1,
CoreLayerContext_SetConfiguration = 2, CoreLayerContext_TestConfiguration = 2,
CoreLayerContext_GetPrimaryRegion = 3, CoreLayerContext_SetConfiguration = 3,
CoreLayerContext_SetSrcColorKey = 4,
CoreLayerContext_SetDstColorKey = 5,
CoreLayerContext_SetSourceRectangle = 6,
CoreLayerContext_SetScreenLocation = 7,
CoreLayerContext_SetScreenRectangle = 8,
CoreLayerContext_SetScreenPosition = 9,
CoreLayerContext_SetOpacity = 10,
CoreLayerContext_SetRotation = 11,
CoreLayerContext_SetColorAdjustment = 12,
CoreLayerContext_SetStereoDepth = 13,
CoreLayerContext_SetFieldParity = 14,
CoreLayerContext_SetClipRegions = 15,
CoreLayerContext_CreateWindow = 16,
CoreLayerContext_FindWindow = 17,
CoreLayerContext_FindWindowByResourceID = 18,
} CoreLayerContextCall; } CoreLayerContextCall;
/* /*
* CoreLayerContext_GetPrimaryRegion
*/
typedef struct {
bool create;
} CoreLayerContextGetPrimaryRegion;
typedef struct {
DFBResult result;
u32 region_id;
void* region_ptr;
} CoreLayerContextGetPrimaryRegionReturn;
/*
* CoreLayerContext_TestConfiguration
*/
typedef struct {
DFBDisplayLayerConfig config;
} CoreLayerContextTestConfiguration;
typedef struct {
DFBResult result;
DFBDisplayLayerConfigFlags failed;
} CoreLayerContextTestConfigurationReturn;
/*
* CoreLayerContext_SetConfiguration
*/
typedef struct {
DFBDisplayLayerConfig config;
} CoreLayerContextSetConfiguration;
typedef struct {
DFBResult result;
} CoreLayerContextSetConfigurationReturn;
/*
* CoreLayerContext_SetSrcColorKey
*/
typedef struct {
DFBColorKey key;
} CoreLayerContextSetSrcColorKey;
typedef struct {
DFBResult result;
} CoreLayerContextSetSrcColorKeyReturn;
/*
* CoreLayerContext_SetDstColorKey
*/
typedef struct {
DFBColorKey key;
} CoreLayerContextSetDstColorKey;
typedef struct {
DFBResult result;
} CoreLayerContextSetDstColorKeyReturn;
/*
* CoreLayerContext_SetSourceRectangle
*/
typedef struct {
DFBRectangle rectangle;
} CoreLayerContextSetSourceRectangle;
typedef struct {
DFBResult result;
} CoreLayerContextSetSourceRectangleReturn;
/*
* CoreLayerContext_SetScreenLocation
*/
typedef struct {
DFBLocation location;
} CoreLayerContextSetScreenLocation;
typedef struct {
DFBResult result;
} CoreLayerContextSetScreenLocationReturn;
/*
* CoreLayerContext_SetScreenRectangle
*/
typedef struct {
DFBRectangle rectangle;
} CoreLayerContextSetScreenRectangle;
typedef struct {
DFBResult result;
} CoreLayerContextSetScreenRectangleReturn;
/*
* CoreLayerContext_SetScreenPosition
*/
typedef struct {
DFBPoint position;
} CoreLayerContextSetScreenPosition;
typedef struct {
DFBResult result;
} CoreLayerContextSetScreenPositionReturn;
/*
* CoreLayerContext_SetOpacity
*/
typedef struct {
u8 opacity;
} CoreLayerContextSetOpacity;
typedef struct {
DFBResult result;
} CoreLayerContextSetOpacityReturn;
/*
* CoreLayerContext_SetRotation
*/
typedef struct {
s32 rotation;
} CoreLayerContextSetRotation;
typedef struct {
DFBResult result;
} CoreLayerContextSetRotationReturn;
/*
* CoreLayerContext_SetColorAdjustment
*/
typedef struct {
DFBColorAdjustment adjustment;
} CoreLayerContextSetColorAdjustment;
typedef struct {
DFBResult result;
} CoreLayerContextSetColorAdjustmentReturn;
/*
* CoreLayerContext_SetStereoDepth
*/
typedef struct {
bool follow_video;
s32 z;
} CoreLayerContextSetStereoDepth;
typedef struct {
DFBResult result;
} CoreLayerContextSetStereoDepthReturn;
/*
* CoreLayerContext_SetFieldParity
*/
typedef struct {
u32 field;
} CoreLayerContextSetFieldParity;
typedef struct {
DFBResult result;
} CoreLayerContextSetFieldParityReturn;
/*
* CoreLayerContext_SetClipRegions
*/
typedef struct {
u32 num;
bool positive;
/* 'num' DFBRegion follow (regions) */
} CoreLayerContextSetClipRegions;
typedef struct {
DFBResult result;
} CoreLayerContextSetClipRegionsReturn;
/*
* CoreLayerContext_CreateWindow * CoreLayerContext_CreateWindow
*/ */
typedef struct { typedef struct {
DFBWindowDescription description; DFBWindowDescription description;
bool parent_set;
u32 parent_id;
bool toplevel_set;
u32 toplevel_id;
} CoreLayerContextCreateWindow; } CoreLayerContextCreateWindow;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 window_id; u32 window_id;
void* window_ptr;
} CoreLayerContextCreateWindowReturn; } CoreLayerContextCreateWindowReturn;
/* /*
* CoreLayerContext_SetConfiguration * CoreLayerContext_FindWindow
*/ */
typedef struct { typedef struct {
DFBDisplayLayerConfig config; DFBWindowID window_id;
} CoreLayerContextSetConfiguration; } CoreLayerContextFindWindow;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreLayerContextSetConfigurationReturn; u32 window_id;
void* window_ptr;
} CoreLayerContextFindWindowReturn;
/* /*
* CoreLayerContext_GetPrimaryRegion * CoreLayerContext_FindWindowByResourceID
*/ */
typedef struct { typedef struct {
bool create; u64 resource_id;
} CoreLayerContextGetPrimaryRegion; } CoreLayerContextFindWindowByResourceID;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 region_id; u32 window_id;
} CoreLayerContextGetPrimaryRegionReturn; void* window_ptr;
} CoreLayerContextFindWindowByResourceIDReturn;
class ILayerContext : public Interface class ILayerContext : public Interface
{ {
public: public:
ILayerContext( CoreDFB *core ) ILayerContext( CoreDFB *core )
: :
Interface( core ) Interface( core )
{ {
} }
public: public:
virtual DFBResult GetPrimaryRegion(
bool create,
CoreLayerRegion **ret_region
) = 0;
virtual DFBResult TestConfiguration(
const DFBDisplayLayerConfig *config,
DFBDisplayLayerConfigFlags *ret_failed
) = 0;
virtual DFBResult SetConfiguration(
const DFBDisplayLayerConfig *config
) = 0;
virtual DFBResult SetSrcColorKey(
const DFBColorKey *key
) = 0;
virtual DFBResult SetDstColorKey(
const DFBColorKey *key
) = 0;
virtual DFBResult SetSourceRectangle(
const DFBRectangle *rectangle
) = 0;
virtual DFBResult SetScreenLocation(
const DFBLocation *location
) = 0;
virtual DFBResult SetScreenRectangle(
const DFBRectangle *rectangle
) = 0;
virtual DFBResult SetScreenPosition(
const DFBPoint *position
) = 0;
virtual DFBResult SetOpacity(
u8 opacity
) = 0;
virtual DFBResult SetRotation(
s32 rotation
) = 0;
virtual DFBResult SetColorAdjustment(
const DFBColorAdjustment *adjustment
) = 0;
virtual DFBResult SetStereoDepth(
bool follow_video
,
s32 z
) = 0;
virtual DFBResult SetFieldParity(
u32 field
) = 0;
virtual DFBResult SetClipRegions(
const DFBRegion *regions,
u32 num,
bool positive
) = 0;
virtual DFBResult CreateWindow( virtual DFBResult CreateWindow(
const DFBWindowDescription *description, const DFBWindowDescription *description,
CoreWindow *parent,
CoreWindow *toplevel,
CoreWindow **ret_window CoreWindow **ret_window
) = 0; ) = 0;
virtual DFBResult SetConfiguration( virtual DFBResult FindWindow(
const DFBDisplayLayerConfig *config DFBWindowID window_id,
CoreWindow **ret_window
) = 0; ) = 0;
virtual DFBResult GetPrimaryRegion( virtual DFBResult FindWindowByResourceID(
bool create, u64 resource_id,
CoreLayerRegion **ret_region CoreWindow **ret_window
) = 0; ) = 0;
}; };
class ILayerContext_Real : public ILayerContext class ILayerContext_Real : public ILayerContext
{ {
private: private:
CoreLayerContext *obj; CoreLayerContext *obj;
public: public:
ILayerContext_Real( CoreDFB *core, CoreLayerContext *obj ) ILayerContext_Real( CoreDFB *core, CoreLayerContext *obj )
: :
ILayerContext( core ), ILayerContext( core ),
obj( obj ) obj( obj )
{ {
} }
public: public:
virtual DFBResult GetPrimaryRegion(
bool create,
CoreLayerRegion **ret_region
);
virtual DFBResult TestConfiguration(
const DFBDisplayLayerConfig *config,
DFBDisplayLayerConfigFlags *ret_failed
);
virtual DFBResult SetConfiguration(
const DFBDisplayLayerConfig *config
);
virtual DFBResult SetSrcColorKey(
const DFBColorKey *key
);
virtual DFBResult SetDstColorKey(
const DFBColorKey *key
);
virtual DFBResult SetSourceRectangle(
const DFBRectangle *rectangle
);
virtual DFBResult SetScreenLocation(
const DFBLocation *location
);
virtual DFBResult SetScreenRectangle(
const DFBRectangle *rectangle
);
virtual DFBResult SetScreenPosition(
const DFBPoint *position
);
virtual DFBResult SetOpacity(
u8 opacity
);
virtual DFBResult SetRotation(
s32 rotation
);
virtual DFBResult SetColorAdjustment(
const DFBColorAdjustment *adjustment
);
virtual DFBResult SetStereoDepth(
bool follow_video
,
s32 z
);
virtual DFBResult SetFieldParity(
u32 field
);
virtual DFBResult SetClipRegions(
const DFBRegion *regions,
u32 num,
bool positive
);
virtual DFBResult CreateWindow( virtual DFBResult CreateWindow(
const DFBWindowDescription *description, const DFBWindowDescription *description,
CoreWindow *parent,
CoreWindow *toplevel,
CoreWindow **ret_window CoreWindow **ret_window
); );
virtual DFBResult SetConfiguration( virtual DFBResult FindWindow(
const DFBDisplayLayerConfig *config DFBWindowID window_id,
CoreWindow **ret_window
); );
virtual DFBResult GetPrimaryRegion( virtual DFBResult FindWindowByResourceID(
bool create, u64 resource_id,
CoreLayerRegion **ret_region CoreWindow **ret_window
); );
}; };
class ILayerContext_Requestor : public ILayerContext class ILayerContext_Requestor : public ILayerContext
{ {
private: private:
CoreLayerContext *obj; CoreLayerContext *obj;
public: public:
ILayerContext_Requestor( CoreDFB *core, CoreLayerContext *obj ) ILayerContext_Requestor( CoreDFB *core, CoreLayerContext *obj )
: :
ILayerContext( core ), ILayerContext( core ),
obj( obj ) obj( obj )
{ {
} }
public: public:
virtual DFBResult CreateWindow( virtual DFBResult GetPrimaryRegion(
const DFBWindowDescription *description, bool create,
CoreWindow *parent, CoreLayerRegion **ret_region
CoreWindow *toplevel, );
CoreWindow **ret_window
virtual DFBResult TestConfiguration(
const DFBDisplayLayerConfig *config,
DFBDisplayLayerConfigFlags *ret_failed
); );
virtual DFBResult SetConfiguration( virtual DFBResult SetConfiguration(
const DFBDisplayLayerConfig *config const DFBDisplayLayerConfig *config
); );
virtual DFBResult GetPrimaryRegion( virtual DFBResult SetSrcColorKey(
bool create, const DFBColorKey *key
CoreLayerRegion **ret_region
); );
}; virtual DFBResult SetDstColorKey(
const DFBColorKey *key
);
class CoreLayerContextDispatch virtual DFBResult SetSourceRectangle(
{ const DFBRectangle *rectangle
);
public: virtual DFBResult SetScreenLocation(
CoreLayerContextDispatch( CoreDFB *core, ILayerContext *real ) const DFBLocation *location
: );
core( core ),
real( real )
{
}
virtual DFBResult Dispatch( FusionID caller, virtual DFBResult SetScreenRectangle(
int method, const DFBRectangle *rectangle
void *ptr, );
unsigned int length,
void *ret_ptr, virtual DFBResult SetScreenPosition(
unsigned int ret_size, const DFBPoint *position
unsigned int *ret_length ); );
virtual DFBResult SetOpacity(
u8 opacity
);
virtual DFBResult SetRotation(
s32 rotation
);
virtual DFBResult SetColorAdjustment(
const DFBColorAdjustment *adjustment
);
virtual DFBResult SetStereoDepth(
bool follow_video
,
s32 z
);
virtual DFBResult SetFieldParity(
u32 field
);
virtual DFBResult SetClipRegions(
const DFBRegion *regions,
u32 num,
bool positive
);
virtual DFBResult CreateWindow(
const DFBWindowDescription *description,
CoreWindow **ret_window
);
virtual DFBResult FindWindow(
DFBWindowID window_id,
CoreWindow **ret_window
);
virtual DFBResult FindWindowByResourceID(
u64 resource_id,
CoreWindow **ret_window
);
private:
CoreDFB *core;
ILayerContext *real;
}; };
DFBResult CoreLayerContextDispatch__Dispatch( CoreLayerContext *obj,
FusionID caller,
int method,
void *ptr,
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
} }
#endif #endif
#endif #endif
 End of changes. 35 change blocks. 
68 lines changed or deleted 499 lines changed or added


 CoreLayerContext_includes.h   CoreLayerContext_includes.h 
skipping to change at line 22 skipping to change at line 22
static __inline__ DirectResult static __inline__ DirectResult
CoreLayerContext_Call( CoreLayerContext *context, CoreLayerContext_Call( CoreLayerContext *context,
FusionCallExecFlags flags, FusionCallExecFlags flags,
int call_arg, int call_arg,
void *ptr, void *ptr,
unsigned int length, unsigned int length,
void *ret_ptr, void *ret_ptr,
unsigned int ret_size, unsigned int ret_size,
unsigned int *ret_length ) unsigned int *ret_length )
{ {
return fusion_call_execute3( &context->call, flags, call_arg, ptr, len return fusion_call_execute3( &context->call,
gth, ret_ptr, ret_size, ret_length ); (FusionCallExecFlags)(dfb_config->call_no
direct | flags),
call_arg, ptr, length, ret_ptr, ret_size,
ret_length );
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
2 lines changed or deleted 5 lines changed or added


 CoreLayerRegion.h   CoreLayerRegion.h 
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 ___CoreLayerRegion__H___ #ifndef ___CoreLayerRegion__H___
#define ___CoreLayerRegion__H___ #define ___CoreLayerRegion__H___
#include "CoreLayerRegion_includes.h" #include <core/CoreLayerRegion_includes.h>
/************************************************************************** ******************************************** /************************************************************************** ********************************************
* CoreLayerRegion * CoreLayerRegion
*/ */
#ifdef __cplusplus #ifdef __cplusplus
#include <core/Interface.h> #include <core/Interface.h>
extern "C" { extern "C" {
#endif #endif
DFBResult CoreLayerRegion_GetSurface(
CoreLayerRegion *obj,
CoreSurface **ret_surface)
;
DFBResult CoreLayerRegion_FlipUpdate( DFBResult CoreLayerRegion_FlipUpdate(
CoreLayerRegion *obj, CoreLayerRegion *obj,
const DFBRegion *update, const DFBRegion *update,
DFBSurfaceFlipFlags flags); DFBSurfaceFlipFlags flags);
DFBResult CoreLayerRegion_GetSurface( DFBResult CoreLayerRegion_FlipUpdateStereo(
CoreLayerRegion *obj, CoreLayerRegion *obj,
CoreSurface **ret_surface) const DFBRegion *left,
; const DFBRegion *right,
DFBSurfaceFlipFlags flags);
void *CoreLayerRegion_Init_Dispatch( void CoreLayerRegion_Init_Dispatch(
CoreDFB *core, CoreDFB *core,
CoreLayerRegion *obj, CoreLayerRegion *obj,
FusionCall *call FusionCall *call
); );
void CoreLayerRegion_Deinit_Dispatch( void CoreLayerRegion_Deinit_Dispatch(
void *dispatch FusionCall *call
); );
#ifdef __cplusplus #ifdef __cplusplus
} }
namespace DirectFB { namespace DirectFB {
/* /*
* CoreLayerRegion Calls * CoreLayerRegion Calls
*/ */
typedef enum { typedef enum {
CoreLayerRegion_FlipUpdate = 1, CoreLayerRegion_GetSurface = 1,
CoreLayerRegion_GetSurface = 2, CoreLayerRegion_FlipUpdate = 2,
CoreLayerRegion_FlipUpdateStereo = 3,
} CoreLayerRegionCall; } CoreLayerRegionCall;
/* /*
* CoreLayerRegion_GetSurface
*/
typedef struct {
} CoreLayerRegionGetSurface;
typedef struct {
DFBResult result;
u32 surface_id;
void* surface_ptr;
} CoreLayerRegionGetSurfaceReturn;
/*
* CoreLayerRegion_FlipUpdate * CoreLayerRegion_FlipUpdate
*/ */
typedef struct { typedef struct {
bool update_set; bool update_set;
DFBRegion update; DFBRegion update;
DFBSurfaceFlipFlags flags; DFBSurfaceFlipFlags flags;
} CoreLayerRegionFlipUpdate; } CoreLayerRegionFlipUpdate;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreLayerRegionFlipUpdateReturn; } CoreLayerRegionFlipUpdateReturn;
/* /*
* CoreLayerRegion_GetSurface * CoreLayerRegion_FlipUpdateStereo
*/ */
typedef struct { typedef struct {
} CoreLayerRegionGetSurface; bool left_set;
DFBRegion left;
bool right_set;
DFBRegion right;
DFBSurfaceFlipFlags flags;
} CoreLayerRegionFlipUpdateStereo;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 surface_id; } CoreLayerRegionFlipUpdateStereoReturn;
} CoreLayerRegionGetSurfaceReturn;
class ILayerRegion : public Interface class ILayerRegion : public Interface
{ {
public: public:
ILayerRegion( CoreDFB *core ) ILayerRegion( CoreDFB *core )
: :
Interface( core ) Interface( core )
{ {
} }
public: public:
virtual DFBResult GetSurface(
CoreSurface **ret_surface
) = 0;
virtual DFBResult FlipUpdate( virtual DFBResult FlipUpdate(
const DFBRegion *update, const DFBRegion *update,
DFBSurfaceFlipFlags flags DFBSurfaceFlipFlags flags
) = 0; ) = 0;
virtual DFBResult GetSurface( virtual DFBResult FlipUpdateStereo(
CoreSurface **ret_surface const DFBRegion *left,
const DFBRegion *right,
DFBSurfaceFlipFlags flags
) = 0; ) = 0;
}; };
class ILayerRegion_Real : public ILayerRegion class ILayerRegion_Real : public ILayerRegion
{ {
private: private:
CoreLayerRegion *obj; CoreLayerRegion *obj;
public: public:
ILayerRegion_Real( CoreDFB *core, CoreLayerRegion *obj ) ILayerRegion_Real( CoreDFB *core, CoreLayerRegion *obj )
: :
ILayerRegion( core ), ILayerRegion( core ),
obj( obj ) obj( obj )
{ {
} }
public: public:
virtual DFBResult GetSurface(
CoreSurface **ret_surface
);
virtual DFBResult FlipUpdate( virtual DFBResult FlipUpdate(
const DFBRegion *update, const DFBRegion *update,
DFBSurfaceFlipFlags flags DFBSurfaceFlipFlags flags
); );
virtual DFBResult GetSurface( virtual DFBResult FlipUpdateStereo(
CoreSurface **ret_surface const DFBRegion *left,
const DFBRegion *right,
DFBSurfaceFlipFlags flags
); );
}; };
class ILayerRegion_Requestor : public ILayerRegion class ILayerRegion_Requestor : public ILayerRegion
{ {
private: private:
CoreLayerRegion *obj; CoreLayerRegion *obj;
public: public:
ILayerRegion_Requestor( CoreDFB *core, CoreLayerRegion *obj ) ILayerRegion_Requestor( CoreDFB *core, CoreLayerRegion *obj )
: :
ILayerRegion( core ), ILayerRegion( core ),
obj( obj ) obj( obj )
{ {
} }
public: public:
virtual DFBResult GetSurface(
CoreSurface **ret_surface
);
virtual DFBResult FlipUpdate( virtual DFBResult FlipUpdate(
const DFBRegion *update, const DFBRegion *update,
DFBSurfaceFlipFlags flags DFBSurfaceFlipFlags flags
); );
virtual DFBResult GetSurface( virtual DFBResult FlipUpdateStereo(
CoreSurface **ret_surface const DFBRegion *left,
const DFBRegion *right,
DFBSurfaceFlipFlags flags
); );
}; };
class CoreLayerRegionDispatch DFBResult CoreLayerRegionDispatch__Dispatch( CoreLayerRegion *obj,
{ FusionID caller,
int method,
public: void *ptr,
CoreLayerRegionDispatch( CoreDFB *core, ILayerRegion *real ) unsigned int length,
: void *ret_ptr,
core( core ), unsigned int ret_size,
real( real ) unsigned int *ret_length );
{
}
virtual DFBResult Dispatch( FusionID caller,
int method,
void *ptr,
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
private:
CoreDFB *core;
ILayerRegion *real;
};
} }
#endif #endif
#endif #endif
 End of changes. 18 change blocks. 
41 lines changed or deleted 67 lines changed or added


 CoreLayerRegion_includes.h   CoreLayerRegion_includes.h 
skipping to change at line 22 skipping to change at line 22
static __inline__ DirectResult static __inline__ DirectResult
CoreLayerRegion_Call( CoreLayerRegion *region, CoreLayerRegion_Call( CoreLayerRegion *region,
FusionCallExecFlags flags, FusionCallExecFlags flags,
int call_arg, int call_arg,
void *ptr, void *ptr,
unsigned int length, unsigned int length,
void *ret_ptr, void *ret_ptr,
unsigned int ret_size, unsigned int ret_size,
unsigned int *ret_length ) unsigned int *ret_length )
{ {
return fusion_call_execute3( &region->call, flags, call_arg, ptr, leng return fusion_call_execute3( &region->call,
th, ret_ptr, ret_size, ret_length ); (FusionCallExecFlags)(dfb_config->call_no
direct | flags),
call_arg, ptr, length, ret_ptr, ret_size,
ret_length );
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
2 lines changed or deleted 5 lines changed or added


 CoreLayer_includes.h   CoreLayer_includes.h 
skipping to change at line 25 skipping to change at line 25
int call_arg, int call_arg,
void *ptr, void *ptr,
unsigned int length, unsigned int length,
void *ret_ptr, void *ret_ptr,
unsigned int ret_size, unsigned int ret_size,
unsigned int *ret_length ) unsigned int *ret_length )
{ {
D_ASSERT( layer != NULL ); D_ASSERT( layer != NULL );
D_ASSERT( layer->shared != NULL ); D_ASSERT( layer->shared != NULL );
return fusion_call_execute3( &layer->shared->call, flags, call_arg, pt return fusion_call_execute3( &layer->shared->call,
r, length, ret_ptr, ret_size, ret_length ); (FusionCallExecFlags)(dfb_config->call_no
direct | flags),
call_arg, ptr, length, ret_ptr, ret_size,
ret_length );
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
2 lines changed or deleted 5 lines changed or added


 CorePalette.h   CorePalette.h 
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 ___CorePalette__H___ #ifndef ___CorePalette__H___
#define ___CorePalette__H___ #define ___CorePalette__H___
#include "CorePalette_includes.h" #include <core/CorePalette_includes.h>
/************************************************************************** ******************************************** /************************************************************************** ********************************************
* CorePalette * CorePalette
*/ */
#ifdef __cplusplus #ifdef __cplusplus
#include <core/Interface.h> #include <core/Interface.h>
extern "C" { extern "C" {
#endif #endif
skipping to change at line 56 skipping to change at line 56
const DFBColor *colors, const DFBColor *colors,
u32 num, u32 num,
u32 offset); u32 offset);
DFBResult CorePalette_SetEntriesYUV( DFBResult CorePalette_SetEntriesYUV(
CorePalette *obj, CorePalette *obj,
const DFBColorYUV *colors, const DFBColorYUV *colors,
u32 num, u32 num,
u32 offset); u32 offset);
void *CorePalette_Init_Dispatch( void CorePalette_Init_Dispatch(
CoreDFB *core, CoreDFB *core,
CorePalette *obj, CorePalette *obj,
FusionCall *call FusionCall *call
); );
void CorePalette_Deinit_Dispatch( void CorePalette_Deinit_Dispatch(
void *dispatch FusionCall *call
); );
#ifdef __cplusplus #ifdef __cplusplus
} }
namespace DirectFB { namespace DirectFB {
/* /*
* CorePalette Calls * CorePalette Calls
*/ */
skipping to change at line 185 skipping to change at line 185
); );
virtual DFBResult SetEntriesYUV( virtual DFBResult SetEntriesYUV(
const DFBColorYUV *colors, const DFBColorYUV *colors,
u32 num, u32 num,
u32 offset u32 offset
); );
}; };
class CorePaletteDispatch DFBResult CorePaletteDispatch__Dispatch( CorePalette *obj,
{ FusionID caller,
int method,
public: void *ptr,
CorePaletteDispatch( CoreDFB *core, IPalette *real ) unsigned int length,
: void *ret_ptr,
core( core ), unsigned int ret_size,
real( real ) unsigned int *ret_length );
{
}
virtual DFBResult Dispatch( FusionID caller,
int method,
void *ptr,
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
private:
CoreDFB *core;
IPalette *real;
};
} }
#endif #endif
#endif #endif
 End of changes. 4 change blocks. 
26 lines changed or deleted 11 lines changed or added


 CorePalette_includes.h   CorePalette_includes.h 
skipping to change at line 19 skipping to change at line 19
static __inline__ DirectResult static __inline__ DirectResult
CorePalette_Call( CorePalette *palette, CorePalette_Call( CorePalette *palette,
FusionCallExecFlags flags, FusionCallExecFlags flags,
int call_arg, int call_arg,
void *ptr, void *ptr,
unsigned int length, unsigned int length,
void *ret_ptr, void *ret_ptr,
unsigned int ret_size, unsigned int ret_size,
unsigned int *ret_length ) unsigned int *ret_length )
{ {
return fusion_call_execute3( &palette->call, flags, call_arg, ptr, len return fusion_call_execute3( &palette->call,
gth, ret_ptr, ret_size, ret_length ); (FusionCallExecFlags)(dfb_config->call_no
direct | flags),
call_arg, ptr, length, ret_ptr, ret_size,
ret_length );
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
2 lines changed or deleted 5 lines changed or added


 CoreSurface.h   CoreSurface.h 
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 ___CoreSurface__H___ #ifndef ___CoreSurface__H___
#define ___CoreSurface__H___ #define ___CoreSurface__H___
#include "CoreSurface_includes.h" #include <core/CoreSurface_includes.h>
/************************************************************************** ******************************************** /************************************************************************** ********************************************
* CoreSurface * CoreSurface
*/ */
#ifdef __cplusplus #ifdef __cplusplus
#include <core/Interface.h> #include <core/Interface.h>
extern "C" { extern "C" {
#endif #endif
skipping to change at line 60 skipping to change at line 60
bool swap); bool swap);
DFBResult CoreSurface_GetPalette( DFBResult CoreSurface_GetPalette(
CoreSurface *obj, CoreSurface *obj,
CorePalette **ret_palette) ; CorePalette **ret_palette) ;
DFBResult CoreSurface_SetPalette( DFBResult CoreSurface_SetPalette(
CoreSurface *obj, CoreSurface *obj,
CorePalette *palette); CorePalette *palette);
DFBResult CoreSurface_SetAlphaRamp(
CoreSurface *obj,
u8 a0,
u8 a1,
u8 a2,
u8 a3);
DFBResult CoreSurface_SetField(
CoreSurface *obj,
s32 field);
DFBResult CoreSurface_PreLockBuffer( DFBResult CoreSurface_PreLockBuffer(
CoreSurface *obj, CoreSurface *obj,
u32 buffer_index CoreSurfaceBuffer *buffer,
, CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access,
CoreSurfaceAllocation **ret_allocati
on);
DFBResult CoreSurface_PreLockBuffer2(
CoreSurface *obj,
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye,
CoreSurfaceAccessorID accessor, CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access, CoreSurfaceAccessFlags access,
u32 *ret_allocati bool lock,
on_index); CoreSurfaceAllocation **ret_allocati
on);
DFBResult CoreSurface_PreReadBuffer( DFBResult CoreSurface_PreReadBuffer(
CoreSurface *obj, CoreSurface *obj,
u32 buffer_index , CoreSurfaceBuffer *buffer,
const DFBRectangle *rect, const DFBRectangle *rect,
u32 *ret_allocati on_index); CoreSurfaceAllocation **ret_allocati on);
DFBResult CoreSurface_PreWriteBuffer( DFBResult CoreSurface_PreWriteBuffer(
CoreSurface *obj, CoreSurface *obj,
u32 buffer_index , CoreSurfaceBuffer *buffer,
const DFBRectangle *rect, const DFBRectangle *rect,
u32 *ret_allocati CoreSurfaceAllocation **ret_allocati
on_index); on);
DFBResult CoreSurface_PreLockBuffer3(
CoreSurface *obj,
CoreSurfaceBufferRole role,
u32 flip_count,
DFBSurfaceStereoEye eye,
CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access,
bool lock,
CoreSurfaceAllocation **ret_allocati
on);
DFBResult CoreSurface_CreateClient(
CoreSurface *obj,
CoreSurfaceClient **ret_client);
DFBResult CoreSurface_BackToFrontCopy(
CoreSurface *obj,
DFBSurfaceStereoEye eye,
const DFBRegion *left_region,
const DFBRegion *right_region
);
void *CoreSurface_Init_Dispatch( void CoreSurface_Init_Dispatch(
CoreDFB *core, CoreDFB *core,
CoreSurface *obj, CoreSurface *obj,
FusionCall *call FusionCall *call
); );
void CoreSurface_Deinit_Dispatch( void CoreSurface_Deinit_Dispatch(
void *dispatch FusionCall *call
); );
#ifdef __cplusplus #ifdef __cplusplus
} }
namespace DirectFB { namespace DirectFB {
/* /*
* CoreSurface Calls * CoreSurface Calls
*/ */
typedef enum { typedef enum {
CoreSurface_SetConfig = 1, CoreSurface_SetConfig = 1,
CoreSurface_Flip = 2, CoreSurface_Flip = 2,
CoreSurface_GetPalette = 3, CoreSurface_GetPalette = 3,
CoreSurface_SetPalette = 4, CoreSurface_SetPalette = 4,
CoreSurface_PreLockBuffer = 5, CoreSurface_SetAlphaRamp = 5,
CoreSurface_PreReadBuffer = 6, CoreSurface_SetField = 6,
CoreSurface_PreWriteBuffer = 7, CoreSurface_PreLockBuffer = 7,
CoreSurface_PreLockBuffer2 = 8,
CoreSurface_PreReadBuffer = 9,
CoreSurface_PreWriteBuffer = 10,
CoreSurface_PreLockBuffer3 = 11,
CoreSurface_CreateClient = 12,
CoreSurface_BackToFrontCopy = 13,
} CoreSurfaceCall; } CoreSurfaceCall;
/* /*
* CoreSurface_SetConfig * CoreSurface_SetConfig
*/ */
typedef struct { typedef struct {
CoreSurfaceConfig config; CoreSurfaceConfig config;
} CoreSurfaceSetConfig; } CoreSurfaceSetConfig;
typedef struct { typedef struct {
skipping to change at line 138 skipping to change at line 184
/* /*
* CoreSurface_GetPalette * CoreSurface_GetPalette
*/ */
typedef struct { typedef struct {
} CoreSurfaceGetPalette; } CoreSurfaceGetPalette;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 palette_id; u32 palette_id;
void* palette_ptr;
} CoreSurfaceGetPaletteReturn; } CoreSurfaceGetPaletteReturn;
/* /*
* CoreSurface_SetPalette * CoreSurface_SetPalette
*/ */
typedef struct { typedef struct {
u32 palette_id; u32 palette_id;
} CoreSurfaceSetPalette; } CoreSurfaceSetPalette;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreSurfaceSetPaletteReturn; } CoreSurfaceSetPaletteReturn;
/* /*
* CoreSurface_SetAlphaRamp
*/
typedef struct {
u8 a0;
u8 a1;
u8 a2;
u8 a3;
} CoreSurfaceSetAlphaRamp;
typedef struct {
DFBResult result;
} CoreSurfaceSetAlphaRampReturn;
/*
* CoreSurface_SetField
*/
typedef struct {
s32 field;
} CoreSurfaceSetField;
typedef struct {
DFBResult result;
} CoreSurfaceSetFieldReturn;
/*
* CoreSurface_PreLockBuffer * CoreSurface_PreLockBuffer
*/ */
typedef struct { typedef struct {
u32 buffer_index; u32 buffer_id;
CoreSurfaceAccessorID accessor; CoreSurfaceAccessorID accessor;
CoreSurfaceAccessFlags access; CoreSurfaceAccessFlags access;
} CoreSurfacePreLockBuffer; } CoreSurfacePreLockBuffer;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 allocation_index; u32 allocation_id;
void* allocation_ptr;
} CoreSurfacePreLockBufferReturn; } CoreSurfacePreLockBufferReturn;
/* /*
* CoreSurface_PreLockBuffer2
*/
typedef struct {
CoreSurfaceBufferRole role;
DFBSurfaceStereoEye eye;
CoreSurfaceAccessorID accessor;
CoreSurfaceAccessFlags access;
bool lock;
} CoreSurfacePreLockBuffer2;
typedef struct {
DFBResult result;
u32 allocation_id;
void* allocation_ptr;
} CoreSurfacePreLockBuffer2Return;
/*
* CoreSurface_PreReadBuffer * CoreSurface_PreReadBuffer
*/ */
typedef struct { typedef struct {
u32 buffer_index; u32 buffer_id;
DFBRectangle rect; DFBRectangle rect;
} CoreSurfacePreReadBuffer; } CoreSurfacePreReadBuffer;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 allocation_index; u32 allocation_id;
void* allocation_ptr;
} CoreSurfacePreReadBufferReturn; } CoreSurfacePreReadBufferReturn;
/* /*
* CoreSurface_PreWriteBuffer * CoreSurface_PreWriteBuffer
*/ */
typedef struct { typedef struct {
u32 buffer_index; u32 buffer_id;
DFBRectangle rect; DFBRectangle rect;
} CoreSurfacePreWriteBuffer; } CoreSurfacePreWriteBuffer;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 allocation_index; u32 allocation_id;
void* allocation_ptr;
} CoreSurfacePreWriteBufferReturn; } CoreSurfacePreWriteBufferReturn;
/*
* CoreSurface_PreLockBuffer3
*/
typedef struct {
CoreSurfaceBufferRole role;
u32 flip_count;
DFBSurfaceStereoEye eye;
CoreSurfaceAccessorID accessor;
CoreSurfaceAccessFlags access;
bool lock;
} CoreSurfacePreLockBuffer3;
typedef struct {
DFBResult result;
u32 allocation_id;
void* allocation_ptr;
} CoreSurfacePreLockBuffer3Return;
/*
* CoreSurface_CreateClient
*/
typedef struct {
} CoreSurfaceCreateClient;
typedef struct {
DFBResult result;
u32 client_id;
void* client_ptr;
} CoreSurfaceCreateClientReturn;
/*
* CoreSurface_BackToFrontCopy
*/
typedef struct {
DFBSurfaceStereoEye eye;
bool left_region_set;
DFBRegion left_region;
bool right_region_set;
DFBRegion right_region;
} CoreSurfaceBackToFrontCopy;
typedef struct {
DFBResult result;
} CoreSurfaceBackToFrontCopyReturn;
class ISurface : public Interface class ISurface : public Interface
{ {
public: public:
ISurface( CoreDFB *core ) ISurface( CoreDFB *core )
: :
Interface( core ) Interface( core )
{ {
} }
public: public:
skipping to change at line 217 skipping to change at line 354
) = 0; ) = 0;
virtual DFBResult GetPalette( virtual DFBResult GetPalette(
CorePalette **ret_palette CorePalette **ret_palette
) = 0; ) = 0;
virtual DFBResult SetPalette( virtual DFBResult SetPalette(
CorePalette *palette CorePalette *palette
) = 0; ) = 0;
virtual DFBResult SetAlphaRamp(
u8 a0,
u8 a1,
u8 a2,
u8 a3
) = 0;
virtual DFBResult SetField(
s32 field
) = 0;
virtual DFBResult PreLockBuffer( virtual DFBResult PreLockBuffer(
u32 buffer_index , CoreSurfaceBuffer *buffer,
CoreSurfaceAccessorID accessor, CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access, CoreSurfaceAccessFlags access,
u32 *ret_allocati CoreSurfaceAllocation **ret_allocati
on_index on
) = 0;
virtual DFBResult PreLockBuffer2(
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye,
CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access,
bool lock,
CoreSurfaceAllocation **ret_allocati
on
) = 0; ) = 0;
virtual DFBResult PreReadBuffer( virtual DFBResult PreReadBuffer(
u32 buffer_index , CoreSurfaceBuffer *buffer,
const DFBRectangle *rect, const DFBRectangle *rect,
u32 *ret_allocati on_index CoreSurfaceAllocation **ret_allocati on
) = 0; ) = 0;
virtual DFBResult PreWriteBuffer( virtual DFBResult PreWriteBuffer(
u32 buffer_index , CoreSurfaceBuffer *buffer,
const DFBRectangle *rect, const DFBRectangle *rect,
u32 *ret_allocati CoreSurfaceAllocation **ret_allocati
on_index on
) = 0;
virtual DFBResult PreLockBuffer3(
CoreSurfaceBufferRole role,
u32 flip_count,
DFBSurfaceStereoEye eye,
CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access,
bool lock,
CoreSurfaceAllocation **ret_allocati
on
) = 0;
virtual DFBResult CreateClient(
CoreSurfaceClient **ret_client
) = 0;
virtual DFBResult BackToFrontCopy(
DFBSurfaceStereoEye eye,
const DFBRegion *left_region,
const DFBRegion *right_region
) = 0; ) = 0;
}; };
class ISurface_Real : public ISurface class ISurface_Real : public ISurface
{ {
private: private:
CoreSurface *obj; CoreSurface *obj;
public: public:
skipping to change at line 268 skipping to change at line 445
); );
virtual DFBResult GetPalette( virtual DFBResult GetPalette(
CorePalette **ret_palette CorePalette **ret_palette
); );
virtual DFBResult SetPalette( virtual DFBResult SetPalette(
CorePalette *palette CorePalette *palette
); );
virtual DFBResult SetAlphaRamp(
u8 a0,
u8 a1,
u8 a2,
u8 a3
);
virtual DFBResult SetField(
s32 field
);
virtual DFBResult PreLockBuffer( virtual DFBResult PreLockBuffer(
u32 buffer_index , CoreSurfaceBuffer *buffer,
CoreSurfaceAccessorID accessor, CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access, CoreSurfaceAccessFlags access,
u32 *ret_allocati CoreSurfaceAllocation **ret_allocati
on_index on
);
virtual DFBResult PreLockBuffer2(
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye,
CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access,
bool lock,
CoreSurfaceAllocation **ret_allocati
on
); );
virtual DFBResult PreReadBuffer( virtual DFBResult PreReadBuffer(
u32 buffer_index , CoreSurfaceBuffer *buffer,
const DFBRectangle *rect, const DFBRectangle *rect,
u32 *ret_allocati on_index CoreSurfaceAllocation **ret_allocati on
); );
virtual DFBResult PreWriteBuffer( virtual DFBResult PreWriteBuffer(
u32 buffer_index , CoreSurfaceBuffer *buffer,
const DFBRectangle *rect, const DFBRectangle *rect,
u32 *ret_allocati CoreSurfaceAllocation **ret_allocati
on_index on
);
virtual DFBResult PreLockBuffer3(
CoreSurfaceBufferRole role,
u32 flip_count,
DFBSurfaceStereoEye eye,
CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access,
bool lock,
CoreSurfaceAllocation **ret_allocati
on
);
virtual DFBResult CreateClient(
CoreSurfaceClient **ret_client
);
virtual DFBResult BackToFrontCopy(
DFBSurfaceStereoEye eye,
const DFBRegion *left_region,
const DFBRegion *right_region
); );
}; };
class ISurface_Requestor : public ISurface class ISurface_Requestor : public ISurface
{ {
private: private:
CoreSurface *obj; CoreSurface *obj;
public: public:
skipping to change at line 319 skipping to change at line 536
); );
virtual DFBResult GetPalette( virtual DFBResult GetPalette(
CorePalette **ret_palette CorePalette **ret_palette
); );
virtual DFBResult SetPalette( virtual DFBResult SetPalette(
CorePalette *palette CorePalette *palette
); );
virtual DFBResult SetAlphaRamp(
u8 a0,
u8 a1,
u8 a2,
u8 a3
);
virtual DFBResult SetField(
s32 field
);
virtual DFBResult PreLockBuffer( virtual DFBResult PreLockBuffer(
u32 buffer_index CoreSurfaceBuffer *buffer,
, CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access,
CoreSurfaceAllocation **ret_allocati
on
);
virtual DFBResult PreLockBuffer2(
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye,
CoreSurfaceAccessorID accessor, CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access, CoreSurfaceAccessFlags access,
u32 *ret_allocati bool lock,
on_index CoreSurfaceAllocation **ret_allocati
on
); );
virtual DFBResult PreReadBuffer( virtual DFBResult PreReadBuffer(
u32 buffer_index , CoreSurfaceBuffer *buffer,
const DFBRectangle *rect, const DFBRectangle *rect,
u32 *ret_allocati on_index CoreSurfaceAllocation **ret_allocati on
); );
virtual DFBResult PreWriteBuffer( virtual DFBResult PreWriteBuffer(
u32 buffer_index , CoreSurfaceBuffer *buffer,
const DFBRectangle *rect, const DFBRectangle *rect,
u32 *ret_allocati on_index CoreSurfaceAllocation **ret_allocati on
); );
}; virtual DFBResult PreLockBuffer3(
CoreSurfaceBufferRole role,
class CoreSurfaceDispatch u32 flip_count,
{ DFBSurfaceStereoEye eye,
CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access,
bool lock,
CoreSurfaceAllocation **ret_allocati
on
);
public: virtual DFBResult CreateClient(
CoreSurfaceDispatch( CoreDFB *core, ISurface *real ) CoreSurfaceClient **ret_client
: );
core( core ),
real( real )
{
}
virtual DFBResult Dispatch( FusionID caller, virtual DFBResult BackToFrontCopy(
int method, DFBSurfaceStereoEye eye,
void *ptr, const DFBRegion *left_region,
unsigned int length, const DFBRegion *right_region
void *ret_ptr, );
unsigned int ret_size,
unsigned int *ret_length );
private:
CoreDFB *core;
ISurface *real;
}; };
DFBResult CoreSurfaceDispatch__Dispatch( CoreSurface *obj,
FusionID caller,
int method,
void *ptr,
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
} }
#endif #endif
#endif #endif
 End of changes. 47 change blocks. 
66 lines changed or deleted 315 lines changed or added


 CoreSurface_includes.h   CoreSurface_includes.h 
skipping to change at line 20 skipping to change at line 20
static __inline__ DirectResult static __inline__ DirectResult
CoreSurface_Call( CoreSurface *surface, CoreSurface_Call( CoreSurface *surface,
FusionCallExecFlags flags, FusionCallExecFlags flags,
int call_arg, int call_arg,
void *ptr, void *ptr,
unsigned int length, unsigned int length,
void *ret_ptr, void *ret_ptr,
unsigned int ret_size, unsigned int ret_size,
unsigned int *ret_length ) unsigned int *ret_length )
{ {
return fusion_call_execute3( &surface->call, flags, call_arg, ptr, len return fusion_call_execute3( &surface->call,
gth, ret_ptr, ret_size, ret_length ); (FusionCallExecFlags)(dfb_config->call_no
direct | flags),
call_arg, ptr, length, ret_ptr, ret_size,
ret_length );
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
2 lines changed or deleted 5 lines changed or added


 CoreWindow.h   CoreWindow.h 
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 ___CoreWindow__H___ #ifndef ___CoreWindow__H___
#define ___CoreWindow__H___ #define ___CoreWindow__H___
#include "CoreWindow_includes.h" #include <core/CoreWindow_includes.h>
/************************************************************************** ******************************************** /************************************************************************** ********************************************
* CoreWindow * CoreWindow
*/ */
#ifdef __cplusplus #ifdef __cplusplus
#include <core/Interface.h> #include <core/Interface.h>
extern "C" { extern "C" {
#endif #endif
skipping to change at line 64 skipping to change at line 64
DFBResult CoreWindow_Restack( DFBResult CoreWindow_Restack(
CoreWindow *obj, CoreWindow *obj,
CoreWindow *relative, CoreWindow *relative,
int relation); int relation);
DFBResult CoreWindow_SetConfig( DFBResult CoreWindow_SetConfig(
CoreWindow *obj, CoreWindow *obj,
const CoreWindowConfig *config, const CoreWindowConfig *config,
const DFBInputDeviceKeySymbol *keys, const DFBInputDeviceKeySymbol *keys,
u32 num_keys, u32 num_keys,
CoreWindow *parent,
CoreWindowConfigFlags flags); CoreWindowConfigFlags flags);
DFBResult CoreWindow_Bind( DFBResult CoreWindow_Bind(
CoreWindow *obj, CoreWindow *obj,
CoreWindow *source, CoreWindow *source,
int x, int x,
int y); int y);
DFBResult CoreWindow_Unbind( DFBResult CoreWindow_Unbind(
CoreWindow *obj, CoreWindow *obj,
skipping to change at line 168 skipping to change at line 167
u32 num_keys); u32 num_keys);
DFBResult CoreWindow_SetRotation( DFBResult CoreWindow_SetRotation(
CoreWindow *obj, CoreWindow *obj,
int rotation); int rotation);
DFBResult CoreWindow_GetSurface( DFBResult CoreWindow_GetSurface(
CoreWindow *obj, CoreWindow *obj,
CoreSurface **ret_surface) ; CoreSurface **ret_surface) ;
void *CoreWindow_Init_Dispatch( DFBResult CoreWindow_SetCursorShape(
CoreWindow *obj,
CoreSurface *shape,
const DFBPoint *hotspot);
DFBResult CoreWindow_AllowFocus(
CoreWindow *obj
);
DFBResult CoreWindow_GetInsets(
CoreWindow *obj,
DFBInsets *ret_insets);
void CoreWindow_Init_Dispatch(
CoreDFB *core, CoreDFB *core,
CoreWindow *obj, CoreWindow *obj,
FusionCall *call FusionCall *call
); );
void CoreWindow_Deinit_Dispatch( void CoreWindow_Deinit_Dispatch(
void *dispatch FusionCall *call
); );
#ifdef __cplusplus #ifdef __cplusplus
} }
namespace DirectFB { namespace DirectFB {
/* /*
* CoreWindow Calls * CoreWindow Calls
*/ */
skipping to change at line 213 skipping to change at line 225
CoreWindow_ChangeOptions = 17, CoreWindow_ChangeOptions = 17,
CoreWindow_SetColor = 18, CoreWindow_SetColor = 18,
CoreWindow_SetColorKey = 19, CoreWindow_SetColorKey = 19,
CoreWindow_SetOpaque = 20, CoreWindow_SetOpaque = 20,
CoreWindow_SetOpacity = 21, CoreWindow_SetOpacity = 21,
CoreWindow_SetStacking = 22, CoreWindow_SetStacking = 22,
CoreWindow_SetBounds = 23, CoreWindow_SetBounds = 23,
CoreWindow_SetKeySelection = 24, CoreWindow_SetKeySelection = 24,
CoreWindow_SetRotation = 25, CoreWindow_SetRotation = 25,
CoreWindow_GetSurface = 26, CoreWindow_GetSurface = 26,
CoreWindow_SetCursorShape = 27,
CoreWindow_AllowFocus = 28,
CoreWindow_GetInsets = 29,
} CoreWindowCall; } CoreWindowCall;
/* /*
* CoreWindow_Repaint * CoreWindow_Repaint
*/ */
typedef struct { typedef struct {
DFBRegion left; DFBRegion left;
DFBRegion right; DFBRegion right;
DFBSurfaceFlipFlags flags; DFBSurfaceFlipFlags flags;
} CoreWindowRepaint; } CoreWindowRepaint;
skipping to change at line 259 skipping to change at line 274
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreWindowRestackReturn; } CoreWindowRestackReturn;
/* /*
* CoreWindow_SetConfig * CoreWindow_SetConfig
*/ */
typedef struct { typedef struct {
CoreWindowConfig config; CoreWindowConfig config;
u32 num_keys; u32 num_keys;
bool parent_set;
u32 parent_id;
CoreWindowConfigFlags flags; CoreWindowConfigFlags flags;
bool keys_set; bool keys_set;
/* 'num_keys' DFBInputDeviceKeySymbol follow (keys) */ /* 'num_keys' DFBInputDeviceKeySymbol follow (keys) */
} CoreWindowSetConfig; } CoreWindowSetConfig;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreWindowSetConfigReturn; } CoreWindowSetConfigReturn;
/* /*
skipping to change at line 522 skipping to change at line 535
/* /*
* CoreWindow_GetSurface * CoreWindow_GetSurface
*/ */
typedef struct { typedef struct {
} CoreWindowGetSurface; } CoreWindowGetSurface;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
u32 surface_id; u32 surface_id;
void* surface_ptr;
} CoreWindowGetSurfaceReturn; } CoreWindowGetSurfaceReturn;
/*
* CoreWindow_SetCursorShape
*/
typedef struct {
bool shape_set;
u32 shape_id;
DFBPoint hotspot;
} CoreWindowSetCursorShape;
typedef struct {
DFBResult result;
} CoreWindowSetCursorShapeReturn;
/*
* CoreWindow_AllowFocus
*/
typedef struct {
} CoreWindowAllowFocus;
typedef struct {
DFBResult result;
} CoreWindowAllowFocusReturn;
/*
* CoreWindow_GetInsets
*/
typedef struct {
} CoreWindowGetInsets;
typedef struct {
DFBResult result;
DFBInsets insets;
} CoreWindowGetInsetsReturn;
class IWindow : public Interface class IWindow : public Interface
{ {
public: public:
IWindow( CoreDFB *core ) IWindow( CoreDFB *core )
: :
Interface( core ) Interface( core )
{ {
} }
public: public:
skipping to change at line 553 skipping to change at line 601
virtual DFBResult Restack( virtual DFBResult Restack(
CoreWindow *relative, CoreWindow *relative,
int relation int relation
) = 0; ) = 0;
virtual DFBResult SetConfig( virtual DFBResult SetConfig(
const CoreWindowConfig *config, const CoreWindowConfig *config,
const DFBInputDeviceKeySymbol *keys, const DFBInputDeviceKeySymbol *keys,
u32 num_keys, u32 num_keys,
CoreWindow *parent,
CoreWindowConfigFlags flags CoreWindowConfigFlags flags
) = 0; ) = 0;
virtual DFBResult Bind( virtual DFBResult Bind(
CoreWindow *source, CoreWindow *source,
int x, int x,
int y int y
) = 0; ) = 0;
virtual DFBResult Unbind( virtual DFBResult Unbind(
skipping to change at line 658 skipping to change at line 705
) = 0; ) = 0;
virtual DFBResult SetRotation( virtual DFBResult SetRotation(
int rotation int rotation
) = 0; ) = 0;
virtual DFBResult GetSurface( virtual DFBResult GetSurface(
CoreSurface **ret_surface CoreSurface **ret_surface
) = 0; ) = 0;
virtual DFBResult SetCursorShape(
CoreSurface *shape,
const DFBPoint *hotspot
) = 0;
virtual DFBResult AllowFocus(
) = 0;
virtual DFBResult GetInsets(
DFBInsets *ret_insets
) = 0;
}; };
class IWindow_Real : public IWindow class IWindow_Real : public IWindow
{ {
private: private:
CoreWindow *obj; CoreWindow *obj;
public: public:
IWindow_Real( CoreDFB *core, CoreWindow *obj ) IWindow_Real( CoreDFB *core, CoreWindow *obj )
: :
skipping to change at line 693 skipping to change at line 753
virtual DFBResult Restack( virtual DFBResult Restack(
CoreWindow *relative, CoreWindow *relative,
int relation int relation
); );
virtual DFBResult SetConfig( virtual DFBResult SetConfig(
const CoreWindowConfig *config, const CoreWindowConfig *config,
const DFBInputDeviceKeySymbol *keys, const DFBInputDeviceKeySymbol *keys,
u32 num_keys, u32 num_keys,
CoreWindow *parent,
CoreWindowConfigFlags flags CoreWindowConfigFlags flags
); );
virtual DFBResult Bind( virtual DFBResult Bind(
CoreWindow *source, CoreWindow *source,
int x, int x,
int y int y
); );
virtual DFBResult Unbind( virtual DFBResult Unbind(
skipping to change at line 798 skipping to change at line 857
); );
virtual DFBResult SetRotation( virtual DFBResult SetRotation(
int rotation int rotation
); );
virtual DFBResult GetSurface( virtual DFBResult GetSurface(
CoreSurface **ret_surface CoreSurface **ret_surface
); );
virtual DFBResult SetCursorShape(
CoreSurface *shape,
const DFBPoint *hotspot
);
virtual DFBResult AllowFocus(
);
virtual DFBResult GetInsets(
DFBInsets *ret_insets
);
}; };
class IWindow_Requestor : public IWindow class IWindow_Requestor : public IWindow
{ {
private: private:
CoreWindow *obj; CoreWindow *obj;
public: public:
IWindow_Requestor( CoreDFB *core, CoreWindow *obj ) IWindow_Requestor( CoreDFB *core, CoreWindow *obj )
: :
skipping to change at line 833 skipping to change at line 905
virtual DFBResult Restack( virtual DFBResult Restack(
CoreWindow *relative, CoreWindow *relative,
int relation int relation
); );
virtual DFBResult SetConfig( virtual DFBResult SetConfig(
const CoreWindowConfig *config, const CoreWindowConfig *config,
const DFBInputDeviceKeySymbol *keys, const DFBInputDeviceKeySymbol *keys,
u32 num_keys, u32 num_keys,
CoreWindow *parent,
CoreWindowConfigFlags flags CoreWindowConfigFlags flags
); );
virtual DFBResult Bind( virtual DFBResult Bind(
CoreWindow *source, CoreWindow *source,
int x, int x,
int y int y
); );
virtual DFBResult Unbind( virtual DFBResult Unbind(
skipping to change at line 938 skipping to change at line 1009
); );
virtual DFBResult SetRotation( virtual DFBResult SetRotation(
int rotation int rotation
); );
virtual DFBResult GetSurface( virtual DFBResult GetSurface(
CoreSurface **ret_surface CoreSurface **ret_surface
); );
}; virtual DFBResult SetCursorShape(
CoreSurface *shape,
const DFBPoint *hotspot
);
class CoreWindowDispatch virtual DFBResult AllowFocus(
{
public: );
CoreWindowDispatch( CoreDFB *core, IWindow *real )
:
core( core ),
real( real )
{
}
virtual DFBResult Dispatch( FusionID caller, virtual DFBResult GetInsets(
int method, DFBInsets *ret_insets
void *ptr, );
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
private:
CoreDFB *core;
IWindow *real;
}; };
DFBResult CoreWindowDispatch__Dispatch( CoreWindow *obj,
FusionID caller,
int method,
void *ptr,
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
} }
#endif #endif
#endif #endif
 End of changes. 19 change blocks. 
29 lines changed or deleted 98 lines changed or added


 CoreWindowStack.h   CoreWindowStack.h 
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 ___CoreWindowStack__H___ #ifndef ___CoreWindowStack__H___
#define ___CoreWindowStack__H___ #define ___CoreWindowStack__H___
#include "CoreWindowStack_includes.h" #include <core/CoreWindowStack_includes.h>
/************************************************************************** ******************************************** /************************************************************************** ********************************************
* CoreWindowStack * CoreWindowStack
*/ */
#ifdef __cplusplus #ifdef __cplusplus
#include <core/Interface.h> #include <core/Interface.h>
extern "C" { extern "C" {
#endif #endif
DFBResult CoreWindowStack_RepaintAll( DFBResult CoreWindowStack_RepaintAll(
CoreWindowStack *obj CoreWindowStack *obj
); );
DFBResult CoreWindowStack_GetInsets(
CoreWindowStack *obj,
CoreWindow *window,
DFBInsets *ret_insets);
DFBResult CoreWindowStack_CursorEnable( DFBResult CoreWindowStack_CursorEnable(
CoreWindowStack *obj, CoreWindowStack *obj,
bool enable); bool enable);
DFBResult CoreWindowStack_CursorSetShape( DFBResult CoreWindowStack_CursorSetShape(
CoreWindowStack *obj, CoreWindowStack *obj,
CoreSurface *shape, CoreSurface *shape,
const DFBPoint *hotspot); const DFBPoint *hotspot);
DFBResult CoreWindowStack_CursorSetOpacity( DFBResult CoreWindowStack_CursorSetOpacity(
skipping to change at line 91 skipping to change at line 96
CoreSurface *image); CoreSurface *image);
DFBResult CoreWindowStack_BackgroundSetColor( DFBResult CoreWindowStack_BackgroundSetColor(
CoreWindowStack *obj, CoreWindowStack *obj,
const DFBColor *color); const DFBColor *color);
DFBResult CoreWindowStack_BackgroundSetColorIndex( DFBResult CoreWindowStack_BackgroundSetColorIndex(
CoreWindowStack *obj, CoreWindowStack *obj,
s32 index); s32 index);
void *CoreWindowStack_Init_Dispatch( void CoreWindowStack_Init_Dispatch(
CoreDFB *core, CoreDFB *core,
CoreWindowStack *obj, CoreWindowStack *obj,
FusionCall *call FusionCall *call
); );
void CoreWindowStack_Deinit_Dispatch( void CoreWindowStack_Deinit_Dispatch(
void *dispatch FusionCall *call
); );
#ifdef __cplusplus #ifdef __cplusplus
} }
namespace DirectFB { namespace DirectFB {
/* /*
* CoreWindowStack Calls * CoreWindowStack Calls
*/ */
typedef enum { typedef enum {
CoreWindowStack_RepaintAll = 1, CoreWindowStack_RepaintAll = 1,
CoreWindowStack_CursorEnable = 2, CoreWindowStack_GetInsets = 2,
CoreWindowStack_CursorSetShape = 3, CoreWindowStack_CursorEnable = 3,
CoreWindowStack_CursorSetOpacity = 4, CoreWindowStack_CursorSetShape = 4,
CoreWindowStack_CursorSetAcceleration = 5, CoreWindowStack_CursorSetOpacity = 5,
CoreWindowStack_CursorWarp = 6, CoreWindowStack_CursorSetAcceleration = 6,
CoreWindowStack_CursorGetPosition = 7, CoreWindowStack_CursorWarp = 7,
CoreWindowStack_BackgroundSetMode = 8, CoreWindowStack_CursorGetPosition = 8,
CoreWindowStack_BackgroundSetImage = 9, CoreWindowStack_BackgroundSetMode = 9,
CoreWindowStack_BackgroundSetColor = 10, CoreWindowStack_BackgroundSetImage = 10,
CoreWindowStack_BackgroundSetColorIndex = 11, CoreWindowStack_BackgroundSetColor = 11,
CoreWindowStack_BackgroundSetColorIndex = 12,
} CoreWindowStackCall; } CoreWindowStackCall;
/* /*
* CoreWindowStack_RepaintAll * CoreWindowStack_RepaintAll
*/ */
typedef struct { typedef struct {
} CoreWindowStackRepaintAll; } CoreWindowStackRepaintAll;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreWindowStackRepaintAllReturn; } CoreWindowStackRepaintAllReturn;
/* /*
* CoreWindowStack_GetInsets
*/
typedef struct {
u32 window_id;
} CoreWindowStackGetInsets;
typedef struct {
DFBResult result;
DFBInsets insets;
} CoreWindowStackGetInsetsReturn;
/*
* CoreWindowStack_CursorEnable * CoreWindowStack_CursorEnable
*/ */
typedef struct { typedef struct {
bool enable; bool enable;
} CoreWindowStackCursorEnable; } CoreWindowStackCursorEnable;
typedef struct { typedef struct {
DFBResult result; DFBResult result;
} CoreWindowStackCursorEnableReturn; } CoreWindowStackCursorEnableReturn;
skipping to change at line 260 skipping to change at line 278
: :
Interface( core ) Interface( core )
{ {
} }
public: public:
virtual DFBResult RepaintAll( virtual DFBResult RepaintAll(
) = 0; ) = 0;
virtual DFBResult GetInsets(
CoreWindow *window,
DFBInsets *ret_insets
) = 0;
virtual DFBResult CursorEnable( virtual DFBResult CursorEnable(
bool enable bool enable
) = 0; ) = 0;
virtual DFBResult CursorSetShape( virtual DFBResult CursorSetShape(
CoreSurface *shape, CoreSurface *shape,
const DFBPoint *hotspot const DFBPoint *hotspot
) = 0; ) = 0;
virtual DFBResult CursorSetOpacity( virtual DFBResult CursorSetOpacity(
skipping to change at line 323 skipping to change at line 346
IWindowStack( core ), IWindowStack( core ),
obj( obj ) obj( obj )
{ {
} }
public: public:
virtual DFBResult RepaintAll( virtual DFBResult RepaintAll(
); );
virtual DFBResult GetInsets(
CoreWindow *window,
DFBInsets *ret_insets
);
virtual DFBResult CursorEnable( virtual DFBResult CursorEnable(
bool enable bool enable
); );
virtual DFBResult CursorSetShape( virtual DFBResult CursorSetShape(
CoreSurface *shape, CoreSurface *shape,
const DFBPoint *hotspot const DFBPoint *hotspot
); );
virtual DFBResult CursorSetOpacity( virtual DFBResult CursorSetOpacity(
skipping to change at line 386 skipping to change at line 414
IWindowStack( core ), IWindowStack( core ),
obj( obj ) obj( obj )
{ {
} }
public: public:
virtual DFBResult RepaintAll( virtual DFBResult RepaintAll(
); );
virtual DFBResult GetInsets(
CoreWindow *window,
DFBInsets *ret_insets
);
virtual DFBResult CursorEnable( virtual DFBResult CursorEnable(
bool enable bool enable
); );
virtual DFBResult CursorSetShape( virtual DFBResult CursorSetShape(
CoreSurface *shape, CoreSurface *shape,
const DFBPoint *hotspot const DFBPoint *hotspot
); );
virtual DFBResult CursorSetOpacity( virtual DFBResult CursorSetOpacity(
skipping to change at line 431 skipping to change at line 464
virtual DFBResult BackgroundSetColor( virtual DFBResult BackgroundSetColor(
const DFBColor *color const DFBColor *color
); );
virtual DFBResult BackgroundSetColorIndex( virtual DFBResult BackgroundSetColorIndex(
s32 index s32 index
); );
}; };
class CoreWindowStackDispatch DFBResult CoreWindowStackDispatch__Dispatch( CoreWindowStack *obj,
{ FusionID caller,
int method,
public: void *ptr,
CoreWindowStackDispatch( CoreDFB *core, IWindowStack *real ) unsigned int length,
: void *ret_ptr,
core( core ), unsigned int ret_size,
real( real ) unsigned int *ret_length );
{
}
virtual DFBResult Dispatch( FusionID caller,
int method,
void *ptr,
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
private:
CoreDFB *core;
IWindowStack *real;
};
} }
#endif #endif
#endif #endif
 End of changes. 10 change blocks. 
36 lines changed or deleted 54 lines changed or added


 CoreWindowStack_includes.h   CoreWindowStack_includes.h 
skipping to change at line 23 skipping to change at line 23
static __inline__ DirectResult static __inline__ DirectResult
CoreWindowStack_Call( CoreWindowStack *stack, CoreWindowStack_Call( CoreWindowStack *stack,
FusionCallExecFlags flags, FusionCallExecFlags flags,
int call_arg, int call_arg,
void *ptr, void *ptr,
unsigned int length, unsigned int length,
void *ret_ptr, void *ret_ptr,
unsigned int ret_size, unsigned int ret_size,
unsigned int *ret_length ) unsigned int *ret_length )
{ {
return fusion_call_execute3( &stack->call, flags, call_arg, ptr, lengt return fusion_call_execute3( &stack->call,
h, ret_ptr, ret_size, ret_length ); (FusionCallExecFlags)(dfb_config->call_no
direct | flags),
call_arg, ptr, length, ret_ptr, ret_size,
ret_length );
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
2 lines changed or deleted 5 lines changed or added


 CoreWindow_includes.h   CoreWindow_includes.h 
skipping to change at line 20 skipping to change at line 20
static __inline__ DirectResult static __inline__ DirectResult
CoreWindow_Call( CoreWindow *window, CoreWindow_Call( CoreWindow *window,
FusionCallExecFlags flags, FusionCallExecFlags flags,
int call_arg, int call_arg,
void *ptr, void *ptr,
unsigned int length, unsigned int length,
void *ret_ptr, void *ret_ptr,
unsigned int ret_size, unsigned int ret_size,
unsigned int *ret_length ) unsigned int *ret_length )
{ {
return fusion_call_execute3( &window->call, flags, call_arg, ptr, leng return fusion_call_execute3( &window->call,
th, ret_ptr, ret_size, ret_length ); (FusionCallExecFlags)(dfb_config->call_no
direct | flags),
call_arg, ptr, length, ret_ptr, ret_size,
ret_length );
} }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
 End of changes. 1 change blocks. 
2 lines changed or deleted 5 lines changed or added


 atomic.h   atomic.h 
skipping to change at line 181 skipping to change at line 181
: "=&z" (__temp), "=&r" (__iptr) \ : "=&z" (__temp), "=&r" (__iptr) \
: "r" (__fptr) \ : "r" (__fptr) \
: "t" \ : "t" \
); \ ); \
\ \
(__typeof__(*(fptr))) __iptr; \ (__typeof__(*(fptr))) __iptr; \
}) })
#endif #endif
#if defined(ARCH_ARM) && !defined(ARCH_IWMMXT) #if defined(ARCH_ARMv7) && !defined(ARCH_IWMMXT)
static inline int _D__atomic_cmpxchg(volatile int *ptr, int old, int new) static inline int _D__atomic_cmpxchg(volatile int *ptr, int old, int _new)
{ {
unsigned long oldval, res; unsigned long oldval, res;
do { do {
__asm__ __volatile__("@ atomic_cmpxchg\n" __asm__ __volatile__("@ atomic_cmpxchg\n"
"ldrex %1, [%2]\n" "ldrex %1, [%2]\n"
"mov %0, #0\n" "mov %0, #0\n"
"teq %1, %3\n" "teq %1, %3\n"
"strexeq %0, %4, [%2]\n" "strexeq %0, %4, [%2]\n"
: "=&r" (res), "=&r" (oldval) : "=&r" (res), "=&r" (oldval)
: "r" (ptr), "Ir" (old), "r" (new) : "r" (ptr), "Ir" (old), "r" (_new)
: "cc"); : "cc");
} while (res); } while (res);
return oldval; return oldval;
} }
#define D_SYNC_BOOL_COMPARE_AND_SWAP( ptr, old_value, new_value ) \ #define D_SYNC_BOOL_COMPARE_AND_SWAP( ptr, old_value, new_value ) \
(_D__atomic_cmpxchg( (void*) ptr, (int) old_value, (int) new_value ) = = (int) old_value) (_D__atomic_cmpxchg( (void*) ptr, (int) old_value, (int) new_value ) = = (int) old_value)
#define D_SYNC_FETCH_AND_CLEAR( ptr ) \ #define D_SYNC_FETCH_AND_CLEAR( ptr ) \
skipping to change at line 235 skipping to change at line 235
" teq %1, #0\n" " teq %1, #0\n"
" bne 1b" " bne 1b"
: "=&r" (result), "=&r" (tmp) : "=&r" (result), "=&r" (tmp)
: "r" (v), "Ir" (i) : "r" (v), "Ir" (i)
: "cc"); : "cc");
return result; return result;
} }
#define D_SYNC_ADD_AND_FETCH( ptr, value ) \ #define D_SYNC_ADD_AND_FETCH( ptr, value ) \
(_D__atomic_add_return( (int) (value), (void*) (ptr) )) (_D__atomic_add_return( (int) (value), (volatile int*) (ptr) ))
#endif #endif
#if defined(ARCH_MIPS) #if defined(ARCH_MIPS)
static inline int _D__atomic_cmpxchg(volatile int *ptr, int old, int _new) static inline int _D__atomic_cmpxchg(volatile int *ptr, int old, int _new)
{ {
unsigned long retval; unsigned long retval;
__asm__ __volatile__( __asm__ __volatile__(
skipping to change at line 304 skipping to change at line 304
"2: b 1b \n" "2: b 1b \n"
" .previous \n" " .previous \n"
" .set mips0 \n" " .set mips0 \n"
: "=&r" (temp), "=m" (*v) : "=&r" (temp), "=m" (*v)
: "Ir" (i), "m" (*v)); : "Ir" (i), "m" (*v));
return temp; return temp;
} }
#define D_SYNC_ADD_AND_FETCH( ptr, value ) \ #define D_SYNC_ADD_AND_FETCH( ptr, value ) \
(_D__atomic_add_return( (int) (value), (void*) (ptr) )) (_D__atomic_add_return( (int) (value), (volatile int*) (ptr) ))
#endif #endif
#ifdef WIN32 #ifdef WIN32
/* /*
* Win32 * Win32
*/ */
#ifndef D_SYNC_BOOL_COMPARE_AND_SWAP #ifndef D_SYNC_BOOL_COMPARE_AND_SWAP
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added


 call.h   call.h 
skipping to change at line 110 skipping to change at line 110
DirectResult FUSION_API fusion_call_return ( FusionCall *call, DirectResult FUSION_API fusion_call_return ( FusionCall *call,
unsigned int serial, unsigned int serial,
int val ); int val );
DirectResult FUSION_API fusion_call_return3( FusionCall *call, DirectResult FUSION_API fusion_call_return3( FusionCall *call,
unsigned int serial, unsigned int serial,
void *ptr, void *ptr,
unsigned int length ); unsigned int length );
DirectResult FUSION_API fusion_call_get_owner( FusionCall *call,
FusionID *ret_fus
ion_id );
DirectResult FUSION_API fusion_call_destroy( FusionCall *call ); DirectResult FUSION_API fusion_call_destroy( FusionCall *call );
DirectResult FUSION_API fusion_world_flush_calls( FusionWorld *world, int l
ock );
typedef enum { typedef enum {
FUSION_CALL_PERMIT_NONE = 0x00000000, FUSION_CALL_PERMIT_NONE = 0x00000000,
FUSION_CALL_PERMIT_EXECUTE = 0x00000001, FUSION_CALL_PERMIT_EXECUTE = 0x00000001,
FUSION_CALL_PERMIT_ALL = 0x00000001, FUSION_CALL_PERMIT_ALL = 0x00000001,
} FusionCallPermissions; } FusionCallPermissions;
/* /*
* Give permissions to another fusionee to use the call. * Give permissions to another fusionee to use the call.
 End of changes. 2 change blocks. 
0 lines changed or deleted 7 lines changed or added


 clip.h   clip.h 
skipping to change at line 69 skipping to change at line 69
* Returns a flag for each edge that wasn't cut off. * Returns a flag for each edge that wasn't cut off.
*/ */
DFBEdgeFlags dfb_clip_edges( const DFBRegion *clip, DFBRectangle *rect ); DFBEdgeFlags dfb_clip_edges( const DFBRegion *clip, DFBRectangle *rect );
static inline DFBBoolean static inline DFBBoolean
dfb_clip_needed( const DFBRegion *clip, DFBRectangle *rect ) dfb_clip_needed( const DFBRegion *clip, DFBRectangle *rect )
{ {
return ((clip->x1 > rect->x) || return ((clip->x1 > rect->x) ||
(clip->y1 > rect->y) || (clip->y1 > rect->y) ||
(clip->x2 < rect->x + rect->w - 1) || (clip->x2 < rect->x + rect->w - 1) ||
(clip->y2 < rect->y + rect->h - 1)); (clip->y2 < rect->y + rect->h - 1)) ? DFB_TRUE : DFB_FALSE;
} }
/* /*
* 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 );
/* /*
skipping to change at line 124 skipping to change at line 124
/* /*
* Clips the stretch blit request to the clipping region. * Clips the stretch blit request to the clipping region.
* This includes adjustment of source AND destination coordinates * This includes adjustment of source AND destination coordinates
* based on the scaling factor. * based on the scaling factor.
*/ */
void dfb_clip_stretchblit( const DFBRegion *clip, void dfb_clip_stretchblit( const DFBRegion *clip,
DFBRectangle *srect, DFBRectangle *srect,
DFBRectangle *drect ); DFBRectangle *drect );
/*
* Clips the blitting request to the clipping region.
* This includes adjustment of source AND destination coordinates.
*
* In contrast to dfb_clip_blit() this also honors DSBLIT_ROTATE_ and DSBLI
T_FLIP_ blittingflags.
*
* FIXME: rotation and flipping is not supported simultaniously since the s
oftware driver
* would crash in its current state.
*/
void
dfb_clip_blit_flipped_rotated( const DFBRegion *clip,
DFBRectangle *srect, DFBRectangle *drect, DF
BSurfaceBlittingFlags flags );
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 18 lines changed or added


 conf.h   conf.h 
/* /*
(c) Copyright 2001-2009 The world wide DirectFB Open Source Community ( directfb.org) (c) Copyright 2001-2012 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 228 skipping to change at line 228
bool thread_block_signals; /* Call direct_signals_bl ock_all() in direct_thread_main() startup. */ bool thread_block_signals; /* Call direct_signals_bl ock_all() in direct_thread_main() startup. */
bool linux_input_grab; /* Grab input devices. */ bool linux_input_grab; /* Grab input devices. */
bool autoflip_window; /* If primary surface is non-flipping, but windowed, flip automatically. */ bool autoflip_window; /* If primary surface is non-flipping, but windowed, flip automatically. */
bool software_warn; /* Show warnings when doi ng/dropping software operations. */ 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 int surface_shmpool_size; /* Set the size of the sh ared memory pool used for
shared system memory s urfaces. */ shared system memory s urfaces. */
unsigned int system_surface_align_base; /* If GPU supports system
memory, byte alignment for system
surface's base address
(must be a positive power of two
that is four or greate
r), or zero for no alignment. */
unsigned int system_surface_align_pitch; /* If GPU supports system
memory, byte alignment for system
surface's pitch (must
be a positive power of two), or
zero for no alignment.
*/
bool no_cursor_updates; /* Never show the cursor etc. */ bool no_cursor_updates; /* Never show the cursor etc. */
struct { struct {
DFBConfigWarnFlags flags; /* Warn on various action s as window/surface creation. */ DFBConfigWarnFlags flags; /* Warn on various action s as window/surface creation. */
struct { struct {
DFBDimension min_size; DFBDimension min_size;
} create_surface; } create_surface;
struct { struct {
skipping to change at line 250 skipping to change at line 257
} warn; } warn;
int keep_accumulators; /* Free accumulators abov e this limit */ int keep_accumulators; /* Free accumulators abov e this limit */
bool software_trace; bool software_trace;
unsigned int max_axis_rate; unsigned int max_axis_rate;
bool cursor_automation; bool cursor_automation;
bool wm_fullscreen_updates;
int max_font_rows; int max_font_rows;
int max_font_row_width; int max_font_row_width;
bool core_sighandler; bool core_sighandler;
bool linux_input_force; /* use linux-input with all system modules */ bool linux_input_force; /* use linux-input with all system modules */
u64 resource_id; u64 resource_id;
bool no_singleton; bool no_singleton;
bool x11_borderless; bool x11_borderless;
DFBPoint x11_position; DFBPoint x11_position;
bool flip_notify;
char *resource_manager;
u32 input_hub_qid;
unsigned long font_resource_id;
unsigned int flip_notify_max_latency;
DFBWindowCursorFlags default_cursor_flags;
bool discard_repeat_events;
bool accel1;
DFBSurfaceID primary_id; /* id for primary surfac
e */
bool layers_clear;
FusionCallExecFlags call_nodirect;
u32 input_hub_service_qid;
bool cursor_videoonly;
u64 cursor_resource_id;
} DFBConfig; } DFBConfig;
extern DFBConfig DIRECTFB_API *dfb_config; extern DFBConfig DIRECTFB_API *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 DIRECTFB_API dfb_config_init( int *argc, char *(*argv[]) ); DFBResult DIRECTFB_API dfb_config_init( int *argc, char *(*argv[]) );
 End of changes. 4 change blocks. 
1 lines changed or deleted 44 lines changed or added


 convert.h   convert.h 
skipping to change at line 447 skipping to change at line 447
(cr) = ( 112 * _r - 94 * _g - 18 * _b + 128*256 + 128) >> 8; \ (cr) = ( 112 * _r - 94 * _g - 18 * _b + 128*256 + 128) >> 8; \
} while (0) } while (0)
void dfb_pixel_to_color ( DFBSurfacePixelFormat format, void dfb_pixel_to_color ( DFBSurfacePixelFormat format,
unsigned long pixel, unsigned long pixel,
DFBColor *ret_colo r ); DFBColor *ret_colo r );
unsigned long dfb_pixel_from_color( DFBSurfacePixelFormat format, unsigned long dfb_pixel_from_color( DFBSurfacePixelFormat format,
const DFBColor *color ); const DFBColor *color );
void
dfb_pixel_to_components( DFBSurfacePixelFormat format,
unsigned long pixel,
u8 *a,
u8 *c2, /* Either Y or R */
u8 *c1, /* Either U or G */
u8 *c0 ); /* Either V or B */
static __inline__ u32 static __inline__ u32
dfb_color_to_pixel( DFBSurfacePixelFormat format, dfb_color_to_pixel( DFBSurfacePixelFormat format,
u8 r, u8 g, u8 b ) u8 r, u8 g, u8 b )
{ {
const DFBColor color = { 0, r, g, b }; const DFBColor color = { 0, r, g, b };
return dfb_pixel_from_color( format, &color ); return dfb_pixel_from_color( format, &color );
} }
static __inline__ u32 static __inline__ u32
 End of changes. 1 change blocks. 
0 lines changed or deleted 8 lines changed or added


 core.h   core.h 
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"
#include <core/CoreSlave_includes.h>
#include <core/surface.h>
#define DIRECTFB_CORE_ABI 46 #define DIRECTFB_CORE_ABI 46
typedef enum { typedef enum {
DFCP_CLIPBOARD, DFCP_CLIPBOARD,
DFCP_COLORHASH, DFCP_COLORHASH,
DFCP_GRAPHICS, DFCP_GRAPHICS,
DFCP_INPUT, DFCP_INPUT,
DFCP_LAYER, DFCP_LAYER,
DFCP_SCREEN, DFCP_SCREEN,
DFCP_SURFACE, DFCP_SURFACE,
skipping to change at line 75 skipping to change at line 79
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, void *dfb_core_get_part( CoreDFB *core,
DFBCorePartID part_id ); DFBCorePartID part_id );
#define DFB_CORE(core,PART) dfb_core_get_part( core, DFCP_##PART ) #define DFB_CORE(core,PART) dfb_core_get_part( core, DFCP_##PART )
DFBResult dfb_core_initialize( CoreDFB *core );
/* /*
* Object creation * Object creation
*/ */
CoreGraphicsState *dfb_core_create_graphics_state( CoreDFB *core ); CoreGraphicsState *dfb_core_create_graphics_state( CoreDFB *core );
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 );
CoreSurfaceAllocation *dfb_core_create_surface_allocation( CoreDFB *core );
CoreSurfaceBuffer *dfb_core_create_surface_buffer( CoreDFB *core );
CoreSurfaceClient *dfb_core_create_surface_client( CoreDFB *core );
CoreWindow *dfb_core_create_window ( CoreDFB *core ); CoreWindow *dfb_core_create_window ( CoreDFB *core );
DFBResult dfb_core_get_graphics_state ( CoreDFB *core , DFBResult dfb_core_get_graphics_state ( CoreDFB *core ,
u32 obje ct_id, u32 obje ct_id,
CoreGraphicsState **ret_ state ); CoreGraphicsState **ret_ state );
DFBResult dfb_core_get_layer_context ( CoreDFB *core , DFBResult dfb_core_get_layer_context ( CoreDFB *core ,
u32 obje ct_id, u32 obje ct_id,
CoreLayerContext **ret_ context ); CoreLayerContext **ret_ context );
skipping to change at line 105 skipping to change at line 114
CoreLayerRegion **ret_ region ); CoreLayerRegion **ret_ region );
DFBResult dfb_core_get_palette ( CoreDFB *core , DFBResult dfb_core_get_palette ( CoreDFB *core ,
u32 obje ct_id, u32 obje ct_id,
CorePalette **ret_ palette ); CorePalette **ret_ palette );
DFBResult dfb_core_get_surface ( CoreDFB *core , DFBResult dfb_core_get_surface ( CoreDFB *core ,
u32 obje ct_id, u32 obje ct_id,
CoreSurface **ret_ surface ); CoreSurface **ret_ surface );
DFBResult dfb_core_get_surface_allocation( CoreDFB
*core,
u32
object_id,
CoreSurfaceAllocation *
*ret_allocation );
DFBResult dfb_core_get_surface_buffer ( CoreDFB *core
,
u32 obje
ct_id,
CoreSurfaceBuffer **ret_
surface );
DFBResult dfb_core_get_surface_client ( CoreDFB *core
,
u32 obje
ct_id,
CoreSurfaceClient **ret_
client );
DFBResult dfb_core_get_window ( CoreDFB *core , DFBResult dfb_core_get_window ( CoreDFB *core ,
u32 obje ct_id, u32 obje ct_id,
CoreWindow **ret_ window ); CoreWindow **ret_ window );
/* /*
* Debug * Debug
*/ */
DirectResult dfb_core_enum_surfaces ( CoreDFB *core, DirectResult dfb_core_enum_surfaces ( CoreDFB *core,
FusionObjectCallback callback, FusionObjectCallback callback,
void *ctx ); void *ctx );
DirectResult dfb_core_enum_layer_contexts( CoreDFB *core, DirectResult dfb_core_enum_layer_contexts( CoreDFB *core,
FusionObjectCallback callback, FusionObjectCallback callback,
void *ctx ); void *ctx );
DirectResult dfb_core_enum_layer_regions ( CoreDFB *core, DirectResult dfb_core_enum_layer_regions ( CoreDFB *core,
FusionObjectCallback callback, FusionObjectCallback callback,
void *ctx ); void *ctx );
/* /*
* Arena shared fields
*/
DirectResult core_arena_add_shared_field( CoreDFB *core,
const char *name,
void *data );
DirectResult core_arena_get_shared_field( CoreDFB *core,
const char *name,
void **data );
/*
* Returns true if the calling process is the master fusionee, * Returns true if the calling process is the master fusionee,
* i.e. handles input drivers running their threads. * i.e. handles input drivers running their threads.
*/ */
bool dfb_core_is_master( CoreDFB *core ); bool dfb_core_is_master( CoreDFB *core );
/* /*
* Allows other (blocking) Fusionees to enter the DirectFB session. * Allows other (blocking) Fusionees to enter the DirectFB session.
*/ */
void dfb_core_activate( CoreDFB *core ); void dfb_core_activate( CoreDFB *core );
bool dfb_core_active ( CoreDFB *core );
/* /*
* Returns the core's fusion world. * Returns the core's fusion world.
*/ */
FusionWorld *dfb_core_world( CoreDFB *core ); FusionWorld *dfb_core_world( CoreDFB *core );
/* /*
* Returns the core arena.
*/
FusionArena *dfb_core_arena( CoreDFB *core );
/*
* Returns the shared memory pool of the core. * Returns the shared memory pool of the core.
*/ */
FusionSHMPoolShared *dfb_core_shmpool( CoreDFB *core ); FusionSHMPoolShared *dfb_core_shmpool( CoreDFB *core );
/* /*
* Returns the shared memory pool for raw data, e.g. surface buffers. * Returns the shared memory pool for raw data, e.g. surface buffers.
*/ */
FusionSHMPoolShared *dfb_core_shmpool_data( CoreDFB *core ); FusionSHMPoolShared *dfb_core_shmpool_data( CoreDFB *core );
/* /*
skipping to change at line 182 skipping to change at line 207
bool emergency ); bool emergency );
/* /*
* Removes a function from the cleanup stack. * Removes a function from the cleanup stack.
*/ */
void dfb_core_cleanup_remove( CoreDFB *core, void dfb_core_cleanup_remove( CoreDFB *core,
CoreCleanup *cleanup ); CoreCleanup *cleanup );
DFBFontManager *dfb_core_font_manager( CoreDFB *core ); DFBFontManager *dfb_core_font_manager( CoreDFB *core );
D_DECLARE_INTERFACE( ICoreResourceManager )
D_DECLARE_INTERFACE( ICoreResourceClient )
struct __DFB_CoreDFBShared { struct __DFB_CoreDFBShared {
int magic; int magic;
FusionSkirmish lock; bool secure;
bool active;
FusionObjectPool *graphics_state_pool; FusionObjectPool *graphics_state_pool;
FusionObjectPool *layer_context_pool; FusionObjectPool *layer_context_pool;
FusionObjectPool *layer_region_pool; FusionObjectPool *layer_region_pool;
FusionObjectPool *palette_pool; FusionObjectPool *palette_pool;
FusionObjectPool *surface_pool; FusionObjectPool *surface_pool;
FusionObjectPool *surface_allocation_pool;
FusionObjectPool *surface_buffer_pool;
FusionObjectPool *surface_client_pool;
FusionObjectPool *window_pool; FusionObjectPool *window_pool;
FusionSHMPoolShared *shmpool; FusionSHMPoolShared *shmpool;
FusionSHMPoolShared *shmpool_data; /* for raw data, e.g. surface buffe rs */ FusionSHMPoolShared *shmpool_data; /* for raw data, e.g. surface buffe rs */
FusionCall call; FusionCall call;
FusionHash *field_hash;
}; };
struct __DFB_CoreDFB { struct __DFB_CoreDFB {
int magic; int magic;
int refs; int refs;
int fusion_id; int fusion_id;
FusionWorld *world; FusionWorld *world;
FusionArena *arena;
CoreDFBShared *shared; CoreDFBShared *shared;
bool master;
bool suspended; bool suspended;
DirectLink *cleanups; DirectLink *cleanups;
DirectThreadInitHandler *init_handler; DirectThreadInitHandler *init_handler;
DirectSignalHandler *signal_handler; DirectSignalHandler *signal_handler;
DirectCleanupHandler *cleanup_handler; DirectCleanupHandler *cleanup_handler;
DFBFontManager *font_manager; DFBFontManager *font_manager;
struct {
ICoreResourceManager *manager;
DirectHash *identities;
} resource;
FusionCall async_call; // used locally for async destroy
etc.
FusionCall slave_call;
DirectLink *memory_permissions;
DirectMutex memory_permissions_lock;
int shutdown_tid;
int shutdown_running;
}; };
typedef enum {
CMPF_READ = 0x00000001,
CMPF_WRITE = 0x00000002,
} CoreMemoryPermissionFlags;
typedef struct __CoreDFB_CoreMemoryPermission CoreMemoryPermission;
DFBResult dfb_core_memory_permissions_add ( CoreDFB *co
re,
CoreMemoryPermissionFlags fl
ags,
void *da
ta,
size_t le
ngth,
CoreMemoryPermission **re
t_permission );
DFBResult dfb_core_memory_permissions_remove( CoreDFB *co
re,
CoreMemoryPermission *pe
rmission );
DFBResult dfb_core_memory_permissions_check ( CoreDFB *co
re,
CoreMemoryPermissionFlags fl
ags,
void *da
ta,
size_t le
ngth );
extern CoreDFB *core_dfb; // FIXME extern CoreDFB *core_dfb; // FIXME
typedef void (*AsyncCallFunc)( void *ctx,
void *ctx2 );
typedef struct {
AsyncCallFunc func;
void *ctx;
void *ctx2;
} AsyncCall;
/*
* Runs a call on the Fusion Dispatch Thread
*
* Used for asynchronous destruct, i.e. when a call needs to destroy itself
*/
static __inline__ DFBResult
Core_AsyncCall( AsyncCallFunc func,
void *ctx,
void *ctx2 )
{
AsyncCall call;
call.func = func;
call.ctx = ctx;
call.ctx2 = ctx2;
return (DFBResult) fusion_call_execute2( &core_dfb->async_call, (Fusio
nCallExecFlags)(FCEF_ONEWAY | FCEF_NODIRECT), 0, &call, sizeof(call), NULL
);
}
void Core_TLS__init( void );
void Core_TLS__deinit( void );
/*
* Identity management
*
* Incoming dispatch pushes ID of caller
*/
void Core_PushIdentity( FusionID caller );
void Core_PopIdentity ( void );
FusionID Core_GetIdentity ( void );
void Core_PushCalling ( void );
void Core_PopCalling ( void );
int Core_GetCalling ( void );
/*
* Resource management
*
* Quotas etc can be implemented.
*
* Run time option 'resource-manager' is needed.
*/
DFBResult Core_Resource_CheckSurface ( const CoreSurfaceConfig *confi
g,
CoreSurfaceTypeFlags type,
u64 resou
rce_id,
CorePalette *palet
te );
DFBResult Core_Resource_CheckSurfaceUpdate( CoreSurface *surfa
ce,
const CoreSurfaceConfig *confi
g );
DFBResult Core_Resource_AddSurface ( CoreSurface *surfa
ce );
DFBResult Core_Resource_RemoveSurface ( CoreSurface *surfa
ce );
DFBResult Core_Resource_UpdateSurface ( CoreSurface *surfa
ce,
const CoreSurfaceConfig *confi
g );
DFBResult Core_Resource_AllowSurface ( CoreSurface *surfa
ce,
const char *execu
table );
/*
* Resource manager main interface
*
* Implementation can be loaded via 'resource-manager' option.
*/
D_DEFINE_INTERFACE( ICoreResourceManager,
DFBResult (*CreateClient) ( ICoreResourceManager *thiz,
FusionID identity,
ICoreResourceClient **ret_client
);
)
/*
* Per slave resource accounting
*/
D_DEFINE_INTERFACE( ICoreResourceClient,
DFBResult (*CheckSurface) ( ICoreResourceClient *thiz,
const CoreSurfaceConfig *config,
CoreSurfaceTypeFlags type,
u64 resource_i
d,
CorePalette *palette );
DFBResult (*CheckSurfaceUpdate) ( ICoreResourceClient *thiz,
CoreSurface *surface,
const CoreSurfaceConfig *config );
DFBResult (*AddSurface) ( ICoreResourceClient *thiz,
CoreSurface *surface );
DFBResult (*RemoveSurface) ( ICoreResourceClient *thiz,
CoreSurface *surface );
DFBResult (*UpdateSurface) ( ICoreResourceClient *thiz,
CoreSurface *surface,
const CoreSurfaceConfig *config );
)
/*
* Client instance management
*/
DFBResult Core_Resource_AddIdentity ( FusionID identity,
u32 slave_call );
void Core_Resource_DisposeIdentity( FusionID identity );
ICoreResourceClient *Core_Resource_GetClient ( FusionID identity );
CoreSlave *Core_Resource_GetSlave ( FusionID identity );
/*
* Per client cleanup
*/
typedef struct __Core__CoreResourceCleanup CoreResourceCleanup;
typedef void (*CoreResourceCleanupCallback)( void *ctx,
void *ctx2 );
DFBResult Core_Resource_AddCleanup ( FusionID
identity,
CoreResourceCleanupCall
back callback,
void
*ctx,
void
*ctx2,
CoreResourceCleanup
**ret_cleanup );
DFBResult Core_Resource_DisposeCleanup ( CoreResourceCleanup
*cleanup );
#endif #endif
 End of changes. 16 change blocks. 
11 lines changed or deleted 260 lines changed or added


 coredefs.h   coredefs.h 
skipping to change at line 46 skipping to change at line 46
#define MAX_INPUTDEVICES 16 #define MAX_INPUTDEVICES 16
#define MAX_LAYERS 16 #define MAX_LAYERS 16
#define MAX_SCREENS 4 #define MAX_SCREENS 4
#define MAX_INPUT_GLOBALS 8 #define MAX_INPUT_GLOBALS 8
#define MAX_SURFACE_BUFFERS 6 #define MAX_SURFACE_BUFFERS 6
#define MAX_SURFACE_POOLS 8 #define MAX_SURFACE_POOLS 8
#define MAX_SURFACE_POOL_BRIDGES 4 #define MAX_SURFACE_POOL_BRIDGES 4
#define MAX_CLIPBOARD_MIME_TYPE_SIZE (128)
#define MAX_CLIPBOARD_DATA_SIZE (48*1024)
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 coretypes.h   coretypes.h 
skipping to change at line 79 skipping to change at line 79
typedef struct __DFB_CoreLayer CoreLayer; typedef struct __DFB_CoreLayer CoreLayer;
typedef struct __DFB_CoreLayerContext CoreLayerContext; typedef struct __DFB_CoreLayerContext CoreLayerContext;
typedef struct __DFB_CoreLayerRegion CoreLayerRegion; typedef struct __DFB_CoreLayerRegion CoreLayerRegion;
typedef struct __DFB_CoreLayerRegionConfig CoreLayerRegionConfig; typedef struct __DFB_CoreLayerRegionConfig CoreLayerRegionConfig;
typedef struct __DFB_CoreSurface CoreSurface; typedef struct __DFB_CoreSurface CoreSurface;
typedef struct __DFB_CoreSurfaceAccessor CoreSurfaceAccessor; typedef struct __DFB_CoreSurfaceAccessor CoreSurfaceAccessor;
typedef struct __DFB_CoreSurfaceAllocation CoreSurfaceAllocation; typedef struct __DFB_CoreSurfaceAllocation CoreSurfaceAllocation;
typedef struct __DFB_CoreSurfaceBuffer CoreSurfaceBuffer; typedef struct __DFB_CoreSurfaceBuffer CoreSurfaceBuffer;
typedef struct __DFB_CoreSurfaceBufferLock CoreSurfaceBufferLock; typedef struct __DFB_CoreSurfaceBufferLock CoreSurfaceBufferLock;
typedef struct __DFB_CoreSurfaceClient CoreSurfaceClient;
typedef struct __DFB_CoreSurfacePool CoreSurfacePool; typedef struct __DFB_CoreSurfacePool CoreSurfacePool;
typedef struct __DFB_CoreSurfacePoolBridge CoreSurfacePoolBridge; typedef struct __DFB_CoreSurfacePoolBridge CoreSurfacePoolBridge;
typedef struct __DFB_CoreSurfacePoolTransfer CoreSurfacePoolTransfer; typedef struct __DFB_CoreSurfacePoolTransfer CoreSurfacePoolTransfer;
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; typedef unsigned int CoreSurfacePoolID;
typedef unsigned int CoreSurfacePoolBridgeID; typedef unsigned int CoreSurfacePoolBridgeID;
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 directfb.h   directfb.h 
skipping to change at line 198 skipping to change at line 198
DFB_NOCORE = DR_NOCORE, /* Core part not availabl e. */ DFB_NOCORE = DR_NOCORE, /* Core part not availabl e. */
/* /*
* DirectFB specific result codes starting at (after) this offset * DirectFB specific result codes starting at (after) this offset
*/ */
DFB__RESULT_BASE = D_RESULT_TYPE_CODE_BASE( 'D','F','B','1' ), DFB__RESULT_BASE = D_RESULT_TYPE_CODE_BASE( 'D','F','B','1' ),
DFB_NOVIDEOMEMORY, /* There's not enough video memory. */ DFB_NOVIDEOMEMORY, /* There's not enough video memory. */
DFB_MISSINGFONT, /* No font has been set. */ DFB_MISSINGFONT, /* No font has been set. */
DFB_MISSINGIMAGE, /* No image has been set. */ DFB_MISSINGIMAGE, /* No image has been set. */
DFB_NOALLOCATION, /* No allocation. */
DFB__RESULT_END DFB__RESULT_END
} DFBResult; } DFBResult;
/* /*
* A boolean. * A boolean.
*/ */
typedef enum { typedef enum {
DFB_FALSE = 0, DFB_FALSE = 0,
DFB_TRUE = !DFB_FALSE DFB_TRUE = !DFB_FALSE
skipping to change at line 590 skipping to change at line 591
DLCAPS_CLIP_REGIONS = 0x00400000, /* Supports IDirectFBDisplayLa yer::SetClipRegions(). */ DLCAPS_CLIP_REGIONS = 0x00400000, /* Supports IDirectFBDisplayLa yer::SetClipRegions(). */
DLCAPS_LR_MONO = 0x01000000, /* Supports L/R mono stereosco pic display. */ DLCAPS_LR_MONO = 0x01000000, /* Supports L/R mono stereosco pic display. */
DLCAPS_STEREO = 0x02000000, /* Supports independent L/R st ereoscopic display. */ DLCAPS_STEREO = 0x02000000, /* Supports independent L/R st ereoscopic display. */
DLCAPS_ALL = 0x0373FFFF DLCAPS_ALL = 0x0373FFFF
} DFBDisplayLayerCapabilities; } DFBDisplayLayerCapabilities;
/* /*
* Flags used by image providers
*/
typedef enum {
DIRENDER_NONE = 0x00000000,
DIRENDER_FAST = 0x00000001, /* Select fast rendering metho
d */
DIRENDER_ALL = 0x00000001
} DIRenderFlags;
/*
* Capabilities of a screen. * Capabilities of a screen.
*/ */
typedef enum { typedef enum {
DSCCAPS_NONE = 0x00000000, DSCCAPS_NONE = 0x00000000,
DSCCAPS_VSYNC = 0x00000001, /* Synchronization with the DSCCAPS_VSYNC = 0x00000001, /* Synchronization with the
vertical retrace supported. */ vertical retrace supported. */
DSCCAPS_POWER_MANAGEMENT = 0x00000002, /* Power management supported. */ DSCCAPS_POWER_MANAGEMENT = 0x00000002, /* Power management supported. */
DSCCAPS_MIXERS = 0x00000010, /* Has mixers. */ DSCCAPS_MIXERS = 0x00000010, /* Has mixers. */
skipping to change at line 707 skipping to change at line 717
* The surface capabilities. * The surface capabilities.
*/ */
typedef enum { typedef enum {
DSCAPS_NONE = 0x00000000, /* None of these. */ DSCAPS_NONE = 0x00000000, /* None of these. */
DSCAPS_PRIMARY = 0x00000001, /* It's the primary surface. */ DSCAPS_PRIMARY = 0x00000001, /* It's the primary surface. */
DSCAPS_SYSTEMONLY = 0x00000002, /* Surface data is permanently sto red in system memory.<br> DSCAPS_SYSTEMONLY = 0x00000002, /* Surface data is permanently sto red in system memory.<br>
There's no video memory allocat ion/storage. */ There's no video memory allocat ion/storage. */
DSCAPS_VIDEOONLY = 0x00000004, /* Surface data is permanently sto red in video memory.<br> DSCAPS_VIDEOONLY = 0x00000004, /* Surface data is permanently sto red in video memory.<br>
There's no system memory alloca tion/storage. */ There's no system memory alloca tion/storage. */
DSCAPS_GL = 0x00000008, /* Surface data is stored in memor y that can be accessed by a GL accelerator. */
DSCAPS_DOUBLE = 0x00000010, /* Surface is double buffered */ DSCAPS_DOUBLE = 0x00000010, /* Surface is double buffered */
DSCAPS_SUBSURFACE = 0x00000020, /* Surface is just a sub area of a nother DSCAPS_SUBSURFACE = 0x00000020, /* Surface is just a sub area of a nother
one sharing the surface data. * / one sharing the surface data. * /
DSCAPS_INTERLACED = 0x00000040, /* Each buffer contains interlaced video (or graphics) DSCAPS_INTERLACED = 0x00000040, /* Each buffer contains interlaced video (or graphics)
data consisting of two fields.< br> data consisting of two fields.< br>
Their lines are stored interlea ved. One field's height Their lines are stored interlea ved. One field's height
is a half of the surface's heig ht. */ is a half of the surface's heig ht. */
DSCAPS_SEPARATED = 0x00000080, /* For usage with DSCAPS_INTERLACE D.<br> DSCAPS_SEPARATED = 0x00000080, /* For usage with DSCAPS_INTERLACE D.<br>
DSCAPS_SEPARATED specifies that the fields are NOT DSCAPS_SEPARATED specifies that the fields are NOT
interleaved line by line in the buffer.<br> interleaved line by line in the buffer.<br>
skipping to change at line 737 skipping to change at line 748
DSCAPS_DEPTH = 0x00010000, /* A depth buffer is allocated. */ DSCAPS_DEPTH = 0x00010000, /* A depth buffer is allocated. */
DSCAPS_STEREO = 0x00020000, /* Both left & right buffers are a llocated. Only valid with windows and DSCAPS_STEREO = 0x00020000, /* Both left & right buffers are a llocated. Only valid with windows and
layers with the DLOP_STEREO or DWCAPS_STEREO flags set. */ layers with the DLOP_STEREO or DWCAPS_STEREO flags set. */
DSCAPS_SHARED = 0x00100000, /* The surface will be accessible among processes. */ DSCAPS_SHARED = 0x00100000, /* The surface will be accessible among processes. */
DSCAPS_ROTATED = 0x01000000, /* The back buffers are allocated with swapped width/height (unimplemented!). */ DSCAPS_ROTATED = 0x01000000, /* The back buffers are allocated with swapped width/height (unimplemented!). */
DSCAPS_ALL = 0x011113F7, /* All of these. */ DSCAPS_ALL = 0x011113FF, /* 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 905 skipping to change at line 916
DIDTF_REMOTE = 0x00000008, /* Is a remote control. */ DIDTF_REMOTE = 0x00000008, /* Is a remote control. */
DIDTF_VIRTUAL = 0x00000010, /* Is a virtual input device. */ DIDTF_VIRTUAL = 0x00000010, /* Is a virtual input device. */
DIDTF_ALL = 0x0000001F /* All type flags set. */ DIDTF_ALL = 0x0000001F /* All type flags set. */
} DFBInputDeviceTypeFlags; } DFBInputDeviceTypeFlags;
/* /*
* Basic input device features. * Basic input device features.
*/ */
typedef enum { typedef enum {
#ifndef DIRECTFB_DISABLE_DEPRECATED
DICAPS_KEYS = 0x00000001, /* device supports key events */ DICAPS_KEYS = 0x00000001, /* device supports key events */
DICAPS_AXES = 0x00000002, /* device supports axis events */ DICAPS_AXES = 0x00000002, /* device supports axis events */
DICAPS_BUTTONS = 0x00000004, /* device supports button events */ DICAPS_BUTTONS = 0x00000004, /* device supports button events */
DICAPS_ALL = 0x00000007 /* all capabilities */ DICAPS_ALL = 0x00000007 /* all capabilities */
#else
DIDCAPS_NONE = 0x00000000, /* device supports no events */
DIDCAPS_KEYS = 0x00000001, /* device supports key events */
DIDCAPS_AXES = 0x00000002, /* device supports axis events */
DIDCAPS_BUTTONS = 0x00000004, /* device supports button events */
DIDCAPS_ALL = 0x00000007 /* all capabilities */
#endif
} DFBInputDeviceCapabilities; } DFBInputDeviceCapabilities;
/* /*
* Identifier (index) for e.g. mouse or joystick buttons. * Identifier (index) for e.g. mouse or joystick buttons.
*/ */
typedef enum { typedef enum {
DIBI_LEFT = 0x00000000, /* left mouse button */ DIBI_LEFT = 0x00000000, /* left mouse button */
DIBI_RIGHT = 0x00000001, /* right mouse button */ DIBI_RIGHT = 0x00000001, /* right mouse button */
DIBI_MIDDLE = 0x00000002, /* middle mouse button */ DIBI_MIDDLE = 0x00000002, /* middle mouse button */
skipping to change at line 1051 skipping to change at line 1071
or lowered with the mouse */ or lowered with the mouse */
DWOP_GHOST = 0x00001000, /* never get focus or input, DWOP_GHOST = 0x00001000, /* never get focus or input,
clicks will go through, clicks will go through,
implies DWOP_KEEP... */ implies DWOP_KEEP... */
DWOP_INDESTRUCTIBLE = 0x00002000, /* window can't be destroyed DWOP_INDESTRUCTIBLE = 0x00002000, /* window can't be destroyed
by internal shortcut */ by internal shortcut */
DWOP_INPUTONLY = 0x00004000, /* The window will be input only. DWOP_INPUTONLY = 0x00004000, /* The window will be input only.
It will receive events but is no t shown. It will receive events but is no t shown.
Note that toggling this bit will not Note that toggling this bit will not
free/assign the window surface. */ free/assign the window surface. */
DWOP_STEREO_SIDE_BY_SIDE_HALF = 0x00008000, /* Treat single buffer as combined left/right buffers, side by side. */
DWOP_SCALE = 0x00010000, /* Surface won't be changed if wind ow size on screen changes. The surface DWOP_SCALE = 0x00010000, /* Surface won't be changed if wind ow size on screen changes. The surface
can be resized separately using IDirectFBWindow::ResizeSurface(). */ can be resized separately using IDirectFBWindow::ResizeSurface(). */
DWOP_KEEP_ABOVE = 0x00100000, /* Keep window above parent window. */ DWOP_KEEP_ABOVE = 0x00100000, /* Keep window above parent window. */
DWOP_KEEP_UNDER = 0x00200000, /* Keep window under parent window. */ DWOP_KEEP_UNDER = 0x00200000, /* Keep window under parent window. */
DWOP_FOLLOW_BOUNDS = 0x00400000, /* Follow window bounds from parent . */ DWOP_FOLLOW_BOUNDS = 0x00400000, /* Follow window bounds from parent . */
DWOP_ALL = 0x0071707F /* all possible options */ DWOP_ALL = 0x0071F07F /* all possible options */
} DFBWindowOptions; } DFBWindowOptions;
/* /*
* The stacking class restricts the stacking order of windows. * The stacking class restricts the stacking order of windows.
*/ */
typedef enum { typedef enum {
DWSC_MIDDLE = 0x00000000, /* This is the default stacking DWSC_MIDDLE = 0x00000000, /* This is the default stacking
class of new windows. */ class of new windows. */
DWSC_UPPER = 0x00000001, /* Window is always above windows DWSC_UPPER = 0x00000001, /* Window is always above windows
in the middle stacking class. in the middle stacking class.
skipping to change at line 1328 skipping to change at line 1349
/* 1 bit alpha (1 byte/ 8 pixel, LEAST significant bit used first) */ /* 1 bit alpha (1 byte/ 8 pixel, LEAST significant bit used first) */
DSPF_A1_LSB = DFB_SURFACE_PIXELFORMAT( 35, 0, 1, 1, 1, 0, 7, 0, 0, 0, 0 ), DSPF_A1_LSB = DFB_SURFACE_PIXELFORMAT( 35, 0, 1, 1, 1, 0, 7, 0, 0, 0, 0 ),
/* 16 bit YUV (8 bit Y plane followed by 8 bit 2x1 subsampled V/U pl anes) */ /* 16 bit YUV (8 bit Y plane followed by 8 bit 2x1 subsampled V/U pl anes) */
DSPF_YV16 = DFB_SURFACE_PIXELFORMAT( 36, 16, 0, 0, 0, 1, 0, 0, 1, 0, 0 ), DSPF_YV16 = DFB_SURFACE_PIXELFORMAT( 36, 16, 0, 0, 0, 1, 0, 0, 1, 0, 0 ),
/* 32 bit ABGR (4 byte, alpha 8@24, blue 8@16, green 8@8, red 8@0) */ /* 32 bit ABGR (4 byte, alpha 8@24, blue 8@16, green 8@8, red 8@0) */
DSPF_ABGR = DFB_SURFACE_PIXELFORMAT( 37, 24, 8, 1, 0, 4, 0, 0, 0, 0, 0 ), DSPF_ABGR = DFB_SURFACE_PIXELFORMAT( 37, 24, 8, 1, 0, 4, 0, 0, 0, 0, 0 ),
/* 32 bit RGBAF (4 byte, red 8@24, green 8@16, blue 8@8, alpha 7@1, fl ash 1@0 */ /* 32 bit RGBAF (4 byte, red 8@24, green 8@16, blue 8@8, alpha 7@1, fl ash 1@0 */
DSPF_RGBAF88871 = DFB_SURFACE_PIXELFORMAT( 38, 24, 7, 1, 0, 4, 0, 0, 0 DSPF_RGBAF88871 = DFB_SURFACE_PIXELFORMAT( 38, 24, 7, 1, 0, 4, 0, 0, 0
, 0, 0 ) , 0, 0 ),
/* 4 bit LUT (1 byte/ 2 pixel, 4 bit color and alpha lookup from pa
lette) */
DSPF_LUT4 = DFB_SURFACE_PIXELFORMAT( 39, 4, 0, 1, 4, 0, 1, 0, 0,
1, 0 ),
/* 16 bit LUT (1 byte alpha and 8 bit color lookup from palette) */
DSPF_ALUT8 = DFB_SURFACE_PIXELFORMAT( 40, 8, 8, 1, 0, 2, 0, 0, 0,
1, 0 ),
} DFBSurfacePixelFormat; } DFBSurfacePixelFormat;
/* Number of pixelformats defined */ /* Number of pixelformats defined */
#define DFB_NUM_PIXELFORMATS 39 #define DFB_NUM_PIXELFORMATS 41
/* 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 1387 skipping to change at line 1414
((fmt) == DSPF_RGBAF88871)) ((fmt) == DSPF_RGBAF88871))
#define DFB_COLOR_IS_YUV(fmt) \ #define DFB_COLOR_IS_YUV(fmt) \
(((fmt) == DSPF_YUY2) || \ (((fmt) == DSPF_YUY2) || \
((fmt) == DSPF_UYVY) || \ ((fmt) == DSPF_UYVY) || \
((fmt) == DSPF_I420) || \ ((fmt) == DSPF_I420) || \
((fmt) == DSPF_YV12) || \ ((fmt) == DSPF_YV12) || \
((fmt) == DSPF_NV12) || \ ((fmt) == DSPF_NV12) || \
((fmt) == DSPF_NV16) || \ ((fmt) == DSPF_NV16) || \
((fmt) == DSPF_NV21) || \ ((fmt) == DSPF_NV21) || \
((fmt) == DSPF_AYUV)) ((fmt) == DSPF_AYUV) || \
((fmt) == DSPF_YUV444P) || \
((fmt) == DSPF_AVYU) || \
((fmt) == DSPF_VYU) || \
((fmt) == DSPF_YV16))
/* /*
* Color space used by the colors in the surface. * Color space used by the colors in the surface.
*/ */
typedef enum { typedef enum {
DSCS_UNKNOWN = 0, DSCS_UNKNOWN = 0,
DSCS_RGB = 1, /* standard RGB */ DSCS_RGB = 1, /* standard RGB */
DSCS_BT601 = 2, /* ITU BT.601 */ DSCS_BT601 = 2, /* ITU BT.601 */
DSCS_BT601_FULLRANGE = 3, /* ITU BT.601 Full Range */ DSCS_BT601_FULLRANGE = 3, /* ITU BT.601 Full Range */
DSCS_BT709 = 4 /* ITU BT.709 */ DSCS_BT709 = 4 /* ITU BT.709 */
skipping to change at line 1439 skipping to change at line 1470
DFBSurfaceDescriptionFlags flags; /* field validation */ DFBSurfaceDescriptionFlags flags; /* field validation */
DFBSurfaceCapabilities caps; /* capabilities */ DFBSurfaceCapabilities 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 */
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[3];
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 unsigned long resource_id; /* universal resourc e id, either user specified for general
purpose surfaces or id of layer or window */ purpose surfaces or id of layer or window */
DFBSurfaceHintFlags hints; /* usage hints for opt imized allocation, format selection etc. */ DFBSurfaceHintFlags hints; /* usage hints for opt imized allocation, format selection etc. */
skipping to change at line 2188 skipping to change at line 2219
* has been constructed, the resulting interface pointer is stored in * has been constructed, the resulting interface pointer is stored in
* <b>interface</b>. * <b>interface</b>.
*/ */
DFBResult (*GetInterface) ( DFBResult (*GetInterface) (
IDirectFB *thiz, IDirectFB *thiz,
const char *type, const char *type,
const char *implementation, const char *implementation,
void *arg, void *arg,
void **ret_interface void **ret_interface
); );
/** Surfaces **/
/*
* Get a surface by ID.
*/
DFBResult (*GetSurface) (
IDirectFB *thiz,
DFBSurfaceID surface_id,
IDirectFBSurface **ret_interface
);
) )
/* predefined layer ids */ /* predefined layer ids */
#define DLID_PRIMARY 0x0000 #define DLID_PRIMARY 0x0000
/* predefined layer source ids */ /* predefined layer source ids */
#define DLSID_SURFACE 0x0000 #define DLSID_SURFACE 0x0000
/* predefined screen ids */ /* predefined screen ids */
#define DSCID_PRIMARY 0x0000 #define DSCID_PRIMARY 0x0000
skipping to change at line 2426 skipping to change at line 2468
DSOR_800_600 = 0x00000008, /* 800x600 Resolution */ DSOR_800_600 = 0x00000008, /* 800x600 Resolution */
DSOR_1024_768 = 0x00000010, /* 1024x768 Resolution */ DSOR_1024_768 = 0x00000010, /* 1024x768 Resolution */
DSOR_1152_864 = 0x00000020, /* 1152x864 Resolution */ DSOR_1152_864 = 0x00000020, /* 1152x864 Resolution */
DSOR_1280_720 = 0x00000040, /* 1280x720 Resolution */ DSOR_1280_720 = 0x00000040, /* 1280x720 Resolution */
DSOR_1280_768 = 0x00000080, /* 1280x768 Resolution */ DSOR_1280_768 = 0x00000080, /* 1280x768 Resolution */
DSOR_1280_960 = 0x00000100, /* 1280x960 Resolution */ DSOR_1280_960 = 0x00000100, /* 1280x960 Resolution */
DSOR_1280_1024 = 0x00000200, /* 1280x1024 Resolution */ DSOR_1280_1024 = 0x00000200, /* 1280x1024 Resolution */
DSOR_1400_1050 = 0x00000400, /* 1400x1050 Resolution */ DSOR_1400_1050 = 0x00000400, /* 1400x1050 Resolution */
DSOR_1600_1200 = 0x00000800, /* 1600x1200 Resolution */ DSOR_1600_1200 = 0x00000800, /* 1600x1200 Resolution */
DSOR_1920_1080 = 0x00001000, /* 1920x1080 Resolution */ DSOR_1920_1080 = 0x00001000, /* 1920x1080 Resolution */
DSOR_ALL = 0x00001FFF /* All Resolution */ DSOR_960_540 = 0x00002000, /* 960x540 Resolution */
DSOR_1440_540 = 0x00004000, /* 1440x540 Resolution */
DSOR_ALL = 0x00007FFF /* All Resolution */
} DFBScreenOutputResolution; } 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 . */
skipping to change at line 2494 skipping to change at line 2538
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_RESOLUTION = 0x00004000, /* Different encoder resolutions su pported */
DSECAPS_FRAMING = 0x00008000, /* Can select picture framing mode for stereo */ DSECAPS_FRAMING = 0x00008000, /* Can select picture framing mode for stereo */
DSECAPS_ASPECT_RATIO = 0x00010000, /* Can specify display aspect ratio */
DSECAPS_ALL = 0x0000FF3F DSECAPS_ALL = 0x0001FF3F
} 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. */
skipping to change at line 2557 skipping to change at line 2602
DSEF_29_97HZ = 0x00000002, /* 29.97 Hz Output. */ DSEF_29_97HZ = 0x00000002, /* 29.97 Hz Output. */
DSEF_50HZ = 0x00000004, /* 50 Hz Output. */ DSEF_50HZ = 0x00000004, /* 50 Hz Output. */
DSEF_59_94HZ = 0x00000008, /* 59.94 Hz Output. */ DSEF_59_94HZ = 0x00000008, /* 59.94 Hz Output. */
DSEF_60HZ = 0x00000010, /* 60 Hz Output. */ DSEF_60HZ = 0x00000010, /* 60 Hz Output. */
DSEF_75HZ = 0x00000020, /* 75 Hz Output. */ DSEF_75HZ = 0x00000020, /* 75 Hz Output. */
DSEF_30HZ = 0x00000040, /* 30 Hz Output. */ DSEF_30HZ = 0x00000040, /* 30 Hz Output. */
DSEF_24HZ = 0x00000080, /* 24 Hz Output. */ DSEF_24HZ = 0x00000080, /* 24 Hz Output. */
DSEF_23_976HZ = 0x00000100, /* 23.976 Hz Output. */ DSEF_23_976HZ = 0x00000100, /* 23.976 Hz Output. */
} DFBScreenEncoderFrequency; } DFBScreenEncoderFrequency;
/*
* Encoder picture delivery method.
* See HDMI Specification 1.4a - Extraction of 3D signaling portion for mor
e details
*/
typedef enum {
DSEPF_UNKNOWN = 0,
DSEPF_MONO = 0x00000001, /* Normal output to
non-stereoscopic (3D) TV. No
L/R content provi
ded to TV. Frame is output on
each vsync. */
DSEPF_STEREO_SIDE_BY_SIDE_HALF = 0x00000002, /* L/R frames are do
wnscaled horizontally by 2 and
packed side-by-si
de into a single frame, left on left
half of frame. Th
e packed frame is output on each
vsync. Some stere
oscopic TV's support this mode
using HDMI v1.3 a
nd a special menu configuration. */
DSEPF_STEREO_TOP_AND_BOTTOM = 0x00000004, /* L/R frames are do
wnscaled vertically by 2 and
packed into a sin
gle frame, left on top. The packed
frame is output o
n each vsync. Some stereoscopic TV's
support this mode
using HDMI v1.3 and a special
menu configuratio
n. */
DSEPF_STEREO_FRAME_PACKING = 0x00000008, /* Full resolution L
/R frames or fields are delivered sequentially
to the TV, altern
ating left & right with an active
space between eac
h video frame. Vsync occurs
after each sequen
ce of: vblank, left eye video frame,
active space, rig
ht eye video frame. Requires HDMI v1.4a. */
DSEPF_STEREO_SIDE_BY_SIDE_FULL = 0x00000010, /* L/R frames are pa
cked side-by-side into a double width
single frame, lef
t on left half of frame. The packed
frame is output o
n each vsync. Requires HDMI v1.4a. */
DSEPF_ALL = 0x0000001f
} DFBScreenEncoderPictureFraming;
#ifndef DIRECTFB_DISABLE_DEPRECATED
#define DSEPF_STEREO_PACKED_HORIZ DSEPF_STEREO_SIDE_BY_SIDE_HALF
#define DSEPF_STEREO_PACKED_VERT DSEPF_STEREO_TOP_AND_BOTTOM
#define DSEPF_STEREO_SEQUENTIAL DSEPF_STEREO_FRAME_PACKING
#endif
typedef enum {
DFB_ASPECT_RATIO_eAuto, /* 4x3 for SD and 480p, 16x9 for HD (including
720p, 1080i, etc.) */
DFB_ASPECT_RATIO_e4x3,
DFB_ASPECT_RATIO_e16x9
} DFBDisplayAspectRatio;
#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*/ 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 */
DFBScreenEncoderPictureFraming all_framing; /* Supported HDMI si
gnaling modes */
DFBDisplayAspectRatio all_aspect_ratio; /* Supported display
aspect ratios */
} 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. */
skipping to change at line 2594 skipping to change at line 2685
DSECONF_SCANMODE = 0x00000010, /* Select interlaced or progres sive output. */ DSECONF_SCANMODE = 0x00000010, /* Select interlaced or progres sive 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_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 sup port. */ DSECONF_SLOW_BLANKING = 0x00000200, /* Can select slow blanking sup port. */
DSECONF_RESOLUTION = 0x00000400, /* Can change resolution of the encoder.*/ DSECONF_RESOLUTION = 0x00000400, /* Can change resolution of the encoder.*/
DSECONF_FRAMING = 0x00000800, /* Set method for delivering pi ctures to display. */ DSECONF_FRAMING = 0x00000800, /* Set method for delivering pi ctures to display. */
DSECONF_ASPECT_RATIO = 0x00001000, /* Set display aspect ratio. */
DSECONF_ALL = 0x00000FFF DSECONF_ALL = 0x00001FFF
} 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 2618 skipping to change at line 2710
DSETP_YELLOW = 0x00000020, /* Whole screen (ff, ff, 00). */ DSETP_YELLOW = 0x00000020, /* Whole screen (ff, ff, 00). */
DSETP_CYAN = 0x00000030, /* Whole screen (00, ff, ff). */ DSETP_CYAN = 0x00000030, /* Whole screen (00, ff, ff). */
DSETP_GREEN = 0x00000040, /* Whole screen (00, ff, 00). */ DSETP_GREEN = 0x00000040, /* Whole screen (00, ff, 00). */
DSETP_MAGENTA = 0x00000050, /* Whole screen (ff, 00, ff). */ DSETP_MAGENTA = 0x00000050, /* Whole screen (ff, 00, ff). */
DSETP_RED = 0x00000060, /* Whole screen (ff, 00, 00). */ DSETP_RED = 0x00000060, /* Whole screen (ff, 00, 00). */
DSETP_BLUE = 0x00000070, /* Whole screen (00, 00, ff). */ DSETP_BLUE = 0x00000070, /* Whole screen (00, 00, ff). */
DSETP_BLACK = 0x00000080 /* Whole screen (00, 00, 00). */ DSETP_BLACK = 0x00000080 /* Whole screen (00, 00, 00). */
} DFBScreenEncoderTestPicture; } DFBScreenEncoderTestPicture;
/* /*
* Encoder picture delivery method.
* See HDMI Specification 1.4a - Extraction of 3D signaling portion for mor
e details
*/
typedef enum {
DSEPF_UNKNOWN = 0,
DSEPF_MONO = 0x00000001, /* Normal output to
non-stereoscopic (3D) TV. No
L/R content provi
ded to TV. Frame is output on
each vsync. */
DSEPF_STEREO_SIDE_BY_SIDE_HALF = 0x00000002, /* L/R frames are do
wnscaled horizontally by 2 and
packed side-by-si
de into a single frame, left on left
half of frame. Th
e packed frame is output on each
vsync. Some stere
oscopic TV's support this mode
using HDMI v1.3 a
nd a special menu configuration. */
DSEPF_STEREO_TOP_AND_BOTTOM = 0x00000004, /* L/R frames are do
wnscaled vertically by 2 and
packed into a sin
gle frame, left on top. The packed
frame is output o
n each vsync. Some stereoscopic TV's
support this mode
using HDMI v1.3 and a special
menu configuratio
n. */
DSEPF_STEREO_FRAME_PACKING = 0x00000008, /* Full resolution L
/R frames or fields are delivered sequentially
to the TV, altern
ating left & right with an active
space between eac
h video frame. Vsync occurs
after each sequen
ce of: vblank, left eye video frame,
active space, rig
ht eye video frame. Requires HDMI v1.4a. */
DSEPF_STEREO_SIDE_BY_SIDE_FULL = 0x00000010, /* L/R frames are pa
cked side-by-side into a double width
single frame, lef
t on left half of frame. The packed
frame is output o
n each vsync. Requires HDMI v1.4a. */
DSEPF_ALL = 0x0000001f
} DFBScreenEncoderPictureFraming;
#ifndef DIRECTFB_DISABLE_DEPRECATED
#define DSEPF_STEREO_PACKED_HORIZ DSEPF_STEREO_SIDE_BY_SIDE_HALF
#define DSEPF_STEREO_PACKED_VERT DSEPF_STEREO_TOP_AND_BOTTOM
#define DSEPF_STEREO_SEQUENTIAL DSEPF_STEREO_FRAME_PACKING
#endif
/*
* Configuration of a display encoder. * Configuration of a display encoder.
*/ */
typedef struct { typedef struct {
DFBScreenEncoderConfigFlags flags; /* Validates st ruct members. */ DFBScreenEncoderConfigFlags flags; /* Validates st ruct members. */
DFBScreenEncoderTVStandards tv_standard; /* TV standard. */ DFBScreenEncoderTVStandards tv_standard; /* TV standard. */
DFBScreenEncoderTestPicture test_picture; /* Test picture mode. */ DFBScreenEncoderTestPicture test_picture; /* Test picture mode. */
int mixer; /* Selected mix er. */ int mixer; /* Selected mix er. */
DFBScreenOutputSignals out_signals; /* Generated ou tput signals. */ DFBScreenOutputSignals out_signals; /* Generated ou tput signals. */
DFBScreenOutputConnectors out_connectors; /* Selected out put connector(s). */ DFBScreenOutputConnectors out_connectors; /* Selected out put connector(s). */
skipping to change at line 2676 skipping to change at line 2731
DFBScreenEncoderScanMode scanmode; /* Interlaced o r progressive output. */ DFBScreenEncoderScanMode scanmode; /* Interlaced o r progressive output. */
DFBColor test_color; /* Color for DS ETP_SINGLE. */ DFBColor test_color; /* Color for DS ETP_SINGLE. */
DFBColorAdjustment adjustment; /* Color adjust ment. */ DFBColorAdjustment adjustment; /* Color adjust ment. */
DFBScreenEncoderFrequency frequency; /* Selected Out put Frequency*/ DFBScreenEncoderFrequency frequency; /* Selected Out put Frequency*/
DFBScreenOutputResolution resolution; /* Selected Out put resolution*/ DFBScreenOutputResolution resolution; /* Selected Out put resolution*/
DFBScreenEncoderPictureFraming framing; /* Selected pic ture delivery method. */ DFBScreenEncoderPictureFraming framing; /* Selected pic ture delivery method. */
DFBDisplayAspectRatio aspect_ratio; /* screen aspec t ratio */
} DFBScreenEncoderConfig; } DFBScreenEncoderConfig;
/******************* /*******************
* IDirectFBScreen * * IDirectFBScreen *
*******************/ *******************/
/* /*
* <i>No summary yet...</i> * <i>No summary yet...</i>
*/ */
D_DEFINE_INTERFACE( IDirectFBScreen, D_DEFINE_INTERFACE( IDirectFBScreen,
skipping to change at line 3473 skipping to change at line 3529
*/ */
typedef enum { typedef enum {
DSSE_LEFT = 0x00000001, /* Left eye buffers to be used for all future DSSE_LEFT = 0x00000001, /* Left eye buffers to be used for all future
operations on this surface. */ operations on this surface. */
DSSE_RIGHT = 0x00000002 /* Right eye buffers to be used for all future DSSE_RIGHT = 0x00000002 /* Right eye buffers to be used for all future
operations on this surface. */ operations on this surface. */
} DFBSurfaceStereoEye; } DFBSurfaceStereoEye;
/* /*
* Available Porter/Duff rules. * Available Porter/Duff rules.
*
* pixel = (source * fs + destination * fd),
* sa = source alpha,
* da = destination alpha
*/ */
typedef enum { typedef enum {
/* pixel = (source * fs + destination * fd),
sa = source alpha,
da = destination alpha */
DSPD_NONE = 0, /* fs: sa fd: 1.0-sa (defaults) */ DSPD_NONE = 0, /* fs: sa fd: 1.0-sa (defaults) */
DSPD_CLEAR = 1, /* fs: 0.0 fd: 0.0 */ DSPD_CLEAR = 1, /* fs: 0.0 fd: 0.0 */
DSPD_SRC = 2, /* fs: 1.0 fd: 0.0 */ DSPD_SRC = 2, /* fs: 1.0 fd: 0.0 */
DSPD_SRC_OVER = 3, /* fs: 1.0 fd: 1.0-sa */ DSPD_SRC_OVER = 3, /* fs: 1.0 fd: 1.0-sa */
DSPD_DST_OVER = 4, /* fs: 1.0-da fd: 1.0 */ DSPD_DST_OVER = 4, /* fs: 1.0-da fd: 1.0 */
DSPD_SRC_IN = 5, /* fs: da fd: 0.0 */ DSPD_SRC_IN = 5, /* fs: da fd: 0.0 */
DSPD_DST_IN = 6, /* fs: 0.0 fd: sa */ DSPD_DST_IN = 6, /* fs: 0.0 fd: sa */
DSPD_SRC_OUT = 7, /* fs: 1.0-da fd: 0.0 */ DSPD_SRC_OUT = 7, /* fs: 1.0-da fd: 0.0 */
DSPD_DST_OUT = 8, /* fs: 0.0 fd: 1.0-sa */ DSPD_DST_OUT = 8, /* fs: 0.0 fd: 1.0-sa */
DSPD_SRC_ATOP = 9, /* fs: da fd: 1.0-sa */ DSPD_SRC_ATOP = 9, /* fs: da fd: 1.0-sa */
skipping to change at line 3678 skipping to change at line 3735
/* /*
* Get the current pixel format. * Get the current pixel format.
*/ */
DFBResult (*GetPixelFormat) ( DFBResult (*GetPixelFormat) (
IDirectFBSurface *thiz, IDirectFBSurface *thiz,
DFBSurfacePixelFormat *ret_format DFBSurfacePixelFormat *ret_format
); );
/* /*
* Get the current color space.
*/
DFBResult (*GetColorSpace) (
IDirectFBSurface *thiz,
DFBSurfaceColorSpace *ret_colorspace
);
/*
* Get a mask of drawing functions that are hardware * Get a mask of drawing functions that are hardware
* accelerated with the current settings. * accelerated with the current settings.
* *
* If a source surface is specified the mask will also * If a source surface is specified the mask will also
* contain accelerated blitting functions. Note that there * contain accelerated blitting functions. Note that there
* is no guarantee that these will actually be accelerated * is no guarantee that these will actually be accelerated
* since the surface storage (video/system) is examined only * since the surface storage (video/system) is examined only
* when something actually gets drawn or blitted. * when something actually gets drawn or blitted.
*/ */
DFBResult (*GetAccelerationMask) ( DFBResult (*GetAccelerationMask) (
skipping to change at line 4604 skipping to change at line 4669
/* /*
* Set the source convolution filter. * Set the source convolution filter.
* *
* Enable usage of this filter by setting DSBLIT_SRC_CONVOLUTION via I DirectFBSurface::SetBlittingFlags(). * Enable usage of this filter by setting DSBLIT_SRC_CONVOLUTION via I DirectFBSurface::SetBlittingFlags().
*/ */
DFBResult (*SetSrcConvolution) ( DFBResult (*SetSrcConvolution) (
IDirectFBSurface *thiz, IDirectFBSurface *thiz,
const DFBConvolutionFilter *filter const DFBConvolutionFilter *filter
); );
/** Retrieving information **/
/*
* Get the unique surface ID.
*/
DFBResult (*GetID) (
IDirectFBSurface *thiz,
DFBSurfaceID *ret_surface_id
);
/** Process security **/
/*
* Allow access.
*/
DFBResult (*AllowAccess) (
IDirectFBSurface *thiz,
const char *executable
);
/** Event buffers **/
/*
* Create an event buffer for this surface and attach it.
*/
DFBResult (*CreateEventBuffer) (
IDirectFBSurface *thiz,
IDirectFBEventBuffer **ret_buffer
);
/*
* Attach an existing event buffer to this surface.
*
* NOTE: Attaching multiple times generates multiple events.
*/
DFBResult (*AttachEventBuffer) (
IDirectFBSurface *thiz,
IDirectFBEventBuffer *buffer
);
/*
* Detach an event buffer from this surface.
*/
DFBResult (*DetachEventBuffer) (
IDirectFBSurface *thiz,
IDirectFBEventBuffer *buffer
);
/** Blitting functions **/
/*
* Blit a bunch of areas scaled from the source to the destination
* rectangles.
*
* <b>source_rects</b> and <b>dest_rects</b> will be modified!
*/
DFBResult (*BatchStretchBlit) (
IDirectFBSurface *thiz,
IDirectFBSurface *source,
const DFBRectangle *source_rects,
const DFBRectangle *dest_rects,
int num
);
/** Client **/
/*
* Put in client mode for frame synchronization.
*/
DFBResult (*MakeClient) (
IDirectFBSurface *thiz
);
/*
* Put in client mode for frame synchronization.
*/
DFBResult (*FrameAck) (
IDirectFBSurface *thiz,
u32 flip_count
);
) )
/******************** /********************
* IDirectFBPalette * * IDirectFBPalette *
********************/ ********************/
/* /*
* <i>No summary yet...</i> * <i>No summary yet...</i>
*/ */
D_DEFINE_INTERFACE( IDirectFBPalette, D_DEFINE_INTERFACE( IDirectFBPalette,
skipping to change at line 4766 skipping to change at line 4911
typedef enum { typedef enum {
DIMM_SHIFT = (1 << DIMKI_SHIFT), /* Shift key is pressed */ DIMM_SHIFT = (1 << DIMKI_SHIFT), /* Shift key is pressed */
DIMM_CONTROL = (1 << DIMKI_CONTROL), /* Control key is pressed */ DIMM_CONTROL = (1 << DIMKI_CONTROL), /* Control key is pressed */
DIMM_ALT = (1 << DIMKI_ALT), /* Alt key is pressed */ DIMM_ALT = (1 << DIMKI_ALT), /* Alt key is pressed */
DIMM_ALTGR = (1 << DIMKI_ALTGR), /* AltGr key is pressed */ DIMM_ALTGR = (1 << DIMKI_ALTGR), /* AltGr key is pressed */
DIMM_META = (1 << DIMKI_META), /* Meta key is pressed */ DIMM_META = (1 << DIMKI_META), /* Meta key is pressed */
DIMM_SUPER = (1 << DIMKI_SUPER), /* Super key is pressed */ DIMM_SUPER = (1 << DIMKI_SUPER), /* Super key is pressed */
DIMM_HYPER = (1 << DIMKI_HYPER) /* Hyper key is pressed */ DIMM_HYPER = (1 << DIMKI_HYPER) /* Hyper key is pressed */
} DFBInputDeviceModifierMask; } DFBInputDeviceModifierMask;
/*
* Input device configuration flags
*/
typedef enum {
DIDCONF_NONE = 0x00000000,
DIDCONF_SENSITIVITY = 0x00000001,
DIDCONF_ALL = 0x00000001
} DFBInputDeviceConfigFlags;
/*
* Input device configuration
*/
typedef struct {
DFBInputDeviceConfigFlags flags;
int sensitivity; /* Sensitivity value for
X/Y axes (8.8 fixed point), default 0x100 */
} DFBInputDeviceConfig;
/************************ /************************
* IDirectFBInputDevice * * IDirectFBInputDevice *
************************/ ************************/
/* /*
* <i>No summary yet...</i> * <i>No summary yet...</i>
*/ */
D_DEFINE_INTERFACE( IDirectFBInputDevice, D_DEFINE_INTERFACE( IDirectFBInputDevice,
/** Retrieving information **/ /** Retrieving information **/
skipping to change at line 4924 skipping to change at line 5089
/* /*
* Utility function combining two calls to GetAxis(). * Utility function combining two calls to GetAxis().
* *
* You may leave one of the x/y arguments NULL. * You may leave one of the x/y arguments NULL.
*/ */
DFBResult (*GetXY) ( DFBResult (*GetXY) (
IDirectFBInputDevice *thiz, IDirectFBInputDevice *thiz,
int *ret_x, int *ret_x,
int *ret_y int *ret_y
); );
/** Configuration **/
/*
* Change config values for the input device.
*/
DFBResult (*SetConfiguration) (
IDirectFBInputDevice *thiz,
const DFBInputDeviceConfig *config
);
) )
/* /*
* 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 variable size */ DFEC_UNIVERSAL = 0x04, /* universal event for custom usage with variable size */
DFEC_VIDEOPROVIDER = 0x05 /* video provider event */ DFEC_VIDEOPROVIDER = 0x05, /* video provider event */
DFEC_SURFACE = 0x06, /* surface 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 5118 skipping to change at line 5294
DVPET_DATAEXHAUSTED = 0x00000200, /* There is no more data available for consumption */ DVPET_DATAEXHAUSTED = 0x00000200, /* There is no more data available for consumption */
DVPET_VIDEOACTION = 0x00000400, /* An action is required on the vi deo provider */ 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_DATALOW = 0x00000800, /* The stream buffer is running lo w in data (threshold defined by implementation). */
DVPET_DATAHIGH = 0x00001000, /* The stream buffer is high. */ DVPET_DATAHIGH = 0x00001000, /* The stream buffer is high. */
DVPET_BUFFERTIMELOW = 0x00002000, /* The stream buffer has less than requested playout time buffered. */ 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_BUFFERTIMEHIGH = 0x00004000, /* The stream buffer has more than requested playout time buffered. */
DVPET_ALL = 0x00007FFF /* All event types */ DVPET_ALL = 0x00007FFF /* All event types */
} DFBVideoProviderEventType; } DFBVideoProviderEventType;
/* /*
* Surface Event Types - can also be used as flags for event filters.
*/
typedef enum {
DSEVT_NONE = 0x00000000,
DSEVT_DESTROYED = 0x00000001, /* surface got destroyed by global
deinitialization function or the application itself */
DSEVT_UPDATE = 0x00000002, /* */
DSEVT_ALL = 0x00000003 /* All event types */
} DFBSurfaceEventType;
/*
* 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 */
/* used by DWET_KEYDOWN, DWET_KEYUP */ /* used by DWET_KEYDOWN, DWET_KEYUP */
DFBWindowEventFlags flags; /* event flags */ DFBWindowEventFlags flags; /* event flags */
skipping to change at line 5200 skipping to change at line 5386
DFBEventClass clazz; /* clazz of event */ DFBEventClass clazz; /* clazz of event */
DFBVideoProviderEventType type; /* type of event */ DFBVideoProviderEventType type; /* type of event */
DFBVideoProviderEventDataSubType data_type; /* data type that this ev ent is applicable for. */ 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 int data[4]; /* custom data - large en ough for 4 ints so that in most cases
memory allocation will not be needed */ memory allocation will not be needed */
} DFBVideoProviderEvent; } DFBVideoProviderEvent;
/* /*
* Event from surface
*/
typedef struct {
DFBEventClass clazz; /* clazz of event */
DFBSurfaceEventType type; /* type of event */
DFBSurfaceID surface_id; /* source of event */
DFBRegion update;
DFBRegion update_right;
unsigned int flip_count; /* Serial number of frame
, modulo number of buffers = buffer index */
} DFBSurfaceEvent;
/*
* 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 5230 skipping to change at line 5431
/* /*
* 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 even ts */ DFBInputEvent input; /* field for input even ts */
DFBWindowEvent window; /* field for window eve nts */ DFBWindowEvent window; /* field for window eve nts */
DFBUserEvent user; /* field for user-defin ed events */ DFBUserEvent user; /* field for user-defin ed events */
DFBUniversalEvent universal; /* field for universal events */ DFBUniversalEvent universal; /* field for universal events */
DFBVideoProviderEvent videoprovider; /* field for video prov ider */ DFBVideoProviderEvent videoprovider; /* field for video prov ider */
DFBSurfaceEvent surface; /* field for surface ev ents */
} 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. */
skipping to change at line 6089 skipping to change at line 6291
); );
/* /*
* Set cursor position within window coordinates (surface or cursor re solution). * Set cursor position within window coordinates (surface or cursor re solution).
*/ */
DFBResult (*SetCursorPosition) ( DFBResult (*SetCursorPosition) (
IDirectFBWindow *thiz, IDirectFBWindow *thiz,
int x, int x,
int y int y
); );
/** Geometry **/
/*
* Set area of surface to be shown in window.
* Set destination location of window within its bounds.
*
* Default and maximum is to show whole surface.
*/
DFBResult (*SetGeometry) (
IDirectFBWindow *thiz,
const DFBWindowGeometry *src,
const DFBWindowGeometry *dst
);
) )
/* /*
* 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 6357 skipping to change at line 6573
); );
/* /*
* Get the position and thickness of the underline. * Get the position and thickness of the underline.
*/ */
DFBResult (*GetUnderline) ( DFBResult (*GetUnderline) (
IDirectFBFont *thiz, IDirectFBFont *thiz,
int *ret_underline_position, int *ret_underline_position,
int *ret_underline_thichness int *ret_underline_thichness
); );
/** Retrieving information **/
/*
* Get the description of the font.
*/
DFBResult (*GetDescription) (
IDirectFBFont *thiz,
DFBFontDescription *ret_description
);
) )
/* /*
* Capabilities of an image. * Capabilities of an image.
*/ */
typedef enum { typedef enum {
DICAPS_NONE = 0x00000000, /* None of these. */ DICAPS_NONE = 0x00000000, /* None of these. */
DICAPS_ALPHACHANNEL = 0x00000001, /* The image data contains an DICAPS_ALPHACHANNEL = 0x00000001, /* The image data contains an
alphachannel. */ alphachannel. */
DICAPS_COLORKEY = 0x00000002 /* The image has a colorkey, DICAPS_COLORKEY = 0x00000002 /* The image has a colorkey,
skipping to change at line 6461 skipping to change at line 6687
* Registers a callback for progressive image loading. * Registers a callback for progressive image loading.
* *
* The function is called each time a chunk of the image is decoded. * The function is called each time a chunk of the image is decoded.
*/ */
DFBResult (*SetRenderCallback) ( DFBResult (*SetRenderCallback) (
IDirectFBImageProvider *thiz, IDirectFBImageProvider *thiz,
DIRenderCallback callback, DIRenderCallback callback,
void *callback_data void *callback_data
); );
/*
* Sets hint for preferred image decoding method
*
* This is optional and might be unsupported by some image providers
*/
DFBResult (*SetRenderFlags) (
IDirectFBImageProvider *thiz,
DIRenderFlags flags
);
/** Encoding **/ /** Encoding **/
/* /*
* Encode a portion of a surface. * Encode a portion of a surface.
*/ */
DFBResult (*WriteBack) ( DFBResult (*WriteBack) (
IDirectFBImageProvider *thiz, IDirectFBImageProvider *thiz,
IDirectFBSurface *surface, IDirectFBSurface *surface,
const DFBRectangle *src_rect, const DFBRectangle *src_rect,
const char *filename const char *filename
 End of changes. 35 change blocks. 
72 lines changed or deleted 318 lines changed or added


 directfb_build.h   directfb_build.h 
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_BUILD_H__ #ifndef __DIRECTFB_BUILD_H__
#define __DIRECTFB_BUILD_H__ #define __DIRECTFB_BUILD_H__
#define DIRECTFB_BUILD_ONE (0)
#define DIRECTFB_BUILD_VOODOO (0) #define DIRECTFB_BUILD_VOODOO (0)
#define DIRECTFB_BUILD_PURE_VOODOO (0) #define DIRECTFB_BUILD_PURE_VOODOO (0)
#endif /* __DIRECTFB_BUILD_H__ */ #endif /* __DIRECTFB_BUILD_H__ */
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 directfb_keyboard.h   directfb_keyboard.h 
skipping to change at line 456 skipping to change at line 456
DIKS_BREAK = DFB_KEY( SPECIAL, 0x61 ), DIKS_BREAK = DFB_KEY( SPECIAL, 0x61 ),
DIKS_EXIT = DFB_KEY( SPECIAL, 0x62 ), DIKS_EXIT = DFB_KEY( SPECIAL, 0x62 ),
DIKS_SETUP = DFB_KEY( SPECIAL, 0x63 ), DIKS_SETUP = DFB_KEY( SPECIAL, 0x63 ),
DIKS_CURSOR_LEFT_UP = DFB_KEY( SPECIAL, 0x64 ), DIKS_CURSOR_LEFT_UP = DFB_KEY( SPECIAL, 0x64 ),
DIKS_CURSOR_LEFT_DOWN = DFB_KEY( SPECIAL, 0x65 ), DIKS_CURSOR_LEFT_DOWN = DFB_KEY( SPECIAL, 0x65 ),
DIKS_CURSOR_UP_RIGHT = DFB_KEY( SPECIAL, 0x66 ), DIKS_CURSOR_UP_RIGHT = DFB_KEY( SPECIAL, 0x66 ),
DIKS_CURSOR_DOWN_RIGHT = DFB_KEY( SPECIAL, 0x67 ), DIKS_CURSOR_DOWN_RIGHT = DFB_KEY( SPECIAL, 0x67 ),
DIKS_PIP = DFB_KEY( SPECIAL, 0x68 ),
DIKS_SWAP = DFB_KEY( SPECIAL, 0x69 ),
DIKS_FREEZE = DFB_KEY( SPECIAL, 0x6A ),
DIKS_MOVE = DFB_KEY( SPECIAL, 0x6B ),
/* /*
* Unicode private area - DirectFB Function keys * Unicode private area - DirectFB Function keys
* *
* More function keys are available via DFB_FUNCTION_KEY(n). * More function keys are available via DFB_FUNCTION_KEY(n).
*/ */
DIKS_F1 = DFB_FUNCTION_KEY( 1 ), DIKS_F1 = DFB_FUNCTION_KEY( 1 ),
DIKS_F2 = DFB_FUNCTION_KEY( 2 ), DIKS_F2 = DFB_FUNCTION_KEY( 2 ),
DIKS_F3 = DFB_FUNCTION_KEY( 3 ), DIKS_F3 = DFB_FUNCTION_KEY( 3 ),
DIKS_F4 = DFB_FUNCTION_KEY( 4 ), DIKS_F4 = DFB_FUNCTION_KEY( 4 ),
DIKS_F5 = DFB_FUNCTION_KEY( 5 ), DIKS_F5 = DFB_FUNCTION_KEY( 5 ),
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added


 directfb_keynames.h   directfb_keynames.h 
skipping to change at line 215 skipping to change at line 215
{ DIKS_DIGITS, "DIGITS" }, \ { DIKS_DIGITS, "DIGITS" }, \
{ DIKS_TEEN, "TEEN" }, \ { DIKS_TEEN, "TEEN" }, \
{ DIKS_TWEN, "TWEN" }, \ { DIKS_TWEN, "TWEN" }, \
{ DIKS_BREAK, "BREAK" }, \ { DIKS_BREAK, "BREAK" }, \
{ DIKS_EXIT, "EXIT" }, \ { DIKS_EXIT, "EXIT" }, \
{ DIKS_SETUP, "SETUP" }, \ { DIKS_SETUP, "SETUP" }, \
{ DIKS_CURSOR_LEFT_UP, "CURSOR_LEFT_UP" }, \ { DIKS_CURSOR_LEFT_UP, "CURSOR_LEFT_UP" }, \
{ DIKS_CURSOR_LEFT_DOWN, "CURSOR_LEFT_DOWN" }, \ { DIKS_CURSOR_LEFT_DOWN, "CURSOR_LEFT_DOWN" }, \
{ DIKS_CURSOR_UP_RIGHT, "CURSOR_UP_RIGHT" }, \ { DIKS_CURSOR_UP_RIGHT, "CURSOR_UP_RIGHT" }, \
{ DIKS_CURSOR_DOWN_RIGHT, "CURSOR_DOWN_RIGHT" }, \ { DIKS_CURSOR_DOWN_RIGHT, "CURSOR_DOWN_RIGHT" }, \
{ DIKS_PIP, "PIP" }, \
{ DIKS_SWAP, "SWAP" }, \
{ DIKS_FREEZE, "FREEZE" }, \
{ DIKS_MOVE, "MOVE" }, \
{ DIKS_F1, "F1" }, \ { DIKS_F1, "F1" }, \
{ DIKS_F2, "F2" }, \ { DIKS_F2, "F2" }, \
{ DIKS_F3, "F3" }, \ { DIKS_F3, "F3" }, \
{ DIKS_F4, "F4" }, \ { DIKS_F4, "F4" }, \
{ DIKS_F5, "F5" }, \ { DIKS_F5, "F5" }, \
{ DIKS_F6, "F6" }, \ { DIKS_F6, "F6" }, \
{ DIKS_F7, "F7" }, \ { DIKS_F7, "F7" }, \
{ DIKS_F8, "F8" }, \ { DIKS_F8, "F8" }, \
{ DIKS_F9, "F9" }, \ { DIKS_F9, "F9" }, \
{ DIKS_F10, "F10" }, \ { DIKS_F10, "F10" }, \
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added


 directfb_strings.h   directfb_strings.h 
skipping to change at line 51 skipping to change at line 51
{ DSPF_BGR555, "BGR555" }, \ { DSPF_BGR555, "BGR555" }, \
{ DSPF_RGBA5551, "RGBA5551" }, \ { DSPF_RGBA5551, "RGBA5551" }, \
{ DSPF_YUV444P, "YUV444P" }, \ { DSPF_YUV444P, "YUV444P" }, \
{ DSPF_ARGB8565, "ARGB8565" }, \ { DSPF_ARGB8565, "ARGB8565" }, \
{ DSPF_AVYU, "AVYU" }, \ { DSPF_AVYU, "AVYU" }, \
{ DSPF_VYU, "VYU" }, \ { DSPF_VYU, "VYU" }, \
{ DSPF_A1_LSB, "A1_LSB" }, \ { DSPF_A1_LSB, "A1_LSB" }, \
{ DSPF_YV16, "YV16" }, \ { DSPF_YV16, "YV16" }, \
{ DSPF_ABGR, "ABGR" }, \ { DSPF_ABGR, "ABGR" }, \
{ DSPF_RGBAF88871, "RGBAF88871" }, \ { DSPF_RGBAF88871, "RGBAF88871" }, \
{ DSPF_LUT4, "LUT4" }, \
{ DSPF_ALUT8, "ALUT8" }, \
{ DSPF_UNKNOWN, "UNKNOWN" } \ { DSPF_UNKNOWN, "UNKNOWN" } \
}; };
struct DFBColorSpaceName { struct DFBColorSpaceName {
DFBSurfaceColorSpace colorspace; DFBSurfaceColorSpace colorspace;
const char *name; const char *name;
}; };
#define DirectFBColorSpaceNames(Identifier) struct DFBColorSpaceName Identi fier[] = { \ #define DirectFBColorSpaceNames(Identifier) struct DFBColorSpaceName Identi fier[] = { \
{ DSCS_RGB, "RGB" }, \ { DSCS_RGB, "RGB" }, \
skipping to change at line 258 skipping to change at line 260
{ DWOP_ALPHACHANNEL, "ALPHACHANNEL" }, \ { DWOP_ALPHACHANNEL, "ALPHACHANNEL" }, \
{ DWOP_OPAQUE_REGION, "OPAQUE_REGION" }, \ { DWOP_OPAQUE_REGION, "OPAQUE_REGION" }, \
{ DWOP_SHAPED, "SHAPED" }, \ { DWOP_SHAPED, "SHAPED" }, \
{ DWOP_ALPHACHANNEL, "ALPHACHANNEL" }, \ { DWOP_ALPHACHANNEL, "ALPHACHANNEL" }, \
{ DWOP_KEEP_POSITION, "KEEP_POSITION" }, \ { DWOP_KEEP_POSITION, "KEEP_POSITION" }, \
{ DWOP_KEEP_SIZE, "KEEP_SIZE" }, \ { DWOP_KEEP_SIZE, "KEEP_SIZE" }, \
{ DWOP_KEEP_STACKING, "KEEP_STACKING" }, \ { DWOP_KEEP_STACKING, "KEEP_STACKING" }, \
{ DWOP_GHOST, "GHOST" }, \ { DWOP_GHOST, "GHOST" }, \
{ DWOP_INDESTRUCTIBLE, "INDESTRUCTIBLE" }, \ { DWOP_INDESTRUCTIBLE, "INDESTRUCTIBLE" }, \
{ DWOP_INPUTONLY, "INPUTONLY" }, \ { DWOP_INPUTONLY, "INPUTONLY" }, \
{ DWOP_STEREO_SIDE_BY_SIDE_HALF, "STEREO_SIDE_BY_SIDE_HALF" }, \
{ DWOP_SCALE, "SCALE" }, \ { DWOP_SCALE, "SCALE" }, \
{ DWOP_KEEP_ABOVE, "KEEP_ABOVE" }, \ { DWOP_KEEP_ABOVE, "KEEP_ABOVE" }, \
{ DWOP_KEEP_UNDER, "KEEP_UNDER" }, \ { DWOP_KEEP_UNDER, "KEEP_UNDER" }, \
{ DWOP_FOLLOW_BOUNDS, "FOLLOW_BOUNDS" }, \ { DWOP_FOLLOW_BOUNDS, "FOLLOW_BOUNDS" }, \
{ DWOP_NONE, "NONE" } \ { DWOP_NONE, "NONE" } \
}; };
struct DFBScreenCapabilitiesName { struct DFBScreenCapabilitiesName {
DFBScreenCapabilities capability; DFBScreenCapabilities capability;
const char *name; const char *name;
skipping to change at line 299 skipping to change at line 302
{ DSECAPS_SCANMODE, "SCANMODE" }, \ { DSECAPS_SCANMODE, "SCANMODE" }, \
{ DSECAPS_FREQUENCY, "FREQUENCY" }, \ { 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_RESOLUTION, "RESOLUTION" }, \
{ DSECAPS_FRAMING, "FRAMING" }, \ { DSECAPS_FRAMING, "FRAMING" }, \
{ DSECAPS_ASPECT_RATIO, "ASPECT_RATIO" }, \
{ DSECAPS_NONE, "NONE" } \ { DSECAPS_NONE, "NONE" } \
}; };
struct DFBScreenEncoderTypeName { struct DFBScreenEncoderTypeName {
DFBScreenEncoderType type; DFBScreenEncoderType type;
const char *name; const char *name;
}; };
#define DirectFBScreenEncoderTypeNames(Identifier) struct DFBScreenEncoderT ypeName Identifier[] = { \ #define DirectFBScreenEncoderTypeNames(Identifier) struct DFBScreenEncoderT ypeName Identifier[] = { \
{ DSET_CRTC, "CRTC" }, \ { DSET_CRTC, "CRTC" }, \
skipping to change at line 415 skipping to change at line 419
{ DSOR_800_600, "800_600" }, \ { DSOR_800_600, "800_600" }, \
{ DSOR_1024_768, "1024_768" }, \ { DSOR_1024_768, "1024_768" }, \
{ DSOR_1152_864, "1152_864" }, \ { DSOR_1152_864, "1152_864" }, \
{ DSOR_1280_720, "1280_720" }, \ { DSOR_1280_720, "1280_720" }, \
{ DSOR_1280_768, "1280_768" }, \ { DSOR_1280_768, "1280_768" }, \
{ DSOR_1280_960, "1280_960" }, \ { DSOR_1280_960, "1280_960" }, \
{ DSOR_1280_1024, "1280_1024" }, \ { DSOR_1280_1024, "1280_1024" }, \
{ DSOR_1400_1050, "1400_1050" }, \ { DSOR_1400_1050, "1400_1050" }, \
{ DSOR_1600_1200, "1600_1200" }, \ { DSOR_1600_1200, "1600_1200" }, \
{ DSOR_1920_1080, "1920_1080" }, \ { DSOR_1920_1080, "1920_1080" }, \
{ DSOR_960_540, "960_540" }, \
{ DSOR_1440_540, "1440_540" }, \
{ DSOR_UNKNOWN, "UNKNOWN" } \ { DSOR_UNKNOWN, "UNKNOWN" } \
}; };
struct DFBScreenMixerCapabilitiesName { struct DFBScreenMixerCapabilitiesName {
DFBScreenMixerCapabilities capability; DFBScreenMixerCapabilities capability;
const char *name; const char *name;
}; };
#define DirectFBScreenMixerCapabilitiesNames(Identifier) struct DFBScreenMi xerCapabilitiesName Identifier[] = { \ #define DirectFBScreenMixerCapabilitiesNames(Identifier) struct DFBScreenMi xerCapabilitiesName Identifier[] = { \
{ DSMCAPS_FULL, "FULL" }, \ { DSMCAPS_FULL, "FULL" }, \
skipping to change at line 492 skipping to change at line 498
{ DSECONF_MIXER, "MIXER" }, \ { DSECONF_MIXER, "MIXER" }, \
{ DSECONF_OUT_SIGNALS, "OUT_SIGNALS" }, \ { DSECONF_OUT_SIGNALS, "OUT_SIGNALS" }, \
{ DSECONF_SCANMODE, "SCANMODE" }, \ { DSECONF_SCANMODE, "SCANMODE" }, \
{ DSECONF_TEST_COLOR, "TEST_COLOR" }, \ { DSECONF_TEST_COLOR, "TEST_COLOR" }, \
{ DSECONF_ADJUSTMENT, "ADJUSTMENT" }, \ { DSECONF_ADJUSTMENT, "ADJUSTMENT" }, \
{ DSECONF_FREQUENCY, "FREQUENCY" }, \ { DSECONF_FREQUENCY, "FREQUENCY" }, \
{ DSECONF_CONNECTORS, "CONNECTORS" }, \ { DSECONF_CONNECTORS, "CONNECTORS" }, \
{ DSECONF_SLOW_BLANKING, "SLOW_BLANKING" }, \ { DSECONF_SLOW_BLANKING, "SLOW_BLANKING" }, \
{ DSECONF_RESOLUTION, "RESOLUTION" }, \ { DSECONF_RESOLUTION, "RESOLUTION" }, \
{ DSECONF_FRAMING, "FRAMING" }, \ { DSECONF_FRAMING, "FRAMING" }, \
{ DSECONF_ASPECT_RATIO, "ASPECT_RATIO" }, \
{ DSECONF_UNKNOWN, "UNKNOWN" } \ { DSECONF_UNKNOWN, "UNKNOWN" } \
}; };
struct DFBScreenEncoderFrequencyName { struct DFBScreenEncoderFrequencyName {
DFBScreenEncoderFrequency frequency; DFBScreenEncoderFrequency frequency;
const char *name; const char *name;
}; };
#define DirectFBScreenEncoderFrequencyNames(Identifier) struct DFBScreenEnc oderFrequencyName Identifier[] = { \ #define DirectFBScreenEncoderFrequencyNames(Identifier) struct DFBScreenEnc oderFrequencyName Identifier[] = { \
{ DSEF_25HZ, "25HZ" }, \ { DSEF_25HZ, "25HZ" }, \
skipping to change at line 513 skipping to change at line 520
{ DSEF_50HZ, "50HZ" }, \ { DSEF_50HZ, "50HZ" }, \
{ DSEF_59_94HZ, "59_94HZ" }, \ { DSEF_59_94HZ, "59_94HZ" }, \
{ DSEF_60HZ, "60HZ" }, \ { DSEF_60HZ, "60HZ" }, \
{ DSEF_75HZ, "75HZ" }, \ { DSEF_75HZ, "75HZ" }, \
{ DSEF_30HZ, "30HZ" }, \ { DSEF_30HZ, "30HZ" }, \
{ DSEF_24HZ, "24HZ" }, \ { DSEF_24HZ, "24HZ" }, \
{ DSEF_23_976HZ, "23_976HZ" }, \ { DSEF_23_976HZ, "23_976HZ" }, \
{ DSEF_UNKNOWN, "UNKNOWN" } \ { DSEF_UNKNOWN, "UNKNOWN" } \
}; };
struct DFBScreenEncoderPictureFramingName {
DFBScreenEncoderPictureFraming framing;
const char *name;
};
#define DirectFBScreenEncoderPictureFramingNames(Identifier) struct DFBScre
enEncoderPictureFramingName Identifier[] = { \
{ DSEPF_MONO, "MONO" }, \
{ DSEPF_STEREO_SIDE_BY_SIDE_HALF, "STEREO_SIDE_BY_SIDE_HALF" }, \
{ DSEPF_STEREO_TOP_AND_BOTTOM, "STEREO_TOP_AND_BOTTOM" }, \
{ DSEPF_STEREO_FRAME_PACKING, "STEREO_FRAME_PACKING" }, \
{ DSEPF_STEREO_SIDE_BY_SIDE_FULL, "STEREO_SIDE_BY_SIDE_FULL" }, \
{ DSEPF_UNKNOWN, "UNKNOWN" } \
};
struct DFBAccelerationMaskName { struct DFBAccelerationMaskName {
DFBAccelerationMask mask; DFBAccelerationMask mask;
const char *name; const char *name;
}; };
#define DirectFBAccelerationMaskNames(Identifier) struct DFBAccelerationMas kName Identifier[] = { \ #define DirectFBAccelerationMaskNames(Identifier) struct DFBAccelerationMas kName Identifier[] = { \
{ DFXL_FILLRECTANGLE, "FILLRECTANGLE" }, \ { DFXL_FILLRECTANGLE, "FILLRECTANGLE" }, \
{ DFXL_DRAWRECTANGLE, "DRAWRECTANGLE" }, \ { DFXL_DRAWRECTANGLE, "DRAWRECTANGLE" }, \
{ DFXL_DRAWLINE, "DRAWLINE" }, \ { DFXL_DRAWLINE, "DRAWLINE" }, \
{ DFXL_FILLTRIANGLE, "FILLTRIANGLE" }, \ { DFXL_FILLTRIANGLE, "FILLTRIANGLE" }, \
 End of changes. 6 change blocks. 
0 lines changed or deleted 22 lines changed or added


 directfb_util.h   directfb_util.h 
skipping to change at line 1255 skipping to change at line 1255
} }
static __inline__ void static __inline__ void
dfb_box_region_union( DFBBox *box, dfb_box_region_union( DFBBox *box,
const DFBRegion *region ) const DFBRegion *region )
{ {
DFB_BOX_ASSERT( box ); DFB_BOX_ASSERT( box );
DFB_REGION_ASSERT( region ); DFB_REGION_ASSERT( region );
if (DFB_BOX_EMPTY( box )) { if (DFB_BOX_EMPTY( box )) {
*box = DFB_BOX_INIT_FROM_REGION( region ); box->x1 = region->x1;
box->y1 = region->y1;
box->x2 = region->x2 + 1;
box->y2 = region->y2 + 1;
} }
else { else {
if (box->x1 > region->x1) if (box->x1 > region->x1)
box->x1 = region->x1; box->x1 = region->x1;
if (box->y1 > region->y1) if (box->y1 > region->y1)
box->y1 = region->y1; box->y1 = region->y1;
if (box->x2 < region->x2 + 1) if (box->x2 < region->x2 + 1)
box->x2 = region->x2 + 1; box->x2 = region->x2 + 1;
 End of changes. 1 change blocks. 
1 lines changed or deleted 4 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 (5) #define DIRECTFB_MINOR_VERSION (6)
#define DIRECTFB_MICRO_VERSION (3) #define DIRECTFB_MICRO_VERSION (1)
#define DIRECTFB_BINARY_AGE (3) #define DIRECTFB_BINARY_AGE (1)
#define DIRECTFB_INTERFACE_AGE (3) #define DIRECTFB_INTERFACE_AGE (1)
#endif /* __DIRECTFB_VERSION_H__ */ #endif /* __DIRECTFB_VERSION_H__ */
 End of changes. 1 change blocks. 
4 lines changed or deleted 4 lines changed or added


 directfb_windows.h   directfb_windows.h 
skipping to change at line 92 skipping to change at line 92
int opacity; /* global alpha factor */ int opacity; /* global alpha factor */
DFBWindowStackingClass stacking; /* level bounda ries */ DFBWindowStackingClass stacking; /* level bounda ries */
DFBWindowOptions options; /* flags for ap pearance/behaviour */ DFBWindowOptions options; /* flags for ap pearance/behaviour */
DFBWindowEventType events; /* mask of enab led events */ DFBWindowEventType events; /* mask of enab led events */
DFBWindowID association; /* ID of window which this is associated to */ DFBWindowID association; /* ID of window which this is associated to */
u32 color_key; /* transparent pixel */ u32 color_key; /* transparent pixel */
DFBRegion opaque; /* region of th e window forced to be opaque */ DFBRegion opaque; /* region of th e window forced to be opaque */
DFBColor color; /* constant col or (no surface needed) */ DFBColor color; /* constant col or (no surface needed) */
int stereo_depth;
// DFBWindowKeySelection key_selection; /* how to fil ter keys in focus */ // DFBWindowKeySelection key_selection; /* how to fil ter keys in focus */
// DFBInputDeviceKeySymbol *keys; /* list of ke ys for DWKS_LIST */ // DFBInputDeviceKeySymbol *keys; /* list of ke ys for DWKS_LIST */
// unsigned int num_keys; /* number of entries in key array */ // unsigned int num_keys; /* number of entries in key array */
DFBWindowCursorFlags cursor_flags; DFBWindowCursorFlags cursor_flags;
DFBDimension cursor_resolution; DFBDimension cursor_resolution;
DFBWindowGeometry src_geometry; /* advanced sou rce geometry */ DFBWindowGeometry src_geometry; /* advanced sou rce geometry */
DFBWindowGeometry dst_geometry; /* advanced des tination geometry */ DFBWindowGeometry dst_geometry; /* advanced des tination geometry */
int rotation; int rotation;
u64 application_id; u64 application_id;
int stereo_depth;
} DFBWindowConfig; } DFBWindowConfig;
typedef enum { typedef enum {
DWSTATE_NONE = 0x00000000, DWSTATE_NONE = 0x00000000,
DWSTATE_INSERTED = 0x00000001, DWSTATE_INSERTED = 0x00000001,
DWSTATE_FOCUSED = 0x00000002, /* only used fo r GetWindowInfo */ DWSTATE_FOCUSED = 0x00000002, /* only used fo r GetWindowInfo */
DWSTATE_ENTERED = 0x00000004, /* only used fo r GetWindowInfo */ DWSTATE_ENTERED = 0x00000004, /* only used fo r GetWindowInfo */
skipping to change at line 135 skipping to change at line 135
typedef struct { typedef struct {
DFBWindowID window_id; DFBWindowID window_id;
DFBWindowCapabilities caps; DFBWindowCapabilities caps;
u64 resource_id; u64 resource_id;
DFBWindowConfig config; DFBWindowConfig config;
DFBWindowState state; DFBWindowState state;
u32 process_id; /* Fusion ID or
even pid, or something else
identifying
a process. */
u32 instance_id; /* ID of the in
stance of an application. Each process
can host a n
umber of applications/instances. */
} DFBWindowInfo; } DFBWindowInfo;
typedef enum { typedef enum {
DWREL_TOP, DWREL_TOP,
DWREL_BOTTOM DWREL_BOTTOM
} DFBWindowRelation; } DFBWindowRelation;
/* /*
* Windows watcher interface * Windows watcher interface
*/ */
skipping to change at line 230 skipping to change at line 235
/* /*
* Registers a new windows watcher. * Registers a new windows watcher.
* *
* For any window already existing, the WindowAdded callback will be c alled immediately. * For any window already existing, the WindowAdded callback will be c alled immediately.
*/ */
DFBResult (*RegisterWatcher) ( DFBResult (*RegisterWatcher) (
IDirectFBWindows *thiz, IDirectFBWindows *thiz,
const DFBWindowsWatcher *watcher, const DFBWindowsWatcher *watcher,
void *context void *context
); );
/*
* Unregisters a windows watcher.
*/
DFBResult (*UnregisterWatcher) (
IDirectFBWindows *thiz,
void *context
);
) )
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 4 change blocks. 
1 lines changed or deleted 18 lines changed or added


 directfbgl.h   directfbgl.h 
skipping to change at line 108 skipping to change at line 108
); );
/* /*
* Get the address of an OpenGL function. * Get the address of an OpenGL function.
*/ */
DFBResult (*GetProcAddress) ( DFBResult (*GetProcAddress) (
IDirectFBGL *thiz, IDirectFBGL *thiz,
const char *name, const char *name,
void **ret_address void **ret_address
); );
/*
* Set a surface to be used by the current texture object.
*/
DFBResult (*TextureSurface) (
IDirectFBGL *thiz,
int target,
int level,
IDirectFBSurface *surface
);
) )
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 10 lines changed or added


 fonts.h   fonts.h 
skipping to change at line 106 skipping to change at line 106
int width; /* width of the glyphs bitmap */ int width; /* width of the glyphs bitmap */
int height; /* height of the glyphs bitmap */ int height; /* height of the glyphs bitmap */
int left; /* x offset of the glyph */ int left; /* x offset of the glyph */
int top; /* y offset of the glyph */ int top; /* y offset of the glyph */
int xadvance; /* placement of next glyph */ int xadvance; /* placement of next glyph */
int yadvance; int yadvance;
int magic; int magic;
DFBFontCacheRow *row; DFBFontCacheRow *row;
bool inserted;
bool retry;
}; };
#define CORE_GLYPH_DATA_DEBUG_AT(Domain, data) \ #define CORE_GLYPH_DATA_DEBUG_AT(Domain, data) \
do { \ do { \
D_DEBUG_AT( Domain, " -> index %d\n", (data)->index ); \ D_DEBUG_AT( Domain, " -> index %d\n", (data)->index ); \
D_DEBUG_AT( Domain, " -> layer %d\n", (data)->layer ); \ D_DEBUG_AT( Domain, " -> layer %d\n", (data)->layer ); \
D_DEBUG_AT( Domain, " -> row %p\n", (data)->row ); \ D_DEBUG_AT( Domain, " -> row %p\n", (data)->row ); \
D_DEBUG_AT( Domain, " -> surface %p\n", (data)->surface ); \ D_DEBUG_AT( Domain, " -> surface %p\n", (data)->surface ); \
D_DEBUG_AT( Domain, " -> start %d\n", (data)->start ); \ D_DEBUG_AT( Domain, " -> start %d\n", (data)->start ); \
D_DEBUG_AT( Domain, " -> width %d\n", (data)->width ); \ D_DEBUG_AT( Domain, " -> width %d\n", (data)->width ); \
skipping to change at line 156 skipping to change at line 159
/* /*
* font struct * font struct
*/ */
struct _CoreFont { struct _CoreFont {
CoreDFB *core; CoreDFB *core;
DFBFontManager *manager; DFBFontManager *manager;
DFBFontDescription description; /* original description u
sed to create the font */
char *url;
DFBSurfaceBlittingFlags blittingflags; DFBSurfaceBlittingFlags blittingflags;
DFBSurfacePixelFormat pixel_format; DFBSurfacePixelFormat pixel_format;
DFBSurfaceCapabilities surface_caps; DFBSurfaceCapabilities surface_caps;
DFBFontAttributes attributes; DFBFontAttributes attributes;
struct { struct {
DirectHash *glyph_hash; /* infos about loaded gly phs */ DirectHash *glyph_hash; /* infos about loaded gly phs */
CoreGlyphData *glyph_data[128]; CoreGlyphData *glyph_data[128];
} layers[DFB_FONT_MAX_LAYERS]; } layers[DFB_FONT_MAX_LAYERS];
skipping to change at line 214 skipping to change at line 220
#define CORE_FONT_DEBUG_AT(Domain, font) \ #define CORE_FONT_DEBUG_AT(Domain, font) \
do { \ do { \
D_DEBUG_AT( Domain, " -> ascender %d\n", (font)->ascender ); \ D_DEBUG_AT( Domain, " -> ascender %d\n", (font)->ascender ); \
D_DEBUG_AT( Domain, " -> descender %d\n", (font)->descender ); \ D_DEBUG_AT( Domain, " -> descender %d\n", (font)->descender ); \
D_DEBUG_AT( Domain, " -> height %d\n", (font)->height ); \ D_DEBUG_AT( Domain, " -> height %d\n", (font)->height ); \
} while (0) } while (0)
/* /*
* allocates and initializes a new font structure * allocates and initializes a new font structure
*/ */
DFBResult dfb_font_create( CoreDFB *core, CoreFont **ret_font ); DFBResult dfb_font_create( CoreDFB *core,
const DFBFontDescription *description,
const char *url,
CoreFont **ret_font );
/* /*
* destroy all data in the CoreFont struct * destroy all data in the CoreFont struct
*/ */
void dfb_font_destroy( CoreFont *font ); void dfb_font_destroy( CoreFont *font );
/* /*
* dispose resources that can be recreated, mainly glyph cache surfaces * dispose resources that can be recreated, mainly glyph cache surfaces
*/ */
DFBResult dfb_font_dispose( CoreFont *font ); DFBResult dfb_font_dispose( CoreFont *font );
 End of changes. 3 change blocks. 
1 lines changed or deleted 11 lines changed or added


 fusion.h   fusion.h 
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__FUSION_H__ #ifndef __FUSION__FUSION_H__
#define __FUSION__FUSION_H__ #define __FUSION__FUSION_H__
#include <sys/types.h> #include <sys/types.h>
#include <direct/list.h>
#include <fusion/types.h> #include <fusion/types.h>
typedef enum { typedef enum {
FER_ANY, FER_ANY,
FER_MASTER, FER_MASTER,
FER_SLAVE FER_SLAVE
} FusionEnterRole; } FusionEnterRole;
typedef enum { typedef enum {
FFA_CLOSE, FFA_CLOSE,
skipping to change at line 55 skipping to change at line 57
} FusionForkAction; } FusionForkAction;
typedef enum { typedef enum {
FFS_PREPARE, FFS_PREPARE,
FFS_PARENT, FFS_PARENT,
FFS_CHILD FFS_CHILD
} FusionForkState; } FusionForkState;
typedef void (*FusionForkCallback) ( FusionForkAction action, FusionForkSta te state ); typedef void (*FusionForkCallback) ( FusionForkAction action, FusionForkSta te state );
typedef void (*FusionLeaveCallback)( FusionWorld *world,
FusionID fusion_id,
void *ctx );
typedef void (*FusionDispatchCleanupFunc)( void *ctx );
typedef struct {
DirectLink link;
FusionDispatchCleanupFunc func;
void *ctx;
} FusionDispatchCleanup;
DirectResult FUSION_API fusion_dispatch_cleanup_add ( FusionWorld
*world,
FusionDispatchClean
upFunc func,
void
*ctx,
FusionDispatchClean
up **ret_cleanup );
DirectResult FUSION_API fusion_dispatch_cleanup_remove( FusionWorld
*world,
FusionDispatchClean
up *cleanup );
/* /*
* 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_API fusion_enter( int world_index, DirectResult FUSION_API 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 95 skipping to change at line 118
*/ */
FusionForkAction FUSION_API fusion_world_get_fork_action( FusionWorld *worl d ); FusionForkAction FUSION_API fusion_world_get_fork_action( FusionWorld *worl d );
/* /*
* Registers a callback called upon fork(). * Registers a callback called upon fork().
*/ */
void FUSION_API fusion_world_set_fork_callback( FusionWorld *world, void FUSION_API fusion_world_set_fork_callback( FusionWorld *world,
FusionForkCallback callbac k ); FusionForkCallback callbac k );
/* /*
* Registers a callback called when a slave exits.
*/
void FUSION_API fusion_world_set_leave_callback( FusionWorld *world
,
FusionLeaveCallback callb
ack,
void *ctx )
;
/*
* Return the index of the specified world. * Return the index of the specified world.
*/ */
int FUSION_API fusion_world_index( const FusionWorld *world ); int FUSION_API 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_API fusion_id( const FusionWorld *world ); FusionID FUSION_API fusion_id( const FusionWorld *world );
/* /*
skipping to change at line 125 skipping to change at line 155
* Return true if this process is the master. * Return true if this process is the master.
*/ */
bool FUSION_API fusion_master( const FusionWorld *world ); bool FUSION_API fusion_master( const FusionWorld *world );
/* /*
* Wait until all pending messages are processed. * Wait until all pending messages are processed.
*/ */
DirectResult FUSION_API fusion_sync( const FusionWorld *world ); DirectResult FUSION_API fusion_sync( const FusionWorld *world );
/* /*
* Unblock slaves from entering. Must be called once after fusion_enter as
master.
*/
DirectResult FUSION_API fusion_world_activate( FusionWorld *world );
/*
* Sends a signal to one or more fusionees and optionally waits * Sends a signal to one or more fusionees and optionally waits
* for their processes to terminate. * for their processes to terminate.
* *
* A fusion_id of zero means all fusionees but the calling one. * A fusion_id of zero means all fusionees but the calling one.
* A timeout of zero means infinite waiting while a negative value * A timeout of zero means infinite waiting while a negative value
* means no waiting at all. * means no waiting at all.
*/ */
DirectResult FUSION_API fusion_kill( FusionWorld *world, DirectResult FUSION_API fusion_kill( FusionWorld *world,
FusionID fusion_id, FusionID fusion_id,
int signal, int signal,
int timeout_ms ); int timeout_ms );
/* Check if a pointer points to the shared memory. */ /* Check if a pointer points to the shared memory. */
bool FUSION_API fusion_is_shared( FusionWorld *world, bool FUSION_API fusion_is_shared( FusionWorld *world,
const void *ptr ); const void *ptr );
const char * FUSION_API fusion_get_tmpfs( FusionWorld *world ); const char * FUSION_API fusion_get_tmpfs( FusionWorld *world );
/*
* Get the executable path of the Fusionee
*
* Returns DR_LIMITEXCEEDED when buf_size too small,
* with the required number of bytes returned in ret_size.
*/
DirectResult FUSION_API fusion_get_fusionee_path( const FusionWorld *world,
FusionID fusion
_id,
char *buf,
size_t buf_si
ze,
size_t *ret_si
ze );
DirectResult FUSION_API fusion_get_fusionee_pid( const FusionWorld *world,
FusionID fusion_
id,
pid_t *ret_pid
);
DirectResult FUSION_API fusion_world_set_root( FusionWorld *world,
void *root );
void * FUSION_API fusion_world_get_root( FusionWorld *world );
#endif #endif
 End of changes. 5 change blocks. 
0 lines changed or deleted 71 lines changed or added


 generic.h   generic.h 
skipping to change at line 177 skipping to change at line 177
int y; int y;
int s; int s;
int t; int t;
} GenefxVertexAffine; } GenefxVertexAffine;
/************************************************************************** ********************************************/ /************************************************************************** ********************************************/
void gGetDriverInfo( GraphicsDriverInfo *info ); void gGetDriverInfo( GraphicsDriverInfo *info );
void gGetDeviceInfo( GraphicsDeviceInfo *info ); void gGetDeviceInfo( GraphicsDeviceInfo *info );
bool gAcquire ( CardState *state, DFBAccelerationMask accel ); bool gAcquire ( CardState *state, DFBAccelerationMask accel );
bool gAcquire2( CardState *state, DFBAccelerationMask accel );
void gRelease ( CardState *state ); void gRelease ( CardState *state );
void gFillRectangle ( CardState *state, DFBRectangle *rect ); void gFillRectangle ( CardState *state, DFBRectangle *rect );
void gDrawLine ( CardState *state, DFBRegion *line ); void gDrawLine ( CardState *state, DFBRegion *line );
void gBlit ( CardState *state, DFBRectangle *rect, int dx, int dy ); void gBlit ( CardState *state, DFBRectangle *rect, int dx, int dy );
void gStretchBlit ( CardState *state, DFBRectangle *srect, DFBRectangle * drect ); void gStretchBlit ( CardState *state, DFBRectangle *srect, DFBRectangle * drect );
void Genefx_TextureTriangles( CardState *state, void Genefx_TextureTriangles( CardState *state,
DFBVertex *vertices, DFBVertex *vertices,
skipping to change at line 248 skipping to change at line 249
} }
/************************************************************************** ********************************************/ /************************************************************************** ********************************************/
typedef void (*XopAdvanceFunc)( GenefxState *gfxs ); typedef void (*XopAdvanceFunc)( GenefxState *gfxs );
void Genefx_Aop_xy( GenefxState *gfxs, int x, int y ); void Genefx_Aop_xy( GenefxState *gfxs, int x, int y );
void Genefx_Aop_crab( GenefxState *gfxs ); void Genefx_Aop_crab( GenefxState *gfxs );
void Genefx_Aop_prev_crab( GenefxState *gfxs );
void Genefx_Aop_next( GenefxState *gfxs ); void Genefx_Aop_next( GenefxState *gfxs );
void Genefx_Aop_prev( GenefxState *gfxs ); void Genefx_Aop_prev( GenefxState *gfxs );
void Genefx_Bop_xy( GenefxState *gfxs, int x, int y ); void Genefx_Bop_xy( GenefxState *gfxs, int x, int y );
void Genefx_Bop_next( GenefxState *gfxs ); void Genefx_Bop_next( GenefxState *gfxs );
void Genefx_Bop_prev( GenefxState *gfxs ); void Genefx_Bop_prev( GenefxState *gfxs );
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 gfxcard.h   gfxcard.h 
/* /*
(c) Copyright 2001-2009 The world wide DirectFB Open Source Community ( directfb.org) (c) Copyright 2001-2011 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 __GFXCARD_H__ #ifndef __GFXCARD_H__
#define __GFXCARD_H__ #define __GFXCARD_H__
#include <pthread.h> #include <pthread.h>
#include <direct/modules.h> #include <direct/modules.h>
#include <fusion/call.h> #include <fusion/call.h>
#include <fusion/lock.h> #include <fusion/lock.h>
#include <fusion/property.h> #include <fusion/object.h>
#include <core/coretypes.h> #include <core/coretypes.h>
#include <directfb.h> #include <directfb.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= 0x00000008,
CCF_AUXMEMORY = 0x00000010, CCF_AUXMEMORY = 0x00000010,
CCF_RENDEROPTS = 0x00000020 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 {
skipping to change at line 87 skipping to change at line 87
DFBDimension dst_max; DFBDimension dst_max;
DFBDimension src_min; DFBDimension src_min;
DFBDimension src_max; DFBDimension src_max;
} CardLimitations; } CardLimitations;
DECLARE_MODULE_DIRECTORY( dfb_graphics_drivers ); DECLARE_MODULE_DIRECTORY( dfb_graphics_drivers );
/* /*
* Increase this number when changes result in binary incompatibility! * Increase this number when changes result in binary incompatibility!
*/ */
#define DFB_GRAPHICS_DRIVER_ABI_VERSION 34 #define DFB_GRAPHICS_DRIVER_ABI_VERSION 35
#define DFB_GRAPHICS_DRIVER_INFO_NAME_LENGTH 40 #define DFB_GRAPHICS_DRIVER_INFO_NAME_LENGTH 40
#define DFB_GRAPHICS_DRIVER_INFO_VENDOR_LENGTH 60 #define DFB_GRAPHICS_DRIVER_INFO_VENDOR_LENGTH 60
#define DFB_GRAPHICS_DRIVER_INFO_URL_LENGTH 100 #define DFB_GRAPHICS_DRIVER_INFO_URL_LENGTH 100
#define DFB_GRAPHICS_DRIVER_INFO_LICENSE_LENGTH 40 #define DFB_GRAPHICS_DRIVER_INFO_LICENSE_LENGTH 40
#define DFB_GRAPHICS_DEVICE_INFO_NAME_LENGTH 48 #define DFB_GRAPHICS_DEVICE_INFO_NAME_LENGTH 48
#define DFB_GRAPHICS_DEVICE_INFO_VENDOR_LENGTH 64 #define DFB_GRAPHICS_DEVICE_INFO_VENDOR_LENGTH 64
typedef struct { typedef struct {
skipping to change at line 304 skipping to change at line 304
/* /*
* BatchFill * BatchFill
* *
* When driver returns false (late fallback), it may set *ret_num * When driver returns false (late fallback), it may set *ret_num
* to the number of successful fills in case of partial execution. * to the number of successful fills in case of partial execution.
*/ */
bool (*BatchFill)( void *driver_data, void *device_data, bool (*BatchFill)( void *driver_data, void *device_data,
const DFBRectangle *rects, const DFBRectangle *rects,
unsigned int num, unsigned int *ret_num ); unsigned int num, unsigned int *ret_num );
/* callbacks when a state is created or destroyed. This allows a graph
ics
driver to hold additional state. */
void (*StateInit) ( void *driver_data, void *device_data, CardState
*state );
void (*StateDestroy)( void *driver_data, void *device_data, CardState
*state );
/*
* Calculate the amount of memory and pitch for the specified
* surface buffer.
*/
DFBResult (*CalcBufferSize)( void *driver_data, void *device_data,
CoreSurfaceBuffer *buffer,
int *ret_pitch, int *ret_length );
} GraphicsDeviceFuncs; } GraphicsDeviceFuncs;
typedef struct { typedef struct {
int (*Probe) (CoreGraphicsDevice *device); int (*Probe) (CoreGraphicsDevice *device);
void (*GetDriverInfo) (CoreGraphicsDevice *device, void (*GetDriverInfo) (CoreGraphicsDevice *device,
GraphicsDriverInfo *driver_info); GraphicsDriverInfo *driver_info);
DFBResult (*InitDriver) (CoreGraphicsDevice *device, DFBResult (*InitDriver) (CoreGraphicsDevice *device,
GraphicsDeviceFuncs *funcs, GraphicsDeviceFuncs *funcs,
void *driver_data, void *driver_data,
skipping to change at line 340 skipping to change at line 353
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 );
bool dfb_gfxcard_state_check( CardState *state, DFBAccelerationMask accel ) ; bool dfb_gfxcard_state_check( CardState *state, DFBAccelerationMask accel ) ;
void dfb_gfxcard_state_init( CardState *state );
void dfb_gfxcard_state_destroy( CardState *state );
/* /*
* Signal beginning of a sequence of operations using this state. * Signal beginning of a sequence of operations using this state.
* Any number of states can be 'drawing'. * Any number of states can be 'drawing'.
*/ */
void dfb_gfxcard_start_drawing( CoreGraphicsDevice *device, void dfb_gfxcard_start_drawing( CoreGraphicsDevice *device,
CardState *state ); CardState *state );
/* /*
* Signal end of sequence, i.e. destination surface is consistent again. * Signal end of sequence, i.e. destination surface is consistent again.
*/ */
skipping to change at line 422 skipping to change at line 437
int dx1, int dx1,
int dy1, int dy1,
int dx2, int dx2,
int dy2, int dy2,
CardState *state ); CardState *state );
void dfb_gfxcard_stretchblit ( DFBRectangle *srect, void dfb_gfxcard_stretchblit ( DFBRectangle *srect,
DFBRectangle *drect, DFBRectangle *drect,
CardState *state ); CardState *state );
void dfb_gfxcard_batchstretchblit ( DFBRectangle *srects,
DFBRectangle *drects,
unsigned int num,
CardState *state );
void dfb_gfxcard_texture_triangles ( DFBVertex *vertices, void dfb_gfxcard_texture_triangles ( DFBVertex *vertices,
int num, int num,
DFBTriangleFormation formation, DFBTriangleFormation formation,
CardState *state ); CardState *state );
void dfb_gfxcard_drawstring ( const u8 *text, void dfb_gfxcard_drawstring ( const u8 *text,
int bytes, int bytes,
DFBTextEncodingID encoding, DFBTextEncodingID encoding,
int x, int x,
int y, int y,
skipping to change at line 536 skipping to change at line 556
unsigned int videoram_length; unsigned int videoram_length;
unsigned int auxram_length; unsigned int auxram_length;
unsigned int auxram_offset; unsigned int auxram_offset;
char *module_name; char *module_name;
GraphicsDriverInfo driver_info; GraphicsDriverInfo driver_info;
GraphicsDeviceInfo device_info; GraphicsDeviceInfo device_info;
void *device_data; void *device_data;
FusionProperty lock; FusionSkirmish lock;
GraphicsDeviceLockFlags lock_flags; GraphicsDeviceLockFlags lock_flags;
/* /*
* Points to the current state of the graphics card. * Points to the current state of the graphics card.
*/ */
CardState *state; CardState *state;
FusionID holder; /* Fusion ID of state owner. */ FusionID holder; /* Fusion ID of state owner. */
FusionObjectID last_allocation_id;
bool pending_ops;
} DFBGraphicsCoreShared; } DFBGraphicsCoreShared;
struct __DFB_DFBGraphicsCore { struct __DFB_DFBGraphicsCore {
int magic; int magic;
CoreDFB *core; CoreDFB *core;
DFBGraphicsCoreShared *shared; DFBGraphicsCoreShared *shared;
DirectModuleEntry *module; DirectModuleEntry *module;
 End of changes. 10 change blocks. 
6 lines changed or deleted 32 lines changed or added


 graphics_state.h   graphics_state.h 
skipping to change at line 39 skipping to change at line 39
#ifndef __GRAPHICS_STATE_H__ #ifndef __GRAPHICS_STATE_H__
#define __GRAPHICS_STATE_H__ #define __GRAPHICS_STATE_H__
#include <directfb.h> #include <directfb.h>
#include <fusion/object.h> #include <fusion/object.h>
#include <core/state.h> #include <core/state.h>
struct __DFB_CoreGraphicsState { struct __DFB_CoreGraphicsState {
FusionObject object; FusionObject object;
int magic; int magic;
FusionCall call; FusionCall call;
CardState state; CardState state;
/*
* New state logic
*/
StateModificationFlags modified;
bool hw;
DFBAccelerationMask sw;
StateModificationFlags mod_sw;
}; };
typedef enum { typedef enum {
CGSNF_NONE = 0x00000000 CGSNF_NONE = 0x00000000
} CoreGraphicsStateNotificationFlags; } CoreGraphicsStateNotificationFlags;
typedef struct { typedef struct {
CoreGraphicsStateNotificationFlags flags; CoreGraphicsStateNotificationFlags flags;
} CoreGraphicsStateNotification; } CoreGraphicsStateNotification;
 End of changes. 3 change blocks. 
4 lines changed or deleted 14 lines changed or added


 idirectfb.h   idirectfb.h 
skipping to change at line 74 skipping to change at line 74
bool app_focus; bool app_focus;
struct { struct {
CoreLayer *layer; CoreLayer *layer;
CoreLayerContext *context; CoreLayerContext *context;
CoreLayerRegion *region; CoreLayerRegion *region;
CoreSurface *surface; CoreSurface *surface;
CorePalette *palette; CorePalette *palette;
} layers[MAX_LAYERS]; } layers[MAX_LAYERS];
bool init_done;
DirectMutex init_lock;
DirectWaitQueue init_wq;
} 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 );
skipping to change at line 96 skipping to change at line 100
/* /*
* Remove the event buffer element from the internally managed linked list of * Remove the event buffer element from the internally managed linked list of
* connections between event buffers created by * connections between event buffers created by
* IDirectFB::CreateInputEventBuffer and input devices that are hot-plugged in. * IDirectFB::CreateInputEventBuffer and input devices that are hot-plugged in.
*/ */
void containers_remove_input_eventbuffer( IDirectFBEventBuffer *thiz ) ; void containers_remove_input_eventbuffer( IDirectFBEventBuffer *thiz ) ;
DFBResult IDirectFB_InitLayers( IDirectFB *thiz ); DFBResult IDirectFB_InitLayers( IDirectFB *thiz );
DFBResult IDirectFB_WaitInitialised( IDirectFB *thiz );
extern IDirectFB *idirectfb_singleton; extern IDirectFB *idirectfb_singleton;
#endif #endif
 End of changes. 2 change blocks. 
0 lines changed or deleted 6 lines changed or added


 idirectfbdatabuffer.h   idirectfbdatabuffer.h 
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 __IDIRECTFBDATABUFFER_H__ #ifndef __IDIRECTFBDATABUFFER_H__
#define __IDIRECTFBDATABUFFER_H__ #define __IDIRECTFBDATABUFFER_H__
#include <core/coretypes.h> #include <core/core.h>
#include <fusion/call.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;
IDirectFB *idirectfb; IDirectFB *idirectfb;
bool is_memory; bool is_memory;
FusionCall call; /* for remote access */
} IDirectFBDataBuffer_data; } IDirectFBDataBuffer_data;
/* /*
* private data struct of IDirectFBDataBuffer_File * private data struct of IDirectFBDataBuffer_File
*/ */
typedef struct { typedef struct {
IDirectFBDataBuffer_data base; IDirectFBDataBuffer_data base;
DirectStream *stream; DirectStream *stream;
DirectMutex mutex; DirectMutex mutex;
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added


 idirectfbfont.h   idirectfbfont.h 
skipping to change at line 38 skipping to change at line 38
#ifndef __IDIRECTFBFONT_H__ #ifndef __IDIRECTFBFONT_H__
#define __IDIRECTFBFONT_H__ #define __IDIRECTFBFONT_H__
#include <directfb.h> #include <directfb.h>
#include <direct/filesystem.h> #include <direct/filesystem.h>
#include <core/coretypes.h> #include <core/coretypes.h>
typedef enum {
IDFBFONT_CONTEXT_CONTENT_TYPE_UNKNOWN,
IDFBFONT_CONTEXT_CONTENT_TYPE_MALLOCED,
IDFBFONT_CONTEXT_CONTENT_TYPE_MAPPED,
IDFBFONT_CONTEXT_CONTENT_TYPE_MEMORY
} IDirectFBFont_ProbeContextContentType;
/* /*
* probing context * probing context
*/ */
typedef struct { typedef struct {
/* Only set if databuffer is created from file. /* Only set if databuffer is created from file.
deprecated - use memory location below. */ deprecated - use memory location below. */
const char *filename; const char *filename;
/* if !=NULL, pointer to the file content */ /* if !=NULL, pointer to the file content */
unsigned char *content; unsigned char *content;
unsigned int content_size; unsigned int content_size;
bool content_mapped; IDirectFBFont_ProbeContextContentType content_type;
} IDirectFBFont_ProbeContext; } IDirectFBFont_ProbeContext;
DFBResult DFBResult
IDirectFBFont_CreateFromBuffer( IDirectFBDataBuffer *buffer, IDirectFBFont_CreateFromBuffer( IDirectFBDataBuffer *buffer,
CoreDFB *core, CoreDFB *core,
const DFBFontDescription *desc, const DFBFontDescription *desc,
IDirectFBFont **interface_ptr ); IDirectFBFont **interface_ptr );
/************************************************************************** ********************************************/ /************************************************************************** ********************************************/
/* /*
* private data struct of IDirectFBFont * private data struct of IDirectFBFont
* used by implementors of IDirectFBFont * used by implementors of IDirectFBFont
*/ */
typedef struct { typedef struct {
int ref; /* reference counter */ int ref; /* reference counter
CoreFont *font; /* pointer to core font */ */
unsigned char *content; /* possible allocation, free at intf. cl CoreFont *font; /* pointer to core f
ose */ ont */
unsigned int content_size; unsigned char *content; /* possible allocati
bool content_mapped; on, free at intf. close */
unsigned int content_size;
IDirectFBFont_ProbeContextContentType content_type;
DFBTextEncodingID encoding; /* text encoding */ DFBTextEncodingID encoding; /* text encoding */
} IDirectFBFont_data; } IDirectFBFont_data;
/* /*
* common code to construct the interface (internal usage only) * common code to construct the interface (internal usage only)
*/ */
DFBResult IDirectFBFont_Construct( IDirectFBFont *thiz, CoreFont *font ); DFBResult IDirectFBFont_Construct( IDirectFBFont *thiz, CoreFont *font );
/* /*
* deinitialize font and its surfaces * deinitialize font and its surfaces
*/ */
 End of changes. 5 change blocks. 
11 lines changed or deleted 21 lines changed or added


 idirectfbinputbuffer.h   idirectfbinputbuffer.h 
skipping to change at line 60 skipping to change at line 60
#if !DIRECTFB_BUILD_PURE_VOODOO #if !DIRECTFB_BUILD_PURE_VOODOO
DFBResult IDirectFBEventBuffer_AttachInputDevice( IDirectFBEventBuffer *thi z, DFBResult IDirectFBEventBuffer_AttachInputDevice( IDirectFBEventBuffer *thi z,
CoreInputDevice *dev ice ); CoreInputDevice *dev ice );
DFBResult IDirectFBEventBuffer_DetachInputDevice( IDirectFBEventBuffer *thi z, DFBResult IDirectFBEventBuffer_DetachInputDevice( IDirectFBEventBuffer *thi z,
CoreInputDevice *dev ice ); CoreInputDevice *dev ice );
DFBResult IDirectFBEventBuffer_AttachWindow( IDirectFBEventBuffer *thiz, DFBResult IDirectFBEventBuffer_AttachWindow( IDirectFBEventBuffer *thiz,
CoreWindow *window ) ; CoreWindow *window ) ;
DFBResult IDirectFBEventBuffer_DetachWindow( IDirectFBEventBuffer *thiz, DFBResult IDirectFBEventBuffer_DetachWindow( IDirectFBEventBuffer *thiz,
CoreWindow *window ) ; CoreWindow *window ) ;
DFBResult IDirectFBEventBuffer_AttachSurface( IDirectFBEventBuffer *thiz,
CoreSurface *surface
);
DFBResult IDirectFBEventBuffer_DetachSurface( IDirectFBEventBuffer *thiz,
CoreSurface *surface
);
#endif #endif
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 7 lines changed or added


 idirectfbsurface.h   idirectfbsurface.h 
skipping to change at line 38 skipping to change at line 38
#ifndef __IDIRECTFBSURFACE_H__ #ifndef __IDIRECTFBSURFACE_H__
#define __IDIRECTFBSURFACE_H__ #define __IDIRECTFBSURFACE_H__
#include <directfb.h> #include <directfb.h>
#include <direct/types.h> #include <direct/types.h>
#include <fusion/reactor.h> #include <fusion/reactor.h>
#include <core/core.h>
#include <core/state.h> #include <core/state.h>
#include <core/CoreGraphicsStateClient.h> #include <core/CoreGraphicsStateClient.h>
/* /*
* private data struct of IDirectFBSurface * private data struct of IDirectFBSurface
*/ */
typedef struct { typedef struct {
DirectLink link; DirectLink link;
skipping to change at line 129 skipping to change at line 130
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;
IDirectFB *idirectfb;
IDirectFBSurface *parent; IDirectFBSurface *parent;
DirectLink *children_data; DirectLink *children_data;
pthread_mutex_t children_lock; pthread_mutex_t children_lock;
CoreGraphicsStateClient state_client; CoreGraphicsStateClient state_client;
CoreMemoryPermission *memory_permissions[3];
unsigned int memory_permissions_count;
DirectWaitQueue back_buffer_wq;
DirectMutex back_buffer_lock;
unsigned int frame_ack;
CoreSurfaceClient *surface_client;
unsigned int surface_client_flip_count;
DirectMutex surface_client_lock;
DFBSurfaceStereoEye src_eye;
} 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, 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,
IDirectFB *idirectfb );
/* /*
* 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 * internal
*/ */
void IDirectFBSurface_StopAll( IDirectFBSurface_data *data ); void IDirectFBSurface_StopAll( IDirectFBSurface_data *data );
void IDirectFBSurface_WaitForBackBuffer( IDirectFBSurface_data *data );
#endif #endif
 End of changes. 5 change blocks. 
1 lines changed or deleted 20 lines changed or added


 idirectfbsurface_layer.h   idirectfbsurface_layer.h 
skipping to change at line 55 skipping to change at line 55
* 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, 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,
IDirectFB *idirect
fb );
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 3 lines changed or added


 idirectfbsurface_window.h   idirectfbsurface_window.h 
skipping to change at line 46 skipping to change at line 46
/* /*
* 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 , 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,
; IDirectFB *idirec
tfb );
#endif #endif
 End of changes. 1 change blocks. 
2 lines changed or deleted 3 lines changed or added


 idirectfbwindow.h   idirectfbwindow.h 
skipping to change at line 43 skipping to change at line 43
#include <core/coretypes.h> #include <core/coretypes.h>
/* /*
* initializes a new window and constructs interface * initializes a new window and constructs interface
*/ */
DFBResult IDirectFBWindow_Construct( IDirectFBWindow *thiz, DFBResult IDirectFBWindow_Construct( IDirectFBWindow *thiz,
CoreWindow *window, CoreWindow *window,
CoreLayer *layer, CoreLayer *layer,
CoreDFB *core, CoreDFB *core,
IDirectFB *idirectfb ); IDirectFB *idirectfb,
bool created );
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added


 input.h   input.h 
skipping to change at line 115 skipping to change at line 115
InputDriverCapability InputDriverCapability
(*GetCapability) (void); (*GetCapability) (void);
DFBResult (*LaunchHotplug) (CoreDFB *core, DFBResult (*LaunchHotplug) (CoreDFB *core,
void *input_driver); void *input_driver);
DFBResult (*StopHotplug) (void); DFBResult (*StopHotplug) (void);
DFBResult (*GetAxisInfo) (CoreInputDevice *device, DFBResult (*GetAxisInfo) (CoreInputDevice *device,
void *driver_data , void *driver_data ,
DFBInputDeviceAxisIdentifier axis, DFBInputDeviceAxisIdentifier axis,
DFBInputDeviceAxisInfo *ret_info); DFBInputDeviceAxisInfo *ret_info);
DFBResult (*SetConfiguration)(CoreInputDevice *device,
void *driver_dat
a,
const DFBInputDeviceConfig *config);
} InputDriverFuncs; } InputDriverFuncs;
typedef DFBEnumerationResult (*InputDeviceCallback) (CoreInputDevice *devic e, typedef DFBEnumerationResult (*InputDeviceCallback) (CoreInputDevice *devic e,
void *ctx); void *ctx);
void dfb_input_enumerate_devices( InputDeviceCallback callback, void dfb_input_enumerate_devices( InputDeviceCallback callback,
void *ctx, void *ctx,
DFBInputDeviceCapabilities caps ); DFBInputDeviceCapabilities caps );
DirectResult dfb_input_attach ( CoreInputDevice *device, DirectResult dfb_input_attach ( CoreInputDevice *device,
skipping to change at line 162 skipping to change at line 166
DFBInputDeviceID dfb_input_device_id ( const CoreInputDevice * device ); DFBInputDeviceID dfb_input_device_id ( const CoreInputDevice * device );
CoreInputDevice *dfb_input_device_at ( DFBInputDeviceID id ); CoreInputDevice *dfb_input_device_at ( DFBInputDeviceID id );
DFBInputDeviceCapabilities dfb_input_device_caps( const CoreInputDevice *de vice ); DFBInputDeviceCapabilities dfb_input_device_caps( const CoreInputDevice *de vice );
DFBResult dfb_input_device_get_keymap_entry( CoreInputDevice *device, DFBResult dfb_input_device_get_keymap_entry( CoreInputDevice *device,
int keycode, int keycode,
DFBInputDeviceKeymapEn try *entry ); DFBInputDeviceKeymapEn try *entry );
DFBResult dfb_input_device_set_keymap_entry( CoreInputDevice DFBResult dfb_input_device_set_keymap_entry( CoreInputDevice
*device, *device,
int int
keycode, keycode,
DFBInputDeviceKeymapEn const DFBInputDeviceKe
try *entry ); ymapEntry *entry );
DFBResult dfb_input_device_load_keymap ( CoreInputDevice *device, DFBResult dfb_input_device_load_keymap ( CoreInputDevice *device,
char *filename ); char *filename );
DFBResult dfb_input_device_reload_keymap ( CoreInputDevice *device ); DFBResult dfb_input_device_reload_keymap ( CoreInputDevice *device );
DFBResult dfb_input_device_set_configuration( CoreInputDevice
*device,
const DFBInputDeviceC
onfig *config );
typedef struct {
DFBInputDeviceModifierMask modifiers_l;
DFBInputDeviceModifierMask modifiers_r;
DFBInputDeviceLockState locks;
DFBInputDeviceButtonMask buttons;
} CoreInputDeviceState;
DFBResult dfb_input_device_get_state( CoreInputDevice *device,
CoreInputDeviceState *ret_sta
te );
void containers_attach_device( CoreInputDevice *device ); void containers_attach_device( CoreInputDevice *device );
void containers_detach_device( CoreInputDevice *device ); void containers_detach_device( CoreInputDevice *device );
void stack_containers_attach_device( CoreInputDevice *device ) ; void stack_containers_attach_device( CoreInputDevice *device ) ;
void stack_containers_detach_device( CoreInputDevice *device ) ; void stack_containers_detach_device( CoreInputDevice *device ) ;
DFBResult dfb_input_create_device( int device_index, DFBResult dfb_input_create_device( int device_index,
CoreDFB *core_in, CoreDFB *core_in,
skipping to change at line 192 skipping to change at line 209
DFBResult dfb_input_remove_device( int device_index, DFBResult dfb_input_remove_device( int device_index,
void *driver_in ); void *driver_in );
/* global reactions */ /* global reactions */
typedef enum { typedef enum {
DFB_WINDOWSTACK_INPUTDEVICE_LISTENER DFB_WINDOWSTACK_INPUTDEVICE_LISTENER
} DFB_INPUT_GLOBALS; } DFB_INPUT_GLOBALS;
DirectResult CoreInputDevice_Call( CoreInputDevice *device,
FusionCallExecFlags flags,
int call_arg,
void *ptr,
unsigned int length,
void *ret_ptr,
unsigned int ret_size,
unsigned int *ret_length );
#endif #endif
 End of changes. 4 change blocks. 
6 lines changed or deleted 36 lines changed or added


 input_driver.h   input_driver.h 
skipping to change at line 101 skipping to change at line 101
static DFBResult static DFBResult
driver_resume( void ) driver_resume( void )
{ {
return DFB_UNSUPPORTED; return DFB_UNSUPPORTED;
} }
static DFBResult static DFBResult
is_created( int event_num, void *data) is_created( int event_num, void *data)
{ {
D_UNUSED_P( event_num );
D_UNUSED_P( data );
return DFB_UNSUPPORTED; return DFB_UNSUPPORTED;
} }
static InputDriverCapability static InputDriverCapability
get_capability( void ) get_capability( void )
{ {
return IDC_NONE; return IDC_NONE;
} }
static DFBResult static DFBResult
launch_hotplug(CoreDFB *core, launch_hotplug(CoreDFB *core,
void *input_driver) void *input_driver)
{ {
D_UNUSED_P( core );
D_UNUSED_P( input_driver );
return DFB_UNSUPPORTED; return DFB_UNSUPPORTED;
} }
static DFBResult static DFBResult
stop_hotplug( void ) stop_hotplug( void )
{ {
return DFB_UNSUPPORTED; return DFB_UNSUPPORTED;
} }
#endif #endif
#ifdef DFB_INPUTDRIVER_HAS_SET_CONFIGURATION
static DFBResult
driver_set_configuration( CoreInputDevice *device,
void *driver_data,
const DFBInputDeviceConfig *config );
#endif
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,
.Suspend = driver_suspend, .Suspend = driver_suspend,
.Resume = driver_resume, .Resume = driver_resume,
.IsCreated = is_created, .IsCreated = is_created,
.GetCapability = get_capability, .GetCapability = get_capability,
.LaunchHotplug = launch_hotplug, .LaunchHotplug = launch_hotplug,
.StopHotplug = stop_hotplug, .StopHotplug = stop_hotplug,
#ifdef DFB_INPUTDRIVER_HAS_AXIS_INFO #ifdef DFB_INPUTDRIVER_HAS_AXIS_INFO
.GetAxisInfo = driver_get_axis_info .GetAxisInfo = driver_get_axis_info,
#endif
#ifdef DFB_INPUTDRIVER_HAS_SET_CONFIGURATION
.SetConfiguration = driver_set_configuration,
#endif #endif
}; };
#define DFB_INPUT_DRIVER(shortname) \ #define DFB_INPUT_DRIVER(shortname) \
__attribute__((constructor)) void directfb_##shortname##_ctor( void ); \ __attribute__((constructor)) void directfb_##shortname##_ctor( void ); \
__attribute__((destructor)) void directfb_##shortname##_dtor( void ); \ __attribute__((destructor)) void directfb_##shortname##_dtor( void ); \
\ \
void \ void \
directfb_##shortname##_ctor( void ) \ directfb_##shortname##_ctor( void ) \
{ \ { \
 End of changes. 4 change blocks. 
1 lines changed or deleted 18 lines changed or added


 interface.h   interface.h 
skipping to change at line 165 skipping to change at line 165
#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) );
\ \
if (p) {
\ \
D_MAGIC_SET( (IAny*)(p), DirectInterface ); D_MAGIC_SET( (IAny*)(p), DirectInterface );
\ \
\ \
DIRECT_DBG_INTERFACE_ADD( __FUNCTION__, __FILE__, __LINE__, #p, p DIRECT_DBG_INTERFACE_ADD( __FUNCTION__, __FILE__, __LINE__,
, #i ); \ #p, p, #i ); \
}
\
else
\
D_OOM();
\
} 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 ); \
\ \
if (!(p)->priv) \ if (!(p)->priv) \
(p)->priv = D_CALLOC( 1, sizeof(i##_data) ); \ (p)->priv = D_CALLOC( 1, sizeof(i##_data) ); \
\ \
 End of changes. 1 change blocks. 
14 lines changed or deleted 20 lines changed or added


 layer_context.h   layer_context.h 
skipping to change at line 58 skipping to change at line 58
* Creates a pool of layer context objects. * Creates a pool of layer context objects.
*/ */
FusionObjectPool *dfb_layer_context_pool_create( const FusionWorld *world ) ; FusionObjectPool *dfb_layer_context_pool_create( const FusionWorld *world ) ;
/* /*
* Generates dfb_layer_context_ref(), dfb_layer_context_attach() etc. * Generates dfb_layer_context_ref(), dfb_layer_context_attach() etc.
*/ */
FUSION_OBJECT_METHODS( CoreLayerContext, dfb_layer_context ) FUSION_OBJECT_METHODS( CoreLayerContext, dfb_layer_context )
DFBResult dfb_layer_context_init( CoreLayerContext *context, DFBResult dfb_layer_context_init( CoreLayerContext *context,
CoreLayer *layer ); CoreLayer *layer,
bool stack );
/* /*
* Locking * Locking
*/ */
DirectResult dfb_layer_context_lock ( CoreLayerContext *context ); DirectResult dfb_layer_context_lock ( CoreLayerContext *context );
DirectResult dfb_layer_context_unlock( CoreLayerContext *context ); DirectResult dfb_layer_context_unlock( CoreLayerContext *context );
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 );
skipping to change at line 154 skipping to change at line 155
* window control * window control
*/ */
DFBResult dfb_layer_context_create_window( CoreDFB *cor e, DFBResult dfb_layer_context_create_window( CoreDFB *cor e,
CoreLayerContext *con text, CoreLayerContext *con text,
const DFBWindowDescription *des c, const DFBWindowDescription *des c,
CoreWindow **ret _window ); CoreWindow **ret _window );
CoreWindow *dfb_layer_context_find_window( CoreLayerContext *con text, CoreWindow *dfb_layer_context_find_window( CoreLayerContext *con text,
DFBWindowID id ); DFBWindowID id );
DFBResult dfb_layer_context_allocate_surface ( CoreLayer
*layer,
CoreLayerRegion
*region,
CoreLayerRegionConfig
*config );
DFBResult dfb_layer_context_reallocate_surface ( CoreLayer
*layer,
CoreLayerRegion
*region,
CoreLayerRegionConfig
*config );
DFBResult dfb_layer_context_deallocate_surface ( CoreLayer
*layer,
CoreLayerRegion
*region );
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 21 lines changed or added


 layer_control.h   layer_control.h 
skipping to change at line 37 skipping to change at line 37
*/ */
#ifndef __CORE__LAYER_CONTROL_H__ #ifndef __CORE__LAYER_CONTROL_H__
#define __CORE__LAYER_CONTROL_H__ #define __CORE__LAYER_CONTROL_H__
#include <directfb.h> #include <directfb.h>
#include <core/coretypes.h> #include <core/coretypes.h>
DFBResult dfb_layer_create_context ( CoreLayer *layer, DFBResult dfb_layer_create_context ( CoreLayer *layer,
bool stack,
CoreLayerContext **ret_conte xt ); CoreLayerContext **ret_conte xt );
DFBResult dfb_layer_get_active_context ( CoreLayer *layer, DFBResult dfb_layer_get_active_context ( CoreLayer *layer,
CoreLayerContext **ret_conte xt ); CoreLayerContext **ret_conte xt );
DFBResult dfb_layer_get_primary_context ( CoreLayer *layer, DFBResult dfb_layer_get_primary_context ( CoreLayer *layer,
bool activate, bool activate,
CoreLayerContext **ret_conte xt ); CoreLayerContext **ret_conte xt );
DFBResult dfb_layer_activate_context ( CoreLayer *layer, DFBResult dfb_layer_activate_context ( CoreLayer *layer,
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 layers.h   layers.h 
skipping to change at line 66 skipping to change at line 66
DFBColorKey src_key; /* source color key */ DFBColorKey src_key; /* source color key */
DFBColorKey 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 */
bool keep_buffers;
}; };
#if D_DEBUG_ENABLED #if D_DEBUG_ENABLED
#define DFB_CORE_LAYER_REGION_CONFIG_DEBUG_AT( domain, config ) \ #define DFB_CORE_LAYER_REGION_CONFIG_DEBUG_AT( domain, config ) \
do { \ do { \
const CoreLayerRegionConfig *_config = config; \ const CoreLayerRegionConfig *_config = config; \
\ \
D_DEBUG_AT( domain, " -> size %dx%d\n", _config->width, _c onfig->height ); \ 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, " -> format %s\n", dfb_pixelformat_name( _config->format ) ); \
D_DEBUG_AT( domain, " -> color spc %d\n", _config->colorspace ) ; \
D_DEBUG_AT( domain, " -> surf caps 0x%08x\n", _config->surface_ caps ); \ 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, " -> buffermode %d\n", _config->buffermode ) ; \
D_DEBUG_AT( domain, " -> options 0x%08x\n", _config->options ); \ 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, " -> 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, " -> 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, " -> 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, " -> 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) ); \ D_DEBUG_AT( domain, " -> dst_key %02x%02x%02x (index %d)\n", DFB_COLORKEY_VALS(&_config->dst_key) ); \
} while (0) } while (0)
#else #else
 End of changes. 2 change blocks. 
0 lines changed or deleted 3 lines changed or added


 list.h   list.h 
skipping to change at line 245 skipping to change at line 245
prev->next = next; prev->next = next;
link->next = first; link->next = first;
first->prev = link; first->prev = link;
*list = link; *list = link;
} }
static __inline__ void*
direct_list_get_last( DirectLink *list )
{
D_MAGIC_ASSERT_IF( list, DirectLink );
if (list) {
D_MAGIC_ASSERT( list->prev, DirectLink );
return list->prev;
}
return NULL;
}
#ifdef __GNUC__ #ifdef __GNUC__
#define direct_list_check_link( link ) \ #define direct_list_check_link( link ) \
({ \ ({ \
D_MAGIC_ASSERT_IF( link, DirectLink ); \ D_MAGIC_ASSERT_IF( link, DirectLink ); \
link != NULL; \ link != NULL; \
}) })
#else #else
#define direct_list_check_link( link ) \ #define direct_list_check_link( link ) \
(link != NULL) (link != NULL)
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 14 lines changed or added


 lock.h   lock.h 
skipping to change at line 45 skipping to change at line 45
#include <direct/thread.h> #include <direct/thread.h>
#include <direct/util.h> #include <direct/util.h>
typedef struct { typedef struct {
DirectMutex lock; DirectMutex lock;
DirectWaitQueue cond; DirectWaitQueue cond;
int count; int count;
char *name; char *name;
} FusionSkirmishSingle; } FusionSkirmishSingle;
typedef union { typedef struct {
/* multi app */ /* multi app */
struct { struct {
int id; int id;
const FusionWorldShared *shared; const FusionWorldShared *shared;
/* builtin impl */ /* builtin impl */
struct { struct {
unsigned int locked; unsigned int locked;
pid_t owner; pid_t owner;
DirectLink *waiting; DirectLink *waiting;
bool requested; bool requested;
skipping to change at line 72 skipping to change at line 72
} FusionSkirmish; } FusionSkirmish;
/* /*
* Initialize. * Initialize.
*/ */
DirectResult FUSION_API fusion_skirmish_init ( FusionSkirmish *skirmis h, DirectResult FUSION_API fusion_skirmish_init ( FusionSkirmish *skirmis h,
const char *name, const char *name,
const FusionWorld *world ) ; const FusionWorld *world ) ;
DirectResult FUSION_API fusion_skirmish_init2 ( FusionSkirmish *skirmis
h,
const char *name,
const FusionWorld *world,
bool local )
;
/* /*
* Lock. * Lock.
*/ */
DirectResult FUSION_API fusion_skirmish_prevail( FusionSkirmish *skirmis h ); DirectResult FUSION_API fusion_skirmish_prevail( FusionSkirmish *skirmis h );
/* /*
* Try lock. * Try lock.
*/ */
DirectResult FUSION_API fusion_skirmish_swoop ( FusionSkirmish *skirmis h ); DirectResult FUSION_API fusion_skirmish_swoop ( FusionSkirmish *skirmis h );
skipping to change at line 122 skipping to change at line 127
\ \
D_ASSERT( fusion_skirmish_lock_count( skirmish, &lock_count ) == DR_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
typedef enum {
FUSION_SKIRMISH_PERMIT_NONE = 0x00000000,
FUSION_SKIRMISH_PERMIT_PREVAIL = 0x00000001,
FUSION_SKIRMISH_PERMIT_SWOOP = 0x00000002,
FUSION_SKIRMISH_PERMIT_DISMISS = 0x00000004,
FUSION_SKIRMISH_PERMIT_LOCK_COUNT = 0x00000008,
FUSION_SKIRMISH_PERMIT_WAIT = 0x00000010,
FUSION_SKIRMISH_PERMIT_NOTIFY = 0x00000020,
FUSION_SKIRMISH_PERMIT_DESTROY = 0x00000040,
FUSION_SKIRMISH_PERMIT_ALL = 0x0000007F,
} FusionSkirmishPermissions;
/*
* Give permissions to another fusionee to use the skirmish.
*/
DirectResult FUSION_API fusion_skirmish_add_permissions( FusionSkirmish
*skimrish,
FusionID
fusion_id,
FusionSkirmishPer
missions permissions );
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 32 lines changed or added


 messages.h   messages.h 
skipping to change at line 156 skipping to change at line 156
#define D_WARN(...) do { \ #define D_WARN(...) do { \
if (!(direct_config->quiet & DMT_WARNING)) \ if (!(direct_config->quiet & DMT_WARNING)) \
direct_messages_warn( __FUNCTION__, __FI LE__, __LINE__, __VA_ARGS__ );\ direct_messages_warn( __FUNCTION__, __FI LE__, __LINE__, __VA_ARGS__ );\
} 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" ), DR_NOLOC ALMEMORY) "out of memory" ), DR_NOLOC ALMEMORY)
#else #else
#define D_INFO(x...) do { } while (0) #define D_INFO(...) do { } while (0)
#define D_ERROR(x...) do { } while (0) #define D_ERROR(...) do { } while (0)
#define D_DERROR(x...) do { } while (0) #define D_DERROR(...) do { } while (0)
#define D_PERROR(x...) do { } while (0) #define D_PERROR(...) do { } while (0)
#define D_DLERROR(x...) do { } while (0) #define D_DLERROR(...) do { } while (0)
#define D_ONCE(x...) do { } while (0) #define D_ONCE(...) 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(...) do { } while (0)
#define D_WARN(x...) do { } while (0) #define D_WARN(...) do { } while (0)
#define D_OOM() (printf("out of memory\n"), DR_NOLOCALME MORY) #define D_OOM() (printf("out of memory\n"), DR_NOLOCALME MORY)
#endif #endif
#endif #endif
 End of changes. 2 change blocks. 
8 lines changed or deleted 8 lines changed or added


 object.h   object.h 
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__OBJECT_H__ #ifndef __FUSION__OBJECT_H__
#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 <fusion/vector.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, void *ctx ); 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 u32 FusionObjectID; typedef u32 FusionObjectID;
skipping to change at line 59 skipping to change at line 60
FOS_DEINIT FOS_DEINIT
} FusionObjectState; } FusionObjectState;
struct __Fusion_FusionObject { struct __Fusion_FusionObject {
DirectLink link; DirectLink link;
FusionObjectPool *pool; FusionObjectPool *pool;
int magic; int magic;
FusionObjectID id; FusionObjectID id;
FusionID identity;
FusionObjectState state; FusionObjectState state;
FusionRef ref; FusionRef ref;
FusionReactor *reactor; FusionReactor *reactor;
FusionWorldShared *shared; FusionWorldShared *shared;
FusionHash *properties; FusionHash *properties;
FusionID owner; FusionID owner;
FusionVector access;
}; };
typedef bool (*FusionObjectCallback)( FusionObjectPool *pool, typedef bool (*FusionObjectCallback)( FusionObjectPool *pool,
FusionObject *object, FusionObject *object,
void *ctx ); void *ctx );
FusionObjectPool FUSION_API *fusion_object_pool_create ( const char *name, FusionObjectPool FUSION_API *fusion_object_pool_create ( const char *name,
int object_size, int object_size,
int message_size, int message_size,
FusionObjec tDestructor destructor, FusionObjec tDestructor destructor,
skipping to change at line 90 skipping to change at line 94
const Fusio nWorld *world ); const Fusio nWorld *world );
DirectResult FUSION_API fusion_object_pool_destroy ( FusionObjec tPool *pool, DirectResult FUSION_API fusion_object_pool_destroy ( FusionObjec tPool *pool,
const Fusio nWorld *world ); const Fusio nWorld *world );
DirectResult FUSION_API fusion_object_pool_enum ( FusionObjec tPool *pool, DirectResult FUSION_API fusion_object_pool_enum ( FusionObjec tPool *pool,
FusionObjec tCallback callback, FusionObjec tCallback callback,
void *ctx ); void *ctx );
FusionObject FUSION_API *fusion_object_create ( FusionObjec tPool *pool, FusionObject FUSION_API *fusion_object_create ( FusionObjec tPool *pool,
const Fusio const Fusio
nWorld *world ); nWorld *world,
FusionID
identity );
DirectResult FUSION_API fusion_object_get ( FusionObjec tPool *pool, DirectResult FUSION_API fusion_object_get ( FusionObjec tPool *pool,
FusionObjec tID object_id, FusionObjec tID object_id,
FusionObjec t **ret_object ); FusionObjec t **ret_object );
DirectResult FUSION_API fusion_object_set_lock ( FusionObjec t *object, DirectResult FUSION_API fusion_object_set_lock ( FusionObjec t *object,
FusionSkirm ish *lock ); FusionSkirm ish *lock );
DirectResult FUSION_API fusion_object_activate ( FusionObjec t *object ); DirectResult FUSION_API fusion_object_activate ( FusionObjec t *object );
skipping to change at line 123 skipping to change at line 128
const char *key, const char *key,
char *value ); char *value );
void FUSION_API *fusion_object_get_property ( FusionObjec t *object, void FUSION_API *fusion_object_get_property ( FusionObjec t *object,
const char *key ); const char *key );
void FUSION_API fusion_object_remove_property ( FusionObjec t *object, void FUSION_API fusion_object_remove_property ( FusionObjec t *object,
const char *key, const char *key,
void **ret_val ); void **ret_val );
DirectResult FUSION_API fusion_object_add_access ( FusionObjec
t *object,
const char
*exectuable );
DirectResult FUSION_API fusion_object_has_access ( FusionObjec
t *object,
const char
*executable );
DirectResult FUSION_API fusion_object_catch ( FusionObjec
t *object );
#define FUSION_OBJECT_METHODS(type, prefix) \ #define FUSION_OBJECT_METHODS(type, prefix) \
\ \
static __inline__ DirectResult \ static __inline__ DirectResult \
prefix##_attach( type *object, \ prefix##_attach( type *object, \
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, \
 End of changes. 5 change blocks. 
2 lines changed or deleted 21 lines changed or added


 reactor.h   reactor.h 
skipping to change at line 61 skipping to change at line 61
void *node_link; void *node_link;
} Reaction; } Reaction;
typedef struct { typedef struct {
DirectLink link; DirectLink link;
int index; int index;
void *ctx; void *ctx;
bool attached; bool attached;
} GlobalReaction; } GlobalReaction;
#if !FUSION_BUILD_MULTI
/***************************
* Internal declarations *
***************************/
/*
*
*/
struct __Fusion_FusionReactor {
int magic;
DirectLink *reactions; /* reactor listeners attached to node */
pthread_mutex_t reactions_lock;
DirectLink *globals; /* global reactions attached to node */
pthread_mutex_t globals_lock;
bool destroyed;
int msg_size;
FusionWorld *world;
bool free;
};
#endif
/* /*
* Create a new reactor configured for the specified message data size. * Create a new reactor configured for the specified message data size.
*/ */
FusionReactor FUSION_API *fusion_reactor_new ( int msg_size, FusionReactor FUSION_API *fusion_reactor_new ( int msg_size,
const char *name, const char *name,
const FusionWorld *world ); const FusionWorld *world );
/* /*
* Destroy the reactor. * Destroy the reactor.
*/ */
 End of changes. 1 change blocks. 
0 lines changed or deleted 26 lines changed or added


 screens.h   screens.h 
skipping to change at line 263 skipping to change at line 263
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 number of screens.
*/
unsigned int dfb_screens_num( void );
/*
* Returns the screen with the specified ID. * Returns the screen with the specified ID.
*/ */
CoreScreen *dfb_screens_at( DFBScreenID screen_id ); CoreScreen *dfb_screens_at( DFBScreenID screen_id );
CoreScreen *dfb_screens_at_translated( DFBScreenID screen_id ); CoreScreen *dfb_screens_at_translated( DFBScreenID screen_id );
/* /*
* Return the ID of the specified screen.
*/
DFBScreenID dfb_screen_id( const CoreScreen *screen );
/*
* Return the (translated) ID of the specified screen. * Return the (translated) ID of the specified screen.
*/ */
DFBScreenID dfb_screen_id_translated( CoreScreen *screen ); DFBScreenID dfb_screen_id_translated( const CoreScreen *screen );
#endif #endif
 End of changes. 3 change blocks. 
1 lines changed or deleted 11 lines changed or added


 shm.h   shm.h 
skipping to change at line 41 skipping to change at line 41
#include <fusion/types.h> #include <fusion/types.h>
typedef DirectEnumerationResult (*FusionSHMPoolCallback)( FusionSHMPool *po ol, typedef DirectEnumerationResult (*FusionSHMPoolCallback)( FusionSHMPool *po ol,
void *ct x ); 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_enum_pools( FusionWorld *world, DirectResult fusion_shm_enum_pools( FusionWorld *world,
FusionSHMPoolCallback callback, FusionSHMPoolCallback callback,
void *ctx ); void *ctx );
int fusion_find_tmpfs( char *name, int len ); int fusion_find_tmpfs( char *name, int len );
#endif #endif
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added


 state.h   state.h 
skipping to change at line 51 skipping to change at line 51
#include <core/coretypes.h> #include <core/coretypes.h>
#include <core/gfxcard.h> #include <core/gfxcard.h>
#include <core/surface_buffer.h> #include <core/surface_buffer.h>
#include <gfx/generic/generic.h> #include <gfx/generic/generic.h>
#include <misc/conf.h> #include <misc/conf.h>
#include <misc/util.h> #include <misc/util.h>
typedef enum { typedef enum {
SMF_NONE = 0x00000000,
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,
skipping to change at line 84 skipping to change at line 86
SMF_DST_COLORKEY_EXTENDED = 0x00080000, SMF_DST_COLORKEY_EXTENDED = 0x00080000,
SMF_SOURCE2 = 0x00100000, SMF_SOURCE2 = 0x00100000,
SMF_SRC_CONVOLUTION = 0x00200000, SMF_SRC_CONVOLUTION = 0x00200000,
SMF_ROP_CODE = 0x01000000, SMF_ROP_CODE = 0x01000000,
SMF_ROP_FG_COLOR = 0x02000000, SMF_ROP_FG_COLOR = 0x02000000,
SMF_ROP_BG_COLOR = 0x04000000, SMF_ROP_BG_COLOR = 0x04000000,
SMF_ROP_PATTERN = 0x08000000, SMF_ROP_PATTERN = 0x08000000,
SMF_ALL = 0x0F3FFFFF SMF_FROM = 0x10000000,
SMF_TO = 0x20000000,
SMF_ALL = 0x3F3FFFFF
} StateModificationFlags; } StateModificationFlags;
typedef enum { typedef enum {
CSF_NONE = 0x00000000, CSF_NONE = 0x00000000,
CSF_DESTINATION = 0x00000001, /* destination is set using df b_state_set_destination() */ CSF_DESTINATION = 0x00000001, /* destination is set using df b_state_set_destination() */
CSF_SOURCE = 0x00000002, /* source is set using dfb_sta te_set_source() */ CSF_SOURCE = 0x00000002, /* source is set using dfb_sta te_set_source() */
CSF_SOURCE_MASK = 0x00000008, /* source mask is set using df b_state_set_source_mask() */ 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_SOURCE_MASK_LOCKED = 0x00000020, /* source mask surface is lock ed */
CSF_SOURCE2 = 0x00000100, /* source2 is set using dfb_st ate_set_source2() */ CSF_SOURCE2 = 0x00000100, /* source2 is set using dfb_st ate_set_source2() */
CSF_SOURCE2_LOCKED = 0x00000200, /* source2 surface is locked * / CSF_SOURCE2_LOCKED = 0x00000200, /* source2 surface is locked * /
CSF_DESTINATION_LOCKED = 0x00001000, /* destination surface is lock
ed */
CSF_DRAWING = 0x00010000, /* something has been rendered with this state, CSF_DRAWING = 0x00010000, /* something has been rendered with this state,
this is cleared by flushing the state, e.g. upon flip */ this is cleared by flushing the state, e.g. upon flip */
CSF_ALL = 0x0001033B CSF_ALL = 0x0001133B
} CardStateFlags; } CardStateFlags;
struct _CardState { struct _CardState {
int magic; int magic;
CoreDFB *core; CoreDFB *core;
CoreGraphicsDevice *device; CoreGraphicsDevice *device;
FusionID fusion_id; FusionID fusion_id;
pthread_mutex_t lock; /* lock for state handling */ pthread_mutex_t lock; /* lock for state handling */
skipping to change at line 156 skipping to change at line 163
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 */ /* from/to buffers */
CoreSurfaceBufferRole from; /* usually CSBR_FRONT */ CoreSurfaceBufferRole from; /* usually CSBR_FRONT */
DFBSurfaceStereoEye from_eye; /* usually DSSE_LEFT */
CoreSurfaceBufferRole to; /* usually CSBR_BACK */ CoreSurfaceBufferRole to; /* usually CSBR_BACK */
DFBSurfaceStereoEye to_eye; /* usually DSSE_LEFT */
/* read/write locks during operation */ /* read/write locks during operation */
CoreSurfaceBufferLock dst; CoreSurfaceBufferLock dst;
CoreSurfaceBufferLock src; CoreSurfaceBufferLock src;
/* software driver */ /* software driver */
GenefxState *gfxs; GenefxState *gfxs;
skipping to change at line 203 skipping to change at line 212
DFBColor rop_bg_color; DFBColor rop_bg_color;
u32 rop_pattern[32]; u32 rop_pattern[32];
DFBSurfacePatternMode rop_pattern_mode; DFBSurfacePatternMode rop_pattern_mode;
DFBColorKeyExtended src_colorkey_extended; DFBColorKeyExtended src_colorkey_extended;
DFBColorKeyExtended dst_colorkey_extended; DFBColorKeyExtended dst_colorkey_extended;
s32 src_colormatrix[12]; /* transformation ma trix for DSBLIT_SRC_COLORMATRIX (fixed 16.16) */ s32 src_colormatrix[12]; /* transformation ma trix for DSBLIT_SRC_COLORMATRIX (fixed 16.16) */
DFBConvolutionFilter src_convolution; DFBConvolutionFilter src_convolution;
void *gfxcard_data; /* gfx driver specific state da
ta */
u32 source_flip_count;
bool source_flip_count_used;
}; };
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 );
DFBResult dfb_state_set_destination( CardState *state, CoreSurface *destina tion ); DFBResult dfb_state_set_destination( CardState *state, CoreSurface *destina tion );
DFBResult dfb_state_set_source( CardState *state, CoreSurface *source ); DFBResult dfb_state_set_source( CardState *state, CoreSurface *source );
DFBResult dfb_state_set_source_2( CardState *state, CoreSurface *source, u3 2 flip_count );
DFBResult dfb_state_set_source_mask( CardState *state, CoreSurface *source_ mask ); DFBResult dfb_state_set_source_mask( CardState *state, CoreSurface *source_ mask );
DFBResult dfb_state_set_source2( CardState *state, CoreSurface *source2 ); DFBResult dfb_state_set_source2( CardState *state, CoreSurface *source2 );
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, void dfb_state_set_matrix( CardState *state,
skipping to change at line 354 skipping to change at line 369
s tate, bits ) s tate, bits )
#define dfb_state_set_rop_code(state,code) _dfb_state_set_checked( r op_code, \ #define dfb_state_set_rop_code(state,code) _dfb_state_set_checked( r op_code, \
R OP_CODE, \ R OP_CODE, \
s tate, code ) s tate, code )
#define dfb_state_set_rop_pattern_mode(state,mode) _dfb_state_set_checked( rop_pattern_mode, \ #define dfb_state_set_rop_pattern_mode(state,mode) _dfb_state_set_checked( rop_pattern_mode, \
ROP_PATTERN_MODE, \ ROP_PATTERN_MODE, \
state, mode ) state, mode )
static inline void dfb_state_set_from( CardState *state,
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye )
{
D_MAGIC_ASSERT( state, CardState );
D_ASSERT( role == CSBR_FRONT || role == CSBR_BACK || role == CSBR_IDLE
);
D_ASSERT( eye == DSSE_LEFT || eye == DSSE_RIGHT );
if (state->from != role || state->from_eye != eye) {
state->from = role;
state->from_eye = eye;
state->modified = (StateModificationFlags)( state->modified | SMF
_SOURCE | SMF_SOURCE2 | SMF_SOURCE_MASK | SMF_FROM );
}
}
static inline void dfb_state_set_to( CardState *state,
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye )
{
D_MAGIC_ASSERT( state, CardState );
D_ASSERT( role == CSBR_FRONT || role == CSBR_BACK || role == CSBR_IDLE
);
D_ASSERT( eye == DSSE_LEFT || eye == DSSE_RIGHT );
if (state->to != role || state->to_eye != eye) {
state->to = role;
state->to_eye = eye;
state->modified = (StateModificationFlags)( state->modified | SMF
_DESTINATION | SMF_TO );
}
}
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 405 skipping to change at line 450
} }
} }
static inline void dfb_state_set_colorkey( CardState *state, const DFBColor Key *key ) static inline void dfb_state_set_colorkey( CardState *state, const DFBColor Key *key )
{ {
D_MAGIC_ASSERT( state, CardState ); D_MAGIC_ASSERT( state, CardState );
D_ASSERT( key != NULL ); D_ASSERT( key != NULL );
if (! DFB_COLORKEY_EQUAL( state->colorkey, *key )) { if (! DFB_COLORKEY_EQUAL( state->colorkey, *key )) {
state->colorkey = *key; state->colorkey = *key;
state->modified = (StateModificationFlags)( state->modified | SMF _COLOR ); state->modified = (StateModificationFlags)( state->modified | SMF _COLORKEY );
} }
} }
static inline void dfb_state_set_source_mask_vals( CardState *sta te, static inline void dfb_state_set_source_mask_vals( CardState *sta te,
const DFBPoint *off set, const DFBPoint *off set,
DFBSurfaceMaskFlags fla gs ) DFBSurfaceMaskFlags fla gs )
{ {
D_MAGIC_ASSERT( state, CardState ); D_MAGIC_ASSERT( state, CardState );
D_ASSERT( offset != NULL ); D_ASSERT( offset != NULL );
D_FLAGS_ASSERT( flags, DSMF_ALL ); D_FLAGS_ASSERT( flags, DSMF_ALL );
 End of changes. 10 change blocks. 
3 lines changed or deleted 54 lines changed or added


 surface.h   surface.h 
/* /*
(c) Copyright 2001-2010 The world wide DirectFB Open Source Community ( directfb.org) (c) Copyright 2001-2012 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 57 skipping to change at line 57
CSNF_SIZEFORMAT = 0x00000001, /* width, height, format */ CSNF_SIZEFORMAT = 0x00000001, /* width, height, format */
CSNF_SYSTEM = 0x00000002, /* system instance information */ CSNF_SYSTEM = 0x00000002, /* system instance information */
CSNF_VIDEO = 0x00000004, /* video instance information */ CSNF_VIDEO = 0x00000004, /* video instance information */
CSNF_DESTROY = 0x00000008, /* surface is about to be destroyed */ CSNF_DESTROY = 0x00000008, /* surface is about to be destroyed */
CSNF_FLIP = 0x00000010, /* surface buffer pointer swapped * / CSNF_FLIP = 0x00000010, /* surface buffer pointer swapped * /
CSNF_FIELD = 0x00000020, /* active (displayed) field switche d */ CSNF_FIELD = 0x00000020, /* active (displayed) field switche d */
CSNF_PALETTE_CHANGE = 0x00000040, /* another palette has been set */ CSNF_PALETTE_CHANGE = 0x00000040, /* another palette has been set */
CSNF_PALETTE_UPDATE = 0x00000080, /* current palette has been altered */ CSNF_PALETTE_UPDATE = 0x00000080, /* current palette has been altered */
CSNF_ALPHA_RAMP = 0x00000100, /* alpha ramp was modified */ CSNF_ALPHA_RAMP = 0x00000100, /* alpha ramp was modified */
CSNF_DISPLAY = 0x00000200, /* surface buffer displayed */ CSNF_DISPLAY = 0x00000200, /* surface buffer displayed */
CSNF_FRAME = 0x00000400, /* flip count ack */
CSNF_BUFFER_ALLOCATION_DESTROY
= 0x00000800, /* Buffer allocation about to be de
stroyed */
CSNF_ALL = 0x000003FF CSNF_ALL = 0x00000FFF
} CoreSurfaceNotificationFlags; } CoreSurfaceNotificationFlags;
typedef struct { typedef struct {
CoreSurfaceNotificationFlags flags; CoreSurfaceNotificationFlags flags;
CoreSurface *surface; CoreSurface *surface;
/* The following field is used only by the CSNF_DISPLAY message. */
int index; int index;
/* The following fields are used only by the CSNF_BUFFER_ALLOCATION_DE
STROY message. */
CoreSurfaceBuffer *buffer_no_access; /* Pointer to associated CoreSur
faceBuffer being
destroyed. Do not dereference
. */
void *surface_data; /* CoreSurface's shared driver s
pecific data. */
int surface_object_id; /* CoreSurface's Fusion ID. */
unsigned int flip_count;
} CoreSurfaceNotification; } CoreSurfaceNotification;
typedef enum { typedef enum {
CSCH_NOTIFICATION,
CSCH_EVENT,
} CoreSurfaceChannel;
typedef enum {
CSCONF_NONE = 0x00000000, CSCONF_NONE = 0x00000000,
CSCONF_SIZE = 0x00000001, CSCONF_SIZE = 0x00000001,
CSCONF_FORMAT = 0x00000002, CSCONF_FORMAT = 0x00000002,
CSCONF_CAPS = 0x00000004, CSCONF_CAPS = 0x00000004,
CSCONF_COLORSPACE = 0x00000008, CSCONF_COLORSPACE = 0x00000008,
CSCONF_PREALLOCATED = 0x00000010, CSCONF_PREALLOCATED = 0x00000010,
CSCONF_ALL = 0x0000001F CSCONF_ALL = 0x0000001F
skipping to change at line 108 skipping to change at line 125
typedef struct { typedef struct {
CoreSurfaceConfigFlags flags; CoreSurfaceConfigFlags flags;
DFBDimension size; DFBDimension size;
DFBSurfacePixelFormat format; DFBSurfacePixelFormat format;
DFBSurfaceColorSpace colorspace; DFBSurfaceColorSpace colorspace;
DFBSurfaceCapabilities caps; DFBSurfaceCapabilities caps;
struct { struct {
void *addr; void *addr; /* " */
int pitch; unsigned long phys; /* " */
unsigned long handle; unsigned long offset; /* " */
unsigned int pitch; /* " */
void *handle; /* " */
} preallocated[MAX_SURFACE_BUFFERS]; } preallocated[MAX_SURFACE_BUFFERS];
CoreSurfacePoolID preallocated_pool_id;
DFBDimension min_size; DFBDimension min_size;
} CoreSurfaceConfig; } CoreSurfaceConfig;
typedef enum { typedef enum {
CSP_SYSTEMONLY = 0x00000000, /* never try to swap CSP_SYSTEMONLY = 0x00000000, /* never try to swap
into video memory */ into video memory */
CSP_VIDEOLOW = 0x00000001, /* try to store in video memory, CSP_VIDEOLOW = 0x00000001, /* try to store in video memory,
low priority */ low priority */
CSP_VIDEOHIGH = 0x00000002, /* try to store in video memory, CSP_VIDEOHIGH = 0x00000002, /* try to store in video memory,
high priority */ high priority */
skipping to change at line 216 skipping to change at line 238
int field; int field;
u8 alpha_ramp[4]; u8 alpha_ramp[4];
CoreSurfaceBuffer **buffers; CoreSurfaceBuffer **buffers;
CoreSurfaceBuffer *left_buffers[MAX_SURFACE_BUFFERS]; CoreSurfaceBuffer *left_buffers[MAX_SURFACE_BUFFERS];
CoreSurfaceBuffer *right_buffers[MAX_SURFACE_BUFFERS]; CoreSurfaceBuffer *right_buffers[MAX_SURFACE_BUFFERS];
int num_buffers; int num_buffers;
int buffer_indices[MAX_SURFACE_BUFFERS]; int buffer_indices[MAX_SURFACE_BUFFERS];
unsigned int flips; u32 flips;
CorePalette *palette; CorePalette *palette;
GlobalReaction palette_reaction; GlobalReaction palette_reaction;
FusionSHMPoolShared *shmpool; FusionSHMPoolShared *shmpool;
void *data; /* Shared system driver-specifi c data for this surface. */ void *data; /* Shared system driver-specifi c data for this surface. */
FusionCall call; FusionCall call;
FusionVector clients;
u32 flips_acked;
}; };
#define CORE_SURFACE_ASSERT(surface)
\
do {
\
D_MAGIC_ASSERT( surface, CoreSurface );
\
} while (0)
/* /*
* Creates a pool of surface objects. * Creates a pool of surface objects.
*/ */
FusionObjectPool *dfb_surface_pool_create( const FusionWorld *world ); FusionObjectPool *dfb_surface_pool_create( const FusionWorld *world );
/* /*
* Generates dfb_surface_ref(), dfb_surface_attach() etc. * Generates dfb_surface_ref(), dfb_surface_attach() etc.
*/ */
FUSION_OBJECT_METHODS( CoreSurface, dfb_surface ) FUSION_OBJECT_METHODS( CoreSurface, dfb_surface )
skipping to change at line 265 skipping to change at line 295
DFBResult dfb_surface_init_palette ( CoreDFB *core, DFBResult dfb_surface_init_palette ( CoreDFB *core,
CoreSurface *surface ); CoreSurface *surface );
DFBResult dfb_surface_notify ( CoreSurface *surface , DFBResult dfb_surface_notify ( CoreSurface *surface ,
CoreSurfaceNotificationFlags flags); CoreSurfaceNotificationFlags flags);
DFBResult dfb_surface_notify_display( CoreSurface *surface , DFBResult dfb_surface_notify_display( CoreSurface *surface ,
CoreSurfaceBuffer *buffer) ; CoreSurfaceBuffer *buffer) ;
DFBResult dfb_surface_notify_frame ( CoreSurface *surface
,
unsigned int flip_co
unt );
/*
Prepares and sends a notification message that a change is about to ha
ppen to the specified
surface buffer pool allocation. The notification message will be rece
ived by all pocesses
that have listeners attached to the associated CoreSurface's reactor.
At present, only THE CSNF_BUFFER_ALLOCATION_DESTROY message is handled
.
*/
DFBResult dfb_surface_pool_notify ( CoreSurface *surface
,
CoreSurfaceBuffer *buffer,
CoreSurfaceAllocation *allocat
ion,
CoreSurfaceNotificationFlags flags )
;
DFBResult dfb_surface_flip ( CoreSurface *surface , DFBResult dfb_surface_flip ( CoreSurface *surface ,
bool swap ); bool swap );
DFBResult dfb_surface_dispatch_event( CoreSurface *surface
,
DFBSurfaceEventType type );
DFBResult dfb_surface_dispatch_update( CoreSurface *surfac
e,
const DFBRegion *update
,
const DFBRegion *update
_right );
DFBResult dfb_surface_reconfig ( CoreSurface *surface , DFBResult dfb_surface_reconfig ( CoreSurface *surface ,
const CoreSurfaceConfig *config ); const CoreSurfaceConfig *config );
DFBResult dfb_surface_destroy_buffers( CoreSurface *surface ); DFBResult dfb_surface_destroy_buffers( CoreSurface *surface );
DFBResult dfb_surface_deallocate_buffers( CoreSurface *surface
);
DFBResult dfb_surface_destroy ( CoreSurface *surface
);
DFBResult dfb_surface_lock_buffer ( CoreSurface *surface , DFBResult dfb_surface_lock_buffer ( CoreSurface *surface ,
CoreSurfaceBufferRole role, CoreSurfaceBufferRole role,
CoreSurfaceAccessorID accesso r, CoreSurfaceAccessorID accesso r,
CoreSurfaceAccessFlags access, CoreSurfaceAccessFlags access,
CoreSurfaceBufferLock *ret_loc k ); CoreSurfaceBufferLock *ret_loc k );
DFBResult dfb_surface_lock_buffer2 ( CoreSurface *surface
,
CoreSurfaceBufferRole role,
u32 flip_co
unt,
DFBSurfaceStereoEye eye,
CoreSurfaceAccessorID accesso
r,
CoreSurfaceAccessFlags access,
CoreSurfaceBufferLock *ret_loc
k );
DFBResult dfb_surface_unlock_buffer ( CoreSurface *surface , DFBResult dfb_surface_unlock_buffer ( CoreSurface *surface ,
CoreSurfaceBufferLock *lock ); CoreSurfaceBufferLock *lock );
DFBResult dfb_surface_read_buffer ( CoreSurface *surface , DFBResult dfb_surface_read_buffer ( CoreSurface *surface ,
CoreSurfaceBufferRole role, CoreSurfaceBufferRole role,
void *destina tion, void *destina tion,
int pitch, int pitch,
const DFBRectangle *rect ); const DFBRectangle *rect );
DFBResult dfb_surface_write_buffer ( CoreSurface *surface , DFBResult dfb_surface_write_buffer ( CoreSurface *surface ,
CoreSurfaceBufferRole role, CoreSurfaceBufferRole role,
const void *source, const void *source,
int pitch, int pitch,
const DFBRectangle *rect ); const DFBRectangle *rect );
DFBResult dfb_surface_dump_buffer ( CoreSurface *surface , DFBResult dfb_surface_dump_buffer ( CoreSurface *surface ,
CoreSurfaceBufferRole role, CoreSurfaceBufferRole role,
const char *path, const char *path,
const char *prefix ); const char *prefix );
DFBResult dfb_surface_dump_buffer2 ( CoreSurface *surface
,
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye,
const char *path,
const char *prefix
);
DFBResult dfb_surface_set_palette ( CoreSurface *surface , DFBResult dfb_surface_set_palette ( CoreSurface *surface ,
CorePalette *palette ); CorePalette *palette );
DFBResult dfb_surface_set_field ( CoreSurface *surface , DFBResult dfb_surface_set_field ( CoreSurface *surface ,
int field ) ; int field ) ;
DFBResult dfb_surface_set_alpha_ramp( CoreSurface *surface , DFBResult dfb_surface_set_alpha_ramp( CoreSurface *surface ,
u8 a0, u8 a0,
u8 a1, u8 a1,
u8 a2, u8 a2,
u8 a3 ); u8 a3 );
static inline DirectResult DFBResult dfb_surface_clear_buffers ( CoreSurface *surfac
e );
static __inline__ DirectResult
dfb_surface_lock( CoreSurface *surface ) dfb_surface_lock( CoreSurface *surface )
{ {
D_MAGIC_ASSERT( surface, CoreSurface ); D_MAGIC_ASSERT( surface, CoreSurface );
return fusion_skirmish_prevail( &surface->lock ); return fusion_skirmish_prevail( &surface->lock );
} }
static inline DirectResult static __inline__ DirectResult
dfb_surface_trylock( CoreSurface *surface ) dfb_surface_trylock( CoreSurface *surface )
{ {
D_MAGIC_ASSERT( surface, CoreSurface ); D_MAGIC_ASSERT( surface, CoreSurface );
return fusion_skirmish_swoop( &surface->lock ); return fusion_skirmish_swoop( &surface->lock );
} }
static inline DirectResult static __inline__ DirectResult
dfb_surface_unlock( CoreSurface *surface ) dfb_surface_unlock( CoreSurface *surface )
{ {
D_MAGIC_ASSERT( surface, CoreSurface ); D_MAGIC_ASSERT( surface, CoreSurface );
return fusion_skirmish_dismiss( &surface->lock ); return fusion_skirmish_dismiss( &surface->lock );
} }
static inline CoreSurfaceBuffer * static __inline__ CoreSurfaceBuffer *
dfb_surface_get_buffer( CoreSurface *surface, dfb_surface_get_buffer( CoreSurface *surface,
CoreSurfaceBufferRole role ) CoreSurfaceBufferRole role )
{ {
D_MAGIC_ASSERT( surface, CoreSurface ); D_MAGIC_ASSERT( surface, CoreSurface );
D_ASSERT( role == CSBR_FRONT || role == CSBR_BACK || role == CSBR_IDLE ); D_ASSERT( role == CSBR_FRONT || role == CSBR_BACK || role == CSBR_IDLE );
D_ASSERT( surface->num_buffers > 0 ); D_ASSERT( surface->num_buffers > 0 );
return surface->buffers[ surface->buffer_indices[(surface->flips + rol e) % surface->num_buffers] ]; return surface->buffers[ surface->buffer_indices[(surface->flips + rol e) % surface->num_buffers] ];
} }
static inline void * static __inline__ CoreSurfaceBuffer *
dfb_surface_get_buffer2( CoreSurface *surface,
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye )
{
D_MAGIC_ASSERT( surface, CoreSurface );
D_ASSERT( role == CSBR_FRONT || role == CSBR_BACK || role == CSBR_IDLE
);
D_ASSERT( eye == DSSE_LEFT || eye == DSSE_RIGHT );
D_ASSERT( surface->num_buffers > 0 );
if (eye == DSSE_LEFT)
return surface->left_buffers[ surface->buffer_indices[(surface->f
lips + role) % surface->num_buffers] ];
return surface->right_buffers[ surface->buffer_indices[(surface->flips
+ role) % surface->num_buffers] ];
}
static __inline__ CoreSurfaceBuffer *
dfb_surface_get_buffer3( CoreSurface *surface,
CoreSurfaceBufferRole role,
DFBSurfaceStereoEye eye,
u32 flip_count )
{
D_MAGIC_ASSERT( surface, CoreSurface );
D_ASSERT( role == CSBR_FRONT || role == CSBR_BACK || role == CSBR_IDLE
);
D_ASSERT( eye == DSSE_LEFT || eye == DSSE_RIGHT );
D_ASSERT( surface->num_buffers > 0 );
if (eye == DSSE_LEFT)
return surface->left_buffers[ surface->buffer_indices[(flip_count
+ role) % surface->num_buffers] ];
return surface->right_buffers[ surface->buffer_indices[(flip_count + r
ole) % surface->num_buffers] ];
}
static __inline__ void *
dfb_surface_data_offset( const CoreSurface *surface, dfb_surface_data_offset( const CoreSurface *surface,
void *data, void *data,
int pitch, int pitch,
int x, int x,
int y ) int y )
{ {
D_ASSERT( surface != NULL ); D_ASSERT( surface != NULL );
D_ASSERT( data != NULL ); D_ASSERT( data != NULL );
D_ASSERT( pitch > 0 ); D_ASSERT( pitch > 0 );
D_ASSERT( x >= 0 ); D_ASSERT( x >= 0 );
skipping to change at line 372 skipping to change at line 479
if (surface->config.caps & DSCAPS_SEPARATED) { if (surface->config.caps & DSCAPS_SEPARATED) {
if (y & 1) if (y & 1)
y += surface->config.size.h; y += surface->config.size.h;
y >>= 1; y >>= 1;
} }
return (u8*)data + pitch * y + DFB_BYTES_PER_LINE( surface->config.for mat, x ); return (u8*)data + pitch * y + DFB_BYTES_PER_LINE( surface->config.for mat, x );
} }
static inline void static __inline__ void
dfb_surface_calc_buffer_size( CoreSurface *surface, dfb_surface_calc_buffer_size( CoreSurface *surface,
int byte_align, int byte_align,
int pixel_align, int pixel_align,
int *ret_pitch, int *ret_pitch,
int *ret_size ) int *ret_size )
{ {
DFBSurfacePixelFormat format; DFBSurfacePixelFormat format;
int width; int width;
int pitch; int pitch;
skipping to change at line 397 skipping to change at line 504
width = direct_util_align( surface->config.size.w, pixel_align ); width = direct_util_align( surface->config.size.w, pixel_align );
pitch = direct_util_align( DFB_BYTES_PER_LINE( format, width ), byte_a lign ); pitch = direct_util_align( DFB_BYTES_PER_LINE( format, width ), byte_a lign );
if (ret_pitch) if (ret_pitch)
*ret_pitch = pitch; *ret_pitch = pitch;
if (ret_size) if (ret_size)
*ret_size = pitch * DFB_PLANE_MULTIPLY( format, surface->config.s ize.h ); *ret_size = pitch * DFB_PLANE_MULTIPLY( format, surface->config.s ize.h );
} }
static inline void static __inline__ void
dfb_surface_caps_apply_policy( CoreSurfacePolicy policy, dfb_surface_caps_apply_policy( CoreSurfacePolicy policy,
DFBSurfaceCapabilities *caps ) DFBSurfaceCapabilities *caps )
{ {
switch (policy) { switch (policy) {
case CSP_SYSTEMONLY: case CSP_SYSTEMONLY:
*caps = (DFBSurfaceCapabilities)((*caps & ~DSCAPS_VIDEOONLY) | DSCAPS_SYSTEMONLY); *caps = (DFBSurfaceCapabilities)((*caps & ~DSCAPS_VIDEOONLY) | DSCAPS_SYSTEMONLY);
break; break;
case CSP_VIDEOONLY: case CSP_VIDEOONLY:
*caps = (DFBSurfaceCapabilities)((*caps & ~DSCAPS_SYSTEMONLY ) | DSCAPS_VIDEOONLY); *caps = (DFBSurfaceCapabilities)((*caps & ~DSCAPS_SYSTEMONLY ) | DSCAPS_VIDEOONLY);
break; break;
default: default:
*caps = (DFBSurfaceCapabilities)(*caps & ~(DSCAPS_SYSTEMONLY | DSCAPS_VIDEOONLY)); *caps = (DFBSurfaceCapabilities)(*caps & ~(DSCAPS_SYSTEMONLY | DSCAPS_VIDEOONLY));
break; break;
} }
} }
static inline DFBResult static __inline__ DFBResult
dfb_surface_resize( CoreSurface *surface, dfb_surface_resize( CoreSurface *surface,
int width, int width,
int height ) int height )
{ {
CoreSurfaceConfig config; CoreSurfaceConfig config;
D_MAGIC_ASSERT( surface, CoreSurface ); D_MAGIC_ASSERT( surface, CoreSurface );
D_ASSERT( width > 0 ); D_ASSERT( width > 0 );
D_ASSERT( height > 0 ); D_ASSERT( height > 0 );
config.flags = CSCONF_SIZE; config.flags = CSCONF_SIZE;
config.size.w = width; config.size.w = width;
config.size.h = height; config.size.h = height;
return dfb_surface_reconfig( surface, &config ); return dfb_surface_reconfig( surface, &config );
} }
static inline DFBResult static __inline__ DFBResult
dfb_surface_reformat( CoreSurface *surface, dfb_surface_reformat( CoreSurface *surface,
int width, int width,
int height, int height,
DFBSurfacePixelFormat format ) DFBSurfacePixelFormat format )
{ {
CoreSurfaceConfig config; CoreSurfaceConfig config;
D_MAGIC_ASSERT( surface, CoreSurface ); D_MAGIC_ASSERT( surface, CoreSurface );
D_ASSERT( width > 0 ); D_ASSERT( width > 0 );
D_ASSERT( height > 0 ); D_ASSERT( height > 0 );
skipping to change at line 463 skipping to change at line 570
/* global reactions */ /* global reactions */
ReactionResult _dfb_surface_palette_listener( const void *msg_data, ReactionResult _dfb_surface_palette_listener( const void *msg_data,
void *ctx ); void *ctx );
typedef enum { typedef enum {
DFB_LAYER_REGION_SURFACE_LISTENER, DFB_LAYER_REGION_SURFACE_LISTENER,
DFB_WINDOWSTACK_BACKGROUND_IMAGE_LISTENER DFB_WINDOWSTACK_BACKGROUND_IMAGE_LISTENER
} DFB_SURFACE_GLOBALS; } DFB_SURFACE_GLOBALS;
static inline void
dfb_surface_set_stereo_eye( CoreSurface *surface,
DFBSurfaceStereoEye eye )
{
D_ASSERT( surface != NULL );
D_MAGIC_ASSERT( surface, CoreSurface );
D_ASSERT( eye & (DSSE_LEFT | DSSE_RIGHT) );
if (eye & DSSE_LEFT)
surface->buffers = surface->left_buffers;
else
surface->buffers = surface->right_buffers;
}
static inline DFBSurfaceStereoEye
dfb_surface_get_stereo_eye( CoreSurface *surface )
{
D_ASSERT( surface != NULL );
D_MAGIC_ASSERT( surface, CoreSurface );
if (surface->buffers == surface->left_buffers)
return DSSE_LEFT;
else
return DSSE_RIGHT;
}
#endif #endif
 End of changes. 26 change blocks. 
41 lines changed or deleted 157 lines changed or added


 surface_buffer.h   surface_buffer.h 
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__SURFACE_BUFFER_H__ #ifndef __CORE__SURFACE_BUFFER_H__
#define __CORE__SURFACE_BUFFER_H__ #define __CORE__SURFACE_BUFFER_H__
#include <direct/debug.h> #include <direct/debug.h>
#include <fusion/object.h>
#include <fusion/vector.h> #include <fusion/vector.h>
#include <core/surface.h> #include <core/surface.h>
#include <core/surface_allocation.h>
#include <directfb.h> #include <directfb.h>
/* /*
* Configuration and State flags of a Surface Buffer * Configuration and State flags of a Surface Buffer
*/ */
typedef enum { typedef enum {
CSBF_NONE = 0x00000000, /* None of these. */ CSBF_NONE = 0x00000000, /* None of these. */
CSBF_STICKED = 0x00000001, /* Sticked to one Surface Pool, e.g. sys tem only. */ CSBF_STICKED = 0x00000001, /* Sticked to one Surface Pool, e.g. sys tem only. */
CSBF_ALL = 0x00000001 /* All of these. */ CSBF_ALL = 0x00000001 /* All of these. */
} CoreSurfaceBufferFlags; } CoreSurfaceBufferFlags;
/*
* Configuration and State flags of a Surface Buffer Allocation
*/
typedef enum { typedef enum {
CSALF_NONE = 0x00000000, /* None of these. */ CSBNF_NONE = 0x00000000
} CoreSurfaceBufferNotificationFlags;
CSALF_ONEFORALL = 0x00000001, /* Only one allocation in pool for
all buffers. */
CSALF_VOLATILE = 0x00000002, /* Allocation should be freed when
no longer up to date. */
CSALF_PREALLOCATED = 0x00000004, /* Preallocated memory, don't zap w
hen "thrifty-surface-buffers" is active. */
CSALF_MUCKOUT = 0x00001000, /* Indicates surface pool being in
the progress of mucking out this and possibly
other allocations to have enough
space for a new allocation to be made. */
CSALF_ALL = 0x00001007 /* All of these. */
} CoreSurfaceAllocationFlags;
/*
* An Allocation of a Surface Buffer
*/
struct __DFB_CoreSurfaceAllocation {
int magic;
DirectSerial serial; /* Equals serial of buffe
r if content is up to date. */
CoreSurfaceBuffer *buffer; /* Surface Buffer owning
this allocation. */
CoreSurface *surface; /* Surface owning the Buf
fer of this allocation. */
CoreSurfacePool *pool; /* Surface Pool providing
the allocation. */
void *data; /* Pool's private data fo
r this allocation. */
int size; /* Amount of data used by
this allocation. */
unsigned long offset; /* Offset within address
range of pool if contiguous. */
CoreSurfaceAllocationFlags flags; /* Pool can return CSALF_
ONEFORALL upon allocation of first buffer. */
const CoreSurfaceAccessFlags *access; /* Possible acc typedef struct {
ess flags (pointer to pool description). */ CoreSurfaceBufferNotificationFlags flags;
CoreSurfaceAccessFlags accessed[_CSAID_NUM]; /* Access since } CoreSurfaceBufferNotification;
last synchronization. */
};
#define CORE_SURFACE_ALLOCATION_ASSERT(alloc)
\
do {
\
D_MAGIC_ASSERT( alloc, CoreSurfaceAllocation );
\
D_ASSUME( (alloc)->size > 0 );
\
D_ASSERT( (alloc)->size >= 0 );
\
D_ASSERT( (alloc)->offset + (alloc)->size <= ((alloc)->pool->desc
.size ?:~0UL) ); \
D_FLAGS_ASSERT( (alloc)->access[CSAID_CPU], CSAF_ALL );
\
D_FLAGS_ASSERT( (alloc)->access[CSAID_GPU], CSAF_ALL );
\
D_FLAGS_ASSERT( (alloc)->flags, CSALF_ALL );
\
D_FLAGS_ASSERT( (alloc)->accessed[CSAID_CPU], CSAF_ALL );
\
D_FLAGS_ASSERT( (alloc)->accessed[CSAID_GPU], CSAF_ALL );
\
} while (0)
/* /*
* A Lock on a Surface Buffer * A Lock on a Surface Buffer
*/ */
struct __DFB_CoreSurfaceBufferLock { struct __DFB_CoreSurfaceBufferLock {
int magic; /* Must be valid before c alling dfb_surface_pool_lock() */ int magic; /* Must be valid before c alling dfb_surface_pool_lock() */
CoreSurfaceAccessorID accessor; /* " */ CoreSurfaceAccessorID accessor; /* " */
CoreSurfaceAccessFlags access; /* " */ CoreSurfaceAccessFlags access; /* " */
CoreSurfaceBuffer *buffer; /* Set by dfb_surface_poo l_lock() */ CoreSurfaceBuffer *buffer; /* Set by dfb_surface_poo l_lock() */
CoreSurfaceAllocation *allocation; /* " */ CoreSurfaceAllocation *allocation; /* " */
void *addr; /* " */ void *addr; /* " */
unsigned long phys; /* " */ unsigned long phys; /* " */
unsigned long offset; /* " */ unsigned long offset; /* " */
unsigned int pitch; /* " */ unsigned int pitch; /* " */
void *handle; /* " */ void* handle; /* " */
}; };
static inline void static inline void
dfb_surface_buffer_lock_reset( CoreSurfaceBufferLock *lock ) dfb_surface_buffer_lock_reset( CoreSurfaceBufferLock *lock )
{ {
D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock );
lock->buffer = NULL; lock->buffer = NULL;
lock->allocation = NULL; lock->allocation = NULL;
lock->addr = NULL; lock->addr = NULL;
lock->phys = 0; lock->phys = 0;
lock->offset = ~0; lock->offset = ~0;
lock->pitch = 0; lock->pitch = 0;
lock->handle = NULL; lock->handle = 0;
} }
static inline void static inline void
dfb_surface_buffer_lock_init( CoreSurfaceBufferLock *lock, CoreSurfaceAcces sorID accessor, CoreSurfaceAccessFlags access ) dfb_surface_buffer_lock_init( CoreSurfaceBufferLock *lock, CoreSurfaceAcces sorID accessor, CoreSurfaceAccessFlags access )
{ {
D_MAGIC_SET( lock, CoreSurfaceBufferLock ); D_MAGIC_SET_ONLY( lock, CoreSurfaceBufferLock );
lock->accessor = accessor; lock->accessor = accessor;
lock->access = access; lock->access = access;
dfb_surface_buffer_lock_reset( lock ); dfb_surface_buffer_lock_reset( lock );
} }
static inline void static inline void
dfb_surface_buffer_lock_deinit( CoreSurfaceBufferLock *lock ) dfb_surface_buffer_lock_deinit( CoreSurfaceBufferLock *lock )
{ {
skipping to change at line 161 skipping to change at line 121
lock->accessor = CSAID_NONE; lock->accessor = CSAID_NONE;
lock->access = CSAF_NONE; lock->access = CSAF_NONE;
D_MAGIC_CLEAR( lock ); D_MAGIC_CLEAR( lock );
} }
#define CORE_SURFACE_BUFFER_LOCK_ASSERT(lock) \ #define CORE_SURFACE_BUFFER_LOCK_ASSERT(lock) \
do { \ do { \
D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); \ D_MAGIC_ASSERT( lock, CoreSurfaceBufferLock ); \
D_FLAGS_ASSERT( (lock)->access, CSAF_ALL ); \ D_FLAGS_ASSERT( (lock)->access, CSAF_ALL ); \
if ((lock)->buffer) { if ((lock)->allocation) {
\ \
D_ASSERT( (lock)->allocation != NULL ); /*D_ASSERT( (lock)->buffer == (lock)->allocation->buffer );*
\ / \
D_ASSERT( (lock)->buffer == (lock)->allocation->buffer );
\
D_ASSUME( (lock)->addr != NULL || (lock)->phys != 0 || (lock )->offset != ~0 || (lock)->handle != NULL );\ D_ASSUME( (lock)->addr != NULL || (lock)->phys != 0 || (lock )->offset != ~0 || (lock)->handle != NULL );\
D_ASSUME( (lock)->offset == (lock)->allocation->offset || (l ock)->offset == ~0 ); \ D_ASSUME( (lock)->offset == (lock)->allocation->offset || (l ock)->offset == ~0 ); \
D_ASSERT( (lock)->pitch > 0 || ((lock)->addr == NULL && (loc k)->phys == 0) ); \ D_ASSERT( (lock)->pitch > 0 || ((lock)->addr == NULL && (loc k)->phys == 0) ); \
} \ } \
else { \ else { \
D_ASSERT( (lock)->allocation == NULL ); \ D_ASSERT( (lock)->buffer == NULL ); \
D_ASSERT( (lock)->addr == NULL ); \ D_ASSERT( (lock)->addr == NULL ); \
D_ASSERT( (lock)->phys == 0 ); \ D_ASSERT( (lock)->phys == 0 ); \
D_ASSERT( (lock)->offset == ~0 ); \ D_ASSERT( (lock)->offset == ~0 ); \
D_ASSERT( (lock)->pitch == 0 ); \ D_ASSERT( (lock)->pitch == 0 ); \
D_ASSERT( (lock)->handle == NULL ); \ D_ASSERT( (lock)->handle == NULL ); \
} \ } \
} while (0) } while (0)
/* /*
* A Surface Buffer of a Surface * A Surface Buffer of a Surface
*/ */
struct __DFB_CoreSurfaceBuffer { struct __DFB_CoreSurfaceBuffer {
FusionObject object;
int magic; int magic;
DirectSerial serial; /* Increased when content is w ritten. */ DirectSerial serial; /* Increased when content is w ritten. */
CoreSurfaceAllocation *written; /* Allocation with the last wr ite access. */ CoreSurfaceAllocation *written; /* Allocation with the last wr ite access. */
CoreSurfaceAllocation *read; /* Allocation with the last re ad access. */ CoreSurfaceAllocation *read; /* Allocation with the last re ad access. */
CoreSurface *surface; /* Surface owning this Surface Buffer. */ CoreSurface *surface; /* Surface owning this Surface Buffer. */
CoreSurfacePolicy policy; CoreSurfacePolicy policy;
CoreSurfaceBufferFlags flags; /* Configuration and State fla gs. */ CoreSurfaceBufferFlags flags; /* Configuration and State fla gs. */
DFBSurfacePixelFormat format; /* Pixel format of buffer data . */ DFBSurfacePixelFormat format; /* Pixel format of buffer data . */
FusionVector allocs; /* Allocations within Surface Pools. */ FusionVector allocs; /* Allocations within Surface Pools. */
#if 1 CoreSurfaceConfig config; /* Configuration of its surfac
unsigned int locked; /* Lock count. FIXME: Add fail e at the time of the buffer creation */
safe cleanup! */ CoreSurfaceTypeFlags type;
#endif unsigned long resource_id; /* layer id, window id, or use
r specified */
}; };
DFBResult dfb_surface_buffer_new ( CoreSurface *surface, #define CORE_SURFACE_BUFFER_ASSERT(buffer)
\
do {
\
D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer );
\
} while (0)
DFBResult dfb_surface_buffer_create ( CoreDFB *core,
CoreSurface *surface,
CoreSurfaceBufferFlags flags, CoreSurfaceBufferFlags flags,
CoreSurfaceBuffer **ret_buffer ) ; CoreSurfaceBuffer **ret_buffer ) ;
DFBResult dfb_surface_buffer_destroy( CoreSurfaceBuffer *buffer ); DFBResult dfb_surface_buffer_decouple( CoreSurfaceBuffer *buffer );
DFBResult dfb_surface_buffer_deallocate( CoreSurfaceBuffer *buffer );
DFBResult dfb_surface_buffer_lock ( CoreSurfaceBuffer *buffer, DFBResult dfb_surface_buffer_lock ( CoreSurfaceBuffer *buffer,
CoreSurfaceAccessorID accessor, CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access, CoreSurfaceAccessFlags access,
CoreSurfaceBufferLock *ret_lock ); CoreSurfaceBufferLock *ret_lock );
DFBResult dfb_surface_buffer_unlock ( CoreSurfaceBufferLock *lock ); DFBResult dfb_surface_buffer_unlock ( CoreSurfaceBufferLock *lock );
DFBResult dfb_surface_buffer_read ( CoreSurfaceBuffer *buffer, DFBResult dfb_surface_buffer_read ( CoreSurfaceBuffer *buffer,
void *destination, void *destination,
skipping to change at line 259 skipping to change at line 228
if (surface->config.caps & DSCAPS_STEREO) if (surface->config.caps & DSCAPS_STEREO)
if (surface->right_buffers[index] == buffer) if (surface->right_buffers[index] == buffer)
return index; return index;
} }
D_ASSERT( index<MAX_SURFACE_BUFFERS ); D_ASSERT( index<MAX_SURFACE_BUFFERS );
return 0; return 0;
} }
DFBResult dfb_surface_allocation_update( CoreSurfaceAllocation *allocation FUSION_OBJECT_METHODS( CoreSurfaceBuffer, dfb_surface_buffer )
,
CoreSurfaceAccessFlags access ); FusionObjectPool *dfb_surface_buffer_pool_create( const FusionWorld *world
);
#endif #endif
 End of changes. 15 change blocks. 
92 lines changed or deleted 39 lines changed or added


 surface_pool.h   surface_pool.h 
/* /*
(c) Copyright 2001-2010 The world wide DirectFB Open Source Community ( directfb.org) (c) Copyright 2001-2012 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 169 skipping to change at line 169
int pitch, int pitch,
const DFBRectangle *rect ); const DFBRectangle *rect );
/* /*
* Muck out * Muck out
*/ */
DFBResult (*MuckOut) ( CoreSurfacePool *pool, DFBResult (*MuckOut) ( CoreSurfacePool *pool,
void *pool_data, void *pool_data,
void *pool_local, void *pool_local,
CoreSurfaceBuffer *buffer ); CoreSurfaceBuffer *buffer );
/*
* Manage interlocks
*/
DFBResult (*PreLock) ( CoreSurfacePool *pool,
void *pool_data,
void *pool_local,
CoreSurfaceAllocation *allocation,
void *alloc_data,
CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access );
/*
* Handle preallocation
*
* The surface pool checks the description and extracts/generates
* information for the surface configuration, to be later used in
* the AllocateBuffer function.
*/
DFBResult (*PreAlloc)( CoreSurfacePool *pool,
void *pool_data,
void *pool_local,
const DFBSurfaceDescription *description,
CoreSurfaceConfig *config );
} SurfacePoolFuncs; } SurfacePoolFuncs;
struct __DFB_CoreSurfacePool { struct __DFB_CoreSurfacePool {
int magic; int magic;
FusionSkirmish lock; FusionSkirmish lock;
CoreSurfacePoolID pool_id; CoreSurfacePoolID pool_id;
CoreSurfacePoolDescription desc; CoreSurfacePoolDescription desc;
skipping to change at line 199 skipping to change at line 223
CoreSurfacePool *backup; CoreSurfacePool *backup;
}; };
typedef DFBEnumerationResult (*CoreSurfacePoolCallback)( CoreSurfacePool *p ool, typedef DFBEnumerationResult (*CoreSurfacePoolCallback)( CoreSurfacePool *p ool,
void *c tx ); void *c tx );
typedef DFBEnumerationResult (*CoreSurfaceAllocCallback)( CoreSurfaceAlloca tion *allocation, typedef DFBEnumerationResult (*CoreSurfaceAllocCallback)( CoreSurfaceAlloca tion *allocation,
void *ctx ); void *ctx );
DFBResult dfb_surface_pools_prealloc ( const DFBSurfaceDescription *descrip
tion,
CoreSurfaceConfig *config
);
DFBResult dfb_surface_pools_negotiate( CoreSurfaceBuffer *buffer, DFBResult dfb_surface_pools_negotiate( CoreSurfaceBuffer *buffer,
CoreSurfaceAccessorID accessor, CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access, CoreSurfaceAccessFlags access,
CoreSurfacePool **ret_pools, CoreSurfacePool **ret_pools,
unsigned int max_pools, unsigned int max_pools,
unsigned int *ret_num ); unsigned int *ret_num );
DFBResult dfb_surface_pools_enumerate( CoreSurfacePoolCallback callback, DFBResult dfb_surface_pools_enumerate( CoreSurfacePoolCallback callback,
void *ctx ); void *ctx );
DFBResult dfb_surface_pools_lookup ( CoreSurfacePoolID pool_id,
CoreSurfacePool **ret_pool );
DFBResult dfb_surface_pools_allocate ( CoreSurfaceBuffer *buffer, DFBResult dfb_surface_pools_allocate ( CoreSurfaceBuffer *buffer,
CoreSurfaceAccessorID accessor, CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access, CoreSurfaceAccessFlags access,
CoreSurfaceAllocation **ret_allocat ion ); CoreSurfaceAllocation **ret_allocat ion );
DFBResult dfb_surface_pool_initialize( CoreDFB *core, DFBResult dfb_surface_pool_initialize( CoreDFB *core,
const SurfacePoolFuncs *funcs, const SurfacePoolFuncs *funcs,
CoreSurfacePool **ret_pool ); CoreSurfacePool **ret_pool );
DFBResult dfb_surface_pool_initialize2( CoreDFB *core,
const SurfacePoolFuncs *funcs,
void *ctx,
CoreSurfacePool **ret_pool )
;
DFBResult dfb_surface_pool_join ( CoreDFB *core, DFBResult dfb_surface_pool_join ( CoreDFB *core,
CoreSurfacePool *pool, CoreSurfacePool *pool,
const SurfacePoolFuncs *funcs ); const SurfacePoolFuncs *funcs );
DFBResult dfb_surface_pool_join2 ( CoreDFB *core,
CoreSurfacePool *pool,
const SurfacePoolFuncs *funcs,
void *ctx );
DFBResult dfb_surface_pool_destroy ( CoreSurfacePool *pool ); DFBResult dfb_surface_pool_destroy ( CoreSurfacePool *pool );
DFBResult dfb_surface_pool_leave ( CoreSurfacePool *pool ); DFBResult dfb_surface_pool_leave ( CoreSurfacePool *pool );
DFBResult dfb_surface_pool_allocate ( CoreSurfacePool *pool, DFBResult dfb_surface_pool_allocate ( CoreSurfacePool *pool,
CoreSurfaceBuffer *buffer, CoreSurfaceBuffer *buffer,
CoreSurfaceAllocation **ret_allocat ion ); CoreSurfaceAllocation **ret_allocat ion );
DFBResult dfb_surface_pool_deallocate( CoreSurfacePool *pool, DFBResult dfb_surface_pool_deallocate( CoreSurfacePool *pool,
CoreSurfaceAllocation *allocation ); CoreSurfaceAllocation *allocation );
DFBResult dfb_surface_pool_displace ( CoreSurfacePool *pool, DFBResult dfb_surface_pool_displace ( CoreSurfacePool *pool,
CoreSurfaceBuffer *buffer, CoreSurfaceBuffer *buffer,
CoreSurfaceAllocation **ret_allocat ion ); CoreSurfaceAllocation **ret_allocat ion );
DFBResult dfb_surface_pool_prelock ( CoreSurfacePool *pool,
CoreSurfaceAllocation *allocation,
CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access );
DFBResult dfb_surface_pool_lock ( CoreSurfacePool *pool, DFBResult dfb_surface_pool_lock ( CoreSurfacePool *pool,
CoreSurfaceAllocation *allocation, CoreSurfaceAllocation *allocation,
CoreSurfaceBufferLock *lock ); CoreSurfaceBufferLock *lock );
DFBResult dfb_surface_pool_unlock ( CoreSurfacePool *pool, DFBResult dfb_surface_pool_unlock ( CoreSurfacePool *pool,
CoreSurfaceAllocation *allocation, CoreSurfaceAllocation *allocation,
CoreSurfaceBufferLock *lock ); CoreSurfaceBufferLock *lock );
DFBResult dfb_surface_pool_read ( CoreSurfacePool *pool, DFBResult dfb_surface_pool_read ( CoreSurfacePool *pool,
CoreSurfaceAllocation *allocation, CoreSurfaceAllocation *allocation,
skipping to change at line 262 skipping to change at line 307
CoreSurfaceAllocation *allocation, CoreSurfaceAllocation *allocation,
const void *data, const void *data,
int pitch, int pitch,
const DFBRectangle *rect ); const DFBRectangle *rect );
DFBResult dfb_surface_pool_enumerate ( CoreSurfacePool *pool, DFBResult dfb_surface_pool_enumerate ( CoreSurfacePool *pool,
CoreSurfaceAllocCallback callback, CoreSurfaceAllocCallback callback,
void *ctx ); void *ctx );
/* /*
Adds the extra access flags to each of the surface pools that match th
e
CoreSurfaceTypeFlags specified. This allows the graphics driver to
specify in its driver_init_driver function that it supports the local
surface pool, shared surface pool, and/or pre-allocated surface pool.
For example:
dfb_surface_pool_gfx_driver_update( CSTF_INTERNAL | CSTF_PREALLOC
ATED,
CSAID_GPU,
CSAF_READ | CSAF_WRITE );
Returns true if a surface pool was updated, otherwise returns false.
*/
bool dfb_surface_pool_gfx_driver_update( CoreSurfaceTypeFlags types,
CoreSurfaceAccessorID accessor,
CoreSurfaceAccessFlags access );
/*
Get a surface pool's process-specific void data pointer. Get a surface pool's process-specific void data pointer.
*/ */
void *dfb_surface_pool_get_local( const CoreSurfacePool *pool ); void *dfb_surface_pool_get_local( const CoreSurfacePool *pool );
#endif #endif
 End of changes. 8 change blocks. 
1 lines changed or deleted 68 lines changed or added


 surface_pool_bridge.h   surface_pool_bridge.h 
skipping to change at line 38 skipping to change at line 38
#ifndef __CORE__SURFACE_POOL_BRIDGE_H__ #ifndef __CORE__SURFACE_POOL_BRIDGE_H__
#define __CORE__SURFACE_POOL_BRIDGE_H__ #define __CORE__SURFACE_POOL_BRIDGE_H__
#include <directfb.h> #include <directfb.h>
#include <core/coretypes.h> #include <core/coretypes.h>
#include <core/surface.h> #include <core/surface.h>
#include <core/surface_buffer.h> #include <core/surface_buffer.h>
#include <core/surface_pool.h>
typedef enum { typedef enum {
CSPBCAPS_NONE = 0x00000000, CSPBCAPS_NONE = 0x00000000,
CSPBCAPS_ALL = 0x00000000 CSPBCAPS_ALL = 0x00000000
} CoreSurfacePoolBridgeCapabilities; } CoreSurfacePoolBridgeCapabilities;
/* /*
* Increase this number when changes result in binary incompatibility! * Increase this number when changes result in binary incompatibility!
*/ */
#define DFB_SURFACE_POOL_BRIDGE_ABI_VERSION 1 #define DFB_SURFACE_POOL_BRIDGE_ABI_VERSION 1
#define DFB_SURFACE_POOL_BRIDGE_DESC_NAME_LENGTH 44 #define DFB_SURFACE_POOL_BRIDGE_DESC_NAME_LENGTH 44
typedef struct { typedef struct {
CoreSurfacePoolBridgeCapabilities caps; CoreSurfacePoolBridgeCapabilities caps;
char name[DFB_SURFACE_POOL_BRIDGE_DESC_N AME_LENGTH]; char name[DFB_SURFACE_POOL_BRIDGE_DESC_N AME_LENGTH];
CoreSurfacePoolPriority priority;
} CoreSurfacePoolBridgeDescription; } CoreSurfacePoolBridgeDescription;
typedef struct { typedef struct {
int (*PoolBridgeDataSize)( void ); int (*PoolBridgeDataSize)( void );
int (*PoolBridgeLocalDataSize)( void ); int (*PoolBridgeLocalDataSize)( void );
int (*PoolTransferDataSize)( void ); int (*PoolTransferDataSize)( void );
/* /*
* Bridge init/destroy * Bridge init/destroy
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 system.h   system.h 
skipping to change at line 52 skipping to change at line 52
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, CORE_TI_CMEM,
CORE_MESA, CORE_MESA,
CORE_X11VDPAU, CORE_X11VDPAU,
CORE_PVR2D, CORE_PVR2D,
CORE_CARE1,
CORE_ANDROID,
CORE_EGL,
} 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 CSCAPS_ACCELERATION = 0x00000001, /* HW acceleration supported,
obe graphics drivers. */ so probe graphics drivers. */
CSCAPS_PREFER_SHM = 0x00000002, /* Prefer shared memory surface poo CSCAPS_PREFER_SHM = 0x00000002, /* Prefer shared memory surfac
l over local memory pool. */ e pool over local memory pool. */
CSCAPS_SECURE_FUSION = 0x00000004, /* Fusion needs to be in secur
e fusion mode. */
CSCAPS_ALWAYS_INDIRECT = 0x00000008, /* All calls need to be indire
ct. */
CSCAPS_ALL = 0x00000003 /* All of these. */ CSCAPS_ALL = 0x0000000F /* All of these. */
} CoreSystemCapabilities; } CoreSystemCapabilities;
/* /*
* hold information of a Videomode read from /etc/fb.modes * hold information of a Videomode read from /etc/fb.modes
* (to be replaced by DirectFB's own config system) * (to be replaced by DirectFB's own config system)
*/ */
typedef struct _VideoMode { typedef struct _VideoMode {
int xres; int xres;
int yres; int yres;
int bpp; int bpp;
 End of changes. 4 change blocks. 
6 lines changed or deleted 13 lines changed or added


 types.h   types.h 
skipping to change at line 78 skipping to change at line 78
typedef int16_t s16; typedef int16_t s16;
typedef int32_t s32; typedef int32_t s32;
typedef int64_t s64; typedef int64_t s64;
#define __inline__ inline #define __inline__ inline
#define D_UNUSED __attribute__((unused)) #define D_UNUSED __attribute__((unused))
#define __no_instrument_function__ __attribute__((no_instrument_functi on)) #define __no_instrument_function__ __attribute__((no_instrument_functi on))
#define __constructor__ __attribute__((constructor)) #define __constructor__ __attribute__((constructor))
#define __destructor__ __attribute__((destructor)) #define __destructor__ __attribute__((destructor))
#define __typeof__(x) typeof(x) #define __typeof__(x) typeof(x)
#ifndef __func__
#define __func__ __FUNCTION__ #define __func__ __FUNCTION__
#endif
#define _ZD "%zd" #define _ZD "%zd"
#define _ZU "%zu" #define _ZU "%zu"
#define _ZUn(x) "%" #x "zu"
/* /*
* Define the bool type by including stdbool.h (preferably)... * Define the bool type by including stdbool.h (preferably)...
*/ */
#if DIRECT_BUILD_STDBOOL #if DIRECT_BUILD_STDBOOL
# include <stdbool.h> # include <stdbool.h>
/* /*
* ...or defining it ourself, if not using C++ or another definition * ...or defining it ourself, if not using C++ or another definition
*/ */
#elif !defined(__cplusplus) && !defined(__bool_true_false_are_defined) #elif !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
 End of changes. 3 change blocks. 
0 lines changed or deleted 4 lines changed or added


 util.h   util.h 
skipping to change at line 36 skipping to change at line 36
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/surface.h> #include <core/surface.h>
void dfb_gfx_copy( CoreSurface *source, CoreSurface *destination, const DFB Rectangle *rect ); void dfb_gfx_copy( CoreSurface *source, CoreSurface *destination, const DFB Rectangle *rect );
void dfb_gfx_copy_to( CoreSurface *source, CoreSurface *destination, const DFBRectangle *rect, int x, int y, bool from_back ); void dfb_gfx_copy_to( CoreSurface *source, CoreSurface *destination, const DFBRectangle *rect, int x, int y, bool from_back );
void dfb_gfx_copy_stereo( CoreSurface *source,
DFBSurfaceStereoEye source_eye,
CoreSurface *destination,
DFBSurfaceStereoEye destination_eye,
const DFBRectangle *rect,
int x,
int y,
bool from_back );
void dfb_gfx_clear( CoreSurface *surface, CoreSurfaceBufferRole role );
void dfb_gfx_stretch_to( CoreSurface *source, CoreSurface *destination, con st DFBRectangle *srect, const DFBRectangle *drect, bool from_back ); void dfb_gfx_stretch_to( CoreSurface *source, CoreSurface *destination, con st DFBRectangle *srect, const DFBRectangle *drect, bool from_back );
void dfb_gfx_stretch_stereo( CoreSurface *source,
DFBSurfaceStereoEye source_eye,
CoreSurface *destination,
DFBSurfaceStereoEye destination_eye,
const DFBRectangle *srect,
const DFBRectangle *drect,
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_rotation( CoreSurface *surface, const DFBRegion *region, int rotation ); void dfb_back_to_front_copy_rotation( CoreSurface *surface, const DFBRegion *region, int rotation );
void dfb_back_to_front_copy_stereo( CoreSurface *surface,
DFBSurfaceStereoEye eyes,
const DFBRegion *left_region,
const DFBRegion *right_region,
int rotation );
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 );
void dfb_sort_trapezoid( DFBTrapezoid *trap ); void dfb_sort_trapezoid( DFBTrapezoid *trap );
void dfb_gfx_copy_regions( CoreSurface *source, void dfb_gfx_copy_regions( CoreSurface *source,
CoreSurfaceBufferRole from, CoreSurfaceBufferRole from,
CoreSurface *destination, CoreSurface *destination,
CoreSurfaceBufferRole to, CoreSurfaceBufferRole to,
const DFBRegion *regions, const DFBRegion *regions,
unsigned int num, unsigned int num,
int x, int x,
int y ); int y );
void dfb_gfx_copy_regions_stereo( CoreSurface *source,
CoreSurfaceBufferRole from,
DFBSurfaceStereoEye source_eye,
CoreSurface *destination,
CoreSurfaceBufferRole to,
DFBSurfaceStereoEye destination_eye,
const DFBRegion *regions,
unsigned int num,
int x,
int y );
/*
* Simplyfy blitting flags
*
* Allow any combination of DSBLIT_ROTATE_ and DSBLIT_FLIP_ flags to be red
uced
* to a combination of DSBLIT_ROTATE_90, DSBLIT_FLIP_HORIZONTAL and DSBLIT_
FLIP_VERTICAL
*
*/
static inline void dfb_simplify_blittingflags( DFBSurfaceBlittingFlags *fla
gs )
{
if (*flags & DSBLIT_ROTATE180)
*flags = (DFBSurfaceBlittingFlags)(*flags ^ (DSBLIT_ROTATE180 | D
SBLIT_FLIP_HORIZONTAL | DSBLIT_FLIP_VERTICAL));
if (*flags & DSBLIT_ROTATE270) {
if (*flags & DSBLIT_ROTATE90)
*flags = (DFBSurfaceBlittingFlags)(*flags ^ (DSBLIT_ROTATE90
| DSBLIT_ROTATE270));
else
*flags = (DFBSurfaceBlittingFlags)(*flags ^ (DSBLIT_ROTATE90
| DSBLIT_ROTATE270 | DSBLIT_FLIP_HORIZONTAL | DSBLIT_FLIP_VERTICAL));
}
}
#endif #endif
 End of changes. 4 change blocks. 
0 lines changed or deleted 58 lines changed or added


 vector.h   vector.h 
skipping to change at line 153 skipping to change at line 153
/* /*
* In case the return value isn't checked * In case the return value isn't checked
* this will most likely generate a bad address. * this will most likely generate a bad address.
*/ */
return INT_MIN >> 2; return INT_MIN >> 2;
} }
#define fusion_vector_foreach(element, index, vector) \ #define fusion_vector_foreach(element, index, vector) \
for ((index) = 0; \ for ((index) = 0; \
(index) < (vector).count && (element = (vector).elements[index]); \ (index) < (vector).count && (element = (__typeof__(element))(vect or).elements[index]); \
(index)++) (index)++)
#define fusion_vector_foreach_reverse(element, index, vector) \ #define fusion_vector_foreach_reverse(element, index, vector) \
for ((index) = (vector).count - 1; \ for ((index) = (vector).count - 1; \
(index) >= 0 && (element = (vector).elements[index]); (index) >= 0 && (vector).count &&
\ \
(vector).elements &&
\
(element = (__typeof__(element))(vector).elements[index]);
\
(index)--) (index)--)
#endif #endif
 End of changes. 2 change blocks. 
3 lines changed or deleted 7 lines changed or added


 windows.h   windows.h 
skipping to change at line 240 skipping to change at line 240
/* /*
* change window configuration * change window configuration
*/ */
DFBResult DFBResult
dfb_window_set_config( CoreWindow *window, dfb_window_set_config( CoreWindow *window,
const CoreWindowConfig *config, const CoreWindowConfig *config,
CoreWindowConfigFlags flags ); CoreWindowConfigFlags flags );
/* /*
* change window cursor
*/
DFBResult
dfb_window_set_cursor_shape( CoreWindow *window,
CoreSurface *surface,
unsigned int hot_x,
unsigned int hot_y );
/*
* 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
 End of changes. 1 change blocks. 
0 lines changed or deleted 9 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/