1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * size.cpp: specialized code for dealing with SizeChangedEventArgs
5 * Copyright 2007 Novell, Inc. (http://www.novell.com)
7 * See the LICENSE file included with the distribution for details.
17 Size::FromStr (const char *s
, Size
*size
)
19 GArray
*values
= double_garray_from_str (s
, 2);
24 *size
= Size (g_array_index (values
, double, 0), g_array_index (values
, double, 1));
26 g_array_free (values
, true);
31 SizeChangedEventArgs::SizeChangedEventArgs()
33 SetObjectType(Type::SIZECHANGEDEVENTARGS
);
34 prev_size
= Size (); new_size
= Size ();
37 SizeChangedEventArgs::SizeChangedEventArgs (Size prev_size
, Size new_size
)
39 SetObjectType(Type::SIZECHANGEDEVENTARGS
);
40 this->prev_size
= prev_size
;
41 this->new_size
= new_size
;
45 size_changed_event_args_get_prev_size (SizeChangedEventArgs
*args
, Size
*prev_size
)
47 *prev_size
= args
->GetPrevSize ();
51 size_changed_event_args_get_new_size (SizeChangedEventArgs
*args
, Size
*new_size
)
53 *new_size
= args
->GetNewSize ();