-
Notifications
You must be signed in to change notification settings - Fork 0
/
gio-sys.tmpl
66 lines (60 loc) · 2.1 KB
/
gio-sys.tmpl
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<%!
from grust.mapping import Module
from grust.namematch import MatchList
suppress_c_names = MatchList(
# System-specific definitions, custom-defined below
"GSocketFamily",
"GSocketMsgFlags",
)
modules = [
Module(
cfg = 'unix',
name = 'unix',
ctypes_match = MatchList(
"GDesktopAppInfo*",
"GFileDescriptorBased*",
"GUnix*"
),
symbols_match = MatchList(
"g_credentials_get_unix_*",
"g_desktop_app_info*",
"g_file_descriptor_based*",
"g_subprocess_launcher_set_child_setup",
"g_subprocess_launcher_set_stdin_file_path",
"g_subprocess_launcher_set_stdout_file_path",
"g_subprocess_launcher_set_stderr_file_path",
"g_subprocess_launcher_take_fd",
"g_subprocess_launcher_take_stdin_fd",
"g_subprocess_launcher_take_stdout_fd",
"g_subprocess_launcher_take_stderr_fd",
"g_subprocess_send_signal",
"g_unix_*",
)
),
]
%>\
<%inherit file="/sys/crate.tmpl"/>
<%block name="custom_types">
#[repr(C)]
pub enum GSocketFamily {
Invalid = 0,
Unix = glib::GLIB_SYSDEF_AF_UNIX as isize,
IPv4 = glib::GLIB_SYSDEF_AF_INET as isize,
IPv6 = glib::GLIB_SYSDEF_AF_INET6 as isize,
}
pub const G_SOCKET_FAMILY_INVALID: GSocketFamily = GSocketFamily::Invalid;
pub const G_SOCKET_FAMILY_UNIX: GSocketFamily = GSocketFamily::Unix;
pub const G_SOCKET_FAMILY_IPV4: GSocketFamily = GSocketFamily::IPv4;
pub const G_SOCKET_FAMILY_IPV6: GSocketFamily = GSocketFamily::IPv6;
#[repr(C)]
pub enum GSocketMsgFlags {
None = 0,
Oob = glib::GLIB_SYSDEF_MSG_OOB as isize,
Peek = glib::GLIB_SYSDEF_MSG_PEEK as isize,
DontRoute = glib::GLIB_SYSDEF_MSG_DONTROUTE as isize,
}
pub const G_SOCKET_MSG_NONE: guint = 0;
pub const G_SOCKET_MSG_OOB: guint = glib::GLIB_SYSDEF_MSG_OOB as guint;
pub const G_SOCKET_MSG_PEEK: guint = glib::GLIB_SYSDEF_MSG_PEEK as guint;
pub const G_SOCKET_MSG_DONTROUTE: guint = glib::GLIB_SYSDEF_MSG_DONTROUTE as guint;
</%block>