wf_gdi.h
wf_event.c
wf_event.h
+ wf_channels.c
+ wf_channels.h
wf_graphics.c
wf_graphics.h
wf_cliprdr.c
wf_cliprdr.h
- wf_window.c
- wf_window.h
wf_rail.c
wf_rail.h
- wf_interface.c
- wf_interface.h
+ wf_client.c
+ wf_client.h
wf_floatbar.c
wf_floatbar.h
wfreerdp.rc
#include "resource.h"
-#include "wf_interface.h"
+#include "wf_client.h"
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
--- /dev/null
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ *
+ * Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "wf_channels.h"
+
+#include <freerdp/gdi/gfx.h>
+
+void wf_OnChannelConnectedEventHandler(rdpContext* context, ChannelConnectedEventArgs* e)
+{
+ wfContext* wfc = (wfContext*) context;
+ rdpSettings* settings = context->settings;
+
+ if (strcmp(e->name, RDPEI_DVC_CHANNEL_NAME) == 0)
+ {
+
+ }
+ else if (strcmp(e->name, RDPGFX_DVC_CHANNEL_NAME) == 0)
+ {
+ if (settings->SoftwareGdi)
+ gdi_graphics_pipeline_init(context->gdi, (RdpgfxClientContext*) e->pInterface);
+ }
+ else if (strcmp(e->name, ENCOMSP_SVC_CHANNEL_NAME) == 0)
+ {
+
+ }
+}
+
+void wf_OnChannelDisconnectedEventHandler(rdpContext* context, ChannelDisconnectedEventArgs* e)
+{
+ wfContext* wfc = (wfContext*) context;
+ rdpSettings* settings = context->settings;
+
+ if (strcmp(e->name, RDPEI_DVC_CHANNEL_NAME) == 0)
+ {
+
+ }
+ else if (strcmp(e->name, RDPGFX_DVC_CHANNEL_NAME) == 0)
+ {
+ if (settings->SoftwareGdi)
+ gdi_graphics_pipeline_uninit(context->gdi, (RdpgfxClientContext*) e->pInterface);
+ }
+ else if (strcmp(e->name, ENCOMSP_SVC_CHANNEL_NAME) == 0)
+ {
+
+ }
+}
/**
* FreeRDP: A Remote Desktop Protocol Implementation
- * Windows RAIL
*
- * Copyright 2012 Jason Champion <jchampion@zetacentauri.com>
+ * Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-#ifndef __WF_WINDOW_H
-#define __WF_WINDOW_H
+#ifndef __WF_CHANNELS_H
+#define __WF_CHANNELS_H
#include <freerdp/freerdp.h>
+#include <freerdp/client/channels.h>
+#include <freerdp/client/rdpei.h>
+#include <freerdp/client/rdpgfx.h>
+#include <freerdp/client/encomsp.h>
-#include "wf_interface.h"
+#include "wf_client.h"
+
+void wf_OnChannelConnectedEventHandler(rdpContext* context, ChannelConnectedEventArgs* e);
+void wf_OnChannelDisconnectedEventHandler(rdpContext* context, ChannelDisconnectedEventArgs* e);
#endif
#include <freerdp/event.h>
#include "wf_gdi.h"
+#include "wf_channels.h"
#include "wf_graphics.h"
#include "wf_cliprdr.h"
-#include "wf_interface.h"
+#include "wf_client.h"
#include "resource.h"
}
freerdp_set_param_uint32(settings, FreeRDP_KeyboardLayout, (int) GetKeyboardLayout(0) & 0x0000FFFF);
+
+ PubSub_SubscribeChannelConnected(instance->context->pubSub,
+ (pChannelConnectedEventHandler) wf_OnChannelConnectedEventHandler);
+
+ PubSub_SubscribeChannelDisconnected(instance->context->pubSub,
+ (pChannelDisconnectedEventHandler) wf_OnChannelDisconnectedEventHandler);
+
freerdp_channels_pre_connect(instance->context->channels, instance);
return TRUE;
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+
#include <assert.h>
+
#include <winpr/crt.h>
+#include <winpr/stream.h>
#include <freerdp/utils/event.h>
-#include <winpr/stream.h>
#include <freerdp/client/cliprdr.h>
#include <Strsafe.h>
#include <Ole2.h>
#include <ShlObj.h>
-#include "wf_interface.h"
+
+#include "wf_client.h"
#ifdef WITH_DEBUG_CLIPRDR
#define DEBUG_CLIPRDR(fmt, ...) DEBUG_CLASS(WIN_CLIPRDR, fmt, ## __VA_ARGS__)
*/
#include <stdio.h>
+
#include "wf_cliprdr_EnumFORMATETC.h"
static void cliprdr_format_deep_copy(FORMATETC *dest, FORMATETC *source)
#include <freerdp/freerdp.h>
-#include "wf_interface.h"
+#include "wf_client.h"
#include "wf_gdi.h"
#include "wf_event.h"
-#include "freerdp/event.h"
+
+#include <freerdp/event.h>
static HWND g_focus_hWnd;
#ifndef __WF_EVENT_H
#define __WF_EVENT_H
-#include "wf_interface.h"
+#include "wf_client.h"
LRESULT CALLBACK wf_ll_kbd_proc(int nCode, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
* limitations under the License.
*/
-#include <Windows.h>
-#include <stdlib.h>
+#include <winpr/crt.h>
+#include <winpr/windows.h>
-#include "wf_interface.h"
+#include "resource.h"
+
+#include "wf_client.h"
#include "wf_floatbar.h"
-#include "wf_window.h"
#include "wf_gdi.h"
-#include "resource.h"
typedef struct _Button Button;
#include <freerdp/codec/rfx.h>
#include <freerdp/codec/nsc.h>
-#include "wf_interface.h"
+#include "wf_client.h"
#include "wf_graphics.h"
#include "wf_gdi.h"
#ifndef __WF_GDI_H
#define __WF_GDI_H
-#include "wf_interface.h"
+#include "wf_client.h"
void wf_invalidate_region(wfContext* wfc, int x, int y, int width, int height);
wfBitmap* wf_image_new(wfContext* wfc, int width, int height, int bpp, BYTE* data);
#ifndef __WF_GRAPHICS_H
#define __WF_GRAPHICS_H
-#include "wf_interface.h"
+#include "wf_client.h"
HBITMAP wf_create_dib(wfContext* wfc, int width, int height, int bpp, BYTE* data, BYTE** pdata);
wfBitmap* wf_image_new(wfContext* wfc, int width, int height, int bpp, BYTE* data);
#include "config.h"
#endif
-#include <freerdp/utils/event.h>
#include <winpr/print.h>
+
+#include <freerdp/utils/event.h>
#include <freerdp/utils/rail.h>
#include <freerdp/rail/rail.h>
-#include "wf_window.h"
#include "wf_rail.h"
void wf_rail_paint(wfContext* wfc, rdpRail* rail, INT32 uleft, INT32 utop, UINT32 uright, UINT32 ubottom)
#ifndef __WF_RAIL_H
#define __WF_RAIL_H
-#include "wf_interface.h"
+#include "wf_client.h"
void wf_rail_paint(wfContext* wfc, rdpRail* rail, INT32 uleft, INT32 utop, UINT32 uright, UINT32 ubottom);
void wf_rail_register_callbacks(wfContext* wfc, rdpRail* rail);
+++ /dev/null
-/**
- * FreeRDP: A Remote Desktop Protocol Implementation
- * Windows RAIL
- *
- * Copyright 2012 Jason Champion <jchampion@zetacentauri.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "wf_window.h"