예제 #1
0
void refreshStyle(void)
{
	if (false == engine_running) return;
	readStyle();
	setmetrics();
	sendToAll(MSGID_REFRESH);
}
예제 #2
0
void startEngine(void)
{
	//dbg_printf("Started skinner engine");
	readSettings();
	set_log_window();

	if (engine_running)
		return;
	if (false == make_exclusion_list())
		return;

	if (false == load_dll())
	{
		free_exclusion_list();
		return;
	}

	bbSkinMsg = RegisterWindowMessage(BBLEANSKIN_WINDOWMSG);

	// save sys-colors
	setTTC(SAVE_3DC);

	// save the normal SystemParameter settings, window metrics, etc.
	ncm_save.cbSize = sizeof(NONCLIENTMETRICS);
	SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof ncm_save, &ncm_save, 0);
	ZeroMemory(&ncm_prev, sizeof(NONCLIENTMETRICS));

	// read styles for skin
	readStyle();
	// possibly set sys-colors
	setTTC(APPLY_3DC);
	// set the system wide window metrics according to style metrics
	setmetrics();
	// set the hook
	EntryFunc(ENGINE_SETHOOKS, lpvMem);
	engine_running = true;

	// now apply to open windows
	if (applyToOpen) sendToAll(MSGID_LOAD);

	//write_bin();
}
예제 #3
0
파일: main.c 프로젝트: LCameron/linux-xlnx
static void start(int fd)
{
	u8 slot = 2;
	int tmp;
	u32 isr;

	setmetrics(slot, XAPM_METRIC_SET_4, XAPM_METRIC_COUNTER_0);
	setsampleinterval(0x3FFFFFF);

	loadsic();

	intrenable(XAPM_IXR_SIC_OVERFLOW_MASK);

	intrglobalenable();

	enablemetricscounter();

	enablesic();

	isr = intrgetstatus();
	/* Wait for SIC overflow interrupt */
	if (read(fd, &tmp, 4) < 0)
		perror("Read\n");
	/* Driver clears the interrupt and occured interrupt status is
		stored in param->isr */
	isr = intrgetstatus();
	if (isr & XAPM_IXR_SIC_OVERFLOW_MASK)
		disablesic();

	disablemetricscounter();

	intrdisable(XAPM_IXR_SIC_OVERFLOW_MASK);

	intrglobaldisable();

	printf("Required metrics: %u\n",
		getsampledmetriccounter(XAPM_METRIC_COUNTER_0) *
		params->scalefactor);
}