Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit a3d0ab7

Browse files
Merge pull request #470 from EPashkin/ffi_to_sys
Remove xx_sys to xx_ffi renaming
2 parents 4a1c35b + ffcb4b3 commit a3d0ab7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1695
-1721
lines changed

src/auto/checksum.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,43 @@
33
// DO NOT EDIT
44

55
use ChecksumType;
6-
use ffi;
6+
use glib_sys;
77
use translate::*;
88

99
glib_wrapper! {
1010
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
11-
pub struct Checksum(Boxed<ffi::GChecksum>);
11+
pub struct Checksum(Boxed<glib_sys::GChecksum>);
1212

1313
match fn {
14-
copy => |ptr| ffi::g_checksum_copy(mut_override(ptr)),
15-
free => |ptr| ffi::g_checksum_free(ptr),
16-
get_type => || ffi::g_checksum_get_type(),
14+
copy => |ptr| glib_sys::g_checksum_copy(mut_override(ptr)),
15+
free => |ptr| glib_sys::g_checksum_free(ptr),
16+
get_type => || glib_sys::g_checksum_get_type(),
1717
}
1818
}
1919

2020
impl Checksum {
2121
pub fn new(checksum_type: ChecksumType) -> Checksum {
2222
unsafe {
23-
from_glib_full(ffi::g_checksum_new(checksum_type.to_glib()))
23+
from_glib_full(glib_sys::g_checksum_new(checksum_type.to_glib()))
2424
}
2525
}
2626

2727
pub fn reset(&mut self) {
2828
unsafe {
29-
ffi::g_checksum_reset(self.to_glib_none_mut().0);
29+
glib_sys::g_checksum_reset(self.to_glib_none_mut().0);
3030
}
3131
}
3232

3333
pub fn update(&mut self, data: &[u8]) {
3434
let length = data.len() as isize;
3535
unsafe {
36-
ffi::g_checksum_update(self.to_glib_none_mut().0, data.to_glib_none().0, length);
36+
glib_sys::g_checksum_update(self.to_glib_none_mut().0, data.to_glib_none().0, length);
3737
}
3838
}
3939

4040
pub fn type_get_length(checksum_type: ChecksumType) -> isize {
4141
unsafe {
42-
ffi::g_checksum_type_get_length(checksum_type.to_glib())
42+
glib_sys::g_checksum_type_get_length(checksum_type.to_glib())
4343
}
4444
}
4545
}

src/auto/constants.rs

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,114 +2,114 @@
22
// from gir-files (https://github.com/gtk-rs/gir-files)
33
// DO NOT EDIT
44

5-
use ffi;
5+
use glib_sys;
66
use std::ffi::CStr;
77

