MoveWindow function Null safety user32

int MoveWindow(
  1. int hWnd,
  2. int X,
  3. int Y,
  4. int nWidth,
  5. int nHeight,
  6. int bRepaint
)

Changes the position and dimensions of the specified window. For a top-level window, the position and dimensions are relative to the upper-left corner of the screen. For a child window, they are relative to the upper-left corner of the parent window's client area.

BOOL MoveWindow(
  HWND hWnd,
  int  X,
  int  Y,
  int  nWidth,
  int  nHeight,
  BOOL bRepaint
);

Implementation

int MoveWindow(int hWnd, int X, int Y, int nWidth, int nHeight, int bRepaint) {
  final _MoveWindow = _user32.lookupFunction<
      Int32 Function(IntPtr hWnd, Int32 X, Int32 Y, Int32 nWidth, Int32 nHeight,
          Int32 bRepaint),
      int Function(int hWnd, int X, int Y, int nWidth, int nHeight,
          int bRepaint)>('MoveWindow');
  return _MoveWindow(hWnd, X, Y, nWidth, nHeight, bRepaint);
}