当前位置: 首页>>代码示例>>Python>>正文


Python window.Window方法代码示例

本文整理汇总了Python中window.Window方法的典型用法代码示例。如果您正苦于以下问题:Python window.Window方法的具体用法?Python window.Window怎么用?Python window.Window使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在window的用法示例。


在下文中一共展示了window.Window方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_windows

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def get_windows(self):
        """
        @rtype:  list of L{Window}
        @return: Returns a list of windows handled by this thread.
        """
        try:
            process = self.get_process()
        except Exception:
            process = None
        return [
                Window( hWnd, process, self ) \
                for hWnd in win32.EnumThreadWindows( self.get_tid() )
                ]

#------------------------------------------------------------------------------

    # TODO
    # A registers cache could be implemented here. 
开发者ID:debasishm89,项目名称:OpenXMolar,代码行数:20,代码来源:thread.py

示例2: get_window_at

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def get_window_at(x, y):
        """
        Get the window located at the given coordinates in the desktop.
        If no such window exists an exception is raised.

        @see: L{find_window}

        @type  x: int
        @param x: Horizontal coordinate.
        @type  y: int
        @param y: Vertical coordinate.

        @rtype:  L{Window}
        @return: Window at the requested position. If no such window
            exists a C{WindowsError} exception is raised.

        @raise WindowsError: An error occured while processing this request.
        """
        return Window( win32.WindowFromPoint( (x, y) ) ) 
开发者ID:debasishm89,项目名称:OpenXMolar,代码行数:21,代码来源:system.py

示例3: make_window

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def make_window(self, **kwargs):
        """Make a Window"""
        import window
        return(window.Window(**kwargs)) 
开发者ID:OWASP,项目名称:NINJA-PingU,代码行数:6,代码来源:factory.py

示例4: __init__

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def __init__(self, width, height, title):
        super(GlutWindow, self).__init__()
        self.width = width
        self.height = height
        self.title = title

        self.texture_id = 0
        self.vertices = None

        self.pixels = np.zeros(self.width * self.height, np.uint32)
        self.window = Window(self.pixels, self.width, self.height)

        self.setup() 
开发者ID:guaxiao,项目名称:rasterizer.py,代码行数:15,代码来源:glutwindow.py

示例5: find_window

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def find_window(className = None, windowName = None):
        """
        Find the first top-level window in the current desktop to match the
        given class name and/or window name. If neither are provided any
        top-level window will match.

        @see: L{get_window_at}

        @type  className: str
        @param className: (Optional) Class name of the window to find.
            If C{None} or not used any class name will match the search.

        @type  windowName: str
        @param windowName: (Optional) Caption text of the window to find.
            If C{None} or not used any caption text will match the search.

        @rtype:  L{Window} or None
        @return: A window that matches the request. There may be more matching
            windows, but this method only returns one. If no matching window
            is found, the return value is C{None}.

        @raise WindowsError: An error occured while processing this request.
        """
        # I'd love to reverse the order of the parameters
        # but that might create some confusion. :(
        hWnd = win32.FindWindow(className, windowName)
        if hWnd:
            return Window(hWnd) 
开发者ID:debasishm89,项目名称:OpenXMolar,代码行数:30,代码来源:system.py

示例6: get_foreground_window

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def get_foreground_window():
        """
        @rtype:  L{Window}
        @return: Returns the foreground window.
        @raise WindowsError: An error occured while processing this request.
        """
        return Window( win32.GetForegroundWindow() ) 
开发者ID:debasishm89,项目名称:OpenXMolar,代码行数:9,代码来源:system.py

示例7: get_shell_window

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def get_shell_window():
        """
        @rtype:  L{Window}
        @return: Returns the shell window.
        @raise WindowsError: An error occured while processing this request.
        """
        return Window( win32.GetShellWindow() ) 
开发者ID:debasishm89,项目名称:OpenXMolar,代码行数:9,代码来源:system.py

