comparison src/X_supp.c @ 1012:914add76c210 refine_backend_if

Change signature of function in X_supp.c to right type for rt arg
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 22 Nov 2010 00:42:30 +0800
parents 02d52058d352
children d5b8853767e7
comparison
equal deleted inserted replaced
1011:02d52058d352 1012:914add76c210
1115 1115
1116 return rt; 1116 return rt;
1117 } 1117 }
1118 1118
1119 static void 1119 static void
1120 X_MB_free(void *rt) { 1120 X_MB_free(mb_rt_t *rt) {
1121 X_MB_destroy((X_MB_runtime_t *) rt); 1121 X_MB_destroy((X_MB_runtime_t *) rt);
1122 free(rt); 1122 free(rt);
1123 } 1123 }
1124 1124
1125 /*! \brief Free runtime created with X_MB_new_with_win(). 1125 /*! \brief Free runtime created with X_MB_new_with_win().
1126 */ 1126 */
1127 static void 1127 static void
1128 X_MB_free_keep_win(void *rt) { 1128 X_MB_free_keep_win(mb_rt_t *rt) {
1129 X_MB_destroy_keep_win((X_MB_runtime_t *) rt); 1129 X_MB_destroy_keep_win((X_MB_runtime_t *) rt);
1130 free(rt); 1130 free(rt);
1131 } 1131 }
1132 1132
1133 static subject_t * 1133 static subject_t *
1134 X_MB_kbevents(void *rt) { 1134 X_MB_kbevents(mb_rt_t *rt) {
1135 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *) rt; 1135 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *) rt;
1136 return xmb_rt->kbinfo.kbevents; 1136 return xmb_rt->kbinfo.kbevents;
1137 } 1137 }
1138 1138
1139 static redraw_man_t * 1139 static redraw_man_t *
1140 X_MB_rdman(void *rt) { 1140 X_MB_rdman(mb_rt_t *rt) {
1141 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *) rt; 1141 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *) rt;
1142 return xmb_rt->rdman; 1142 return xmb_rt->rdman;
1143 } 1143 }
1144 1144
1145 static mb_timer_man_t * 1145 static mb_timer_man_t *
1146 X_MB_timer_man(void *rt) { 1146 X_MB_timer_man(mb_rt_t *rt) {
1147 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *) rt; 1147 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *) rt;
1148 return xmb_rt->timer_man; 1148 return xmb_rt->timer_man;
1149 } 1149 }
1150 1150
1151 static ob_factory_t * 1151 static ob_factory_t *
1152 X_MB_ob_factory(void *rt) { 1152 X_MB_ob_factory(mb_rt_t *rt) {
1153 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *) rt; 1153 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *) rt;
1154 ob_factory_t *factory; 1154 ob_factory_t *factory;
1155 1155
1156 factory = rdman_get_ob_factory(xmb_rt->rdman); 1156 factory = rdman_get_ob_factory(xmb_rt->rdman);
1157 return factory; 1157 return factory;
1158 } 1158 }
1159 1159
1160 static mb_img_ldr_t * 1160 static mb_img_ldr_t *
1161 X_MB_img_ldr(void *rt) { 1161 X_MB_img_ldr(mb_rt_t *rt) {
1162 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *) rt; 1162 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *) rt;
1163 mb_img_ldr_t *img_ldr; 1163 mb_img_ldr_t *img_ldr;
1164 1164
1165 img_ldr = xmb_rt->img_ldr; 1165 img_ldr = xmb_rt->img_ldr;
1166 1166
1207 * These functions are for internal using. 1207 * These functions are for internal using.
1208 * @{ 1208 * @{
1209 */ 1209 */
1210 /*! \brief Exported for nodejs plugin to call handle_x_event. 1210 /*! \brief Exported for nodejs plugin to call handle_x_event.
1211 */ 1211 */
1212 void _X_MB_handle_x_event_for_nodejs(void *rt) { 1212 void _X_MB_handle_x_event_for_nodejs(mb_rt_t *rt) {
1213 handle_x_event((X_MB_runtime_t *)rt); 1213 handle_x_event((X_MB_runtime_t *)rt);
1214 } 1214 }
1215 1215
1216 /*! \brief Get X connect for nodejs plugin. 1216 /*! \brief Get X connect for nodejs plugin.
1217 */ 1217 */
1218 int _X_MB_get_x_conn_for_nodejs(void *rt) { 1218 int _X_MB_get_x_conn_for_nodejs(mb_rt_t *rt) {
1219 return XConnectionNumber(((X_MB_runtime_t *)rt)->display); 1219 return XConnectionNumber(((X_MB_runtime_t *)rt)->display);
1220 } 1220 }
1221 1221
1222 /*! \brief Flush buffer for the X connection of a runtime object. 1222 /*! \brief Flush buffer for the X connection of a runtime object.
1223 */ 1223 */
1224 int _X_MB_flush_x_conn_for_nodejs(void *rt) { 1224 int _X_MB_flush_x_conn_for_nodejs(mb_rt_t *rt) {
1225 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *)rt; 1225 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *)rt;
1226 #ifdef XSHM 1226 #ifdef XSHM
1227 XSHM_update(xmb_rt); 1227 XSHM_update(xmb_rt);
1228 #endif 1228 #endif
1229 return XFlush(xmb_rt->display); 1229 return XFlush(xmb_rt->display);
1230 } 1230 }
1231 1231
1232 /*! \brief Handle single X event. 1232 /*! \brief Handle single X event.
1233 */ 1233 */
1234 void 1234 void
1235 _X_MB_handle_single_event(void *rt, void *evt) { 1235 _X_MB_handle_single_event(mb_rt_t *rt, void *evt) {
1236 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *)rt; 1236 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *)rt;
1237 1237
1238 handle_single_x_event(xmb_rt, (XEvent *)evt); 1238 handle_single_x_event(xmb_rt, (XEvent *)evt);
1239 } 1239 }
1240 1240
1241 /*! \brief Called at end of an iteration of X event loop. 1241 /*! \brief Called at end of an iteration of X event loop.
1242 */ 1242 */
1243 void 1243 void
1244 _X_MB_no_more_event(void *rt) { 1244 _X_MB_no_more_event(mb_rt_t *rt) {
1245 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *)rt; 1245 X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *)rt;
1246 1246
1247 no_more_event(xmb_rt); 1247 no_more_event(xmb_rt);
1248 } 1248 }
1249 1249