Esempio n. 1
0
static void extrawindow_spin_cursor(ExtraWindow *ew, GHOST_TUns64 time) {
	GHOST_TUns8 bitmap[16][2];
	GHOST_TUns8 mask[16][2];
	double ftime= (double) ((GHOST_TInt64) time)/1000;
	float angle= fmod(ftime, 1.0) * 3.1415*2;
	int i;
	
	memset(&bitmap, 0, sizeof(bitmap));
	memset(&mask, 0, sizeof(mask));
	
	bitmap[0][0] |= mask[0][0] |= 0xF;
	bitmap[1][0] |= mask[1][0] |= 0xF;
	bitmap[2][0] |= mask[2][0] |= 0xF;
	bitmap[3][0] |= mask[3][0] |= 0xF;
	
	for (i=0; i<7; i++) {
		int x = 7 + cos(angle)*i;
		int y = 7 + sin(angle)*i;
		
		mask[y][x/8] |= (1 << (x%8));
	}
	for (i=0; i<64; i++) {
		float v= (i/63.0) * 3.1415*2;
		int x = 7 + cos(v)*7;
		int y = 7 + sin(v)*7;
		
		mask[y][x/8] |= (1 << (x%8));
	}
	
	GHOST_SetCustomCursorShape(ew->win, bitmap, mask, 0, 0);
}
Esempio n. 2
0
static void window_set_custom_cursor(wmWindow *win, unsigned char mask[16][2], 
                                     unsigned char bitmap[16][2], int hotx, int hoty)
{
	GHOST_SetCustomCursorShape(win->ghostwin, bitmap, mask, hotx, hoty);
}