File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ impl Event {
11
11
T :: event_types ( ) . contains ( & self . event_type ( ) )
12
12
}
13
13
14
+ pub fn type_ ( & self ) -> glib:: Type {
15
+ unsafe {
16
+ let ptr = self . to_glib_none ( ) . 0 ;
17
+ from_glib ( ( * ( * ( ptr as * mut glib:: gobject_ffi:: GTypeInstance ) ) . g_class ) . g_type )
18
+ }
19
+ }
20
+
14
21
pub fn downcast < T : EventKind > ( self ) -> Result < T , Event > {
15
22
unsafe {
16
23
if self . is :: < T > ( ) {
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ impl RenderNode {
9
9
T :: NODE_TYPE == self . node_type ( )
10
10
}
11
11
12
+ pub fn type_ ( & self ) -> glib:: Type {
13
+ unsafe {
14
+ let ptr = self . to_glib_none ( ) . 0 ;
15
+ from_glib ( ( * ( * ( ptr as * mut glib:: gobject_ffi:: GTypeInstance ) ) . g_class ) . g_type )
16
+ }
17
+ }
18
+
12
19
#[ doc( alias = "gsk_render_node_deserialize" ) ]
13
20
pub fn deserialize ( bytes : & glib:: Bytes ) -> Option < Self > {
14
21
assert_initialized_main_thread ! ( ) ;
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ impl Expression {
50
50
pub fn type_ ( & self ) -> Type {
51
51
unsafe {
52
52
let ptr = self . to_glib_none ( ) . 0 ;
53
-
54
53
from_glib ( ( * ( * ( ptr as * mut glib:: gobject_ffi:: GTypeInstance ) ) . g_class ) . g_type )
55
54
}
56
55
}
You can’t perform that action at this time.
0 commit comments