def __call__(self, only_sel=False):
     self.only_sel = only_sel
     res = []
     for hwnd in GetTargetWindows():
         if not IsWindow(hwnd):
             self.PrintError("Not a window")
             continue
         clsName = GetClassName(hwnd)
         if not IsChild(GetParent(hwnd),
                        hwnd) or clsName in win32_ctrls['statics']:
             val = eg.WinApi.GetWindowText(hwnd)
         elif clsName in win32_ctrls['edits']:
             val = self.getEditText(hwnd)
         elif clsName in win32_ctrls['combos']:
             val = self.getComboboxItems(hwnd)
         elif clsName in win32_ctrls['listboxes']:
             val = self.getListboxItems(hwnd)
         elif clsName in win32_ctrls['listviews']:
             val = self.getListViewItems(hwnd)
         elif match_cls(clsName, win32_ctrls['statusbars']):
             val = self.getStatusBarItems(hwnd)
         else:
             val = None
         res.append(val)
     return res
    def __call__(self, action=2):
        for hwnd in GetTargetWindows():
            if not IsWindow(hwnd):
                self.PrintError("Not a window")
                continue
            isAlwaysOnTop = GetAlwaysOnTop(hwnd)
            if action == 1 or (action == 2 and not isAlwaysOnTop):
                flag = HWND_TOPMOST
            else:
                flag = HWND_NOTOPMOST

            SetWindowPos(hwnd, flag, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)
        return GetAlwaysOnTop(hwnd)