/* Generated by Pyrex 0.9.3 on Wed May  3 11:53:20 2006 */

#include "Python.h"
#include "structmember.h"
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#include "MozillaBrowser.h"
#include "nsError.h"
#include "MozillaBrowserXPCOM.h"
#include "stdio.h"
#include "stdlib.h"


typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/
static PyObject *__Pyx_UnpackItem(PyObject *, int); /*proto*/
static int __Pyx_EndUnpack(PyObject *, int); /*proto*/
static int __Pyx_PrintItem(PyObject *); /*proto*/
static int __Pyx_PrintNewline(void); /*proto*/
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static void __Pyx_ReRaise(void); /*proto*/
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
static PyObject *__Pyx_GetExcValue(void); /*proto*/
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/
static void __Pyx_WriteUnraisable(char *name); /*proto*/
static void __Pyx_AddTraceback(char *funcname); /*proto*/
static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size);  /*proto*/
static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/
static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/
static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static PyObject *__pyx_m;
static PyObject *__pyx_b;
static int __pyx_lineno;
static char *__pyx_filename;
staticforward char **__pyx_f;

static char __pyx_mdoc[] = "MozillaBrowser extension.";

/* Declarations from MozillaBrowser */

staticforward PyTypeObject __pyx_type_14MozillaBrowser_MozillaBrowser;

struct __pyx_obj_14MozillaBrowser_MozillaBrowser {
  PyObject_HEAD
  struct __pyx_vtabstruct_14MozillaBrowser_MozillaBrowser *__pyx_vtab;
  GtkMozEmbed (*cWidget);
  PyObject *widget;
  PyObject *URICallBack;
  PyObject *finishedCallBack;
  PyObject *destroyCallBack;
  PyObject *contextMenuCallBack;
};

struct __pyx_vtabstruct_14MozillaBrowser_MozillaBrowser {
  GtkMozEmbed (*((*pygtkmozembed_to_c)(struct __pyx_obj_14MozillaBrowser_MozillaBrowser *,PyObject *)));
};
static struct __pyx_vtabstruct_14MozillaBrowser_MozillaBrowser *__pyx_vtabptr_14MozillaBrowser_MozillaBrowser;

static PyTypeObject *__pyx_ptype_14MozillaBrowser_MozillaBrowser = 0;
static gint (__pyx_f_14MozillaBrowser_open_uri_cb(GtkMozEmbed (*),char (*),PyObject (*))); /*proto*/
static gint (__pyx_f_14MozillaBrowser_on_dom_mouse_down(GtkMozEmbed (*),gpointer ,PyObject (*))); /*proto*/

/* Implementation of MozillaBrowser */


static PyObject *__pyx_n_gtkmozembed;
static PyObject *__pyx_n_DOMError;
static PyObject *__pyx_n_Exception;

static PyObject *__pyx_n_MozEmbed;

