comparison src/X_supp.c @ 1005:714169f33f13 refine_backend_if

Fix X_init_connection() to match modification of mb_backend_t
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 22 Nov 2010 00:42:30 +0800
parents d6035efd64dc
children 3ee2e30b260f
comparison
equal deleted inserted replaced
1004:d6035efd64dc 1005:714169f33f13
164 _x_supp_timer_fact_free(mb_timer_man_t *timer_man) { 164 _x_supp_timer_fact_free(mb_timer_man_t *timer_man) {
165 } 165 }
166 166
167 167
168 /* @} */ 168 /* @} */
169
170 static void handle_x_event(X_MB_runtime_t *rt);
169 171
170 /*! \defgroup x_mb_io IO manager for X. 172 /*! \defgroup x_mb_io IO manager for X.
171 * @{ 173 * @{
172 */ 174 */
173 #define MAX_MONITORS 200 175 #define MAX_MONITORS 200
665 XSHM_update(rt); 667 XSHM_update(rt);
666 #endif 668 #endif
667 XFlush(display); 669 XFlush(display);
668 } 670 }
669 671
672 #if 0
670 /*! \brief Handle connection coming data and timeout of timers. 673 /*! \brief Handle connection coming data and timeout of timers.
671 * 674 *
672 * \param display is a Display returned by XOpenDisplay(). 675 * \param display is a Display returned by XOpenDisplay().
673 * \param rdman is a redraw manager. 676 * \param rdman is a redraw manager.
674 * \param tman is a timer manager. 677 * \param tman is a timer manager.
739 } 742 }
740 } 743 }
741 } 744 }
742 } 745 }
743 } 746 }
747 #endif /* 0 */
744 748
745 static int X_init_connection(const char *display_name, 749 static int X_init_connection(const char *display_name,
746 int w, int h, 750 int w, int h,
747 Display **displayp, 751 Display **displayp,
748 Visual **visualp, 752 Visual **visualp,
947 // FIXME: This is a wired loopback reference. This is inly required when we need 951 // FIXME: This is a wired loopback reference. This is inly required when we need
948 // to get the xmb_rt->tman for the animation. We should relocate the tman 952 // to get the xmb_rt->tman for the animation. We should relocate the tman
949 // to the redraw_man_t instead. 953 // to the redraw_man_t instead.
950 xmb_rt->rdman->rt = xmb_rt; 954 xmb_rt->rdman->rt = xmb_rt;
951 955
952 xmb_rt->tman = mb_tman_new(); 956 xmb_rt->io_man = _io_factory->new();
957 xmb_rt->timer_man = _timer_factory->new();
953 958
954 img_ldr = simple_mb_img_ldr_new(""); 959 img_ldr = simple_mb_img_ldr_new("");
955 xmb_rt->img_ldr = img_ldr; 960 xmb_rt->img_ldr = img_ldr;
956 rdman_set_img_ldr(xmb_rt->rdman, img_ldr); 961 /*! \todo Remove rdman_set_img_ldr() */
957 memset(xmb_rt->monitors,0,sizeof(xmb_rt->monitors)); 962 rdman_set_img_ldr(xmb_rt->rdman, img_ldr); /* this is ncessary? */
958 963
959 #ifndef ONLY_MOUSE_MOVE_RAW 964 #ifndef ONLY_MOUSE_MOVE_RAW
960 xmb_rt->last = NULL; 965 xmb_rt->last = NULL;
961 #endif 966 #endif
962 967