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