1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use crate::{
auto::xproto::{FreePixmapRequest, Pixmap},
display::{Connection, Display},
sr_request,
};
#[cfg(feature = "async")]
use crate::display::AsyncConnection;
impl Pixmap {
#[inline]
pub fn free<Conn: Connection>(self, dpy: &mut Display<Conn>) -> crate::Result {
sr_request!(
dpy,
FreePixmapRequest {
pixmap: self,
..Default::default()
}
)
}
#[cfg(feature = "async")]
#[inline]
pub async fn free_async<Conn: AsyncConnection + Send>(
self,
dpy: &mut Display<Conn>,
) -> crate::Result {
sr_request!(
dpy,
FreePixmapRequest {
pixmap: self,
..Default::default()
},
async
)
.await
}
}