Skip to content

Commit 9df558f

Browse files
committed
Fix (weird) ewmhlib typing error
1 parent e5ee5fe commit 9df558f

File tree

1 file changed

+6
-27
lines changed

1 file changed

+6
-27
lines changed

README.md

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,33 +29,12 @@ My most sincere thanks and acknowledgement. amongst many others (see AUTHORS.txt
2929
## Window Features <a name="window-features"></a>
3030

3131
There are three kinds of functions to be used within PyWinCtl:
32-
- General, independent functions: These functions can be directly invoked at module level, without the need of referencing a Window object
33-
- Window class:
34-
- Methods: You need a Window object to control or get info on the target window on screen. It is possible to get a Window object by using any of the general methods (e.g. getActiveWidow() or getWindowsWithTitle()). You can also use the window id, as returned by PyQt's self.winId() or tkinter's root.frame(), which is very handy to get the Window object for your own application.
35-
- Properties: Window attributes, getters and setters, that also require to use a Window object
36-
37-
A very simple example:
38-
39-
```
40-
import pywinctl as pwc
41-
42-
win = pwc.getActiveWindow() # General function. Directly invoked using the module (not a Window object)
43-
44-
if win is not None:
45-
print("ACTIVE WINDOW", win.title) # Window property, invoked using a Window object
46-
position = win.position # Window property, invoked using a Window object
47-
print("INITIAL POSITION", position)
48-
x, y = position
49-
win.moveTo(x + 10, y + 10) # Window method, invoked using a Window object
50-
print("INTERMEDIATE POSITION", win.position)
51-
win.topleft = (win.left + 20, win.top + 20) # Window property which can also be set
52-
print("FINAL POSITION", win.position)
53-
54-
else:
55-
print("NOT FOUND)
56-
```
57-
58-
These functions are available at the moment, in all three platforms (Windows, Linux and macOS)
32+
- General, independent functions: These functions can be directly invoked at module level, without the need of referencing a Window object (e.g. `pywinctl.getActiveWindow()` or `pywinctl.getAllTitles()`)
33+
- Window class: You need a Window object to control or get info on the target window on screen. It is possible to get a Window object by using any of the general methods (e.g. getActiveWidow() or getWindowsWithTitle()). You can also use the window id, as returned by PyQt's self.winId() or tkinter's root.frame(), which is very handy to get the Window object for your own application.
34+
- Methods: functions within Window class to get info or perform actions and changes on target window (e.g. `window.resizeTo(800, 600)` or `window.close()`)
35+
- Properties: Window attributes, getters and setters, that also require to use a Window object (e.g. `window.title` or `window.center = (500, 300)`)
36+
37+
These features are available at the moment, in all three platforms (Windows, Linux and macOS)
5938

6039
| General, independent functions: | Window class methods: | Window class properties: |
6140
|:------------------------------------------------------------------:|:----------------------------------------------------:|:------------------------------------------------------------------------------------------:|

0 commit comments

Comments
 (0)