#include "wm_event_types.h"
#include "wm_draw.h"
+#ifndef NDEBUG
+# include "RNA_enum_types.h"
+#endif
+
static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA *properties, ReportList *reports, short context, short poll_only);
/* ************ event management ************** */
MEM_freeN(buf);
}
+/* for debugging only, getting inspecting events manually is tedious */
+#ifndef NDEBUG
+
+void WM_event_print(wmEvent *event)
+{
+ if(event) {
+ const char *unknown= "UNKNOWN";
+ const char *type_id= unknown;
+ const char *val_id= unknown;
+
+ RNA_enum_identifier(event_type_items, event->type, &type_id);
+ RNA_enum_identifier(event_value_items, event->val, &val_id);
+
+ printf("wmEvent - type:%d/%s, val:%d/%s, "
+ "shift:%d, ctrl:%d, alt:%d, oskey:%d, keymodifier:%d, "
+ "mouse:(%d,%d), ascii:'%c', utf8:'%.6s', "
+ "keymap_idname:%s, pointer:%p\n",
+ event->type, type_id, event->val, val_id,
+ event->shift, event->ctrl, event->alt, event->oskey, event->keymodifier,
+ event->x, event->y, event->ascii, event->utf8_buf,
+ event->keymap_idname, (void *)event);
+ }
+ else {
+ printf("wmEvent - NULL\n");
+ }
+}
+
+#endif /* NDEBUG */
+
static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int popup)
{
if(popup) {