Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: chrome/views/widget_win.h

Issue 27317: Support DWM switching.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/views/widget.h ('k') | chrome/views/widget_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_VIEWS_WIDGET_WIN_H_ 5 #ifndef CHROME_VIEWS_WIDGET_WIN_H_
6 #define CHROME_VIEWS_WIDGET_WIN_H_ 6 #define CHROME_VIEWS_WIDGET_WIN_H_
7 7
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlcrack.h> 9 #include <atlcrack.h>
10 10
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCMOUSEMOVE, OnMouseRange) 169 MESSAGE_RANGE_HANDLER_EX(WM_NCMOUSEMOVE, WM_NCMOUSEMOVE, OnMouseRange)
170 MESSAGE_RANGE_HANDLER_EX(WM_SETTINGCHANGE, WM_SETTINGCHANGE, OnSettingChange ) 170 MESSAGE_RANGE_HANDLER_EX(WM_SETTINGCHANGE, WM_SETTINGCHANGE, OnSettingChange )
171 171
172 // Reflected message handler 172 // Reflected message handler
173 MESSAGE_HANDLER_EX(kReflectedMessage, OnReflectedMessage) 173 MESSAGE_HANDLER_EX(kReflectedMessage, OnReflectedMessage)
174 174
175 // CustomFrameWindow hacks 175 // CustomFrameWindow hacks
176 MESSAGE_HANDLER_EX(WM_NCUAHDRAWCAPTION, OnNCUAHDrawCaption) 176 MESSAGE_HANDLER_EX(WM_NCUAHDRAWCAPTION, OnNCUAHDrawCaption)
177 MESSAGE_HANDLER_EX(WM_NCUAHDRAWFRAME, OnNCUAHDrawFrame) 177 MESSAGE_HANDLER_EX(WM_NCUAHDRAWFRAME, OnNCUAHDrawFrame)
178 178
179 // Vista and newer
180 MESSAGE_HANDLER_EX(WM_DWMCOMPOSITIONCHANGED, OnDwmCompositionChanged)
181
179 // Non-atlcrack.h handlers 182 // Non-atlcrack.h handlers
180 MESSAGE_HANDLER_EX(WM_GETOBJECT, OnGetObject) 183 MESSAGE_HANDLER_EX(WM_GETOBJECT, OnGetObject)
181 MESSAGE_HANDLER_EX(WM_NCMOUSELEAVE, OnNCMouseLeave) 184 MESSAGE_HANDLER_EX(WM_NCMOUSELEAVE, OnNCMouseLeave)
182 MESSAGE_HANDLER_EX(WM_MOUSELEAVE, OnMouseLeave) 185 MESSAGE_HANDLER_EX(WM_MOUSELEAVE, OnMouseLeave)
183 186
184 // This list is in _ALPHABETICAL_ order! OR I WILL HURT YOU. 187 // This list is in _ALPHABETICAL_ order! OR I WILL HURT YOU.
185 MSG_WM_ACTIVATE(OnActivate) 188 MSG_WM_ACTIVATE(OnActivate)
189 MSG_WM_ACTIVATEAPP(OnActivateApp)
186 MSG_WM_APPCOMMAND(OnAppCommand) 190 MSG_WM_APPCOMMAND(OnAppCommand)
187 MSG_WM_CANCELMODE(OnCancelMode) 191 MSG_WM_CANCELMODE(OnCancelMode)
188 MSG_WM_CAPTURECHANGED(OnCaptureChanged) 192 MSG_WM_CAPTURECHANGED(OnCaptureChanged)
189 MSG_WM_CLOSE(OnClose) 193 MSG_WM_CLOSE(OnClose)
190 MSG_WM_COMMAND(OnCommand) 194 MSG_WM_COMMAND(OnCommand)
191 MSG_WM_CREATE(OnCreate) 195 MSG_WM_CREATE(OnCreate)
192 MSG_WM_DESTROY(OnDestroy) 196 MSG_WM_DESTROY(OnDestroy)
193 MSG_WM_ERASEBKGND(OnEraseBkgnd) 197 MSG_WM_ERASEBKGND(OnEraseBkgnd)
194 MSG_WM_ENDSESSION(OnEndSession) 198 MSG_WM_ENDSESSION(OnEndSession)
195 MSG_WM_ENTERSIZEMOVE(OnEnterSizeMove) 199 MSG_WM_ENTERSIZEMOVE(OnEnterSizeMove)
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 344
341 // Message Handlers 345 // Message Handlers
342 // These are all virtual so that specialized Widgets can modify or augment 346 // These are all virtual so that specialized Widgets can modify or augment
343 // processing. 347 // processing.
344 // This list is in _ALPHABETICAL_ order! 348 // This list is in _ALPHABETICAL_ order!
345 // Note: in the base class these functions must do nothing but convert point 349 // Note: in the base class these functions must do nothing but convert point
346 // coordinates to client coordinates (if necessary) and forward the 350 // coordinates to client coordinates (if necessary) and forward the
347 // handling to the appropriate Process* function. This is so that 351 // handling to the appropriate Process* function. This is so that
348 // subclasses can easily override these methods to do different things 352 // subclasses can easily override these methods to do different things
349 // and have a convenient function to call to get the default behavior. 353 // and have a convenient function to call to get the default behavior.
350 virtual void OnActivate(UINT action, BOOL minimized, HWND window) { } 354 virtual void OnActivate(UINT action, BOOL minimized, HWND window) {
355 SetMsgHandled(FALSE);
356 }
357 virtual void OnActivateApp(BOOL active, DWORD thread_id) {
358 SetMsgHandled(FALSE);
359 }
351 virtual LRESULT OnAppCommand(HWND window, short app_command, WORD device, 360 virtual LRESULT OnAppCommand(HWND window, short app_command, WORD device,
352 int keystate) { 361 int keystate) {
353 SetMsgHandled(FALSE); 362 SetMsgHandled(FALSE);
354 return 0; 363 return 0;
355 } 364 }
356 virtual void OnCancelMode() {} 365 virtual void OnCancelMode() {}
357 virtual void OnCaptureChanged(HWND hwnd); 366 virtual void OnCaptureChanged(HWND hwnd);
358 virtual void OnClose(); 367 virtual void OnClose();
359 virtual void OnCommand( 368 virtual void OnCommand(
360 UINT notification_code, int command_id, HWND window) { SetMsgHandled(FALSE); } 369 UINT notification_code, int command_id, HWND window) { SetMsgHandled(FALSE); }
361 virtual LRESULT OnCreate(LPCREATESTRUCT create_struct) { return 0; } 370 virtual LRESULT OnCreate(LPCREATESTRUCT create_struct) { return 0; }
362 // WARNING: If you override this be sure and invoke super, otherwise we'll 371 // WARNING: If you override this be sure and invoke super, otherwise we'll
363 // leak a few things. 372 // leak a few things.
364 virtual void OnDestroy(); 373 virtual void OnDestroy();
374 virtual LRESULT OnDwmCompositionChanged(UINT msg,
375 WPARAM w_param,
376 LPARAM l_param) {
377 SetMsgHandled(FALSE);
378 return 0;
379 }
365 virtual void OnEndSession(BOOL ending, UINT logoff) { SetMsgHandled(FALSE); } 380 virtual void OnEndSession(BOOL ending, UINT logoff) { SetMsgHandled(FALSE); }
366 virtual void OnEnterSizeMove() { SetMsgHandled(FALSE); } 381 virtual void OnEnterSizeMove() { SetMsgHandled(FALSE); }
367 virtual void OnExitMenuLoop(BOOL is_track_popup_menu) { SetMsgHandled(FALSE); } 382 virtual void OnExitMenuLoop(BOOL is_track_popup_menu) { SetMsgHandled(FALSE); }
368 virtual LRESULT OnEraseBkgnd(HDC dc); 383 virtual LRESULT OnEraseBkgnd(HDC dc);
369 virtual LRESULT OnGetObject(UINT uMsg, WPARAM w_param, LPARAM l_param); 384 virtual LRESULT OnGetObject(UINT uMsg, WPARAM w_param, LPARAM l_param);
370 virtual void OnHScroll(int scroll_type, short position, HWND scrollbar) { 385 virtual void OnHScroll(int scroll_type, short position, HWND scrollbar) {
371 SetMsgHandled(FALSE); 386 SetMsgHandled(FALSE);
372 } 387 }
373 virtual void OnInitMenu(HMENU menu) { SetMsgHandled(FALSE); } 388 virtual void OnInitMenu(HMENU menu) { SetMsgHandled(FALSE); }
374 virtual void OnInitMenuPopup(HMENU menu, UINT position, BOOL is_system_menu) { 389 virtual void OnInitMenuPopup(HMENU menu, UINT position, BOOL is_system_menu) {
375 SetMsgHandled(FALSE); 390 SetMsgHandled(FALSE);
376 } 391 }
377 virtual void OnKeyDown(TCHAR c, UINT rep_cnt, UINT flags); 392 virtual void OnKeyDown(TCHAR c, UINT rep_cnt, UINT flags);
378 virtual void OnKeyUp(TCHAR c, UINT rep_cnt, UINT flags); 393 virtual void OnKeyUp(TCHAR c, UINT rep_cnt, UINT flags);
379 virtual void OnLButtonDblClk(UINT flags, const CPoint& point); 394 virtual void OnLButtonDblClk(UINT flags, const CPoint& point);
380 virtual void OnLButtonDown(UINT flags, const CPoint& point); 395 virtual void OnLButtonDown(UINT flags, const CPoint& point);
381 virtual void OnLButtonUp(UINT flags, const CPoint& point); 396 virtual void OnLButtonUp(UINT flags, const CPoint& point);
382 virtual void OnMButtonDblClk(UINT flags, const CPoint& point); 397 virtual void OnMButtonDblClk(UINT flags, const CPoint& point);
383 virtual void OnMButtonDown(UINT flags, const CPoint& point); 398 virtual void OnMButtonDown(UINT flags, const CPoint& point);
384 virtual void OnMButtonUp(UINT flags, const CPoint& point); 399 virtual void OnMButtonUp(UINT flags, const CPoint& point);
385 virtual LRESULT OnMouseActivate(HWND window, UINT hittest_code, UINT message); 400 virtual LRESULT OnMouseActivate(HWND window, UINT hittest_code, UINT message);
386 virtual void OnMouseMove(UINT flags, const CPoint& point); 401 virtual void OnMouseMove(UINT flags, const CPoint& point);
387 virtual LRESULT OnMouseLeave(UINT uMsg, WPARAM w_param, LPARAM l_param); 402 virtual LRESULT OnMouseLeave(UINT message, WPARAM w_param, LPARAM l_param);
388 virtual void OnMove(const CPoint& point) { SetMsgHandled(FALSE); } 403 virtual void OnMove(const CPoint& point) { SetMsgHandled(FALSE); }
389 virtual void OnMoving(UINT param, const LPRECT new_bounds) { } 404 virtual void OnMoving(UINT param, const LPRECT new_bounds) { }
390 virtual LRESULT OnMouseWheel(UINT flags, short distance, const CPoint& point); 405 virtual LRESULT OnMouseWheel(UINT flags, short distance, const CPoint& point);
391 virtual LRESULT OnMouseRange(UINT msg, WPARAM w_param, LPARAM l_param); 406 virtual LRESULT OnMouseRange(UINT msg, WPARAM w_param, LPARAM l_param);
392 virtual LRESULT OnNCActivate(BOOL active) { SetMsgHandled(FALSE); return 0; } 407 virtual LRESULT OnNCActivate(BOOL active) { SetMsgHandled(FALSE); return 0; }
393 virtual LRESULT OnNCCalcSize(BOOL w_param, LPARAM l_param) { SetMsgHandled(FAL SE); return 0; } 408 virtual LRESULT OnNCCalcSize(BOOL w_param, LPARAM l_param) { SetMsgHandled(FAL SE); return 0; }
394 virtual LRESULT OnNCHitTest(const CPoint& pt) { SetMsgHandled(FALSE); return 0 ; } 409 virtual LRESULT OnNCHitTest(const CPoint& pt) { SetMsgHandled(FALSE); return 0 ; }
395 virtual void OnNCLButtonDblClk(UINT flags, const CPoint& point); 410 virtual void OnNCLButtonDblClk(UINT flags, const CPoint& point);
396 virtual void OnNCLButtonDown(UINT flags, const CPoint& point); 411 virtual void OnNCLButtonDown(UINT flags, const CPoint& point);
397 virtual void OnNCLButtonUp(UINT flags, const CPoint& point); 412 virtual void OnNCLButtonUp(UINT flags, const CPoint& point);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 CComPtr<IAccessible> accessibility_root_; 617 CComPtr<IAccessible> accessibility_root_;
603 618
604 // Our hwnd. 619 // Our hwnd.
605 HWND hwnd_; 620 HWND hwnd_;
606 }; 621 };
607 622
608 } // namespace views 623 } // namespace views
609 624
610 #endif // #ifndef CHROME_VIEWS_WIDGET_WIN_H_ 625 #endif // #ifndef CHROME_VIEWS_WIDGET_WIN_H_
611 626
OLDNEW
« no previous file with comments | « chrome/views/widget.h ('k') | chrome/views/widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698