Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
scoped_select_object.h
Go to the documentation of this file.
1
// Copyright 2024 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#
ifndef
CORE_FXCRT_WIN_SCOPED_SELECT_OBJECT_H_
6
#
define
CORE_FXCRT_WIN_SCOPED_SELECT_OBJECT_H_
7
8
#
include
<
windows
.
h
>
9
10
#
include
"core/fxcrt/check.h"
11
12
namespace
pdfium
{
13
14
// Helper class for deselecting object from DC.
15
class
ScopedSelectObject
{
16
public
:
17
ScopedSelectObject
(HDC hdc, HGDIOBJ object)
18
:
hdc_
(
hdc
),
oldobj_
(
SelectObject
(
hdc
,
object
)) {
19
DCHECK
(hdc_);
20
DCHECK
(object);
21
DCHECK
(oldobj_);
22
DCHECK
(oldobj_ != HGDI_ERROR);
23
}
24
25
ScopedSelectObject
(
const
ScopedSelectObject
&) =
delete
;
26
ScopedSelectObject
&
operator
=(
const
ScopedSelectObject
&) =
delete
;
27
28
~
ScopedSelectObject
() {
29
[[maybe_unused]] HGDIOBJ object = SelectObject(hdc_, oldobj_);
30
DCHECK
((GetObjectType(oldobj_) != OBJ_REGION && object) ||
31
(GetObjectType(oldobj_) == OBJ_REGION && object != HGDI_ERROR));
32
}
33
34
private
:
35
const
HDC hdc_;
36
const
HGDIOBJ oldobj_;
37
};
38
39
}
// namespace pdfium
40
41
#
endif
// CORE_FXCRT_WIN_SCOPED_SELECT_OBJECT_H_
ByteString
fxcrt::ByteString ByteString
Definition
bytestring.h:180
DCHECK
#define DCHECK
Definition
check.h:33
CFX_FolderFontInfo
Definition
cfx_folderfontinfo.h:26
CFX_FolderFontInfo::GetSubstFont
void * GetSubstFont(const ByteString &face)
Definition
cfx_folderfontinfo.cpp:300
CFX_FolderFontInfo::FindFont
void * FindFont(int weight, bool bItalic, FX_Charset charset, int pitch_family, const ByteString &family, bool bMatchName)
Definition
cfx_folderfontinfo.cpp:310
CFX_FontMapper
Definition
cfx_fontmapper.h:31
CFX_GEModule::PlatformIface
Definition
cfx_gemodule.h:27
CFX_GEModule
Definition
cfx_gemodule.h:25
CFX_GEModule::Get
static CFX_GEModule * Get()
Definition
cfx_gemodule.cpp:45
CFX_GEModule::GetUserFontPaths
const char ** GetUserFontPaths() const
Definition
cfx_gemodule.h:47
CWin32Platform::CWin32Platform
CWin32Platform()
CWin32Platform::CreateDefaultSystemFontInfo
std::unique_ptr< SystemFontInfoIface > CreateDefaultSystemFontInfo() override
Definition
cwin32_platform.cpp:465
CWin32Platform::Init
void Init() override
Definition
cwin32_platform.cpp:458
CWin32Platform::~CWin32Platform
~CWin32Platform() override
SystemFontInfoIface
Definition
systemfontinfo_iface.h:21
fxcrt::ByteString::EqualNoCase
bool EqualNoCase(ByteStringView str) const
Definition
bytestring.cpp:281
fxcrt::ByteString::ByteString
ByteString()=default
fxcrt::ByteString::operator+=
ByteString & operator+=(const char *str)
Definition
bytestring.cpp:182
fxcrt::ByteString::operator=
ByteString & operator=(const char *str)
Definition
bytestring.cpp:150
fxcrt::ByteString::operator!=
bool operator!=(const char *ptr) const
Definition
bytestring.h:65
fxcrt::UnownedPtr
Definition
unowned_ptr.h:76
fxcrt::WideString::operator==
bool operator==(const WideString &other) const
Definition
widestring.cpp:531
fxcrt::WideString::FromDefANSI
static WideString FromDefANSI(ByteStringView str)
Definition
widestring.cpp:722
fxcrt::WideString::WideString
WideString(const wchar_t *ptr)
Definition
widestring.cpp:407
pdfium::CFDETextOutLargeBitmapTest
Definition
cfde_textout_unittest.cpp:117
pdfium::ScopedSelectObject
Definition
scoped_select_object.h:15
pdfium::ScopedSelectObject::ScopedSelectObject
ScopedSelectObject(HDC hdc, HGDIOBJ object)
Definition
scoped_select_object.h:17
pdfium::ScopedSelectObject::~ScopedSelectObject
~ScopedSelectObject()
Definition
scoped_select_object.h:28
pdfium::ScopedSelectObject::operator=
ScopedSelectObject & operator=(const ScopedSelectObject &)=delete
pdfium::ScopedSelectObject::ScopedSelectObject
ScopedSelectObject(const ScopedSelectObject &)=delete
UNSAFE_TODO
#define UNSAFE_TODO(...)
Definition
compiler_specific.h:102
FX_Charset
FX_Charset
Definition
fx_codepage.h:71
FX_Charset::kChineseTraditional
@ kChineseTraditional
Definition
fx_codepage.h:91
FX_Charset::kANSI
@ kANSI
Definition
fx_codepage.h:72
FX_Charset::kSymbol
@ kSymbol
Definition
fx_codepage.h:74
FX_Charset::kChineseSimplified
@ kChineseSimplified
Definition
fx_codepage.h:90
FX_Charset::kDefault
@ kDefault
Definition
fx_codepage.h:73
FX_Charset::kHangul
@ kHangul
Definition
fx_codepage.h:88
FX_Charset::kShiftJIS
@ kShiftJIS
Definition
fx_codepage.h:87
FXBSTR_ID
constexpr uint32_t FXBSTR_ID(uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4)
Definition
fx_string.h:19
fxcrt
Definition
stl_util.h:17
fxcrt::FromBE32
uint32_t FromBE32(uint32_t x)
Definition
byteorder.h:82
pdfium::IsUser32AndGdi32Available
bool IsUser32AndGdi32Available()
Definition
win_util.cc:12
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
ByteStringView
fxcrt::ByteStringView ByteStringView
Definition
string_view_template.h:325
WideString
fxcrt::WideString WideString
Definition
widestring.h:207
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxcrt
win
scoped_select_object.h
Generated on
for Qt by
1.18.0