comparison src/X_supp.c @ 259:e8a784a306d0

Initialize an image loader for X runtime
author Thinker K.F. Li <thinker@branda.to>
date Thu, 22 Jan 2009 18:10:47 +0800
parents ab8284c8dcee
children 29acbd8a0dd0
comparison
equal deleted inserted replaced
258:f24129d4f0f9 259:e8a784a306d0
33 Visual *visual; 33 Visual *visual;
34 cairo_surface_t *surface, *backend_surface; 34 cairo_surface_t *surface, *backend_surface;
35 cairo_t *cr, *backend_cr; 35 cairo_t *cr, *backend_cr;
36 redraw_man_t *rdman; 36 redraw_man_t *rdman;
37 mb_tman_t *tman; 37 mb_tman_t *tman;
38 mb_img_ldr_t *img_ldr;
38 int w, h; 39 int w, h;
39 40
40 X_kb_info_t kbinfo; 41 X_kb_info_t kbinfo;
41 42
42 #ifndef ONLY_MOUSE_MOVE_RAW 43 #ifndef ONLY_MOUSE_MOVE_RAW
447 // to the redraw_man_t instead. 448 // to the redraw_man_t instead.
448 xmb_rt->rdman->rt = xmb_rt; 449 xmb_rt->rdman->rt = xmb_rt;
449 450
450 xmb_rt->tman = mb_tman_new(); 451 xmb_rt->tman = mb_tman_new();
451 452
453 xmb_rt->img_ldr = simple_mb_img_ldr_new("./");
454
452 #ifndef ONLY_MOUSE_MOVE_RAW 455 #ifndef ONLY_MOUSE_MOVE_RAW
453 xmb_rt->last = NULL; 456 xmb_rt->last = NULL;
454 #endif 457 #endif
455 458
456 X_kb_init(&xmb_rt->kbinfo, xmb_rt->display, xmb_rt->rdman); 459 X_kb_init(&xmb_rt->kbinfo, xmb_rt->display, xmb_rt->rdman);
465 } 468 }
466 469
467 if(xmb_rt->tman) 470 if(xmb_rt->tman)
468 mb_tman_free(xmb_rt->tman); 471 mb_tman_free(xmb_rt->tman);
469 472
473 if(xmb_rt->img_ldr)
474 MB_IMG_LDR_FREE(xmb_rt->img_ldr);
475
470 if(xmb_rt->cr) 476 if(xmb_rt->cr)
471 cairo_destroy(xmb_rt->cr); 477 cairo_destroy(xmb_rt->cr);
472 if(xmb_rt->backend_cr) 478 if(xmb_rt->backend_cr)
473 cairo_destroy(xmb_rt->backend_cr); 479 cairo_destroy(xmb_rt->backend_cr);
474 480
519 ob_factory_t *factory; 525 ob_factory_t *factory;
520 526
521 factory = rdman_get_ob_factory(xmb_rt->rdman); 527 factory = rdman_get_ob_factory(xmb_rt->rdman);
522 return factory; 528 return factory;
523 } 529 }
530
531 mb_img_ldr_t *X_MB_img_ldr(X_MB_runtime_t *xmb_rt) {
532 X_MB_runtime_t *img_ldr;
533
534 img_ldr = xmb_rt->img_ldr;
535
536 return img_ldr;
537 }