summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-03 23:05:51 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-03 23:05:51 +0000
commit758338d7593c0b403ffde83b5490c9a19e47ddaa (patch)
tree2ec1cb71ee3367ca2bb07e892ae26f83c3787a42 /views
parentb2f5aae9b7d7410847ba29ecc8390f31beeec658 (diff)
downloadchromium_src-758338d7593c0b403ffde83b5490c9a19e47ddaa.zip
chromium_src-758338d7593c0b403ffde83b5490c9a19e47ddaa.tar.gz
chromium_src-758338d7593c0b403ffde83b5490c9a19e47ddaa.tar.bz2
widget_gtk: Alphabetize CallXXX() functions.
BUG=None TEST=None Patch written by Thiago Farina <thiago.farina@gmail.com>. Review URL: http://codereview.chromium.org/451001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33745 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/widget/widget_gtk.cc170
-rw-r--r--views/widget/widget_gtk.h69
2 files changed, 125 insertions, 114 deletions
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc
index b91d01e..02e7ae7 100644
--- a/views/widget/widget_gtk.cc
+++ b/views/widget/widget_gtk.cc
@@ -918,50 +918,21 @@ void WidgetGtk::SetRootViewForWidget(GtkWidget* widget, RootView* root_view) {
}
// static
-void WidgetGtk::CallSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) {
+gboolean WidgetGtk::CallButtonPress(GtkWidget* widget, GdkEventButton* event) {
WidgetGtk* widget_gtk = GetViewForNative(widget);
if (!widget_gtk)
- return;
+ return false;
- widget_gtk->OnSizeAllocate(widget, allocation);
+ return widget_gtk->OnButtonPress(widget, event);
}
// static
-gboolean WidgetGtk::CallPaint(GtkWidget* widget, GdkEventExpose* event) {
+gboolean WidgetGtk::CallButtonRelease(GtkWidget* widget, GdkEventButton* event) {
WidgetGtk* widget_gtk = GetViewForNative(widget);
- if (widget_gtk)
- widget_gtk->OnPaint(widget, event);
- return false; // False indicates other widgets should get the event as well.
-}
-
-// static
-gboolean WidgetGtk::CallWindowPaint(GtkWidget* widget,
- GdkEventExpose* event,
- WidgetGtk* widget_gtk) {
- widget_gtk->OnWindowPaint(widget, event);
- return false; // False indicates other widgets should get the event as well.
-}
-
-// static
-void WidgetGtk::CallDragDataGet(GtkWidget* widget,
- GdkDragContext* context,
- GtkSelectionData* data,
- guint info,
- guint time,
- WidgetGtk* host) {
- host->OnDragDataGet(context, data, info, time);
-}
+ if (!widget_gtk)
+ return false;
-// static
-void WidgetGtk::CallDragDataReceived(GtkWidget* widget,
- GdkDragContext* context,
- gint x,
- gint y,
- GtkSelectionData* data,
- guint info,
- guint time,
- WidgetGtk* host) {
- return host->OnDragDataReceived(context, x, y, data, info, time);
+ return widget_gtk->OnButtonRelease(widget, event);
}
// static
@@ -975,13 +946,6 @@ gboolean WidgetGtk::CallDragDrop(GtkWidget* widget,
}
// static
-void WidgetGtk::CallDragEnd(GtkWidget* widget,
- GdkDragContext* context,
- WidgetGtk* host) {
- host->OnDragEnd(context);
-}
-
-// static
gboolean WidgetGtk::CallDragFailed(GtkWidget* widget,
GdkDragContext* context,
GtkDragResult result,
@@ -990,14 +954,6 @@ gboolean WidgetGtk::CallDragFailed(GtkWidget* widget,
}
// static
-void WidgetGtk::CallDragLeave(GtkWidget* widget,
- GdkDragContext* context,
- guint time,
- WidgetGtk* host) {
- host->OnDragLeave(context, time);
-}
-
-// static
gboolean WidgetGtk::CallDragMotion(GtkWidget* widget,
GdkDragContext* context,
gint x,
@@ -1007,6 +963,7 @@ gboolean WidgetGtk::CallDragMotion(GtkWidget* widget,
return host->OnDragMotion(context, x, y, time);
}
+// static
gboolean WidgetGtk::CallEnterNotify(GtkWidget* widget, GdkEventCrossing* event) {
WidgetGtk* widget_gtk = GetViewForNative(widget);
if (!widget_gtk)
@@ -1015,68 +972,76 @@ gboolean WidgetGtk::CallEnterNotify(GtkWidget* widget, GdkEventCrossing* event)
return widget_gtk->OnEnterNotify(widget, event);
}
-gboolean WidgetGtk::CallLeaveNotify(GtkWidget* widget, GdkEventCrossing* event) {
+// static
+gboolean WidgetGtk::CallFocusIn(GtkWidget* widget, GdkEventFocus* event) {
WidgetGtk* widget_gtk = GetViewForNative(widget);
if (!widget_gtk)
return false;
- return widget_gtk->OnLeaveNotify(widget, event);
+ return widget_gtk->OnFocusIn(widget, event);
}
-gboolean WidgetGtk::CallMotionNotify(GtkWidget* widget, GdkEventMotion* event) {
+// static
+gboolean WidgetGtk::CallFocusOut(GtkWidget* widget, GdkEventFocus* event) {
WidgetGtk* widget_gtk = GetViewForNative(widget);
if (!widget_gtk)
return false;
- return widget_gtk->OnMotionNotify(widget, event);
+ return widget_gtk->OnFocusOut(widget, event);
}
-gboolean WidgetGtk::CallButtonPress(GtkWidget* widget, GdkEventButton* event) {
+// static
+gboolean WidgetGtk::CallGrabBrokeEvent(GtkWidget* widget, GdkEvent* event) {
WidgetGtk* widget_gtk = GetViewForNative(widget);
if (!widget_gtk)
return false;
- return widget_gtk->OnButtonPress(widget, event);
+ return widget_gtk->OnGrabBrokeEvent(widget, event);
}
-gboolean WidgetGtk::CallButtonRelease(GtkWidget* widget, GdkEventButton* event) {
+// static
+gboolean WidgetGtk::CallKeyPress(GtkWidget* widget, GdkEventKey* event) {
WidgetGtk* widget_gtk = GetViewForNative(widget);
if (!widget_gtk)
return false;
- return widget_gtk->OnButtonRelease(widget, event);
+ return widget_gtk->OnKeyPress(widget, event);
}
-gboolean WidgetGtk::CallFocusIn(GtkWidget* widget, GdkEventFocus* event) {
+// static
+gboolean WidgetGtk::CallKeyRelease(GtkWidget* widget, GdkEventKey* event) {
WidgetGtk* widget_gtk = GetViewForNative(widget);
if (!widget_gtk)
return false;
- return widget_gtk->OnFocusIn(widget, event);
+ return widget_gtk->OnKeyRelease(widget, event);
}
-gboolean WidgetGtk::CallFocusOut(GtkWidget* widget, GdkEventFocus* event) {
+// static
+gboolean WidgetGtk::CallLeaveNotify(GtkWidget* widget, GdkEventCrossing* event)
+{
WidgetGtk* widget_gtk = GetViewForNative(widget);
if (!widget_gtk)
return false;
- return widget_gtk->OnFocusOut(widget, event);
+ return widget_gtk->OnLeaveNotify(widget, event);
}
-gboolean WidgetGtk::CallKeyPress(GtkWidget* widget, GdkEventKey* event) {
+// static
+gboolean WidgetGtk::CallMotionNotify(GtkWidget* widget, GdkEventMotion* event) {
WidgetGtk* widget_gtk = GetViewForNative(widget);
if (!widget_gtk)
return false;
- return widget_gtk->OnKeyPress(widget, event);
+ return widget_gtk->OnMotionNotify(widget, event);
}
-gboolean WidgetGtk::CallKeyRelease(GtkWidget* widget, GdkEventKey* event) {
+// static
+gboolean WidgetGtk::CallPaint(GtkWidget* widget, GdkEventExpose* event) {
WidgetGtk* widget_gtk = GetViewForNative(widget);
- if (!widget_gtk)
- return false;
-
- return widget_gtk->OnKeyRelease(widget, event);
+ if (widget_gtk)
+ widget_gtk->OnPaint(widget, event);
+ return false; // False indicates other widgets should get the event as well.
}
// static
@@ -1090,6 +1055,7 @@ gboolean WidgetGtk::CallQueryTooltip(GtkWidget* widget,
keyboard_mode, tooltip);
}
+// static
gboolean WidgetGtk::CallScroll(GtkWidget* widget, GdkEventScroll* event) {
WidgetGtk* widget_gtk = GetViewForNative(widget);
if (!widget_gtk)
@@ -1098,6 +1064,7 @@ gboolean WidgetGtk::CallScroll(GtkWidget* widget, GdkEventScroll* event) {
return widget_gtk->OnScroll(widget, event);
}
+// static
gboolean WidgetGtk::CallVisibilityNotify(GtkWidget* widget,
GdkEventVisibility* event) {
WidgetGtk* widget_gtk = GetViewForNative(widget);
@@ -1108,12 +1075,55 @@ gboolean WidgetGtk::CallVisibilityNotify(GtkWidget* widget,
}
// static
-gboolean WidgetGtk::CallGrabBrokeEvent(GtkWidget* widget, GdkEvent* event) {
- WidgetGtk* widget_gtk = GetViewForNative(widget);
- if (!widget_gtk)
- return false;
+gboolean WidgetGtk::CallWindowPaint(GtkWidget* widget,
+ GdkEventExpose* event,
+ WidgetGtk* widget_gtk) {
+ widget_gtk->OnWindowPaint(widget, event);
+ return false; // False indicates other widgets should get the event as well.
+}
- return widget_gtk->OnGrabBrokeEvent(widget, event);
+// static
+void WidgetGtk::CallDestroy(GtkObject* object) {
+ WidgetGtk* widget_gtk = GetViewForNative(GTK_WIDGET(object));
+ if (widget_gtk)
+ widget_gtk->OnDestroy();
+}
+
+// static
+void WidgetGtk::CallDragDataGet(GtkWidget* widget,
+ GdkDragContext* context,
+ GtkSelectionData* data,
+ guint info,
+ guint time,
+ WidgetGtk* host) {
+ host->OnDragDataGet(context, data, info, time);
+}
+
+// static
+void WidgetGtk::CallDragDataReceived(GtkWidget* widget,
+ GdkDragContext* context,
+ gint x,
+ gint y,
+ GtkSelectionData* data,
+ guint info,
+ guint time,
+ WidgetGtk* host) {
+ return host->OnDragDataReceived(context, x, y, data, info, time);
+}
+
+// static
+void WidgetGtk::CallDragEnd(GtkWidget* widget,
+ GdkDragContext* context,
+ WidgetGtk* host) {
+ host->OnDragEnd(context);
+}
+
+// static
+void WidgetGtk::CallDragLeave(GtkWidget* widget,
+ GdkDragContext* context,
+ guint time,
+ WidgetGtk* host) {
+ host->OnDragLeave(context, time);
}
// static
@@ -1126,10 +1136,12 @@ void WidgetGtk::CallGrabNotify(GtkWidget* widget, gboolean was_grabbed) {
}
// static
-void WidgetGtk::CallDestroy(GtkObject* object) {
- WidgetGtk* widget_gtk = GetViewForNative(GTK_WIDGET(object));
- if (widget_gtk)
- widget_gtk->OnDestroy();
+void WidgetGtk::CallSizeAllocate(GtkWidget* widget, GtkAllocation* allocation) {
+ WidgetGtk* widget_gtk = GetViewForNative(widget);
+ if (!widget_gtk)
+ return;
+
+ widget_gtk->OnSizeAllocate(widget, allocation);
}
// static
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h
index c5eb1f0..eab01c4 100644
--- a/views/widget/widget_gtk.h
+++ b/views/widget/widget_gtk.h
@@ -261,50 +261,25 @@ class WidgetGtk
void OnWindowPaint(GtkWidget* widget, GdkEventExpose* event);
- // Process a mouse click
+ // Process a mouse click.
bool ProcessMousePressed(GdkEventButton* event);
void ProcessMouseReleased(GdkEventButton* event);
static void SetRootViewForWidget(GtkWidget* widget, RootView* root_view);
- // A set of static signal handlers that bridge
- // TODO(beng): alphabetize!
- static void CallSizeAllocate(GtkWidget* widget, GtkAllocation* allocation);
- static gboolean CallPaint(GtkWidget* widget, GdkEventExpose* event);
- static gboolean CallWindowPaint(GtkWidget* widget,
- GdkEventExpose* event,
- WidgetGtk* widget_gtk);
- static void CallDragDataGet(GtkWidget* widget,
- GdkDragContext* context,
- GtkSelectionData* data,
- guint info,
- guint time,
- WidgetGtk* host);
- static void CallDragDataReceived(GtkWidget* widget,
- GdkDragContext* context,
- gint x,
- gint y,
- GtkSelectionData* data,
- guint info,
- guint time,
- WidgetGtk* host);
+ // A set of static signal handlers that bridge.
+ static gboolean CallButtonPress(GtkWidget* widget, GdkEventButton* event);
+ static gboolean CallButtonRelease(GtkWidget* widget, GdkEventButton* event);
static gboolean CallDragDrop(GtkWidget* widget,
GdkDragContext* context,
gint x,
gint y,
guint time,
WidgetGtk* host);
- static void CallDragEnd(GtkWidget* widget,
- GdkDragContext* context,
- WidgetGtk* host);
static gboolean CallDragFailed(GtkWidget* widget,
GdkDragContext* context,
GtkDragResult result,
WidgetGtk* host);
- static void CallDragLeave(GtkWidget* widget,
- GdkDragContext* context,
- guint time,
- WidgetGtk* host);
static gboolean CallDragMotion(GtkWidget* widget,
GdkDragContext* context,
gint x,
@@ -312,14 +287,14 @@ class WidgetGtk
guint time,
WidgetGtk* host);
static gboolean CallEnterNotify(GtkWidget* widget, GdkEventCrossing* event);
- static gboolean CallLeaveNotify(GtkWidget* widget, GdkEventCrossing* event);
- static gboolean CallMotionNotify(GtkWidget* widget, GdkEventMotion* event);
- static gboolean CallButtonPress(GtkWidget* widget, GdkEventButton* event);
- static gboolean CallButtonRelease(GtkWidget* widget, GdkEventButton* event);
static gboolean CallFocusIn(GtkWidget* widget, GdkEventFocus* event);
static gboolean CallFocusOut(GtkWidget* widget, GdkEventFocus* event);
+ static gboolean CallGrabBrokeEvent(GtkWidget* widget, GdkEvent* event);
static gboolean CallKeyPress(GtkWidget* widget, GdkEventKey* event);
static gboolean CallKeyRelease(GtkWidget* widget, GdkEventKey* event);
+ static gboolean CallLeaveNotify(GtkWidget* widget, GdkEventCrossing* event);
+ static gboolean CallMotionNotify(GtkWidget* widget, GdkEventMotion* event);
+ static gboolean CallPaint(GtkWidget* widget, GdkEventExpose* event);
static gboolean CallQueryTooltip(GtkWidget* widget,
gint x,
gint y,
@@ -329,9 +304,33 @@ class WidgetGtk
static gboolean CallScroll(GtkWidget* widget, GdkEventScroll* event);
static gboolean CallVisibilityNotify(GtkWidget* widget,
GdkEventVisibility* event);
- static gboolean CallGrabBrokeEvent(GtkWidget* widget, GdkEvent* event);
- static void CallGrabNotify(GtkWidget* widget, gboolean was_grabbed);
+ static gboolean CallWindowPaint(GtkWidget* widget,
+ GdkEventExpose* event,
+ WidgetGtk* widget_gtk);
static void CallDestroy(GtkObject* object);
+ static void CallDragDataGet(GtkWidget* widget,
+ GdkDragContext* context,
+ GtkSelectionData* data,
+ guint info,
+ guint time,
+ WidgetGtk* host);
+ static void CallDragDataReceived(GtkWidget* widget,
+ GdkDragContext* context,
+ gint x,
+ gint y,
+ GtkSelectionData* data,
+ guint info,
+ guint time,
+ WidgetGtk* host);
+ static void CallDragEnd(GtkWidget* widget,
+ GdkDragContext* context,
+ WidgetGtk* host);
+ static void CallDragLeave(GtkWidget* widget,
+ GdkDragContext* context,
+ guint time,
+ WidgetGtk* host);
+ static void CallGrabNotify(GtkWidget* widget, gboolean was_grabbed);
+ static void CallSizeAllocate(GtkWidget* widget, GtkAllocation* allocation);
// Returns the first ancestor of |widget| that is a window.
static Window* GetWindowImpl(GtkWidget* widget);