Skip to main content

CONFIG_HANDLE

Struct CONFIG_HANDLE 

Source
#[repr(C)]
pub struct CONFIG_HANDLE { pub app_data_path: LPCWSTR, pub translate: unsafe extern "C" fn(handle: *mut CONFIG_HANDLE, text: LPCWSTR) -> LPCWSTR, pub get_language_text: unsafe extern "C" fn(handle: *mut CONFIG_HANDLE, section: LPCWSTR, text: LPCWSTR) -> LPCWSTR, pub get_font_info: unsafe extern "C" fn(handle: *mut CONFIG_HANDLE, key: LPCSTR) -> *mut FONT_INFO, pub get_color_code: unsafe extern "C" fn(handle: *mut CONFIG_HANDLE, key: LPCSTR) -> i32, pub get_layout_size: unsafe extern "C" fn(handle: *mut CONFIG_HANDLE, key: LPCSTR) -> i32, pub get_color_code_index: unsafe extern "C" fn(handle: *mut CONFIG_HANDLE, key: LPCSTR, index: i32) -> i32, }
Expand description

設定ハンドル

Fields§

§app_data_path: LPCWSTR

アプリケーションデータフォルダのパス

§translate: unsafe extern "C" fn(handle: *mut CONFIG_HANDLE, text: LPCWSTR) -> LPCWSTR

現在の言語設定で定義されているテキストを取得します 参照する言語設定のセクションはInitializeConfig()を定義したプラグインのファイル名になります text : 元のテキスト(.aul2ファイルのキー名) 戻り値 : 定義されているテキストへのポインタ (未定義の場合は引数のテキストのポインタが返却されます) ※言語設定が更新されるまで有効

§get_language_text: unsafe extern "C" fn(handle: *mut CONFIG_HANDLE, section: LPCWSTR, text: LPCWSTR) -> LPCWSTR

現在の言語設定で定義されているテキストを取得します ※任意のセクションから取得出来ます section : 言語設定のセクション(.aul2ファイルのセクション名) text : 元のテキスト(.aul2ファイルのキー名) 戻り値 : 定義されているテキストへのポインタ (未定義の場合は引数のテキストのポインタが返却されます) ※言語設定が更新されるまで有効

§get_font_info: unsafe extern "C" fn(handle: *mut CONFIG_HANDLE, key: LPCSTR) -> *mut FONT_INFO

設定ファイルで定義されているフォント情報を取得します key : 設定ファイル(style.conf)の[Font]のキー名 戻り値 : フォント情報構造体へのポインタ (取得出来ない場合はデフォルトのフォントが返却されます) ※次にこの関数を呼び出すまで有効

§get_color_code: unsafe extern "C" fn(handle: *mut CONFIG_HANDLE, key: LPCSTR) -> i32

設定ファイルで定義されている色コードを取得します ※複数色の場合は最初の色が取得されます key : 設定ファイル(style.conf)の[Color]のキー名 戻り値 : 定義されている色コードの値 (取得出来ない場合は0が返却されます)

§get_layout_size: unsafe extern "C" fn(handle: *mut CONFIG_HANDLE, key: LPCSTR) -> i32

設定ファイルで定義されているレイアウトサイズを取得します key : 設定ファイル(style.conf)の[Layout]のキー名 戻り値 : 定義されているサイズ (取得出来ない場合は0が返却されます)

§get_color_code_index: unsafe extern "C" fn(handle: *mut CONFIG_HANDLE, key: LPCSTR, index: i32) -> i32

設定ファイルで定義されている色コードを取得します key : 設定ファイル(style.conf)の[Color]のキー名 index : 取得する色のインデックス (-1を指定すると色の数を返却します) 戻り値 : 定義されている色コードの値 (取得出来ない場合は0が返却されます)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.