GtkJentchina

API

The GtkJentchina API is very simple : only one method applyFilter. (Maybe later we will create an asynchrone version also ...)

libGtkJentchina.h

/*
 * libGtkJentchina.h
 * Part of the Birds Lake project
 * STRASSER Michel <michelNOSPAM.strasserNOSPAM@freeNOSPAM.frNOSPAM>
 * 20040414_1025        Initial Release
 * */

#ifndef __LIB_JENTCHINA_H__
#define __LIB_JENTCHINA_H__

#include <GtkJentchina/GtkJentchinaObj.h>

#endif

GtkJentchina/GtkJentchinaObj.h

/* GtkJentchina
 * STRASSER Michel - 20040410           init
 * */

#ifndef __GTK_JENTCHINA_OBJ_H__
#define __GTK_JENTCHINA_OBJ_H__

#include <glib.h>
#include <glib-object.h>
#include <lsmlib.h>

#define GTK_JENTCHINA_TYPE_OBJ                  (GtkJentchinaObj_getType ())
#define GTK_JENTCHINA_OBJ(object)               (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_JENTCHINA_TYPE_OBJ, GtkJentchinaObj))
#define GTK_JENTCHINA_OBJ_CLASS(object)         (G_TYPE_CHECK_CLASS_CAST ((object), GTK_JENTCHINA_TYPE_OBJ, GtkJentchinaObjClass))
#define GTK_JENTCHINA_IS_OBJ(object)            (G_TYPE_CHECK_INSTANCE_TYPE((object), \
                                                        GTK_JENTCHINA_TYPE_OBJ))
#define GTK_JENTCHINA_IS_OBJ_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE((klass), \
                                                        GTK_JENTCHINA_TYPE_OBJ))
#define GTK_JENTCHINA_OBJ_TYPE(object)            (G_TYPE_FROM_INSTANCE (object))
#define GTK_JENTCHINA_OBJ_TYPE_NAME(object)       (g_type_name (GTK_JENTCHINA_OBJ_TYPE (object)))


typedef enum {
        GtkJentchinaFilterType_IMPORT,
        GtkJentchinaFilterType_EXPORT,
        GtkJentchinaFilterType_NUM
} GtkJentchinaFilterType;

typedef enum {
        GtkJentchinaStatus_OK=0,
        GtkJentchinaStatus_INVALID_OBJECT,
        GtkJentchinaStatus_INVALID_FILTER_TYPE,
        GtkJentchinaStatus_INVALID_DOC,
        GtkJentchinaStatus_INVALID_OUT_DOC_POINTER,
        /* TODO */
        GtkJentchinaStatus_NUM
} GtkJentchinaStatus;

typedef struct _GtkJentchinaObj GtkJentchinaObj;
typedef struct _GtkJentchinaObjClass    GtkJentchinaObjClass;

struct _GtkJentchinaObj
{
        GObject         parent_instance;

        /* private */
        GObject*        gjnaObj;        /* GJnaObj */
};

struct _GtkJentchinaObjClass
{
        GObjectClass    parent_class;
};

G_BEGIN_DECLS

GType
GtkJentchinaObj_getType         (void);

GObject*
GtkJentchinaObj_new             (char* appName);

GtkJentchinaStatus
GtkJentchinaObj_applyFilter     (GtkJentchinaObj* self,
                                 GtkJentchinaFilterType filterType,
                                 LsmTree* in_input,
                                 LsmTree** out_output);

G_END_DECLS

#endif /* __GTK_JENTCHINA_OBJ_H__ */