Пример #1
0
void INTERNAL_cursortype(int local_id, int type)
{
    if (local_id == GD.win_id) {
        INTERNAL_hide_cursor_crosshair(local_id);
        if (type == G_CURSOR_CROSSHAIR) {
            XDefineCursor(INTERNAL_display, xwini[local_id].xwin, cur_cross);
            save_old_cursortype = type;
        }
        else if (type == G_CURSOR_WAIT) {
            XDefineCursor(INTERNAL_display, xwini[local_id].xwin, cur_wait);
        }
        else if (type == G_CURSOR_HAND) {
            XDefineCursor(INTERNAL_display, xwini[local_id].xwin, cur_hand);
        }
        else if (type == G_CURSOR_UPDOWN) {
            XDefineCursor(INTERNAL_display, xwini[local_id].xwin, cur_updown);
            save_old_cursortype = type;
        }
        else
            XUndefineCursor(INTERNAL_display, xwini[local_id].xwin);
    }
    xwini[local_id].xwin_cursortype = type;
    if (local_id == GD.win_id)
        INTERNAL_show_cursor_crosshair(local_id);
}
Пример #2
0
void g_retrievecursor(int store_id)
{
    if (store_id < 0 || store_id > G_MAX_STORE_CURSOR ||
	mswin_storexy[store_id].x == -1)
	return;
    INTERNAL_hide_cursor_crosshair(GD.win_id);
    SetCursorPos(mswin_storexy[store_id].x, mswin_storexy[store_id].y);
    INTERNAL_show_cursor_crosshair(GD.win_id);
}
Пример #3
0
void INTERNAL_warpcursor(long x, long y)
{
    POINT point;

    point.x = (int) x;
    point.y = (int) y;
    ClientToScreen(MSWIN, &point);
    INTERNAL_hide_cursor_crosshair(GD.win_id);
    SetCursorPos(point.x, point.y);
    INTERNAL_show_cursor_crosshair(GD.win_id);
}