~ubuntu-branches/ubuntu/maverick/brasero/maverick

« back to all changes in this revision

Viewing changes to src/brasero-layout-object.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Meredith
  • Date: 2006-11-08 05:31:37 UTC
  • mto: (1.4.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20061108053137-fwis69a76eu8rapq
Tags: upstream-0.5.0
ImportĀ upstreamĀ versionĀ 0.5.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *            brasero-layout-object.c
 
3
 *
 
4
 *  dim oct 15 17:15:58 2006
 
5
 *  Copyright  2006  Philippe Rouquier
 
6
 *  bonfire-app@wanadoo.fr
 
7
 ***************************************************************************/
 
8
 
 
9
/*
 
10
 *  This program is free software; you can redistribute it and/or modify
 
11
 *  it under the terms of the GNU General Public License as published by
 
12
 *  the Free Software Foundation; either version 2 of the License, or
 
13
 *  (at your option) any later version.
 
14
 *
 
15
 *  This program is distributed in the hope that it will be useful,
 
16
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
 *  GNU Library General Public License for more details.
 
19
 *
 
20
 *  You should have received a copy of the GNU General Public License
 
21
 *  along with this program; if not, write to the Free Software
 
22
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
23
 */
 
24
 
 
25
#include "brasero-layout-object.h"
 
26
 
 
27
static void brasero_layout_object_base_init (gpointer g_class);
 
28
 
 
29
GType
 
30
brasero_layout_object_get_type()
 
31
{
 
32
        static GType type = 0;
 
33
 
 
34
        if(type == 0) {
 
35
                static const GTypeInfo our_info = {
 
36
                        sizeof (BraseroLayoutObjectIFace),
 
37
                        brasero_layout_object_base_init,
 
38
                        NULL,
 
39
                        NULL,
 
40
                        NULL,
 
41
                        NULL,
 
42
                        0,
 
43
                        0,
 
44
                        NULL,
 
45
                };
 
46
 
 
47
                type = g_type_register_static (G_TYPE_INTERFACE,
 
48
                                               "BraseroLayoutObject",
 
49
                                               &our_info,
 
50
                                               0);
 
51
 
 
52
                g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
 
53
        }
 
54
 
 
55
        return type;
 
56
}
 
57
 
 
58
static void
 
59
brasero_layout_object_base_init (gpointer g_class)
 
60
{
 
61
        static gboolean initialized = FALSE;
 
62
 
 
63
        if (initialized)
 
64
                return;
 
65
 
 
66
        initialized = TRUE;
 
67
}
 
68
 
 
69
void
 
70
brasero_layout_object_get_proportion (BraseroLayoutObject *self,
 
71
                                      gint *header,
 
72
                                      gint *center,
 
73
                                      gint *footer)
 
74
{
 
75
        BraseroLayoutObjectIFace *iface;
 
76
 
 
77
        g_return_if_fail (BRASERO_IS_LAYOUT_OBJECT (self));
 
78
        g_return_if_fail (header != NULL && center != NULL && footer != NULL);
 
79
        
 
80
        iface = BRASERO_LAYOUT_OBJECT_GET_IFACE (self);
 
81
        if (iface->get_proportion)
 
82
                (* iface->get_proportion) (self,
 
83
                                           header,
 
84
                                           center,
 
85
                                           footer);
 
86
}