2 * irreco - Ir Remote Control
3 * Copyright (C) 2007,2008 Arto Karppinen (arto.karppinen@iki.fi)
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #include "irreco_internal_dlg.h"
23 * @addtogroup IrrecoInternalDlg
26 * A dialog class which has IrrecoData construction property.
33 * Source file of @ref IrrecoInternalDlg.
38 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
40 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
48 typedef struct _IrrecoInternalDlgPrivate IrrecoInternalDlgPrivate
;
49 struct _IrrecoInternalDlgPrivate
{
50 IrrecoData
*irreco_data
;
53 #define _GET_PRIVATE(_self) \
54 G_TYPE_INSTANCE_GET_PRIVATE( \
55 IRRECO_INTERNAL_DLG(_self), \
56 IRRECO_TYPE_INTERNAL_DLG, \
57 IrrecoInternalDlgPrivate);
61 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
63 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
67 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
68 /* Construction & Destruction */
69 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
72 * @name Construction & Destruction
76 G_DEFINE_TYPE(IrrecoInternalDlg
, irreco_internal_dlg
, IRRECO_TYPE_DLG
)
79 irreco_internal_dlg_init(IrrecoInternalDlg
*object
)
81 /* TODO: Add initialization code here */
85 irreco_internal_dlg_finalize(GObject
*object
)
87 /* TODO: Add deinitalization code here */
89 G_OBJECT_CLASS(irreco_internal_dlg_parent_class
)->finalize (object
);
93 irreco_internal_dlg_set_property(GObject
*object
, guint prop_id
,
94 const GValue
*value
, GParamSpec
*pspec
)
96 IrrecoInternalDlgPrivate
*priv
= NULL
;
97 g_return_if_fail (IRRECO_IS_INTERNAL_DLG (object
));
101 case PROP_IRRECO_DATA
:
102 priv
= _GET_PRIVATE(object
);
103 priv
->irreco_data
= (IrrecoData
*) g_value_get_pointer(value
);
106 G_OBJECT_WARN_INVALID_PROPERTY_ID (object
, prop_id
, pspec
);
112 irreco_internal_dlg_get_property(GObject
*object
, guint prop_id
,
113 GValue
*value
, GParamSpec
*pspec
)
115 IrrecoInternalDlgPrivate
*priv
= NULL
;
116 g_return_if_fail (IRRECO_IS_INTERNAL_DLG (object
));
120 case PROP_IRRECO_DATA
:
121 priv
= _GET_PRIVATE(object
);
122 g_value_set_pointer(value
, priv
->irreco_data
);
125 G_OBJECT_WARN_INVALID_PROPERTY_ID (object
, prop_id
, pspec
);
131 irreco_internal_dlg_class_init(IrrecoInternalDlgClass
*klass
)
133 GObjectClass
* object_class
= G_OBJECT_CLASS (klass
);
134 /*IrrecoDlgClass* parent_class = IRRECO_DLG_CLASS (klass);*/
136 object_class
->finalize
= irreco_internal_dlg_finalize
;
137 object_class
->set_property
= irreco_internal_dlg_set_property
;
138 object_class
->get_property
= irreco_internal_dlg_get_property
;
140 g_type_class_add_private(klass
, sizeof (IrrecoInternalDlgPrivate
));
142 g_object_class_install_property(
145 g_param_spec_pointer(
149 G_PARAM_CONSTRUCT_ONLY
|
158 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
159 /* Public Functions */
160 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
163 * @name Public Functions
167 IrrecoData
*irreco_internal_dlg_get_irreco_data(IrrecoInternalDlg
*self
)
169 IrrecoInternalDlgPrivate
*priv
= NULL
;
172 priv
= _GET_PRIVATE(self
);
173 IRRECO_RETURN_PTR(priv
->irreco_data
);