67 |
return head; |
return head; |
68 |
} |
} |
69 |
|
|
70 |
static BOOL CALLBACK enum_cb(HWND hwnd, LPARAM lparam) |
static BOOL CALLBACK |
71 |
|
enum_cb(HWND hwnd, LPARAM lparam) |
72 |
{ |
{ |
73 |
RECT rect; |
RECT rect; |
74 |
char title[150]; |
char title[150]; |
82 |
|
|
83 |
vchannel_write("CREATE1,0x%p,0x%x", hwnd, 0); |
vchannel_write("CREATE1,0x%p,0x%x", hwnd, 0); |
84 |
|
|
85 |
if (!GetWindowRect(hwnd, &rect)) { |
if (!GetWindowRect(hwnd, &rect)) |
86 |
|
{ |
87 |
debug("GetWindowRect failed!"); |
debug("GetWindowRect failed!"); |
88 |
return TRUE; |
return TRUE; |
89 |
} |
} |
90 |
|
|
91 |
vchannel_write("POSITION1,0x%p,%d,%d,%d,%d,0x%x", |
vchannel_write("POSITION1,0x%p,%d,%d,%d,%d,0x%x", |
92 |
hwnd, |
hwnd, |
93 |
rect.left, rect.top, |
rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, 0); |
|
rect.right - rect.left, |
|
|
rect.bottom - rect.top, |
|
|
0); |
|
94 |
|
|
95 |
GetWindowText(hwnd, title, sizeof(title)); |
GetWindowText(hwnd, title, sizeof(title)); |
96 |
|
|
103 |
else |
else |
104 |
state = 0; |
state = 0; |
105 |
|
|
106 |
vchannel_write("SETSTATE1,0x%p,%s,0x%x,0x%x", |
vchannel_write("SETSTATE1,0x%p,%s,0x%x,0x%x", hwnd, title, state, 0); |
|
hwnd, title, state, 0); |
|
107 |
|
|
108 |
return TRUE; |
return TRUE; |
109 |
} |
} |
130 |
|
|
131 |
char *p, *tok1, *tok2, *tok3, *tok4, *tok5, *tok6, *tok7, *tok8; |
char *p, *tok1, *tok2, *tok3, *tok4, *tok5, *tok6, *tok7, *tok8; |
132 |
|
|
133 |
while ((size = vchannel_read(line, sizeof(line))) >= 0) { |
while ((size = vchannel_read(line, sizeof(line))) >= 0) |
134 |
|
{ |
135 |
debug("Got: %s", line); |
debug("Got: %s", line); |
136 |
|
|
137 |
p = line; |
p = line; |