88
lazy_static! {
9-
pub static ref CSET_A_2_Z: &'static str = unsafe{CStr::from_ptr(ffi::G_CSET_A_2_Z).to_str().unwrap()};
9+
pub static ref CSET_A_2_Z: &'static str = unsafe{CStr::from_ptr(glib_sys::G_CSET_A_2_Z).to_str().unwrap()};
1010
}
1111
lazy_static! {
12-
pub static ref CSET_DIGITS: &'static str = unsafe{CStr::from_ptr(ffi::G_CSET_DIGITS).to_str().unwrap()};
12+
pub static ref CSET_DIGITS: &'static str = unsafe{CStr::from_ptr(glib_sys::G_CSET_DIGITS).to_str().unwrap()};
1313
}
1414
lazy_static! {
15-
pub static ref CSET_a_2_z: &'static str = unsafe{CStr::from_ptr(ffi::G_CSET_a_2_z).to_str().unwrap()};
15+
pub static ref CSET_a_2_z: &'static str = unsafe{CStr::from_ptr(glib_sys::G_CSET_a_2_z).to_str().unwrap()};
1616
}
1717
lazy_static! {
18-
pub static ref KEY_FILE_DESKTOP_ACTION_GROUP_PREFIX: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_ACTION_GROUP_PREFIX).to_str().unwrap()};
18+
pub static ref KEY_FILE_DESKTOP_ACTION_GROUP_PREFIX: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_ACTION_GROUP_PREFIX).to_str().unwrap()};
1919
}
2020
lazy_static! {
21-
pub static ref KEY_FILE_DESKTOP_GROUP: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_GROUP).to_str().unwrap()};
21+
pub static ref KEY_FILE_DESKTOP_GROUP: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_GROUP).to_str().unwrap()};
2222
}
2323
lazy_static! {
24-
pub static ref KEY_FILE_DESKTOP_KEY_ACTIONS: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_ACTIONS).to_str().unwrap()};
24+
pub static ref KEY_FILE_DESKTOP_KEY_ACTIONS: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_ACTIONS).to_str().unwrap()};
2525
}
2626
lazy_static! {
27-
pub static ref KEY_FILE_DESKTOP_KEY_CATEGORIES: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_CATEGORIES).to_str().unwrap()};
27+
pub static ref KEY_FILE_DESKTOP_KEY_CATEGORIES: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_CATEGORIES).to_str().unwrap()};
2828
}
2929
lazy_static! {
30-
pub static ref KEY_FILE_DESKTOP_KEY_COMMENT: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_COMMENT).to_str().unwrap()};
30+
pub static ref KEY_FILE_DESKTOP_KEY_COMMENT: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_COMMENT).to_str().unwrap()};
3131
}
3232
lazy_static! {
33-
pub static ref KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE).to_str().unwrap()};
33+
pub static ref KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE).to_str().unwrap()};
3434
}
3535
lazy_static! {
36-
pub static ref KEY_FILE_DESKTOP_KEY_EXEC: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_EXEC).to_str().unwrap()};
36+
pub static ref KEY_FILE_DESKTOP_KEY_EXEC: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_EXEC).to_str().unwrap()};
3737
}
3838
lazy_static! {
39-
pub static ref KEY_FILE_DESKTOP_KEY_FULLNAME: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_FULLNAME).to_str().unwrap()};
39+
pub static ref KEY_FILE_DESKTOP_KEY_FULLNAME: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_FULLNAME).to_str().unwrap()};
4040
}
4141
lazy_static! {
42-
pub static ref KEY_FILE_DESKTOP_KEY_GENERIC_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME).to_str().unwrap()};
42+
pub static ref KEY_FILE_DESKTOP_KEY_GENERIC_NAME: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME).to_str().unwrap()};
4343
}
4444
lazy_static! {
45-
pub static ref KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN).to_str().unwrap()};
45+
pub static ref KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN).to_str().unwrap()};
4646
}
4747
lazy_static! {
48-
pub static ref KEY_FILE_DESKTOP_KEY_HIDDEN: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_HIDDEN).to_str().unwrap()};
48+
pub static ref KEY_FILE_DESKTOP_KEY_HIDDEN: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_HIDDEN).to_str().unwrap()};
4949
}
5050
lazy_static! {
51-
pub static ref KEY_FILE_DESKTOP_KEY_ICON: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_ICON).to_str().unwrap()};
51+
pub static ref KEY_FILE_DESKTOP_KEY_ICON: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_ICON).to_str().unwrap()};
5252
}
5353
lazy_static! {
54-
pub static ref KEY_FILE_DESKTOP_KEY_KEYWORDS: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_KEYWORDS).to_str().unwrap()};
54+
pub static ref KEY_FILE_DESKTOP_KEY_KEYWORDS: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_KEYWORDS).to_str().unwrap()};
5555
}
5656
lazy_static! {
57-
pub static ref KEY_FILE_DESKTOP_KEY_MIME_TYPE: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_MIME_TYPE).to_str().unwrap()};
57+
pub static ref KEY_FILE_DESKTOP_KEY_MIME_TYPE: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_MIME_TYPE).to_str().unwrap()};
5858
}
5959
lazy_static! {
60-
pub static ref KEY_FILE_DESKTOP_KEY_NAME: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_NAME).to_str().unwrap()};
60+
pub static ref KEY_FILE_DESKTOP_KEY_NAME: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_NAME).to_str().unwrap()};
6161
}
6262
lazy_static! {
63-
pub static ref KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN).to_str().unwrap()};
63+
pub static ref KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN).to_str().unwrap()};
6464
}
6565
lazy_static! {
66-
pub static ref KEY_FILE_DESKTOP_KEY_NO_DISPLAY: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY).to_str().unwrap()};
66+
pub static ref KEY_FILE_DESKTOP_KEY_NO_DISPLAY: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY).to_str().unwrap()};
6767
}
6868
lazy_static! {
69-
pub static ref KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN).to_str().unwrap()};
69+
pub static ref KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN).to_str().unwrap()};
7070
}
7171
lazy_static! {
72-
pub static ref KEY_FILE_DESKTOP_KEY_PATH: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_PATH).to_str().unwrap()};
72+
pub static ref KEY_FILE_DESKTOP_KEY_PATH: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_PATH).to_str().unwrap()};
7373
}
7474
lazy_static! {
75-
pub static ref KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY).to_str().unwrap()};
75+
pub static ref KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY).to_str().unwrap()};
7676
}
7777
lazy_static! {
78-
pub static ref KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS).to_str().unwrap()};
78+
pub static ref KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS).to_str().unwrap()};
7979
}
8080
lazy_static! {
81-
pub static ref KEY_FILE_DESKTOP_KEY_TERMINAL: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_TERMINAL).to_str().unwrap()};
81+
pub static ref KEY_FILE_DESKTOP_KEY_TERMINAL: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_TERMINAL).to_str().unwrap()};
8282
}
8383
lazy_static! {
84-
pub static ref KEY_FILE_DESKTOP_KEY_TRY_EXEC: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_TRY_EXEC).to_str().unwrap()};
84+
pub static ref KEY_FILE_DESKTOP_KEY_TRY_EXEC: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_TRY_EXEC).to_str().unwrap()};
8585
}
8686
lazy_static! {
87-
pub static ref KEY_FILE_DESKTOP_KEY_TYPE: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_TYPE).to_str().unwrap()};
87+
pub static ref KEY_FILE_DESKTOP_KEY_TYPE: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_TYPE).to_str().unwrap()};
8888
}
8989
lazy_static! {
90-
pub static ref KEY_FILE_DESKTOP_KEY_URL: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_URL).to_str().unwrap()};
90+
pub static ref KEY_FILE_DESKTOP_KEY_URL: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_URL).to_str().unwrap()};
9191
}
9292
lazy_static! {
93-
pub static ref KEY_FILE_DESKTOP_KEY_VERSION: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_KEY_VERSION).to_str().unwrap()};
93+
pub static ref KEY_FILE_DESKTOP_KEY_VERSION: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_KEY_VERSION).to_str().unwrap()};
9494
}
9595
lazy_static! {
96-
pub static ref KEY_FILE_DESKTOP_TYPE_APPLICATION: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_TYPE_APPLICATION).to_str().unwrap()};
96+
pub static ref KEY_FILE_DESKTOP_TYPE_APPLICATION: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_TYPE_APPLICATION).to_str().unwrap()};
9797
}
9898
lazy_static! {
99-
pub static ref KEY_FILE_DESKTOP_TYPE_DIRECTORY: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_TYPE_DIRECTORY).to_str().unwrap()};
99+
pub static ref KEY_FILE_DESKTOP_TYPE_DIRECTORY: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_TYPE_DIRECTORY).to_str().unwrap()};
100100
}
101101
lazy_static! {
102-
pub static ref KEY_FILE_DESKTOP_TYPE_LINK: &'static str = unsafe{CStr::from_ptr(ffi::G_KEY_FILE_DESKTOP_TYPE_LINK).to_str().unwrap()};
102+
pub static ref KEY_FILE_DESKTOP_TYPE_LINK: &'static str = unsafe{CStr::from_ptr(glib_sys::G_KEY_FILE_DESKTOP_TYPE_LINK).to_str().unwrap()};
103103
}
104104
lazy_static! {
105-
pub static ref OPTION_REMAINING: &'static str = unsafe{CStr::from_ptr(ffi::G_OPTION_REMAINING).to_str().unwrap()};
105+
pub static ref OPTION_REMAINING: &'static str = unsafe{CStr::from_ptr(glib_sys::G_OPTION_REMAINING).to_str().unwrap()};
106106
}
107107
lazy_static! {
108-
pub static ref STR_DELIMITERS: &'static str = unsafe{CStr::from_ptr(ffi::G_STR_DELIMITERS).to_str().unwrap()};
108+
pub static ref STR_DELIMITERS: &'static str = unsafe{CStr::from_ptr(glib_sys::G_STR_DELIMITERS).to_str().unwrap()};
109109
}
110110
lazy_static! {
111-
pub static ref URI_RESERVED_CHARS_GENERIC_DELIMITERS: &'static str = unsafe{CStr::from_ptr(ffi::G_URI_RESERVED_CHARS_GENERIC_DELIMITERS).to_str().unwrap()};
111+
pub static ref URI_RESERVED_CHARS_GENERIC_DELIMITERS: &'static str = unsafe{CStr::from_ptr(glib_sys::G_URI_RESERVED_CHARS_GENERIC_DELIMITERS).to_str().unwrap()};
112112
}
113113
lazy_static! {
114-
pub static ref URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS: &'static str = unsafe{CStr::from_ptr(ffi::G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS).to_str().unwrap()};
114+
pub static ref URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS: &'static str = unsafe{CStr::from_ptr(glib_sys::G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS).to_str().unwrap()};
115115
}

0 commit comments

Comments
 (0)