void ui_init(void) { log_info("Initialising UI"); initscr(); raw(); keypad(stdscr, TRUE); if (prefs_get_boolean(PREF_MOUSE)) { mousemask(ALL_MOUSE_EVENTS, NULL); mouseinterval(5); } ui_load_colours(); refresh(); create_title_bar(); create_status_bar(); status_bar_active(1); create_input_window(); wins_init(); cons_about(); notifier_init(); #ifdef HAVE_LIBXSS display = XOpenDisplay(0); #endif ui_idle_time = g_timer_new(); wins_refresh_current(); }
void ui_init(void) { log_info("Initialising UI"); initscr(); nonl(); cbreak(); noecho(); keypad(stdscr, TRUE); ui_load_colours(); refresh(); create_title_bar(); create_status_bar(); status_bar_active(1); create_input_window(); wins_init(); notifier_initialise(); cons_about(); #ifdef HAVE_LIBXSS display = XOpenDisplay(0); #endif ui_idle_time = g_timer_new(); inp_size = 0; ProfWin *window = wins_get_current(); win_update_virtual(window); }
Main_GUI::Main_GUI(int range_min, int range_max, int limit, bool gray, bool gdi, bool dw, int increase, const char* exceptions, bool ignore, bool wincomp, bool pre, bool components, bool no, int fallback, bool symb) : hinting_range_min(range_min), hinting_range_max(range_max), hinting_limit(limit), gray_strong_stem_width(gray), gdi_cleartype_strong_stem_width(gdi), dw_cleartype_strong_stem_width(dw), increase_x_height(increase), x_height_snapping_exceptions_string(exceptions), ignore_restrictions(ignore), windows_compatibility(wincomp), pre_hinting(pre), hint_with_components(components), no_info(no), latin_fallback(fallback), symbol(symb) { x_height_snapping_exceptions = NULL; create_layout(); create_connections(); create_actions(); create_menus(); create_status_bar(); set_defaults(); read_settings(); setUnifiedTitleAndToolBarOnMac(true); // XXX register translations somewhere and loop over them if (QLocale::system().name() == "en_US") locale = new QLocale; else locale = new QLocale(QLocale::C); }
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { int rc; WNDCLASSEX wc; MSG msg; const char *class_name = "brickd_logviewer"; (void)hPrevInstance; (void)lpCmdLine; _hinstance = hInstance; _event_log = OpenEventLog(NULL, "Brick Daemon"); if (_event_log == NULL) { rc = GetLastError(); report_error("Could not open event log: %s (%d)", get_error_name(rc), rc); return 0; } wc.cbSize = sizeof(WNDCLASSEX); wc.style = 0; wc.lpfnWndProc = window_proc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = NULL; wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wc.lpszMenuName = NULL; wc.lpszClassName = class_name; wc.hIconSm = NULL; if (!RegisterClassEx(&wc)) { rc = GetLastError(); report_error("Could not register window class: %s (%d)", get_error_name(rc), rc); CloseEventLog(_event_log); return 0; } _hwnd = CreateWindowEx(WS_EX_APPWINDOW | WS_EX_CLIENTEDGE, class_name, _title, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 1000, 700, NULL, NULL, hInstance, NULL); if (_hwnd == NULL) { rc = GetLastError(); report_error("Could not create window: %s (%d)", get_error_name(rc), rc); CloseEventLog(_event_log); return 0; } SendMessage(_hwnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON))); create_menu(); if (init_common_controls() < 0 || create_status_bar() < 0 || create_event_list_view() < 0 || create_debug_list_view() < 0) { CloseEventLog(_event_log); return 0; } set_current_list_view(_event_list_view); ShowWindow(_hwnd, nCmdShow); UpdateWindow(_hwnd); if (CreateThread(NULL, 0, read_named_pipe, NULL, 0, NULL) == NULL) { rc = GetLastError(); report_error("Could not create named pipe thread: %s (%d)", get_error_name(rc), rc); } read_event_log(); SetTimer(_hwnd, 1, 200, (TIMERPROC)NULL); while ((rc = GetMessage(&msg, NULL, 0, 0)) != 0) { if (rc < 0) { rc = GetLastError(); report_error("Could not get window message: %s (%d)", get_error_name(rc), rc); break; } else { TranslateMessage(&msg); DispatchMessage(&msg); } } free(_record_buffer); CloseEventLog(_event_log); return msg.wParam; }
void window_load(Window *window) { create_status_bar(window); create_menu(window); }
static void et_status_bar_init (EtStatusBar *self) { create_status_bar (self); }