static int __pyx_f_14MozillaBrowser_14MozillaBrowser___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_14MozillaBrowser_14MozillaBrowser___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
  Py_INCREF(__pyx_v_self);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":57 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_gtkmozembed); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_MozEmbed); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;}
  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->widget);
  ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->widget = __pyx_3;
  __pyx_3 = 0;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":58 */
  ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->cWidget = ((struct __pyx_vtabstruct_14MozillaBrowser_MozillaBrowser *)((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->__pyx_vtab)->pygtkmozembed_to_c(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self),((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->widget);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.__new__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static char (__pyx_k3[]) = "open_uri";
static char (__pyx_k4[]) = "dom_mouse_down";

static int __pyx_f_14MozillaBrowser_14MozillaBrowser___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_14MozillaBrowser_14MozillaBrowser___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
  Py_INCREF(__pyx_v_self);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":61 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->URICallBack);
  ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->URICallBack = Py_None;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":62 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->finishedCallBack);
  ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->finishedCallBack = Py_None;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":63 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->destroyCallBack);
  ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->destroyCallBack = Py_None;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":64 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->contextMenuCallBack);
  ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->contextMenuCallBack = Py_None;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":65 */
  g_signal_connect(((gpointer (*))((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->cWidget),__pyx_k3,((void (*))__pyx_f_14MozillaBrowser_open_uri_cb),((gpointer )__pyx_v_self));

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":67 */
  g_signal_connect(((gpointer (*))((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->cWidget),__pyx_k4,((void (*))__pyx_f_14MozillaBrowser_on_dom_mouse_down),((gpointer )__pyx_v_self));

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_getWidget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_getWidget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":70 */
  Py_INCREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->widget);
  __pyx_r = ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->widget;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.getWidget");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_k5p;

static char (__pyx_k5[]) = "error in addItemBefore";

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_addItemBefore(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_addItemBefore(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_xml = 0;
  PyObject *__pyx_v_id = 0;
  PyObject *__pyx_v_result;
  PyObject *__pyx_r;
  char (*__pyx_1);
  char (*__pyx_2);
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  static char *__pyx_argnames[] = {"xml","id",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_xml, &__pyx_v_id)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_xml);
  Py_INCREF(__pyx_v_id);
  __pyx_v_result = Py_None; Py_INCREF(__pyx_v_result);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":73 */
  __pyx_1 = PyString_AsString(__pyx_v_xml); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; goto __pyx_L1;}
  __pyx_2 = PyString_AsString(__pyx_v_id); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; goto __pyx_L1;}
  __pyx_3 = PyInt_FromLong(addItemBefore(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->cWidget,__pyx_1,__pyx_2)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; goto __pyx_L1;}
  Py_DECREF(__pyx_v_result);
  __pyx_v_result = __pyx_3;
  __pyx_3 = 0;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":74 */
  __pyx_3 = PyInt_FromLong(NS_OK); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_result, __pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; goto __pyx_L1;}
  __pyx_4 = __pyx_4 != 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  if (__pyx_4) {

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":75 */
    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_DOMError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;}
    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;}
    Py_INCREF(__pyx_k5p);
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k5p);
    __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __Pyx_Raise(__pyx_6, 0, 0);
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.addItemBefore");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_result);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_xml);
  Py_DECREF(__pyx_v_id);
  return __pyx_r;
}

static PyObject *__pyx_k6p;

static char (__pyx_k6[]) = "error occured in addItemAtEnd";

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_addItemAtEnd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_addItemAtEnd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_xml = 0;
  PyObject *__pyx_v_id = 0;
  PyObject *__pyx_v_result;
  PyObject *__pyx_r;
  char (*__pyx_1);
  char (*__pyx_2);
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  static char *__pyx_argnames[] = {"xml","id",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_xml, &__pyx_v_id)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_xml);
  Py_INCREF(__pyx_v_id);
  __pyx_v_result = Py_None; Py_INCREF(__pyx_v_result);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":78 */
  __pyx_1 = PyString_AsString(__pyx_v_xml); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;}
  __pyx_2 = PyString_AsString(__pyx_v_id); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;}
  __pyx_3 = PyInt_FromLong(addItemAtEnd(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->cWidget,__pyx_1,__pyx_2)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; goto __pyx_L1;}
  Py_DECREF(__pyx_v_result);
  __pyx_v_result = __pyx_3;
  __pyx_3 = 0;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":79 */
  __pyx_3 = PyInt_FromLong(NS_OK); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_result, __pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; goto __pyx_L1;}
  __pyx_4 = __pyx_4 != 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  if (__pyx_4) {

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":80 */
    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_DOMError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;}
    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;}
    Py_INCREF(__pyx_k6p);
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k6p);
    __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __Pyx_Raise(__pyx_6, 0, 0);
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.addItemAtEnd");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_result);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_xml);
  Py_DECREF(__pyx_v_id);
  return __pyx_r;
}

static PyObject *__pyx_k7p;

static char (__pyx_k7[]) = "error occured in changeItem";

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_changeItem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_changeItem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_id = 0;
  PyObject *__pyx_v_xml = 0;
  PyObject *__pyx_v_result;
  PyObject *__pyx_r;
  char (*__pyx_1);
  char (*__pyx_2);
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  static char *__pyx_argnames[] = {"id","xml",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_id, &__pyx_v_xml)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_id);
  Py_INCREF(__pyx_v_xml);
  __pyx_v_result = Py_None; Py_INCREF(__pyx_v_result);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":83 */
  __pyx_1 = PyString_AsString(__pyx_v_id); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; goto __pyx_L1;}
  __pyx_2 = PyString_AsString(__pyx_v_xml); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; goto __pyx_L1;}
  __pyx_3 = PyInt_FromLong(changeItem(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->cWidget,__pyx_1,__pyx_2)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; goto __pyx_L1;}
  Py_DECREF(__pyx_v_result);
  __pyx_v_result = __pyx_3;
  __pyx_3 = 0;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":84 */
  __pyx_3 = PyInt_FromLong(NS_OK); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_result, __pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; goto __pyx_L1;}
  __pyx_4 = __pyx_4 != 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  if (__pyx_4) {

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":85 */
    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_DOMError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
    Py_INCREF(__pyx_k7p);
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_k7p);
    __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __Pyx_Raise(__pyx_6, 0, 0);
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.changeItem");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_result);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_id);
  Py_DECREF(__pyx_v_xml);
  return __pyx_r;
}

