GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
#endif /* GL_GLEXT_PROTOTYPES */
+#ifndef _W64
typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+#endif
typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
#endif
"ungif"
],
"LibraryDirs" : [
- "../deps/zlib/obj/release.$(PLATFORM)",
- "../deps/jpeg-6b/obj/release.$(PLATFORM)",
- "../deps/libpng-1.4.0/obj/release.$(PLATFORM)",
- "../deps/libungif-4.1.1/obj/release.$(PLATFORM)",
- "../deps/freetype-2.3.12/obj/release.$(PLATFORM)"
+ "../deps/zlib/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)",
+ "../deps/jpeg-6b/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)",
+ "../deps/libpng-1.4.0/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)",
+ "../deps/libungif-4.1.1/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)",
+ "../deps/freetype-2.3.12/obj/release.$(PLATFORM)$(COMPILER_SUFFIX)"
]
}
},
}
if(library)
{
+#ifdef _WIN64
+ *Load = (void *)GetProcAddress(library, "__ecereDll_Load");
+ *Unload = (void *)GetProcAddress(library, "__ecereDll_Unload");
+#else
*Load = (void *)GetProcAddress(library, "__ecereDll_Load@4");
*Unload = (void *)GetProcAddress(library, "__ecereDll_Unload@4");
+#endif
if(!*Load)
FreeLibrary(library);
}
#include <setjmp.h>
-typedef uint size_t;
+typedef uintptr size_t; // For now, until we add uintsize
#include "jpeglib.h"
#include "jerror.h"
#define uint _uint
#define byte _byte
#define int64 _int64
+#define String _String
+#define Mutex _Mutex
+#define Size _Size
+#define Platform _Platform
#include <windows.h>
-#if defined(__MINGW32__)
+#if defined(__MINGW32__) && !defined(_W64)
#undef DECLARE_INTERFACE
#define DECLARE_INTERFACE(i) \
interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; }; \
#undef uint
#undef byte
#undef int64
+#undef String
+#undef Mutex
+#undef Size
+#undef Platform
import "Display"
#define uint _uint
#define byte _byte
#define int64 _int64
+#define String _String
+#define Mutex _Mutex
+#define Size _Size
+#define Platform _Platform
#include <windows.h>
-#if defined(__MINGW32__)
+#if defined(__MINGW32__) && !defined(_W64)
#undef DECLARE_INTERFACE
#define DECLARE_INTERFACE(i) \
interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; }; \
#endif
#include <d3d9.h>
+
#undef Method
#undef uint
#undef byte
#undef int64
+#undef String
+#undef Mutex
+#undef Size
+#undef Platform
import "Display"
#if defined(__WIN32__)
-#if defined(__MINGW32__)
+#define Method _Method
+#define uint _uint
+#define byte _byte
+#define int64 _int64
+#define String _String
+#define Mutex _Mutex
+#define Size _Size
+#define Platform _Platform
+#if defined(__MINGW32__) && !defined(_W64)
#undef DECLARE_INTERFACE
-# define DECLARE_INTERFACE(i) \
+#define DECLARE_INTERFACE(i) \
interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; }; \
typedef CONST_VTABLE struct i##Vtbl i##Vtbl; \
CONST_VTABLE struct i##Vtbl
-
#endif
-// #define HRESULT int
-#define Method _Method
-#define uint _uint
-#define byte _byte
-#define int64 _int64
-
#define UNICODE
#include <ddraw.h>
#undef uint
#undef byte
#undef int64
+#undef String
+#undef Mutex
+#undef Size
+#undef Platform
import "Display"
#define _WIN32_WINNT 0x0500
#define WIN32_LEAN_AND_MEAN
#define Method _Method
+#define String _String
#include <windows.h>
#undef Method
+#undef String
import "Display"
import "Win32Interface"
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
+#define String _String
#include <windows.h>
+#undef String
#elif !defined(ECERE_NOTRUETYPE) && !defined(ECERE_NOFONTCONFIG)
#define set _set
#include <fontconfig/fontconfig.h>
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
#define _WIN32_WINNT 0x0500
+#define String Sting_
#include <windows.h>
+#undef String
#endif
#if defined(__ANDROID__)
#define WIN32_LEAN_AND_MEAN
#define UNICODE
#define Method _Method
+#define String _String
#include <windows.h>
#include <winspool.h>
#undef Method
+#undef String
default wchar_t *wcstok(wchar_t *strToken,const wchar_t *strDelimit);
#define WIN32_LEAN_AND_MEAN
#define Method _Method
+#define String _String
#include <windows.h>
+#undef String
#undef Method
import "Display"
#define WIN32_LEAN_AND_MEAN
#define UNICODE
#define Method _Method
+#define String _String
#include <windows.h>
#include <winspool.h>
#undef Method
+#undef String
default wchar_t *wcstok(wchar_t *strToken,const wchar_t *strDelimit);
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
+#define String _String
#include <winsock.h>
+#undef String
static WSADATA wsaData;
#elif defined(__unix__) || defined(__APPLE__)
}
*/
- captionFont = guiApp.currentSkin.CaptionFont();
+ captionFont = guiApp.currentSkin ? guiApp.currentSkin.CaptionFont() : null;
AddResource(captionFont);
if(OnLoadGraphics())
#define WIN32_LEAN_AND_MEAN
#define Method _Method
+#define String _String
#include <windows.h>
#include <mmsystem.h>
#undef Method
+#undef String
import "Display"
#define Method _Method
#define byte _byte
#define int64 _int64
+#define String _String
+#define Mutex _Mutex
+#define Platform _Platform
#include <windows.h>
#include <wincon.h>
#include <shellapi.h>
#undef Method
#undef byte
#undef int64
+#undef String
+#undef Mutex
+#undef Platform
import "Window"
if(time - lastAutoHideCheck > 1)
{
APPBARDATA appBarData = { 0 };
- newTaskBarState = SHAppBarMessage(ABM_GETSTATE, &appBarData);
+ newTaskBarState = (int)SHAppBarMessage(ABM_GETSTATE, &appBarData);
lastAutoHideCheck = time;
}
// --- Window procedure ---
DWORD CALLBACK ::ApplicationWindow(HWND windowHandle, UINT msg, WPARAM wParam, LPARAM lParam)
{
+#ifdef _WIN64
+ Window window = (Window)GetWindowLongPtr(windowHandle, GWLP_USERDATA);
+#else
Window window = (Window)GetWindowLong(windowHandle, GWL_USERDATA);
+#endif
static Point lastPos;
if(window)
{
{
HWND foreground;
DWORD id;
- uint windowLong;
+ void * windowLong;
foreground = GetForegroundWindow();
if(foreground == windowHandle && lParam)
foreground = (HWND)lParam;
GetWindowThreadProcessId(foreground, &id);
- windowLong = GetWindowLong(foreground, GWL_WNDPROC);
+#ifdef _WIN64
+ windowLong = (void*)GetWindowLongPtr(foreground, GWLP_WNDPROC);
+#else
+ windowLong = (void*)GetWindowLong(foreground, GWL_WNDPROC);
+#endif
#if !defined(ECERE_VANILLA) && !defined(ECERE_NO3D)
// The != ApplicationWindow check is for not recognizing the Console window as an Ecere Window
// That check causes a problem with the OpenGL driver which seems to popup a window of a different class
if(window.displaySystem && window.displaySystem.driver == class(OpenGLDisplayDriver))
- windowLong = (uint)ApplicationWindow;
+ windowLong = (void *)ApplicationWindow;
#endif
- if(id != GetCurrentProcessId() || windowLong != (LPARAM)ApplicationWindow)
+ if(id != GetCurrentProcessId() || windowLong != (void *)ApplicationWindow)
window.ExternalActivate(false, true, window, null);
// DefWindowProc for WM_NCACTIVATE draws the decorations, make sure it's drawn in the right state
return (uint)DefWindowProc(windowHandle, msg, window.active, lParam);
SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOSIZE); //|SWP_NOREDRAW);
*/
}
- guiApp.SetAppFocus(wParam);
+ guiApp.SetAppFocus((bool)wParam);
}
}
else
- guiApp.SetAppFocus(wParam);
+ guiApp.SetAppFocus((bool)wParam);
break;
case WM_PAINT:
{
static int lastRes = 0;
if(lastBits != wParam || lastRes != lParam)
{
- lastBits = wParam;
- lastRes = lParam;
+ lastBits = (int)wParam;
+ lastRes = (int)lParam;
externalDisplayChange = true;
if(guiApp.desktop.DisplayModeChanged())
incref window;
if(msg == WM_CHAR || msg == WM_DEADCHAR || PeekMessage(&charMsg, windowHandle, min, max, PM_REMOVE))
{
- ch = (msg == WM_CHAR || msg == WM_DEADCHAR) ? wParam : (unichar)charMsg.wParam;
+ ch = (msg == WM_CHAR || msg == WM_DEADCHAR) ? (unichar)wParam : (unichar)charMsg.wParam;
// TOCHECK: What is this for again? Fixing some obscure activation status?
// -- I believe this was somehow allowing 'unmaximizing', but was causing problems
// as there was no way to prevent AltEnter from doing so (e.g. when it is used for a node property)
font.lfOutPrecision = OUT_DEFAULT_PRECIS;
font.lfClipPrecision = CLIP_DEFAULT_PRECIS;
font.lfQuality = DEFAULT_QUALITY;
- font.lfPitchAndFamily = (byte)DEFAULT_PITCH|FF_DONTCARE; // TODO: Fix compiler 0 | 0 to produce byte, not int
+ font.lfPitchAndFamily = (byte)(DEFAULT_PITCH|FF_DONTCARE); // TODO: Fix compiler 0 | 0 to produce byte, not int
UTF8toUTF16Buffer(res.faceName, font.lfFaceName, LF_FACESIZE);
ImmSetCompositionFont(ctx, &font);
/// DRIVER IMPLEMENTATION /////////////
****************************************************************************/
+#ifdef _WIN64
+ void CALLBACK ::TimerProc(UINT uTimerID, UINT uMsg, uint64 dwUser, uint64 dw1, uint64 dw2)
+#else
void CALLBACK ::TimerProc(UINT uTimerID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
+#endif
{
guiApp.SignalEvent();
}
}
}
delete text;
+#ifdef _WIN64
+ SetWindowLongPtr(windowHandle, GWLP_USERDATA, (int64)window);
+#else
SetWindowLong(windowHandle, GWL_USERDATA, (DWORD)window);
+#endif
return windowHandle;
}
guiApp.lockMutex.Release();
oldIcon = (HICON)SendMessage(window.windowHandle, WM_GETICON, ICON_BIG, 0);
+#ifdef _WIN64
+ if(oldIcon && oldIcon != (HICON)GetClassLongPtr(window.windowHandle, GCLP_HICON))
+#else
if(oldIcon && oldIcon != (HICON)GetClassLong(window.windowHandle, GCL_HICON))
+#endif
DestroyIcon(oldIcon);
ShowWindow(window.windowHandle, SW_HIDE);
+#ifdef _WIN64
+ SetWindowLongPtr(window.windowHandle, GWLP_USERDATA, (int64)null);
+#else
SetWindowLong(window.windowHandle, GWL_USERDATA, 0);
+#endif
DestroyWindow(window.windowHandle);
for(c = 0; c < lockCount; c++)
}
}
+#ifdef _WIN64
+ if(oldIcon && oldIcon != (HICON)GetClassLongPtr(window.windowHandle, GCLP_HICON))
+#else
if(oldIcon && oldIcon != (HICON)GetClassLong(window.windowHandle, GCL_HICON))
+#endif
{
DestroyIcon(oldIcon);
}
#if defined(WIN32)
#define WIN32_LEAN_AND_MEAN
+#define String _String
#define Method _Method
#include <windows.h>
#undef Method
+#undef String
#endif
import "Window"
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
+#define String _String
#include <winsock.h>
+#undef String
static WSADATA wsaData;
#elif defined(__unix__) || defined(__APPLE__)
FD_SET(s, &network.exceptSet);
if(s >= network.ns)
{
- network.ns = s+1;
+ network.ns = (int)(s+1);
network.socketsSemaphore.Release();
}
network.mutex.Release();
//FD_SET(s, &ws);
FD_SET(s, &es);
- selectResult = select(s+1, &rs, &ws, &es, &tvTO);
+ selectResult = select((int)(s+1), &rs, &ws, &es, &tvTO);
if(selectResult > 0)
{
if(FD_ISSET(s, &rs))
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
+#define String _String
#include <winsock.h>
+#undef String
static WSADATA wsaData;
#elif defined(__unix__) || defined(__APPLE__)
socket.inetPort = ntohs(socket.a.sin_port);
network.mutex.Release();
- if(socket.OnEstablishConnection(socket.s))
+ if(socket.OnEstablishConnection((int)socket.s))
{
network.mutex.Wait();
result = true;
FD_SET(s, &network.readSet);
if(s >= network.ns)
{
- network.ns = s+1;
+ network.ns = (int)(s+1);
network.socketsSemaphore.Release();
}
network.mutex.Release();
bool SendString(char * string)
{
- return Send(string, strlen(string));
+ return Send(string, (int)strlen(string));
}
bool Sendf(char * format, ...)
va_start(args, format);
vsnprintf(string, sizeof(string), format, args);
string[sizeof(string)-1] = 0;
- result = Send(string, strlen(string));
+ result = Send(string, (int)strlen(string));
va_end(args);
return result;
}
FD_SET(s, &network.exceptSet);
if(s >= network.ns)
{
- network.ns = s+1;
+ network.ns = (int)(s+1);
network.socketsSemaphore.Release();
}
network.mutex.Release();
FD_SET(s, &network.writeSet);
if(s >= network.ns && !processAlone)
{
- network.ns = s+1;
+ network.ns = (int)(s+1);
network.socketsSemaphore.Release();
}
connectThread = SocketConnectThread { socket = this };
//FD_SET(s, &ws);
FD_SET(s, &es);
- selectResult = select(s+1, &rs, &ws, &es, leftOver ? &tv : (timeOut ? &tvTO : null));
+ selectResult = select((int)(s+1), &rs, &ws, &es, leftOver ? &tv : (timeOut ? &tvTO : null));
mutex.Wait();
if(s != -1 && _refCount && (leftOver || selectResult))
{
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
+#define String _String
#include <winsock.h>
+#undef String
static WSADATA wsaData;
#elif defined(__unix__) || defined(__APPLE__)
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
+#define String _String
#include <winsock.h>
+#undef String
static WSADATA wsaData;
#elif defined(__unix__) || defined(__APPLE__)
network.ns = 0;
for(socket = network.sockets.first; socket; socket = socket.next)
if(!socket.processAlone && !socket.destroyed && socket.s >= network.ns)
- network.ns = socket.s + 1;
+ network.ns = (int)(socket.s + 1);
for(socket = network.connectSockets.first; socket; socket = socket.next)
if(!socket.destroyed && socket.s >= network.ns)
- network.ns = socket.s + 1;
+ network.ns = (int)(socket.s + 1);
for(service = network.services.first; service; service = service.next)
{
if(!service.destroyed && !service.processAlone)
{
if(service.s >= network.ns)
- network.ns = service.s + 1;
+ network.ns = (int)(service.s + 1);
}
for(socket = service.sockets.first; socket; socket = socket.next)
if(!socket.destroyed && !socket.processAlone && socket.s >= network.ns)
- network.ns = socket.s + 1;
+ network.ns = (int)(socket.s + 1);
}
network.mutex.Release();
}
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
+#define String String_
#include <windows.h>
+#undef String
#include <io.h>
BOOL WINAPI GetVolumePathName(LPCTSTR lpszFileName,LPTSTR lpszVolumePathName,DWORD cchBufferLength);
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
#define UNICODE
+#define String String_
#include <windows.h>
+#undef String
#endif
import "System"
// Platform includes
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
+#define String String_
#include <windows.h>
+#undef String
#elif defined(__APPLE__)
#define set _set
#include <mach/mach.h>
#define WIN32_LEAN_AND_MEAN
#define UNICODE
#define GetFreeSpace _GetFreeSpace
+#define String String_
#include <windows.h>
+#undef String
#undef GetFreeSpace
#elif defined(__unix__) || defined(__APPLE__)
// Platform includes
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
+#define String String_
+#define Thread Thread_
#include <windows.h>
+#undef String
+#undef Thread
#else
#include <pthread.h>
#ifndef __ANDROID__
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
+#define String String_
#include <windows.h>
+#undef String
#include <mmsystem.h>
#elif defined(__unix__) || defined(__APPLE__)
#include <sys/time.h>