summaryrefslogtreecommitdiff
path: root/plugins/pychrysa/gtkext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-11-11 21:22:38 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-11-11 21:22:38 (GMT)
commitdb934f20598340772f8c0256c8a8119790a1821e (patch)
treed03e57cc5fc953fc3e7653da74a8c58fd310de5d /plugins/pychrysa/gtkext
parent2df715e74d6600ed0a5688a43f6ecd873957326a (diff)
Prepared the new organization of display widgets.
Diffstat (limited to 'plugins/pychrysa/gtkext')
-rw-r--r--plugins/pychrysa/gtkext/Makefile.am2
-rw-r--r--plugins/pychrysa/gtkext/bufferview.c4
-rw-r--r--plugins/pychrysa/gtkext/displaypanel.c (renamed from plugins/pychrysa/gtkext/viewpanel.c)62
-rw-r--r--plugins/pychrysa/gtkext/displaypanel.h (renamed from plugins/pychrysa/gtkext/viewpanel.h)14
-rw-r--r--plugins/pychrysa/gtkext/module.c4
5 files changed, 43 insertions, 43 deletions
diff --git a/plugins/pychrysa/gtkext/Makefile.am b/plugins/pychrysa/gtkext/Makefile.am
index 958f000..e7303e8 100644
--- a/plugins/pychrysa/gtkext/Makefile.am
+++ b/plugins/pychrysa/gtkext/Makefile.am
@@ -4,7 +4,7 @@ noinst_LTLIBRARIES = libpychrysagtkext.la
libpychrysagtkext_la_SOURCES = \
blockview.h blockview.c \
bufferview.h bufferview.c \
- viewpanel.h viewpanel.c \
+ displaypanel.h displaypanel.c \
module.h module.c
diff --git a/plugins/pychrysa/gtkext/bufferview.c b/plugins/pychrysa/gtkext/bufferview.c
index 93be7df..3be54fd 100644
--- a/plugins/pychrysa/gtkext/bufferview.c
+++ b/plugins/pychrysa/gtkext/bufferview.c
@@ -31,7 +31,7 @@
#include <gtkext/gtkbufferview.h>
-#include "viewpanel.h"
+#include "displaypanel.h"
#include "../helpers.h"
@@ -100,7 +100,7 @@ bool register_python_buffer_view(PyObject *module)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, GTK_TYPE_BUFFER_VIEW, py_buffer_view_type, get_python_view_panel_type()))
+ if (!register_class_for_pygobject(dict, GTK_TYPE_BUFFER_VIEW, py_buffer_view_type, get_python_display_panel_type()))
return false;
return true;
diff --git a/plugins/pychrysa/gtkext/viewpanel.c b/plugins/pychrysa/gtkext/displaypanel.c
index b7c6062..598d9b5 100644
--- a/plugins/pychrysa/gtkext/viewpanel.c
+++ b/plugins/pychrysa/gtkext/displaypanel.c
@@ -1,6 +1,6 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
- * viewpanel.c - prototypes pour l'équivalent Python du fichier "gtkext/gtkviewpanel.c"
+ * displaypanel.c - prototypes pour l'équivalent Python du fichier "gtkext/gtkdisplaypanel.c"
*
* Copyright (C) 2012 Cyrille Bagard
*
@@ -22,13 +22,13 @@
*/
-#include "viewpanel.h"
+#include "displaypanel.h"
#include <pygobject.h>
-#include <gtkext/gtkviewpanel.h>
+#include <gtkext/gtkdisplaypanel.h>
#include "../helpers.h"
@@ -36,16 +36,16 @@
-/* Crée un nouvel objet Python de type 'ViewPanel'. */
+/* Crée un nouvel objet Python de type 'DisplayPanel'. */
#if 0
-static PyObject *py_view_panel_new(PyTypeObject *, PyObject *, PyObject *);
+static PyObject *py_display_panel_new(PyTypeObject *, PyObject *, PyObject *);
#endif
/* S'assure qu'une adresse donnée est visible à l'écran. */
-static PyObject *py_view_panel_scroll_to_address(PyObject *, PyObject *);
+static PyObject *py_display_panel_scroll_to_address(PyObject *, PyObject *);
/* Définit les constantes pour les panneaux de vue. */
-static bool py_view_panel_define_constants(PyTypeObject *);
+static bool py_display_panel_define_constants(PyTypeObject *);
@@ -55,7 +55,7 @@ static bool py_view_panel_define_constants(PyTypeObject *);
* args = arguments fournis à l'appel. *
* kwds = arguments de type key=val fournis. *
* *
-* Description : Crée un nouvel objet Python de type 'ViewPanel'. *
+* Description : Crée un nouvel objet Python de type 'DisplayPanel'. *
* *
* Retour : Instance Python mise en place. *
* *
@@ -63,7 +63,7 @@ static bool py_view_panel_define_constants(PyTypeObject *);
* *
******************************************************************************/
#if 0
-static PyObject *py_view_panel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+static PyObject *py_display_panel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
#if 0
PyObject *result; /* Instance à retourner */
@@ -80,7 +80,7 @@ static PyObject *py_view_panel_new(PyTypeObject *type, PyObject *args, PyObject
item = g_view_panel_new(get_internal_ref(), name, lname,
GTK_WIDGET(pygobject_get(widget)), path);
- result = py_view_panel_from_c(G_VIEW_PANEL(item));
+ result = py_display_panel_from_c(G_DISPLAY_PANEL(item));
g_object_unref(item);
return (PyObject *)result;
@@ -108,9 +108,9 @@ static PyObject *py_view_panel_new(PyTypeObject *type, PyObject *args, PyObject
* *
******************************************************************************/
-static PyObject *py_view_panel_scroll_to_address(PyObject *self, PyObject *args)
+static PyObject *py_display_panel_scroll_to_address(PyObject *self, PyObject *args)
{
- GtkViewPanel *panel; /* Panneau à manipuler */
+ GtkDisplayPanel *panel; /* Panneau à manipuler */
PyObject *py_vmpa; /* Localisation version Python */
int ret; /* Bilan de lecture des args. */
vmpa2t *addr; /* Adresse visée par l'opérat° */
@@ -124,10 +124,10 @@ static PyObject *py_view_panel_scroll_to_address(PyObject *self, PyObject *args)
addr = get_internal_vmpa(py_vmpa);
if (addr == NULL) return NULL;
- panel = GTK_VIEW_PANEL(pygobject_get(self));
+ panel = GTK_DISPLAY_PANEL(pygobject_get(self));
// FIXME
- //gtk_view_panel_scroll_to_address(panel, addr, SPT_RAW);
+ //gtk_display_panel_scroll_to_address(panel, addr, SPT_RAW);
Py_RETURN_NONE;
@@ -146,7 +146,7 @@ static PyObject *py_view_panel_scroll_to_address(PyObject *self, PyObject *args)
* *
******************************************************************************/
-static bool py_view_panel_define_constants(PyTypeObject *obj_type)
+static bool py_display_panel_define_constants(PyTypeObject *obj_type)
{
bool result; /* Bilan à retourner */
@@ -174,40 +174,40 @@ static bool py_view_panel_define_constants(PyTypeObject *obj_type)
* *
******************************************************************************/
-PyTypeObject *get_python_view_panel_type(void)
+PyTypeObject *get_python_display_panel_type(void)
{
- static PyMethodDef py_view_panel_methods[] = {
+ static PyMethodDef py_display_panel_methods[] = {
{
- "scroll_to_address", (PyCFunction)py_view_panel_scroll_to_address,
+ "scroll_to_address", (PyCFunction)py_display_panel_scroll_to_address,
METH_VARARGS,
"scroll_to_address($self, addr, tweak, /)\n--\n\nEnsure a given address is displayed in the view panel."
},
{ NULL }
};
- static PyGetSetDef py_view_panel_getseters[] = {
+ static PyGetSetDef py_display_panel_getseters[] = {
{ NULL }
};
- static PyTypeObject py_view_panel_type = {
+ static PyTypeObject py_display_panel_type = {
PyVarObject_HEAD_INIT(NULL, 0)
- .tp_name = "pychrysalide.gtkext.ViewPanel",
+ .tp_name = "pychrysalide.gtkext.DisplayPanel",
.tp_basicsize = sizeof(PyGObject),
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.tp_doc = "PyChrysalide view panel.",
- .tp_methods = py_view_panel_methods,
- .tp_getset = py_view_panel_getseters,
- //.tp_new = (newfunc)py_view_panel_new,
+ .tp_methods = py_display_panel_methods,
+ .tp_getset = py_display_panel_getseters,
+ //.tp_new = (newfunc)py_display_panel_new,
//.tp_init = (initproc)pychrysalide_allow_args_for_gobjects
};
- return &py_view_panel_type;
+ return &py_display_panel_type;
}
@@ -216,7 +216,7 @@ PyTypeObject *get_python_view_panel_type(void)
* *
* Paramètres : module = module dont la définition est à compléter. *
* *
-* Description : Prend en charge l'objet 'pychrysalide.gtkext.ViewPanel'. *
+* Description : Prend en charge l'objet 'pychrysalide.gtkext.DisplayPanel'. *
* *
* Retour : Bilan de l'opération. *
* *
@@ -224,14 +224,14 @@ PyTypeObject *get_python_view_panel_type(void)
* *
******************************************************************************/
-bool register_python_view_panel(PyObject *module)
+bool register_python_display_panel(PyObject *module)
{
- PyTypeObject *py_view_panel_type; /* Type Python 'ViewPanel' */
+ PyTypeObject *py_display_panel_type; /* Type Python 'DisplayPanel' */
PyObject *parent_mod; /* Module Python Fixed */
PyObject *fixed; /* Module "GtkFixed" */
PyObject *dict; /* Dictionnaire du module */
- py_view_panel_type = get_python_view_panel_type();
+ py_display_panel_type = get_python_display_panel_type();
parent_mod = PyImport_ImportModule("gi.repository.Gtk");
if (parent_mod == NULL) return false;
@@ -241,10 +241,10 @@ bool register_python_view_panel(PyObject *module)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, GTK_TYPE_VIEW_PANEL, py_view_panel_type, (PyTypeObject *)fixed))
+ if (!register_class_for_pygobject(dict, GTK_TYPE_DISPLAY_PANEL, py_display_panel_type, (PyTypeObject *)fixed))
return false;
- if (!py_view_panel_define_constants(py_view_panel_type))
+ if (!py_display_panel_define_constants(py_display_panel_type))
return false;
return true;
diff --git a/plugins/pychrysa/gtkext/viewpanel.h b/plugins/pychrysa/gtkext/displaypanel.h
index 5999ad7..648570c 100644
--- a/plugins/pychrysa/gtkext/viewpanel.h
+++ b/plugins/pychrysa/gtkext/displaypanel.h
@@ -1,6 +1,6 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
- * viewpanel.h - prototypes pour l'équivalent Python du fichier "gtkext/gtkviewpanel.h"
+ * displaypanel.h - prototypes pour l'équivalent Python du fichier "gtkext/gtkdisplaypanel.h"
*
* Copyright (C) 2012 Cyrille Bagard
*
@@ -22,8 +22,8 @@
*/
-#ifndef _PLUGINS_PYCHRYSA_GTKEXT_VIEWPANEL_H
-#define _PLUGINS_PYCHRYSA_GTKEXT_VIEWPANEL_H
+#ifndef _PLUGINS_PYCHRYSA_GTKEXT_DISPLAYPANEL_H
+#define _PLUGINS_PYCHRYSA_GTKEXT_DISPLAYPANEL_H
#include <Python.h>
@@ -32,11 +32,11 @@
/* Fournit un accès à une définition de type à diffuser. */
-PyTypeObject *get_python_view_panel_type(void);
+PyTypeObject *get_python_display_panel_type(void);
-/* Prend en charge l'objet 'pychrysalide.gtkext.ViewPanel'. */
-bool register_python_view_panel(PyObject *module);
+/* Prend en charge l'objet 'pychrysalide.gtkext.DisplayPanel'. */
+bool register_python_display_panel(PyObject *module);
-#endif /* _PLUGINS_PYCHRYSA_GTKEXT_VIEWPANEL_H */
+#endif /* _PLUGINS_PYCHRYSA_GTKEXT_DISPLAYPANEL_H */
diff --git a/plugins/pychrysa/gtkext/module.c b/plugins/pychrysa/gtkext/module.c
index 056941d..2230ed0 100644
--- a/plugins/pychrysa/gtkext/module.c
+++ b/plugins/pychrysa/gtkext/module.c
@@ -30,7 +30,7 @@
#include "blockview.h"
#include "bufferview.h"
-#include "viewpanel.h"
+#include "displaypanel.h"
@@ -80,7 +80,7 @@ bool add_gtkext_module_to_python_module(PyObject *super)
result = true;
- result &= register_python_view_panel(module);
+ result &= register_python_display_panel(module);
result &= register_python_buffer_view(module);
result &= register_python_block_view(module);