static PyObject *__pyx_k8p;

static char (__pyx_k8[]) = "error occured in removeItem";

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_removeItem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_removeItem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_id = 0;
  PyObject *__pyx_v_result;
  PyObject *__pyx_r;
  char (*__pyx_1);
  PyObject *__pyx_2 = 0;
  int __pyx_3;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  static char *__pyx_argnames[] = {"id",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_id)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_id);
  __pyx_v_result = Py_None; Py_INCREF(__pyx_v_result);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":88 */
  __pyx_1 = PyString_AsString(__pyx_v_id); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;}
  __pyx_2 = PyInt_FromLong(removeItem(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->cWidget,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; goto __pyx_L1;}
  Py_DECREF(__pyx_v_result);
  __pyx_v_result = __pyx_2;
  __pyx_2 = 0;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":89 */
  __pyx_2 = PyInt_FromLong(NS_OK); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_result, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; goto __pyx_L1;}
  __pyx_3 = __pyx_3 != 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__pyx_3) {

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":90 */
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_DOMError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
    Py_INCREF(__pyx_k8p);
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k8p);
    __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    __Pyx_Raise(__pyx_5, 0, 0);
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.removeItem");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_result);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_id);
  return __pyx_r;
}

static PyObject *__pyx_k9p;

static char (__pyx_k9[]) = "error occured in showItem";

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_showItem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_showItem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_id = 0;
  PyObject *__pyx_v_result;
  PyObject *__pyx_r;
  char (*__pyx_1);
  PyObject *__pyx_2 = 0;
  int __pyx_3;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  static char *__pyx_argnames[] = {"id",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_id)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_id);
  __pyx_v_result = Py_None; Py_INCREF(__pyx_v_result);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":93 */
  __pyx_1 = PyString_AsString(__pyx_v_id); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
  __pyx_2 = PyInt_FromLong(showItem(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->cWidget,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; goto __pyx_L1;}
  Py_DECREF(__pyx_v_result);
  __pyx_v_result = __pyx_2;
  __pyx_2 = 0;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":94 */
  __pyx_2 = PyInt_FromLong(NS_OK); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_result, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; goto __pyx_L1;}
  __pyx_3 = __pyx_3 != 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__pyx_3) {

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":95 */
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_DOMError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
    Py_INCREF(__pyx_k9p);
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k9p);
    __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    __Pyx_Raise(__pyx_5, 0, 0);
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.showItem");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_result);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_id);
  return __pyx_r;
}

static PyObject *__pyx_k10p;

