title: How to use parametrized member function of a struct in callback?
body: <p>I have a struct that looks like the one below</p>
  
  <pre class="lang-cpp prettyprint-override"><code>struct dc_callback
  { 
      int
      my_configure_event(
          GtkWidget *widget,
          GdkEventConfigure *event,
          struct LoadData *myData)
      {
          ...others
  
          return TRUE;
      }
  
      //Parametrized Constructor 
      int
      my_draw(
          GtkWidget *widget,
          cairo_t *cr,
          struct LoadData *myData)
      {
          ...others
          return TRUE;
      }
  };
  </code></pre>
  
  <p>It has two parametrized member function that I intend to call from <code>g_signal_connect</code> for some nth time.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>main(){
      int i;
      dc_callback dc_callback_instance[nth];
      for(i=0;i&lt;nth;i++){
          g_signal_connect(widget_list[i],"draw",G_CALLBACK(dc_callback_instance[i].my_draw),myData);
          g_signal_connect(widget_list[i],"configure-event",G_CALLBACK(dc_callback_instance[i].my_configure_event),myData);
      }
  }
  </code></pre>
  
  <p>However, during compile time, I get an error regarding invalid use of member function <code>int dc_callback::my_draw(args)</code>. It ask me to add <code>()</code> but that could not be done since the G_CALLBACK accepts function name without its attached argument.</p>
  
  <p>How to I accomplish this?</p>