ホーム › Devices.Display › VIDEO_COLOR_CAPABILITIES
VIDEO_COLOR_CAPABILITIES
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Length | DWORD | 4 | +0 | +0 | この構造体のバイト長。 |
| AttributeFlags | DWORD | 4 | +4 | +4 | 色機能の属性フラグ。 |
| RedPhosphoreDecay | INT | 4 | +8 | +8 | 赤蛍光体の減衰特性値。 |
| GreenPhosphoreDecay | INT | 4 | +12 | +12 | 緑蛍光体の減衰特性値。 |
| BluePhosphoreDecay | INT | 4 | +16 | +16 | 青蛍光体の減衰特性値。 |
| WhiteChromaticity_x | INT | 4 | +20 | +20 | 白色点の色度x座標。 |
| WhiteChromaticity_y | INT | 4 | +24 | +24 | 白色点の色度y座標。 |
| WhiteChromaticity_Y | INT | 4 | +28 | +28 | 白色点の輝度Y。 |
| RedChromaticity_x | INT | 4 | +32 | +32 | 赤原色の色度x座標。 |
| RedChromaticity_y | INT | 4 | +36 | +36 | 赤原色の色度y座標。 |
| GreenChromaticity_x | INT | 4 | +40 | +40 | 緑原色の色度x座標。 |
| GreenChromaticity_y | INT | 4 | +44 | +44 | 緑原色の色度y座標。 |
| BlueChromaticity_x | INT | 4 | +48 | +48 | 青原色の色度x座標。 |
| BlueChromaticity_y | INT | 4 | +52 | +52 | 青原色の色度y座標。 |
| WhiteGamma | INT | 4 | +56 | +56 | 白色のガンマ値。 |
| RedGamma | INT | 4 | +60 | +60 | 赤チャネルのガンマ値。 |
| GreenGamma | INT | 4 | +64 | +64 | 緑チャネルのガンマ値。 |
| BlueGamma | INT | 4 | +68 | +68 | 青チャネルのガンマ値。 |
各言語での定義
#include <windows.h>
// VIDEO_COLOR_CAPABILITIES (x64 72 / x86 72 バイト)
typedef struct VIDEO_COLOR_CAPABILITIES {
DWORD Length;
DWORD AttributeFlags;
INT RedPhosphoreDecay;
INT GreenPhosphoreDecay;
INT BluePhosphoreDecay;
INT WhiteChromaticity_x;
INT WhiteChromaticity_y;
INT WhiteChromaticity_Y;
INT RedChromaticity_x;
INT RedChromaticity_y;
INT GreenChromaticity_x;
INT GreenChromaticity_y;
INT BlueChromaticity_x;
INT BlueChromaticity_y;
INT WhiteGamma;
INT RedGamma;
INT GreenGamma;
INT BlueGamma;
} VIDEO_COLOR_CAPABILITIES;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct VIDEO_COLOR_CAPABILITIES
{
public uint Length;
public uint AttributeFlags;
public int RedPhosphoreDecay;
public int GreenPhosphoreDecay;
public int BluePhosphoreDecay;
public int WhiteChromaticity_x;
public int WhiteChromaticity_y;
public int WhiteChromaticity_Y;
public int RedChromaticity_x;
public int RedChromaticity_y;
public int GreenChromaticity_x;
public int GreenChromaticity_y;
public int BlueChromaticity_x;
public int BlueChromaticity_y;
public int WhiteGamma;
public int RedGamma;
public int GreenGamma;
public int BlueGamma;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure VIDEO_COLOR_CAPABILITIES
Public Length As UInteger
Public AttributeFlags As UInteger
Public RedPhosphoreDecay As Integer
Public GreenPhosphoreDecay As Integer
Public BluePhosphoreDecay As Integer
Public WhiteChromaticity_x As Integer
Public WhiteChromaticity_y As Integer
Public WhiteChromaticity_Y As Integer
Public RedChromaticity_x As Integer
Public RedChromaticity_y As Integer
Public GreenChromaticity_x As Integer
Public GreenChromaticity_y As Integer
Public BlueChromaticity_x As Integer
Public BlueChromaticity_y As Integer
Public WhiteGamma As Integer
Public RedGamma As Integer
Public GreenGamma As Integer
Public BlueGamma As Integer
End Structureimport ctypes
from ctypes import wintypes
class VIDEO_COLOR_CAPABILITIES(ctypes.Structure):
_fields_ = [
("Length", wintypes.DWORD),
("AttributeFlags", wintypes.DWORD),
("RedPhosphoreDecay", ctypes.c_int),
("GreenPhosphoreDecay", ctypes.c_int),
("BluePhosphoreDecay", ctypes.c_int),
("WhiteChromaticity_x", ctypes.c_int),
("WhiteChromaticity_y", ctypes.c_int),
("WhiteChromaticity_Y", ctypes.c_int),
("RedChromaticity_x", ctypes.c_int),
("RedChromaticity_y", ctypes.c_int),
("GreenChromaticity_x", ctypes.c_int),
("GreenChromaticity_y", ctypes.c_int),
("BlueChromaticity_x", ctypes.c_int),
("BlueChromaticity_y", ctypes.c_int),
("WhiteGamma", ctypes.c_int),
("RedGamma", ctypes.c_int),
("GreenGamma", ctypes.c_int),
("BlueGamma", ctypes.c_int),
]#[repr(C)]
pub struct VIDEO_COLOR_CAPABILITIES {
pub Length: u32,
pub AttributeFlags: u32,
pub RedPhosphoreDecay: i32,
pub GreenPhosphoreDecay: i32,
pub BluePhosphoreDecay: i32,
pub WhiteChromaticity_x: i32,
pub WhiteChromaticity_y: i32,
pub WhiteChromaticity_Y: i32,
pub RedChromaticity_x: i32,
pub RedChromaticity_y: i32,
pub GreenChromaticity_x: i32,
pub GreenChromaticity_y: i32,
pub BlueChromaticity_x: i32,
pub BlueChromaticity_y: i32,
pub WhiteGamma: i32,
pub RedGamma: i32,
pub GreenGamma: i32,
pub BlueGamma: i32,
}import "golang.org/x/sys/windows"
type VIDEO_COLOR_CAPABILITIES struct {
Length uint32
AttributeFlags uint32
RedPhosphoreDecay int32
GreenPhosphoreDecay int32
BluePhosphoreDecay int32
WhiteChromaticity_x int32
WhiteChromaticity_y int32
WhiteChromaticity_Y int32
RedChromaticity_x int32
RedChromaticity_y int32
GreenChromaticity_x int32
GreenChromaticity_y int32
BlueChromaticity_x int32
BlueChromaticity_y int32
WhiteGamma int32
RedGamma int32
GreenGamma int32
BlueGamma int32
}type
VIDEO_COLOR_CAPABILITIES = record
Length: DWORD;
AttributeFlags: DWORD;
RedPhosphoreDecay: Integer;
GreenPhosphoreDecay: Integer;
BluePhosphoreDecay: Integer;
WhiteChromaticity_x: Integer;
WhiteChromaticity_y: Integer;
WhiteChromaticity_Y: Integer;
RedChromaticity_x: Integer;
RedChromaticity_y: Integer;
GreenChromaticity_x: Integer;
GreenChromaticity_y: Integer;
BlueChromaticity_x: Integer;
BlueChromaticity_y: Integer;
WhiteGamma: Integer;
RedGamma: Integer;
GreenGamma: Integer;
BlueGamma: Integer;
end;const VIDEO_COLOR_CAPABILITIES = extern struct {
Length: u32,
AttributeFlags: u32,
RedPhosphoreDecay: i32,
GreenPhosphoreDecay: i32,
BluePhosphoreDecay: i32,
WhiteChromaticity_x: i32,
WhiteChromaticity_y: i32,
WhiteChromaticity_Y: i32,
RedChromaticity_x: i32,
RedChromaticity_y: i32,
GreenChromaticity_x: i32,
GreenChromaticity_y: i32,
BlueChromaticity_x: i32,
BlueChromaticity_y: i32,
WhiteGamma: i32,
RedGamma: i32,
GreenGamma: i32,
BlueGamma: i32,
};type
VIDEO_COLOR_CAPABILITIES {.bycopy.} = object
Length: uint32
AttributeFlags: uint32
RedPhosphoreDecay: int32
GreenPhosphoreDecay: int32
BluePhosphoreDecay: int32
WhiteChromaticity_x: int32
WhiteChromaticity_y: int32
WhiteChromaticity_Y: int32
RedChromaticity_x: int32
RedChromaticity_y: int32
GreenChromaticity_x: int32
GreenChromaticity_y: int32
BlueChromaticity_x: int32
BlueChromaticity_y: int32
WhiteGamma: int32
RedGamma: int32
GreenGamma: int32
BlueGamma: int32struct VIDEO_COLOR_CAPABILITIES
{
uint Length;
uint AttributeFlags;
int RedPhosphoreDecay;
int GreenPhosphoreDecay;
int BluePhosphoreDecay;
int WhiteChromaticity_x;
int WhiteChromaticity_y;
int WhiteChromaticity_Y;
int RedChromaticity_x;
int RedChromaticity_y;
int GreenChromaticity_x;
int GreenChromaticity_y;
int BlueChromaticity_x;
int BlueChromaticity_y;
int WhiteGamma;
int RedGamma;
int GreenGamma;
int BlueGamma;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; VIDEO_COLOR_CAPABILITIES サイズ: 72 バイト(x64)
dim st, 18 ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; Length : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; AttributeFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; RedPhosphoreDecay : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; GreenPhosphoreDecay : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; BluePhosphoreDecay : INT (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; WhiteChromaticity_x : INT (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; WhiteChromaticity_y : INT (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; WhiteChromaticity_Y : INT (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; RedChromaticity_x : INT (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; RedChromaticity_y : INT (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; GreenChromaticity_x : INT (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; GreenChromaticity_y : INT (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; BlueChromaticity_x : INT (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; BlueChromaticity_y : INT (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; WhiteGamma : INT (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; RedGamma : INT (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; GreenGamma : INT (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; BlueGamma : INT (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global VIDEO_COLOR_CAPABILITIES
#field int Length
#field int AttributeFlags
#field int RedPhosphoreDecay
#field int GreenPhosphoreDecay
#field int BluePhosphoreDecay
#field int WhiteChromaticity_x
#field int WhiteChromaticity_y
#field int WhiteChromaticity_Y
#field int RedChromaticity_x
#field int RedChromaticity_y
#field int GreenChromaticity_x
#field int GreenChromaticity_y
#field int BlueChromaticity_x
#field int BlueChromaticity_y
#field int WhiteGamma
#field int RedGamma
#field int GreenGamma
#field int BlueGamma
#endstruct
stdim st, VIDEO_COLOR_CAPABILITIES ; NSTRUCT 変数を確保
st->Length = 100
mes "Length=" + st->Length