~ubuntu-branches/ubuntu/trusty/unity-control-center/trusty

« back to all changes in this revision

Viewing changes to panels/universal-access/cc-marshal.c

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2014-01-08 16:29:18 UTC
  • Revision ID: package-import@ubuntu.com-20140108162918-g29dd08tr913y2qh
Tags: upstream-14.04.0
ImportĀ upstreamĀ versionĀ 14.04.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <glib.h>
 
2
#include <glib-object.h>
 
3
#include "cc-marshal.h"
 
4
 
 
5
/* VOID:STRING,POINTER (peditor-marshal.list:25) */
 
6
void
 
7
cc_marshal_VOID__STRING_POINTER (GClosure     *closure,
 
8
                                 GValue       *return_value,
 
9
                                 guint         n_param_values,
 
10
                                 const GValue *param_values,
 
11
                                 gpointer      invocation_hint,
 
12
                                 gpointer      marshal_data)
 
13
{
 
14
  typedef void (*GMarshalFunc_VOID__STRING_POINTER) (gpointer     data1,
 
15
                                                     gpointer     arg_1,
 
16
                                                     gpointer     arg_2,
 
17
                                                     gpointer     data2);
 
18
  register GMarshalFunc_VOID__STRING_POINTER callback;
 
19
  register GCClosure *cc = (GCClosure*) closure;
 
20
  register gpointer data1, data2;
 
21
 
 
22
  g_return_if_fail (n_param_values == 3);
 
23
 
 
24
  if (G_CCLOSURE_SWAP_DATA (closure))
 
25
    {
 
26
      data1 = closure->data;
 
27
      data2 = g_value_peek_pointer (param_values + 0);
 
28
    }
 
29
  else
 
30
    {
 
31
      data1 = g_value_peek_pointer (param_values + 0);
 
32
      data2 = closure->data;
 
33
    }
 
34
  callback = (GMarshalFunc_VOID__STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
 
35
 
 
36
  callback (data1,
 
37
            (char*) g_value_get_string (param_values + 1),
 
38
            g_value_get_pointer (param_values + 2),
 
39
            data2);
 
40
}
 
41