2 * Focus and activation functions
4 * Copyright 1993 David Metcalfe
5 * Copyright 1995 Alex Korobka
6 * Copyright 1994, 2002 Alexandre Julliard
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "user_private.h"
24 #include "wine/server.h"
27 /*******************************************************************
28 * SetForegroundWindow (USER32.@)
30 BOOL WINAPI
SetForegroundWindow( HWND hwnd
)
32 return NtUserSetForegroundWindow( hwnd
);
36 /*******************************************************************
37 * GetActiveWindow (USER32.@)
39 HWND WINAPI
GetActiveWindow(void)
42 info
.cbSize
= sizeof(info
);
43 return NtUserGetGUIThreadInfo( GetCurrentThreadId(), &info
) ? info
.hwndActive
: 0;
47 /*****************************************************************
50 HWND WINAPI
GetFocus(void)
53 info
.cbSize
= sizeof(info
);
54 return NtUserGetGUIThreadInfo( GetCurrentThreadId(), &info
) ? info
.hwndFocus
: 0;
58 /*******************************************************************
59 * SetShellWindow (USER32.@)
61 BOOL WINAPI
SetShellWindow( HWND hwnd
)
63 return NtUserSetShellWindowEx( hwnd
, hwnd
);
67 /*******************************************************************
68 * GetShellWindow (USER32.@)
70 HWND WINAPI
GetShellWindow(void)
72 return NtUserGetShellWindow();
76 /***********************************************************************
77 * SetProgmanWindow (USER32.@)
79 HWND WINAPI
SetProgmanWindow( HWND hwnd
)
81 return NtUserSetProgmanWindow( hwnd
);
85 /***********************************************************************
86 * GetProgmanWindow (USER32.@)
88 HWND WINAPI
GetProgmanWindow(void)
90 return NtUserGetProgmanWindow();
94 /***********************************************************************
95 * SetTaskmanWindow (USER32.@)
97 * hwnd = MSTaskSwWClass
100 HWND WINAPI
SetTaskmanWindow( HWND hwnd
)
102 return NtUserSetTaskmanWindow( hwnd
);
105 /***********************************************************************
106 * GetTaskmanWindow (USER32.@)
108 HWND WINAPI
GetTaskmanWindow(void)
112 SERVER_START_REQ(set_global_windows
)
115 if (!wine_server_call_err(req
))
116 ret
= wine_server_ptr_handle( reply
->old_taskman_window
);