コード例 #1
0
ファイル: gui.c プロジェクト: chinese-opendesktop/oxim
static void InitWindows(xccore_t *xccore)
{
    gui_status_init();
    gui_root_init();
    gui_preedit_init();
    gui_select_init();
    gui_tray_init();
    gui_menu_init();
    gui_symbol_init();
    gui_keyboard_init();
    gui_xcin_init();
    gui_msgbox_init();
    gui_selectmenu_init();

    int isok = gui_restore_window_pos();

    winlist_t *win = winlist;

    while (win)
    {
	win->data = (void *)xccore;
	if (win->draw)
	{
	    XftDrawDestroy(win->draw);
	}

	win->draw = XftDrawCreate(gui->display, win->window, gui->visual, gui->colormap);

	XSelectInput(gui->display, win->window, (ExposureMask|ButtonPressMask|ButtonReleaseMask|PointerMotionMask|EnterWindowMask|LeaveWindowMask|StructureNotifyMask|KeyPressMask));
 	MakeDefaultFont(win); /* 建立預設字型 */
	XMoveResizeWindow(gui->display, win->window,
			win->pos_x, win->pos_y, win->width, win->height);
	win = win->next;
    }
}
コード例 #2
0
ファイル: gui_user_menu.c プロジェクト: pelrun/CHDK
//-------------------------------------------------------------------
static void rinit()
{
	// Erase screen if switching from user menu to main menu
	// in case the user menu is larger than the main menu
	// otherwise it leaves remnants of the user menu above and below
	// the main menu.
    gui_set_need_restore();
	gui_menu_init(&root_menu);
}