示例8: get_top_level_windows

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def get_top_level_windows():
        """
        @rtype:  L{Window}
        @return: Returns the top-level windows in the current desktop.
        @raise WindowsError: An error occured while processing this request.
        """
        return [ Window( hWnd ) for hWnd in win32.EnumWindows() ]

#------------------------------------------------------------------------------ 
开发者ID:debasishm89,项目名称:OpenXMolar,代码行数:11,代码来源:system.py

示例9: get_windows

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def get_windows(self):
        """
        @rtype:  list of L{Window}
        @return: Returns a list of windows
            handled by all processes in this snapshot.
        """
        window_list = list()
        for process in self.iter_processes():
            window_list.extend( process.get_windows() )
        return window_list 
开发者ID:debasishm89,项目名称:OpenXMolar,代码行数:12,代码来源:process.py

示例10: force_garbage_collection

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def force_garbage_collection(bIgnoreExceptions = True):
        """
        Close all Win32 handles the Python garbage collector failed to close.

        @type  bIgnoreExceptions: bool
        @param bIgnoreExceptions: C{True} to ignore any exceptions that may be
            raised when detaching.
        """
        try:
            import gc
            gc.collect()
            bRecollect = False
            for obj in list(gc.garbage):
                try:
                    if isinstance(obj, win32.Handle):
                        obj.close()
                    elif isinstance(obj, Event):
                        obj.debug = None
                    elif isinstance(obj, Process):
                        obj.clear()
                    elif isinstance(obj, Thread):
                        obj.set_process(None)
                        obj.clear()
                    elif isinstance(obj, Module):
                        obj.set_process(None)
                    elif isinstance(obj, Window):
                        obj.set_process(None)
                    else:
                        continue
                    gc.garbage.remove(obj)
                    del obj
                    bRecollect = True
                except Exception, e:
                    if not bIgnoreExceptions:
                        raise
                    warnings.warn(str(e), RuntimeWarning)
            if bRecollect:
                gc.collect() 
开发者ID:debasishm89,项目名称:OpenXMolar,代码行数:40,代码来源:debug.py

示例11: __init__

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def __init__(self):
		from codec import Codec
		from window import Window
		from system import System
		from datajar import DataJar
		from filesystem import FileSystem

		try:
			manifest = json.load(codecs.open('manifest.json', 'r', 'utf-8'))
		except:
			manifest = {}

		for key in assets.manifest:
			if key in manifest:
				assets.manifest[key] = manifest[key]

		self.app = QApplication(sys.argv)
		self.app.setApplicationName(assets.manifest['name'])
		self.app.setApplicationVersion(assets.manifest['version'])

		assets.sys = System()
		assets.codec = Codec()
		assets.fs = FileSystem()
		assets.dataJar = DataJar()

		translator = QTranslator()
		if translator.load("zh_CN.qm"):
			self.app.installTranslator(translator)

		self.window = Window(None, assets.manifest['path'] + 'index.html')

		sys.exit(self.app.exec_()) 
开发者ID:Lanfei,项目名称:hae,代码行数:34,代码来源:haeclient.py

示例12: createWindow

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def createWindow(self, type, url = None):
		from window import Window
		window = Window(self.view().parentWidget(), url, isDialog = (type == QWebPage.WebModalDialog))
		return window.webView.page() 
开发者ID:Lanfei,项目名称:hae,代码行数:6,代码来源:webpage.py

示例13: createWindow

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def createWindow(self, url = '', width = None, height = None):
		from window import Window
		return Window(self.window, self.normUrl(url), width, height)

	# 对话框 
开发者ID:Lanfei,项目名称:hae,代码行数:7,代码来源:api.py

示例14: createDialog

# 需要导入模块: import window [as 别名]
# 或者: from window import Window [as 别名]
def createDialog(self, url = '', width = None, height = None):
		from window import Window
		return Window(self.window, self.normUrl(url), width, height, True)

	# 文件选择对话框 
开发者ID:Lanfei,项目名称:hae,代码行数:7,代码来源:api.py


注:本文中的window.Window方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。