Alexandre Julliard | 75a839a | 1993-07-15 11:13:45 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Window definitions |
| 3 | * |
| 4 | * Copyright 1993 Alexandre Julliard |
| 5 | */ |
| 6 | |
| 7 | #ifndef WIN_H |
| 8 | #define WIN_H |
| 9 | |
Alexandre Julliard | cdd0923 | 1994-01-12 11:12:51 +0000 | [diff] [blame] | 10 | #include <X11/Xlib.h> |
Alexandre Julliard | 75a839a | 1993-07-15 11:13:45 +0000 | [diff] [blame] | 11 | |
Alexandre Julliard | e2abbb1 | 1995-03-19 17:39:39 +0000 | [diff] [blame] | 12 | #include "ldt.h" |
Alexandre Julliard | aca0578 | 1994-10-17 18:12:41 +0000 | [diff] [blame] | 13 | #include "class.h" |
Alexandre Julliard | 75a839a | 1993-07-15 11:13:45 +0000 | [diff] [blame] | 14 | |
| 15 | #define WND_MAGIC 0x444e4957 /* 'WIND' */ |
| 16 | |
Alexandre Julliard | fb9a919 | 1994-03-01 19:48:04 +0000 | [diff] [blame] | 17 | /* Built-in class names (see _Undocumented_Windows_ p.418) */ |
| 18 | #define POPUPMENU_CLASS_NAME "#32768" /* PopupMenu */ |
| 19 | #define DESKTOP_CLASS_NAME "#32769" /* Desktop */ |
| 20 | #define DIALOG_CLASS_NAME "#32770" /* Dialog */ |
| 21 | #define WINSWITCH_CLASS_NAME "#32771" /* WinSwitch */ |
| 22 | #define ICONTITLE_CLASS_NAME "#32772" /* IconTitle */ |
Alexandre Julliard | 75a839a | 1993-07-15 11:13:45 +0000 | [diff] [blame] | 23 | |
Alexandre Julliard | 808cb04 | 1995-08-17 17:11:36 +0000 | [diff] [blame] | 24 | #define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */ |
| 25 | #define DESKTOP_CLASS_ATOM MAKEINTATOM(32769) /* Desktop */ |
| 26 | #define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */ |
| 27 | #define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */ |
| 28 | #define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */ |
| 29 | |
Alexandre Julliard | 75a839a | 1993-07-15 11:13:45 +0000 | [diff] [blame] | 30 | typedef struct tagWND |
| 31 | { |
Alexandre Julliard | 2ace16a | 1996-04-28 15:09:19 +0000 | [diff] [blame] | 32 | struct tagWND *next; /* Next sibling */ |
| 33 | struct tagWND *child; /* First child */ |
| 34 | struct tagWND *parent; /* Window parent (from CreateWindow) */ |
| 35 | struct tagWND *owner; /* Window owner */ |
| 36 | CLASS *class; /* Window class */ |
| 37 | DWORD dwMagic; /* Magic number (must be WND_MAGIC) */ |
| 38 | HWND hwndSelf; /* Handle of this window */ |
| 39 | HANDLE hInstance; /* Window hInstance (from CreateWindow) */ |
| 40 | RECT rectClient; /* Client area rel. to parent client area */ |
| 41 | RECT rectWindow; /* Whole window rel. to parent client area */ |
| 42 | RECT rectNormal; /* Window rect. when in normal state */ |
| 43 | POINT ptIconPos; /* Icon position */ |
| 44 | POINT ptMaxPos; /* Maximized window position */ |
| 45 | HGLOBAL hmemTaskQ; /* Task queue global memory handle */ |
| 46 | HRGN hrgnUpdate; /* Update region */ |
| 47 | HWND hwndLastActive;/* Last active popup hwnd */ |
| 48 | WNDPROC lpfnWndProc; /* Window procedure */ |
| 49 | DWORD dwStyle; /* Window style (from CreateWindow) */ |
| 50 | DWORD dwExStyle; /* Extended style (from CreateWindowEx) */ |
| 51 | HANDLE hdce; /* Window DCE (if CS_OWNDC or CS_CLASSDC) */ |
| 52 | HANDLE hVScroll; /* Vertical scroll-bar info */ |
| 53 | HANDLE hHScroll; /* Horizontal scroll-bar info */ |
| 54 | UINT wIDmenu; /* ID or hmenu (from CreateWindow) */ |
| 55 | HANDLE hText; /* Handle of window text */ |
| 56 | WORD flags; /* Misc. flags (see below) */ |
| 57 | Window window; /* X window (only for top-level windows) */ |
| 58 | HMENU hSysMenu; /* window's copy of System Menu */ |
| 59 | HANDLE hProp; /* Handle of Properties List */ |
| 60 | WORD wExtra[1]; /* Window extra bytes */ |
Alexandre Julliard | 75a839a | 1993-07-15 11:13:45 +0000 | [diff] [blame] | 61 | } WND; |
| 62 | |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 63 | /* WND flags values */ |
Alexandre Julliard | 0c126c7 | 1996-02-18 18:44:41 +0000 | [diff] [blame] | 64 | #define WIN_NEEDS_BEGINPAINT 0x0001 /* WM_PAINT sent to window */ |
| 65 | #define WIN_NEEDS_ERASEBKGND 0x0002 /* WM_ERASEBKGND must be sent to window*/ |
| 66 | #define WIN_NEEDS_NCPAINT 0x0004 /* WM_NCPAINT must be sent to window */ |
| 67 | #define WIN_RESTORE_MAX 0x0008 /* Maximize when restoring */ |
| 68 | #define WIN_INTERNAL_PAINT 0x0010 /* Internal WM_PAINT message pending */ |
| 69 | #define WIN_NO_REDRAW 0x0020 /* WM_SETREDRAW called for this window */ |
| 70 | #define WIN_GOT_SIZEMSG 0x0040 /* WM_SIZE has been sent to the window */ |
| 71 | #define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */ |
| 72 | #define WIN_MANAGED 0x0100 /* Window managed by the X wm */ |
Alexandre Julliard | aca0578 | 1994-10-17 18:12:41 +0000 | [diff] [blame] | 73 | |
Alexandre Julliard | f0b2354 | 1993-09-29 12:21:49 +0000 | [diff] [blame] | 74 | /* Window functions */ |
Alexandre Julliard | 7cbe657 | 1995-01-09 18:21:16 +0000 | [diff] [blame] | 75 | extern WND *WIN_FindWndPtr( HWND hwnd ); |
Alexandre Julliard | 59730ae | 1996-03-24 16:20:51 +0000 | [diff] [blame] | 76 | extern WND *WIN_GetDesktop(void); |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 77 | extern void WIN_DumpWindow( HWND hwnd ); |
| 78 | extern void WIN_WalkWindows( HWND hwnd, int indent ); |
Alexandre Julliard | 7cbe657 | 1995-01-09 18:21:16 +0000 | [diff] [blame] | 79 | extern Window WIN_GetXWindow( HWND hwnd ); |
| 80 | extern BOOL WIN_UnlinkWindow( HWND hwnd ); |
| 81 | extern BOOL WIN_LinkWindow( HWND hwnd, HWND hwndInsertAfter ); |
Alexandre Julliard | c981d0b | 1996-03-31 16:40:13 +0000 | [diff] [blame] | 82 | extern HWND WIN_FindWinToRepaint( HWND hwnd, HQUEUE hQueue ); |
Alexandre Julliard | af0bae5 | 1995-10-03 17:06:08 +0000 | [diff] [blame] | 83 | extern void WIN_SendParentNotify( HWND hwnd, WORD event, |
| 84 | WORD idChild, LONG lValue ); |
Alexandre Julliard | 7cbe657 | 1995-01-09 18:21:16 +0000 | [diff] [blame] | 85 | extern BOOL WIN_CreateDesktopWindow(void); |
Alexandre Julliard | e2991ea | 1995-07-29 13:09:43 +0000 | [diff] [blame] | 86 | extern HWND WIN_GetTopParent( HWND hwnd ); |
Alexandre Julliard | af0bae5 | 1995-10-03 17:06:08 +0000 | [diff] [blame] | 87 | extern HINSTANCE WIN_GetWindowInstance( HWND hwnd ); |
Alexandre Julliard | 75a839a | 1993-07-15 11:13:45 +0000 | [diff] [blame] | 88 | |
Alexandre Julliard | fb9a919 | 1994-03-01 19:48:04 +0000 | [diff] [blame] | 89 | extern Display * display; |
| 90 | extern Screen * screen; |
Alexandre Julliard | 8d24ae6 | 1994-04-05 21:42:43 +0000 | [diff] [blame] | 91 | extern Window rootWindow; |
Alexandre Julliard | 75a839a | 1993-07-15 11:13:45 +0000 | [diff] [blame] | 92 | |
| 93 | #endif /* WIN_H */ |