static char (__pyx_k10[]) = "error occured in hideItem";

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_hideItem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_hideItem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_id = 0;
  PyObject *__pyx_v_result;
  PyObject *__pyx_r;
  char (*__pyx_1);
  PyObject *__pyx_2 = 0;
  int __pyx_3;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  static char *__pyx_argnames[] = {"id",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_id)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_id);
  __pyx_v_result = Py_None; Py_INCREF(__pyx_v_result);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":98 */
  __pyx_1 = PyString_AsString(__pyx_v_id); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;}
  __pyx_2 = PyInt_FromLong(hideItem(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->cWidget,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; goto __pyx_L1;}
  Py_DECREF(__pyx_v_result);
  __pyx_v_result = __pyx_2;
  __pyx_2 = 0;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":99 */
  __pyx_2 = PyInt_FromLong(NS_OK); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_result, __pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; goto __pyx_L1;}
  __pyx_3 = __pyx_3 != 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__pyx_3) {

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":100 */
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_DOMError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
    Py_INCREF(__pyx_k10p);
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k10p);
    __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    __Pyx_Raise(__pyx_5, 0, 0);
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.hideItem");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_result);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_id);
  return __pyx_r;
}

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_setURICallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_setURICallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_r;
  static char *__pyx_argnames[] = {"callback",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_callback)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_callback);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":103 */
  Py_INCREF(__pyx_v_callback);
  Py_DECREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->URICallBack);
  ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->URICallBack = __pyx_v_callback;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.setURICallBack");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_callback);
  return __pyx_r;
}

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_getURICallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_getURICallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":106 */
  Py_INCREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->URICallBack);
  __pyx_r = ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->URICallBack;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.getURICallBack");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_setFinishedCallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_setFinishedCallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_r;
  static char *__pyx_argnames[] = {"callback",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_callback)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_callback);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":109 */
  Py_INCREF(__pyx_v_callback);
  Py_DECREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->finishedCallBack);
  ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->finishedCallBack = __pyx_v_callback;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.setFinishedCallBack");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_callback);
  return __pyx_r;
}

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_getFinishedCallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_getFinishedCallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":112 */
  Py_INCREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->finishedCallBack);
  __pyx_r = ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->finishedCallBack;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.getFinishedCallBack");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_setDestroyCallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_setDestroyCallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_r;
  static char *__pyx_argnames[] = {"callback",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_callback)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_callback);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":115 */
  Py_INCREF(__pyx_v_callback);
  Py_DECREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->destroyCallBack);
  ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->destroyCallBack = __pyx_v_callback;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.setDestroyCallBack");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_callback);
  return __pyx_r;
}

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_getDestroyCallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_getDestroyCallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":118 */
  Py_INCREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->destroyCallBack);
  __pyx_r = ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->destroyCallBack;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.getDestroyCallBack");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_setContextMenuCallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_setContextMenuCallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_callback = 0;
  PyObject *__pyx_r;
  static char *__pyx_argnames[] = {"callback",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_callback)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_callback);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":121 */
  Py_INCREF(__pyx_v_callback);
  Py_DECREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->contextMenuCallBack);
  ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->contextMenuCallBack = __pyx_v_callback;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.setContextMenuCallBack");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_callback);
  return __pyx_r;
}

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_getContextMenuCallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_getContextMenuCallBack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":124 */
  Py_INCREF(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->contextMenuCallBack);
  __pyx_r = ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->contextMenuCallBack;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.getContextMenuCallBack");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static GtkMozEmbed (*__pyx_f_14MozillaBrowser_14MozillaBrowser_pygtkmozembed_to_c(struct __pyx_obj_14MozillaBrowser_MozillaBrowser *__pyx_v_self,PyObject *__pyx_v_pygtkmoz)) {
  PyGObject (*__pyx_v_tempObj);
  GObject (*__pyx_v_temp);
  GtkMozEmbed (*__pyx_r);
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_pygtkmoz);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":129 */
  __pyx_v_tempObj = ((PyGObject (*))__pyx_v_pygtkmoz);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":130 */
  __pyx_v_temp = __pyx_v_tempObj->obj;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":131 */
  __pyx_r = ((GtkMozEmbed (*))__pyx_v_temp);
  goto __pyx_L0;

  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_WriteUnraisable("MozillaBrowser.MozillaBrowser.pygtkmozembed_to_c");
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_pygtkmoz);
  return __pyx_r;
}

static PyObject *__pyx_n_getURICallBack;
static PyObject *__pyx_n_True;
static PyObject *__pyx_n_False;

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_openUriCallback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_openUriCallback(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_uri = 0;
  PyObject *__pyx_v_URICallBack;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  int __pyx_5;
  static char *__pyx_argnames[] = {"uri",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_uri)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_uri);
  __pyx_v_URICallBack = Py_None; Py_INCREF(__pyx_v_URICallBack);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":134 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_getURICallBack); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; goto __pyx_L1;}
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_v_URICallBack);
  __pyx_v_URICallBack = __pyx_3;
  __pyx_3 = 0;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":135 */
  __pyx_4 = __pyx_v_URICallBack != Py_None;
  if (__pyx_4) {
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L1;}
    Py_INCREF(__pyx_v_uri);
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_uri);
    __pyx_2 = PyObject_CallObject(__pyx_v_URICallBack, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_5 = PyObject_IsTrue(__pyx_2); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_4 = (!__pyx_5);
  }
  if (__pyx_4) {

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":136 */
    __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; goto __pyx_L1;}
    __pyx_r = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":138 */
    __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; goto __pyx_L1;}
    __pyx_r = __pyx_1;
    __pyx_1 = 0;
    goto __pyx_L0;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.openUriCallback");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_URICallBack);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_uri);
  return __pyx_r;
}

static PyObject *__pyx_n_replace;

static PyObject *__pyx_k11p;
static PyObject *__pyx_k12p;
static PyObject *__pyx_k13p;
static PyObject *__pyx_k14p;

static char (__pyx_k11[]) = "\\n";
static char (__pyx_k12[]) = "\n";
static char (__pyx_k13[]) = "\\\\";
static char (__pyx_k14[]) = "\\";

