#include #include #include #include #include #include #include #include #include Xv_pkg *my_xv_frame_base_pkg = &xv_frame_base_pkg; Xv_pkg *my_xv_frame_cmd_pkg = &xv_frame_cmd_pkg; Xv_pkg *my_xv_panel_pkg = &xv_panel_pkg; Xv_pkg *my_xv_panel_button_pkg = &xv_panel_button_pkg; Xv_pkg *my_xv_panel_text_pkg = &xv_panel_text_pkg; Xv_pkg *my_xv_panel_num_text_pkg = &xv_panel_num_text_pkg; Xv_pkg *my_xv_panel_choice_pkg = &xv_panel_choice_pkg; Xv_pkg *my_xv_panel_list_pkg = &xv_panel_list_pkg; Xv_pkg *my_xv_panel_message_pkg = &xv_panel_message_pkg; Xv_pkg *my_xv_panel_slider_pkg = &xv_panel_slider_pkg; Xv_pkg *my_xv_panel_gauge_pkg = &xv_panel_gauge_pkg; Xv_pkg *my_xv_panel_multi_text_pkg = &xv_panel_multiline_text_pkg; Xv_pkg *my_xv_icon_pkg = &xv_icon_pkg; Xv_pkg *my_xv_server_image_pkg = &xv_server_image_pkg; Xv_pkg *my_xv_command_menu_pkg = &xv_command_menu_pkg; Xv_pkg *my_xv_menu_item_pkg = &xv_menu_item_pkg; Xv_pkg *my_xv_choice_menu_pkg = &xv_choice_menu_pkg; Xv_pkg *my_xv_toggle_menu_pkg = &xv_toggle_menu_pkg; Xv_pkg *my_xv_font_pkg = &xv_font_pkg; Xv_pkg *my_xv_notice_pkg = &xv_notice_pkg; Xv_pkg *my_xv_textsw_pkg = &xv_textsw_pkg; Xv_pkg *my_xv_tty_pkg = &xv_tty_pkg; int my_get_depth(Xv_opaque obj) { Display *dpy; if (obj == (Xv_opaque)NULL) return 0; dpy = (Display *)xv_get(obj,XV_DISPLAY); return (DefaultDepth(dpy,DefaultScreen(dpy))); } void my_xv_init(int argc, char **argvs) { int loop; char *argv[argc + 1]; int start = 0,length = 0; for (loop = 0 ; loop <= argc; loop++) { while (*((*argvs)+start+length) != '\0') length++; argv[loop] = calloc(1,length + 1); strcpy(argv[loop],*argvs+start); start += length + 1; length = 0; } argv[argc + 1] = NULL; xv_init(XV_INIT_ARGS,argc,&argv,NULL); }