Пример #1
0
static nserror
atari_global_history_init_phase2(struct core_window *cw,
				 struct core_window_callback_table *cb_t)
{
	NSLOG(netsurf, INFO, "cw %p", cw);
	return(global_history_init(cb_t, cw));
}
Пример #2
0
/* exported interface documented in amiga/cookies.h */
nserror ami_history_global_present(void)
{
	struct ami_history_global_window *ncwin;
	nserror res;

	if(history_window != NULL) {
		//windowtofront()
		return NSERROR_OK;
	}

	ncwin = calloc(1, sizeof(struct ami_history_global_window));
	if (ncwin == NULL) {
		return NSERROR_NOMEM;
	}

	ncwin->core.wintitle = ami_utf8_easy((char *)messages_get("GlobalHistory"));

	res = ami_history_global_create_window(ncwin);
	if (res != NSERROR_OK) {
		NSLOG(netsurf, INFO, "SSL UI builder init failed");
		ami_utf8_free(ncwin->core.wintitle);
		free(ncwin);
		return res;
	}

	/* initialise Amiga core window */
	ncwin->core.draw = ami_history_global_draw;
	ncwin->core.key = ami_history_global_key;
	ncwin->core.mouse = ami_history_global_mouse;
	ncwin->core.close = ami_history_global_destroy;
	ncwin->core.event = NULL;
	ncwin->core.drag_end = ami_history_global_drag_end;
	ncwin->core.icon_drop = NULL;

	res = ami_corewindow_init(&ncwin->core);
	if (res != NSERROR_OK) {
		ami_utf8_free(ncwin->core.wintitle);
		DisposeObject(ncwin->core.objects[GID_CW_WIN]);
		free(ncwin);
		return res;
	}

	res = global_history_init(ncwin->core.cb_table, (struct core_window *)ncwin);
	if (res != NSERROR_OK) {
		ami_utf8_free(ncwin->core.wintitle);
		DisposeObject(ncwin->core.objects[GID_CW_WIN]);
		free(ncwin);
		return res;
	}

	history_window = ncwin;

	return NSERROR_OK;
}
Пример #3
0
static void gui_init2(int argc, char** argv)
{
    deskmenu_init();
    menu_register( -1, theapp);
    if (sys_type() & (SYS_MAGIC|SYS_NAES|SYS_XAAES)) {
        menu_register( _AESapid, (char*)"  NetSurf ");
    }
    gemtk_wm_init();
    global_history_init();
    hotlist_init();
    toolbar_init();
}