OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::System Namespace Reference

Functions

const Array< String > & GetCommandLineArgs () noexcept
 アプリケーションに渡されたコマンドライン引数の一覧を返します。 More...
 
Array< GamepadInfoEnumerateGamepads ()
 使用可能なゲームパッドの一覧を返します。 More...
 
MessageBoxResult MessageBoxOK (StringView text, MessageBoxStyle style=MessageBoxStyle::Default)
 「OK」ボタンを持つメッセージボックスを表示する。 More...
 
MessageBoxResult MessageBoxOK (StringView title, StringView text, MessageBoxStyle style=MessageBoxStyle::Default)
 「OK」ボタンを持つメッセージボックスを表示する。 More...
 
MessageBoxResult MessageBoxOKCancel (StringView text, MessageBoxStyle style=MessageBoxStyle::Default)
 「OK」「キャンセル」ボタンを持つメッセージボックスを表示する。 More...
 
MessageBoxResult MessageBoxOKCancel (StringView title, StringView text, MessageBoxStyle style=MessageBoxStyle::Default)
 「OK」「キャンセル」ボタンを持つメッセージボックスを表示する。 More...
 
MessageBoxResult MessageBoxYesNo (StringView text, MessageBoxStyle style=MessageBoxStyle::Default)
 「はい」「いいえ」ボタンを持つメッセージボックスを表示する。 More...
 
MessageBoxResult MessageBoxYesNo (StringView title, StringView text, MessageBoxStyle style=MessageBoxStyle::Default)
 「はい」「いいえ」ボタンを持つメッセージボックスを表示する。 More...
 
Array< MicrophoneInfoEnumerateMicrophones ()
 利用可能なマイクの一覧を返します。 More...
 
size_t GetCurrentMonitorIndex ()
 ウィンドウが配置されているモニターのインデックスを取得します。 More...
 
MonitorInfo GetCurrentMonitor ()
 ウィンドウが配置されているモニターの情報を取得します。 More...
 
Array< MonitorInfoEnumerateMonitors ()
 使用可能なモニターの一覧を取得します。 More...
 
PowerStatus GetPowerStatus ()
 システムの電源の状態を返します。 More...
 
Array< SerialPortInfoEnumerateSerialPorts ()
 
bool Update ()
 描画や入力情報など、フレームを更新します。 More...
 
void Exit () noexcept
 プログラムを終了させるために、この直後の System::Update() が false を返すように設定します。 More...
 
void SetTerminationTriggers (uint32 userActionFlags) noexcept
 アプリケーション終了トリガーに設定するユーザアクションを設定します。 More...
 
uint32 GetTerminationTriggers () noexcept
 アプリケーション終了トリガーに設定したユーザアクションのフラグの現在の設定を返します。 More...
 
uint32 GetUserActions () noexcept
 前回のフレームで発生したユーザアクションを返します。 More...
 
void Sleep (int32 milliseconds)
 現在のスレッドの実行を指定した時間だけ停止します。 More...
 
void Sleep (const Duration &duration)
 現在のスレッドの実行を指定した時間だけ停止します。 More...
 
bool LaunchBrowser (FilePathView url)
 指定した URL をデフォルトの Web ブラウザでオープンします。 More...
 
bool ShowInFileManager (FilePathView path)
 ファイルパスをファイルマネージャー上で表示します。 More...
 
EngineOption::Renderer GetRendererType ()
 レンダラーの設定を返します。 More...
 
Array< WebcamInfoEnumerateWebcams ()
 利用可能な Web カメラの一覧を返します。 More...
 

Function Documentation

◆ EnumerateGamepads()

Array<GamepadInfo> s3d::System::EnumerateGamepads ( )

使用可能なゲームパッドの一覧を返します。

Returns
使用可能なゲームパッドの一覧

◆ EnumerateMicrophones()

Array<MicrophoneInfo> s3d::System::EnumerateMicrophones ( )

利用可能なマイクの一覧を返します。

Returns
利用可能なマイクの一覧

◆ EnumerateMonitors()

Array<MonitorInfo> s3d::System::EnumerateMonitors ( )

使用可能なモニターの一覧を取得します。

Returns
使用可能なモニターの一覧

◆ EnumerateSerialPorts()

Array<SerialPortInfo> s3d::System::EnumerateSerialPorts ( )

◆ EnumerateWebcams()

Array<WebcamInfo> s3d::System::EnumerateWebcams ( )

利用可能な Web カメラの一覧を返します。

Returns
利用可能な Web カメラの一覧

◆ Exit()

void s3d::System::Exit ( )
noexcept

プログラムを終了させるために、この直後の System::Update() が false を返すように設定します。

Remarks
この関数自体は終了処理を行わないため、この関数の呼び出しは必須ではありません。

◆ GetCommandLineArgs()

const Array<String>& s3d::System::GetCommandLineArgs ( )
noexcept

アプリケーションに渡されたコマンドライン引数の一覧を返します。

Returns
コマンドライン引数の一覧

◆ GetCurrentMonitor()

MonitorInfo s3d::System::GetCurrentMonitor ( )

ウィンドウが配置されているモニターの情報を取得します。

Returns
ウィンドウが配置されているモニターの情報

◆ GetCurrentMonitorIndex()

size_t s3d::System::GetCurrentMonitorIndex ( )

ウィンドウが配置されているモニターのインデックスを取得します。

Returns
ウィンドウが配置されているモニターのインデックス

◆ GetPowerStatus()

PowerStatus s3d::System::GetPowerStatus ( )

システムの電源の状態を返します。

