ホーム › Devices.Display › COLORSPACE_TRANSFORM_DATA_CAP
COLORSPACE_TRANSFORM_DATA_CAP
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| DataType | COLORSPACE_TRANSFORM_DATA_TYPE | 4 | +0 | +0 | 色空間変換データの型(COLORSPACE_TRANSFORM_DATA_TYPE列挙)。 |
| Anonymous | _Anonymous_e__Union | 8/4 | +8 | +4 | 変換能力のビットフィールドを保持する無名共用体。 |
| NumericRangeMin | FLOAT | 4 | +16 | +8 | 数値範囲の最小値(浮動小数点)。 |
| NumericRangeMax | FLOAT | 4 | +20 | +12 | 数値範囲の最大値(浮動小数点)。 |
共用体: _Anonymous_e__Union x64 8B / x86 4B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| Anonymous1 | _Anonymous1_e__Struct | 8/4 | +0 | +0 |
| Anonymous2 | _Anonymous2_e__Struct | 8/4 | +0 | +0 |
| Value | DWORD | 4 | +0 | +0 |
各言語での定義
#include <windows.h>
// COLORSPACE_TRANSFORM_DATA_CAP (x64 24 / x86 16 バイト)
typedef struct COLORSPACE_TRANSFORM_DATA_CAP {
COLORSPACE_TRANSFORM_DATA_TYPE DataType;
_Anonymous_e__Union Anonymous;
FLOAT NumericRangeMin;
FLOAT NumericRangeMax;
} COLORSPACE_TRANSFORM_DATA_CAP;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct COLORSPACE_TRANSFORM_DATA_CAP
{
public int DataType;
public _Anonymous_e__Union Anonymous;
public float NumericRangeMin;
public float NumericRangeMax;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure COLORSPACE_TRANSFORM_DATA_CAP
Public DataType As Integer
Public Anonymous As _Anonymous_e__Union
Public NumericRangeMin As Single
Public NumericRangeMax As Single
End Structureimport ctypes
from ctypes import wintypes
class COLORSPACE_TRANSFORM_DATA_CAP(ctypes.Structure):
_fields_ = [
("DataType", ctypes.c_int),
("Anonymous", _Anonymous_e__Union),
("NumericRangeMin", ctypes.c_float),
("NumericRangeMax", ctypes.c_float),
]#[repr(C)]
pub struct COLORSPACE_TRANSFORM_DATA_CAP {
pub DataType: i32,
pub Anonymous: _Anonymous_e__Union,
pub NumericRangeMin: f32,
pub NumericRangeMax: f32,
}import "golang.org/x/sys/windows"
type COLORSPACE_TRANSFORM_DATA_CAP struct {
DataType int32
Anonymous _Anonymous_e__Union
NumericRangeMin float32
NumericRangeMax float32
}type
COLORSPACE_TRANSFORM_DATA_CAP = record
DataType: Integer;
Anonymous: _Anonymous_e__Union;
NumericRangeMin: Single;
NumericRangeMax: Single;
end;const COLORSPACE_TRANSFORM_DATA_CAP = extern struct {
DataType: i32,
Anonymous: _Anonymous_e__Union,
NumericRangeMin: f32,
NumericRangeMax: f32,
};type
COLORSPACE_TRANSFORM_DATA_CAP {.bycopy.} = object
DataType: int32
Anonymous: _Anonymous_e__Union
NumericRangeMin: float32
NumericRangeMax: float32struct COLORSPACE_TRANSFORM_DATA_CAP
{
int DataType;
_Anonymous_e__Union Anonymous;
float NumericRangeMin;
float NumericRangeMax;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; COLORSPACE_TRANSFORM_DATA_CAP サイズ: 16 バイト(x86)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; DataType : COLORSPACE_TRANSFORM_DATA_TYPE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; NumericRangeMin : FLOAT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; NumericRangeMax : FLOAT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; COLORSPACE_TRANSFORM_DATA_CAP サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; DataType : COLORSPACE_TRANSFORM_DATA_TYPE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; NumericRangeMin : FLOAT (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; NumericRangeMax : FLOAT (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global COLORSPACE_TRANSFORM_DATA_CAP
#field int DataType
#field byte Anonymous 8
#field float NumericRangeMin
#field float NumericRangeMax
#endstruct
stdim st, COLORSPACE_TRANSFORM_DATA_CAP ; NSTRUCT 変数を確保
st->DataType = 100
mes "DataType=" + st->DataType
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。