PageRenderTime 363ms CodeModel.GetById 141ms app.highlight 1ms RepoModel.GetById 220ms app.codeStats 0ms

/src/backend/sdl/ftk_backend_sdl.c

http://ftk.googlecode.com/
C | 23 lines | 17 code | 6 blank | 0 comment | 1 complexity | 08c4900e68d688ccb2ec6c1766295cfe MD5 | raw file
 1
 2#include "ftk_bitmap_factory.h"
 3#include "ftk_image_sdl_decoder.h"
 4#include "ftk_display_sdl.h"
 5#include "ftk_source_sdl.h"
 6#include "ftk_globals.h"
 7#include "ftk_backend.h"
 8
 9Ret ftk_backend_init(int argc, char* argv[])
10{
11	FtkSource* source = NULL;
12	FtkDisplay* display = NULL;
13
14	ftk_bitmap_factory_add_decoder(ftk_default_bitmap_factory(), ftk_image_sdl_decoder_create());
15
16	display = ftk_display_sdl_create();
17	ftk_set_display(display);
18
19	source = ftk_source_sdl_create();
20	ftk_sources_manager_add(ftk_default_sources_manager(), source);
21
22	return display != NULL ? RET_OK : RET_FAIL;
23}