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

Side by Side Diff: views/widget/widget_gtk.cc

Issue 340077: Gets find bar animation/clipping to work on views/gtk. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "views/widget/widget_gtk.h" 5 #include "views/widget/widget_gtk.h"
6 6
7 #include "app/drag_drop_types.h" 7 #include "app/drag_drop_types.h"
8 #include "app/gfx/path.h" 8 #include "app/gfx/path.h"
9 #include "app/os_exchange_data.h" 9 #include "app/os_exchange_data.h"
10 #include "app/os_exchange_data_provider_gtk.h" 10 #include "app/os_exchange_data_provider_gtk.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 // TODO: need to constrain based on screen size. 371 // TODO: need to constrain based on screen size.
372 gtk_window_resize(gtk_window, bounds.width(), bounds.height()); 372 gtk_window_resize(gtk_window, bounds.width(), bounds.height());
373 gtk_window_move(gtk_window, bounds.x(), bounds.y()); 373 gtk_window_move(gtk_window, bounds.x(), bounds.y());
374 } 374 }
375 } 375 }
376 376
377 void WidgetGtk::MoveAbove(Widget* widget) { 377 void WidgetGtk::MoveAbove(Widget* widget) {
378 NOTIMPLEMENTED(); 378 NOTIMPLEMENTED();
379 } 379 }
380 380
381 void WidgetGtk::SetShape(const gfx::Path& shape) { 381 void WidgetGtk::SetShape(gfx::NativeRegion region) {
382 DCHECK(widget_); 382 DCHECK(widget_);
383 DCHECK(widget_->window); 383 DCHECK(widget_->window);
384 384
385 gdk_window_shape_combine_region(widget_->window, NULL, 0, 0);
386 GdkRegion* region = shape.CreateGdkRegion();
387 gdk_window_shape_combine_region(widget_->window, region, 0, 0); 385 gdk_window_shape_combine_region(widget_->window, region, 0, 0);
388 gdk_region_destroy(region); 386 gdk_region_destroy(region);
389 } 387 }
390 388
391 void WidgetGtk::Close() { 389 void WidgetGtk::Close() {
392 if (!widget_) 390 if (!widget_)
393 return; // No need to do anything. 391 return; // No need to do anything.
394 392
395 // Hide first. 393 // Hide first.
396 Hide(); 394 Hide();
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 if (root_view) 1256 if (root_view)
1259 return root_view; 1257 return root_view;
1260 1258
1261 // Enumerate all children and check if they have a RootView. 1259 // Enumerate all children and check if they have a RootView.
1262 gtk_container_foreach(GTK_CONTAINER(window), RootViewLocatorCallback, 1260 gtk_container_foreach(GTK_CONTAINER(window), RootViewLocatorCallback,
1263 static_cast<gpointer>(&root_view)); 1261 static_cast<gpointer>(&root_view));
1264 return root_view; 1262 return root_view;
1265 } 1263 }
1266 1264
1267 } // namespace views 1265 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698