Instead of using those temporary ints, just dereference x and y directly in NSMakePoint, so NSMakePoint(*x,*y) should work fine.
I guess I'm not really sure what you're trying to achieve. The Cocoa coordinate system starts from the bottom left, so the numbers may not be what you expect.
From what I can tell from your code, the relativeTo function will return the x and y position relative to the whole screen. The absoluteFrom will return a value telling you how the x and y screen coordinates you give are relative to the view. The mouse event values you provide therefore are going to look odd, number one because they start in the top-left, and number two because they are window relative.
Instead of getting mousex and y, try setting a specific screen coordinate (ie. 10,10=bottom left corner) and then using your function, move the window around relative to that and you'll get how it works.
I guess I'm not really sure what you're trying to achieve. The Cocoa coordinate system starts from the bottom left, so the numbers may not be what you expect.
From what I can tell from your code, the relativeTo function will return the x and y position relative to the whole screen. The absoluteFrom will return a value telling you how the x and y screen coordinates you give are relative to the view. The mouse event values you provide therefore are going to look odd, number one because they start in the top-left, and number two because they are window relative.
Instead of getting mousex and y, try setting a specific screen coordinate (ie. 10,10=bottom left corner) and then using your function, move the window around relative to that and you'll get how it works.