This repository was archived by the owner on Jun 8, 2021. It is now read-only.
File tree 2 files changed +32
-8
lines changed
2 files changed +32
-8
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2013-2016, The Gtk-rs Project Developers.
2
+ // See the COPYRIGHT file at the top-level directory of this distribution.
3
+ // Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT>
4
+
1
5
#[ macro_use]
2
6
extern crate bitflags;
3
7
#[ macro_use]
@@ -8,21 +12,26 @@ extern crate glib_sys as glib_ffi;
8
12
extern crate gobject_sys as gobject_ffi;
9
13
extern crate libc;
10
14
11
- macro_rules! callback_guard {
12
- ( ) => (
13
- let _guard = :: glib:: CallbackGuard :: new( ) ;
14
- )
15
- }
16
-
17
- mod auto;
18
-
19
15
pub use glib:: {
20
16
Error ,
21
17
Object ,
22
18
} ;
23
19
24
20
pub use auto:: * ;
21
+ pub use resources:: {
22
+ resources_register,
23
+ resources_unregister,
24
+ } ;
25
25
26
26
pub mod prelude {
27
27
pub use auto:: traits:: * ;
28
28
}
29
+
30
+ macro_rules! callback_guard {
31
+ ( ) => (
32
+ let _guard = :: glib:: CallbackGuard :: new( ) ;
33
+ )
34
+ }
35
+
36
+ mod auto;
37
+ mod resources;
Original file line number Diff line number Diff line change
1
+ // Copyright 2013-2016, The Gtk-rs Project Developers.
2
+ // See the COPYRIGHT file at the top-level directory of this distribution.
3
+ // Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT>
4
+
5
+ use Resource ;
6
+ use ffi;
7
+ use glib:: translate:: * ;
8
+
9
+ pub fn resources_register ( resource : & Resource ) {
10
+ unsafe { ffi:: g_resources_register ( resource. to_glib_none ( ) . 0 ) }
11
+ }
12
+
13
+ pub fn resources_unregister ( resource : & Resource ) {
14
+ unsafe { ffi:: g_resources_unregister ( resource. to_glib_none ( ) . 0 ) }
15
+ }
You can’t perform that action at this time.
0 commit comments