~ubuntu-branches/debian/squeeze/gnome-terminal/squeeze

« back to all changes in this revision

Viewing changes to src/terminal-marshal.c

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2009-03-13 15:11:33 UTC
  • mfrom: (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090313151133-hszv8f99rmvlmvpk
Tags: 2.24.3-3
* Recommend gvfs. Closes: #519159.
* 01_tabs_shortcuts.patch: restore the ability to set shortcuts to 
  each tab. Closes: #519523.
* 02_tabs_shortcuts_translations.patch: restore translations from 
  version 2.22 for this functionality.
  + Thanks to Mart Raudsepp for preparing the patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#ifndef ___terminal_marshal_MARSHAL_H__
 
3
#define ___terminal_marshal_MARSHAL_H__
 
4
 
 
5
#include        <glib-object.h>
 
6
 
 
7
G_BEGIN_DECLS
 
8
 
 
9
#ifdef G_ENABLE_DEBUG
 
10
#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
 
11
#define g_marshal_value_peek_char(v)     g_value_get_char (v)
 
12
#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
 
13
#define g_marshal_value_peek_int(v)      g_value_get_int (v)
 
14
#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
 
15
#define g_marshal_value_peek_long(v)     g_value_get_long (v)
 
16
#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
 
17
#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
 
18
#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
 
19
#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
 
20
#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
 
21
#define g_marshal_value_peek_float(v)    g_value_get_float (v)
 
22
#define g_marshal_value_peek_double(v)   g_value_get_double (v)
 
23
#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
 
24
#define g_marshal_value_peek_param(v)    g_value_get_param (v)
 
25
#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
 
26
#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
 
27
#define g_marshal_value_peek_object(v)   g_value_get_object (v)
 
28
#else /* !G_ENABLE_DEBUG */
 
29
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
 
30
 *          Do not access GValues directly in your code. Instead, use the
 
31
 *          g_value_get_*() functions
 
32
 */
 
33
#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
 
34
#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
 
35
#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
 
36
#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
 
37
#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
 
38
#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
 
39
#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
 
40
#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
 
41
#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
 
42
#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
 
43
#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
 
44
#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
 
45
#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
 
46
#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
 
47
#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
 
48
#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
 
49
#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
 
50
#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
 
51
#endif /* !G_ENABLE_DEBUG */
 
52
 
 
53
 
 
54
/* BOOLEAN:STRING,INT,UINT (../../src/terminal-marshal.list:1) */
 
55
G_GNUC_INTERNAL void _terminal_marshal_BOOLEAN__STRING_INT_UINT (GClosure     *closure,
 
56
                                                                 GValue       *return_value,
 
57
                                                                 guint         n_param_values,
 
58
                                                                 const GValue *param_values,
 
59
                                                                 gpointer      invocation_hint,
 
60
                                                                 gpointer      marshal_data);
 
61
void
 
62
_terminal_marshal_BOOLEAN__STRING_INT_UINT (GClosure     *closure,
 
63
                                            GValue       *return_value G_GNUC_UNUSED,
 
64
                                            guint         n_param_values,
 
65
                                            const GValue *param_values,
 
66
                                            gpointer      invocation_hint G_GNUC_UNUSED,
 
67
                                            gpointer      marshal_data)
 
68
{
 
69
  typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_INT_UINT) (gpointer     data1,
 
70
                                                             gpointer     arg_1,
 
71
                                                             gint         arg_2,
 
72
                                                             guint        arg_3,
 
73
                                                             gpointer     data2);
 
74
  register GMarshalFunc_BOOLEAN__STRING_INT_UINT callback;
 
75
  register GCClosure *cc = (GCClosure*) closure;
 
76
  register gpointer data1, data2;
 
77
  gboolean v_return;
 
78
 
 
79
  g_return_if_fail (return_value != NULL);
 
80
  g_return_if_fail (n_param_values == 4);
 
81
 
 
82
  if (G_CCLOSURE_SWAP_DATA (closure))
 
83
    {
 
84
      data1 = closure->data;
 
85
      data2 = g_value_peek_pointer (param_values + 0);
 
86
    }
 
87
  else
 
88
    {
 
89
      data1 = g_value_peek_pointer (param_values + 0);
 
90
      data2 = closure->data;
 
91
    }
 
92
  callback = (GMarshalFunc_BOOLEAN__STRING_INT_UINT) (marshal_data ? marshal_data : cc->callback);
 
93
 
 
94
  v_return = callback (data1,
 
95
                       g_marshal_value_peek_string (param_values + 1),
 
96
                       g_marshal_value_peek_int (param_values + 2),
 
97
                       g_marshal_value_peek_uint (param_values + 3),
 
98
                       data2);
 
99
 
 
100
  g_value_set_boolean (return_value, v_return);
 
101
}
 
102
 
 
103
G_END_DECLS
 
104
 
 
105
#endif /* ___terminal_marshal_MARSHAL_H__ */
 
106