static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_createContextMenu(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_14MozillaBrowser_14MozillaBrowser_createContextMenu(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_menu = 0;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  static char *__pyx_argnames[] = {"menu",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_menu)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_menu);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":144 */
  __pyx_1 = ((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->contextMenuCallBack != Py_None;
  if (__pyx_1) {

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":145 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_menu, __pyx_n_replace); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; goto __pyx_L1;}
    Py_INCREF(__pyx_k11p);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k11p);
    Py_INCREF(__pyx_k12p);
    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_k12p);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_v_menu);
    __pyx_v_menu = __pyx_4;
    __pyx_4 = 0;

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":146 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_menu, __pyx_n_replace); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; goto __pyx_L1;}
    Py_INCREF(__pyx_k13p);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k13p);
    Py_INCREF(__pyx_k14p);
    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_k14p);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_v_menu);
    __pyx_v_menu = __pyx_4;
    __pyx_4 = 0;

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":147 */
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; goto __pyx_L1;}
    Py_INCREF(__pyx_v_menu);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_menu);
    __pyx_3 = PyObject_CallObject(((struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)__pyx_v_self)->contextMenuCallBack, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("MozillaBrowser.MozillaBrowser.createContextMenu");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_menu);
  return __pyx_r;
}

static char (__pyx_k15[]) = "openUriCallback";
static char (__pyx_k16[]) = "s";

static gint __pyx_f_14MozillaBrowser_open_uri_cb(GtkMozEmbed (*__pyx_v_embed),char (*__pyx_v_uri),PyObject (*__pyx_v_self)) {
  int __pyx_v_rv;
  PyGILState_STATE __pyx_v_gil;
  PyObject (*__pyx_v_callbackResult);
  gint __pyx_r;
  int __pyx_1;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":166 */
  __pyx_v_gil = PyGILState_Ensure();

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":167 */
  Py_INCREF(__pyx_v_self);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":168 */
  __pyx_v_callbackResult = PyObject_CallMethod(__pyx_v_self,__pyx_k15,__pyx_k16,__pyx_v_uri,0);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":170 */
  __pyx_1 = (__pyx_v_callbackResult == 0);
  if (__pyx_1) {

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":171 */
    PyErr_Print();

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":172 */
    __pyx_v_rv = 1;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":174 */
    __pyx_v_rv = PyObject_IsTrue(__pyx_v_callbackResult);

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":175 */
    Py_DECREF(__pyx_v_callbackResult);
  }
  __pyx_L2:;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":176 */
  Py_DECREF(__pyx_v_self);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":177 */
  PyGILState_Release(__pyx_v_gil);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":178 */
  __pyx_r = __pyx_v_rv;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_WriteUnraisable("MozillaBrowser.open_uri_cb");
  __pyx_L0:;
  return __pyx_r;
}

static char (__pyx_k17[]) = "createContextMenu";
static char (__pyx_k18[]) = "s";

