As far as I can tell, there is no easy way about it. I have found one very crude method of getting the maximum and minimum size of the window.
It involves setting the width and height to a very large number to see how far the window resizes then remembering this size as the maximum, then setting the width and height to a small number and doing the same again. After all this I just reset the width and height to their original values.
The obvious problem with this is the fact that it is very visible to the user that the window has been resized.
As for the resize increments I can't think of (at the moment) any workaround to getting that information.
Anyway here's the code I have for working out the maximum and minimum size:
AXUIElementRef window; // The window
AXValueRef sizeValue = (AXValueRef)[UIElementUtilities valueOfAttribute:@"AXSize" ofUIElement:window];
CGSize windowSize;
AXValueGetValue(sizeValue, kAXValueCGSizeType, &windowSize);
CGFloat windowWidth = windowSize.width;
CGFloat windowHeight = windowSize.height;
// Set it to a very large number
[UIElementUtilities setStringValue:@"w=5000 h=5000" forAttribute:@"AXSize" ofUIElement:window];
AXValueRef maxSizeValue = (AXValueRef)[UIElementUtilities valueOfAttribute:@"AXSize" ofUIElement:window];
CGSize maxWindowSize;
AXValueGetValue(maxSizeValue, kAXValueCGSizeType, &maxWindowSize);
CGFloat maxWindowWidth = maxWindowSize.width;
CGFloat maxWindowHeight = maxWindowSize.height;
NSLog(@"max width = %f. max height = %f.", maxWindowWidth, maxWindowHeight);
// Set it to a very small number
[UIElementUtilities setStringValue:@"w=0 h=0" forAttribute:@"AXSize" ofUIElement:window];
AXValueRef minSizeValue = (AXValueRef)[UIElementUtilities valueOfAttribute:@"AXSize" ofUIElement:window];
CGSize minWindowSize;
AXValueGetValue(minSizeValue, kAXValueCGSizeType, &minWindowSize);
CGFloat minWindowWidth = minWindowSize.width;
CGFloat minWindowHeight = minWindowSize.height;
NSLog(@"min width = %f. min height = %f.", minWindowWidth, minWindowHeight);
// Reset size
[UIElementUtilities setStringValue:[NSString stringWithFormat:@"w=%f h=%f", windowWidth, windowHeight] forAttribute:@"AXSize" ofUIElement:window];
In case you were wondering, UIElementUtilities
is a class I've taken from one of the Apple example projects called UIElementInspector.