summaryrefslogtreecommitdiff
path: root/gir
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2019-04-12 19:47:38 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2019-04-12 19:47:38 +0900
commitcaeaf0b198eae7c897ae070e0cacf25fb85c51e4 (patch)
tree3fb3f763019d76ba15d45fcad03b639471ebc8a9 /gir
parent3a3135b1608652ab8db34d499a6baa52601981cc (diff)
downloadibus-anthy-caeaf0b198eae7c897ae070e0cacf25fb85c51e4.tar.gz
gir: Add Anthy.GContext.set_logger()
Diffstat (limited to 'gir')
-rw-r--r--gir/anthygcontext.c8
-rw-r--r--gir/anthygcontext.h10
-rw-r--r--gir/test.c1
3 files changed, 17 insertions, 2 deletions
diff --git a/gir/anthygcontext.c b/gir/anthygcontext.c
index 0832a9c..b342579 100644
--- a/gir/anthygcontext.c
+++ b/gir/anthygcontext.c
@@ -1,7 +1,7 @@
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
/* vim:set et sts=4: */
/* ibus-anthy - The Anthy engine for IBus
- * Copyright (c) 2012-2013 Takao Fujiwara <takao.fujiwara1@gmail.com>
+ * Copyright (c) 2012-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
* Copyright (c) 2012 Peng Huang <shawn.p.huang@gmail.com>
* Copyright (c) 2012-2013 Red Hat, Inc.
*
@@ -233,4 +233,10 @@ anthy_gcontext_commit_prediction (AnthyGContext *obj, int nth_seg)
return anthy_commit_prediction (obj->priv->context, nth_seg);
}
+void
+anthy_gcontext_set_logger (int level)
+{
+ anthy_set_logger (NULL, level);
+}
+
#undef ANTHY_OBJECT_FUNCTION_ASSERTIONS
diff --git a/gir/anthygcontext.h b/gir/anthygcontext.h
index a41bfd6..ec8bf67 100644
--- a/gir/anthygcontext.h
+++ b/gir/anthygcontext.h
@@ -1,7 +1,7 @@
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
/* vim:set et sts=4: */
/* ibus-anthy - The Anthy engine for IBus
- * Copyright (c) 2012-2013 Takao Fujiwara <takao.fujiwara1@gmail.com>
+ * Copyright (c) 2012-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
* Copyright (c) 2012 Peng Huang <shawn.p.huang@gmail.com>
* Copyright (c) 2012-2013 Red Hat, Inc.
*
@@ -200,5 +200,13 @@ gchar * anthy_gcontext_get_prediction (AnthyGContext *obj,
*/
int anthy_gcontext_commit_prediction (AnthyGContext *obj,
int nth_seg);
+
+/**
+ * anthy_gcontext_set_logger:
+ * @level: Log level
+ *
+ * Set Anthy log level.
+ */
+void anthy_gcontext_set_logger (int level);
G_END_DECLS
#endif
diff --git a/gir/test.c b/gir/test.c
index 4758c5c..c2cde1b 100644
--- a/gir/test.c
+++ b/gir/test.c
@@ -12,6 +12,7 @@ main (int argc, char *argv[])
g_type_init ();
#endif
+ anthy_gcontext_set_logger (0);
obj = anthy_gcontext_new ();
anthy_gcontext_set_encoding (obj, ANTHY_UTF8_ENCODING);