ホーム › UI.Controls › EndBufferedAnimation
EndBufferedAnimation
関数バッファアニメーション描画を終了する。
シグネチャ
// UXTHEME.dll
#include <windows.h>
HRESULT EndBufferedAnimation(
INT_PTR hbpAnimation,
BOOL fUpdateTarget
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| hbpAnimation | INT_PTR | in | BeginBufferedAnimation から返された、バッファードアニメーションコンテキストへのハンドルです。 |
| fUpdateTarget | BOOL | in | TRUE の場合、ターゲット DC をアニメーションで更新します。FALSE の場合、アニメーションは開始されず、ターゲット DC は更新されず、hbpAnimation パラメーターが解放されます。 |
戻り値の型: HRESULT
公式ドキュメント
バッファードアニメーション操作の最初のフレームをレンダリングし、アニメーションタイマーを開始します。
戻り値
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// UXTHEME.dll
#include <windows.h>
HRESULT EndBufferedAnimation(
INT_PTR hbpAnimation,
BOOL fUpdateTarget
);[DllImport("UXTHEME.dll", ExactSpelling = true)]
static extern int EndBufferedAnimation(
IntPtr hbpAnimation, // INT_PTR
bool fUpdateTarget // BOOL
);<DllImport("UXTHEME.dll", ExactSpelling:=True)>
Public Shared Function EndBufferedAnimation(
hbpAnimation As IntPtr, ' INT_PTR
fUpdateTarget As Boolean ' BOOL
) As Integer
End Function' hbpAnimation : INT_PTR
' fUpdateTarget : BOOL
Declare PtrSafe Function EndBufferedAnimation Lib "uxtheme" ( _
ByVal hbpAnimation As LongPtr, _
ByVal fUpdateTarget As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
EndBufferedAnimation = ctypes.windll.uxtheme.EndBufferedAnimation
EndBufferedAnimation.restype = ctypes.c_int
EndBufferedAnimation.argtypes = [
ctypes.c_ssize_t, # hbpAnimation : INT_PTR
wintypes.BOOL, # fUpdateTarget : BOOL
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('UXTHEME.dll')
EndBufferedAnimation = Fiddle::Function.new(
lib['EndBufferedAnimation'],
[
Fiddle::TYPE_INTPTR_T, # hbpAnimation : INT_PTR
Fiddle::TYPE_INT, # fUpdateTarget : BOOL
],
Fiddle::TYPE_INT)#[link(name = "uxtheme")]
extern "system" {
fn EndBufferedAnimation(
hbpAnimation: isize, // INT_PTR
fUpdateTarget: i32 // BOOL
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("UXTHEME.dll")]
public static extern int EndBufferedAnimation(IntPtr hbpAnimation, bool fUpdateTarget);
"@
$api = Add-Type -MemberDefinition $sig -Name 'UXTHEME_EndBufferedAnimation' -Namespace Win32 -PassThru
# $api::EndBufferedAnimation(hbpAnimation, fUpdateTarget)#uselib "UXTHEME.dll"
#func global EndBufferedAnimation "EndBufferedAnimation" sptr, sptr
; EndBufferedAnimation hbpAnimation, fUpdateTarget ; 戻り値は stat
; hbpAnimation : INT_PTR -> "sptr"
; fUpdateTarget : BOOL -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "UXTHEME.dll"
#cfunc global EndBufferedAnimation "EndBufferedAnimation" sptr, int
; res = EndBufferedAnimation(hbpAnimation, fUpdateTarget)
; hbpAnimation : INT_PTR -> "sptr"
; fUpdateTarget : BOOL -> "int"; HRESULT EndBufferedAnimation(INT_PTR hbpAnimation, BOOL fUpdateTarget)
#uselib "UXTHEME.dll"
#cfunc global EndBufferedAnimation "EndBufferedAnimation" intptr, int
; res = EndBufferedAnimation(hbpAnimation, fUpdateTarget)
; hbpAnimation : INT_PTR -> "intptr"
; fUpdateTarget : BOOL -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
uxtheme = windows.NewLazySystemDLL("UXTHEME.dll")
procEndBufferedAnimation = uxtheme.NewProc("EndBufferedAnimation")
)
// hbpAnimation (INT_PTR), fUpdateTarget (BOOL)
r1, _, err := procEndBufferedAnimation.Call(
uintptr(hbpAnimation),
uintptr(fUpdateTarget),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction EndBufferedAnimation(
hbpAnimation: NativeInt; // INT_PTR
fUpdateTarget: BOOL // BOOL
): Integer; stdcall;
external 'UXTHEME.dll' name 'EndBufferedAnimation';result := DllCall("UXTHEME\EndBufferedAnimation"
, "Ptr", hbpAnimation ; INT_PTR
, "Int", fUpdateTarget ; BOOL
, "Int") ; return: HRESULT●EndBufferedAnimation(hbpAnimation, fUpdateTarget) = DLL("UXTHEME.dll", "int EndBufferedAnimation(int, bool)")
# 呼び出し: EndBufferedAnimation(hbpAnimation, fUpdateTarget)
# hbpAnimation : INT_PTR -> "int"
# fUpdateTarget : BOOL -> "bool"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "uxtheme" fn EndBufferedAnimation(
hbpAnimation: isize, // INT_PTR
fUpdateTarget: i32 // BOOL
) callconv(std.os.windows.WINAPI) i32;proc EndBufferedAnimation(
hbpAnimation: int, # INT_PTR
fUpdateTarget: int32 # BOOL
): int32 {.importc: "EndBufferedAnimation", stdcall, dynlib: "UXTHEME.dll".}pragma(lib, "uxtheme");
extern(Windows)
int EndBufferedAnimation(
ptrdiff_t hbpAnimation, // INT_PTR
int fUpdateTarget // BOOL
);ccall((:EndBufferedAnimation, "UXTHEME.dll"), stdcall, Int32,
(Int, Int32),
hbpAnimation, fUpdateTarget)
# hbpAnimation : INT_PTR -> Int
# fUpdateTarget : BOOL -> Int32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
int32_t EndBufferedAnimation(
intptr_t hbpAnimation,
int32_t fUpdateTarget);
]]
local uxtheme = ffi.load("uxtheme")
-- uxtheme.EndBufferedAnimation(hbpAnimation, fUpdateTarget)
-- hbpAnimation : INT_PTR
-- fUpdateTarget : BOOL
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('UXTHEME.dll');
const EndBufferedAnimation = lib.func('__stdcall', 'EndBufferedAnimation', 'int32_t', ['intptr_t', 'int32_t']);
// EndBufferedAnimation(hbpAnimation, fUpdateTarget)
// hbpAnimation : INT_PTR -> 'intptr_t'
// fUpdateTarget : BOOL -> 'int32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("UXTHEME.dll", {
EndBufferedAnimation: { parameters: ["isize", "i32"], result: "i32" },
});
// lib.symbols.EndBufferedAnimation(hbpAnimation, fUpdateTarget)
// hbpAnimation : INT_PTR -> "isize"
// fUpdateTarget : BOOL -> "i32"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
int32_t EndBufferedAnimation(
intptr_t hbpAnimation,
int32_t fUpdateTarget);
C, "UXTHEME.dll");
// $ffi->EndBufferedAnimation(hbpAnimation, fUpdateTarget);
// hbpAnimation : INT_PTR
// fUpdateTarget : BOOL
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Uxtheme extends StdCallLibrary {
Uxtheme INSTANCE = Native.load("uxtheme", Uxtheme.class);
int EndBufferedAnimation(
long hbpAnimation, // INT_PTR
boolean fUpdateTarget // BOOL
);
}@[Link("uxtheme")]
lib LibUXTHEME
fun EndBufferedAnimation = EndBufferedAnimation(
hbpAnimation : LibC::SSizeT, # INT_PTR
fUpdateTarget : Int32 # BOOL
) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef EndBufferedAnimationNative = Int32 Function(IntPtr, Int32);
typedef EndBufferedAnimationDart = int Function(int, int);
final EndBufferedAnimation = DynamicLibrary.open('UXTHEME.dll')
.lookupFunction<EndBufferedAnimationNative, EndBufferedAnimationDart>('EndBufferedAnimation');
// hbpAnimation : INT_PTR -> IntPtr
// fUpdateTarget : BOOL -> Int32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function EndBufferedAnimation(
hbpAnimation: NativeInt; // INT_PTR
fUpdateTarget: BOOL // BOOL
): Integer; stdcall;
external 'UXTHEME.dll' name 'EndBufferedAnimation';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "EndBufferedAnimation"
c_EndBufferedAnimation :: CIntPtr -> CInt -> IO Int32
-- hbpAnimation : INT_PTR -> CIntPtr
-- fUpdateTarget : BOOL -> CInt
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let endbufferedanimation =
foreign "EndBufferedAnimation"
(intptr_t @-> int32_t @-> returning int32_t)
(* hbpAnimation : INT_PTR -> intptr_t *)
(* fUpdateTarget : BOOL -> int32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library uxtheme (t "UXTHEME.dll"))
(cffi:use-foreign-library uxtheme)
(cffi:defcfun ("EndBufferedAnimation" end-buffered-animation :convention :stdcall) :int32
(hbp-animation :int64) ; INT_PTR
(f-update-target :int32)) ; BOOL
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $EndBufferedAnimation = Win32::API::More->new('UXTHEME',
'int EndBufferedAnimation(LPARAM hbpAnimation, BOOL fUpdateTarget)');
# my $ret = $EndBufferedAnimation->Call($hbpAnimation, $fUpdateTarget);
# hbpAnimation : INT_PTR -> LPARAM
# fUpdateTarget : BOOL -> BOOL
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。