clouseau: move those macros to a header, they are usefull
This commit is contained in:
parent
1013671a37
commit
4ae284bd0b
|
@ -120,4 +120,38 @@ eolian_debug_object_information_decode(char *buffer, unsigned int size);
|
||||||
|
|
||||||
EAPI Evas_Debug_Screenshot *
|
EAPI Evas_Debug_Screenshot *
|
||||||
evas_debug_screenshot_decode(char *buffer, unsigned int size);
|
evas_debug_screenshot_decode(char *buffer, unsigned int size);
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
Eina_Debug_Session *session;
|
||||||
|
int srcid;
|
||||||
|
void *buffer;
|
||||||
|
unsigned int size;
|
||||||
|
} Main_Loop_Info;
|
||||||
|
|
||||||
|
#define WRAPPER_TO_XFER_MAIN_LOOP(foo) \
|
||||||
|
static void \
|
||||||
|
_intern_main_loop ## foo(void *data) \
|
||||||
|
{ \
|
||||||
|
Main_Loop_Info *info = data; \
|
||||||
|
_main_loop ## foo(info->session, info->srcid, info->buffer, info->size); \
|
||||||
|
free(info->buffer); \
|
||||||
|
free(info); \
|
||||||
|
} \
|
||||||
|
static Eina_Bool \
|
||||||
|
foo(Eina_Debug_Session *session, int srcid, void *buffer, int size) \
|
||||||
|
{ \
|
||||||
|
Main_Loop_Info *info = calloc(1, sizeof(*info)); \
|
||||||
|
info->session = session; \
|
||||||
|
info->srcid = srcid; \
|
||||||
|
info->size = size; \
|
||||||
|
if (info->size) \
|
||||||
|
{ \
|
||||||
|
info->buffer = malloc(info->size); \
|
||||||
|
memcpy(info->buffer, buffer, info->size); \
|
||||||
|
} \
|
||||||
|
ecore_main_loop_thread_safe_call_async(_intern_main_loop ## foo, info); \
|
||||||
|
return EINA_TRUE; \
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -63,30 +63,6 @@
|
||||||
_buf += sz; \
|
_buf += sz; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define WRAPPER_TO_XFER_MAIN_LOOP(foo) \
|
|
||||||
static void \
|
|
||||||
_intern_main_loop ## foo(void *data) \
|
|
||||||
{ \
|
|
||||||
Main_Loop_Info *info = data; \
|
|
||||||
_main_loop ## foo(info->session, info->srcid, info->buffer, info->size); \
|
|
||||||
free(info->buffer); \
|
|
||||||
free(info); \
|
|
||||||
} \
|
|
||||||
static Eina_Bool \
|
|
||||||
foo(Eina_Debug_Session *session, int srcid, void *buffer, int size) \
|
|
||||||
{ \
|
|
||||||
Main_Loop_Info *info = calloc(1, sizeof(*info)); \
|
|
||||||
info->session = session; \
|
|
||||||
info->srcid = srcid; \
|
|
||||||
info->size = size; \
|
|
||||||
if (info->size) \
|
|
||||||
{ \
|
|
||||||
info->buffer = malloc(info->size); \
|
|
||||||
memcpy(info->buffer, buffer, info->size); \
|
|
||||||
} \
|
|
||||||
ecore_main_loop_thread_safe_call_async(_intern_main_loop ## foo, info); \
|
|
||||||
return EINA_TRUE; \
|
|
||||||
}
|
|
||||||
|
|
||||||
static int _snapshot_start_op = EINA_DEBUG_OPCODE_INVALID;
|
static int _snapshot_start_op = EINA_DEBUG_OPCODE_INVALID;
|
||||||
static int _snapshot_done_op = EINA_DEBUG_OPCODE_INVALID;
|
static int _snapshot_done_op = EINA_DEBUG_OPCODE_INVALID;
|
||||||
|
@ -103,14 +79,6 @@ enum {
|
||||||
HIGHLIGHT_A = 255
|
HIGHLIGHT_A = 255
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
Eina_Debug_Session *session;
|
|
||||||
int srcid;
|
|
||||||
void *buffer;
|
|
||||||
unsigned int size;
|
|
||||||
} Main_Loop_Info;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
Eolian_Type_Type etype;
|
Eolian_Type_Type etype;
|
||||||
|
|
Loading…
Reference in New Issue