jarl van katwijk wrote: > > (Please first do a 'lpr messaging_mobject_structs.h' and have a look at the > srtuctures...) I'll save everyone else the trouble and attach the file. Jeff -------------- next part -------------- /* * Messaging Object * this is the structure in which data resides inside the * messaging system, NO other structure will be used * * begin : 19-6-1999, BastardAI * 8-7-1999, Note Java-varinaming style * */ #ifndef MOSTRUCT #define MOSTRUCT #include <gnome.h> #include <orb/orbit.h> #include "messaging_mobject_constants.h" typedef struct _messaging_data_object messaging_data_object; typedef struct _messaging_object messaging_object; typedef struct _messaging_relation messaging_relation; struct _messaging_data_object { gint name; /* runtime name\number\key\id */ gchar *rawdata; /* raw data */ gint rawdataLen; /* length of rawdata memory block */ GString *String; /* string data representation */ /* TODO: String -> non-pointer */ gint Integer; /* Integer data representation */ gint Percentage; /* Percentage data representation */ gboolean Boolean; /* Boolean data representation */ /* NOTE: The unique data type equals the rawdata */ }; struct _messaging_relation { messaging_object *MO; /* Other MO */ rType_t rType; /* Relation description */ }; struct _messaging_object { gint name; /* runtime name\number\key\id */ messaging_data_object *MDO; /* data block of current MO */ gint dataSequence; /* followup number of data block , N = first; N--; 0 = last */ GString *dataDescription; /* Description of data block */ gboolean dataPassedOver; /* db internal detection dead ends */ gint dataBlocked; /* current amount of cached data */ messaging_data_object *dataBlockedList[32];/* list of blocked data chunks */ GString *historyFilename; /* Filename of .. */ GIOChannel *historyIO; /* .. logfile after dataBlockedList */ GString *dname; /* displayed name */ GString *dDescription; /* displayed description */ moType_t moType; /* messaging_object type */ gint currentRelations; /* N of current relations */ messaging_relation *relation[256]; /* other MObjects to which current one has some sort of relation to. TODO: N=256=fixed, hmmm, a llist should replace ?? */ GString *allowedFilter; /* This string must be matched by offered data in order to accept it */ gint (*procedure)(messaging_object *MO); /* operation on data by current mobject */ statusType_t status; /* status */ gpointer configInit; /* initialize configuration of MO */ gpointer configRuntime; /* runtime configuration of MO */ gboolean UIsetup; /* FALSE until fully setup, see NOTE1 below */ //GtkWidget* visualPlug; /* Socket that holds the visualPanel, also NOTE2 */ GtkWidget* (*visualPlug_buildProcedure)(messaging_object *MO,gint XID); /* builds visual UI */ GtkWidget* (*configPlug_buildProcedure)(messaging_object *MO,gint XID); /* builds config UI */ //GtkWidget* configPlug; /* Holds the gtkplug widget of the config panel */ gint (*init)(messaging_object *MO); /* initialize code */ gint (*destruct)(messaging_object *MO); /* destroy code */ }; /* NOTE1 : plugins can be registerd to a ADM, the uisetup field is true after: 1- the mo is registered to the dfp 2- if moType==VisualMO, the mo visualSocket must be registered to the ADM (= being != NULL) Registering to a ADM is not needed for a MO to be operational, but as long as UIsetup == FALSE the MO cannot be manually configured and cannot output information. This is only very important to VisualMO's :) */ /* NOTE2 : These sockets are pointers to widgets OUTSIDE the DFP\Plugin data block. These are ONLY used by the ADM, which requests the values and uses it locally. The GtkWidget wont be a GtkSocket, but the GUI structure that contains the socket */ #endif