Mercurial > MadButterfly
comparison src/X_supp.c @ 265:b42ee279669e
Change function name and add comments.
- sh_image_set_geometry() to replace sh_image_set().
- page "Image and Image Loader".
- comments.
diff -r 1ed06481e9ea img/image_n_ldr.dia
Binary file img/image_n_ldr.dia has changed
diff -r 1ed06481e9ea img/image_n_ldr.png
Binary file img/image_n_ldr.png has changed
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sat, 24 Jan 2009 15:09:03 +0800 |
parents | 29acbd8a0dd0 |
children | cd6af7da32c9 |
comparison
equal
deleted
inserted
replaced
264:1ed06481e9ea | 265:b42ee279669e |
---|---|
418 * It setups a runtime environment to run MadButterfly with Xlib. | 418 * It setups a runtime environment to run MadButterfly with Xlib. |
419 * Users should specify width and height of the opening window. | 419 * Users should specify width and height of the opening window. |
420 */ | 420 */ |
421 static int X_MB_init(const char *display_name, | 421 static int X_MB_init(const char *display_name, |
422 int w, int h, X_MB_runtime_t *xmb_rt) { | 422 int w, int h, X_MB_runtime_t *xmb_rt) { |
423 mb_img_ldr_t *img_ldr; | |
424 | |
423 memset(xmb_rt, 0, sizeof(X_MB_runtime_t)); | 425 memset(xmb_rt, 0, sizeof(X_MB_runtime_t)); |
424 | 426 |
425 xmb_rt->w = w; | 427 xmb_rt->w = w; |
426 xmb_rt->h = h; | 428 xmb_rt->h = h; |
427 X_init_connection(display_name, w, h, &xmb_rt->display, | 429 X_init_connection(display_name, w, h, &xmb_rt->display, |
448 // to the redraw_man_t instead. | 450 // to the redraw_man_t instead. |
449 xmb_rt->rdman->rt = xmb_rt; | 451 xmb_rt->rdman->rt = xmb_rt; |
450 | 452 |
451 xmb_rt->tman = mb_tman_new(); | 453 xmb_rt->tman = mb_tman_new(); |
452 | 454 |
453 xmb_rt->img_ldr = simple_mb_img_ldr_new("./"); | 455 img_ldr = simple_mb_img_ldr_new("./"); |
454 xmb_rt->rdman->img_ldr = xmb_rt->img_ldr; | 456 xmb_rt->img_ldr = img_ldr; |
457 rdman_set_img_ldr(xmb_rt->rdman, img_ldr); | |
455 | 458 |
456 #ifndef ONLY_MOUSE_MOVE_RAW | 459 #ifndef ONLY_MOUSE_MOVE_RAW |
457 xmb_rt->last = NULL; | 460 xmb_rt->last = NULL; |
458 #endif | 461 #endif |
459 | 462 |