DFBResult ILayerRegion_Requestor::FlipUpdateStereo( const DFBRegion *left, const DFBRegion *right, DFBSurfaceFlipFlags flags ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreLayerRegionFlipUpdateStereo *args = (CoreLayerRegionFlipUpdateStereo*) args_alloc( args_static, sizeof(CoreLayerRegionFlipUpdateStereo) ); CoreLayerRegionFlipUpdateStereoReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreLayerRegionFlipUpdateStereoReturn*) args_alloc( return_args_static, sizeof(CoreLayerRegionFlipUpdateStereoReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreLayerRegion, "ILayerRegion_Requestor::%s()\n", __FUNCTION__ ); if (left) { args->left = *left; args->left_set = true; } else args->left_set = false; if (right) { args->right = *right; args->right_set = true; } else args->right_set = false; args->flags = flags; ret = (DFBResult) CoreLayerRegion_Call( obj, FCEF_NONE, CoreLayerRegion_FlipUpdateStereo, args, sizeof(CoreLayerRegionFlipUpdateStereo), return_args, sizeof(CoreLayerRegionFlipUpdateStereoReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreLayerRegion_Call( CoreLayerRegion_FlipUpdateStereo ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreLayerRegion_FlipUpdateStereo failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult ILayer_Requestor::GetPrimaryContext( bool activate, CoreLayerContext **ret_context ) { DFBResult ret = DFB_OK; CoreLayerContext *context = NULL; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreLayerGetPrimaryContext *args = (CoreLayerGetPrimaryContext*) args_alloc( args_static, sizeof(CoreLayerGetPrimaryContext) ); CoreLayerGetPrimaryContextReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreLayerGetPrimaryContextReturn*) args_alloc( return_args_static, sizeof(CoreLayerGetPrimaryContextReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreLayer, "ILayer_Requestor::%s()\n", __FUNCTION__ ); D_ASSERT( ret_context != NULL ); args->activate = activate; ret = (DFBResult) CoreLayer_Call( obj, FCEF_NONE, CoreLayer_GetPrimaryContext, args, sizeof(CoreLayerGetPrimaryContext), return_args, sizeof(CoreLayerGetPrimaryContextReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreLayer_Call( CoreLayer_GetPrimaryContext ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreLayer_GetPrimaryContext failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } ret = (DFBResult) CoreLayerContext_Catch( core, return_args->context_ptr, &context ); if (ret) { D_DERROR( ret, "%s: Catching context by ID %u failed!\n", __FUNCTION__, return_args->context_id ); goto out; } *ret_context = context; out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult ICore_Requestor::GetSurface( u32 surface_id, CoreSurface **ret_surface ) { DFBResult ret = DFB_OK; CoreSurface *surface = NULL; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreDFBGetSurface *args = (CoreDFBGetSurface*) args_alloc( args_static, sizeof(CoreDFBGetSurface) ); CoreDFBGetSurfaceReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreDFBGetSurfaceReturn*) args_alloc( return_args_static, sizeof(CoreDFBGetSurfaceReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreDFB, "ICore_Requestor::%s()\n", __FUNCTION__ ); D_ASSERT( ret_surface != NULL ); args->surface_id = surface_id; ret = (DFBResult) CoreDFB_Call( obj, FCEF_NONE, CoreDFB_GetSurface, args, sizeof(CoreDFBGetSurface), return_args, sizeof(CoreDFBGetSurfaceReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreDFB_Call( CoreDFB_GetSurface ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreDFB_GetSurface failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } ret = (DFBResult) CoreSurface_Catch( core, return_args->surface_ptr, &surface ); if (ret) { D_DERROR( ret, "%s: Catching surface by ID %u failed!\n", __FUNCTION__, return_args->surface_id ); goto out; } *ret_surface = surface; out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult ICore_Requestor::ClipboardSet( const char *mime_type, u32 mime_type_size, const char *data, u32 data_size, u64 timestamp_us ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreDFBClipboardSet *args = (CoreDFBClipboardSet*) args_alloc( args_static, sizeof(CoreDFBClipboardSet) + mime_type_size * sizeof(char) + data_size * sizeof(char) ); CoreDFBClipboardSetReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreDFBClipboardSetReturn*) args_alloc( return_args_static, sizeof(CoreDFBClipboardSetReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreDFB, "ICore_Requestor::%s()\n", __FUNCTION__ ); args->mime_type_size = mime_type_size; args->data_size = data_size; args->timestamp_us = timestamp_us; direct_memcpy( (char*) (args + 1), mime_type, mime_type_size * sizeof(char) ); direct_memcpy( (char*) (args + 1) + mime_type_size * sizeof(char), data, data_size * sizeof(char) ); ret = (DFBResult) CoreDFB_Call( obj, FCEF_NONE, CoreDFB_ClipboardSet, args, sizeof(CoreDFBClipboardSet) + mime_type_size * sizeof(char) + data_size * sizeof(char), return_args, sizeof(CoreDFBClipboardSetReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreDFB_Call( CoreDFB_ClipboardSet ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreDFB_ClipboardSet failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult IImageProvider_Requestor::RenderTo( CoreSurface *destination, const DFBRectangle *rect ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; ImageProviderRenderTo *args = (ImageProviderRenderTo*) args_alloc( args_static, sizeof(ImageProviderRenderTo) ); ImageProviderRenderToReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (ImageProviderRenderToReturn*) args_alloc( return_args_static, sizeof(ImageProviderRenderToReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_ImageProvider, "IImageProvider_Requestor::%s()\n", __FUNCTION__ ); D_ASSERT( destination != NULL ); args->destination_id = CoreSurface_GetID( destination ); if (rect) { args->rect = *rect; args->rect_set = true; } else args->rect_set = false; ret = (DFBResult) ImageProvider_Call( obj, FCEF_NONE, ImageProvider_RenderTo, args, sizeof(ImageProviderRenderTo), return_args, sizeof(ImageProviderRenderToReturn), NULL ); if (ret) { D_DERROR( ret, "%s: ImageProvider_Call( ImageProvider_RenderTo ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: ImageProvider_RenderTo failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult ICore_Requestor::ClipboardGet( char *ret_mime_type, u32 *ret_mime_type_size, char *ret_data, u32 *ret_data_size ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreDFBClipboardGet *args = (CoreDFBClipboardGet*) args_alloc( args_static, sizeof(CoreDFBClipboardGet) ); CoreDFBClipboardGetReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreDFBClipboardGetReturn*) args_alloc( return_args_static, sizeof(CoreDFBClipboardGetReturn) + MAX_CLIPBOARD_MIME_TYPE_SIZE * sizeof(char) + MAX_CLIPBOARD_DATA_SIZE * sizeof(char) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreDFB, "ICore_Requestor::%s()\n", __FUNCTION__ ); ret = (DFBResult) CoreDFB_Call( obj, FCEF_NONE, CoreDFB_ClipboardGet, args, sizeof(CoreDFBClipboardGet), return_args, sizeof(CoreDFBClipboardGetReturn) + MAX_CLIPBOARD_MIME_TYPE_SIZE * sizeof(char) + MAX_CLIPBOARD_DATA_SIZE * sizeof(char), NULL ); if (ret) { D_DERROR( ret, "%s: CoreDFB_Call( CoreDFB_ClipboardGet ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreDFB_ClipboardGet failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } *ret_mime_type_size = return_args->mime_type_size; *ret_data_size = return_args->data_size; direct_memcpy( ret_mime_type, (char*) (return_args + 1), return_args->mime_type_size * sizeof(char) ); direct_memcpy( ret_data, (char*) (return_args + 1) + return_args->mime_type_size * sizeof(char), return_args->data_size * sizeof(char) ); out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult IPalette_Requestor::SetEntriesYUV( const DFBColorYUV *colors, u32 num, u32 offset ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CorePaletteSetEntriesYUV *args = (CorePaletteSetEntriesYUV*) args_alloc( args_static, sizeof(CorePaletteSetEntriesYUV) + num * sizeof(DFBColorYUV) ); CorePaletteSetEntriesYUVReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CorePaletteSetEntriesYUVReturn*) args_alloc( return_args_static, sizeof(CorePaletteSetEntriesYUVReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CorePalette, "IPalette_Requestor::%s()\n", __FUNCTION__ ); D_ASSERT( colors != NULL ); args->num = num; args->offset = offset; direct_memcpy( (char*) (args + 1), colors, num * sizeof(DFBColorYUV) ); ret = (DFBResult) CorePalette_Call( obj, FCEF_NONE, CorePalette_SetEntriesYUV, args, sizeof(CorePaletteSetEntriesYUV) + num * sizeof(DFBColorYUV), return_args, sizeof(CorePaletteSetEntriesYUVReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CorePalette_Call( CorePalette_SetEntriesYUV ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CorePalette_SetEntriesYUV failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult ICore_Requestor::AllowSurface( CoreSurface *surface, const char *executable, u32 executable_length ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreDFBAllowSurface *args = (CoreDFBAllowSurface*) args_alloc( args_static, sizeof(CoreDFBAllowSurface) + executable_length * sizeof(char) ); CoreDFBAllowSurfaceReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreDFBAllowSurfaceReturn*) args_alloc( return_args_static, sizeof(CoreDFBAllowSurfaceReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreDFB, "ICore_Requestor::%s()\n", __FUNCTION__ ); D_ASSERT( surface != NULL ); args->surface_id = CoreSurface_GetID( surface ); args->executable_length = executable_length; direct_memcpy( (char*) (args + 1), executable, executable_length * sizeof(char) ); ret = (DFBResult) CoreDFB_Call( obj, FCEF_NONE, CoreDFB_AllowSurface, args, sizeof(CoreDFBAllowSurface) + executable_length * sizeof(char), return_args, sizeof(CoreDFBAllowSurfaceReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreDFB_Call( CoreDFB_AllowSurface ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreDFB_AllowSurface failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult IInputDevice_Requestor::SetKeymapEntry( s32 key_code, const DFBInputDeviceKeymapEntry *entry ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreInputDeviceSetKeymapEntry *args = (CoreInputDeviceSetKeymapEntry*) args_alloc( args_static, sizeof(CoreInputDeviceSetKeymapEntry) ); CoreInputDeviceSetKeymapEntryReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreInputDeviceSetKeymapEntryReturn*) args_alloc( return_args_static, sizeof(CoreInputDeviceSetKeymapEntryReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreInputDevice, "IInputDevice_Requestor::%s()\n", __FUNCTION__ ); D_ASSERT( entry != NULL ); args->key_code = key_code; args->entry = *entry; ret = (DFBResult) CoreInputDevice_Call( obj, FCEF_NONE, CoreInputDevice_SetKeymapEntry, args, sizeof(CoreInputDeviceSetKeymapEntry), return_args, sizeof(CoreInputDeviceSetKeymapEntryReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreInputDevice_Call( CoreInputDevice_SetKeymapEntry ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreInputDevice_SetKeymapEntry failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult ICore_Requestor::CreateImageProvider( u32 buffer_call, u32 *ret_call ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreDFBCreateImageProvider *args = (CoreDFBCreateImageProvider*) args_alloc( args_static, sizeof(CoreDFBCreateImageProvider) ); CoreDFBCreateImageProviderReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreDFBCreateImageProviderReturn*) args_alloc( return_args_static, sizeof(CoreDFBCreateImageProviderReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreDFB, "ICore_Requestor::%s()\n", __FUNCTION__ ); args->buffer_call = buffer_call; ret = (DFBResult) CoreDFB_Call( obj, FCEF_NONE, CoreDFB_CreateImageProvider, args, sizeof(CoreDFBCreateImageProvider), return_args, sizeof(CoreDFBCreateImageProviderReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreDFB_Call( CoreDFB_CreateImageProvider ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreDFB_CreateImageProvider failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } *ret_call = return_args->call; out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult IInputDevice_Requestor::SetConfiguration( const DFBInputDeviceConfig *config ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreInputDeviceSetConfiguration *args = (CoreInputDeviceSetConfiguration*) args_alloc( args_static, sizeof(CoreInputDeviceSetConfiguration) ); CoreInputDeviceSetConfigurationReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreInputDeviceSetConfigurationReturn*) args_alloc( return_args_static, sizeof(CoreInputDeviceSetConfigurationReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreInputDevice, "IInputDevice_Requestor::%s()\n", __FUNCTION__ ); D_ASSERT( config != NULL ); args->config = *config; ret = (DFBResult) CoreInputDevice_Call( obj, FCEF_NONE, CoreInputDevice_SetConfiguration, args, sizeof(CoreInputDeviceSetConfiguration), return_args, sizeof(CoreInputDeviceSetConfigurationReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreInputDevice_Call( CoreInputDevice_SetConfiguration ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreInputDevice_SetConfiguration failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult ILayer_Requestor::ActivateContext( CoreLayerContext *context ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreLayerActivateContext *args = (CoreLayerActivateContext*) args_alloc( args_static, sizeof(CoreLayerActivateContext) ); CoreLayerActivateContextReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreLayerActivateContextReturn*) args_alloc( return_args_static, sizeof(CoreLayerActivateContextReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreLayer, "ILayer_Requestor::%s()\n", __FUNCTION__ ); D_ASSERT( context != NULL ); args->context_id = CoreLayerContext_GetID( context ); ret = (DFBResult) CoreLayer_Call( obj, FCEF_NONE, CoreLayer_ActivateContext, args, sizeof(CoreLayerActivateContext), return_args, sizeof(CoreLayerActivateContextReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreLayer_Call( CoreLayer_ActivateContext ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreLayer_ActivateContext failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult ILayer_Requestor::SetLevel( s32 level ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreLayerSetLevel *args = (CoreLayerSetLevel*) args_alloc( args_static, sizeof(CoreLayerSetLevel) ); CoreLayerSetLevelReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreLayerSetLevelReturn*) args_alloc( return_args_static, sizeof(CoreLayerSetLevelReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreLayer, "ILayer_Requestor::%s()\n", __FUNCTION__ ); args->level = level; ret = (DFBResult) CoreLayer_Call( obj, FCEF_NONE, CoreLayer_SetLevel, args, sizeof(CoreLayerSetLevel), return_args, sizeof(CoreLayerSetLevelReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreLayer_Call( CoreLayer_SetLevel ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreLayer_SetLevel failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult ILayer_Requestor::GetCurrentOutputField( s32 *ret_field ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreLayerGetCurrentOutputField *args = (CoreLayerGetCurrentOutputField*) args_alloc( args_static, sizeof(CoreLayerGetCurrentOutputField) ); CoreLayerGetCurrentOutputFieldReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreLayerGetCurrentOutputFieldReturn*) args_alloc( return_args_static, sizeof(CoreLayerGetCurrentOutputFieldReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreLayer, "ILayer_Requestor::%s()\n", __FUNCTION__ ); ret = (DFBResult) CoreLayer_Call( obj, FCEF_NONE, CoreLayer_GetCurrentOutputField, args, sizeof(CoreLayerGetCurrentOutputField), return_args, sizeof(CoreLayerGetCurrentOutputFieldReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreLayer_Call( CoreLayer_GetCurrentOutputField ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreLayer_GetCurrentOutputField failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } *ret_field = return_args->field; out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult ICore_Requestor::ClipboardGetTimestamp( u64 *ret_timestamp_us ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreDFBClipboardGetTimestamp *args = (CoreDFBClipboardGetTimestamp*) args_alloc( args_static, sizeof(CoreDFBClipboardGetTimestamp) ); CoreDFBClipboardGetTimestampReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreDFBClipboardGetTimestampReturn*) args_alloc( return_args_static, sizeof(CoreDFBClipboardGetTimestampReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreDFB, "ICore_Requestor::%s()\n", __FUNCTION__ ); ret = (DFBResult) CoreDFB_Call( obj, FCEF_NONE, CoreDFB_ClipboardGetTimestamp, args, sizeof(CoreDFBClipboardGetTimestamp), return_args, sizeof(CoreDFBClipboardGetTimestampReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreDFB_Call( CoreDFB_ClipboardGetTimestamp ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreDFB_ClipboardGetTimestamp failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } *ret_timestamp_us = return_args->timestamp_us; out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult IImageProvider_Requestor::Dispose( ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; ImageProviderDispose *args = (ImageProviderDispose*) args_alloc( args_static, sizeof(ImageProviderDispose) ); ImageProviderDisposeReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (ImageProviderDisposeReturn*) args_alloc( return_args_static, sizeof(ImageProviderDisposeReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_ImageProvider, "IImageProvider_Requestor::%s()\n", __FUNCTION__ ); ret = (DFBResult) ImageProvider_Call( obj, FCEF_NONE, ImageProvider_Dispose, args, sizeof(ImageProviderDispose), return_args, sizeof(ImageProviderDisposeReturn), NULL ); if (ret) { D_DERROR( ret, "%s: ImageProvider_Call( ImageProvider_Dispose ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: ImageProvider_Dispose failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult IInputDevice_Requestor::ReloadKeymap( ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreInputDeviceReloadKeymap *args = (CoreInputDeviceReloadKeymap*) args_alloc( args_static, sizeof(CoreInputDeviceReloadKeymap) ); CoreInputDeviceReloadKeymapReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreInputDeviceReloadKeymapReturn*) args_alloc( return_args_static, sizeof(CoreInputDeviceReloadKeymapReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreInputDevice, "IInputDevice_Requestor::%s()\n", __FUNCTION__ ); ret = (DFBResult) CoreInputDevice_Call( obj, FCEF_NONE, CoreInputDevice_ReloadKeymap, args, sizeof(CoreInputDeviceReloadKeymap), return_args, sizeof(CoreInputDeviceReloadKeymapReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreInputDevice_Call( CoreInputDevice_ReloadKeymap ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreInputDevice_ReloadKeymap failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult ICore_Requestor::WaitIdle( ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreDFBWaitIdle *args = (CoreDFBWaitIdle*) args_alloc( args_static, sizeof(CoreDFBWaitIdle) ); CoreDFBWaitIdleReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreDFBWaitIdleReturn*) args_alloc( return_args_static, sizeof(CoreDFBWaitIdleReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreDFB, "ICore_Requestor::%s()\n", __FUNCTION__ ); ret = (DFBResult) CoreDFB_Call( obj, FCEF_NONE, CoreDFB_WaitIdle, args, sizeof(CoreDFBWaitIdle), return_args, sizeof(CoreDFBWaitIdleReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreDFB_Call( CoreDFB_WaitIdle ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreDFB_WaitIdle failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult IImageProvider_Requestor::GetImageDescription( DFBImageDescription *ret_description ) { DFBResult ret = DFB_OK; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; ImageProviderGetImageDescription *args = (ImageProviderGetImageDescription*) args_alloc( args_static, sizeof(ImageProviderGetImageDescription) ); ImageProviderGetImageDescriptionReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (ImageProviderGetImageDescriptionReturn*) args_alloc( return_args_static, sizeof(ImageProviderGetImageDescriptionReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_ImageProvider, "IImageProvider_Requestor::%s()\n", __FUNCTION__ ); D_ASSERT( ret_description != NULL ); ret = (DFBResult) ImageProvider_Call( obj, FCEF_NONE, ImageProvider_GetImageDescription, args, sizeof(ImageProviderGetImageDescription), return_args, sizeof(ImageProviderGetImageDescriptionReturn), NULL ); if (ret) { D_DERROR( ret, "%s: ImageProvider_Call( ImageProvider_GetImageDescription ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: ImageProvider_GetImageDescription failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } *ret_description = return_args->description; out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }
DFBResult ICore_Requestor::CreateSurface( const CoreSurfaceConfig *config, CoreSurfaceTypeFlags type, u64 resource_id, CorePalette *palette, CoreSurface **ret_surface ) { DFBResult ret = DFB_OK; CoreSurface *surface = NULL; char args_static[FLUXED_ARGS_BYTES]; char return_args_static[FLUXED_ARGS_BYTES]; CoreDFBCreateSurface *args = (CoreDFBCreateSurface*) args_alloc( args_static, sizeof(CoreDFBCreateSurface) ); CoreDFBCreateSurfaceReturn *return_args; if (!args) return (DFBResult) D_OOM(); return_args = (CoreDFBCreateSurfaceReturn*) args_alloc( return_args_static, sizeof(CoreDFBCreateSurfaceReturn) ); if (!return_args) { args_free( args_static, args ); return (DFBResult) D_OOM(); } D_DEBUG_AT( DirectFB_CoreDFB, "ICore_Requestor::%s()\n", __FUNCTION__ ); D_ASSERT( config != NULL ); D_ASSERT( ret_surface != NULL ); args->config = *config; args->type = type; args->resource_id = resource_id; if (palette) { args->palette_id = CorePalette_GetID( palette ); args->palette_set = true; } else args->palette_set = false; ret = (DFBResult) CoreDFB_Call( obj, FCEF_NONE, CoreDFB_CreateSurface, args, sizeof(CoreDFBCreateSurface), return_args, sizeof(CoreDFBCreateSurfaceReturn), NULL ); if (ret) { D_DERROR( ret, "%s: CoreDFB_Call( CoreDFB_CreateSurface ) failed!\n", __FUNCTION__ ); goto out; } if (return_args->result) { /*D_DERROR( return_args->result, "%s: CoreDFB_CreateSurface failed!\n", __FUNCTION__ );*/ ret = return_args->result; goto out; } ret = (DFBResult) CoreSurface_Catch( core, return_args->surface_ptr, &surface ); if (ret) { D_DERROR( ret, "%s: Catching surface by ID %u failed!\n", __FUNCTION__, return_args->surface_id ); goto out; } *ret_surface = surface; out: args_free( return_args_static, return_args ); args_free( args_static, args ); return ret; }