Author: fireball
Date: Sat Jul 18 21:07:50 2009
New Revision: 42061
URL:
http://svn.reactos.org/svn/reactos?rev=42061&view=rev
Log:
- Add winex11.drv to the build.
- Import poll.c from wine/port.h.
- Add supporting code in rosglue.c.
Added:
branches/arwinss/reactos/dll/win32/winex11.drv/poll.c (with props)
branches/arwinss/reactos/dll/win32/winex11.drv/rosglue.c (with props)
branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rbuild (with props)
branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rc (with props)
Modified:
branches/arwinss/reactos/dll/win32/win32.rbuild
Modified: branches/arwinss/reactos/dll/win32/win32.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/win32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/win32.rbuild [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/win32.rbuild [iso-8859-1] Sat Jul 18 21:07:50 2009
@@ -574,6 +574,9 @@
<directory name="winemp3.acm">
<xi:include href="winemp3.acm/winemp3.acm.rbuild" />
</directory>
+<directory name="winex11.drv">
+ <xi:include href="winex11.drv/winex11.rbuild" />
+</directory>
<directory name="winfax">
<xi:include href="winfax/winfax.rbuild" />
</directory>
Added: branches/arwinss/reactos/dll/win32/winex11.drv/poll.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/poll.c (added)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/poll.c [iso-8859-1] Sat Jul 18 21:07:50
2009
@@ -1,0 +1,94 @@
+/*
+ * poll function
+ *
+ * Copyright 2008 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#ifndef HAVE_POLL
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+/* we can't include winsock2.h here so we have to duplicate the definitions for
Windows */
+#if defined(__MINGW32__) || defined(_MSC_VER)
+
+#define FD_SETSIZE 64
+
+typedef struct
+{
+ unsigned int fd_count;
+ int fd_array[FD_SETSIZE]; /* an array of SOCKETs */
+} fd_set;
+
+#define FD_ZERO(set) ((set)->fd_count = 0)
+#define FD_ISSET(fd, set) __WSAFDIsSet((fd), (set))
+#define FD_SET(fd, set) do { if ((set)->fd_count < FD_SETSIZE)
(set)->fd_array[(set)->fd_count++]=(fd); } while(0)
+
+int __stdcall select(int,fd_set*,fd_set*,fd_set*,const struct timeval*);
+int __stdcall __WSAFDIsSet(int,fd_set*);
+
+#endif
+
+int poll( struct pollfd *fds, unsigned int count, int timeout )
+{
+ fd_set read_set, write_set, except_set;
+ unsigned int i;
+ int maxfd = -1, ret;
+
+ FD_ZERO( &read_set );
+ FD_ZERO( &write_set );
+ FD_ZERO( &except_set );
+
+ for (i = 0; i < count; i++)
+ {
+ if (fds[i].fd == -1) continue;
+ if (fds[i].events & (POLLIN|POLLPRI)) FD_SET( fds[i].fd, &read_set );
+ if (fds[i].events & POLLOUT) FD_SET( fds[i].fd, &write_set );
+ FD_SET( fds[i].fd, &except_set ); /* POLLERR etc. are always selected */
+ if (fds[i].fd > maxfd) maxfd = fds[i].fd;
+ }
+ if (timeout != -1)
+ {
+ struct timeval tv;
+ tv.tv_sec = timeout / 1000;
+ tv.tv_usec = timeout % 1000;
+ ret = select( maxfd + 1, &read_set, &write_set, &except_set, &tv
);
+ }
+ else ret = select( maxfd + 1, &read_set, &write_set, &except_set, NULL
);
+
+ if (ret >= 0)
+ {
+ for (i = 0; i < count; i++)
+ {
+ fds[i].revents = 0;
+ if (fds[i].fd == -1) continue;
+ if (FD_ISSET( fds[i].fd, &read_set )) fds[i].revents |= POLLIN;
+ if (FD_ISSET( fds[i].fd, &write_set )) fds[i].revents |= POLLOUT;
+ if (FD_ISSET( fds[i].fd, &except_set )) fds[i].revents |= POLLERR;
+ }
+ }
+ return ret;
+}
+
+#endif /* HAVE_POLL */
Propchange: branches/arwinss/reactos/dll/win32/winex11.drv/poll.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: branches/arwinss/reactos/dll/win32/winex11.drv/rosglue.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/rosglue.c (added)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/rosglue.c [iso-8859-1] Sat Jul 18
21:07:50 2009
@@ -1,0 +1,76 @@
+#include "config.h"
+
+#include <assert.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "x11drv.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(x11glue);
+
+int usleep (unsigned int useconds)
+{
+ //return _usleep(useconds);
+ return 0;
+}
+
+//void xinerama_init( unsigned int width, unsigned int height )
+//{
+//}
+
+WCHAR *wine_get_dos_file_name(char *path)
+{
+ ERR("wine_get_dos_file_name(%s) unimplemented!\n", path);
+ return NULL;
+}
+
+/***********************************************************************
+ * X11DRV_AttachEventQueueToTablet (X11DRV.@)
+ */
+int CDECL X11DRV_AttachEventQueueToTablet(HWND hOwner)
+{
+ return 0;
+}
+
+/***********************************************************************
+ * X11DRV_GetCurrentPacket (X11DRV.@)
+ */
+int CDECL X11DRV_GetCurrentPacket(void *packet)
+{
+ //*packet = gMsgPacket;
+ return 1;
+}
+
+/***********************************************************************
+ * X11DRV_LoadTabletInfo (X11DRV.@)
+ */
+void CDECL X11DRV_LoadTabletInfo(HWND hwnddefault)
+{
+}
+
+/***********************************************************************
+ * X11DRV_WTInfoW (X11DRV.@)
+ */
+UINT CDECL X11DRV_WTInfoW(UINT wCategory, UINT nIndex, LPVOID lpOutput)
+{
+ return FALSE;
+}
+
+INT X11DRV_DCICommand(INT cbInput, const DCICMD *lpCmd, LPVOID lpOutData)
+{
+ TRACE("(%d,(%d,%d,%d),%p)\n", cbInput, lpCmd->dwCommand,
+ lpCmd->dwParam1, lpCmd->dwParam2, lpOutData);
+
+ return FALSE;
+}
+
+void X11DRV_DDHAL_SwitchMode(DWORD dwModeIndex, LPVOID fb_addr, LPVIDMEM fb_mem)
+{
+}
+
Propchange: branches/arwinss/reactos/dll/win32/winex11.drv/rosglue.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rbuild (added)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rbuild [iso-8859-1] Sat Jul 18
21:07:50 2009
@@ -1,0 +1,54 @@
+<module name="winex11" type="win32dll"
baseaddress="${BASEADDRESS_SMDLL}" installbase="system32"
installname="winex11.drv" allowwarnings="true">
+ <importlibrary definition="winex11.drv.spec" />
+ <include base="winex11">.</include>
+ <include base="ReactOS">include/reactos/wine</include>
+ <define name="WINVER">0x0600</define>
+ <define name="_WIN32_WINNT">0x0501</define>
+ <define name="__WINESRC__" />
+ <file>bitblt.c</file>
+ <file>bitmap.c</file>
+ <file>brush.c</file>
+ <file>clipboard.c</file>
+ <file>codepage.c</file>
+ <file>desktop.c</file>
+ <file>dib.c</file>
+ <file>dib_convert.c</file>
+ <file>dib_dst_swap.c</file>
+ <file>dib_src_swap.c</file>
+ <file>event.c</file>
+ <file>graphics.c</file>
+ <file>ime.c</file>
+ <file>init.c</file>
+ <file>keyboard.c</file>
+ <file>mouse.c</file>
+ <file>opengl.c</file>
+ <file>palette.c</file>
+ <file>poll.c</file>
+ <file>pen.c</file>
+ <file>rosglue.c</file>
+ <file>scroll.c</file>
+ <file>settings.c</file>
+ <file>systray.c</file>
+ <file>text.c</file>
+ <file>window.c</file>
+ <file>x11drv_main.c</file>
+ <file>xdnd.c</file>
+ <file>xim.c</file>
+ <file>xfont.c</file>
+ <file>xinerama.c</file>
+ <file>xrender.c</file>
+ <file>xvidmode.c</file>
+
+ <file>winex11.rc</file>
+
+ <library>libX11</library>
+ <library>advapi32</library>
+ <library>wine</library>
+ <library>imm32</library>
+ <library>gdi32</library>
+ <library>user32</library>
+ <library>kernel32</library>
+ <library>ws2_32</library>
+ <library>ntdll</library>
+ <library>win32ksys</library>
+</module>
Propchange: branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rbuild
------------------------------------------------------------------------------
svn:eol-style = native
Added: branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rc
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex…
==============================================================================
--- branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rc (added)
+++ branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rc [iso-8859-1] Sat Jul 18
21:07:50 2009
@@ -1,0 +1,4 @@
+#define REACTOS_STR_FILE_DESCRIPTION "ReactOS SM Helper\0"
+#define REACTOS_STR_INTERNAL_NAME "smdll.dll\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "smdll.dll\0"
+#include <reactos/version.rc>
Propchange: branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rc
------------------------------------------------------------------------------
svn:eol-style = native