static gint __pyx_f_14MozillaBrowser_on_dom_mouse_down(GtkMozEmbed (*__pyx_v_embed),gpointer __pyx_v_domEvent,PyObject (*__pyx_v_self)) {
  char (*__pyx_v_contextMenu);
  PyGILState_STATE __pyx_v_gil;
  PyObject (*__pyx_v_callbackResult);
  gint __pyx_r;
  int __pyx_1;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":186 */
  __pyx_v_contextMenu = getContextMenu(__pyx_v_domEvent);

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":187 */
  __pyx_1 = (__pyx_v_contextMenu != 0);
  if (__pyx_1) {

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":188 */
    __pyx_v_gil = PyGILState_Ensure();

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":189 */
    Py_INCREF(__pyx_v_self);

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":190 */
    __pyx_v_callbackResult = PyObject_CallMethod(__pyx_v_self,__pyx_k17,__pyx_k18,__pyx_v_contextMenu,0);

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":192 */
    free(__pyx_v_contextMenu);

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":193 */
    __pyx_1 = (__pyx_v_callbackResult == 0);
    if (__pyx_1) {

      /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":194 */
      PyErr_Print();
      goto __pyx_L3;
    }
    /*else*/ {

      /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":196 */
      Py_DECREF(__pyx_v_callbackResult);
    }
    __pyx_L3:;

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":197 */
    Py_DECREF(__pyx_v_self);

    /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":198 */
    PyGILState_Release(__pyx_v_gil);
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":199 */
  __pyx_r = 0;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  __Pyx_WriteUnraisable("MozillaBrowser.on_dom_mouse_down");
  __pyx_L0:;
  return __pyx_r;
}

static __Pyx_InternTabEntry __pyx_intern_tab[] = {
  {&__pyx_n_DOMError, "DOMError"},
  {&__pyx_n_Exception, "Exception"},
  {&__pyx_n_False, "False"},
  {&__pyx_n_MozEmbed, "MozEmbed"},
  {&__pyx_n_True, "True"},
  {&__pyx_n_getURICallBack, "getURICallBack"},
  {&__pyx_n_gtkmozembed, "gtkmozembed"},
  {&__pyx_n_replace, "replace"},
  {0, 0}
};

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_k5p, __pyx_k5, sizeof(__pyx_k5)},
  {&__pyx_k6p, __pyx_k6, sizeof(__pyx_k6)},
  {&__pyx_k7p, __pyx_k7, sizeof(__pyx_k7)},
  {&__pyx_k8p, __pyx_k8, sizeof(__pyx_k8)},
  {&__pyx_k9p, __pyx_k9, sizeof(__pyx_k9)},
  {&__pyx_k10p, __pyx_k10, sizeof(__pyx_k10)},
  {&__pyx_k11p, __pyx_k11, sizeof(__pyx_k11)},
  {&__pyx_k12p, __pyx_k12, sizeof(__pyx_k12)},
  {&__pyx_k13p, __pyx_k13, sizeof(__pyx_k13)},
  {&__pyx_k14p, __pyx_k14, sizeof(__pyx_k14)},
  {0, 0, 0}
};
static struct __pyx_vtabstruct_14MozillaBrowser_MozillaBrowser __pyx_vtable_14MozillaBrowser_MozillaBrowser;

