Mercurial > pidgin.yaz
annotate plugins/win32/winprefs/gtkappbar.c @ 11173:91ca67258564
[gaim-migrate @ 13278]
The DBus plugin example I forgot to upload last time.
committer: Tailor Script <tailor@pidgin.im>
author | Piotr Zielinski <zielaj> |
---|---|
date | Sat, 30 Jul 2005 16:34:18 +0000 |
parents | 522cd02f235f |
children | 12f6164ee2c6 |
rev | line source |
---|---|
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
1 /* |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
2 * gaim - WinGaim Options Plugin |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
3 * |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
4 * File: gtkappbar.c |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
5 * Date: August 2, 2003 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
6 * Description: Appbar functionality for Windows GTK+ applications |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
7 * |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
8 * Copyright (C) 2003, Herman Bloggs <hermanator12002@yahoo.com> |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
9 * |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
10 * This program is free software; you can redistribute it and/or modify |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
11 * it under the terms of the GNU General Public License as published by |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
12 * the Free Software Foundation; either version 2 of the License, or |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
13 * (at your option) any later version. |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
14 * |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
15 * This program is distributed in the hope that it will be useful, |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
18 * GNU General Public License for more details. |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
19 * |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
20 * You should have received a copy of the GNU General Public License |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
21 * along with this program; if not, write to the Free Software |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
23 * |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
24 */ |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
25 /* |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
26 * TODO: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
27 * - Move 'App on top' feature from Trans plugin to here |
8735
92cbf9713795
[gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents:
6436
diff
changeset
|
28 * - Bug: Multiple Show/Hide Desktop calls causes client area to disappear |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
29 */ |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
30 #include <windows.h> |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
31 #include <winver.h> |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
32 #include <stdio.h> |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
33 #include <gtk/gtk.h> |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
34 #include <gdk/gdkwin32.h> |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
35 #include "gtkappbar.h" |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
36 #include "debug.h" |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
37 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
38 #define APPBAR_CALLBACK WM_USER + 1010 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
39 |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
40 typedef HMONITOR WINAPI gaim_MonitorFromPoint(POINT, DWORD); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
41 typedef HMONITOR WINAPI gaim_MonitorFromWindow(HWND, DWORD); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
42 typedef BOOL WINAPI gaim_GetMonitorInfo(HMONITOR, LPMONITORINFO); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
43 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
44 /* Retrieve the rectangular display area from the specified monitor |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
45 * Return TRUE if successful, otherwise FALSE |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
46 */ |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
47 static gboolean |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
48 get_rect_from_monitor(HMODULE hmod, HMONITOR monitor, RECT *rect) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
49 gaim_GetMonitorInfo *the_GetMonitorInfo; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
50 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
51 if (!(the_GetMonitorInfo = (gaim_GetMonitorInfo*) |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
52 GetProcAddress(hmod, "GetMonitorInfoA"))) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
53 return FALSE; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
54 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
55 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
56 MONITORINFO info; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
57 info.cbSize = sizeof(info); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
58 if (!the_GetMonitorInfo(monitor, &info)) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
59 return FALSE; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
60 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
61 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
62 CopyRect(rect, &(info.rcMonitor)); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
63 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
64 return TRUE; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
65 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
66 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
67 /** |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
68 * This will only work on Win98+ and Win2K+ |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
69 * Return TRUE if successful, otherwise FALSE |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
70 */ |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
71 static gboolean |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
72 get_rect_at_point_multimonitor(POINT pt, RECT *rect) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
73 HMODULE hmod; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
74 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
75 if (!(hmod = GetModuleHandle("user32"))) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
76 return FALSE; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
77 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
78 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
79 gaim_MonitorFromPoint *the_MonitorFromPoint; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
80 if (!(the_MonitorFromPoint = (gaim_MonitorFromPoint*) |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
81 GetProcAddress(hmod, "MonitorFromPoint"))) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
82 return FALSE; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
83 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
84 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
85 HMONITOR monitor = |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
86 the_MonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
87 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
88 return get_rect_from_monitor(hmod, monitor, rect); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
89 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
90 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
91 /** |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
92 * This will only work on Win98+ and Win2K+ |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
93 * Return TRUE if successful, otherwise FALSE |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
94 */ |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
95 static gboolean |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
96 get_rect_of_window_multimonitor(HWND window, RECT *rect) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
97 HMODULE hmod; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
98 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
99 if (!(hmod = GetModuleHandle("user32"))) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
100 return FALSE; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
101 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
102 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
103 gaim_MonitorFromWindow *the_MonitorFromWindow; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
104 if (!(the_MonitorFromWindow = (gaim_MonitorFromWindow*) |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
105 GetProcAddress(hmod, "MonitorFromWindow"))) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
106 return FALSE; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
107 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
108 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
109 HMONITOR monitor = |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
110 the_MonitorFromWindow(window, MONITOR_DEFAULTTOPRIMARY); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
111 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
112 return get_rect_from_monitor(hmod, monitor, rect); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
113 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
114 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
115 /* |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
116 * Fallback if cannot get the RECT from the monitor directly |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
117 */ |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
118 static void get_default_workarea(RECT *rect) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
119 if (!SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, FALSE)) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
120 /* I don't think this will ever happen */ |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
121 rect->left = 0; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
122 rect->top = 0; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
123 rect->bottom = GetSystemMetrics(SM_CYSCREEN); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
124 rect->right = GetSystemMetrics(SM_CXSCREEN); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
125 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
126 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
127 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
128 /* Retrieve the rectangle of the active work area at a point */ |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
129 static RECT get_rect_at_point(POINT pt) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
130 RECT rc; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
131 if (!get_rect_at_point_multimonitor(pt, &rc)) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
132 get_default_workarea(&rc); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
133 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
134 return rc; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
135 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
136 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
137 /* Retrieve the rectangle of the active work area of a window*/ |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
138 static RECT get_rect_of_window(HWND window) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
139 RECT rc; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
140 if (!get_rect_of_window_multimonitor(window, &rc)) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
141 get_default_workarea(&rc); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
142 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
143 return rc; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
144 } |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
145 |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
146 static void get_window_normal_rc(HWND hwnd, RECT *rc) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
147 WINDOWPLACEMENT wplc; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
148 GetWindowPlacement(hwnd, &wplc); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
149 CopyRect(rc, &wplc.rcNormalPosition); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
150 } |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
151 #if 0 |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
152 static void print_rect(RECT *rc) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
153 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "RECT: L:%ld R:%ld T:%ld B:%ld\n", |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
154 rc->left, rc->right, rc->top, rc->bottom); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
155 } |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
156 #endif |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
157 /** Set the window style to be the "Tool Window" style - small header, no min/max buttons */ |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
158 static void set_toolbar(HWND hwnd, gboolean val) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
159 LONG style=0; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
160 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
161 style = GetWindowLong(hwnd, GWL_EXSTYLE); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
162 if(val && !(style & WS_EX_TOOLWINDOW)) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
163 style |= WS_EX_TOOLWINDOW; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
164 else if(!val && style & WS_EX_TOOLWINDOW) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
165 style &= ~WS_EX_TOOLWINDOW; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
166 else |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
167 return; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
168 SetWindowLong(hwnd, GWL_EXSTYLE, style); |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
169 SetWindowPos(hwnd, 0, 0, 0, 0, 0, |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
170 SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
171 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
172 /* This really should be the following, but SWP_FRAMECHANGED strangely causes initermittent problems "Show Desktop" done more than once. |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
173 * Not having SWP_FRAMECHANGED *should* cause the Style not to be applied, but i haven't noticed any problems |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
174 * SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
175 */ |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
176 } |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
177 /** Register the window as an appbar */ |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
178 static gboolean gtk_appbar_register(GtkAppBar *ab, HWND hwnd) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
179 APPBARDATA abd; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
180 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
181 abd.cbSize = sizeof(APPBARDATA); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
182 abd.hWnd = hwnd; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
183 abd.uCallbackMessage = APPBAR_CALLBACK; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
184 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
185 ab->registered = SHAppBarMessage(ABM_NEW, &abd); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
186 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
187 return ab->registered; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
188 } |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
189 /** Unregister the window as an appbar */ |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
190 static gboolean gtk_appbar_unregister(GtkAppBar *ab, HWND hwnd) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
191 APPBARDATA abd; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
192 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
193 if(!ab->registered) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
194 return TRUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
195 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
196 abd.cbSize = sizeof(APPBARDATA); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
197 abd.hWnd = hwnd; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
198 |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
199 SHAppBarMessage(ABM_REMOVE, &abd); /** This always returns TRUE */ |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
200 |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
201 ab->registered = FALSE; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
202 |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
203 ab->docked = FALSE; |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
204 ab->docking = FALSE; |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
205 |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
206 return TRUE; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
207 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
208 |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
209 static void gtk_appbar_querypos(GtkAppBar *ab, HWND hwnd, RECT rcWorkspace) { |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
210 APPBARDATA abd; |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
211 guint iWidth = 0; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
212 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
213 if(!ab->registered) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
214 gtk_appbar_register(ab, hwnd); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
215 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
216 abd.hWnd = hwnd; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
217 abd.cbSize = sizeof(APPBARDATA); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
218 abd.uEdge = ab->side; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
219 |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
220 iWidth = ab->docked_rect.right - ab->docked_rect.left; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
221 |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
222 abd.rc.top = rcWorkspace.top; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
223 abd.rc.bottom = rcWorkspace.bottom; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
224 switch (abd.uEdge) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
225 { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
226 case ABE_LEFT: |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
227 abd.rc.left = rcWorkspace.left; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
228 abd.rc.right = rcWorkspace.left + iWidth; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
229 break; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
230 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
231 case ABE_RIGHT: |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
232 abd.rc.right = rcWorkspace.right; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
233 abd.rc.left = rcWorkspace.right - iWidth; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
234 break; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
235 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
236 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
237 /* Ask the system for the screen space */ |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
238 SHAppBarMessage(ABM_QUERYPOS, &abd); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
239 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
240 switch (abd.uEdge) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
241 { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
242 case ABE_LEFT: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
243 abd.rc.right = abd.rc.left + iWidth; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
244 break; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
245 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
246 case ABE_RIGHT: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
247 abd.rc.left = abd.rc.right - iWidth; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
248 break; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
249 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
250 |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
251 CopyRect(&(ab->docked_rect), &abd.rc); |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
252 } |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
253 /* Actually set the size and screen location of the appbar */ |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
254 static void gtk_appbar_setpos(GtkAppBar *ab, HWND hwnd) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
255 APPBARDATA abd; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
256 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
257 if(!ab->registered) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
258 gtk_appbar_register(ab, hwnd); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
259 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
260 abd.hWnd = hwnd; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
261 abd.cbSize = sizeof(APPBARDATA); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
262 CopyRect(&abd.rc, &(ab->docked_rect)); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
263 abd.uEdge = ab->side; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
264 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
265 SHAppBarMessage(ABM_SETPOS, &abd); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
266 } |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
267 /** Let any callbacks know that we have docked or undocked */ |
6436
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
268 static void gtk_appbar_dispatch_dock_cbs(GtkAppBar *ab, gboolean val) { |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
269 GList *lst = ab->dock_cbs; |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
270 |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
271 while(lst) { |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
272 GtkAppBarDockCB dock_cb = lst->data; |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
273 dock_cb(val); |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
274 lst = lst->next; |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
275 } |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
276 } |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
277 |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
278 static GdkFilterReturn wnd_moving(GtkAppBar *ab, GdkXEvent *xevent) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
279 MSG *msg = (MSG*)xevent; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
280 POINT cp; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
281 RECT *rc = (RECT*)msg->lParam; |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
282 RECT monRect; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
283 int side = -1; |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
284 long dockAreaWidth = 0; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
285 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
286 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "wnd_moving\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
287 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
288 GetCursorPos(&cp); |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
289 monRect = get_rect_at_point(cp); |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
290 |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
291 dockAreaWidth = (monRect.right - monRect.left) / 10; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
292 /* Which part of the screen are we in ? */ |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
293 if (cp.x > (monRect.right - dockAreaWidth)) { |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
294 side = ABE_RIGHT; |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
295 } else if (cp.x < (monRect.left + dockAreaWidth)) { |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
296 side = ABE_LEFT; |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
297 } |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
298 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
299 if(!ab->docked) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
300 if( (side == ABE_RIGHT || side == ABE_LEFT) ) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
301 if( !ab->docking ) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
302 ab->side = side; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
303 GetWindowRect(msg->hwnd, &(ab->docked_rect)); |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
304 gtk_appbar_querypos(ab, msg->hwnd, monRect); |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
305 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
306 /* save pre-docking height */ |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
307 ab->undocked_height = rc->bottom - rc->top; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
308 ab->docking = TRUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
309 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
310 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
311 else |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
312 ab->docking = FALSE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
313 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
314 else if(side < 0) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
315 gtk_appbar_unregister(ab, msg->hwnd); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
316 rc->bottom = rc->top + ab->undocked_height; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
317 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
318 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
319 /* Switch to toolbar/regular caption*/ |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
320 if(ab->docking) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
321 set_toolbar(msg->hwnd, TRUE); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
322 else if(!ab->docked) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
323 set_toolbar(msg->hwnd, FALSE); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
324 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
325 return GDK_FILTER_CONTINUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
326 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
327 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
328 static GdkFilterReturn wnd_sizing(GtkAppBar *ab, GdkXEvent *xevent) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
329 MSG *msg = (MSG*)xevent; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
330 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
331 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "wnd_sizing\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
332 if(ab->docked) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
333 RECT *rc = (RECT*)msg->lParam; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
334 if(ab->side == ABE_LEFT && msg->wParam == WMSZ_RIGHT) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
335 ab->docked_rect.right = rc->right; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
336 gtk_appbar_setpos(ab, msg->hwnd); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
337 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
338 else if(ab->side == ABE_RIGHT && msg->wParam == WMSZ_LEFT) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
339 ab->docked_rect.left = rc->left; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
340 gtk_appbar_setpos(ab, msg->hwnd); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
341 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
342 return GDK_FILTER_REMOVE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
343 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
344 return GDK_FILTER_CONTINUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
345 } |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
346 /** Notify the system that the appbar has been activated */ |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
347 static GdkFilterReturn wnd_activate(GtkAppBar *ab, GdkXEvent *xevent) { |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
348 if (ab->registered) { |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
349 APPBARDATA abd; |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
350 MSG *msg = (MSG*)xevent; |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
351 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "wnd_activate\n"); |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
352 |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
353 abd.hWnd = msg->hwnd; |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
354 abd.cbSize = sizeof(APPBARDATA); |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
355 |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
356 SHAppBarMessage(ABM_ACTIVATE, &abd); |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
357 } |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
358 return GDK_FILTER_CONTINUE; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
359 } |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
360 /** Notify the system that the appbar's position has changed */ |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
361 static GdkFilterReturn wnd_poschanged(GtkAppBar *ab, GdkXEvent *xevent) { |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
362 if (ab->registered) { |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
363 APPBARDATA abd; |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
364 MSG *msg = (MSG*)xevent; |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
365 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "wnd_poschanged\n"); |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
366 |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
367 abd.hWnd = msg->hwnd; |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
368 abd.cbSize = sizeof(APPBARDATA); |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
369 |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
370 SHAppBarMessage(ABM_WINDOWPOSCHANGED, &abd); |
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
371 } |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
372 return GDK_FILTER_CONTINUE; |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
373 } |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
374 /** The window is about to change */ |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
375 static GdkFilterReturn wnd_poschanging(GtkAppBar *ab, GdkXEvent *xevent) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
376 MSG *msg = (MSG*)xevent; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
377 WINDOWPOS *wpos = (WINDOWPOS*)msg->lParam; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
378 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
379 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "wnd_poschanging\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
380 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
381 if(ab->docked || ab->docking) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
382 wpos->x = ab->docked_rect.left; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
383 wpos->y = ab->docked_rect.top; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
384 wpos->cx = ab->docked_rect.right - ab->docked_rect.left; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
385 wpos->cy = ab->docked_rect.bottom - ab->docked_rect.top; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
386 if(IsIconic(msg->hwnd)) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
387 set_toolbar(msg->hwnd, FALSE); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
388 /*return GDK_FILTER_REMOVE;*/ |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
389 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
390 return GDK_FILTER_CONTINUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
391 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
392 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
393 static GdkFilterReturn wnd_exitsizemove(GtkAppBar *ab, GdkXEvent *xevent) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
394 MSG *msg = (MSG*)xevent; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
395 |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
396 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "wnd_exitsizemove\n"); |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
397 if(ab->docking) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
398 gtk_appbar_setpos(ab, msg->hwnd); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
399 ab->docking = FALSE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
400 ab->docked = TRUE; |
6436
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
401 gtk_appbar_dispatch_dock_cbs(ab, TRUE); |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
402 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
403 else if(!ab->docked) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
404 gtk_appbar_unregister(ab, msg->hwnd); |
6436
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
405 gtk_appbar_dispatch_dock_cbs(ab, FALSE); |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
406 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
407 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
408 return GDK_FILTER_CONTINUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
409 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
410 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
411 static GdkFilterReturn wnd_showwindow(GtkAppBar *ab, GdkXEvent *xevent) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
412 MSG *msg = (MSG*)xevent; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
413 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
414 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "wnd_showwindow\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
415 if(msg->wParam && ab->docked) { |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
416 ab->iconized = FALSE; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
417 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "shown\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
418 ab->docked = FALSE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
419 gtk_appbar_dock(ab, ab->side); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
420 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
421 else if(!msg->wParam && ab->docked) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
422 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "hidden\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
423 gtk_appbar_unregister(ab, GDK_WINDOW_HWND(ab->win->window)); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
424 set_toolbar(GDK_WINDOW_HWND(ab->win->window), FALSE); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
425 ab->docked = TRUE; |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
426 ab->iconized = TRUE; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
427 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
428 return GDK_FILTER_CONTINUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
429 } |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
430 /** The window's size has changed */ |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
431 static GdkFilterReturn wnd_size(GtkAppBar *ab, GdkXEvent *xevent) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
432 MSG *msg = (MSG*)xevent; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
433 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
434 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "wnd_size\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
435 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
436 if(msg->wParam == SIZE_MINIMIZED) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
437 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "Minimize\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
438 if(ab->docked) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
439 gtk_appbar_unregister(ab, GDK_WINDOW_HWND(ab->win->window)); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
440 ab->docked = TRUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
441 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
442 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
443 else if(msg->wParam == SIZE_RESTORED) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
444 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "Restore\n"); |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
445 if (!ab->iconized && ab->docked) { |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
446 gtk_appbar_dock(ab, ab->side); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
447 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
448 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
449 return GDK_FILTER_CONTINUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
450 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
451 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
452 static GdkFilterReturn wnd_nchittest(GtkAppBar *ab, GdkXEvent *xevent) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
453 MSG *msg = (MSG*)xevent; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
454 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
455 if(ab->docked) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
456 UINT ret = DefWindowProc(msg->hwnd, msg->message, msg->wParam, msg->lParam); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
457 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
458 switch(ret) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
459 case HTBOTTOM: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
460 case HTBOTTOMLEFT: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
461 case HTBOTTOMRIGHT: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
462 case HTTOP: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
463 case HTTOPLEFT: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
464 case HTTOPRIGHT: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
465 return GDK_FILTER_REMOVE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
466 case HTLEFT: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
467 if(ab->side == ABE_LEFT) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
468 return GDK_FILTER_REMOVE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
469 break; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
470 case HTRIGHT: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
471 if(ab->side == ABE_RIGHT) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
472 return GDK_FILTER_REMOVE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
473 break; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
474 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
475 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
476 return GDK_FILTER_CONTINUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
477 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
478 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
479 #if 0 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
480 static GdkFilterReturn wnd_initmenupopup(GtkAppBar *ab, GdkXEvent *xevent) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
481 MSG *msg = (MSG*)xevent; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
482 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
483 if(ab->docked && HIWORD(msg->lParam)) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
484 HMENU sysmenu = GetSystemMenu(msg->hwnd, FALSE); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
485 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "wnd_initpopupmenu: docked: %d ismenu: %d\n", ab->docked, IsMenu(sysmenu)); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
486 if(EnableMenuItem(sysmenu, SC_MAXIMIZE, MF_BYCOMMAND|MF_GRAYED)<0) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
487 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "SC_MAXIMIZE Menu item does not exist\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
488 if(EnableMenuItem(sysmenu, SC_MOVE, MF_BYCOMMAND|MF_GRAYED)<0) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
489 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "SC_MOVE Menu item does not exist\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
490 return GDK_FILTER_CONTINUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
491 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
492 else |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
493 GetSystemMenu(msg->hwnd, TRUE); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
494 return GDK_FILTER_CONTINUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
495 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
496 #endif |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
497 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
498 static GdkFilterReturn gtk_appbar_callback(GtkAppBar *ab, GdkXEvent *xevent) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
499 MSG *msg = (MSG*)xevent; |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
500 RECT orig; |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
501 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
502 switch (msg->wParam) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
503 case ABN_STATECHANGE: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
504 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "gtk_appbar_callback: ABN_STATECHANGE\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
505 break; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
506 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
507 case ABN_FULLSCREENAPP: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
508 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "gtk_appbar_callback: ABN_FULLSCREENAPP: %d\n", (BOOL)msg->lParam); |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
509 if (!ab->iconized && ab->docked) { |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
510 if ((BOOL)msg->lParam) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
511 SetWindowPos(msg->hwnd, HWND_BOTTOM, 0, 0, 0, 0, |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
512 SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
513 } else { |
10538
f348b3439ce4
[gaim-migrate @ 11892]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10531
diff
changeset
|
514 SetWindowPos(msg->hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, |
f348b3439ce4
[gaim-migrate @ 11892]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10531
diff
changeset
|
515 SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_FRAMECHANGED); |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
516 } |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
517 } |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
518 |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
519 break; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
520 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
521 case ABN_POSCHANGED: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
522 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "gtk_appbar_callback: ABN_POSCHANGED\n"); |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
523 CopyRect(&orig, &(ab->docked_rect)); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
524 gtk_appbar_querypos(ab, msg->hwnd, get_rect_of_window(msg->hwnd)); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
525 if (EqualRect(&orig, &(ab->docked_rect)) == 0) { |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
526 MoveWindow(msg->hwnd, ab->docked_rect.left, ab->docked_rect.top, |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
527 ab->docked_rect.right - ab->docked_rect.left, |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
528 ab->docked_rect.bottom - ab->docked_rect.top, TRUE); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
529 } |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
530 gtk_appbar_setpos(ab, msg->hwnd); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
531 break; |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
532 #if 0 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
533 default: |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
534 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "gtk_appbar_callback: %d\n", msg->wParam); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
535 #endif |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
536 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
537 return GDK_FILTER_CONTINUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
538 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
539 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
540 static GdkFilterReturn gtk_appbar_event_filter(GdkXEvent *xevent, GdkEvent *event, gpointer data) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
541 MSG *msg = (MSG*)xevent; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
542 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
543 /*printf("MSG: %s\n", message_to_string (msg->message));*/ |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
544 switch(msg->message) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
545 case WM_EXITSIZEMOVE: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
546 return wnd_exitsizemove(data, xevent); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
547 case WM_WINDOWPOSCHANGING: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
548 return wnd_poschanging(data, xevent); |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
549 case WM_WINDOWPOSCHANGED: |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
550 return wnd_poschanged(data, xevent); |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
551 case WM_ACTIVATE: |
10550
522cd02f235f
[gaim-migrate @ 11924]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10538
diff
changeset
|
552 return wnd_activate(data, xevent); |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
553 case WM_SIZING: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
554 return wnd_sizing(data, xevent); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
555 case WM_MOVING: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
556 return wnd_moving(data, xevent); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
557 case WM_SHOWWINDOW: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
558 return wnd_showwindow(data, xevent); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
559 case WM_NCHITTEST: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
560 return wnd_nchittest(data, xevent); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
561 #if 0 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
562 case WM_INITMENUPOPUP: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
563 return wnd_initmenupopup(data, xevent); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
564 #endif |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
565 case WM_SIZE: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
566 return wnd_size(data, xevent); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
567 case APPBAR_CALLBACK: |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
568 return gtk_appbar_callback(data, xevent); |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
569 #if 0 |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
570 default: |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
571 gaim_debug_info("gtkappbar", "gtk_appbar_event_filter %d\n", msg->message); |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
572 #endif |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
573 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
574 return GDK_FILTER_CONTINUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
575 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
576 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
577 void gtk_appbar_dock(GtkAppBar *ab, UINT side) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
578 RECT orig; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
579 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
580 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "gtk_appbar_dock\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
581 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
582 if(!ab || !IsWindow(GDK_WINDOW_HWND(ab->win->window))) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
583 return; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
584 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
585 ab->side = side; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
586 get_window_normal_rc(GDK_WINDOW_HWND(ab->win->window), &(ab->docked_rect)); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
587 CopyRect(&orig, &(ab->docked_rect)); |
10531
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
588 gtk_appbar_querypos(ab, GDK_WINDOW_HWND(ab->win->window), |
940f0d8ce380
[gaim-migrate @ 11858]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
9795
diff
changeset
|
589 get_rect_of_window(GDK_WINDOW_HWND(ab->win->window))); |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
590 if(EqualRect(&orig, &(ab->docked_rect)) == 0) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
591 MoveWindow(GDK_WINDOW_HWND(ab->win->window), |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
592 ab->docked_rect.left, |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
593 ab->docked_rect.top, |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
594 ab->docked_rect.right - ab->docked_rect.left, |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
595 ab->docked_rect.bottom - ab->docked_rect.top, TRUE); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
596 gtk_appbar_setpos(ab, GDK_WINDOW_HWND(ab->win->window)); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
597 set_toolbar(GDK_WINDOW_HWND(ab->win->window), TRUE); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
598 ab->docked = TRUE; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
599 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
600 |
6436
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
601 void gtk_appbar_add_dock_cb(GtkAppBar *ab, GtkAppBarDockCB dock_cb) { |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
602 if(!ab) |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
603 return; |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
604 ab->dock_cbs = g_list_append(ab->dock_cbs, dock_cb); |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
605 } |
759a81390b36
[gaim-migrate @ 6944]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
6409
diff
changeset
|
606 |
6409
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
607 GtkAppBar *gtk_appbar_add(GtkWidget *win) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
608 GtkAppBar *ab; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
609 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
610 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "gtk_appbar_add\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
611 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
612 if(!win) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
613 return NULL; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
614 ab = g_new0(GtkAppBar, 1); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
615 ab->win = win; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
616 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
617 /* init docking coords */ |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
618 get_window_normal_rc(GDK_WINDOW_HWND(win->window), &(ab->docked_rect)); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
619 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
620 /* Add main window filter */ |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
621 gdk_window_add_filter(win->window, |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
622 gtk_appbar_event_filter, |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
623 ab); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
624 return ab; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
625 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
626 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
627 void gtk_appbar_remove(GtkAppBar *ab) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
628 gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "gtk_appbar_remove\n"); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
629 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
630 if(!ab) |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
631 return; |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
632 gdk_window_remove_filter(ab->win->window, |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
633 gtk_appbar_event_filter, |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
634 ab); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
635 if(ab->docked) { |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
636 gtk_window_resize(GTK_WINDOW(ab->win), |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
637 ab->docked_rect.right - ab->docked_rect.left, |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
638 ab->undocked_height); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
639 set_toolbar(GDK_WINDOW_HWND(ab->win->window), FALSE); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
640 } |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
641 gtk_appbar_unregister(ab, GDK_WINDOW_HWND(ab->win->window)); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
642 |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
643 g_free(ab); |
752d0600b514
[gaim-migrate @ 6915]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
diff
changeset
|
644 } |