Win32 API 日本語リファレンス
ホームDevices.Display › VIDEO_COLOR_CAPABILITIES

VIDEO_COLOR_CAPABILITIES

構造体
サイズx64: 72 バイト / x86: 72 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
LengthDWORD4+0+0この構造体のバイト長。
AttributeFlagsDWORD4+4+4色機能の属性フラグ。
RedPhosphoreDecayINT4+8+8赤蛍光体の減衰特性値。
GreenPhosphoreDecayINT4+12+12緑蛍光体の減衰特性値。
BluePhosphoreDecayINT4+16+16青蛍光体の減衰特性値。
WhiteChromaticity_xINT4+20+20白色点の色度x座標。
WhiteChromaticity_yINT4+24+24白色点の色度y座標。
WhiteChromaticity_YINT4+28+28白色点の輝度Y。
RedChromaticity_xINT4+32+32赤原色の色度x座標。
RedChromaticity_yINT4+36+36赤原色の色度y座標。
GreenChromaticity_xINT4+40+40緑原色の色度x座標。
GreenChromaticity_yINT4+44+44緑原色の色度y座標。
BlueChromaticity_xINT4+48+48青原色の色度x座標。
BlueChromaticity_yINT4+52+52青原色の色度y座標。
WhiteGammaINT4+56+56白色のガンマ値。
RedGammaINT4+60+60赤チャネルのガンマ値。
GreenGammaINT4+64+64緑チャネルのガンマ値。
BlueGammaINT4+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 Structure
import 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: int32
struct 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