static PyObject *__pyx_tp_new_14MozillaBrowser_MozillaBrowser(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  struct __pyx_obj_14MozillaBrowser_MozillaBrowser *p = (struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)o;
  p->__pyx_vtab = (struct __pyx_vtabstruct_14MozillaBrowser_MozillaBrowser *)__pyx_vtabptr_14MozillaBrowser_MozillaBrowser;
  p->widget = Py_None; Py_INCREF(p->widget);
  p->URICallBack = Py_None; Py_INCREF(p->URICallBack);
  p->finishedCallBack = Py_None; Py_INCREF(p->finishedCallBack);
  p->destroyCallBack = Py_None; Py_INCREF(p->destroyCallBack);
  p->contextMenuCallBack = Py_None; Py_INCREF(p->contextMenuCallBack);
  if (__pyx_f_14MozillaBrowser_14MozillaBrowser___new__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_14MozillaBrowser_MozillaBrowser(PyObject *o) {
  struct __pyx_obj_14MozillaBrowser_MozillaBrowser *p = (struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)o;
  Py_XDECREF(p->widget);
  Py_XDECREF(p->URICallBack);
  Py_XDECREF(p->finishedCallBack);
  Py_XDECREF(p->destroyCallBack);
  Py_XDECREF(p->contextMenuCallBack);
  (*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_14MozillaBrowser_MozillaBrowser(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_14MozillaBrowser_MozillaBrowser *p = (struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)o;
  if (p->widget) {
    e = (*v)(p->widget, a); if (e) return e;
  }
  if (p->URICallBack) {
    e = (*v)(p->URICallBack, a); if (e) return e;
  }
  if (p->finishedCallBack) {
    e = (*v)(p->finishedCallBack, a); if (e) return e;
  }
  if (p->destroyCallBack) {
    e = (*v)(p->destroyCallBack, a); if (e) return e;
  }
  if (p->contextMenuCallBack) {
    e = (*v)(p->contextMenuCallBack, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_14MozillaBrowser_MozillaBrowser(PyObject *o) {
  struct __pyx_obj_14MozillaBrowser_MozillaBrowser *p = (struct __pyx_obj_14MozillaBrowser_MozillaBrowser *)o;
  Py_XDECREF(p->widget);
  p->widget = Py_None; Py_INCREF(p->widget);
  Py_XDECREF(p->URICallBack);
  p->URICallBack = Py_None; Py_INCREF(p->URICallBack);
  Py_XDECREF(p->finishedCallBack);
  p->finishedCallBack = Py_None; Py_INCREF(p->finishedCallBack);
  Py_XDECREF(p->destroyCallBack);
  p->destroyCallBack = Py_None; Py_INCREF(p->destroyCallBack);
  Py_XDECREF(p->contextMenuCallBack);
  p->contextMenuCallBack = Py_None; Py_INCREF(p->contextMenuCallBack);
  return 0;
}

static struct PyMethodDef __pyx_methods_14MozillaBrowser_MozillaBrowser[] = {
  {"getWidget", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_getWidget, METH_VARARGS|METH_KEYWORDS, 0},
  {"addItemBefore", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_addItemBefore, METH_VARARGS|METH_KEYWORDS, 0},
  {"addItemAtEnd", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_addItemAtEnd, METH_VARARGS|METH_KEYWORDS, 0},
  {"changeItem", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_changeItem, METH_VARARGS|METH_KEYWORDS, 0},
  {"removeItem", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_removeItem, METH_VARARGS|METH_KEYWORDS, 0},
  {"showItem", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_showItem, METH_VARARGS|METH_KEYWORDS, 0},
  {"hideItem", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_hideItem, METH_VARARGS|METH_KEYWORDS, 0},
  {"setURICallBack", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_setURICallBack, METH_VARARGS|METH_KEYWORDS, 0},
  {"getURICallBack", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_getURICallBack, METH_VARARGS|METH_KEYWORDS, 0},
  {"setFinishedCallBack", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_setFinishedCallBack, METH_VARARGS|METH_KEYWORDS, 0},
  {"getFinishedCallBack", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_getFinishedCallBack, METH_VARARGS|METH_KEYWORDS, 0},
  {"setDestroyCallBack", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_setDestroyCallBack, METH_VARARGS|METH_KEYWORDS, 0},
  {"getDestroyCallBack", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_getDestroyCallBack, METH_VARARGS|METH_KEYWORDS, 0},
  {"setContextMenuCallBack", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_setContextMenuCallBack, METH_VARARGS|METH_KEYWORDS, 0},
  {"getContextMenuCallBack", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_getContextMenuCallBack, METH_VARARGS|METH_KEYWORDS, 0},
  {"openUriCallback", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_openUriCallback, METH_VARARGS|METH_KEYWORDS, 0},
  {"createContextMenu", (PyCFunction)__pyx_f_14MozillaBrowser_14MozillaBrowser_createContextMenu, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_MozillaBrowser = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_divide*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_coerce*/
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  0, /*nb_oct*/
  0, /*nb_hex*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_divide*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
};

static PySequenceMethods __pyx_tp_as_sequence_MozillaBrowser = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_MozillaBrowser = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_MozillaBrowser = {
  0, /*bf_getreadbuffer*/
  0, /*bf_getwritebuffer*/
  0, /*bf_getsegcount*/
  0, /*bf_getcharbuffer*/
};

statichere PyTypeObject __pyx_type_14MozillaBrowser_MozillaBrowser = {
  PyObject_HEAD_INIT(0)
  0, /*ob_size*/
  "MozillaBrowser.MozillaBrowser", /*tp_name*/
  sizeof(struct __pyx_obj_14MozillaBrowser_MozillaBrowser), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_14MozillaBrowser_MozillaBrowser, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_MozillaBrowser, /*tp_as_number*/
  &__pyx_tp_as_sequence_MozillaBrowser, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_MozillaBrowser, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_MozillaBrowser, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_14MozillaBrowser_MozillaBrowser, /*tp_traverse*/
  __pyx_tp_clear_14MozillaBrowser_MozillaBrowser, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_14MozillaBrowser_MozillaBrowser, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_f_14MozillaBrowser_14MozillaBrowser___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_14MozillaBrowser_MozillaBrowser, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};

static struct PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

DL_EXPORT(void) initMozillaBrowser(void); /*proto*/
DL_EXPORT(void) initMozillaBrowser(void) {
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  __pyx_m = Py_InitModule4("MozillaBrowser", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION);
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  __pyx_b = PyImport_AddModule("__builtin__");
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  __pyx_vtabptr_14MozillaBrowser_MozillaBrowser = &__pyx_vtable_14MozillaBrowser_MozillaBrowser;
  __pyx_vtable_14MozillaBrowser_MozillaBrowser.pygtkmozembed_to_c = (void *)__pyx_f_14MozillaBrowser_14MozillaBrowser_pygtkmozembed_to_c;
  __pyx_type_14MozillaBrowser_MozillaBrowser.tp_free = _PyObject_GC_Del;
  if (PyType_Ready(&__pyx_type_14MozillaBrowser_MozillaBrowser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;}
  if (__Pyx_SetVtable(__pyx_type_14MozillaBrowser_MozillaBrowser.tp_dict, __pyx_vtabptr_14MozillaBrowser_MozillaBrowser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "MozillaBrowser", (PyObject *)&__pyx_type_14MozillaBrowser_MozillaBrowser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; goto __pyx_L1;}
  __pyx_ptype_14MozillaBrowser_MozillaBrowser = &__pyx_type_14MozillaBrowser_MozillaBrowser;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":3 */
  __pyx_1 = __Pyx_Import(__pyx_n_gtkmozembed, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_gtkmozembed, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":48 */
  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; goto __pyx_L1;}
  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
  __pyx_2 = 0;
  __pyx_2 = __Pyx_CreateClass(__pyx_3, __pyx_1, __pyx_n_DOMError, "MozillaBrowser"); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":49 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_DOMError, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/owen/compress/roller/Democracy-Player-0.8.2/platform/gtk-x11/frontend_implementation/MozillaBrowser.pyx":180 */
  return;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("MozillaBrowser");
}

static char *__pyx_filenames[] = {
  "MozillaBrowser.pyx",
};
statichere char **__pyx_f = __pyx_filenames;

/* Runtime support code */

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
    PyObject *__import__ = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    __import__ = PyObject_GetAttrString(__pyx_b, "__import__");
    if (!__import__)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    module = PyObject_CallFunction(__import__, "OOOO",
        name, global_dict, empty_dict, list);
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(__import__);
    Py_XDECREF(empty_dict);
    return module;
}

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result)
        PyErr_SetObject(PyExc_NameError, name);
    return result;
}

static PyObject *__Pyx_CreateClass(
    PyObject *bases, PyObject *dict, PyObject *name, char *modname)
{
    PyObject *py_modname;
    PyObject *result = 0;
    
    py_modname = PyString_FromString(modname);
    if (!py_modname)
        goto bad;
    if (PyDict_SetItemString(dict, "__module__", py_modname) < 0)
        goto bad;
    result = PyClass_New(bases, dict, name);
bad:
    Py_XDECREF(py_modname);
    return result;
}

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    /* Next, repeatedly, replace a tuple exception with its first item */
    while (PyTuple_Check(type) && PyTuple_Size(type) > 0) {
        PyObject *tmp = type;
        type = PyTuple_GET_ITEM(type, 0);
        Py_INCREF(type);
        Py_DECREF(tmp);
    }
    if (PyString_Check(type))
        ;
    else if (PyClass_Check(type))
        ; /*PyErr_NormalizeException(&type, &value, &tb);*/
    else if (PyInstance_Check(type)) {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
              "instance exception may not have a separate value");
            goto raise_error;
        }
        else {
            /* Normalize to raise <class>, <instance> */
            Py_DECREF(value);
            value = type;
            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
            Py_INCREF(type);
        }
    }
    else {
        /* Not something you can raise.  You get an exception
           anyway, just not what you specified :-) */
        PyErr_Format(PyExc_TypeError,
                 "exceptions must be strings, classes, or "
                 "instances, not %s", type->ob_type->tp_name);
        goto raise_error;
    }
    PyErr_Restore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}

static void __Pyx_WriteUnraisable(char *name) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    PyErr_Fetch(&old_exc, &old_val, &old_tb);
    ctx = PyString_FromString(name);
    PyErr_Restore(old_exc, old_val, old_tb);
    if (!ctx)
        ctx = Py_None;
    PyErr_WriteUnraisable(ctx);
}

static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
    while (t->p) {
        *t->p = PyString_InternFromString(t->s);
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
    PyObject *pycobj = 0;
    int result;
    
    pycobj = PyCObject_FromVoidPtr(vtable, 0);
    if (!pycobj)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", pycobj) < 0)
        goto bad;
    result = 0;
    goto done;

bad:
    result = -1;
done:
    Py_XDECREF(pycobj);
    return result;
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(char *funcname) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyObject *empty_tuple = 0;
    PyObject *empty_string = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    
    py_srcfile = PyString_FromString(__pyx_filename);
    if (!py_srcfile) goto bad;
    py_funcname = PyString_FromString(funcname);
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    empty_tuple = PyTuple_New(0);
    if (!empty_tuple) goto bad;
    empty_string = PyString_FromString("");
    if (!empty_string) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        empty_string, /*PyObject *code,*/
        empty_tuple,  /*PyObject *consts,*/
        empty_tuple,  /*PyObject *names,*/
        empty_tuple,  /*PyObject *varnames,*/
        empty_tuple,  /*PyObject *freevars,*/
        empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        empty_string  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_Get(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(empty_tuple);
    Py_XDECREF(empty_string);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
