forked from enlightenment/efl
various fixes for vc++. I'll add the Visual Studio projects later
SVN revision: 47758
This commit is contained in:
parent
f2b9c65adb
commit
898768c963
|
@ -346,6 +346,7 @@ case "$host_os" in
|
|||
EFL_ECORE_EVAS_BUILD="-DEFL_ECORE_EVAS_BUILD"
|
||||
EFL_ECORE_IMF_BUILD="-DEFL_ECORE_IMF_BUILD"
|
||||
EFL_ECORE_INPUT_BUILD="-DEFL_ECORE_INPUT_BUILD"
|
||||
EFL_ECORE_INPUT_EVAS_BUILD="-DEFL_ECORE_INPUT_EVAS_BUILD"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#ifndef _ECORE_H
|
||||
#define _ECORE_H
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# include <Evil.h>
|
||||
#endif
|
||||
|
||||
#include <Eina.h>
|
||||
|
||||
#ifdef EAPI
|
||||
|
|
|
@ -21,7 +21,6 @@ ecore_job.c \
|
|||
ecore_main.c \
|
||||
ecore_pipe.c \
|
||||
ecore_poll.c \
|
||||
ecore_signal.c \
|
||||
ecore_time.c \
|
||||
ecore_timer.c \
|
||||
ecore_thread.c \
|
||||
|
@ -39,7 +38,7 @@ libecore_la_SOURCES += ecore_exe_wince.c
|
|||
|
||||
else
|
||||
|
||||
libecore_la_SOURCES += ecore_exe.c
|
||||
libecore_la_SOURCES += ecore_signal.c ecore_exe.c
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
@ -9,10 +9,13 @@
|
|||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
@ -48,7 +51,7 @@ static pid_t _ecore_memory_pid = 0;
|
|||
|
||||
static const char *_ecore_magic_string_get(Ecore_Magic m);
|
||||
static int _ecore_init_count = 0;
|
||||
EAPI int _ecore_log_dom = -1;
|
||||
int _ecore_log_dom = -1;
|
||||
int _ecore_fps_debug = 0;
|
||||
|
||||
/** OpenBSD does not define CODESET
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EVIL
|
||||
# include <Evil.h>
|
||||
|
|
|
@ -14,6 +14,11 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#include <process.h>
|
||||
|
||||
#ifdef HAVE_EVIL
|
||||
# include <Evil.h>
|
||||
#endif
|
||||
|
@ -21,11 +26,6 @@
|
|||
#include "Ecore.h"
|
||||
#include "ecore_private.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#include <process.h>
|
||||
|
||||
#define ECORE_EXE_WIN32_TIMEOUT 3000
|
||||
|
||||
typedef enum
|
||||
|
|
|
@ -100,13 +100,13 @@ _ecore_getopt_help_line(FILE *fp, const int base, const int total, int used, con
|
|||
/* process line considering spaces (new line and tabs are spaces!) */
|
||||
while ((used < total) && (len > 0))
|
||||
{
|
||||
const char *space = NULL;
|
||||
int i, todo;
|
||||
|
||||
todo = total - used;
|
||||
if (todo > len)
|
||||
todo = len;
|
||||
|
||||
const char *space = NULL;
|
||||
for (i = 0; i < todo; i++)
|
||||
if (isspace(text[i]))
|
||||
{
|
||||
|
|
|
@ -7,8 +7,12 @@
|
|||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <winsock2.h>
|
||||
# define USER_TIMER_MINIMUM 0x0a
|
||||
# undef WIN32_LEAN_AND_MEAN
|
||||
# ifndef USER_TIMER_MINIMUM
|
||||
# define USER_TIMER_MINIMUM 0x0a
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __SUNPRO_C
|
||||
|
@ -19,16 +23,23 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <sys/time.h>
|
||||
# include <unistd.h>
|
||||
#else
|
||||
# include <float.h>
|
||||
#endif
|
||||
|
||||
#define FIX_HZ 1
|
||||
|
||||
#ifdef FIX_HZ
|
||||
# include <sys/param.h>
|
||||
# ifndef _MSC_VER
|
||||
# include <sys/param.h>
|
||||
# endif
|
||||
# ifndef HZ
|
||||
# define HZ 100
|
||||
# endif
|
||||
|
@ -1039,12 +1050,12 @@ _ecore_main_win32_select(int nfds, fd_set *readfds, fd_set *writefds,
|
|||
}
|
||||
else
|
||||
{
|
||||
ERR(stderr, "unknown result...\n");
|
||||
ERR("unknown result...\n");
|
||||
res = -1;
|
||||
}
|
||||
|
||||
/* Remove event objects again */
|
||||
for(i = 0; i < events_nbr; i++)
|
||||
for(i = 0; i < (int)events_nbr; i++)
|
||||
WSACloseEvent(objects[i]);
|
||||
|
||||
return res;
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
@ -624,4 +622,3 @@ _ecore_signal_exe_exit_delay(void *data)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -10,9 +10,12 @@
|
|||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
# include <unistd.h>
|
||||
# include <libgen.h>
|
||||
#endif
|
||||
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
# define _FILE_OFFSET_BITS 64
|
||||
|
@ -177,10 +180,10 @@ ecore_file_mkdir(const char *dir)
|
|||
EAPI int
|
||||
ecore_file_mkdirs(const char **dirs)
|
||||
{
|
||||
if (!dirs) return -1;
|
||||
|
||||
int i = 0;
|
||||
|
||||
if (!dirs) return -1;
|
||||
|
||||
for (; *dirs != NULL; dirs++)
|
||||
if (ecore_file_mkdir(*dirs))
|
||||
i++;
|
||||
|
@ -417,11 +420,10 @@ ecore_file_mkpath(const char *path)
|
|||
EAPI int
|
||||
ecore_file_mkpaths(const char **paths)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
if (!paths) return -1;
|
||||
|
||||
int i = 0;
|
||||
|
||||
for (; *paths != NULL; paths++)
|
||||
if (ecore_file_mkpath(*paths))
|
||||
i++;
|
||||
|
|
|
@ -9,7 +9,10 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "Ecore_Con.h"
|
||||
#ifdef BUILD_ECORE_CON
|
||||
# include "Ecore_Con.h"
|
||||
#endif
|
||||
|
||||
#include "ecore_file_private.h"
|
||||
|
||||
#ifdef BUILD_ECORE_CON
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "Ecore.h"
|
||||
#include "ecore_input_private.h"
|
||||
#include "ecore_private.h"
|
||||
|
||||
#include "Ecore_Input.h"
|
||||
#include "ecore_input_private.h"
|
||||
|
||||
|
||||
int _ecore_input_log_dom = -1;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifdef EFL_ECORE_INPUT_BUILD
|
||||
# ifdef EFL_ECORE_INPUT_EVAS_BUILD
|
||||
# ifdef DLL_EXPORT
|
||||
# define EAPI __declspec(dllexport)
|
||||
# else
|
||||
|
|
|
@ -5,7 +5,7 @@ AM_CPPFLAGS = \
|
|||
-I$(top_builddir)/src/lib/ecore_input \
|
||||
-I$(top_srcdir)/src/lib/ecore \
|
||||
-I$(top_builddir)/src/lib/ecore \
|
||||
@EFL_ECORE_INPUT_BUILD@ \
|
||||
@EFL_ECORE_INPUT_EVAS_BUILD@ \
|
||||
@EVAS_CFLAGS@ \
|
||||
@EINA_CFLAGS@ \
|
||||
@EVIL_CFLAGS@
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "Ecore.h"
|
||||
#include "ecore_input_evas_private.h"
|
||||
#include "Ecore_Input.h"
|
||||
|
||||
#include "Ecore_Input_Evas.h"
|
||||
#include "ecore_input_evas_private.h"
|
||||
|
||||
int _ecore_input_evas_log_dom = -1;
|
||||
|
||||
|
|
|
@ -55,21 +55,19 @@ int ecore_win32_dnd_shutdown()
|
|||
int ecore_win32_dnd_begin(const char *data,
|
||||
int size)
|
||||
{
|
||||
IDataObject *pDataObject = NULL;
|
||||
IDropSource *pDropSource = NULL;
|
||||
FORMATETC fmtetc = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
|
||||
STGMEDIUM stgmed = { TYMED_HGLOBAL, { 0 }, 0 };
|
||||
int res = 0;
|
||||
|
||||
if (data == NULL)
|
||||
return 0;
|
||||
if (size < 0)
|
||||
size = strlen(data) + 1;
|
||||
|
||||
IDataObject *pDataObject = NULL;
|
||||
IDropSource *pDropSource = NULL;
|
||||
|
||||
FORMATETC fmtetc = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
|
||||
STGMEDIUM stgmed = { TYMED_HGLOBAL, { 0 }, 0 };
|
||||
|
||||
stgmed.hGlobal = DataToHandle(data, size);
|
||||
|
||||
int res = 0;
|
||||
|
||||
// create the data object
|
||||
pDataObject = (IDataObject *)_ecore_win32_dnd_data_object_new((void *)&fmtetc,
|
||||
(void *)&stgmed,
|
||||
|
@ -112,10 +110,11 @@ int ecore_win32_dnd_begin(const char *data,
|
|||
int ecore_win32_dnd_register_drop_target(Ecore_Win32_Window *window,
|
||||
Ecore_Win32_Dnd_DropTarget_Callback callback)
|
||||
{
|
||||
struct _Ecore_Win32_Window *wnd = (struct _Ecore_Win32_Window *)window;
|
||||
|
||||
if (window == NULL)
|
||||
return 0;
|
||||
|
||||
struct _Ecore_Win32_Window *wnd = (struct _Ecore_Win32_Window *)window;
|
||||
wnd->dnd_drop_target = _ecore_win32_dnd_register_drop_window(wnd->window,
|
||||
callback,
|
||||
(void *)wnd);
|
||||
|
@ -124,10 +123,11 @@ int ecore_win32_dnd_register_drop_target(Ecore_Win32_Window *win
|
|||
|
||||
void ecore_win32_dnd_unregister_drop_target(Ecore_Win32_Window *window)
|
||||
{
|
||||
struct _Ecore_Win32_Window *wnd = (struct _Ecore_Win32_Window *)window;
|
||||
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
struct _Ecore_Win32_Window *wnd = (struct _Ecore_Win32_Window *)window;
|
||||
if (wnd->dnd_drop_target != NULL)
|
||||
_ecore_win32_dnd_unregister_drop_window(wnd->window, wnd->dnd_drop_target);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue