gtk/im_context_simple.rs
1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use crate::{IMContextSimple, ffi};
4use glib::object::IsA;
5use glib::translate::*;
6use std::path::Path;
7
8pub trait IMContextSimpleExtManual: IsA<IMContextSimple> + 'static {
9 /// Adds an additional table from the X11 compose file.
10 /// ## `compose_file`
11 /// The path of compose file
12 #[doc(alias = "gtk_im_context_simple_add_compose_file")]
13 fn add_compose_file<P: AsRef<Path>>(&self, compose_file: P) {
14 unsafe {
15 let compose_file = compose_file.as_ref();
16 ffi::gtk_im_context_simple_add_compose_file(
17 self.as_ref().to_glib_none().0,
18 compose_file.to_glib_none().0,
19 );
20 }
21 }
22
23 //#[doc(alias="gtk_im_context_simple_add_table")]
24 //fn add_table(&self, data: &[u16], max_seq_len: u32, n_seqs: u32);
25}
26
27impl<O: IsA<IMContextSimple>> IMContextSimpleExtManual for O {}