PATCH: GetX11WindowId()

Nikolas Zimmermann wildfox at kde.org
Tue May 29 12:58:14 CDT 2001


Hi there,

this is my first wine patch.
it allows the coder to get the X11 Window Id 
of a HWND.

People ask me why this belongs into x11drv
and why i need it.
ActiveX support for Konqueror, Malte Starostik
(who will post some oleaut and urlmon patches soon)
and me are working on this.

I need to embed the created window, therefore
i need this window id.

Thank you in advance

Bye
 Bye
  Niko

-- 
Nikolas Zimmermann
wildfox at kde.org
-------------- next part --------------
Index: dlls/x11drv/window.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/window.c,v
retrieving revision 1.4
diff -u -p -b -r1.4 window.c
--- dlls/x11drv/window.c        2001/05/16 19:52:30     1.4
+++ dlls/x11drv/window.c        2001/05/29 17:27:00
@@ -191,6 +191,26 @@ static void create_desktop( Display *dis
 
 
 /**********************************************************************
+ *             GetWindowId   (X11DRV.@)
+ */
+int X11DRV_GetWindowId( HWND hwnd )
+{
+    X11DRV_WND_DATA *data;
+    WND *wndPtr = WIN_FindWndPtr( hwnd );
+    INT windowid = -1;
+
+    if (wndPtr)
+    {
+       data = wndPtr->pDriverData;
+       windowid = (INT) data->window;
+    }
+    WIN_ReleaseWndPtr( wndPtr );
+
+    return windowid;
+}
+
+
+/**********************************************************************
  *             CreateWindow   (X11DRV.@)
  */
 BOOL X11DRV_CreateWindow( HWND hwnd )
Index: dlls/x11drv/x11drv.spec
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/x11drv.spec,v
retrieving revision 1.14
diff -u -p -b -r1.14 x11drv.spec
--- dlls/x11drv/x11drv.spec     2001/05/18 22:51:56     1.14
+++ dlls/x11drv/x11drv.spec     2001/05/29 17:27:00
@@ -27,6 +27,7 @@ debug_channels (bitblt bitmap clipboard
 @ cdecl GetScreenSaveTimeout() X11DRV_GetScreenSaveTimeout
 @ cdecl SetScreenSaveTimeout(long) X11DRV_SetScreenSaveTimeout
 @ cdecl LoadOEMResource(long long) X11DRV_LoadOEMResource
+@ cdecl GetX11WindowId(long) X11DRV_GetWindowId
 @ cdecl CreateWindow(long) X11DRV_CreateWindow
 @ cdecl DestroyWindow(long) X11DRV_DestroyWindow
 @ cdecl GetDC(long long long long) X11DRV_GetDC
Index: include/winuser.h
===================================================================
RCS file: /home/wine/wine/include/winuser.h,v
retrieving revision 1.106
diff -u -p -b -r1.106 winuser.h
--- include/winuser.h   2001/05/18 22:51:56     1.106
+++ include/winuser.h   2001/05/29 17:27:05
@@ -3373,6 +3373,8 @@ HMENU     WINAPI CreatePopupMenu(void);
             CreateWindowExW(0,className,titleName,style,x,y,width,height,\
                               parent,menu,instance,param)
 #define     CreateWindow WINELIB_NAME_AW(CreateWindow)
+INT       WINAPI GetX11WindowId(HWND);
+
 HWND      WINAPI CreateWindowExA(DWORD,LPCSTR,LPCSTR,DWORD,INT,INT,
                                 INT,INT,HWND,HMENU,HINSTANCE,LPVOID);
 HWND      WINAPI CreateWindowExW(DWORD,LPCWSTR,LPCWSTR,DWORD,INT,INT,



More information about the wine-devel mailing list