diff options
author | José Aliste <jaliste@src.gnome.org> | 2012-12-08 10:33:04 -0300 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2012-12-08 18:01:28 +0100 |
commit | 8550576bdf74180b62f54f9fd59213fbcd0a1be1 (patch) | |
tree | 61fac060cf90dfbe6d739749eea4d4f2cc012614 /glib | |
parent | 15dcc5426ce319429e1a2c518902effb2ddf06cf (diff) |
glib: Add poppler_annot_set_flags
https://bugs.freedesktop.org/show_bug.cgi?id=58015
Diffstat (limited to 'glib')
-rw-r--r-- | glib/poppler-annot.cc | 22 | ||||
-rw-r--r-- | glib/poppler-annot.h | 2 |
2 files changed, 24 insertions, 0 deletions
diff --git a/glib/poppler-annot.cc b/glib/poppler-annot.cc index 1627d251..31cc081b 100644 --- a/glib/poppler-annot.cc +++ b/glib/poppler-annot.cc @@ -508,6 +508,28 @@ poppler_annot_get_flags (PopplerAnnot *poppler_annot) } /** + * poppler_annot_set_flags: + * @poppler_annot: a #PopplerAnnot + * @flags: a #PopplerAnnotFlag + * + * Sets the flag field specifying various characteristics of the + * @poppler_annot. + * + * Since: 0.22 + **/ +void +poppler_annot_set_flags (PopplerAnnot *poppler_annot, PopplerAnnotFlag flags) +{ + g_return_if_fail (POPPLER_IS_ANNOT (poppler_annot)); + + if (poppler_annot_get_flags (poppler_annot) == flags) + return; + + poppler_annot->annot->setFlags ((guint) flags); +} + + +/** * poppler_annot_get_color: * @poppler_annot: a #PopplerAnnot * diff --git a/glib/poppler-annot.h b/glib/poppler-annot.h index 17440fba..88f4e468 100644 --- a/glib/poppler-annot.h +++ b/glib/poppler-annot.h @@ -162,6 +162,8 @@ void poppler_annot_set_contents ( gchar *poppler_annot_get_name (PopplerAnnot *poppler_annot); gchar *poppler_annot_get_modified (PopplerAnnot *poppler_annot); PopplerAnnotFlag poppler_annot_get_flags (PopplerAnnot *poppler_annot); +void poppler_annot_set_flags (PopplerAnnot *poppler_annot, + PopplerAnnotFlag flags); PopplerColor *poppler_annot_get_color (PopplerAnnot *poppler_annot); void poppler_annot_set_color (PopplerAnnot *poppler_annot, PopplerColor *poppler_color); |