KWin
Loading...
Searching...
No Matches
src
utils
filedescriptor.h
Go to the documentation of this file.
1
/*
2
KWin - the KDE window manager
3
This file is part of the KDE project.
4
5
SPDX-FileCopyrightText:: 2022 Xaver Hugl <xaver.hugl@gmail.com>
6
7
SPDX-License-Identifier: GPL-2.0-or-later
8
*/
9
#pragma once
10
11
#include <kwin_export.h>
12
13
namespace
KWin
14
{
15
16
class
KWIN_EXPORT
FileDescriptor
17
{
18
public
:
19
FileDescriptor
() =
default
;
20
explicit
FileDescriptor
(
int
fd);
21
FileDescriptor
(
FileDescriptor
&&);
22
FileDescriptor
&operator=(
FileDescriptor
&&);
23
~FileDescriptor
();
24
25
bool
isValid()
const
;
26
int
get()
const
;
27
int
take();
28
void
reset();
29
FileDescriptor
duplicate()
const
;
30
31
bool
isReadable()
const
;
32
bool
isClosed()
const
;
33
34
static
bool
isReadable(
int
fd);
35
static
bool
isClosed(
int
fd);
36
37
private
:
38
int
m_fd = -1;
39
};
40
41
}
KWin::FileDescriptor
Definition
filedescriptor.h:17
KWin::FileDescriptor::FileDescriptor
FileDescriptor()=default
KWin
Definition
activation_test.cpp:20
Generated on Sat Feb 17 2024 01:42:10 for KWin by
1.10.0