Trait winsafe::prelude::gdi_Hbrush
source · pub trait gdi_Hbrush: Handle {
// Provided methods
fn from_sys_color(color: COLOR) -> HBRUSH { ... }
fn CreateBrushIndirect(
lb: &LOGBRUSH
) -> SysResult<DeleteObjectGuard<HBRUSH>> { ... }
fn CreateHatchBrush(
hatch: HS,
color: COLORREF
) -> SysResult<DeleteObjectGuard<HBRUSH>> { ... }
fn CreatePatternBrush(
hbmp: &HBITMAP
) -> SysResult<DeleteObjectGuard<HBRUSH>> { ... }
fn CreateSolidBrush(color: COLORREF) -> SysResult<DeleteObjectGuard<HBRUSH>> { ... }
fn GetObject(&self, pv: &mut LOGBRUSH) -> SysResult<()> { ... }
fn GetStockObject(sb: STOCK_BRUSH) -> SysResult<HBRUSH> { ... }
fn GetSysColorBrush(index: COLOR) -> SysResult<HBRUSH> { ... }
fn UnrealizeObject(&self) -> SysResult<()> { ... }
}
Available on crate features
kernel
and gdi
only.Expand description
This trait is enabled with the gdi
feature, and provides methods for
HBRUSH
.
Prefer importing this trait through the prelude:
use winsafe::prelude::*;
Provided Methods§
sourcefn from_sys_color(color: COLOR) -> HBRUSH
fn from_sys_color(color: COLOR) -> HBRUSH
Creates a brush with the given system color.
Note: This should be used only to initialize the
WNDCLASSEX
’s hbrBackground
field. Any other use
will yield an invalid handle.
sourcefn CreateBrushIndirect(lb: &LOGBRUSH) -> SysResult<DeleteObjectGuard<HBRUSH>>
fn CreateBrushIndirect(lb: &LOGBRUSH) -> SysResult<DeleteObjectGuard<HBRUSH>>
CreateBrushIndirect
function.
sourcefn CreateHatchBrush(
hatch: HS,
color: COLORREF
) -> SysResult<DeleteObjectGuard<HBRUSH>>
fn CreateHatchBrush( hatch: HS, color: COLORREF ) -> SysResult<DeleteObjectGuard<HBRUSH>>
CreateHatchBrush
function.
sourcefn CreatePatternBrush(hbmp: &HBITMAP) -> SysResult<DeleteObjectGuard<HBRUSH>>
fn CreatePatternBrush(hbmp: &HBITMAP) -> SysResult<DeleteObjectGuard<HBRUSH>>
CreatePatternBrush
function.
sourcefn CreateSolidBrush(color: COLORREF) -> SysResult<DeleteObjectGuard<HBRUSH>>
fn CreateSolidBrush(color: COLORREF) -> SysResult<DeleteObjectGuard<HBRUSH>>
CreateSolidBrush
function.
sourcefn GetStockObject(sb: STOCK_BRUSH) -> SysResult<HBRUSH>
fn GetStockObject(sb: STOCK_BRUSH) -> SysResult<HBRUSH>
GetStockObject
function.
sourcefn GetSysColorBrush(index: COLOR) -> SysResult<HBRUSH>
fn GetSysColorBrush(index: COLOR) -> SysResult<HBRUSH>
GetSysColorBrush
function.
sourcefn UnrealizeObject(&self) -> SysResult<()>
fn UnrealizeObject(&self) -> SysResult<()>
UnrealizeObject
function.
Object Safety§
This trait is not object safe.