OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_UI_LIBGTKUI_GTK2_SIGNAL_H_ | 5 #ifndef CHROME_BROWSER_UI_LIBGTKUI_GTK_SIGNAL_H_ |
6 #define CHROME_BROWSER_UI_LIBGTKUI_GTK2_SIGNAL_H_ | 6 #define CHROME_BROWSER_UI_LIBGTKUI_GTK_SIGNAL_H_ |
7 | 7 |
8 #include "ui/base/glib/glib_signal.h" | 8 #include "ui/base/glib/glib_signal.h" |
9 | 9 |
10 typedef struct _GtkWidget GtkWidget; | 10 typedef struct _GtkWidget GtkWidget; |
11 | 11 |
12 // These macros handle the common case where the sender object will be a | 12 // These macros handle the common case where the sender object will be a |
13 // GtkWidget*. | 13 // GtkWidget*. |
14 #define CHROMEGTK_CALLBACK_0(CLASS, RETURN, METHOD) \ | 14 #define CHROMEGTK_CALLBACK_0(CLASS, RETURN, METHOD) \ |
15 CHROMEG_CALLBACK_0(CLASS, RETURN, METHOD, GtkWidget*); | 15 CHROMEG_CALLBACK_0(CLASS, RETURN, METHOD, GtkWidget*); |
16 | 16 |
17 #define CHROMEGTK_CALLBACK_1(CLASS, RETURN, METHOD, ARG1) \ | 17 #define CHROMEGTK_CALLBACK_1(CLASS, RETURN, METHOD, ARG1) \ |
18 CHROMEG_CALLBACK_1(CLASS, RETURN, METHOD, GtkWidget*, ARG1); | 18 CHROMEG_CALLBACK_1(CLASS, RETURN, METHOD, GtkWidget*, ARG1); |
19 | 19 |
20 #define CHROMEGTK_CALLBACK_2(CLASS, RETURN, METHOD, ARG1, ARG2) \ | 20 #define CHROMEGTK_CALLBACK_2(CLASS, RETURN, METHOD, ARG1, ARG2) \ |
21 CHROMEG_CALLBACK_2(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2); | 21 CHROMEG_CALLBACK_2(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2); |
22 | 22 |
23 #define CHROMEGTK_CALLBACK_3(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3) \ | 23 #define CHROMEGTK_CALLBACK_3(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3) \ |
24 CHROMEG_CALLBACK_3(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, ARG3); | 24 CHROMEG_CALLBACK_3(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, ARG3); |
25 | 25 |
26 #define CHROMEGTK_CALLBACK_4(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, ARG4) \ | 26 #define CHROMEGTK_CALLBACK_4(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, ARG4) \ |
27 CHROMEG_CALLBACK_4(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, ARG3, \ | 27 CHROMEG_CALLBACK_4(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, ARG3, ARG4); |
28 ARG4); | |
29 | 28 |
30 #define CHROMEGTK_CALLBACK_5(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, ARG4, \ | 29 #define CHROMEGTK_CALLBACK_5(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, ARG4, \ |
31 ARG5) \ | 30 ARG5) \ |
32 CHROMEG_CALLBACK_5(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, ARG3, \ | 31 CHROMEG_CALLBACK_5(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, ARG3, \ |
33 ARG4, ARG5); | 32 ARG4, ARG5); |
34 | 33 |
35 #define CHROMEGTK_CALLBACK_6(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, ARG4, \ | 34 #define CHROMEGTK_CALLBACK_6(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, ARG4, \ |
36 ARG5, ARG6) \ | 35 ARG5, ARG6) \ |
37 CHROMEG_CALLBACK_6(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, ARG3, \ | 36 CHROMEG_CALLBACK_6(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, ARG3, \ |
38 ARG4, ARG5, ARG6); | 37 ARG4, ARG5, ARG6); |
39 | 38 |
40 #define CHROMEGTK_VIRTUAL_CALLBACK_0(CLASS, RETURN, METHOD) \ | 39 #define CHROMEGTK_VIRTUAL_CALLBACK_0(CLASS, RETURN, METHOD) \ |
41 CHROMEG_VIRTUAL_CALLBACK_0(CLASS, RETURN, METHOD, GtkWidget*); | 40 CHROMEG_VIRTUAL_CALLBACK_0(CLASS, RETURN, METHOD, GtkWidget*); |
42 | 41 |
43 #define CHROMEGTK_VIRTUAL_CALLBACK_1(CLASS, RETURN, METHOD, ARG1) \ | 42 #define CHROMEGTK_VIRTUAL_CALLBACK_1(CLASS, RETURN, METHOD, ARG1) \ |
44 CHROMEG_VIRTUAL_CALLBACK_1(CLASS, RETURN, METHOD, GtkWidget*, ARG1); | 43 CHROMEG_VIRTUAL_CALLBACK_1(CLASS, RETURN, METHOD, GtkWidget*, ARG1); |
45 | 44 |
46 #define CHROMEGTK_VIRTUAL_CALLBACK_2(CLASS, RETURN, METHOD, ARG1, ARG2) \ | 45 #define CHROMEGTK_VIRTUAL_CALLBACK_2(CLASS, RETURN, METHOD, ARG1, ARG2) \ |
47 CHROMEG_VIRTUAL_CALLBACK_2(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2); | 46 CHROMEG_VIRTUAL_CALLBACK_2(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2); |
48 | 47 |
49 #define CHROMEGTK_VIRTUAL_CALLBACK_3(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3) \ | 48 #define CHROMEGTK_VIRTUAL_CALLBACK_3(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3) \ |
50 CHROMEG_VIRTUAL_CALLBACK_3(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, \ | 49 CHROMEG_VIRTUAL_CALLBACK_3(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, \ |
51 ARG3); | 50 ARG3); |
52 | 51 |
53 #define CHROMEGTK_VIRTUAL_CALLBACK_4(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, \ | 52 #define CHROMEGTK_VIRTUAL_CALLBACK_4(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, \ |
54 ARG4) \ | 53 ARG4) \ |
55 CHROMEG_VIRTUAL_CALLBACK_4(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, \ | 54 CHROMEG_VIRTUAL_CALLBACK_4(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, \ |
56 ARG3, ARG4); | 55 ARG3, ARG4); |
57 | 56 |
58 #define CHROMEGTK_VIRTUAL_CALLBACK_5(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, \ | 57 #define CHROMEGTK_VIRTUAL_CALLBACK_5(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, \ |
59 ARG4, ARG5) \ | 58 ARG4, ARG5) \ |
60 CHROMEG_VIRTUAL_CALLBACK_5(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, \ | 59 CHROMEG_VIRTUAL_CALLBACK_5(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, \ |
61 ARG3, ARG4, ARG5); | 60 ARG3, ARG4, ARG5); |
62 | 61 |
63 #define CHROMEGTK_VIRTUAL_CALLBACK_6(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, \ | 62 #define CHROMEGTK_VIRTUAL_CALLBACK_6(CLASS, RETURN, METHOD, ARG1, ARG2, ARG3, \ |
64 ARG4, ARG5, ARG6) \ | 63 ARG4, ARG5, ARG6) \ |
65 CHROMEG_VIRTUAL_CALLBACK_6(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, \ | 64 CHROMEG_VIRTUAL_CALLBACK_6(CLASS, RETURN, METHOD, GtkWidget*, ARG1, ARG2, \ |
66 ARG3, ARG4, ARG5, ARG6); | 65 ARG3, ARG4, ARG5, ARG6); |
67 | 66 |
68 #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK2_SIGNAL_H_ | 67 #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_SIGNAL_H_ |
OLD | NEW |