summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/analysis/loaded.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/analysis/loaded.c')
-rw-r--r--plugins/pychrysalide/analysis/loaded.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/plugins/pychrysalide/analysis/loaded.c b/plugins/pychrysalide/analysis/loaded.c
index c8674a5..a2bf13f 100644
--- a/plugins/pychrysalide/analysis/loaded.c
+++ b/plugins/pychrysalide/analysis/loaded.c
@@ -66,6 +66,8 @@ static bool py_loaded_content_analyze_wrapper(GLoadedContent *, bool, bool, wgro
/* Fournit le désignation associée à l'élément chargé. */
static char *py_loaded_content_describe_wrapper(const GLoadedContent *, bool);
+#ifdef INCLUDE_GTK_SUPPORT
+
/* Détermine le nombre de vues disponibles pour un contenu. */
static unsigned int py_loaded_content_count_views_wrapper(const GLoadedContent *);
@@ -81,6 +83,8 @@ static GtkWidget *py_loaded_content_build_view_wrapper(GLoadedContent *, unsigne
/* Retrouve l'indice correspondant à la vue donnée d'un contenu. */
static unsigned int py_loaded_content_get_view_index_wrapper(GLoadedContent *, GtkWidget *);
+#endif
+
/* ------------------------- CONNEXION AVEC L'API DE PYTHON ------------------------- */
@@ -98,6 +102,8 @@ static PyObject *py_loaded_content_describe(PyObject *, PyObject *);
/* Etablit une liste d'obscurcissements présents. */
static PyObject *py_loaded_content_detect_obfuscators(PyObject *, PyObject *);
+#ifdef INCLUDE_GTK_SUPPORT
+
/* Détermine le nombre de vues disponibles pour un contenu. */
static PyObject *py_loaded_content_count_views(PyObject *, PyObject *);
@@ -110,6 +116,8 @@ static PyObject *py_loaded_content_build_default_view(PyObject *, PyObject *);
/* Met en place la vue initiale pour un contenu chargé. */
static PyObject *py_loaded_content_build_view(PyObject *, PyObject *);
+#endif
+
/* Fournit le contenu représenté de l'élément chargé. */
static PyObject *py_loaded_content_get_content(PyObject *, void *);
@@ -191,7 +199,7 @@ static PyObject *py_loaded_content_new(PyTypeObject *type, PyObject *args, PyObj
if (first_time)
{
- status = register_class_for_dynamic_pygobject(gtype, type, base);
+ status = register_class_for_dynamic_pygobject(gtype, type);
if (!status)
{
@@ -234,11 +242,13 @@ static void py_loaded_content_init_gclass(GLoadedContentClass *class, gpointer u
class->describe = py_loaded_content_describe_wrapper;
+#ifdef INCLUDE_GTK_SUPPORT
class->count_views = py_loaded_content_count_views_wrapper;
class->get_view_name = py_loaded_content_get_view_name_wrapper;
class->build_def_view = py_loaded_content_build_default_view_wrapper;
class->build_view = py_loaded_content_build_view_wrapper;
class->get_view_index = py_loaded_content_get_view_index_wrapper;
+#endif
}
@@ -538,6 +548,9 @@ static char *py_loaded_content_describe_wrapper(const GLoadedContent *content, b
}
+#ifdef INCLUDE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : content = contenu chargé à consulter. *
@@ -874,6 +887,9 @@ static unsigned int py_loaded_content_get_view_index_wrapper(GLoadedContent *con
}
+#endif
+
+
/* ---------------------------------------------------------------------------------- */
/* CONNEXION AVEC L'API DE PYTHON */
@@ -1107,6 +1123,9 @@ static PyObject *py_loaded_content_detect_obfuscators(PyObject *self, PyObject *
}
+#ifdef INCLUDE_GTK_SUPPORT
+
+
/******************************************************************************
* *
* Paramètres : self = contenu chargé à manipuler. *
@@ -1348,6 +1367,9 @@ static PyObject *py_loaded_content_get_view_index(PyObject *self, PyObject *args
}
+#endif
+
+
/******************************************************************************
* *
* Paramètres : self = objet Python concerné par l'appel. *
@@ -1487,20 +1509,24 @@ PyTypeObject *get_python_loaded_content_type(void)
LOADED_CONTENT_GET_CONTENT_CLASS_WRAPPER,
LOADED_CONTENT_ANALYZE_WRAPPER,
LOADED_CONTENT_DESCRIBE_WRAPPER,
+#ifdef INCLUDE_GTK_SUPPORT
LOADED_CONTENT_COUNT_VIEWS_WRAPPER,
LOADED_CONTENT_GET_VIEW_NAME_WRAPPER,
LOADED_CONTENT_BUILD_DEFAULT_VIEW_WRAPPER,
LOADED_CONTENT_BUILD_VIEW_WRAPPER,
LOADED_CONTENT_GET_VIEW_INDEX_WRAPPER,
+#endif
LOADED_CONTENT_ANALYZE_METHOD,
LOADED_CONTENT_ANALYZE_AND_WAIT_METHOD,
LOADED_CONTENT_DESCRIBE_METHOD,
LOADED_CONTENT_DETECT_OBFUSCATORS_METHOD,
+#ifdef INCLUDE_GTK_SUPPORT
LOADED_CONTENT_COUNT_VIEWS_METHOD,
LOADED_CONTENT_GET_VIEW_NAME_METHOD,
LOADED_CONTENT_BUILD_DEFAULT_VIEW_METHOD,
LOADED_CONTENT_BUILD_VIEW_METHOD,
LOADED_CONTENT_GET_VIEW_INDEX_METHOD,
+#endif
{ NULL }
};
@@ -1560,10 +1586,12 @@ bool ensure_python_loaded_content_is_registered(void)
dict = PyModule_GetDict(module);
+#ifdef INCLUDE_GTK_SUPPORT
if (!ensure_python_named_widget_is_registered())
return false;
+#endif
- if (!register_class_for_pygobject(dict, G_TYPE_LOADED_CONTENT, type, &PyGObject_Type))
+ if (!register_class_for_pygobject(dict, G_TYPE_LOADED_CONTENT, type))
return false;
}