MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / Window

Class Window

src/com/dtmilano/android/window.py:27–74  ·  view source on GitHub ↗

Window class

Source from the content-addressed store, hash-verified

25DEBUG = False
26
27class Window(object):
28 '''
29 Window class
30 '''
31
32 def __init__(self, num, winId, activity, wvx, wvy, wvw, wvh, px, py, visibility, focused=False):
33 '''
34 Constructor
35
36 @type num: int
37 @param num: Ordering number in Window Manager
38 @type winId: str
39 @param winId: the window ID
40 @type activity: str
41 @param activity: the activity (or sometimes other component) owning the window
42 @type wvx: int
43 @param wvx: window's virtual X
44 @type wvy: int
45 @param wvy: window's virtual Y
46 @type wvw: int
47 @param wvw: window's virtual width
48 @type wvh: int
49 @param wvh: window's virtual height
50 @type px: int
51 @param px: parent's X
52 @type py: int
53 @param py: parent's Y
54 @type visibility: int
55 @param visibility: visibility of the window
56 '''
57
58 if DEBUG: print("Window(%d, %s, %s, %d, %d, %d, %d, %d, %d, %d)" % \
59 (num, winId, activity, wvx, wvy, wvw, wvh, px, py, visibility), file=sys.stderr)
60 self.num = num
61 self.winId = winId
62 self.activity = activity
63 self.wvx = wvx
64 self.wvy = wvy
65 self.wvw = wvw
66 self.wvh = wvh
67 self.px = px
68 self.py = py
69 self.visibility = visibility
70 self.focused = focused
71
72 def __str__(self):
73 return "Window(%d, wid=%s, a=%s, x=%d, y=%d, w=%d, h=%d, px=%d, py=%d, v=%d, f=%s)" % \
74 (self.num, self.winId, self.activity, self.wvx, self.wvy, self.wvw, self.wvh, self.px, self.py, self.visibility, self.focused)
75

Callers 2

getWindowsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected