Пример #1
0
int Frame::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QFrame::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: press_top_mid((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
        case 1: move_top_mid((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
        case 2: press_bottom_left((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
        case 3: move_bottom_left((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
        case 4: press_bottom_right((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
        case 5: move_bottom_right((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
        case 6: press_bottom_mid((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
        case 7: move_bottom_mid((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
        case 8: press_right((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
        case 9: move_right((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
        case 10: press_left((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
        case 11: move_left((*reinterpret_cast< QMouseEvent*(*)>(_a[1]))); break;
        case 12: destroy_it(); break;
        case 13: maximize_it(); break;
        case 14: iconify_it(); break;
        case 15: dragEnterEvent((*reinterpret_cast< QDragEnterEvent*(*)>(_a[1]))); break;
        case 16: dragMoveEvent((*reinterpret_cast< QDragMoveEvent*(*)>(_a[1]))); break;
        case 17: dropEvent((*reinterpret_cast< QDropEvent*(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 18;
    }
    return _id;
}
Пример #2
0
int		check_key_press(int keycode, t_mlx *mlx)
{
	mlx->key = keycode;
	if (mlx->menu == 1)
	{
		if (mlx->key == 126)
			press_up(mlx);
		if (mlx->key == 125)
			press_down(mlx);
		if (mlx->key == 124)
			press_right(mlx);
		if (mlx->key == 123)
			press_left(mlx);
		if (mlx->key >= 123 && mlx->key <= 126)
			mlx->move = 1;
	}
	return (0);
}