Skip to main content

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
8mod sealed {
9    pub trait Sealed {}
10    impl<T: glib::object::IsA<crate::IMContextSimple>> Sealed for T {}
11}
12
13pub trait IMContextSimpleExtManual: IsA<IMContextSimple> + sealed::Sealed + 'static {
14    /// Adds an additional table from the X11 compose file.
15    /// ## `compose_file`
16    /// The path of compose file
17    #[doc(alias = "gtk_im_context_simple_add_compose_file")]
18    fn add_compose_file<P: AsRef<Path>>(&self, compose_file: P) {
19        unsafe {
20            let compose_file = compose_file.as_ref();
21            ffi::gtk_im_context_simple_add_compose_file(
22                self.as_ref().to_glib_none().0,
23                compose_file.to_glib_none().0,
24            );
25        }
26    }
27
28    //#[doc(alias="gtk_im_context_simple_add_table")]
29    //fn add_table(&self, data: &[u16], max_seq_len: u32, n_seqs: u32);
30}
31
32impl<O: IsA<IMContextSimple>> IMContextSimpleExtManual for O {}