comparison src/X_supp.c @ 550:127499ab2412 Android_Skia

Upgrade ndoejs plugin to level of a new runtime. Original, nodejs plugin is a variant of X runtime. But, now, I think it had better a new runtime that reuse code of X runtime. It would be easier to maintain.
author Thinker K.F. Li <thinker@branda.to>
date Sun, 06 Jun 2010 13:58:01 +0800
parents 49f8f57f184a
children c9d23f7279a4
comparison
equal deleted inserted replaced
549:6ec4d7e90480 550:127499ab2412
45 int w, h; 45 int w, h;
46 46
47 X_kb_info_t kbinfo; 47 X_kb_info_t kbinfo;
48 monitor_t monitors[MAX_MONITORS]; 48 monitor_t monitors[MAX_MONITORS];
49 int n_monitor; 49 int n_monitor;
50
51 void *nodejs_data;
52 50
53 #ifndef ONLY_MOUSE_MOVE_RAW 51 #ifndef ONLY_MOUSE_MOVE_RAW
54 /* States */ 52 /* States */
55 shape_t *last; 53 shape_t *last;
56 #endif 54 #endif
654 * These functions are for internal using. 652 * These functions are for internal using.
655 * @{ 653 * @{
656 */ 654 */
657 /*! \brief Exported for nodejs plugin to call handle_x_event. 655 /*! \brief Exported for nodejs plugin to call handle_x_event.
658 */ 656 */
659 void _X_MB_handle_x_event_for_nodejs(X_MB_runtime_t *rt) { 657 void _X_MB_handle_x_event_for_nodejs(void *rt) {
660 handle_x_event(rt); 658 handle_x_event((X_MB_runtime_t *)rt);
661 } 659 }
662 660
663 /*! \brief Get X connect for nodejs plugin. 661 /*! \brief Get X connect for nodejs plugin.
664 */ 662 */
665 int _X_MB_get_x_conn_for_nodejs(X_MB_runtime_t *rt) { 663 int _X_MB_get_x_conn_for_nodejs(void *rt) {
666 return XConnectionNumber(rt->display); 664 return XConnectionNumber(((X_MB_runtime_t *)rt)->display);
667 } 665 }
668 666
669 /*! \brief Flush buffer for the X connection of a runtime object. 667 /*! \brief Flush buffer for the X connection of a runtime object.
670 */ 668 */
671 int _X_MB_flush_x_conn_nodejs(X_MB_runtime_t *rt) { 669 int _X_MB_flush_x_conn_nodejs(void *rt) {
672 return XFlush(rt->display); 670 return XFlush(((X_MB_runtime_t *)rt)->display);
673 }
674
675 /*! \brief Keep data for nodejs plugin.
676 */
677 void _X_MB_set_data_nodejs(X_MB_runtime_t *rt, void *data) {
678 rt->nodejs_data = data;
679 }
680
681 /*! \brief Get data for nodejs plugin.
682 */
683 void *_X_MB_get_data_nodejs(X_MB_runtime_t *rt) {
684 return rt->nodejs_data;
685 } 671 }
686 672
687 /* @} */ 673 /* @} */