xf_cliprdr_init(xfi, channels);
- if (xfi->ui.OnResizeWindow)
- xfi->ui.OnResizeWindow(instance, settings->DesktopWidth, settings->DesktopHeight);
+ if (xfi->client->OnResizeWindow)
+ xfi->client->OnResizeWindow(instance, settings->DesktopWidth, settings->DesktopHeight);
return TRUE;
}
ZeroMemory(xfi, sizeof(xfInfo));
((xfContext*) instance->context)->xfi = xfi;
+
xfi->instance = instance;
settings = instance->settings;
+ xfi->client = instance->context->client;
status = freerdp_client_parse_command_line_arguments(instance->context->argc,
instance->context->argv, settings);
};
typedef struct xf_context xfContext;
-/**
- * User Interface Events
- */
-
-typedef void (*pOnResizeWindow)(freerdp* instance, int width, int height);
-
-struct rdp_ui
-{
- pOnResizeWindow OnResizeWindow;
-};
-typedef struct rdp_ui rdpUi;
-
struct xf_info
{
freerdp* instance;
xfContext* context;
rdpContext* _context;
- rdpUi ui;
+ rdpClient* client;
GC gc;
int bpp;
--- /dev/null
+/**
+ * FreeRDP: A Remote Desktop Protocol Implementation
+ * Client Interface
+ *
+ * Copyright 2013 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.
+ */
+
+#ifndef FREERDP_CLIENT_H
+#define FREERDP_CLIENT_H
+
+typedef struct rdp_client rdpClient;
+
+#include <freerdp/api.h>
+#include <freerdp/freerdp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void (*pOnResizeWindow)(freerdp* instance, int width, int height);
+
+struct rdp_client
+{
+ pOnResizeWindow OnResizeWindow;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FREERDP_CLIENT_H */
#include <winpr/stream.h>
+#include <freerdp/client.h>
+
#include <freerdp/input.h>
#include <freerdp/update.h>
#include <freerdp/message.h>
rdpInput* input; /* 38 */
rdpUpdate* update; /* 39 */
rdpSettings* settings; /* 40 */
- UINT32 paddingC[64 - 41]; /* 41 */
+ rdpClient* client; /* 41 */
+ UINT32 paddingC[64 - 42]; /* 42 */
};
/** Defines the options for a given instance of RDP connection.
#define PTR_FLAGS_WHEEL_NEGATIVE 0x0100
#define PTR_FLAGS_MOVE 0x0800
#define PTR_FLAGS_DOWN 0x8000
-#define PTR_FLAGS_BUTTON1 0x1000 //left
-#define PTR_FLAGS_BUTTON2 0x2000 //right
-#define PTR_FLAGS_BUTTON3 0x4000 //middle
+#define PTR_FLAGS_BUTTON1 0x1000 /* left */
+#define PTR_FLAGS_BUTTON2 0x2000 /* right */
+#define PTR_FLAGS_BUTTON3 0x4000 /* middle */
#define WheelRotationMask 0x01FF
/* Extended Pointer Flags */
instance->context->update = instance->update;
instance->context->settings = instance->settings;
+ instance->context->client = (rdpContext*) malloc(sizeof(rdpClient));
+ ZeroMemory(instance->context->client, sizeof(rdpClient));
+
instance->update->context = instance->context;
instance->update->pointer->context = instance->context;
instance->update->primary->context = instance->context;