2013-01-30 09:18:16 -08:00
|
|
|
#ifndef _CLOUSEAU_PRIVATE_H
|
|
|
|
#define _CLOUSEAU_PRIVATE_H
|
2013-07-22 19:39:35 -07:00
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
2013-01-28 22:39:51 -08:00
|
|
|
#include <Eo.h>
|
2012-12-03 22:57:44 -08:00
|
|
|
#include <Ecore_Con_Eet.h>
|
2013-07-22 19:39:35 -07:00
|
|
|
|
|
|
|
#include "clouseau_private2.h"
|
|
|
|
|
2012-05-14 07:38:35 -07:00
|
|
|
/* Global constants */
|
2012-06-18 00:22:43 -07:00
|
|
|
#define BMP_FIELD "bmp"
|
2012-05-16 04:07:06 -07:00
|
|
|
|
2012-05-14 07:41:40 -07:00
|
|
|
#define PORT (22522)
|
2012-05-14 07:38:35 -07:00
|
|
|
#define MAX_LINE (1023)
|
2012-05-17 06:57:17 -07:00
|
|
|
#define LOCALHOST "127.0.0.1"
|
2012-05-14 07:40:22 -07:00
|
|
|
#define LISTEN_IP "0.0.0.0" /* Avail all, no mask */
|
2012-05-14 07:37:49 -07:00
|
|
|
|
2012-12-03 22:57:44 -08:00
|
|
|
#define CLOUSEAU_GUI_CLIENT_CONNECT_STR "CLOUSEAU_GUI_CLIENT_CONNECT"
|
|
|
|
#define CLOUSEAU_APP_CLIENT_CONNECT_STR "CLOUSEAU_APP_CLIENT_CONNECT"
|
2013-01-28 22:39:51 -08:00
|
|
|
#define CLOUSEAU_APP_ADD_STR "CLOUSEAU_APP_ADD"
|
|
|
|
#define CLOUSEAU_DATA_REQ_STR "CLOUSEAU_DATA_REQ"
|
|
|
|
#define CLOUSEAU_TREE_DATA_STR "CLOUSEAU_TREE_DATA"
|
|
|
|
#define CLOUSEAU_APP_CLOSED_STR "CLOUSEAU_APP_CLOSED"
|
|
|
|
#define CLOUSEAU_HIGHLIGHT_STR "CLOUSEAU_HIGHLIGHT"
|
|
|
|
#define CLOUSEAU_BMP_REQ_STR "CLOUSEAU_BMP_REQ"
|
|
|
|
#define CLOUSEAU_BMP_DATA_STR "CLOUSEAU_BMP_DATA"
|
2012-12-03 08:27:03 -08:00
|
|
|
|
2012-12-03 22:57:44 -08:00
|
|
|
/* Private function */
|
|
|
|
#define CLOUSEAU_APP_ADD_ENTRY "clouseau/app"
|
|
|
|
#define CLOUSEAU_TREE_DATA_ENTRY "clouseau/app/tree"
|
|
|
|
#define CLOUSEAU_BMP_LIST_ENTRY "clouseau/app/shot_list"
|
|
|
|
#define CLOUSEAU_BMP_DATA_ENTRY "clouseau/app/screenshot"
|
2012-05-14 07:38:09 -07:00
|
|
|
|
2013-01-28 22:39:51 -08:00
|
|
|
/* START - EO EET defs */
|
|
|
|
#define EO_DBG_INFO_TYPE_UNKNOWN_STR "EO_DBG_INFO_TYPE_UNKNOWN"
|
|
|
|
#define EO_DBG_INFO_TYPE_STRING_STR "EO_DBG_INFO_TYPE_STRING"
|
|
|
|
#define EO_DBG_INFO_TYPE_INT_STR "EO_DBG_INFO_TYPE_INT"
|
|
|
|
#define EO_DBG_INFO_TYPE_BOOL_STR "EO_DBG_INFO_TYPE_BOOL"
|
|
|
|
#define EO_DBG_INFO_TYPE_PTR_STR "EO_DBG_INFO_TYPE_PTR"
|
|
|
|
#define EO_DBG_INFO_TYPE_DOUBLE_STR "EO_DBG_INFO_TYPE_DOUBLE"
|
|
|
|
#define EO_DBG_INFO_TYPE_LIST_STR "EO_DBG_INFO_TYPE_LIST"
|
|
|
|
/* END - EO EET defs */
|
|
|
|
|
2012-05-14 07:39:38 -07:00
|
|
|
struct _connect_st
|
|
|
|
{ /* This will be used for APP, GUI client connect */
|
|
|
|
unsigned int pid;
|
2012-05-14 07:39:46 -07:00
|
|
|
const char *name;
|
2012-05-14 07:39:38 -07:00
|
|
|
};
|
|
|
|
typedef struct _connect_st connect_st;
|
|
|
|
|
|
|
|
struct _app_info_st
|
|
|
|
{ /* This will be used to register new APP in GUI client */
|
|
|
|
unsigned int pid;
|
|
|
|
char *name;
|
2012-06-18 00:22:25 -07:00
|
|
|
char *file; /* Valid only if was read from file in offline mode */
|
2012-05-14 07:39:49 -07:00
|
|
|
unsigned long long ptr; /* (void *) client ptr of app as saved by daemon */
|
2012-12-03 22:57:44 -08:00
|
|
|
Eina_List *view; /* Screen views pointers of (bmp_info_st *) */
|
2012-06-18 00:22:25 -07:00
|
|
|
unsigned int refresh_ctr; /* Counter of how many times down refresh */
|
2012-05-14 07:39:38 -07:00
|
|
|
};
|
|
|
|
typedef struct _app_info_st app_info_st;
|
|
|
|
|
|
|
|
struct _data_req_st
|
|
|
|
{ /* This will be used to ask for tree data by DAEMON or GUI */
|
2012-05-14 07:39:49 -07:00
|
|
|
unsigned long long gui; /* (void *) client ptr of GUI */
|
|
|
|
unsigned long long app; /* (void *) client ptr APP */
|
2012-05-14 07:39:38 -07:00
|
|
|
};
|
|
|
|
typedef struct _data_req_st data_req_st;
|
|
|
|
|
|
|
|
struct _tree_data_st
|
|
|
|
{ /* This will be used to send tree data to/from APP/DAEMON */
|
2012-05-14 07:39:49 -07:00
|
|
|
unsigned long long gui; /* (void *) client ptr of GUI */
|
|
|
|
unsigned long long app; /* (void *) client ptr APP */
|
2012-05-14 07:39:38 -07:00
|
|
|
Eina_List *tree; /* The actual (Tree_Item *) list */
|
|
|
|
};
|
|
|
|
typedef struct _tree_data_st tree_data_st;
|
|
|
|
|
|
|
|
struct _app_closed_st
|
2012-05-14 07:39:49 -07:00
|
|
|
{ /* This will be used to notify GUI of app closed */
|
|
|
|
unsigned long long ptr; /* (void *) client ptr APP */
|
2012-05-14 07:39:38 -07:00
|
|
|
};
|
|
|
|
typedef struct _app_closed_st app_closed_st;
|
|
|
|
|
|
|
|
struct _highlight_st
|
|
|
|
{ /* This will be used to highlight object in APP */
|
2012-05-14 07:39:49 -07:00
|
|
|
unsigned long long app; /* (void *) client ptr of APP */
|
|
|
|
unsigned long long object; /* (void *) object ptr of object to highlight */
|
2012-05-14 07:39:38 -07:00
|
|
|
};
|
|
|
|
typedef struct _highlight_st highlight_st;
|
|
|
|
|
2012-06-18 00:22:25 -07:00
|
|
|
struct _bmp_req_st
|
|
|
|
{ /* This will be used to send tree data to/from APP/DAEMON */
|
|
|
|
unsigned long long gui; /* (void *) client ptr of GUI */
|
|
|
|
unsigned long long app; /* (void *) client ptr APP */
|
|
|
|
unsigned long long object; /* (void *) object ptr of Evas */
|
|
|
|
unsigned int ctr; /* Reload counter to match */
|
|
|
|
};
|
|
|
|
typedef struct _bmp_req_st bmp_req_st;
|
|
|
|
|
|
|
|
struct _bmp_info_st
|
2012-06-18 00:22:31 -07:00
|
|
|
{ /* This will be used to send app window Bitmap */
|
|
|
|
/* We are using ULONGLONG because we send this as RAW data */
|
|
|
|
/* win, bt are NOT transferred. */
|
|
|
|
unsigned long long gui; /* (void *) client ptr of GUI */
|
|
|
|
unsigned long long app; /* (void *) client ptr of APP */
|
|
|
|
unsigned long long object; /* (void *) object ptr of evas */
|
|
|
|
unsigned long long ctr; /* Reload counter to match */
|
|
|
|
unsigned long long w; /* BMP width, make Evas_Coord */
|
|
|
|
unsigned long long h; /* BMP hight, make Evas_Coord */
|
2012-06-18 00:23:20 -07:00
|
|
|
|
|
|
|
/* All the following fields are NOT transferred in EET msg */
|
2012-06-18 00:22:31 -07:00
|
|
|
Evas_Object *win; /* Window of view if open */
|
2012-06-18 00:23:20 -07:00
|
|
|
Evas_Object *scr; /* Scroller holds view */
|
2012-06-18 00:23:01 -07:00
|
|
|
Evas_Object *o; /* Actuall object displays BMP */
|
2012-06-18 00:23:20 -07:00
|
|
|
double zoom_val; /* Current zoom value */
|
2012-06-18 00:23:01 -07:00
|
|
|
Evas_Object *lb_mouse; /* Label contains mouse cords */
|
2012-06-18 00:23:20 -07:00
|
|
|
Evas_Object *lb_rgba; /* Current mouse pos rgba val */
|
2012-06-18 00:22:31 -07:00
|
|
|
Evas_Object *bt; /* Button opening win */
|
2012-06-18 00:23:12 -07:00
|
|
|
Evas_Object *lx; /* Line on X axis */
|
|
|
|
Evas_Object *ly; /* Line on Y axis */
|
2012-06-18 00:22:31 -07:00
|
|
|
void *bmp; /* Bitmap BLOB, size (w * h * sizeof(int)) */
|
2012-06-18 00:22:25 -07:00
|
|
|
};
|
|
|
|
typedef struct _bmp_info_st bmp_info_st;
|
|
|
|
|
2012-06-18 00:22:43 -07:00
|
|
|
struct _shot_list_st
|
|
|
|
{ /* This will be used to write a shot list to eet file */
|
|
|
|
Eina_List *view; /* Screen views eahc is (bmp_info_st *) ptr */
|
|
|
|
};
|
|
|
|
typedef struct _shot_list_st shot_list_st;
|
2012-05-14 07:38:09 -07:00
|
|
|
|
2012-05-14 07:38:35 -07:00
|
|
|
struct _data_desc
|
|
|
|
{
|
2012-06-18 00:22:25 -07:00
|
|
|
Eet_Data_Descriptor *bmp_data;
|
|
|
|
Eet_Data_Descriptor *bmp_req;
|
|
|
|
Eet_Data_Descriptor *bmp_info;
|
2012-06-18 00:22:43 -07:00
|
|
|
Eet_Data_Descriptor *shot_list;
|
2012-05-14 07:39:38 -07:00
|
|
|
Eet_Data_Descriptor *connect;
|
|
|
|
Eet_Data_Descriptor *app_add;
|
|
|
|
Eet_Data_Descriptor *data_req;
|
|
|
|
Eet_Data_Descriptor *tree_data;
|
|
|
|
Eet_Data_Descriptor *app_closed;
|
|
|
|
Eet_Data_Descriptor *highlight;
|
2012-05-14 07:38:35 -07:00
|
|
|
Eet_Data_Descriptor *tree;
|
2012-05-14 07:40:41 -07:00
|
|
|
Eet_Data_Descriptor *obj_info;
|
2012-05-14 07:38:09 -07:00
|
|
|
};
|
2012-05-14 07:38:35 -07:00
|
|
|
typedef struct _data_desc data_desc;
|
|
|
|
|
2013-01-28 22:39:51 -08:00
|
|
|
/* START - EO - debug structs */
|
|
|
|
struct _Clouseau_st_string
|
|
|
|
{
|
|
|
|
const char *s;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Clouseau_st_int
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Clouseau_st_bool
|
|
|
|
{
|
|
|
|
Eina_Bool b;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Clouseau_st_ptr
|
|
|
|
{
|
|
|
|
unsigned long long p; /* For pointer value */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Clouseau_st_double
|
|
|
|
{
|
|
|
|
double d;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Clouseau_st_dbg_list
|
|
|
|
{
|
|
|
|
Eina_List *list; /* Sub-List of (Eo_Dbg_Info *) if needed */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* START - EO - debug structs */
|
|
|
|
typedef struct _Clouseau_st_string Clouseau_st_string;
|
|
|
|
typedef struct _Clouseau_st_int Clouseau_st_int;
|
|
|
|
typedef struct _Clouseau_st_bool Clouseau_st_bool;
|
|
|
|
typedef struct _Clouseau_st_ptr Clouseau_st_ptr;
|
|
|
|
typedef struct _Clouseau_st_double Clouseau_st_double;
|
|
|
|
typedef struct _Clouseau_st_dbg_list Clouseau_st_dbg_list;
|
|
|
|
typedef struct _Clouseau_Eo_Dbg_Info Clouseau_Eo_Dbg_Info;
|
|
|
|
/* END - EO - debug structs */
|
|
|
|
|
2013-02-05 05:53:44 -08:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
CLOUSEAU_DBG_INFO_TYPE_STRING,
|
|
|
|
CLOUSEAU_DBG_INFO_TYPE_INT,
|
|
|
|
CLOUSEAU_DBG_INFO_TYPE_BOOL,
|
|
|
|
CLOUSEAU_DBG_INFO_TYPE_PTR,
|
|
|
|
CLOUSEAU_DBG_INFO_TYPE_DOUBLE,
|
|
|
|
CLOUSEAU_DBG_INFO_TYPE_LIST,
|
|
|
|
CLOUSEAU_DBG_INFO_TYPE_UNKNOWN
|
|
|
|
} Clouseau_Dbg_Info_Type;
|
|
|
|
|
2013-01-28 22:39:51 -08:00
|
|
|
struct _Clouseau_Eo_Dbg_Info
|
|
|
|
{ /* Debug info composed of a list of Eo_Dbg_Info */
|
|
|
|
const char *name;
|
2013-02-05 05:53:44 -08:00
|
|
|
Clouseau_Dbg_Info_Type type;
|
2013-01-28 22:39:51 -08:00
|
|
|
|
|
|
|
union _un_dbg_info
|
|
|
|
{
|
|
|
|
Clouseau_st_string text;
|
|
|
|
Clouseau_st_int intg;
|
|
|
|
Clouseau_st_bool bl;
|
|
|
|
Clouseau_st_ptr ptr;
|
|
|
|
Clouseau_st_double dbl;
|
|
|
|
Clouseau_st_dbg_list dbg; /* Sub-List of (Eo_Dbg_Info *) if needed */
|
|
|
|
} un_dbg_info;
|
|
|
|
};
|
|
|
|
/* END - EO - debug structs */
|
|
|
|
|
2013-05-20 07:04:17 -07:00
|
|
|
void clouseau_app_disconnect(void);
|
|
|
|
|
2013-01-30 09:18:11 -08:00
|
|
|
EAPI void clouseau_eo_info_free(Clouseau_Eo_Dbg_Info *parent);
|
|
|
|
EAPI void clouseau_tree_item_from_legacy_convert(Clouseau_Tree_Item *treeit);
|
|
|
|
EAPI Eina_List *clouseau_eo_to_legacy_convert(Eo_Dbg_Info *root);
|
2013-01-30 09:18:05 -08:00
|
|
|
|
2012-08-14 04:26:26 -07:00
|
|
|
/* Exported From Object information */
|
|
|
|
EAPI void clouseau_object_information_free(Clouseau_Object *oinfo);
|
|
|
|
EAPI Clouseau_Object * clouseau_object_information_get(Clouseau_Tree_Item *treeit);
|
2012-07-26 02:53:44 -07:00
|
|
|
|
2012-07-05 19:39:11 -07:00
|
|
|
/* Exported function */
|
2012-08-14 04:26:26 -07:00
|
|
|
EAPI void clouseau_data_tree_free(Eina_List *tree);
|
2012-12-03 22:57:44 -08:00
|
|
|
EAPI void *clouseau_data_packet_compose(const char *p_type, void *data, unsigned int *size, void *blob, int blob_size);
|
|
|
|
EAPI void *clouseau_data_packet_info_get(const char *p_type, void *data, size_t size);
|
2012-08-14 04:26:26 -07:00
|
|
|
EAPI void clouseau_data_object_highlight(Evas_Object *obj, Clouseau_Evas_Props *props, bmp_info_st *view);
|
|
|
|
EAPI Eina_Bool clouseau_data_eet_info_save(const char *filename, app_info_st *a, tree_data_st *ftd, Eina_List *ck_list);
|
|
|
|
EAPI Eina_Bool clouseau_data_eet_info_read(const char *filename, app_info_st **a, tree_data_st **ftd);
|
|
|
|
EAPI int clouseau_data_init(void);
|
2012-12-03 22:57:44 -08:00
|
|
|
EAPI int clouseau_register_descs(Ecore_Con_Eet *eet_svr);
|
2012-08-14 04:26:26 -07:00
|
|
|
EAPI int clouseau_data_shutdown(void);
|
2012-05-14 07:41:00 -07:00
|
|
|
#endif /* EET_DATA_H */
|