int button; DEFINE_EVENT_END(MouseButton) void MouseMotionEventHandler(void* context, MouseMotionEventArgs* e) { printf("MouseMotionEvent: x: %d y: %d\n", e->x, e->y); } void MouseButtonEventHandler(void* context, MouseButtonEventArgs* e) { printf("MouseButtonEvent: x: %d y: %d flags: %d button: %d\n", e->x, e->y, e->flags, e->button); } static wEventType Node_Events[] = { DEFINE_EVENT_ENTRY(MouseMotion) DEFINE_EVENT_ENTRY(MouseButton) }; #define NODE_EVENT_COUNT (sizeof(Node_Events) / sizeof(wEventType)) int TestPubSub(int argc, char* argv[]) { wPubSub* node; node = PubSub_New(TRUE); PubSub_AddEventTypes(node, Node_Events, NODE_EVENT_COUNT); PubSub_SubscribeMouseMotion(node, MouseMotionEventHandler); PubSub_SubscribeMouseButton(node, MouseButtonEventHandler);
void freerdp_get_version(int* major, int* minor, int* revision) { if (major != NULL) *major = FREERDP_VERSION_MAJOR; if (minor != NULL) *minor = FREERDP_VERSION_MINOR; if (revision != NULL) *revision = FREERDP_VERSION_REVISION; } static wEventType FreeRDP_Events[] = { DEFINE_EVENT_ENTRY(WindowStateChange) DEFINE_EVENT_ENTRY(ResizeWindow) DEFINE_EVENT_ENTRY(LocalResizeWindow) DEFINE_EVENT_ENTRY(EmbedWindow) DEFINE_EVENT_ENTRY(PanningChange) DEFINE_EVENT_ENTRY(ScalingFactorChange) DEFINE_EVENT_ENTRY(ErrorInfo) DEFINE_EVENT_ENTRY(Terminate) DEFINE_EVENT_ENTRY(ConnectionResult) DEFINE_EVENT_ENTRY(ChannelConnected) DEFINE_EVENT_ENTRY(ChannelDisconnected) }; /** Allocator function for a rdp context. * The function will allocate a rdpRdp structure using rdp_new(), then copy * its contents to the appropriate fields in the rdp_freerdp structure given in parameters.
"Build configuration: " BUILD_CONFIG "\n" "Build type: " BUILD_TYPE "\n" "CFLAGS: " CFLAGS "\n" "Compiler: " COMPILER_ID ", " COMPILER_VERSION "\n" "Target architecture: " TARGET_ARCH "\n"; return build_config; } const char* freerdp_get_build_revision(void) { return GIT_REVISION; } static wEventType FreeRDP_Events[] = { DEFINE_EVENT_ENTRY(WindowStateChange) DEFINE_EVENT_ENTRY(ResizeWindow) DEFINE_EVENT_ENTRY(LocalResizeWindow) DEFINE_EVENT_ENTRY(EmbedWindow) DEFINE_EVENT_ENTRY(PanningChange) DEFINE_EVENT_ENTRY(ZoomingChange) DEFINE_EVENT_ENTRY(ErrorInfo) DEFINE_EVENT_ENTRY(Terminate) DEFINE_EVENT_ENTRY(ConnectionResult) DEFINE_EVENT_ENTRY(ChannelConnected) DEFINE_EVENT_ENTRY(ChannelDisconnected) DEFINE_EVENT_ENTRY(MouseEvent) DEFINE_EVENT_ENTRY(Activated) DEFINE_EVENT_ENTRY(Timer) DEFINE_EVENT_ENTRY(GraphicsReset) };