Bug 45384 - Various minor introspection improvements
Summary: Various minor introspection improvements
Status: RESOLVED MOVED
Alias: None
Product: poppler
Classification: Unclassified
Component: glib frontend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-30 00:10 UTC by Evan Nemerson
Modified: 2018-08-20 21:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
glib: introspection fixes issues, don't expose PopplerAttachmentClass (2.18 KB, patch)
2012-01-30 00:11 UTC, Evan Nemerson
Details | Splinter Review
glib: add documentation for PopplerActions (4.38 KB, patch)
2013-02-14 12:04 UTC, Evan Nemerson
Details | Splinter Review

Description Evan Nemerson 2012-01-30 00:10:28 UTC
I noticed a few issues while working on the Vala bindings:

1. Poppler.ActionLayer.layers is missing an element-type annotation
2. Poppler.ActionOCGState.state_list is missing an element-type annotation
3. PopplerAttachmentClass is exposed publicly when it probably shouldn't be

The first two are relatively straightforward; simply add the annotations. The third is a little more complicated. Removing the struct from the public headers is technically an API break, but it's quite unlikely that anyone is actually using the struct and it wasn't documented so IMHO it's okay to remove it.
Comment 1 Evan Nemerson 2012-01-30 00:11:31 UTC
Created attachment 56312 [details] [review]
glib: introspection fixes issues, don't expose PopplerAttachmentClass
Comment 2 Carlos Garcia Campos 2012-01-30 06:01:47 UTC
(In reply to comment #0)
> I noticed a few issues while working on the Vala bindings:
> 
> 1. Poppler.ActionLayer.layers is missing an element-type annotation
> 2. Poppler.ActionOCGState.state_list is missing an element-type annotation
> 3. PopplerAttachmentClass is exposed publicly when it probably shouldn't be
> 
> The first two are relatively straightforward; simply add the annotations. The
> third is a little more complicated. Removing the struct from the public headers
> is technically an API break, but it's quite unlikely that anyone is actually
> using the struct and it wasn't documented so IMHO it's okay to remove it.

You are right, but it's not enough reason to break the API.
Comment 3 Carlos Garcia Campos 2012-01-30 06:07:55 UTC
Comment on attachment 56312 [details] [review]
glib: introspection fixes issues, don't expose PopplerAttachmentClass

Review of attachment 56312 [details] [review]:
-----------------------------------------------------------------

Thanks for the patch.

::: glib/poppler-action.h
@@ +261,5 @@
>  };
>  
> +/**
> + * PopplerActionOCGState:
> + * @type: action type

We know the action type, so add it in parentheses:

@type: action type (%POPPLER_ACTION_OCG_STATE)

@@ +263,5 @@
> +/**
> + * PopplerActionOCGState:
> + * @type: action type
> + * @title: action title
> + * @state_list: (element-type PopplerActionLayer): list of #PopplerActionLayer<-- -->s

We should explain briefly what this action is for.

@@ +264,5 @@
> + * PopplerActionOCGState:
> + * @type: action type
> + * @title: action title
> + * @state_list: (element-type PopplerActionLayer): list of #PopplerActionLayer<-- -->s
> + */

All other action types are also undocumented, I guess it's a good time to document all of them :-P
Comment 4 Evan Nemerson 2013-02-14 12:04:41 UTC
Created attachment 74809 [details] [review]
glib: add documentation for PopplerActions

> ::: glib/poppler-action.h
> @@ +261,5 @@
> >  };
> >  
> > +/**
> > + * PopplerActionOCGState:
> > + * @type: action type
> 
> We know the action type, so add it in parentheses:
> 
> @type: action type (%POPPLER_ACTION_OCG_STATE)

Okay, done for all of them.

> @@ +263,5 @@
> > +/**
> > + * PopplerActionOCGState:
> > + * @type: action type
> > + * @title: action title
> > + * @state_list: (element-type PopplerActionLayer): list of #PopplerActionLayer<-- -->s
> 
> We should explain briefly what this action is for.

I honestly have no idea what this action is for.  Or any of them, really.  I'm not at all familiar with the Poppler API, just trying to get introspection up to snuff.

I've copied what could be called, if you're feeling generous, brief explanations from the PopplerActionType enum, but it would be nice if someone who knows the API could improve it.

> @@ +264,5 @@
> > + * PopplerActionOCGState:
> > + * @type: action type
> > + * @title: action title
> > + * @state_list: (element-type PopplerActionLayer): list of #PopplerActionLayer<-- -->s
> > + */
> 
> All other action types are also undocumented, I guess it's a good time to
> document all of them :-P

I've done what I can.  To be honest I haven't really added any insight, but it should look a little better than empty docs.
Comment 5 GitLab Migration User 2018-08-20 21:35:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/33.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.