Every line of 'tkinter get window size' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
315 def get_window_size(self): 316 """Retrieve the window size. 317 318 Returns 319 ------- 320 hienoi.Vector2i 321 The window size. 322 """ 323 window_size_x = ctypes.c_int() 324 window_size_y = ctypes.c_int() 325 sdl2.SDL_GetWindowSize(self._handles.window, 326 ctypes.byref(window_size_x), 327 ctypes.byref(window_size_y)) 328 return Vector2i(window_size_x.value, window_size_y.value)
663 def get_size(self): 664 rect = Rect() 665 carbon.GetWindowBounds(self._window, kWindowContentRgn, byref(rect)) 666 return rect.right - rect.left, rect.bottom - rect.top