예제 #1
0
    def displayWindowHide(self):
        """ Hide VM's display window
        """

        if self.emu_vboxdev.state == 'running' or self.emu_vboxdev.state == 'suspended':
            hwnd = int(self.emu_vboxdev.displayWindowFocus())
            if hwnd > 0:
                winm.hideWindow(hwnd)
예제 #2
0
    def displayWindowFocus(self):
        """ Bring VM's display as foreground window and focus on it
        """

        if self.emu_vboxdev.state == 'running' or self.emu_vboxdev.state == 'suspended':
            hwnd = int(self.emu_vboxdev.displayWindowFocus())
            if hwnd > 0:
                winm.activateWindow(hwnd)
예제 #3
0
    def displayWindowHide(self):
        """ Hide VM's display window
        """

        if self.emu_vboxdev.state == 'running' or self.emu_vboxdev.state == 'suspended':
            hwnd = int(self.emu_vboxdev.displayWindowFocus())
            if hwnd > 0:
                winm.hideWindow(hwnd)
예제 #4
0
    def displayWindowFocus(self):
        """ Bring VM's display as foreground window and focus on it
        """

        if self.emu_vboxdev.state == 'running' or self.emu_vboxdev.state == 'suspended':
            hwnd = int(self.emu_vboxdev.displayWindowFocus())
            if hwnd > 0:
                winm.activateWindow(hwnd)
예제 #5
0
파일: Telnet.py 프로젝트: GNS3/gns3-legacy
def bringConsoleToFront(console, name):
    # Attempts to bring console terminal to front, and returns True if succeeds.
    # False means that further processing required.
    # Technologov: This code is experimental, and does not support all terminal emulators.
    # Maybe it should be based on PIDs, rather than window names?
    if sys.platform.startswith('win'):# and console.startswith("putty.exe"):
        return winm.bringWindowToFront("Dynamips", "%s" % name)
    if sys.platform.startswith('darwin'):
        # Not implemented, this is handled by OSX
        return winm.bringWindowToFront("Dynamips", "%s" % name)
    if sys.platform.startswith('darwin'):
        # Not implemented, this is handled by OSX
        return True
    # X11-based UNIX-like system
    return winm.bringWindowToFront("", "%s" % str(name))
예제 #6
0
def bringConsoleToFront(console, name):
    # Attempts to bring console terminal to front, and returns True if succeeds.
    # False means that further processing required.
    # Technologov: This code is experimental, and does not support all terminal emulators.
    # Maybe it should be based on PIDs, rather than window names?
    if sys.platform.startswith('win'):  # and console.startswith("putty.exe"):
        return winm.bringWindowToFront("Dynamips", "%s" % name)
    if sys.platform.startswith('darwin'):
        # Not implemented, this is handled by OSX
        return winm.bringWindowToFront("Dynamips", "%s" % name)
    if sys.platform.startswith('darwin'):
        # Not implemented, this is handled by OSX
        return True
    # X11-based UNIX-like system
    return winm.bringWindowToFront("", "%s" % str(name))