static DFBResult IDirectFBWindow_SetColorKey( IDirectFBWindow *thiz, u8 r, u8 g, u8 b ) { u32 key; CoreSurface *surface; DIRECT_INTERFACE_GET_DATA(IDirectFBWindow) D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ ); if (data->destroyed) return DFB_DESTROYED; if (data->window->caps & DWCAPS_INPUTONLY) return DFB_UNSUPPORTED; surface = data->window->surface; if (DFB_PIXELFORMAT_IS_INDEXED( surface->config.format )) key = dfb_palette_search( surface->palette, r, g, b, 0x80 ); else key = dfb_color_to_pixel( surface->config.format, r, g, b ); return dfb_window_set_colorkey( data->window, key ); }
DFBResult IWindow_Real::SetColorKey( u32 key ) { D_DEBUG_AT( Core_Window, "IWindow_Real::%s( %p )\n", __FUNCTION__, obj ); D_MAGIC_ASSERT( obj, CoreWindow ); return dfb_window_set_colorkey( obj, key ); }
static DFBResult IDirectFBWindow_SetColorKeyIndex( IDirectFBWindow *thiz, unsigned int index ) { u32 key = index; DIRECT_INTERFACE_GET_DATA(IDirectFBWindow) D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ ); if (data->destroyed) return DFB_DESTROYED; if (data->window->caps & DWCAPS_INPUTONLY) return DFB_UNSUPPORTED; return dfb_window_set_colorkey( data->window, key ); }