ウインドウを表すクラス More...
Public Member Functions | |
| def | getText (self) |
| ウインドウのタイトル文字列を取得する More... | |
| def | getClassName (self) |
| ウインドウのクラス名を取得する More... | |
| def | getProcessName (self) |
| ウインドウの所属するプロセスの名前を取得する More... | |
| def | getProcessPath (self) |
| ウインドウの所属するプロセスの実行ファイル名を取得する More... | |
| def | getHWND (self) |
| ウインドウハンドルを取得する More... | |
| def | getRect (self) |
| ウインドウの左上と右下の座標をスクリーン座標で取得する More... | |
| def | getClientRect (self) |
| ウインドウのクライアント領域の矩形を取得する More... | |
| def | clientToScreen (self, x, y) |
| ウインドウのクライアント領域の座標をスクリーン座標に変換する More... | |
| def | setRect (self, rect) |
| ウインドウの領域をスクリーン座標で設定する More... | |
| def | getFirstChild (self) |
| Zオーダーが最初の子ウインドウを取得する More... | |
| def | getLastChild (self) |
| Zオーダーが最後の子ウインドウを取得する More... | |
| def | getPrevious (self) |
| Zオーダーが1つ手前の兄弟ウインドウを取得する More... | |
| def | getNext (self) |
| Zオーダーが1つ奥の兄弟ウインドウを取得する More... | |
| def | getParent (self) |
| 親ウインドウを取得する More... | |
| def | getOwner (self) |
| オーナーウインドウを取得する More... | |
| def | getLastActivePopup (self) |
| 所有するポップアップウインドウの中で最後にアクティブだったウインドウを取得する More... | |
| def | isVisible (self) |
| 表示状態を調べる More... | |
| def | isEnabled (self) |
| 有効か無効か(マウスやキーボードの入力を受け付ける状態であるか)を調べる More... | |
| def | isMinimized (self) |
| 最小化状態であるかどうかを調べる More... | |
| def | isMaximized (self) |
| 最大化状態であるかどうかを調べる More... | |
| def | minimize (self) |
| 最小化状態にする More... | |
| def | maximize (self) |
| 最大化状態にする More... | |
| def | restore (self) |
| 最小化状態および最大化状態を解除する More... | |
| def | getCheck (self) |
| ラジオボタンやチェックボックスのチェック状態を取得する More... | |
| def | setCheck (self, status) |
| ラジオボタンやチェックボックスのチェック状態を設定する More... | |
| def | getImeStatus (self) |
| ウインドウのIMEの状態を取得する More... | |
| def | setImeStatus (self, status) |
| ウインドウのIMEの状態を設定する More... | |
| def | postMessage (self, msg, wparam=0, lparam=0) |
| ウインドウのメッセージキューに、メッセージをポストする More... | |
| def | sendMessage (self, msg, wparam=0, lparam=0) |
| ウインドウにメッセージを送信する More... | |
| def | setForeground (self, force=False) |
| ウインドウをフォアグラウンドにする More... | |
| def | setActive (self) |
| ウインドウをアクティブにする More... | |
| def | getImage (self) |
| ウインドウの画面イメージを取得する More... | |
Static Public Member Functions | |
| def | getForeground () |
| (static method) フォアグラウンドウインドウを取得する More... | |
| def | getFocus () |
| (static method) フォーカスされているウインドウを取得する More... | |
| def | getCaret () |
| (static method) キャレットの情報を取得する More... | |
| def | find (class_name, text) |
| (static method) 指定されたクラス名とタイトルを持つトップレベルウインドウを取得する More... | |
| def | enum (callable, arg) |
| (static method) トップレベルウインドウを列挙する More... | |
| def | getDesktop () |
| (static method) デスクトップウインドウを取得する More... | |
| def | fromHWND (hwnd) |
| (static method) ウインドウハンドルからWindowオブジェクトを作成する More... | |
| def | getMonitorInfo (hwnd) |
| (static method) モニター情報を取得する More... | |
ウインドウを表すクラス
| def getText | ( | self | ) |
ウインドウのタイトル文字列を取得する
| self | - |
| def getClassName | ( | self | ) |
ウインドウのクラス名を取得する
| self | - |
| def getProcessName | ( | self | ) |
ウインドウの所属するプロセスの名前を取得する
| self | - |
| def getProcessPath | ( | self | ) |
ウインドウの所属するプロセスの実行ファイル名を取得する
| self | - |
| def getHWND | ( | self | ) |
ウインドウハンドルを取得する
| self | - |
ウインドウオブジェクトに関連付けられているウインドウハンドルを取得します。
| def getRect | ( | self | ) |
ウインドウの左上と右下の座標をスクリーン座標で取得する
| self | - |
スクリーン座標とは、画面の左上端を(0,0)とし右下方向を正とする、ピクセル単位の座標系です。
| def getClientRect | ( | self | ) |
ウインドウのクライアント領域の矩形を取得する
| self | - |
| def clientToScreen | ( | self, | |
| x, | |||
| y | |||
| ) |
ウインドウのクライアント領域の座標をスクリーン座標に変換する
| self | - |
| x | クライアント領域のx座標 |
| y | クライアント領域のy座標 |
| def setRect | ( | self, | |
| rect | |||
| ) |
ウインドウの領域をスクリーン座標で設定する
| self | - |
| rect | ウインドウの左上と右下の座標 (left,top,right,bottom) |
スクリーン座標とは、画面の左上端を(0,0)とし右下方向を正とする、ピクセル単位の座標系です。
| def getFirstChild | ( | self | ) |
Zオーダーが最初の子ウインドウを取得する
| self | - |
ウインドウが子ウインドウを一つも持たない場合はNoneが返ります。
| def getLastChild | ( | self | ) |
Zオーダーが最後の子ウインドウを取得する
| self | - |
ウインドウが子ウインドウを一つも持たない場合はNoneが返ります。
| def getPrevious | ( | self | ) |
Zオーダーが1つ手前の兄弟ウインドウを取得する
| self | - |
ウインドウが兄弟の中で最も手前のウインドウである場合はNoneが返ります。
| def getNext | ( | self | ) |
Zオーダーが1つ奥の兄弟ウインドウを取得する
| self | - |
ウインドウが兄弟の中で最も奥のウインドウである場合はNoneが返ります。
| def getParent | ( | self | ) |
親ウインドウを取得する
| self | - |
ウインドウがトップレベルウインドウである場合はNoneが返ります。
| def getOwner | ( | self | ) |
オーナーウインドウを取得する
| self | - |
オーナーが存在しない場合はNoneが返ります。
| def getLastActivePopup | ( | self | ) |
所有するポップアップウインドウの中で最後にアクティブだったウインドウを取得する
| self | - |
| def isVisible | ( | self | ) |
表示状態を調べる
| self | - |
| def isEnabled | ( | self | ) |
有効か無効か(マウスやキーボードの入力を受け付ける状態であるか)を調べる
| self | - |
| def isMinimized | ( | self | ) |
最小化状態であるかどうかを調べる
| self | - |
| def isMaximized | ( | self | ) |
最大化状態であるかどうかを調べる
| self | - |
| def minimize | ( | self | ) |
最小化状態にする
| self | - |
| def maximize | ( | self | ) |
最大化状態にする
| self | - |
| def restore | ( | self | ) |
最小化状態および最大化状態を解除する
| self | - |
| def getCheck | ( | self | ) |
ラジオボタンやチェックボックスのチェック状態を取得する
| self | - |
| def setCheck | ( | self, | |
| status | |||
| ) |
ラジオボタンやチェックボックスのチェック状態を設定する
| self | - |
| status | 0:チェックされていない 1:チェックされている 2:不確定(3ステートのボタンのときのみ) |
| def getImeStatus | ( | self | ) |
ウインドウのIMEの状態を取得する
| self | - |
| def setImeStatus | ( | self, | |
| status | |||
| ) |
ウインドウのIMEの状態を設定する
| self | - |
| status | 0:OFF 1:ON |
| def postMessage | ( | self, | |
| msg, | |||
wparam = 0, |
|||
lparam = 0 |
|||
| ) |
ウインドウのメッセージキューに、メッセージをポストする
| self | - |
| msg | メッセージの種別 |
| wparam | メッセージ特有の追加情報1 |
| lparam | メッセージ特有の追加情報2 |
postMessageは、メッセージをポストしてから、そのメッセージが処理されるのを待たずに返ります。
| def sendMessage | ( | self, | |
| msg, | |||
wparam = 0, |
|||
lparam = 0 |
|||
| ) |
ウインドウにメッセージを送信する
| self | - |
| msg | メッセージの種別 |
| wparam | メッセージ特有の追加情報1 |
| lparam | メッセージ特有の追加情報2 |
sendMessageは、メッセージがウインドウプロシージャによって処理されるのを待ってから制御を返します。
| def setForeground | ( | self, | |
force = False |
|||
| ) |
ウインドウをフォアグラウンドにする
| self | - |
| force | スレッドのインプット状態を切り替えるか否か |
引数 force に True を与えると、スレッドのインプット状態を切り替えてから、ウインドウをフォアグラウンド化します。ウインドウをフォアグラウンドにしても、タスクバーのボタンが点滅する場合は、引数 force に True を与えてみてください。
| def setActive | ( | self | ) |
ウインドウをアクティブにする
| self | - |
| def getImage | ( | self | ) |
ウインドウの画面イメージを取得する
| self | - |
このメソッドを使用して取得した画面イメージを調査して、ウインドウの状態を特定することができます。
|
static |
(static method) フォアグラウンドウインドウを取得する
フォアグラウンドウインドウが存在しない場合はNoneが返ります。
|
static |
(static method) フォーカスされているウインドウを取得する
フォーカスされているウインドウが存在しない場合はNoneが返ります。
|
static |
(static method) キャレットの情報を取得する
キャレットを保持しているウインドウが存在しない場合は None, (0,0,0,0) が返ります。
|
static |
(static method) 指定されたクラス名とタイトルを持つトップレベルウインドウを取得する
| class_name | クラス名 |
| text | タイトル |
引数textにNoneを渡した場合は、あらゆるタイトルが該当するものとみなされます。
|
static |
(static method) トップレベルウインドウを列挙する
| callable | 呼び出し可能オブジェクト |
| arg | 任意の引数 |
すべてのトップレベルウインドウに関して、引数callableに渡したオブジェクトが呼び出されます。 callableには、第1引数にウインドウオブジェクト、第2引数に引数argがそのまま渡されます。 callableは列挙を続行する場合はTrueを返してください。列挙を中止する場合はFalseを返してください。
|
static |
(static method) デスクトップウインドウを取得する
|
static |
(static method) ウインドウハンドルからWindowオブジェクトを作成する
| hwnd | ウインドウハンドル |
ウインドウハンドルを受け取り、そのウインドウハンドルに関連付けられたWindowオブジェクトを返します。 ほかのライブラリがウインドウハンドルを ウインドウハンドルを返すライブラリを使用する際に、このメソッドを使用します。
|
static |
(static method) モニター情報を取得する
ウインドウハンドルを受け取り、そのウインドウハンドルに関連付けられたWindowオブジェクトを返します。 ほかのライブラリがウインドウハンドルを ウインドウハンドルを返すライブラリを使用する際に、このメソッドを使用します。