Remarks
macOS では結果の取得に時間がかかるため、AsyncTask でラップすることを推奨
Returns
システムの電源の状態

◆ GetRendererType()

EngineOption::Renderer s3d::System::GetRendererType ( )

レンダラーの設定を返します。

Returns
レンダラーの設定

◆ GetTerminationTriggers()

uint32 s3d::System::GetTerminationTriggers ( )
noexcept

アプリケーション終了トリガーに設定したユーザアクションのフラグの現在の設定を返します。

Remarks
フラグには UserAction の値の組み合わせが使われています。
Returns
プリケーション終了トリガーに設定したユーザアクションのフラグの組み合わせ

◆ GetUserActions()

uint32 s3d::System::GetUserActions ( )
noexcept

前回のフレームで発生したユーザアクションを返します。

Remarks
フラグには UserAction の値の組み合わせが使われています。
Returns
前のフレームで発生したユーザアクションのフラグの組み合わせ

◆ LaunchBrowser()

bool s3d::System::LaunchBrowser ( FilePathView  url)

指定した URL をデフォルトの Web ブラウザでオープンします。

Parameters
urlURL
Returns
オープンに成功した場合 true, それ以外の場合は false

◆ MessageBoxOK() [1/2]

MessageBoxResult s3d::System::MessageBoxOK ( StringView  text,
MessageBoxStyle  style = MessageBoxStyle::Default 
)

「OK」ボタンを持つメッセージボックスを表示する。

Parameters
text本文
styleスタイル
Remarks
この関数はユーザがボタンを押すかメッセージボックスを閉じるまで制御を返しません。
Returns
MessageBoxResult::OK

◆ MessageBoxOK() [2/2]

MessageBoxResult s3d::System::MessageBoxOK ( StringView  title,
StringView  text,
MessageBoxStyle  style = MessageBoxStyle::Default 
)

「OK」ボタンを持つメッセージボックスを表示する。

Parameters
titleメッセージボックスのタイトル
text本文
styleスタイル
Remarks
この関数はユーザがボタンを押すかメッセージボックスを閉じるまで制御を返しません。
Returns
MessageBoxResult::OK

◆ MessageBoxOKCancel() [1/2]

MessageBoxResult s3d::System::MessageBoxOKCancel ( StringView  text,
MessageBoxStyle  style = MessageBoxStyle::Default 
)

「OK」「キャンセル」ボタンを持つメッセージボックスを表示する。

Parameters
text本文
styleスタイル
Remarks
この関数はユーザがボタンを押すかメッセージボックスを閉じるまで制御を返しません。
Returns
MessageBoxResult::OK または MessageBoxResult::Cancel

◆ MessageBoxOKCancel() [2/2]

MessageBoxResult s3d::System::MessageBoxOKCancel ( StringView  title,
StringView  text,
MessageBoxStyle  style = MessageBoxStyle::Default 
)

「OK」「キャンセル」ボタンを持つメッセージボックスを表示する。

Parameters
titleメッセージボックスのタイトル
text本文
styleスタイル
Remarks
この関数はユーザがボタンを押すかメッセージボックスを閉じるまで制御を返しません。
Returns
MessageBoxResult::OK または MessageBoxResult::Cancel

◆ MessageBoxYesNo() [1/2]

MessageBoxResult s3d::System::MessageBoxYesNo ( StringView  text,
MessageBoxStyle  style = MessageBoxStyle::Default 
)

「はい」「いいえ」ボタンを持つメッセージボックスを表示する。

Parameters
text本文
styleスタイル
Remarks
この関数はユーザがボタンを押すまで制御を返しません。
Returns
MessageBoxResult::Yes または MessageBoxResult::No

◆ MessageBoxYesNo() [2/2]

MessageBoxResult s3d::System::MessageBoxYesNo ( StringView  title,
StringView  text,
MessageBoxStyle  style = MessageBoxStyle::Default 
)

「はい」「いいえ」ボタンを持つメッセージボックスを表示する。

Parameters
titleメッセージボックスのタイトル
text本文
styleスタイル
Remarks
この関数はユーザがボタンを押すまで制御を返しません。
Returns
MessageBoxResult::Yes または MessageBoxResult::No

◆ SetTerminationTriggers()

void s3d::System::SetTerminationTriggers ( uint32  userActionFlags)
noexcept

アプリケーション終了トリガーに設定するユーザアクションを設定します。

Parameters
userActionFlagsアプリケーション終了トリガーに設定するユーザアクションのフラグ
Remarks
フラグには UserAction の値の組み合わせを使います。

◆ ShowInFileManager()

bool s3d::System::ShowInFileManager ( FilePathView  path)

ファイルパスをファイルマネージャー上で表示します。

Parameters
pathファイルパス
Returns
ファイルマネージャー上での表示に成功した場合 true, それ以外の場合は false

◆ Sleep() [1/2]

void s3d::System::Sleep ( const Duration duration)

現在のスレッドの実行を指定した時間だけ停止します。

Parameters
durationスリープする時間

◆ Sleep() [2/2]

void s3d::System::Sleep ( int32  milliseconds)

現在のスレッドの実行を指定した時間だけ停止します。

Parameters
millisecondsスリープする時間(ミリ秒)

◆ Update()

bool s3d::System::Update ( )

描画や入力情報など、フレームを更新します。

Remarks
アプリケーション終了トリガーが発生するか、内部で回復不能なエラーが発生した場合に false を返します。この関数が false を返したらプログラムを終了させるべきです。
Returns
プログラムの続行の可否