Merge branch 'master' of github.com:awakecoding/FreeRDP into ports
This commit is contained in:
commit
756daa0cbe
@ -171,6 +171,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
|
||||
endif()
|
||||
if(WITH_SSE2)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
|
||||
|
@ -152,7 +152,7 @@ DWORD mac_client_update_thread(void* param)
|
||||
}
|
||||
|
||||
ExitThread(0);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD mac_client_input_thread(void* param)
|
||||
@ -177,7 +177,7 @@ DWORD mac_client_input_thread(void* param)
|
||||
}
|
||||
|
||||
ExitThread(0);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD mac_client_channels_thread(void* param)
|
||||
@ -214,7 +214,7 @@ DWORD mac_client_channels_thread(void* param)
|
||||
}
|
||||
|
||||
ExitThread(0);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD mac_client_thread(void* param)
|
||||
|
@ -24,6 +24,7 @@
|
||||
#ifndef __REGION_H___
|
||||
#define __REGION_H___
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
struct _REGION16_DATA;
|
||||
@ -43,7 +44,7 @@ typedef struct _REGION16 REGION16;
|
||||
* @param r2 second rectangle
|
||||
* @return if the two rectangles intersect
|
||||
*/
|
||||
BOOL rectangles_intersects(const RECTANGLE_16 *r1, const RECTANGLE_16 *r2);
|
||||
FREERDP_API BOOL rectangles_intersects(const RECTANGLE_16 *r1, const RECTANGLE_16 *r2);
|
||||
|
||||
/** computes the intersection of two rectangles
|
||||
* @param r1 first rectangle
|
||||
@ -51,15 +52,15 @@ BOOL rectangles_intersects(const RECTANGLE_16 *r1, const RECTANGLE_16 *r2);
|
||||
* @param dst resulting intersection
|
||||
* @return if the two rectangles intersect
|
||||
*/
|
||||
BOOL rectangles_intersection(const RECTANGLE_16 *r1, const RECTANGLE_16 *r2, RECTANGLE_16 *dst);
|
||||
FREERDP_API BOOL rectangles_intersection(const RECTANGLE_16 *r1, const RECTANGLE_16 *r2, RECTANGLE_16 *dst);
|
||||
|
||||
/** initialize a region16
|
||||
* @param region the region to initialise
|
||||
*/
|
||||
void region16_init(REGION16 *region);
|
||||
FREERDP_API void region16_init(REGION16 *region);
|
||||
|
||||
/** @return the number of rectangles of this region16 */
|
||||
int region16_n_rects(const REGION16 *region);
|
||||
FREERDP_API int region16_n_rects(const REGION16 *region);
|
||||
|
||||
/** returns a pointer on rectangles and the number of rectangles in this region.
|
||||
* nbRect can be set to NULL if not interested by the numnber of rectangles.
|
||||
@ -67,33 +68,33 @@ int region16_n_rects(const REGION16 *region);
|
||||
* @param nbRects a pointer that will be filled with the number of rectangles
|
||||
* @return a pointer on the rectangles
|
||||
*/
|
||||
const RECTANGLE_16 *region16_rects(const REGION16 *region, int *nbRects);
|
||||
FREERDP_API const RECTANGLE_16 *region16_rects(const REGION16 *region, int *nbRects);
|
||||
|
||||
/** @return the extents rectangle of this region */
|
||||
const RECTANGLE_16 *region16_extents(const REGION16 *region);
|
||||
FREERDP_API const RECTANGLE_16 *region16_extents(const REGION16 *region);
|
||||
|
||||
/** returns if the region is empty
|
||||
* @param region
|
||||
* @return if the region is empty
|
||||
*/
|
||||
BOOL region16_is_empty(const REGION16 *region);
|
||||
FREERDP_API BOOL region16_is_empty(const REGION16 *region);
|
||||
|
||||
/** clears the region, the region is resetted to a (0,0,0,0) region
|
||||
* @param region
|
||||
*/
|
||||
void region16_clear(REGION16 *region);
|
||||
FREERDP_API void region16_clear(REGION16 *region);
|
||||
|
||||
/** dumps the region on stderr
|
||||
* @param region the region to dump
|
||||
*/
|
||||
void region16_print(const REGION16 *region);
|
||||
FREERDP_API void region16_print(const REGION16 *region);
|
||||
|
||||
/** copies the region to another region
|
||||
* @param dst destination region
|
||||
* @param src source region
|
||||
* @return if the operation was successful (false meaning out-of-memory)
|
||||
*/
|
||||
BOOL region16_copy(REGION16 *dst, const REGION16 *src);
|
||||
FREERDP_API BOOL region16_copy(REGION16 *dst, const REGION16 *src);
|
||||
|
||||
/** adds a rectangle in src and stores the resulting region in dst
|
||||
* @param dst destination region
|
||||
@ -101,14 +102,14 @@ BOOL region16_copy(REGION16 *dst, const REGION16 *src);
|
||||
* @param rect the rectangle to add
|
||||
* @return if the operation was successful (false meaning out-of-memory)
|
||||
*/
|
||||
BOOL region16_union_rect(REGION16 *dst, const REGION16 *src, const RECTANGLE_16 *rect);
|
||||
FREERDP_API BOOL region16_union_rect(REGION16 *dst, const REGION16 *src, const RECTANGLE_16 *rect);
|
||||
|
||||
/** returns if a rectangle intersects the region
|
||||
* @param src the region
|
||||
* @param arg2 the rectangle
|
||||
* @return if region and rectangle intersect
|
||||
*/
|
||||
BOOL region16_intersects_rect(const REGION16 *src, const RECTANGLE_16 *arg2);
|
||||
FREERDP_API BOOL region16_intersects_rect(const REGION16 *src, const RECTANGLE_16 *arg2);
|
||||
|
||||
/** computes the intersection between a region and a rectangle
|
||||
* @param dst destination region
|
||||
@ -116,12 +117,12 @@ BOOL region16_intersects_rect(const REGION16 *src, const RECTANGLE_16 *arg2);
|
||||
* @param arg2 the rectangle that intersects
|
||||
* @return if the operation was successful (false meaning out-of-memory)
|
||||
*/
|
||||
BOOL region16_intersect_rect(REGION16 *dst, const REGION16 *src, const RECTANGLE_16 *arg2);
|
||||
FREERDP_API BOOL region16_intersect_rect(REGION16 *dst, const REGION16 *src, const RECTANGLE_16 *arg2);
|
||||
|
||||
/** release internal data associated with this region
|
||||
* @param region the region to release
|
||||
*/
|
||||
void region16_uninit(REGION16 *region);
|
||||
FREERDP_API void region16_uninit(REGION16 *region);
|
||||
|
||||
|
||||
#endif /* __REGION_H___ */
|
||||
|
@ -177,7 +177,6 @@ FREERDP_API extern int connectErrorCode;
|
||||
#define CANCELEDBYUSER ERRORSTART + 11
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* FreeRDP Context Error Codes
|
||||
*/
|
||||
@ -229,6 +228,8 @@ FREERDP_API extern int connectErrorCode;
|
||||
#define FREERDP_ERROR_AUTHENTICATION_FAILED MAKE_FREERDP_ERROR(CONNECT, 9)
|
||||
#define FREERDP_ERROR_INSUFFICIENT_PRIVILEGES MAKE_FREERDP_ERROR(CONNECT, 10)
|
||||
#define FREERDP_ERROR_CONNECT_CANCELLED MAKE_FREERDP_ERROR(CONNECT, 11)
|
||||
#define FREERDP_ERROR_SECURITY_NEGO_CONNECT_FAILED MAKE_FREERDP_ERROR(CONNECT, 12)
|
||||
#define FREERDP_ERROR_CONNECT_TRANSPORT_FAILED MAKE_FREERDP_ERROR(CONNECT, 13)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -87,11 +87,11 @@ struct _BITMAP_PLANAR_CONTEXT
|
||||
BYTE* rlePlanesBuffer;
|
||||
};
|
||||
|
||||
int freerdp_bitmap_planar_decompress(BYTE* srcData, BYTE* dstData, int width, int height, int size);
|
||||
FREERDP_API int freerdp_bitmap_planar_decompress(BYTE* srcData, BYTE* dstData, int width, int height, int size);
|
||||
|
||||
int freerdp_split_color_planes(BYTE* data, UINT32 format, int width, int height, int scanline, BYTE* planes[4]);
|
||||
BYTE* freerdp_bitmap_planar_compress_plane_rle(BYTE* plane, int width, int height, BYTE* outPlane, int* dstSize);
|
||||
BYTE* freerdp_bitmap_planar_delta_encode_plane(BYTE* inPlane, int width, int height, BYTE* outPlane);
|
||||
int freerdp_bitmap_planar_delta_encode_planes(BYTE* inPlanes[4], int width, int height, BYTE* outPlanes[4]);
|
||||
FREERDP_API int freerdp_split_color_planes(BYTE* data, UINT32 format, int width, int height, int scanline, BYTE* planes[4]);
|
||||
FREERDP_API BYTE* freerdp_bitmap_planar_compress_plane_rle(BYTE* plane, int width, int height, BYTE* outPlane, int* dstSize);
|
||||
FREERDP_API BYTE* freerdp_bitmap_planar_delta_encode_plane(BYTE* inPlane, int width, int height, BYTE* outPlane);
|
||||
FREERDP_API int freerdp_bitmap_planar_delta_encode_planes(BYTE* inPlanes[4], int width, int height, BYTE* outPlanes[4]);
|
||||
|
||||
#endif /* FREERDP_CODEC_PLANAR_PRIVATE_H */
|
||||
|
@ -690,7 +690,7 @@ struct UnitaryTest tests[] = {
|
||||
|
||||
int TestFreeRDPRegion(int argc, char* argv[])
|
||||
{
|
||||
int i, testNb;
|
||||
int i, testNb = 0;
|
||||
int retCode = -1;
|
||||
|
||||
for (i = 0; tests[i].func; i++)
|
||||
|
@ -251,6 +251,11 @@ BOOL rdp_client_connect(rdpRdp* rdp)
|
||||
|
||||
if (!nego_connect(rdp->nego))
|
||||
{
|
||||
if (!freerdp_get_last_error(rdp->context))
|
||||
{
|
||||
freerdp_set_last_error(rdp->context, FREERDP_ERROR_SECURITY_NEGO_CONNECT_FAILED);
|
||||
}
|
||||
|
||||
fprintf(stderr, "Error: protocol security negotiation or connection failure\n");
|
||||
return FALSE;
|
||||
}
|
||||
@ -286,7 +291,14 @@ BOOL rdp_client_connect(rdpRdp* rdp)
|
||||
while (rdp->state != CONNECTION_STATE_ACTIVE)
|
||||
{
|
||||
if (rdp_check_fds(rdp) < 0)
|
||||
{
|
||||
if (!freerdp_get_last_error(rdp->context))
|
||||
{
|
||||
freerdp_set_last_error(rdp->context, FREERDP_ERROR_CONNECT_TRANSPORT_FAILED);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <freerdp/gdi/gdi.h>
|
||||
|
||||
#include <freerdp/gdi/dc.h>
|
||||
#include <freerdp/gdi/drawing.h>
|
||||
|
||||
/**
|
||||
* Set current foreground draw mode.\n
|
||||
|
Loading…
Reference in New Issue
Block a user