How do I lock the mouse in an area?

The problem I have right now is that I can lock my mouse texture to an rect using Mathf.clamp, but now the actual mouse.

Is there anyway to clip the actual mouse/cursor in a similar fashion as my mouse texture?

The mouse position is not at all related to unity, Thats the job of user32.dll. I suppose you could read up on it, but its going to be whole lot more complicated than:

    Vector2 mousePos;
    float leftBound;
    float rightBound;
    float bottomBound;
    float topBound;

    mousePos.x = Mathf.Clamp(Input.mousePosition.x, leftBound, rightBound);
    mousePos.y = Mathf.Clamp(Input.mousePosition.y, bottomBound, topBound);
    Input.mousePosition = mousePos; // too bad its read only.