diff -crB pypoppler-0.10.0/poppler.defs pypoppler-0.10.0_mod/poppler.defs *** pypoppler-0.10.0/poppler.defs Fri Oct 31 19:10:36 2008 --- pypoppler-0.10.0_mod/poppler.defs Sun Mar 29 19:38:12 2009 *************** *** 560,573 **** ) ) - - ;; From poppler-action.h ! (define-function poppler_action_get_type (c-name "poppler_action_get_type") (return-type "GType") ) (define-method free (of-object "PopplerAction") --- 560,619 ---- ) ) ;; From poppler-action.h ! (define-function get_type (c-name "poppler_action_get_type") (return-type "GType") + ) + + (define-method get_action_type + (of-object "PopplerAction") + (c-name "poppler_action_get_action_type") + (return-type "PopplerActionType") + ) + + (define-method get_title + (of-object "PopplerAction") + (c-name "poppler_action_get_title") + (return-type "uchar*") + ) + + (define-method get_uri + (of-object "PopplerAction") + (c-name "poppler_action_get_uri") + (return-type "uchar*") + ) + + (define-method get_dest + (of-object "PopplerAction") + (c-name "poppler_action_get_dest") + (return-type "PopplerDest *") + ) + + (define-method get_named_dest + (of-object "PopplerAction") + (c-name "poppler_action_get_named_dest") + (return-type "uchar*") + ) + + (define-method get_file_name + (of-object "PopplerAction") + (c-name "poppler_action_get_file_name") + (return-type "uchar*") ) + + (define-method get_params + (of-object "PopplerAction") + (c-name "poppler_action_get_params") + (return-type "uchar*") + ) + + (define-method get_dest + (of-object "PopplerAction") + (c-name "poppler_action_get_dest") + (return-type "PopplerDest *") + ) (define-method free (of-object "PopplerAction") Only in pypoppler-0.10.0_mod: poppler.defs~ diff -crB pypoppler-0.10.0/poppler.override pypoppler-0.10.0_mod/poppler.override *** pypoppler-0.10.0/poppler.override Fri Oct 31 19:09:24 2008 --- pypoppler-0.10.0_mod/poppler.override Sun Mar 29 19:40:59 2009 *************** *** 343,345 **** --- 343,464 ---- pyg_boxed_get(self, PopplerColor)->blue = val; return 0; } + %% + override poppler_action_get_action_type noargs + static PyObject * + _wrap_poppler_action_get_action_type(PyObject *self) + { + PyObject * ret; + PopplerActionAny* action; + + action = pyg_boxed_get(self, PopplerActionAny); + + ret = pyg_enum_from_gtype(POPPLER_TYPE_ACTION_TYPE, action->type); + + return ret; + } + %% + override poppler_action_get_title noargs + static PyObject * + _wrap_poppler_action_get_title(PyObject *self) + { + PopplerActionAny* action; + + action = pyg_boxed_get(self, PopplerActionAny); + + return Py_BuildValue("s", action->title); + } + %% + override poppler_action_get_uri noargs + static PyObject * + _wrap_poppler_action_get_uri(PyObject *self) + { + PopplerActionAny* action; + + action = pyg_boxed_get(self, PopplerActionAny); + + if (action->type == POPPLER_ACTION_URI) + { + return Py_BuildValue("s", ((PopplerActionUri*)action)->uri); + } + + return Py_BuildValue(""); + } + %% + override poppler_action_get_dest noargs + static PyObject * + _wrap_poppler_action_get_dest(PyObject *self) + { + PopplerActionAny* action; + PopplerDest *dest; + + action = pyg_boxed_get(self, PopplerActionAny); + + switch (action->type) + { + case POPPLER_ACTION_GOTO_DEST: + dest = ((PopplerActionGotoDest*)action)->dest; + break; + case POPPLER_ACTION_GOTO_REMOTE: + dest = ((PopplerActionGotoRemote*)action)->dest; + break; + default: + dest = NULL; + } + + if (dest) + { + return pyg_boxed_new (POPPLER_TYPE_DEST, dest, + TRUE, TRUE); + } + + return Py_BuildValue(""); + } + %% + override poppler_action_get_named_dest noargs + static PyObject * + _wrap_poppler_action_get_named_dest(PyObject *self) + { + PopplerActionAny* action; + + action = pyg_boxed_get(self, PopplerActionAny); + + if (action->type == POPPLER_ACTION_NAMED) + { + return Py_BuildValue("s", ((PopplerActionNamed*)action)->named_dest); + } + + return Py_BuildValue(""); + } + %% + override poppler_action_get_file_name noargs + static PyObject * + _wrap_poppler_action_get_file_name(PyObject *self) + { + PopplerActionAny* action; + + action = pyg_boxed_get(self, PopplerActionAny); + + if (action->type == POPPLER_ACTION_LAUNCH) + { + return Py_BuildValue("s", ((PopplerActionLaunch*)action)->file_name); + } + + return Py_BuildValue(""); + } + %% + override poppler_action_get_params noargs + static PyObject * + _wrap_poppler_action_get_params(PyObject *self) + { + PopplerActionAny* action; + + action = pyg_boxed_get(self, PopplerActionAny); + + if (action->type == POPPLER_ACTION_LAUNCH) + { + return Py_BuildValue("s", ((PopplerActionLaunch*)action)->params); + } + + return Py_BuildValue(""); + } Only in pypoppler-0.10.0_mod: poppler.override~